Skip to main content

resource_policies

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

Overview

Nameresource_policies
TypeResource
Idaws.organizations.resource_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
contentstringThe policy text of the resource policy. (pattern: <code>[\s\S]*</code>)
resource_policy_summaryobjectA structure that contains resource policy ID and Amazon Resource Name (ARN).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_resource_policyselectregionRetrieves 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_policyreplaceregion, ContentCreates or updates a resource policy. You can only call this operation from the management account..
delete_resource_policydeleteregionDeletes 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.

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

SELECT examples

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

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

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
;