:doc:`AgentsforBedrock <../../bedrock-agent>` / Client / update_agent_alias

******************
update_agent_alias
******************



.. py:method:: AgentsforBedrock.Client.update_agent_alias(**kwargs)

  

  Updates configurations for an alias of an agent.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/UpdateAgentAlias>`_  


  **Request Syntax**
  ::

    response = client.update_agent_alias(
        agentId='string',
        agentAliasId='string',
        agentAliasName='string',
        description='string',
        routingConfiguration=[
            {
                'agentVersion': 'string',
                'provisionedThroughput': 'string'
            },
        ],
        aliasInvocationState='ACCEPT_INVOCATIONS'|'REJECT_INVOCATIONS'
    )
    
  :type agentId: string
  :param agentId: **[REQUIRED]** 

    The unique identifier of the agent.

    

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

    The unique identifier of the alias.

    

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

    Specifies a new name for the alias.

    

  
  :type description: string
  :param description: 

    Specifies a new description for the alias.

    

  
  :type routingConfiguration: list
  :param routingConfiguration: 

    Contains details about the routing configuration of the alias.

    

  
    - *(dict) --* 

      Contains details about the routing configuration of the alias.

      

    
      - **agentVersion** *(string) --* 

        The version of the agent with which the alias is associated.

        

      
      - **provisionedThroughput** *(string) --* 

        Information on the Provisioned Throughput assigned to an agent alias.

        

      
    

  :type aliasInvocationState: string
  :param aliasInvocationState: 

    The invocation state for the agent alias. To pause the agent alias, set the value to ``REJECT_INVOCATIONS``. To start the agent alias running again, set the value to ``ACCEPT_INVOCATIONS``. Use the ``GetAgentAlias``, or ``ListAgentAliases``, operation to get the invocation state of an agent alias.

    

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

    
    ::

      {
          'agentAlias': {
              'agentId': 'string',
              'agentAliasId': 'string',
              'agentAliasName': 'string',
              'agentAliasArn': 'string',
              'clientToken': 'string',
              'description': 'string',
              'routingConfiguration': [
                  {
                      'agentVersion': 'string',
                      'provisionedThroughput': 'string'
                  },
              ],
              'createdAt': datetime(2015, 1, 1),
              'updatedAt': datetime(2015, 1, 1),
              'agentAliasHistoryEvents': [
                  {
                      'routingConfiguration': [
                          {
                              'agentVersion': 'string',
                              'provisionedThroughput': 'string'
                          },
                      ],
                      'endDate': datetime(2015, 1, 1),
                      'startDate': datetime(2015, 1, 1)
                  },
              ],
              'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING'|'DISSOCIATED',
              'failureReasons': [
                  'string',
              ],
              'aliasInvocationState': 'ACCEPT_INVOCATIONS'|'REJECT_INVOCATIONS'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **agentAlias** *(dict) --* 

        Contains details about the alias that was updated.

        
        

        - **agentId** *(string) --* 

          The unique identifier of the agent.

          
        

        - **agentAliasId** *(string) --* 

          The unique identifier of the alias of the agent.

          
        

        - **agentAliasName** *(string) --* 

          The name of the alias of the agent.

          
        

        - **agentAliasArn** *(string) --* 

          The Amazon Resource Name (ARN) of the alias of the agent.

          
        

        - **clientToken** *(string) --* 

          A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see `Ensuring idempotency <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`__.

          
        

        - **description** *(string) --* 

          The description of the alias of the agent.

          
        

        - **routingConfiguration** *(list) --* 

          Contains details about the routing configuration of the alias.

          
          

          - *(dict) --* 

            Contains details about the routing configuration of the alias.

            
            

            - **agentVersion** *(string) --* 

              The version of the agent with which the alias is associated.

              
            

            - **provisionedThroughput** *(string) --* 

              Information on the Provisioned Throughput assigned to an agent alias.

              
        
      
        

        - **createdAt** *(datetime) --* 

          The time at which the alias of the agent was created.

          
        

        - **updatedAt** *(datetime) --* 

          The time at which the alias was last updated.

          
        

        - **agentAliasHistoryEvents** *(list) --* 

          Contains details about the history of the alias.

          
          

          - *(dict) --* 

            Contains details about the history of the alias.

            
            

            - **routingConfiguration** *(list) --* 

              Contains details about the version of the agent with which the alias is associated.

              
              

              - *(dict) --* 

                Contains details about the routing configuration of the alias.

                
                

                - **agentVersion** *(string) --* 

                  The version of the agent with which the alias is associated.

                  
                

                - **provisionedThroughput** *(string) --* 

                  Information on the Provisioned Throughput assigned to an agent alias.

                  
            
          
            

            - **endDate** *(datetime) --* 

              The date that the alias stopped being associated to the version in the ``routingConfiguration`` object

              
            

            - **startDate** *(datetime) --* 

              The date that the alias began being associated to the version in the ``routingConfiguration`` object.

              
        
      
        

        - **agentAliasStatus** *(string) --* 

          The status of the alias of the agent and whether it is ready for use. The following statuses are possible:

           

          
          * CREATING – The agent alias is being created.
           
          * PREPARED – The agent alias is finished being created or updated and is ready to be invoked.
           
          * FAILED – The agent alias API operation failed.
           
          * UPDATING – The agent alias is being updated.
           
          * DELETING – The agent alias is being deleted.
           
          * DISSOCIATED - The agent alias has no version associated with it.
          

          
        

        - **failureReasons** *(list) --* 

          Information on the failure of Provisioned Throughput assigned to an agent alias.

          
          

          - *(string) --* 
      
        

        - **aliasInvocationState** *(string) --* 

          The invocation state for the agent alias. If the agent alias is running, the value is ``ACCEPT_INVOCATIONS``. If the agent alias is paused, the value is ``REJECT_INVOCATIONS``. Use the ``UpdateAgentAlias`` operation to change the invocation state.

          
    
  
  **Exceptions**
  
  *   :py:class:`AgentsforBedrock.Client.exceptions.ThrottlingException`

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

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

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

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

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

  
  *   :py:class:`AgentsforBedrock.Client.exceptions.ServiceQuotaExceededException`

  