resource_policies
Creates, updates, deletes, gets or lists a resource_policies resource.
Overview
| Name | resource_policies |
| Type | Resource |
| Id | aws.migration_hub_refactor_spaces.resource_policies |
Fields
The following fields are returned by SELECT queries:
- get_resource_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | A JSON-formatted string for an Amazon Web Services resource-based policy. (pattern: <code>^.\S.$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_policy | select | identifier, region | Gets the resource-based permission policy that is set for the given environment. | |
put_resource_policy | replace | region, ResourceArn | Attaches a resource-based permission policy to the Amazon Web Services Migration Hub Refactor Spaces environment. The policy must contain the same actions and condition statements as the arn:aws🐏:aws:permission/AWSRAMDefaultPermissionRefactorSpacesEnvironment permission in Resource Access Manager. The policy must not contain new lines or blank lines. | |
delete_resource_policy | delete | identifier, region | Deletes the resource policy set for the environment. |
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 |
|---|---|---|
identifier | string | Amazon Resource Name (ARN) of the resource associated with the policy. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_resource_policy
Gets the resource-based permission policy that is set for the given environment.
SELECT
policy
FROM aws.migration_hub_refactor_spaces.resource_policies
WHERE identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
REPLACE examples
- put_resource_policy
Attaches a resource-based permission policy to the Amazon Web Services Migration Hub Refactor Spaces environment. The policy must contain the same actions and condition statements as the arn:aws🐏:aws:permission/AWSRAMDefaultPermissionRefactorSpacesEnvironment permission in Resource Access Manager. The policy must not contain new lines or blank lines.
REPLACE aws.migration_hub_refactor_spaces.resource_policies
SET
Policy = '{{ Policy }}',
ResourceArn = '{{ ResourceArn }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required;
DELETE examples
- delete_resource_policy
Deletes the resource policy set for the environment.
DELETE FROM aws.migration_hub_refactor_spaces.resource_policies
WHERE identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;