SSMContacts / Client / create_contact_channel

create_contact_channel#

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'
)
Parameters:
  • ContactId (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the contact you are adding the contact channel to.

  • Name (string) –

    [REQUIRED]

    The name of the contact channel.

  • Type (string) –

    [REQUIRED]

    Incident Manager supports three types of contact channels:

    • SMS

    • VOICE

    • EMAIL

  • DeliveryAddress (dict) –

    [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:

    • SMS - ‘+’ followed by the country code and phone number

    • VOICE - ‘+’ followed by the country code and phone number

    • EMAIL - any standard email format

    • SimpleAddress (string) –

      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

  • DeferActivation (boolean) – 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.

  • IdempotencyToken (string) –

    A token ensuring that the operation is called only once with the specified details.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'ContactChannelArn': 'string'
}

Response Structure

  • (dict) –

    • ContactChannelArn (string) –

      The Amazon Resource Name (ARN) of the contact channel.

Exceptions

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': {
        '...': '...',
    },
}