---
title: "POST /dimensions/{name}"
method: POST
path: "/dimensions/{name}"
---

# POST /dimensions/{name}

`POST /dimensions/{name}`

Create a dimension that you can use to limit the scope of a metric used in a security profile for IoT Device Defender. For example, using a `TOPIC_FILTER` dimension, you can narrow down the scope of the metric only to MQTT topics whose name match the pattern specified in the dimension.

Requires permission to access the [CreateDimension](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Path parameters

- `name` string, required

## Request body

- object
  - `type` 'TOPIC_FILTER', required — Specifies the type of dimension. Supported types: <code>TOPIC_FILTER.</code>
  - `stringValues` DimensionStringValue[], required — Specifies the value or list of values for the dimension. For <code>TOPIC_FILTER</code> dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").
  - `tags` Tag[] — Metadata that can be used to manage the dimension.
    - `Key` string, required — The tag's key.
    - `Value` string — The tag's value.
  - `clientRequestToken` string, required — Each dimension must have a unique client request token. If you try to create a new dimension with the same token as a dimension that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

## Response `200`

Success

- CreateDimensionResponse
  - `name` string — A unique identifier for the dimension.
  - `arn` string — The Amazon Resource Name (ARN) of the created dimension.

## Other responses

- `480` — InternalFailureException
- `481` — InvalidRequestException
- `482` — LimitExceededException
- `483` — ResourceAlreadyExistsException
- `484` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/versions/deef5c4b09f0/schema)
