AgentsforBedrock / Client / create_agent_alias

create_agent_alias#

AgentsforBedrock.Client.create_agent_alias(**kwargs)#

Creates an alias of an agent that can be used to deploy the agent.

See also: AWS API Documentation

Request Syntax

response = client.create_agent_alias(
    agentAliasName='string',
    agentId='string',
    clientToken='string',
    description='string',
    routingConfiguration=[
        {
            'agentVersion': 'string'
        },
    ],
    tags={
        'string': 'string'
    }
)
Parameters:
  • agentAliasName (string) –

    [REQUIRED]

    The name of the alias.

  • agentId (string) –

    [REQUIRED]

    The unique identifier 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.

    This field is autopopulated if not provided.

  • description (string) – A 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) – [REQUIRED]

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

  • tags (dict) –

    Any tags that you want to attach to the alias of the agent.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'agentAlias': {
        'agentAliasArn': 'string',
        'agentAliasHistoryEvents': [
            {
                'endDate': datetime(2015, 1, 1),
                'routingConfiguration': [
                    {
                        'agentVersion': 'string'
                    },
                ],
                'startDate': datetime(2015, 1, 1)
            },
        ],
        'agentAliasId': 'string',
        'agentAliasName': 'string',
        'agentAliasStatus': 'CREATING'|'PREPARED'|'FAILED'|'UPDATING'|'DELETING',
        'agentId': 'string',
        'clientToken': 'string',
        'createdAt': datetime(2015, 1, 1),
        'description': 'string',
        'routingConfiguration': [
            {
                'agentVersion': 'string'
            },
        ],
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • agentAlias (dict) –

      Contains details about the alias that was created.

      • agentAliasArn (string) –

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

      • agentAliasHistoryEvents (list) –

        Contains details about the history of the alias.

        • (dict) –

          Contains details about the history of the alias.

          • endDate (datetime) –

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

          • 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.

          • startDate (datetime) –

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

      • agentAliasId (string) –

        The unique identifier of the alias of the agent.

      • agentAliasName (string) –

        The name of the alias of the agent.

      • 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.

      • agentId (string) –

        The unique identifier 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.

      • createdAt (datetime) –

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

      • 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.

      • updatedAt (datetime) –

        The time at which the alias was last updated.

Exceptions

  • AgentsforBedrock.Client.exceptions.ThrottlingException

  • AgentsforBedrock.Client.exceptions.AccessDeniedException

  • AgentsforBedrock.Client.exceptions.ValidationException

  • AgentsforBedrock.Client.exceptions.InternalServerException

  • AgentsforBedrock.Client.exceptions.ResourceNotFoundException

  • AgentsforBedrock.Client.exceptions.ConflictException

  • AgentsforBedrock.Client.exceptions.ServiceQuotaExceededException