IoT.Client.
create_dimension
(**kwargs)¶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 action.
See also: AWS API Documentation
Request Syntax
response = client.create_dimension(
name='string',
type='TOPIC_FILTER',
stringValues=[
'string',
],
tags=[
{
'Key': 'string',
'Value': 'string'
},
],
clientRequestToken='string'
)
[REQUIRED]
A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.
[REQUIRED]
Specifies the type of dimension. Supported types: TOPIC_FILTER.
[REQUIRED]
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/#").
Metadata that can be used to manage the dimension.
A set of key/value pairs that are used to manage the resource.
The tag's key.
The tag's value.
[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.
This field is autopopulated if not provided.
dict
Response Syntax
{
'name': 'string',
'arn': 'string'
}
Response Structure
(dict) --
name (string) --
A unique identifier for the dimension.
arn (string) --
The Amazon Resource Name (ARN) of the created dimension.
Exceptions
IoT.Client.exceptions.InternalFailureException
IoT.Client.exceptions.InvalidRequestException
IoT.Client.exceptions.LimitExceededException
IoT.Client.exceptions.ResourceAlreadyExistsException
IoT.Client.exceptions.ThrottlingException