Skip to main content

permission_sets

Creates, updates, deletes, gets or lists a permission_sets resource.

Overview

Namepermission_sets
TypeResource
Idaws.sso_admin.permission_sets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_datestring (date-time)The date that the permission set was created.
descriptionstringThe description of the PermissionSet. (pattern: <code>[\u0009\u000A\u000D\u0020-\u007E\u00A1-\u00FF]*</code>)
namestringThe name of the permission set. (pattern: <code>[\w+=,.@-]+</code>)
permission_set_arnstringThe ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference. (pattern: <code>arn:aws(-[a-z]{1,5}){0,3}:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}</code>)
relay_statestringUsed to redirect users within the application during the federation authentication process. (pattern: <code>[a-zA-Z0-9&$@#\/%?=~-_'"|!:,.;*+&#91;&#93;\ ()&#123;&#125;]+</code>)
session_durationstringThe length of time that the application user sessions are valid for in the ISO-8601 standard. (pattern: <code>(-?)P(?=\d|T\d)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)([DW]))?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:.\d+)?)S)?)?</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_permission_setselectregionGets the details of the permission set.
list_permission_setsselectregionLists the PermissionSets in an IAM Identity Center instance.
create_permission_setinsertregion, Name, InstanceArnCreates a permission set within a specified IAM Identity Center instance. To grant users and groups access to Amazon Web Services account resources, use CreateAccountAssignment .
attach_customer_managed_policy_reference_to_permission_setupdateregion, InstanceArn, PermissionSetArn, CustomerManagedPolicyReferenceAttaches the specified customer managed policy to the specified PermissionSet.
attach_managed_policy_to_permission_setupdateregion, InstanceArn, PermissionSetArn, ManagedPolicyArnAttaches an Amazon Web Services managed policy ARN to a permission set. If the permission set is already referenced by one or more account assignments, you will need to call ProvisionPermissionSet after this operation. Calling ProvisionPermissionSet applies the corresponding IAM policy updates to all assigned accounts.
provision_permission_setupdateregion, InstanceArn, PermissionSetArn, TargetTypeThe process by which a specified permission set is provisioned to the specified target.
update_permission_setupdateregion, InstanceArn, PermissionSetArnUpdates an existing permission set.
put_inline_policy_to_permission_setreplaceregion, InstanceArn, PermissionSetArn, InlinePolicyAttaches an inline policy to a permission set. If the permission set is already referenced by one or more account assignments, you will need to call ProvisionPermissionSet after this action to apply the corresponding IAM policy updates to all assigned accounts.
put_permissions_boundary_to_permission_setreplaceregion, InstanceArn, PermissionSetArn, PermissionsBoundaryAttaches an Amazon Web Services managed or customer managed policy to the specified PermissionSet as a permissions boundary.
delete_permission_setdeleteregionDeletes the specified permission set.
delete_inline_policy_from_permission_setexecregion, InstanceArn, PermissionSetArnDeletes the inline policy from a specified permission set.
delete_permissions_boundary_from_permission_setexecregion, InstanceArn, PermissionSetArnDeletes the permissions boundary from a specified PermissionSet.
detach_customer_managed_policy_reference_from_permission_setexecregion, InstanceArn, PermissionSetArn, CustomerManagedPolicyReferenceDetaches the specified customer managed policy from the specified PermissionSet.
detach_managed_policy_from_permission_setexecregion, InstanceArn, PermissionSetArn, ManagedPolicyArnDetaches the attached Amazon Web Services managed policy ARN from the specified permission set.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets the details of the permission set.

SELECT
created_date,
description,
name,
permission_set_arn,
relay_state,
session_duration
FROM aws.sso_admin.permission_sets
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a permission set within a specified IAM Identity Center instance. To grant users and groups access to Amazon Web Services account resources, use CreateAccountAssignment .

INSERT INTO aws.sso_admin.permission_sets (
Name,
Description,
InstanceArn,
SessionDuration,
RelayState,
Tags,
region
)
SELECT
'{{ Name }}' /* required */,
'{{ Description }}',
'{{ InstanceArn }}' /* required */,
'{{ SessionDuration }}',
'{{ RelayState }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
permission_set
;

UPDATE examples

Attaches the specified customer managed policy to the specified PermissionSet.

UPDATE aws.sso_admin.permission_sets
SET
InstanceArn = '{{ InstanceArn }}',
PermissionSetArn = '{{ PermissionSetArn }}',
CustomerManagedPolicyReference = '{{ CustomerManagedPolicyReference }}'
WHERE
region = '{{ region }}' --required
AND InstanceArn = '{{ InstanceArn }}' --required
AND PermissionSetArn = '{{ PermissionSetArn }}' --required
AND CustomerManagedPolicyReference = '{{ CustomerManagedPolicyReference }}' --required;

REPLACE examples

Attaches an inline policy to a permission set. If the permission set is already referenced by one or more account assignments, you will need to call ProvisionPermissionSet after this action to apply the corresponding IAM policy updates to all assigned accounts.

REPLACE aws.sso_admin.permission_sets
SET
InstanceArn = '{{ InstanceArn }}',
PermissionSetArn = '{{ PermissionSetArn }}',
InlinePolicy = '{{ InlinePolicy }}'
WHERE
region = '{{ region }}' --required
AND InstanceArn = '{{ InstanceArn }}' --required
AND PermissionSetArn = '{{ PermissionSetArn }}' --required
AND InlinePolicy = '{{ InlinePolicy }}' --required;

DELETE examples

Deletes the specified permission set.

DELETE FROM aws.sso_admin.permission_sets
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Deletes the inline policy from a specified permission set.

EXEC aws.sso_admin.permission_sets.delete_inline_policy_from_permission_set
@region='{{ region }}' --required
@@json=
'{
"InstanceArn": "{{ InstanceArn }}",
"PermissionSetArn": "{{ PermissionSetArn }}"
}'
;