Skip to main content

contact_channels

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

Overview

Namecontact_channels
TypeResource
Idaws.ssm_contacts.contact_channels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
activation_statusstringA Boolean value indicating if the contact channel has been activated or not. (ACTIVATED, NOT_ACTIVATED)
contact_arnstringThe ARN of the contact that the channel belongs to. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>)
contact_channel_arnstringThe ARN of the contact channel. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>)
delivery_addressobjectThe details that Incident Manager uses when trying to engage the contact channel.
namestringThe name of the contact channel (pattern: <code>^[\p{L}\p{Z}\p{N}_.-]*$</code>)
typestringThe type of contact channel. The type is SMS, VOICE, or EMAIL. (SMS, VOICE, EMAIL)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_contact_channelselectregionList details about a specific contact channel.
list_contact_channelsselectregionLists all contact channels for the specified contact.
create_contact_channelinsertregion, ContactId, DeliveryAddressA contact channel is the method that Incident Manager uses to engage your contact.
update_contact_channelupdateregion, ContactChannelIdUpdates a contact's contact channel.
delete_contact_channeldeleteregionTo stop receiving engagements on a contact channel, you can delete the channel from a contact. Deleting the contact channel does not remove it from the contact's engagement plan, but the stage that includes the channel will be ignored. If you delete the only contact channel for a contact, you'll no longer be able to engage that contact during an incident.
send_activation_codeexecregion, ContactChannelIdSends an activation code to a contact channel. The contact can use this code to activate the contact channel in the console or with the ActivateChannel operation. Incident Manager can't engage a contact channel until it has been activated.

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

List details about a specific contact channel.

SELECT
activation_status,
contact_arn,
contact_channel_arn,
delivery_address,
name,
type
FROM aws.ssm_contacts.contact_channels
WHERE region = '{{ region }}' -- required
;

INSERT examples

A contact channel is the method that Incident Manager uses to engage your contact.

INSERT INTO aws.ssm_contacts.contact_channels (
ContactId,
Name,
Type,
DeliveryAddress,
DeferActivation,
IdempotencyToken,
region
)
SELECT
'{{ ContactId }}' /* required */,
'{{ Name }}',
'{{ Type }}',
'{{ DeliveryAddress }}' /* required */,
{{ DeferActivation }},
'{{ IdempotencyToken }}',
'{{ region }}'
RETURNING
contact_channel_arn
;

UPDATE examples

Updates a contact's contact channel.

UPDATE aws.ssm_contacts.contact_channels
SET
ContactChannelId = '{{ ContactChannelId }}',
Name = '{{ Name }}',
DeliveryAddress = '{{ DeliveryAddress }}'
WHERE
region = '{{ region }}' --required
AND ContactChannelId = '{{ ContactChannelId }}' --required;

DELETE examples

To stop receiving engagements on a contact channel, you can delete the channel from a contact. Deleting the contact channel does not remove it from the contact's engagement plan, but the stage that includes the channel will be ignored. If you delete the only contact channel for a contact, you'll no longer be able to engage that contact during an incident.

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

Lifecycle Methods

Sends an activation code to a contact channel. The contact can use this code to activate the contact channel in the console or with the ActivateChannel operation. Incident Manager can't engage a contact channel until it has been activated.

EXEC aws.ssm_contacts.contact_channels.send_activation_code
@region='{{ region }}' --required
@@json=
'{
"ContactChannelId": "{{ ContactChannelId }}"
}'
;