service_linked_roles
Creates, updates, deletes or gets a service_linked_role
resource or lists service_linked_roles
in a region
Overview
Name | service_linked_roles |
Type | Resource |
Description | Resource Type definition for AWS::IAM::ServiceLinkedRole |
Id | aws.iam.service_linked_roles |
Fields
Name | Datatype | Description |
---|---|---|
role_name | string | The name of the role. |
custom_suffix | string | A string that you provide, which is combined with the service-provided prefix to form the complete role name. |
description | string | The description of the role. |
aws_service_name | string | The service principal for the AWS service to which this role is attached. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | , region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iam.service_linked_roles (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iam.service_linked_roles (
CustomSuffix,
Description,
AWSServiceName,
region
)
SELECT
'{{ CustomSuffix }}',
'{{ Description }}',
'{{ AWSServiceName }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service_linked_role
props:
- name: CustomSuffix
value: '{{ CustomSuffix }}'
- name: Description
value: '{{ Description }}'
- name: AWSServiceName
value: '{{ AWSServiceName }}'
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