dimensions
Creates, updates, deletes or gets a dimension
resource or lists dimensions
in a region
Overview
Name | dimensions |
Type | Resource |
Description | A dimension can be used to limit the scope of a metric used in a security profile for AWS IoT Device Defender. |
Id | aws.iot.dimensions |
Fields
Name | Datatype | Description |
---|---|---|
name | string | A unique identifier for the dimension. |
type | string | Specifies the type of the dimension. |
string_values | array | Specifies the value or list of values for the dimension. |
tags | array | Metadata that can be used to manage the dimension. |
arn | string | The ARN (Amazon resource name) of the created dimension. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Type, StringValues, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all dimensions
in a region.
SELECT
region,
name,
type,
string_values,
tags,
arn
FROM aws.iot.dimensions
WHERE region = 'us-east-1';
Gets all properties from an individual dimension
.
SELECT
region,
name,
type,
string_values,
tags,
arn
FROM aws.iot.dimensions
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';
INSERT
example
Use the following StackQL query and manifest file to create a new dimension
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iot.dimensions (
Type,
StringValues,
region
)
SELECT
'{{ Type }}',
'{{ StringValues }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iot.dimensions (
Name,
Type,
StringValues,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ StringValues }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dimension
props:
- name: Name
value: '{{ Name }}'
- name: Type
value: '{{ Type }}'
- name: StringValues
value:
- '{{ StringValues[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.iot.dimensions
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';
Permissions
To operate on the dimensions
resource, the following permissions are required:
Create
iot:CreateDimension,
iot:TagResource
Read
iot:DescribeDimension,
iot:ListTagsForResource
Update
iot:UpdateDimension,
iot:ListTagsForResource,
iot:UntagResource,
iot:TagResource
Delete
iot:DescribeDimension,
iot:DeleteDimension
List
iot:ListDimensions