---
title: "Attach Ocean Rightsizing Rule"
method: POST
path: "/ocean/{oceanId}/rightSizing/rule/{ruleName}/attachment"
tags: ["Ocean Automatic Rightsizing"]
---

# Attach Ocean Rightsizing Rule

`POST /ocean/{oceanId}/rightSizing/rule/{ruleName}/attachment`

## Parameters

- `#/paths/~1ocean~1%7BoceanId%7D~1rightSizing~1rule/get/parameters/0` — unresolved $ref
- `#/paths/~1ocean~1%7BoceanId%7D~1rightSizing~1rule~1%7BruleName%7D/get/parameters/1` — unresolved $ref
- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref

## Request body

- object
  - `namespaces` object[]
    - `namespaceName` string — List of namespaces
    - `workloads` object[] — List of workloads
      - `name` string — The name of the workload
      - `workloadType` string — The type of the workload
      - `regexName` string — The regex for the workload name

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
