gateway_targets
Creates, updates, deletes, gets or lists a gateway_targets resource.
Overview
| Name | gateway_targets |
| Type | Resource |
| Id | aws.bedrock_agentcore_control.gateway_targets |
Fields
The following fields are returned by SELECT queries:
- get_gateway_target
- list_gateway_targets
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the gateway target. (pattern: <code>([0-9a-zA-Z][-]?){1,100}</code>) |
authorization_data | object | 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. |
created_at | string (date-time) | The timestamp when the gateway target was created. |
credential_provider_configurations | array | The credential provider configurations for the gateway target. |
description | string | The description of the gateway target. |
gateway_arn | string | The 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_at | string (date-time) | The last synchronization of the target. |
metadata_configuration | object | Configuration for HTTP header and query parameter propagation between the gateway and target servers. |
private_endpoint | object | The private endpoint configuration for a gateway target. Defines how the gateway connects to private resources in your VPC. |
private_endpoint_managed_resources | array | The managed resources created by the gateway for private endpoint connectivity. |
protocol_type | string | The protocol type of the gateway target. (MCP, HTTP) |
status | string | The 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_reasons | array | The reasons for the current status of the gateway target. |
target_configuration | object | The configuration for a gateway target. This structure defines how the gateway connects to and interacts with the target endpoint. |
target_id | string | The unique identifier of the gateway target. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
updated_at | string (date-time) | The timestamp when the gateway target was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the target. (pattern: <code>([0-9a-zA-Z][-]?){1,100}</code>) |
authorization_data | object | 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. |
created_at | string (date-time) | The timestamp when the target was created. |
description | string | The description of the target. |
last_synchronized_at | string (date-time) | The timestamp when the target was last synchronized. |
listing_mode | 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. (DEFAULT, DYNAMIC) |
resource_priority | integer | Priority for resolving resource URI conflicts across targets. Lower values take precedence. Defaults to 1000 when not set. |
status | string | The current status of the target. (CREATING, UPDATING, UPDATE_UNSUCCESSFUL, DELETING, READY, FAILED, SYNCHRONIZING, SYNCHRONIZE_UNSUCCESSFUL, CREATE_PENDING_AUTH, UPDATE_PENDING_AUTH, SYNCHRONIZE_PENDING_AUTH) |
target_id | string | The unique identifier of the target. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
target_type | string | The type of the target. (OPEN_API_SCHEMA, SMITHY_MODEL, MCP_SERVER, LAMBDA, API_GATEWAY, CONNECTOR, AGENTCORE_RUNTIME, PASSTHROUGH, PROVIDER, HTTP_CONNECTOR) |
updated_at | string (date-time) | The timestamp when the target was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_gateway_target | select | gateway_identifier, target_id, region | Retrieves information about a specific gateway target. | |
list_gateway_targets | select | gateway_identifier, region | maxResults, nextToken | Lists all targets for a specific gateway. |
create_gateway_target | insert | gateway_identifier, region, targetConfiguration | Creates a target for a gateway. A target defines an endpoint that the gateway can connect to. | |
update_gateway_target | update | gateway_identifier, target_id, region, targetConfiguration | 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. | |
delete_gateway_target | delete | gateway_identifier, target_id, region | 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. | |
synchronize_gateway_targets | exec | gateway_identifier, region, targetIdList | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
gateway_identifier | string | The gateway Identifier. |
region | string | AWS region (default: us-east-1) |
target_id | string | The unique identifier of the gateway target to delete. |
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. |
SELECT examples
- get_gateway_target
- list_gateway_targets
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
;
Lists all targets for a specific gateway.
SELECT
name,
authorization_data,
created_at,
description,
last_synchronized_at,
listing_mode,
resource_priority,
status,
target_id,
target_type,
updated_at
FROM aws.bedrock_agentcore_control.gateway_targets
WHERE gateway_identifier = '{{ gateway_identifier }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_gateway_target
- Manifest
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
;
# Description fields are for documentation purposes
- name: gateway_targets
props:
- name: gateway_identifier
value: "{{ gateway_identifier }}"
description: Required parameter for the gateway_targets resource.
- name: region
value: "{{ region }}"
description: Required parameter for the gateway_targets resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: clientToken
value: "{{ clientToken }}"
- name: targetConfiguration
description: |
The configuration for a gateway target. This structure defines how the gateway connects to and interacts with the target endpoint.
value:
mcp:
openApiSchema:
s3:
uri: "{{ uri }}"
bucketOwnerAccountId: "{{ bucketOwnerAccountId }}"
inlinePayload: "{{ inlinePayload }}"
smithyModel:
s3:
uri: "{{ uri }}"
bucketOwnerAccountId: "{{ bucketOwnerAccountId }}"
inlinePayload: "{{ inlinePayload }}"
lambda:
lambdaArn: "{{ lambdaArn }}"
toolSchema:
s3:
uri: "{{ uri }}"
bucketOwnerAccountId: "{{ bucketOwnerAccountId }}"
inlinePayload:
- name: "{{ name }}"
description: "{{ description }}"
inputSchema:
type_: "{{ type_ }}"
properties_: "{{ properties_ }}"
required_: "{{ required_ }}"
items_: "{{ items_ }}"
description: "{{ description }}"
outputSchema:
type_: "{{ type_ }}"
properties_: "{{ properties_ }}"
required_: "{{ required_ }}"
items_: "{{ items_ }}"
description: "{{ description }}"
mcpServer:
endpoint: "{{ endpoint }}"
mcpToolSchema:
s3:
uri: "{{ uri }}"
bucketOwnerAccountId: "{{ bucketOwnerAccountId }}"
inlinePayload: "{{ inlinePayload }}"
listingMode: "{{ listingMode }}"
resourcePriority: {{ resourcePriority }}
apiGateway:
restApiId: "{{ restApiId }}"
stage: "{{ stage }}"
apiGatewayToolConfiguration:
toolOverrides:
- name: "{{ name }}"
description: "{{ description }}"
path: "{{ path }}"
method: "{{ method }}"
toolFilters:
- filterPath: "{{ filterPath }}"
methods: "{{ methods }}"
connector:
source:
connectorId: "{{ connectorId }}"
version: "{{ version }}"
enabled:
- "{{ enabled }}"
configurations:
- name: "{{ name }}"
description: "{{ description }}"
parameterValues: "{{ parameterValues }}"
parameterOverrides: "{{ parameterOverrides }}"
http:
agentcoreRuntime:
arn: "{{ arn }}"
qualifier: "{{ qualifier }}"
schema:
source:
s3: "{{ s3 }}"
inlinePayload: "{{ inlinePayload }}"
passthrough:
endpoint: "{{ endpoint }}"
protocolType: "{{ protocolType }}"
schema:
source:
s3: "{{ s3 }}"
inlinePayload: "{{ inlinePayload }}"
stickinessConfiguration:
identifier: "{{ identifier }}"
timeout: {{ timeout }}
connector:
source:
connectorId: "{{ connectorId }}"
parameters: "{{ parameters }}"
inference:
connector:
source:
connectorId: "{{ connectorId }}"
provider:
endpoint: "{{ endpoint }}"
modelMapping:
providerPrefix:
strip: {{ strip }}
separator: "{{ separator }}"
operations:
- path: "{{ path }}"
providerPath: "{{ providerPath }}"
models: "{{ models }}"
- name: credentialProviderConfigurations
value:
- credentialProviderType: "{{ credentialProviderType }}"
credentialProvider:
oauthCredentialProvider:
providerArn: "{{ providerArn }}"
scopes:
- "{{ scopes }}"
customParameters: "{{ customParameters }}"
grantType: "{{ grantType }}"
defaultReturnUrl: "{{ defaultReturnUrl }}"
apiKeyCredentialProvider:
providerArn: "{{ providerArn }}"
credentialParameterName: "{{ credentialParameterName }}"
credentialPrefix: "{{ credentialPrefix }}"
credentialLocation: "{{ credentialLocation }}"
iamCredentialProvider:
service: "{{ service }}"
region: "{{ region }}"
- name: metadataConfiguration
description: |
Configuration for HTTP header and query parameter propagation between the gateway and target servers.
value:
allowedRequestHeaders:
- "{{ allowedRequestHeaders }}"
allowedQueryParameters:
- "{{ allowedQueryParameters }}"
allowedResponseHeaders:
- "{{ allowedResponseHeaders }}"
- name: privateEndpoint
description: |
The private endpoint configuration for a gateway target. Defines how the gateway connects to private resources in your VPC.
value:
selfManagedLatticeResource:
resourceConfigurationIdentifier: "{{ resourceConfigurationIdentifier }}"
managedVpcResource:
vpcIdentifier: "{{ vpcIdentifier }}"
subnetIds:
- "{{ subnetIds }}"
endpointIpAddressType: "{{ endpointIpAddressType }}"
securityGroupIds:
- "{{ securityGroupIds }}"
tags: "{{ tags }}"
routingDomain: "{{ routingDomain }}"
UPDATE examples
- update_gateway_target
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
- delete_gateway_target
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
- synchronize_gateway_targets
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 }}"
}'
;