SSMContacts.Client.
create_contact_channel
(**kwargs)¶A contact channel is the method that Incident Manager uses to engage your contact.
See also: AWS API Documentation
Request Syntax
response = client.create_contact_channel(
ContactId='string',
Name='string',
Type='SMS'|'VOICE'|'EMAIL',
DeliveryAddress={
'SimpleAddress': 'string'
},
DeferActivation=True|False,
IdempotencyToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the contact you are adding the contact channel to.
[REQUIRED]
The name of the contact channel.
[REQUIRED]
Incident Manager supports three types of contact channels:
SMS
VOICE
EMAIL
[REQUIRED]
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:
The format is dependent on the type of the contact channel. The following are the expected formats:
A token ensuring that the operation is called only once with the specified details.
This field is autopopulated if not provided.
dict
Response Syntax
{
'ContactChannelArn': 'string'
}
Response Structure
(dict) --
ContactChannelArn (string) --
The Amazon Resource Name (ARN) of the contact channel.
Exceptions
SSMContacts.Client.exceptions.AccessDeniedException
SSMContacts.Client.exceptions.ConflictException
SSMContacts.Client.exceptions.DataEncryptionException
SSMContacts.Client.exceptions.InternalServerException
SSMContacts.Client.exceptions.ThrottlingException
SSMContacts.Client.exceptions.ValidationException
Examples
Creates a contact channel of type SMS for the contact Akua Mansa. Contact channels can be created of type SMS, EMAIL, or VOICE.
response = client.create_contact_channel(
ContactId='arn:aws:ssm-contacts:us-east-1:111122223333:contact/akuam',
DeliveryAddress={
'SimpleAddress': '+15005550199',
},
Name='akuas sms-test',
Type='SMS',
)
print(response)
Expected Output:
{
'ContactChannelArn': 'arn:aws:ssm-contacts:us-east-1:111122223333:contact-channel/akuam/02f506b9-ea5d-4764-af89-2daa793ff024',
'ResponseMetadata': {
'...': '...',
},
}