:doc:`PinpointSMSVoiceV2 <../../pinpoint-sms-voice-v2>` / Client / associate_origination_identity

******************************
associate_origination_identity
******************************



.. py:method:: PinpointSMSVoiceV2.Client.associate_origination_identity(**kwargs)

  

  Associates the specified origination identity with a pool.

   

  If the origination identity is a phone number and is already associated with another pool, an error is returned. A sender ID can be associated with multiple pools.

   

  If the origination identity configuration doesn't match the pool's configuration, an error is returned.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-v2-2022-03-31/AssociateOriginationIdentity>`_  


  **Request Syntax**
  ::

    response = client.associate_origination_identity(
        PoolId='string',
        OriginationIdentity='string',
        IsoCountryCode='string',
        ClientToken='string'
    )
    
  :type PoolId: string
  :param PoolId: **[REQUIRED]** 

    The pool to update with the new Identity. This value can be either the PoolId or PoolArn, and you can find these values using `DescribePools <https://docs.aws.amazon.com/pinpoint/latest/apireference_smsvoicev2/API_DescribePools.html>`__.

     

    .. warning::

       

      If you are using a shared End User Messaging SMS; resource then you must use the full Amazon Resource Name(ARN).

      

    

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

    The origination identity to use, such as PhoneNumberId, PhoneNumberArn, SenderId, or SenderIdArn. You can use  DescribePhoneNumbers to find the values for PhoneNumberId and PhoneNumberArn, while  DescribeSenderIds can be used to get the values for SenderId and SenderIdArn.

     

    .. warning::

       

      If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).

      

    

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

    The new two-character code, in ISO 3166-1 alpha-2 format, for the country or region of the origination identity.

    

  
  :type ClientToken: string
  :param ClientToken: 

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'PoolArn': 'string',
          'PoolId': 'string',
          'OriginationIdentityArn': 'string',
          'OriginationIdentity': 'string',
          'IsoCountryCode': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **PoolArn** *(string) --* 

        The Amazon Resource Name (ARN) of the pool that is now associated with the origination identity.

        
      

      - **PoolId** *(string) --* 

        The PoolId of the pool that is now associated with the origination identity.

        
      

      - **OriginationIdentityArn** *(string) --* 

        The PhoneNumberArn or SenderIdArn of the origination identity.

        
      

      - **OriginationIdentity** *(string) --* 

        The PhoneNumberId or SenderId of the origination identity.

        
      

      - **IsoCountryCode** *(string) --* 

        The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.

        
  
  **Exceptions**
  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ServiceQuotaExceededException`

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

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ValidationException`

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

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

  