:doc:`Connect <../../connect>` / Client / update_traffic_distribution

***************************
update_traffic_distribution
***************************



.. py:method:: Connect.Client.update_traffic_distribution(**kwargs)

  

  Updates the traffic distribution for a given traffic distribution group.

   

  .. warning::

     

    When you shift telephony traffic, also shift agents and/or agent sign-ins to ensure they can handle the calls in the other Region. If you don't shift the agents, voice calls will go to the shifted Region but there won't be any agents available to receive the calls.

     

   

  .. note::

    

    The ``SignInConfig`` distribution is available only on a default ``TrafficDistributionGroup`` (see the ``IsDefault`` parameter in the `TrafficDistributionGroup <https://docs.aws.amazon.com/connect/latest/APIReference/API_TrafficDistributionGroup.html>`__ data type). If you call ``UpdateTrafficDistribution`` with a modified ``SignInConfig`` and a non-default ``TrafficDistributionGroup``, an ``InvalidRequestException`` is returned.

    

   

  For more information about updating a traffic distribution group, see `Update telephony traffic distribution across Amazon Web Services Regions <https://docs.aws.amazon.com/connect/latest/adminguide/update-telephony-traffic-distribution.html>`__ in the *Amazon Connect Administrator Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/UpdateTrafficDistribution>`_  


  **Request Syntax**
  ::

    response = client.update_traffic_distribution(
        Id='string',
        TelephonyConfig={
            'Distributions': [
                {
                    'Region': 'string',
                    'Percentage': 123
                },
            ]
        },
        SignInConfig={
            'Distributions': [
                {
                    'Region': 'string',
                    'Enabled': True|False
                },
            ]
        },
        AgentConfig={
            'Distributions': [
                {
                    'Region': 'string',
                    'Percentage': 123
                },
            ]
        }
    )
    
  :type Id: string
  :param Id: **[REQUIRED]** 

    The identifier of the traffic distribution group. This can be the ID or the ARN if the API is being called in the Region where the traffic distribution group was created. The ARN must be provided if the call is from the replicated Region.

    

  
  :type TelephonyConfig: dict
  :param TelephonyConfig: 

    The distribution of traffic between the instance and its replica(s).

    

  
    - **Distributions** *(list) --* **[REQUIRED]** 

      Information about traffic distributions.

      

    
      - *(dict) --* 

        Information about a traffic distribution.

        

      
        - **Region** *(string) --* **[REQUIRED]** 

          The Amazon Web Services Region where the traffic is distributed.

          

        
        - **Percentage** *(integer) --* **[REQUIRED]** 

          The percentage of the traffic that is distributed, in increments of 10.

          

        
      
  
  
  :type SignInConfig: dict
  :param SignInConfig: 

    The distribution that determines which Amazon Web Services Regions should be used to sign in agents in to both the instance and its replica(s).

    

  
    - **Distributions** *(list) --* **[REQUIRED]** 

      Information about traffic distributions.

      

    
      - *(dict) --* 

        The distribution of sign in traffic between the instance and its replica(s).

        

      
        - **Region** *(string) --* **[REQUIRED]** 

          The Amazon Web Services Region of the sign in distribution.

          

        
        - **Enabled** *(boolean) --* **[REQUIRED]** 

          Whether sign in distribution is enabled.

          

        
      
  
  
  :type AgentConfig: dict
  :param AgentConfig: 

    The distribution of agents between the instance and its replica(s).

    

  
    - **Distributions** *(list) --* **[REQUIRED]** 

      Information about traffic distributions.

      

    
      - *(dict) --* 

        Information about a traffic distribution.

        

      
        - **Region** *(string) --* **[REQUIRED]** 

          The Amazon Web Services Region where the traffic is distributed.

          

        
        - **Percentage** *(integer) --* **[REQUIRED]** 

          The percentage of the traffic that is distributed, in increments of 10.

          

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

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

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

  
  *   :py:class:`Connect.Client.exceptions.ResourceConflictException`

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

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  