IoT / Client / create_dimension
create_dimension#
- 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_FILTERdimension, 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' ) - Parameters:
- name (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. 
- type (string) – - [REQUIRED] - Specifies the type of dimension. Supported types: - TOPIC_FILTER.
- stringValues (list) – - [REQUIRED] - Specifies the value or list of values for the dimension. For - TOPIC_FILTERdimensions, this is a pattern used to match the MQTT topic (for example, “admin/#”).- (string) – 
 
- tags (list) – - Metadata that can be used to manage the dimension. - (dict) – - A set of key/value pairs that are used to manage the resource. - 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. - This field is autopopulated if not provided. 
 
- Return type:
- dict 
- Returns:
- 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