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
Idaws.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.

Methods

NameAccessible byRequired Params
create_resourceINSERT, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual service_linked_role.

SELECT
region,
role_name,
custom_suffix,
description,
aws_service_name
FROM aws.iam.service_linked_roles
WHERE data__Identifier = '<RoleName>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.iam.service_linked_roles
WHERE data__Identifier = '<RoleName>'
AND region = 'us-east-1';

Permissions

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

Create

iam:CreateServiceLinkedRole,
iam:GetRole

Read

iam:GetRole

Update

iam:UpdateRole,
iam:GetRole

Delete

iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus,
iam:GetRole