Skip to main content

contacts

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

Overview

Namecontacts
TypeResource
Idaws.ssm_contacts.contacts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aliasstringThe alias of the contact or escalation plan. The alias is unique and identifiable. (pattern: <code>^[a-z0-9_-]*$</code>)
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>)
display_namestringThe full name of the contact or escalation plan. (pattern: <code>^[\p{L}\p{Z}\p{N}_.-]*$</code>)
planobjectDetails about the specific timing or stages and targets of the escalation plan or engagement plan.
typestringThe type of contact. (PERSONAL, ESCALATION, ONCALL_SCHEDULE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_contactselectregionRetrieves information about the specified contact or escalation plan.
list_contactsselectregionLists all contacts and escalation plans in Incident Manager.
create_contactinsertregionContacts are either the contacts that Incident Manager engages during an incident or the escalation plans that Incident Manager uses to engage contacts in phases during an incident.
update_contactupdateregion, ContactIdUpdates the contact or escalation plan specified.
delete_contactdeleteregionTo remove a contact from Incident Manager, you can delete the contact. However, deleting a contact does not remove it from escalation plans and related response plans. Deleting an escalation plan also does not remove it from all related response plans. To modify an escalation plan, we recommend using the UpdateContact action to specify a different existing contact.
activate_contact_channelexecregion, ContactChannelId, ActivationCodeActivates a contact's contact channel. Incident Manager can't engage a contact until the contact channel has been activated.
deactivate_contact_channelexecregion, ContactChannelIdTo no longer receive Incident Manager engagements to a contact channel, you can deactivate the channel.

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 the specified contact or escalation plan.

SELECT
alias,
contact_arn,
display_name,
plan,
type
FROM aws.ssm_contacts.contacts
WHERE region = '{{ region }}' -- required
;

INSERT examples

Contacts are either the contacts that Incident Manager engages during an incident or the escalation plans that Incident Manager uses to engage contacts in phases during an incident.

INSERT INTO aws.ssm_contacts.contacts (
Alias,
DisplayName,
Type,
Plan,
Tags,
IdempotencyToken,
region
)
SELECT
'{{ Alias }}',
'{{ DisplayName }}',
'{{ Type }}',
'{{ Plan }}',
'{{ Tags }}',
'{{ IdempotencyToken }}',
'{{ region }}'
RETURNING
contact_arn
;

UPDATE examples

Updates the contact or escalation plan specified.

UPDATE aws.ssm_contacts.contacts
SET
ContactId = '{{ ContactId }}',
DisplayName = '{{ DisplayName }}',
Plan = '{{ Plan }}'
WHERE
region = '{{ region }}' --required
AND ContactId = '{{ ContactId }}' --required;

DELETE examples

To remove a contact from Incident Manager, you can delete the contact. However, deleting a contact does not remove it from escalation plans and related response plans. Deleting an escalation plan also does not remove it from all related response plans. To modify an escalation plan, we recommend using the UpdateContact action to specify a different existing contact.

DELETE FROM aws.ssm_contacts.contacts
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Activates a contact's contact channel. Incident Manager can't engage a contact until the contact channel has been activated.

EXEC aws.ssm_contacts.contacts.activate_contact_channel
@region='{{ region }}' --required
@@json=
'{
"ContactChannelId": "{{ ContactChannelId }}",
"ActivationCode": "{{ ActivationCode }}"
}'
;