Skip to content

Commit 800275c

Browse files
author
awstools
committed
feat(client-bedrock-agentcore-control): Feature to support header exchanges between Bedrock AgentCore Gateway Targets and client, along with propagating query parameter to the configured targets.
1 parent a94e6d5 commit 800275c

File tree

11 files changed

+309
-39
lines changed

11 files changed

+309
-39
lines changed

clients/client-bedrock-agentcore-control/src/commands/CreateGatewayTargetCommand.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ export interface CreateGatewayTargetCommandOutput extends CreateGatewayTargetRes
149149
* },
150150
* },
151151
* ],
152+
* metadataConfiguration: { // MetadataConfiguration
153+
* allowedRequestHeaders: [ // AllowedRequestHeaders
154+
* "STRING_VALUE",
155+
* ],
156+
* allowedQueryParameters: [ // AllowedQueryParameters
157+
* "STRING_VALUE",
158+
* ],
159+
* allowedResponseHeaders: [ // AllowedResponseHeaders
160+
* "STRING_VALUE",
161+
* ],
162+
* },
152163
* };
153164
* const command = new CreateGatewayTargetCommand(input);
154165
* const response = await client.send(command);
@@ -268,6 +279,17 @@ export interface CreateGatewayTargetCommandOutput extends CreateGatewayTargetRes
268279
* // },
269280
* // ],
270281
* // lastSynchronizedAt: new Date("TIMESTAMP"),
282+
* // metadataConfiguration: { // MetadataConfiguration
283+
* // allowedRequestHeaders: [ // AllowedRequestHeaders
284+
* // "STRING_VALUE",
285+
* // ],
286+
* // allowedQueryParameters: [ // AllowedQueryParameters
287+
* // "STRING_VALUE",
288+
* // ],
289+
* // allowedResponseHeaders: [ // AllowedResponseHeaders
290+
* // "STRING_VALUE",
291+
* // ],
292+
* // },
271293
* // };
272294
*
273295
* ```

clients/client-bedrock-agentcore-control/src/commands/GetGatewayTargetCommand.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ export interface GetGatewayTargetCommandOutput extends GetGatewayTargetResponse,
163163
* // },
164164
* // ],
165165
* // lastSynchronizedAt: new Date("TIMESTAMP"),
166+
* // metadataConfiguration: { // MetadataConfiguration
167+
* // allowedRequestHeaders: [ // AllowedRequestHeaders
168+
* // "STRING_VALUE",
169+
* // ],
170+
* // allowedQueryParameters: [ // AllowedQueryParameters
171+
* // "STRING_VALUE",
172+
* // ],
173+
* // allowedResponseHeaders: [ // AllowedResponseHeaders
174+
* // "STRING_VALUE",
175+
* // ],
176+
* // },
166177
* // };
167178
*
168179
* ```

clients/client-bedrock-agentcore-control/src/commands/ListPoliciesCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import type {
99
ServiceOutputTypes,
1010
} from "../BedrockAgentCoreControlClient";
1111
import { commonParams } from "../endpoint/EndpointParameters";
12-
import type { ListPoliciesRequest } from "../models/models_0";
13-
import type { ListPoliciesResponse } from "../models/models_1";
12+
import type { ListPoliciesRequest, ListPoliciesResponse } from "../models/models_1";
1413
import { ListPolicies$ } from "../schemas/schemas_0";
1514

1615
/**

clients/client-bedrock-agentcore-control/src/commands/SynchronizeGatewayTargetsCommand.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,17 @@ export interface SynchronizeGatewayTargetsCommandOutput extends SynchronizeGatew
167167
* // },
168168
* // ],
169169
* // lastSynchronizedAt: new Date("TIMESTAMP"),
170+
* // metadataConfiguration: { // MetadataConfiguration
171+
* // allowedRequestHeaders: [ // AllowedRequestHeaders
172+
* // "STRING_VALUE",
173+
* // ],
174+
* // allowedQueryParameters: [ // AllowedQueryParameters
175+
* // "STRING_VALUE",
176+
* // ],
177+
* // allowedResponseHeaders: [ // AllowedResponseHeaders
178+
* // "STRING_VALUE",
179+
* // ],
180+
* // },
170181
* // },
171182
* // ],
172183
* // };

clients/client-bedrock-agentcore-control/src/commands/UpdateGatewayTargetCommand.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ export interface UpdateGatewayTargetCommandOutput extends UpdateGatewayTargetRes
149149
* },
150150
* },
151151
* ],
152+
* metadataConfiguration: { // MetadataConfiguration
153+
* allowedRequestHeaders: [ // AllowedRequestHeaders
154+
* "STRING_VALUE",
155+
* ],
156+
* allowedQueryParameters: [ // AllowedQueryParameters
157+
* "STRING_VALUE",
158+
* ],
159+
* allowedResponseHeaders: [ // AllowedResponseHeaders
160+
* "STRING_VALUE",
161+
* ],
162+
* },
152163
* };
153164
* const command = new UpdateGatewayTargetCommand(input);
154165
* const response = await client.send(command);
@@ -268,6 +279,17 @@ export interface UpdateGatewayTargetCommandOutput extends UpdateGatewayTargetRes
268279
* // },
269280
* // ],
270281
* // lastSynchronizedAt: new Date("TIMESTAMP"),
282+
* // metadataConfiguration: { // MetadataConfiguration
283+
* // allowedRequestHeaders: [ // AllowedRequestHeaders
284+
* // "STRING_VALUE",
285+
* // ],
286+
* // allowedQueryParameters: [ // AllowedQueryParameters
287+
* // "STRING_VALUE",
288+
* // ],
289+
* // allowedResponseHeaders: [ // AllowedResponseHeaders
290+
* // "STRING_VALUE",
291+
* // ],
292+
* // },
271293
* // };
272294
*
273295
* ```

clients/client-bedrock-agentcore-control/src/models/models_0.ts

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3871,6 +3871,30 @@ export interface CredentialProviderConfiguration {
38713871
credentialProvider?: CredentialProvider | undefined;
38723872
}
38733873

3874+
/**
3875+
* <p>Configuration for HTTP header and query parameter propagation between the gateway and target servers.</p>
3876+
* @public
3877+
*/
3878+
export interface MetadataConfiguration {
3879+
/**
3880+
* <p>A list of HTTP headers that are allowed to be propagated from incoming client requests to the target.</p>
3881+
* @public
3882+
*/
3883+
allowedRequestHeaders?: string[] | undefined;
3884+
3885+
/**
3886+
* <p>A list of URL query parameters that are allowed to be propagated from incoming gateway URL to the target.</p>
3887+
* @public
3888+
*/
3889+
allowedQueryParameters?: string[] | undefined;
3890+
3891+
/**
3892+
* <p>A list of HTTP headers that are allowed to be propagated from the target response back to the client.</p>
3893+
* @public
3894+
*/
3895+
allowedResponseHeaders?: string[] | undefined;
3896+
}
3897+
38743898
/**
38753899
* <p>Specifies which operations from an API Gateway REST API are exposed as tools. Tool names and descriptions are derived from the operationId and description fields in the API's exported OpenAPI specification.</p>
38763900
* @public
@@ -9506,32 +9530,3 @@ export interface GetPolicyResponse {
95069530
*/
95079531
statusReasons: string[] | undefined;
95089532
}
9509-
9510-
/**
9511-
* @public
9512-
*/
9513-
export interface ListPoliciesRequest {
9514-
/**
9515-
* <p>A pagination token returned from a previous <a href="https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_ListPolicies.html">ListPolicies</a> call. Use this token to retrieve the next page of results when the response is paginated.</p>
9516-
* @public
9517-
*/
9518-
nextToken?: string | undefined;
9519-
9520-
/**
9521-
* <p>The maximum number of policies to return in a single response. If not specified, the default is 10 policies per page, with a maximum of 100 per page.</p>
9522-
* @public
9523-
*/
9524-
maxResults?: number | undefined;
9525-
9526-
/**
9527-
* <p>The identifier of the policy engine whose policies to retrieve.</p>
9528-
* @public
9529-
*/
9530-
policyEngineId: string | undefined;
9531-
9532-
/**
9533-
* <p>Optional filter to list policies that apply to a specific resource scope or resource type. This helps narrow down policy results to those relevant for particular Amazon Web Services resources, agent tools, or operational contexts within the policy engine ecosystem.</p>
9534-
* @public
9535-
*/
9536-
targetResourceScope?: string | undefined;
9537-
}

clients/client-bedrock-agentcore-control/src/models/models_1.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { PolicyStatus, PolicyValidationMode, SchemaType, TargetStatus } from "./
33

44
import {
55
type KmsConfiguration,
6+
type MetadataConfiguration,
67
type PolicyDefinition,
78
ApiGatewayTargetConfiguration,
89
ApiSchemaConfiguration,
@@ -11,6 +12,35 @@ import {
1112
S3Configuration,
1213
} from "./models_0";
1314

15+
/**
16+
* @public
17+
*/
18+
export interface ListPoliciesRequest {
19+
/**
20+
* <p>A pagination token returned from a previous <a href="https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_ListPolicies.html">ListPolicies</a> call. Use this token to retrieve the next page of results when the response is paginated.</p>
21+
* @public
22+
*/
23+
nextToken?: string | undefined;
24+
25+
/**
26+
* <p>The maximum number of policies to return in a single response. If not specified, the default is 10 policies per page, with a maximum of 100 per page.</p>
27+
* @public
28+
*/
29+
maxResults?: number | undefined;
30+
31+
/**
32+
* <p>The identifier of the policy engine whose policies to retrieve.</p>
33+
* @public
34+
*/
35+
policyEngineId: string | undefined;
36+
37+
/**
38+
* <p>Optional filter to list policies that apply to a specific resource scope or resource type. This helps narrow down policy results to those relevant for particular Amazon Web Services resources, agent tools, or operational contexts within the policy engine ecosystem.</p>
39+
* @public
40+
*/
41+
targetResourceScope?: string | undefined;
42+
}
43+
1444
/**
1545
* <p>Represents a complete policy resource within the AgentCore Policy system. Policies are ARN-able resources that contain Cedar policy statements and associated metadata for controlling agent behavior and access decisions. Each policy belongs to a policy engine and defines fine-grained authorization rules that are evaluated in real-time as agents interact with tools through Gateway. Policies use the Cedar policy language to specify who (principals based on OAuth claims like username, role, or scope) can perform what actions (tool calls) on which resources (Gateways), with optional conditions for attribute-based access control. Multiple policies can apply to a single request, with Cedar's forbid-wins semantics ensuring that security restrictions are never accidentally overridden.</p>
1646
* @public
@@ -835,6 +865,12 @@ export interface CreateGatewayTargetRequest {
835865
* @public
836866
*/
837867
credentialProviderConfigurations?: CredentialProviderConfiguration[] | undefined;
868+
869+
/**
870+
* <p>Optional configuration for HTTP header and query parameter propagation to and from the gateway target.</p>
871+
* @public
872+
*/
873+
metadataConfiguration?: MetadataConfiguration | undefined;
838874
}
839875

840876
/**
@@ -906,6 +942,12 @@ export interface CreateGatewayTargetResponse {
906942
* @public
907943
*/
908944
lastSynchronizedAt?: Date | undefined;
945+
946+
/**
947+
* <p>The metadata configuration that was applied to the created gateway target.</p>
948+
* @public
949+
*/
950+
metadataConfiguration?: MetadataConfiguration | undefined;
909951
}
910952

911953
/**
@@ -978,6 +1020,12 @@ export interface GatewayTarget {
9781020
* @public
9791021
*/
9801022
lastSynchronizedAt?: Date | undefined;
1023+
1024+
/**
1025+
* <p>The metadata configuration for HTTP header and query parameter propagation to and from this gateway target.</p>
1026+
* @public
1027+
*/
1028+
metadataConfiguration?: MetadataConfiguration | undefined;
9811029
}
9821030

9831031
/**
@@ -1049,6 +1097,12 @@ export interface GetGatewayTargetResponse {
10491097
* @public
10501098
*/
10511099
lastSynchronizedAt?: Date | undefined;
1100+
1101+
/**
1102+
* <p>The metadata configuration for HTTP header and query parameter propagation for the retrieved gateway target.</p>
1103+
* @public
1104+
*/
1105+
metadataConfiguration?: MetadataConfiguration | undefined;
10521106
}
10531107

10541108
/**
@@ -1090,6 +1144,12 @@ export interface UpdateGatewayTargetRequest {
10901144
* @public
10911145
*/
10921146
credentialProviderConfigurations?: CredentialProviderConfiguration[] | undefined;
1147+
1148+
/**
1149+
* <p>Configuration for HTTP header and query parameter propagation to the gateway target.</p>
1150+
* @public
1151+
*/
1152+
metadataConfiguration?: MetadataConfiguration | undefined;
10931153
}
10941154

10951155
/**
@@ -1161,6 +1221,12 @@ export interface UpdateGatewayTargetResponse {
11611221
* @public
11621222
*/
11631223
lastSynchronizedAt?: Date | undefined;
1224+
1225+
/**
1226+
* <p>The metadata configuration that was applied to the gateway target.</p>
1227+
* @public
1228+
*/
1229+
metadataConfiguration?: MetadataConfiguration | undefined;
11641230
}
11651231

11661232
/**

0 commit comments

Comments
 (0)