resource_share_permissions
Creates, updates, deletes, gets or lists a resource_share_permissions resource.
Overview
| Name | resource_share_permissions |
| Type | Resource |
| Id | aws.ram.resource_share_permissions |
Fields
The following fields are returned by SELECT queries:
- list_resource_share_permissions
| 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 | An array of objects that describe the permissions associated with the resource share. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_resource_share_permissions | select | region | Lists the RAM permissions that are associated with a resource share. 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. | |
associate_resource_share_permission | update | region, resourceShareArn, permissionArn | Adds or replaces the RAM permission for a resource type included in a resource share. You can have exactly one permission associated with each resource type in the resource share. You can add a new RAM permission only if there are currently no resources of that resource type currently in the resource share. | |
disassociate_resource_share_permission | exec | region, resourceShareArn, permissionArn | Removes a managed permission from a resource share. Permission changes take effect immediately. You can remove a managed permission from a resource share only if there are currently no resources of the relevant resource type currently attached to the resource share. |
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_resource_share_permissions
Lists the RAM permissions that are associated with a resource share. 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.resource_share_permissions
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- associate_resource_share_permission
Adds or replaces the RAM permission for a resource type included in a resource share. You can have exactly one permission associated with each resource type in the resource share. You can add a new RAM permission only if there are currently no resources of that resource type currently in the resource share.
UPDATE aws.ram.resource_share_permissions
SET
resourceShareArn = '{{ resourceShareArn }}',
permissionArn = '{{ permissionArn }}',
replace = {{ replace }},
clientToken = '{{ clientToken }}',
permissionVersion = {{ permissionVersion }}
WHERE
region = '{{ region }}' --required
AND resourceShareArn = '{{ resourceShareArn }}' --required
AND permissionArn = '{{ permissionArn }}' --required
RETURNING
client_token,
return_value;
Lifecycle Methods
- disassociate_resource_share_permission
Removes a managed permission from a resource share. Permission changes take effect immediately. You can remove a managed permission from a resource share only if there are currently no resources of the relevant resource type currently attached to the resource share.
EXEC aws.ram.resource_share_permissions.disassociate_resource_share_permission
@region='{{ region }}' --required
@@json=
'{
"resourceShareArn": "{{ resourceShareArn }}",
"permissionArn": "{{ permissionArn }}",
"clientToken": "{{ clientToken }}"
}'
;