Skip to main content

contact_policies

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

Overview

Namecontact_policies
TypeResource
Idaws.ssm_contacts.contact_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
contact_arnstringThe ARN of the contact or escalation plan. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>)
policystringDetails about the resource policy attached to the contact or escalation plan. (pattern: <code>.\S.</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_contact_policyselectregionRetrieves the resource policies attached to the specified contact or escalation plan.
put_contact_policyreplaceregion, ContactArnAdds a resource policy to the specified contact or escalation plan. The resource policy is used to share the contact or escalation plan using Resource Access Manager (RAM). For more information about cross-account sharing, see Setting up cross-account functionality.

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 the resource policies attached to the specified contact or escalation plan.

SELECT
contact_arn,
policy
FROM aws.ssm_contacts.contact_policies
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Adds a resource policy to the specified contact or escalation plan. The resource policy is used to share the contact or escalation plan using Resource Access Manager (RAM). For more information about cross-account sharing, see Setting up cross-account functionality.

REPLACE aws.ssm_contacts.contact_policies
SET
ContactArn = '{{ ContactArn }}',
Policy = '{{ Policy }}'
WHERE
region = '{{ region }}' --required
AND ContactArn = '{{ ContactArn }}' --required;