Skip to main content

role_aliases

Creates, updates, deletes or gets a role_alias resource or lists role_aliases in a region

Overview

Namerole_aliases
TypeResource
DescriptionUse the AWS::IoT::RoleAlias resource to declare an AWS IoT RoleAlias.
Idaws.iot.role_aliases

Fields

NameDatatypeDescription
role_aliasstring
role_alias_arnstring
role_arnstring
credential_duration_secondsinteger
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTRoleArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all role_aliases in a region.

SELECT
region,
role_alias,
role_alias_arn,
role_arn,
credential_duration_seconds,
tags
FROM aws.iot.role_aliases
WHERE region = 'us-east-1';

Gets all properties from an individual role_alias.

SELECT
region,
role_alias,
role_alias_arn,
role_arn,
credential_duration_seconds,
tags
FROM aws.iot.role_aliases
WHERE region = 'us-east-1' AND data__Identifier = '<RoleAlias>';

INSERT example

Use the following StackQL query and manifest file to create a new role_alias resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iot.role_aliases (
RoleArn,
region
)
SELECT
'{{ RoleArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iot.role_aliases
WHERE data__Identifier = '<RoleAlias>'
AND region = 'us-east-1';

Permissions

To operate on the role_aliases resource, the following permissions are required:

Create

iam:GetRole,
iam:PassRole,
iot:CreateRoleAlias,
iot:DescribeRoleAlias,
iot:TagResource,
iot:ListTagsForResource

Read

iam:GetRole,
iam:PassRole,
iot:DescribeRoleAlias,
iot:ListTagsForResource

Update

iam:GetRole,
iam:PassRole,
iot:UpdateRoleAlias,
iot:DescribeRoleAlias,
iot:TagResource,
iot:UntagResource,
iot:ListTagsForResource

Delete

iot:DeleteRoleAlias,
iot:DescribeRoleAlias

List

iot:ListRoleAliases