BedrockAgentCoreControl / Client / list_gateway_targets

list_gateway_targets

BedrockAgentCoreControl.Client.list_gateway_targets(**kwargs)

Lists all targets for a specific gateway.

See also: AWS API Documentation

Request Syntax

response = client.list_gateway_targets(
    gatewayIdentifier='string',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • gatewayIdentifier (string) –

    [REQUIRED]

    The identifier of the gateway to list targets for.

  • maxResults (integer) – The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

  • nextToken (string) – If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'targetId': 'string',
            'name': 'string',
            'status': 'CREATING'|'UPDATING'|'UPDATE_UNSUCCESSFUL'|'DELETING'|'READY'|'FAILED'|'SYNCHRONIZING'|'SYNCHRONIZE_UNSUCCESSFUL'|'CREATE_PENDING_AUTH'|'UPDATE_PENDING_AUTH'|'SYNCHRONIZE_PENDING_AUTH',
            'description': 'string',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'resourcePriority': 123,
            'lastSynchronizedAt': datetime(2015, 1, 1),
            'authorizationData': {
                'oauth2': {
                    'authorizationUrl': 'string',
                    'userId': 'string'
                }
            },
            'targetType': 'OPEN_API_SCHEMA'|'SMITHY_MODEL'|'MCP_SERVER'|'LAMBDA'|'API_GATEWAY'|'CONNECTOR'|'AGENTCORE_RUNTIME'|'PASSTHROUGH'|'PROVIDER',
            'listingMode': 'DEFAULT'|'DYNAMIC'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • items (list) –

      The list of gateway target summaries.

      • (dict) –

        Contains summary information about a gateway target. A target represents an endpoint that the gateway can connect to.

        • targetId (string) –

          The unique identifier of the target.

        • name (string) –

          The name of the target.

        • status (string) –

          The current status of the target.

        • description (string) –

          The description of the target.

        • createdAt (datetime) –

          The timestamp when the target was created.

        • updatedAt (datetime) –

          The timestamp when the target was last updated.

        • resourcePriority (integer) –

          Priority for resolving resource URI conflicts across targets. Lower values take precedence. Defaults to 1000 when not set.

        • lastSynchronizedAt (datetime) –

          The timestamp when the target was last synchronized.

        • authorizationData (dict) –

          Contains the authorization data that is returned when a gateway target is configured with a credential provider with authorization code grant type and requires user federation.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: oauth2. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          
          • oauth2 (dict) –

            OAuth2 authorization data for the gateway target.

            • authorizationUrl (string) –

              The URL to initiate the authorization process. This URL is provided when the OAuth2 access token requires user authorization.

            • userId (string) –

              The user identifier associated with the OAuth2 authorization session that is defined by AgentCore Gateway.

        • targetType (string) –

          The type of the target.

        • listingMode (string) –

          The listing mode for the target. MCP resources for DEFAULT targets are cached at the control plane for faster access. MCP resources for DYNAMIC targets are retrieved dynamically when listing tools.

    • nextToken (string) –

      If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.

Exceptions

  • BedrockAgentCoreControl.Client.exceptions.ValidationException

  • BedrockAgentCoreControl.Client.exceptions.AccessDeniedException

  • BedrockAgentCoreControl.Client.exceptions.ThrottlingException

  • BedrockAgentCoreControl.Client.exceptions.ResourceNotFoundException

  • BedrockAgentCoreControl.Client.exceptions.InternalServerException