AWS::IoT::Dimension - AWS CloudFormation

AWS::IoT::Dimension

Use the AWS::IoT::Dimension to limit the scope of a metric used in a security profile for AWS 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.

Syntax

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

JSON

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

YAML

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

Properties

Name

A unique identifier for the dimension.

Required: No

Type: String

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

Minimum: 1

Maximum: 128

Update requires: Replacement

StringValues

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

Tags

Metadata that can be used to manage the dimension.

Required: No

Type: Array of Tag

Maximum: 50

Update requires: No interruption

Type

Specifies the type of dimension. Supported types: TOPIC_FILTER.

Required: Yes

Type: String

Allowed values: TOPIC_FILTER

Update requires: Replacement

Return values

Ref

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

Fn::GetAtt

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.

Arn

The Amazon Resource Name (ARN) of the dimension.

Examples

JSON

{ "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" } ] } } } }

YAML

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