contact_channels
Creates, updates, deletes, gets or lists a contact_channels resource.
Overview
| Name | contact_channels |
| Type | Resource |
| Id | aws.ssm_contacts.contact_channels |
Fields
The following fields are returned by SELECT queries:
- get_contact_channel
- list_contact_channels
| Name | Datatype | Description |
|---|---|---|
activation_status | string | A Boolean value indicating if the contact channel has been activated or not. (ACTIVATED, NOT_ACTIVATED) |
contact_arn | string | The 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_arn | string | The ARN of the contact channel. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>) |
delivery_address | object | The details that Incident Manager uses when trying to engage the contact channel. |
name | string | The name of the contact channel (pattern: <code>^[\p{L}\p{Z}\p{N}_.-]*$</code>) |
type | string | The type of contact channel. The type is SMS, VOICE, or EMAIL. (SMS, VOICE, EMAIL) |
| Name | Datatype | Description |
|---|---|---|
activation_status | string | A Boolean value describing if the contact channel has been activated or not. If the contact channel isn't activated, Incident Manager can't engage the contact through it. (ACTIVATED, NOT_ACTIVATED) |
contact_arn | string | The ARN of the contact that contains the contact channel. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>) |
contact_channel_arn | string | The Amazon Resource Name (ARN) of the contact channel. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>) |
delivery_address | object | The details that Incident Manager uses when trying to engage the contact channel. |
name | string | The name of the contact channel. (pattern: <code>^[\p{L}\p{Z}\p{N}_.-]*$</code>) |
type | string | The type of the contact channel. Incident Manager supports three contact methods: SMS VOICE EMAIL (SMS, VOICE, EMAIL) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_contact_channel | select | region | List details about a specific contact channel. | |
list_contact_channels | select | region | Lists all contact channels for the specified contact. | |
create_contact_channel | insert | region, ContactId, DeliveryAddress | A contact channel is the method that Incident Manager uses to engage your contact. | |
update_contact_channel | update | region, ContactChannelId | Updates a contact's contact channel. | |
delete_contact_channel | delete | region | 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. | |
send_activation_code | exec | region, ContactChannelId | 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. |
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_channel
- list_contact_channels
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
;
Lists all contact channels for the specified contact.
SELECT
activation_status,
contact_arn,
contact_channel_arn,
delivery_address,
name,
type
FROM aws.ssm_contacts.contact_channels
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_contact_channel
- Manifest
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
;
# Description fields are for documentation purposes
- name: contact_channels
props:
- name: region
value: "{{ region }}"
description: Required parameter for the contact_channels resource.
- name: ContactId
value: "{{ ContactId }}"
description: |
The Amazon Resource Name (ARN) of the contact you are adding the contact channel to.
- name: Name
value: "{{ Name }}"
description: |
The name of the contact channel.
- name: Type
value: "{{ Type }}"
description: |
Incident Manager supports three types of contact channels: SMS VOICE EMAIL
valid_values: ['SMS', 'VOICE', 'EMAIL']
- name: DeliveryAddress
description: |
The details that Incident Manager uses when trying to engage the contact channel. The format is dependent on the type of the contact channel. The following are the expected formats: SMS - '+' followed by the country code and phone number VOICE - '+' followed by the country code and phone number EMAIL - any standard email format
value:
SimpleAddress: "{{ SimpleAddress }}"
- name: DeferActivation
value: {{ DeferActivation }}
description: |
If you want to activate the channel at a later time, you can choose to defer activation. Incident Manager can't engage your contact channel until it has been activated.
- name: IdempotencyToken
value: "{{ IdempotencyToken }}"
description: |
A token ensuring that the operation is called only once with the specified details.
UPDATE examples
- update_contact_channel
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
- delete_contact_channel
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
- send_activation_code
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 }}"
}'
;