permission_associations
Creates, updates, deletes, gets or lists a permission_associations resource.
Overview
| Name | permission_associations |
| Type | Resource |
| Id | aws.ram.permission_associations |
Fields
The following fields are returned by SELECT queries:
- list_permission_associations
| Name | Datatype | Description |
|---|---|---|
next_token | string | If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results. |
permissions | array | A structure with information about this customer managed permission. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_permission_associations | select | region | Lists information about the managed permission and its associations to any resource shares that use this managed permission. This lets you see which resource shares use which versions of the specified managed permission. Always check the NextToken response parameter for a null value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken response parameter value is null only when there are no more results to display. | |
replace_permission_associations | replace | region, fromPermissionArn, toPermissionArn | Updates all resource shares that use a managed permission to a different managed permission. This operation always applies the default version of the target managed permission. You can optionally specify that the update applies to only resource shares that currently use a specified version. This enables you to update to the latest version, without changing the which managed permission is used. You can use this operation to update all of your resource shares to use the current default version of the permission by specifying the same value for the fromPermissionArn and toPermissionArn parameters. You can use the optional fromPermissionVersion parameter to update only those resources that use a specified version of the managed permission to the new managed permission. To successfully perform this operation, you must have permission to update the resource-based policy on all affected resource types. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_permission_associations
Lists information about the managed permission and its associations to any resource shares that use this managed permission. This lets you see which resource shares use which versions of the specified managed permission. Always check the NextToken response parameter for a null value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken response parameter value is null only when there are no more results to display.
SELECT
next_token,
permissions
FROM aws.ram.permission_associations
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- replace_permission_associations
Updates all resource shares that use a managed permission to a different managed permission. This operation always applies the default version of the target managed permission. You can optionally specify that the update applies to only resource shares that currently use a specified version. This enables you to update to the latest version, without changing the which managed permission is used. You can use this operation to update all of your resource shares to use the current default version of the permission by specifying the same value for the fromPermissionArn and toPermissionArn parameters. You can use the optional fromPermissionVersion parameter to update only those resources that use a specified version of the managed permission to the new managed permission. To successfully perform this operation, you must have permission to update the resource-based policy on all affected resource types.
REPLACE aws.ram.permission_associations
SET
fromPermissionArn = '{{ fromPermissionArn }}',
fromPermissionVersion = {{ fromPermissionVersion }},
toPermissionArn = '{{ toPermissionArn }}',
clientToken = '{{ clientToken }}'
WHERE
region = '{{ region }}' --required
AND fromPermissionArn = '{{ fromPermissionArn }}' --required
AND toPermissionArn = '{{ toPermissionArn }}' --required
RETURNING
client_token,
replace_permission_associations_work;