:doc:`SFN <../../stepfunctions>` / Client / update_state_machine_alias

**************************
update_state_machine_alias
**************************



.. py:method:: SFN.Client.update_state_machine_alias(**kwargs)

  

  Updates the configuration of an existing state machine `alias <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-alias.html>`__ by modifying its ``description`` or ``routingConfiguration``.

   

  You must specify at least one of the ``description`` or ``routingConfiguration`` parameters to update a state machine alias.

   

  .. note::

    

    ``UpdateStateMachineAlias`` is an idempotent API. Step Functions bases the idempotency check on the ``stateMachineAliasArn``, ``description``, and ``routingConfiguration`` parameters. Requests with the same parameters return an idempotent response.

    

   

  .. note::

    

    This operation is eventually consistent. All  StartExecution requests made within a few seconds use the latest alias configuration. Executions started immediately after calling ``UpdateStateMachineAlias`` may use the previous routing configuration.

    

   

  **Related operations:**

   

  
  *  CreateStateMachineAlias
   
  *  DescribeStateMachineAlias
   
  *  ListStateMachineAliases
   
  *  DeleteStateMachineAlias
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/UpdateStateMachineAlias>`_  


  **Request Syntax**
  ::

    response = client.update_state_machine_alias(
        stateMachineAliasArn='string',
        description='string',
        routingConfiguration=[
            {
                'stateMachineVersionArn': 'string',
                'weight': 123
            },
        ]
    )
    
  :type stateMachineAliasArn: string
  :param stateMachineAliasArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the state machine alias.

    

  
  :type description: string
  :param description: 

    A description of the state machine alias.

    

  
  :type routingConfiguration: list
  :param routingConfiguration: 

    The routing configuration of the state machine alias.

     

    An array of ``RoutingConfig`` objects that specifies up to two state machine versions that the alias starts executions for.

    

  
    - *(dict) --* 

      Contains details about the routing configuration of a state machine alias. In a routing configuration, you define an array of objects that specify up to two state machine versions. You also specify the percentage of traffic to be routed to each version.

      

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

        The Amazon Resource Name (ARN) that identifies one or two state machine versions defined in the routing configuration.

         

        If you specify the ARN of a second version, it must belong to the same state machine as the first version.

        

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

        The percentage of traffic you want to route to a state machine version. The sum of the weights in the routing configuration must be equal to 100.

        

      
    

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

    
    ::

      {
          'updateDate': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **updateDate** *(datetime) --* 

        The date and time the state machine alias was updated.

        
  
  **Exceptions**
  
  *   :py:class:`SFN.Client.exceptions.ValidationException`

  
  *   :py:class:`SFN.Client.exceptions.InvalidArn`

  
  *   :py:class:`SFN.Client.exceptions.ResourceNotFound`

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

  
  *   :py:class:`SFN.Client.exceptions.StateMachineDeleting`

  