:doc:`SSMContacts <../../ssm-contacts>` / Client / create_contact_channel

**********************
create_contact_channel
**********************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/ssm-contacts-2021-05-03/CreateContactChannel>`_  


  **Request Syntax**
  ::

    response = client.create_contact_channel(
        ContactId='string',
        Name='string',
        Type='SMS'|'VOICE'|'EMAIL',
        DeliveryAddress={
            'SimpleAddress': 'string'
        },
        DeferActivation=True|False,
        IdempotencyToken='string'
    )
    
  :type ContactId: string
  :param ContactId: **[REQUIRED]** 

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

    

  
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the contact channel.

    

  
  :type Type: string
  :param Type: **[REQUIRED]** 

    Incident Manager supports three types of contact channels:

     

    
    * ``SMS``
     
    * ``VOICE``
     
    * ``EMAIL``
    

    

  
  :type DeliveryAddress: dict
  :param DeliveryAddress: **[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
      

      

    
  
  :type DeferActivation: boolean
  :param DeferActivation: 

    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.

    

  
  :type IdempotencyToken: string
  :param IdempotencyToken: 

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

    This field is autopopulated if not provided.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ContactChannelArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ContactChannelArn** *(string) --* 

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

        
  
  **Exceptions**
  
  *   :py:class:`SSMContacts.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`SSMContacts.Client.exceptions.ConflictException`

  
  *   :py:class:`SSMContacts.Client.exceptions.DataEncryptionException`

  
  *   :py:class:`SSMContacts.Client.exceptions.InternalServerException`

  
  *   :py:class:`SSMContacts.Client.exceptions.ThrottlingException`

  
  *   :py:class:`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': {
            '...': '...',
        },
    }

  