Skip to main content

gateway_targets

Creates, updates, deletes, gets or lists a gateway_targets resource.

Overview

Namegateway_targets
TypeResource
Idaws.bedrock_agentcore_control.gateway_targets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the gateway target. (pattern: <code>([0-9a-zA-Z][-]?){1,100}</code>)
authorization_dataobjectContains 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.
created_atstring (date-time)The timestamp when the gateway target was created.
credential_provider_configurationsarrayThe credential provider configurations for the gateway target.
descriptionstringThe description of the gateway target.
gateway_arnstringThe Amazon Resource Name (ARN) of the gateway. (pattern: <code>arn:aws(|-cn|-us-gov):bedrock-agentcore:[a-z0-9-]{1,20}:[0-9]{12}:gateway/([0-9a-z][-]?){1,48}-[a-z0-9]{10}</code>)
last_synchronized_atstring (date-time)The last synchronization of the target.
metadata_configurationobjectConfiguration for HTTP header and query parameter propagation between the gateway and target servers.
private_endpointobjectThe private endpoint configuration for a gateway target. Defines how the gateway connects to private resources in your VPC.
private_endpoint_managed_resourcesarrayThe managed resources created by the gateway for private endpoint connectivity.
protocol_typestringThe protocol type of the gateway target. (MCP, HTTP)
statusstringThe current status of the gateway target. (CREATING, UPDATING, UPDATE_UNSUCCESSFUL, DELETING, READY, FAILED, SYNCHRONIZING, SYNCHRONIZE_UNSUCCESSFUL, CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, SYNCHRONIZE_PENDING_AUTH)
status_reasonsarrayThe reasons for the current status of the gateway target.
target_configurationobjectThe configuration for a gateway target. This structure defines how the gateway connects to and interacts with the target endpoint.
target_idstringThe unique identifier of the gateway target. (pattern: <code>[0-9a-zA-Z]{10}</code>)
updated_atstring (date-time)The timestamp when the gateway target was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_gateway_targetselectgateway_identifier, target_id, regionRetrieves information about a specific gateway target.
list_gateway_targetsselectgateway_identifier, regionmaxResults, nextTokenLists all targets for a specific gateway.
create_gateway_targetinsertgateway_identifier, region, targetConfigurationCreates a target for a gateway. A target defines an endpoint that the gateway can connect to.
update_gateway_targetupdategateway_identifier, target_id, region, targetConfigurationUpdates an existing gateway target. You cannot update a target that is in a pending authorization state (CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, or SYNCHRONIZE_PENDING_AUTH). Wait for the authorization to complete or fail before updating the target.
delete_gateway_targetdeletegateway_identifier, target_id, regionDeletes a gateway target. You cannot delete a target that is in a pending authorization state (CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, or SYNCHRONIZE_PENDING_AUTH). Wait for the authorization to complete or fail before deleting the target.
synchronize_gateway_targetsexecgateway_identifier, region, targetIdListSynchronizes the gateway targets by fetching the latest tool definitions from the target endpoints. You cannot synchronize a target that is in a pending authorization state (CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, or SYNCHRONIZE_PENDING_AUTH). Wait for the authorization to complete or fail before synchronizing. You cannot synchronize a target that has a static tool schema (mcpToolSchema) configured. Remove the static schema through an UpdateGatewayTarget call to enable dynamic tool synchronization.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
gateway_identifierstringThe gateway Identifier.
regionstringAWS region (default: us-east-1)
target_idstringThe unique identifier of the gateway target to delete.
maxResultsintegerThe 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.
nextTokenstringIf 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.

SELECT examples

Retrieves information about a specific gateway target.

SELECT
name,
authorization_data,
created_at,
credential_provider_configurations,
description,
gateway_arn,
last_synchronized_at,
metadata_configuration,
private_endpoint,
private_endpoint_managed_resources,
protocol_type,
status,
status_reasons,
target_configuration,
target_id,
updated_at
FROM aws.bedrock_agentcore_control.gateway_targets
WHERE gateway_identifier = '{{ gateway_identifier }}' -- required
AND target_id = '{{ target_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a target for a gateway. A target defines an endpoint that the gateway can connect to.

INSERT INTO aws.bedrock_agentcore_control.gateway_targets (
name,
description,
clientToken,
targetConfiguration,
credentialProviderConfigurations,
metadataConfiguration,
privateEndpoint,
gateway_identifier,
region
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ clientToken }}',
'{{ targetConfiguration }}' /* required */,
'{{ credentialProviderConfigurations }}',
'{{ metadataConfiguration }}',
'{{ privateEndpoint }}',
'{{ gateway_identifier }}',
'{{ region }}'
RETURNING
name,
authorization_data,
created_at,
credential_provider_configurations,
description,
gateway_arn,
last_synchronized_at,
metadata_configuration,
private_endpoint,
private_endpoint_managed_resources,
protocol_type,
status,
status_reasons,
target_configuration,
target_id,
updated_at
;

UPDATE examples

Updates an existing gateway target. You cannot update a target that is in a pending authorization state (CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, or SYNCHRONIZE_PENDING_AUTH). Wait for the authorization to complete or fail before updating the target.

UPDATE aws.bedrock_agentcore_control.gateway_targets
SET
name = '{{ name }}',
description = '{{ description }}',
targetConfiguration = '{{ targetConfiguration }}',
credentialProviderConfigurations = '{{ credentialProviderConfigurations }}',
metadataConfiguration = '{{ metadataConfiguration }}',
privateEndpoint = '{{ privateEndpoint }}'
WHERE
gateway_identifier = '{{ gateway_identifier }}' --required
AND target_id = '{{ target_id }}' --required
AND region = '{{ region }}' --required
AND targetConfiguration = '{{ targetConfiguration }}' --required
RETURNING
name,
authorization_data,
created_at,
credential_provider_configurations,
description,
gateway_arn,
last_synchronized_at,
metadata_configuration,
private_endpoint,
private_endpoint_managed_resources,
protocol_type,
status,
status_reasons,
target_configuration,
target_id,
updated_at;

DELETE examples

Deletes a gateway target. You cannot delete a target that is in a pending authorization state (CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, or SYNCHRONIZE_PENDING_AUTH). Wait for the authorization to complete or fail before deleting the target.

DELETE FROM aws.bedrock_agentcore_control.gateway_targets
WHERE gateway_identifier = '{{ gateway_identifier }}' --required
AND target_id = '{{ target_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Synchronizes the gateway targets by fetching the latest tool definitions from the target endpoints. You cannot synchronize a target that is in a pending authorization state (CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, or SYNCHRONIZE_PENDING_AUTH). Wait for the authorization to complete or fail before synchronizing. You cannot synchronize a target that has a static tool schema (mcpToolSchema) configured. Remove the static schema through an UpdateGatewayTarget call to enable dynamic tool synchronization.

EXEC aws.bedrock_agentcore_control.gateway_targets.synchronize_gateway_targets
@gateway_identifier='{{ gateway_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"targetIdList": "{{ targetIdList }}"
}'
;