AgentSkillsCN

awsflow-apigateway

使用 awsflow VS Code 扩展中的 APIGatewayTool,对 AWS API Gateway 的 REST API、资源、方法、阶段、授权方、使用计划以及域名进行检查与测试。

SKILL.md
--- frontmatter
name: awsflow-apigateway
description: Inspect and test AWS API Gateway REST APIs, resources, methods, stages, authorizers, usage plans, and domain names using the awsflow VS Code extension APIGatewayTool.

awsflow-apigateway

Use the APIGatewayTool language tool in VS Code to inspect and test AWS API Gateway REST APIs — resources, methods, integrations, stages, authorizers, usage plans, and more.

When to Use

  • User wants to list or inspect REST APIs
  • User wants to view API resources, methods, and integrations
  • User wants to inspect stages, deployments, or stage variables
  • User wants to view or test authorizers
  • User wants to test invoke a method without deploying
  • User wants to inspect usage plans, API keys, or quotas
  • User wants to view custom domain names, base path mappings, or VPC links
  • User wants to view models, request validators, or documentation
  • User wants to export an API or get SDK artifacts

Tool Reference

Tool name: APIGatewayTool

Input Schema

json
{
  "command": "<CommandName>",
  "params": { ... }
}

Commands (46 total)

CommandDescription
GetAccountGet API Gateway account settings
GetApiKeyGet a specific API key
GetApiKeysList API keys
GetAuthorizerGet a specific authorizer
GetAuthorizersList authorizers for an API
GetBasePathMappingGet a base path mapping
GetBasePathMappingsList base path mappings for a domain
GetClientCertificateGet a specific client certificate
GetClientCertificatesList client certificates
GetDeploymentGet a specific deployment
GetDeploymentsList deployments for an API
GetDocumentationPartGet a documentation part
GetDocumentationPartsList documentation parts
GetDocumentationVersionGet a documentation version
GetDocumentationVersionsList documentation versions
GetDomainNameGet a custom domain name
GetDomainNamesList custom domain names
GetExportExport an API as a Swagger/OAS file
GetGatewayResponseGet a gateway response
GetGatewayResponsesList gateway responses
GetIntegrationGet integration for a method
GetIntegrationResponseGet integration response
GetMethodGet a specific method
GetMethodResponseGet a method response
GetModelGet a specific model
GetModelsList models for an API
GetRequestValidatorGet a request validator
GetRequestValidatorsList request validators
GetResourceGet a specific resource
GetResourcesList resources for an API
GetRestApiGet a specific REST API
GetRestApisList all REST APIs
GetSdkGet SDK for an API stage
GetSdkTypeGet an SDK type
GetSdkTypesList available SDK types
GetStageGet a specific stage
GetStagesList stages for an API
GetTagsGet tags for a resource
GetUsageGet usage data for a plan
GetUsagePlanGet a specific usage plan
GetUsagePlanKeyGet a specific usage plan key
GetUsagePlanKeysList keys for a usage plan
GetUsagePlansList usage plans
GetVpcLinkGet a specific VPC link
GetVpcLinksList VPC links
TestInvokeAuthorizerTest invoke an authorizer
TestInvokeMethodTest invoke a method

Parameters

ParameterTypeDescription
restApiIdstringREST API identifier (Required by: most Get commands that operate on a specific API)
resourceIdstringResource ID (Required by: GetIntegration, GetIntegrationResponse, GetMethod, GetMethodResponse, GetResource, TestInvokeMethod)
httpMethodstringHTTP method — GET, POST, PUT, DELETE, etc. (Required by: GetIntegration, GetIntegrationResponse, GetMethod, GetMethodResponse, TestInvokeMethod)
stageNamestringStage name (Required by: GetStage)
authorizerIdstringAuthorizer ID (Required by: GetAuthorizer, TestInvokeAuthorizer)
usagePlanIdstringUsage plan ID (Required by: GetUsagePlan, GetUsagePlanKey, GetUsagePlanKeys)
keyIdstringUsage plan key ID (Required by: GetUsagePlanKey)
domainNamestringCustom domain name (Required by: GetDomainName, GetBasePathMapping, GetBasePathMappings)
statusCodestringStatus code for GetMethodResponse (Required by: GetMethodResponse)
limitnumberMaximum results for list operations (Used by: all list/get-multiple commands)
positionstringPagination position token (Used by: all list/get-multiple commands)
namestringName filter (Used by: GetApiKeys, GetRestApis)
headersobjectRequest headers for test invocation (Used by: TestInvokeMethod, TestInvokeAuthorizer)
multiValueHeadersobjectMulti-value headers for test invocation (Used by: TestInvokeMethod, TestInvokeAuthorizer)
pathWithQueryStringstringPath with query string for test invocation (Used by: TestInvokeMethod, TestInvokeAuthorizer)
bodystringRequest body for test invocation (Used by: TestInvokeMethod, TestInvokeAuthorizer)
stageVariablesobjectStage variables for test invocation (Used by: TestInvokeMethod, TestInvokeAuthorizer)
additionalContextobjectAdditional context for authorizer test (Used by: TestInvokeAuthorizer)
includeCredentialsbooleanInclude credentials in export (Used by: GetExport)

Usage Examples

List all REST APIs

json
{ "command": "GetRestApis", "params": { "limit": 25 } }

Get details of a specific API

json
{ "command": "GetRestApi", "params": { "restApiId": "abc123def" } }

List resources for an API

json
{ "command": "GetResources", "params": { "restApiId": "abc123def", "limit": 100 } }

Get a specific method

json
{ "command": "GetMethod", "params": { "restApiId": "abc123def", "resourceId": "xyz789", "httpMethod": "GET" } }

Get integration details

json
{ "command": "GetIntegration", "params": { "restApiId": "abc123def", "resourceId": "xyz789", "httpMethod": "POST" } }

List stages

json
{ "command": "GetStages", "params": { "restApiId": "abc123def" } }

Get a specific stage

json
{ "command": "GetStage", "params": { "restApiId": "abc123def", "stageName": "prod" } }

List deployments

json
{ "command": "GetDeployments", "params": { "restApiId": "abc123def", "limit": 10 } }

Test invoke a method

json
{ "command": "TestInvokeMethod", "params": { "restApiId": "abc123def", "resourceId": "xyz789", "httpMethod": "GET", "pathWithQueryString": "/items?category=books" } }

Test invoke a method with body

json
{ "command": "TestInvokeMethod", "params": { "restApiId": "abc123def", "resourceId": "xyz789", "httpMethod": "POST", "pathWithQueryString": "/items", "body": "{\"name\": \"test\", \"price\": 9.99}", "headers": { "Content-Type": "application/json" } } }

Test invoke an authorizer

json
{ "command": "TestInvokeAuthorizer", "params": { "restApiId": "abc123def", "authorizerId": "auth001", "headers": { "Authorization": "Bearer eyJ..." } } }

List authorizers

json
{ "command": "GetAuthorizers", "params": { "restApiId": "abc123def" } }

List usage plans

json
{ "command": "GetUsagePlans", "params": { "limit": 10 } }

List API keys

json
{ "command": "GetApiKeys", "params": { "limit": 20 } }

Get custom domain names

json
{ "command": "GetDomainNames", "params": { "limit": 10 } }

Get VPC links

json
{ "command": "GetVpcLinks", "params": { "limit": 10 } }

Related Services

API Gateway integrates with many AWS services:

RelationshipTool
Lambda integrations (proxy/custom)LambdaTool
Execution logs in CloudWatchCloudWatchLogTool
IAM authorizers & execution rolesIAMTool
Deployed via CloudFormationCloudFormationTool
Orchestrated by Step FunctionsStepFuncTool
Backend on EC2 / VPC link targetsEC2Tool
DynamoDB direct integrationsDynamoDBTool
SNS direct integrationsSNSTool
SQS direct integrationsSQSTool

CloudWatch Log Group Naming

API Gateway execution logs use these log group patterns:

code
API-Gateway-Execution-Logs_<restApiId>/<stageName>

Access logs are configured per-stage and can go to a custom log group.

Use CloudWatchLogToolDescribeLogGroups with logGroupNamePrefix: "API-Gateway-Execution-Logs_" to find them.

Tips

  • Start with GetRestApis to discover APIs, then GetResources to see the resource tree.
  • Use GetMethodGetIntegration to see how a method is wired to a backend.
  • TestInvokeMethod lets you test an API method without needing a deployment or stage — great for debugging.
  • TestInvokeAuthorizer validates authorizer behavior without making a real API call.
  • GetStages shows deployment history and stage variables for each stage.
  • Use GetUsagePlans + GetUsagePlanKeys to audit API key throttling and quotas.