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.
Idawscc.iot.role_aliases

Fields

NameDatatypeDescription
role_aliasstring
role_alias_arnstring
role_arnstring
credential_duration_secondsinteger
tagsarray
regionstringAWS region.

For more information, see AWS::IoT::RoleAlias.

Methods

NameResourceAccessible byRequired Params
create_resourcerole_aliasesINSERTRoleArn, region
delete_resourcerole_aliasesDELETEIdentifier, region
update_resourcerole_aliasesUPDATEIdentifier, PatchDocument, region
list_resourcesrole_aliases_list_onlySELECTregion
get_resourcerole_aliasesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual role_alias.

SELECT
region,
role_alias,
role_alias_arn,
role_arn,
credential_duration_seconds,
tags
FROM awscc.iot.role_aliases
WHERE
region = '{{ region }}' AND
Identifier = '{{ role_alias }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.iot.role_aliases (
RoleArn,
region
)
SELECT
'{{ role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.iot.role_aliases
SET PatchDocument = string('{{ {
"RoleArn": role_arn,
"CredentialDurationSeconds": credential_duration_seconds,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ role_alias }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.iot.role_aliases
WHERE
Identifier = '{{ role_alias }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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