-
Notifications
You must be signed in to change notification settings - Fork 70
feat(gateway): add create commands #1899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5d3c80c
feat(gateway): add create commands
aidandaly24 bfa1b35
refactor(gateway): finalize create command surface
aidandaly24 0520cd0
refactor(gateway): simplify default execution role
aidandaly24 5b97cfd
fix(gateway): verify create flows with service fixtures
aidandaly24 1041d7b
refactor(gateway): simplify target create shortcuts
aidandaly24 b47150f
refactor(gateway): align create handler and core ownership
aidandaly24 a9d6b32
refactor(gateway): reuse connector target classification
aidandaly24 339f329
refactor(gateway): name connector target module explicitly
aidandaly24 3afc741
refactor(gateway): make connector shortcuts exhaustive
aidandaly24 50fb14f
test(gateway): align create coverage with harness
aidandaly24 c26858d
test(gateway): record create fixtures with e2e profile
aidandaly24 a653325
test(gateway): cover connector create flow
aidandaly24 55a5224
fix(gateway): create web search connector shortcut
aidandaly24 14f15dc
test(gateway): mark IAM fixture workaround
aidandaly24 0a861c3
fix(gateway): reject generated role collisions
aidandaly24 e932251
refactor(gateway): require customer-managed role
aidandaly24 e81eb0a
fix(gateway): remove connector and rule client tokens
aidandaly24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/handlers/gateway/__fixtures__/create/CreateGatewayCommand.7f678b79455bc400.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "gatewayId": "agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "createdAt": { | ||
| "$date": "2026-08-06T17:25:41.425Z" | ||
| }, | ||
| "updatedAt": { | ||
| "$date": "2026-08-06T17:25:41.425Z" | ||
| }, | ||
| "status": "CREATING", | ||
| "name": "agentcore-cli-gateway-create-fixture", | ||
| "authorizerType": "NONE", | ||
| "gatewayUrl": "https://agentcore-cli-gateway-create-fixture-bkf6yayfce.gateway.bedrock-agentcore.us-east-1.amazonaws.com", | ||
| "description": "Disposable Gateway Create fixture", | ||
| "roleArn": "arn:aws:iam::685197708687:role/AgentCoreGateway-agentcore-cli-gateway-create-fix-f0aa3f799a4b", | ||
| "workloadIdentityDetails": {} | ||
| } |
19 changes: 19 additions & 0 deletions
19
src/handlers/gateway/__fixtures__/create/CreateGatewayRuleCommand.d87304453bfe9534.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "ruleId": "93d59ee8-8a9b-4535-9f11-df7006241fed", | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "priority": 10, | ||
| "actions": [ | ||
| { | ||
| "routeToTarget": { | ||
| "staticRoute": { | ||
| "targetName": "http-fixture" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "createdAt": { | ||
| "$date": "2026-08-06T17:25:57.672Z" | ||
| }, | ||
| "status": "CREATING", | ||
| "description": "Disposable Gateway Rule Create fixture" | ||
| } |
35 changes: 35 additions & 0 deletions
35
src/handlers/gateway/__fixtures__/create/CreateGatewayTargetCommand.22512d9b9027f76a.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "targetId": "U4ADV7VNSV", | ||
| "createdAt": { | ||
| "$date": "2026-08-06T17:25:52.273Z" | ||
| }, | ||
| "updatedAt": { | ||
| "$date": "2026-08-06T17:25:52.273Z" | ||
| }, | ||
| "status": "CREATING", | ||
| "name": "web-search-fixture", | ||
| "targetConfiguration": { | ||
| "mcp": { | ||
| "connector": { | ||
| "source": { | ||
| "connectorId": "web-search" | ||
| }, | ||
| "configurations": [ | ||
| { | ||
| "name": "WebSearch", | ||
| "parameterValues": { | ||
| "maxResults": 10 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "credentialProviderConfigurations": [ | ||
| { | ||
| "credentialProviderType": "GATEWAY_IAM_ROLE" | ||
| } | ||
| ], | ||
| "description": "Disposable Gateway Connector Create fixture" | ||
| } |
20 changes: 20 additions & 0 deletions
20
src/handlers/gateway/__fixtures__/create/CreateGatewayTargetCommand.93c8d0503a636294.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "targetId": "VZ7M0WBGJF", | ||
| "createdAt": { | ||
| "$date": "2026-08-06T17:25:46.743Z" | ||
| }, | ||
| "updatedAt": { | ||
| "$date": "2026-08-06T17:25:46.743Z" | ||
| }, | ||
| "status": "CREATING", | ||
| "name": "http-fixture", | ||
| "targetConfiguration": { | ||
| "http": { | ||
| "passthrough": { | ||
| "endpoint": "https://example.com", | ||
| "protocolType": "CUSTOM" | ||
| } | ||
| } | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
src/handlers/gateway/__fixtures__/create/GetGatewayCommand.5ff84cafc95022b4.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "gatewayId": "agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "createdAt": { | ||
| "$date": "2026-08-06T17:25:41.425Z" | ||
| }, | ||
| "updatedAt": { | ||
| "$date": "2026-08-06T17:25:42.396Z" | ||
| }, | ||
| "status": "READY", | ||
| "name": "agentcore-cli-gateway-create-fixture", | ||
| "authorizerType": "NONE", | ||
| "gatewayUrl": "https://agentcore-cli-gateway-create-fixture-bkf6yayfce.gateway.bedrock-agentcore.us-east-1.amazonaws.com", | ||
| "description": "Disposable Gateway Create fixture", | ||
| "roleArn": "arn:aws:iam::685197708687:role/AgentCoreGateway-agentcore-cli-gateway-create-fix-f0aa3f799a4b", | ||
| "workloadIdentityDetails": { | ||
| "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:workload-identity-directory/default/workload-identity/agentcore-cli-gateway-create-fixture-bkf6yayfce" | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
src/handlers/gateway/__fixtures__/create/GetGatewayRuleCommand.9a6bd6a64eebb5df.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "ruleId": "93d59ee8-8a9b-4535-9f11-df7006241fed", | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "priority": 10, | ||
| "actions": [ | ||
| { | ||
| "routeToTarget": { | ||
| "staticRoute": { | ||
| "targetName": "http-fixture" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "createdAt": { | ||
| "$date": "2026-08-06T17:25:57.672Z" | ||
| }, | ||
| "status": "ACTIVE", | ||
| "description": "Disposable Gateway Rule Create fixture", | ||
| "updatedAt": { | ||
| "$date": "2026-08-06T17:25:57.672Z" | ||
| } | ||
| } |
35 changes: 35 additions & 0 deletions
35
src/handlers/gateway/__fixtures__/create/GetGatewayTargetCommand.3855b58e8bc470ab.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "targetId": "U4ADV7VNSV", | ||
| "createdAt": { | ||
| "$date": "2026-08-06T17:25:52.273Z" | ||
| }, | ||
| "updatedAt": { | ||
| "$date": "2026-08-06T17:25:53.039Z" | ||
| }, | ||
| "status": "READY", | ||
| "name": "web-search-fixture", | ||
| "targetConfiguration": { | ||
| "mcp": { | ||
| "connector": { | ||
| "source": { | ||
| "connectorId": "web-search" | ||
| }, | ||
| "configurations": [ | ||
| { | ||
| "name": "WebSearch", | ||
| "parameterValues": { | ||
| "maxResults": 10 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "credentialProviderConfigurations": [ | ||
| { | ||
| "credentialProviderType": "GATEWAY_IAM_ROLE" | ||
| } | ||
| ], | ||
| "description": "Disposable Gateway Connector Create fixture" | ||
| } |
20 changes: 20 additions & 0 deletions
20
src/handlers/gateway/__fixtures__/create/GetGatewayTargetCommand.91cea07923c15ff.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "targetId": "VZ7M0WBGJF", | ||
| "createdAt": { | ||
| "$date": "2026-08-06T17:25:46.743Z" | ||
| }, | ||
| "updatedAt": { | ||
| "$date": "2026-08-06T17:25:47.390Z" | ||
| }, | ||
| "status": "READY", | ||
| "name": "http-fixture", | ||
| "targetConfiguration": { | ||
| "http": { | ||
| "passthrough": { | ||
| "endpoint": "https://example.com", | ||
| "protocolType": "CUSTOM" | ||
| } | ||
| } | ||
| } | ||
| } |
31 changes: 31 additions & 0 deletions
31
src/handlers/gateway/__fixtures__/create/connector-create.golden.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "targetId": "U4ADV7VNSV", | ||
| "createdAt": "2026-08-06T17:25:52.273Z", | ||
| "updatedAt": "2026-08-06T17:25:52.273Z", | ||
| "status": "CREATING", | ||
| "name": "web-search-fixture", | ||
| "targetConfiguration": { | ||
| "mcp": { | ||
| "connector": { | ||
| "source": { | ||
| "connectorId": "web-search" | ||
| }, | ||
| "configurations": [ | ||
| { | ||
| "name": "WebSearch", | ||
| "parameterValues": { | ||
| "maxResults": 10 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "credentialProviderConfigurations": [ | ||
| { | ||
| "credentialProviderType": "GATEWAY_IAM_ROLE" | ||
| } | ||
| ], | ||
| "description": "Disposable Gateway Connector Create fixture" | ||
| } |
13 changes: 13 additions & 0 deletions
13
src/handlers/gateway/__fixtures__/create/gateway-create.golden.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "gatewayId": "agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "createdAt": "2026-08-06T17:25:41.425Z", | ||
| "updatedAt": "2026-08-06T17:25:41.425Z", | ||
| "status": "CREATING", | ||
| "name": "agentcore-cli-gateway-create-fixture", | ||
| "authorizerType": "NONE", | ||
| "gatewayUrl": "https://agentcore-cli-gateway-create-fixture-bkf6yayfce.gateway.bedrock-agentcore.us-east-1.amazonaws.com", | ||
| "description": "Disposable Gateway Create fixture", | ||
| "roleArn": "arn:aws:iam::685197708687:role/AgentCoreGateway-agentcore-cli-gateway-create-fix-f0aa3f799a4b", | ||
| "workloadIdentityDetails": {} | ||
| } |
17 changes: 17 additions & 0 deletions
17
src/handlers/gateway/__fixtures__/create/rule-create.golden.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "ruleId": "93d59ee8-8a9b-4535-9f11-df7006241fed", | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "priority": 10, | ||
| "actions": [ | ||
| { | ||
| "routeToTarget": { | ||
| "staticRoute": { | ||
| "targetName": "http-fixture" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "createdAt": "2026-08-06T17:25:57.672Z", | ||
| "status": "CREATING", | ||
| "description": "Disposable Gateway Rule Create fixture" | ||
| } |
16 changes: 16 additions & 0 deletions
16
src/handlers/gateway/__fixtures__/create/target-create.golden.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "gatewayArn": "arn:aws:bedrock-agentcore:us-east-1:685197708687:gateway/agentcore-cli-gateway-create-fixture-bkf6yayfce", | ||
| "targetId": "VZ7M0WBGJF", | ||
| "createdAt": "2026-08-06T17:25:46.743Z", | ||
| "updatedAt": "2026-08-06T17:25:46.743Z", | ||
| "status": "CREATING", | ||
| "name": "http-fixture", | ||
| "targetConfiguration": { | ||
| "http": { | ||
| "passthrough": { | ||
| "endpoint": "https://example.com", | ||
| "protocolType": "CUSTOM" | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.