resource_policies
Creates, updates, deletes, gets or lists a resource_policies resource.
Overview
| Name | resource_policies |
| Type | Resource |
| Id | aws.organizations.resource_policies |
Fields
The following fields are returned by SELECT queries:
- describe_resource_policy
| Name | Datatype | Description |
|---|---|---|
content | string | The policy text of the resource policy. (pattern: <code>[\s\S]*</code>) |
resource_policy_summary | object | A structure that contains resource policy ID and Amazon Resource Name (ARN). |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_resource_policy | select | region | Retrieves information about a resource policy. You can only call this operation from the management account or a member account that is a delegated administrator. | |
put_resource_policy | replace | region, Content | Creates or updates a resource policy. You can only call this operation from the management account.. | |
delete_resource_policy | delete | region | Deletes the resource policy from your organization. You can only call this operation from the management account. |
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
- describe_resource_policy
Retrieves information about a resource policy. You can only call this operation from the management account or a member account that is a delegated administrator.
SELECT
content,
resource_policy_summary
FROM aws.organizations.resource_policies
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_resource_policy
Creates or updates a resource policy. You can only call this operation from the management account..
REPLACE aws.organizations.resource_policies
SET
Content = '{{ Content }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND Content = '{{ Content }}' --required
RETURNING
resource_policy;
DELETE examples
- delete_resource_policy
Deletes the resource policy from your organization. You can only call this operation from the management account.
DELETE FROM aws.organizations.resource_policies
WHERE region = '{{ region }}' --required
;