contact_policies
Creates, updates, deletes, gets or lists a contact_policies resource.
Overview
| Name | contact_policies |
| Type | Resource |
| Id | aws.ssm_contacts.contact_policies |
Fields
The following fields are returned by SELECT queries:
- get_contact_policy
| Name | Datatype | Description |
|---|---|---|
contact_arn | string | The ARN of the contact or escalation plan. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>) |
policy | string | Details about the resource policy attached to the contact or escalation plan. (pattern: <code>.\S.</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_contact_policy | select | region | Retrieves the resource policies attached to the specified contact or escalation plan. | |
put_contact_policy | replace | region, ContactArn | 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. |
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
- get_contact_policy
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
- put_contact_policy
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;