dimensions
Creates, updates, deletes, gets or lists a dimensions resource.
Overview
| Name | dimensions |
| Type | Resource |
| Id | aws.iot.dimensions |
Fields
The following fields are returned by SELECT queries:
- describe_dimension
- list_dimensions
| Name | Datatype | Description |
|---|---|---|
name | string | The unique identifier for the dimension. (pattern: <code>[a-zA-Z0-9:_-]+</code>) |
arn | string | The Amazon Resource Name (ARN) for the dimension. |
creation_date | string (date-time) | The date the dimension was created. |
last_modified_date | string (date-time) | The date the dimension was last modified. |
string_values | array | The value or list of values used to scope the dimension. For example, for topic filters, this is the pattern used to match the MQTT topic name. |
type_ | string | The type of the dimension. (TOPIC_FILTER) |
| Name | Datatype | Description |
|---|---|---|
dimension_name | string | A list of the names of the defined dimensions. Use DescribeDimension to get details for a dimension. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_dimension | select | name, region | Provides details about a dimension that is defined in your Amazon Web Services accounts. Requires permission to access the DescribeDimension action. | |
list_dimensions | select | region | nextToken, maxResults | List the set of dimensions that are defined for your Amazon Web Services accounts. Requires permission to access the ListDimensions action. |
create_dimension | insert | name, region, type, stringValues, clientRequestToken | 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. | |
update_dimension | update | name, region, stringValues | Updates the definition for a dimension. You cannot change the type of a dimension after it is created (you can delete it and recreate it). Requires permission to access the UpdateDimension action. | |
delete_dimension | delete | name, region | Removes the specified dimension from your Amazon Web Services accounts. Requires permission to access the DeleteDimension action. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
name | string | The unique identifier for the dimension that you want to delete. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to retrieve at one time. |
nextToken | string | The token for the next set of results. |
SELECT examples
- describe_dimension
- list_dimensions
Provides details about a dimension that is defined in your Amazon Web Services accounts. Requires permission to access the DescribeDimension action.
SELECT
name,
arn,
creation_date,
last_modified_date,
string_values,
type_
FROM aws.iot.dimensions
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;
List the set of dimensions that are defined for your Amazon Web Services accounts. Requires permission to access the ListDimensions action.
SELECT
dimension_name
FROM aws.iot.dimensions
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_dimension
- Manifest
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.
INSERT INTO aws.iot.dimensions (
type,
stringValues,
tags,
clientRequestToken,
name,
region
)
SELECT
'{{ type }}' /* required */,
'{{ stringValues }}' /* required */,
'{{ tags }}',
'{{ clientRequestToken }}' /* required */,
'{{ name }}',
'{{ region }}'
RETURNING
name,
arn
;
# Description fields are for documentation purposes
- name: dimensions
props:
- name: name
value: "{{ name }}"
description: Required parameter for the dimensions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the dimensions resource.
- name: type
value: "{{ type }}"
valid_values: ['TOPIC_FILTER']
- name: stringValues
value:
- "{{ stringValues }}"
- name: tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: clientRequestToken
value: "{{ clientRequestToken }}"
UPDATE examples
- update_dimension
Updates the definition for a dimension. You cannot change the type of a dimension after it is created (you can delete it and recreate it). Requires permission to access the UpdateDimension action.
UPDATE aws.iot.dimensions
SET
stringValues = '{{ stringValues }}'
WHERE
name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND stringValues = '{{ stringValues }}' --required
RETURNING
name,
arn,
creation_date,
last_modified_date,
string_values,
type_;
DELETE examples
- delete_dimension
Removes the specified dimension from your Amazon Web Services accounts. Requires permission to access the DeleteDimension action.
DELETE FROM aws.iot.dimensions
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;