AWS::IoT::Dimension - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Use the AWS::IoT::Dimension to limit the scope of a metric used in a security profile for Amazon IoT Device Defender. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. For API reference, see CreateDimension and for general information, see Scoping metrics in security profiles using dimensions.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Type" : "AWS::IoT::Dimension", "Properties" : { "Name" : String, "StringValues" : [ String, ... ], "Tags" : [ Tag, ... ], "Type" : String } }


Type: AWS::IoT::Dimension Properties: Name: String StringValues: - String Tags: - Tag Type: String



A unique identifier for the dimension.

Required: No

Type: String

Pattern: [a-zA-Z0-9:_-]+

Minimum: 1

Maximum: 128

Update requires: Replacement


Specifies the value or list of values for the dimension. For TOPIC_FILTER dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").

Required: Yes

Type: Array of String

Minimum: 1 | 1

Maximum: 256 | 5

Update requires: No interruption


Metadata that can be used to manage the dimension.

Required: No

Type: Array of Tag

Maximum: 50

Update requires: No interruption


Specifies the type of dimension. Supported types: TOPIC_FILTER.

Required: Yes

Type: String

Allowed values: TOPIC_FILTER

Update requires: Replacement

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the dimension name.


The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.


The Amazon Resource Name (ARN) of the dimension.



{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "Amazon Web Services IoT Dimension Sample Template", "Resources": { "TopicFilterForAuthMessagesDimension": { "Type": "AWS::IoT::Dimension", "Properties": { "Name": "TopicFilterForAuthMessages", "Type": "TOPIC_FILTER", "StringValues": [ "device/+/auth" ], "Tags": [ { "Key": "Application", "Value": "SmartHome" } ] } } } }


AWSTemplateFormatVersion: 2010-09-09 Description: Amazon Web Services IoT Dimension Sample Template Resources: TopicFilterForAuthMessagesDimension: Type: 'AWS::IoT::Dimension' Properties: Name: TopicFilterForAuthMessages Type: TOPIC_FILTER StringValues: - device/+/auth Tags: - Key: Application Value: SmartHome