Skip to main content

Stage

Manages an API Gateway Stage.

Sample code#

provider.APIGateway.makeRestApi({
name: "PetStore",
properties: ({ config }) => ({
apiKeySource: "HEADER",
endpointConfiguration: {
types: ["REGIONAL"],
},
schemaFile: "PetStore.swagger.json",
deployment: {
stageName: "dev",
},
}),
});
provider.APIGateway.makeStage({
name: "dev",
properties: ({ config }) => ({
description: "dev",
methodSettings: {
"*/*": {
metricsEnabled: false,
dataTraceEnabled: false,
throttlingBurstLimit: 5000,
throttlingRateLimit: 10000,
cachingEnabled: false,
cacheTtlInSeconds: 300,
cacheDataEncrypted: false,
requireAuthorizationForCacheControl: true,
unauthorizedCacheControlHeaderStrategy: "SUCCEED_WITH_RESPONSE_HEADER",
},
},
cacheClusterEnabled: false,
cacheClusterSize: "0.5",
tracingEnabled: false,
}),
dependencies: ({ resources }) => ({
restApi: resources.APIGateway.RestApi.petStore,
}),
});

Properties#

Dependencies#

Full Examples#

List#

The Stages can be filtered with the Stage type:

gc l -t Stage