Skip to main content

service_linked_roles

Creates, updates, deletes or gets a service_linked_role resource or lists service_linked_roles in a region

Overview

Nameservice_linked_roles
TypeResource
DescriptionResource Type definition for AWS::IAM::ServiceLinkedRole
Idawscc.iam.service_linked_roles

Fields

NameDatatypeDescription
role_namestringThe name of the role.
custom_suffixstringA string that you provide, which is combined with the service-provided prefix to form the complete role name.
descriptionstringThe description of the role.
aws_service_namestringThe service principal for the AWS service to which this role is attached.
regionstringAWS region.

For more information, see AWS::IAM::ServiceLinkedRole.

Methods

NameAccessible byRequired Params
create_resourceINSERT, region
delete_resourceDELETEIdentifier, region
update_resourceUPDATEIdentifier, PatchDocument, region
get_resourceSELECTIdentifier, region

SELECT examples

Gets all properties from an individual service_linked_role.

SELECT
region,
role_name,
custom_suffix,
description,
aws_service_name
FROM awscc.iam.service_linked_roles
WHERE
region = 'us-east-1' AND
Identifier = '{{ role_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.iam.service_linked_roles (
,
region
)
SELECT
'{{ }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.iam.service_linked_roles
SET PatchDocument = string('{{ {
"Description": description
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ role_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.iam.service_linked_roles
WHERE
Identifier = '{{ role_name }}' AND
region = 'us-east-1';

Permissions

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

iam:CreateServiceLinkedRole,
iam:GetRole