BedrockAgentCore / Client / get_workload_access_token_for_user_id

get_workload_access_token_for_user_id

BedrockAgentCore.Client.get_workload_access_token_for_user_id(**kwargs)

Obtains a workload access token for agentic workloads acting on behalf of a user, using the user’s ID.

See also: AWS API Documentation

Request Syntax

response = client.get_workload_access_token_for_user_id(
    workloadName='string',
    userId='string'
)
Parameters:
  • workloadName (string) –

    [REQUIRED]

    The name of the workload from which you want to retrieve the access token.

  • userId (string) –

    [REQUIRED]

    The ID of the user for whom you are retrieving the access token.

Return type:

dict

Returns:

Response Syntax

{
    'workloadAccessToken': 'string'
}

Response Structure

  • (dict) –

    • workloadAccessToken (string) –

      The access token for the specified workload.

Exceptions

  • BedrockAgentCore.Client.exceptions.UnauthorizedException

  • BedrockAgentCore.Client.exceptions.ValidationException

  • BedrockAgentCore.Client.exceptions.AccessDeniedException

  • BedrockAgentCore.Client.exceptions.ResourceNotFoundException

  • BedrockAgentCore.Client.exceptions.ThrottlingException

  • BedrockAgentCore.Client.exceptions.InternalServerException