Skip to main content

resource_policies

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

Overview

Nameresource_policies
TypeResource
Idaws.ssm_incidents.resource_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
policy_documentstringThe JSON blob that describes the policy.
policy_idstringThe ID of the resource policy.
ram_resource_share_regionstringThe Amazon Web Services Region that policy allows resources to be used in.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_policiesselectresourceArn, regionRetrieves the resource policies attached to the specified response plan.
put_resource_policyreplaceregion, policy, resourceArnAdds a resource policy to the specified response plan. The resource policy is used to share the response plan using Resource Access Manager (RAM). For more information about cross-account sharing, see Cross-Region and cross-account incident management.
delete_resource_policydeleteregionDeletes the resource policy that Resource Access Manager uses to share your Incident Manager resource.

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)
resourceArnstringThe Amazon Resource Name (ARN) of the response plan with the attached resource policy.

SELECT examples

Retrieves the resource policies attached to the specified response plan.

SELECT
policy_document,
policy_id,
ram_resource_share_region
FROM aws.ssm_incidents.resource_policies
WHERE resourceArn = '{{ resourceArn }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Adds a resource policy to the specified response plan. The resource policy is used to share the response plan using Resource Access Manager (RAM). For more information about cross-account sharing, see Cross-Region and cross-account incident management.

REPLACE aws.ssm_incidents.resource_policies
SET
policy = '{{ policy }}',
resourceArn = '{{ resourceArn }}'
WHERE
region = '{{ region }}' --required
AND policy = '{{ policy }}' --required
AND resourceArn = '{{ resourceArn }}' --required
RETURNING
policy_id;

DELETE examples

Deletes the resource policy that Resource Access Manager uses to share your Incident Manager resource.

DELETE FROM aws.ssm_incidents.resource_policies
WHERE region = '{{ region }}' --required
;