Skip to main content

Stage

Manages an API Gateway Stage.

Sample code

exports.createResources = () => [
{
type: "Stage",
group: "APIGateway",
properties: ({}) => ({
stageName: "dev",
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: () => ({
restApi: "PetStore",
}),
},
{
type: "Stage",
group: "APIGateway",
properties: ({}) => ({
stageName: "prod",
description: "prod",
cacheClusterEnabled: false,
tracingEnabled: false,
}),
dependencies: () => ({
restApi: "PetStore",
}),
},
];

Properties

Dependencies

Used By

Full Examples

List

The Stages can be filtered with the APIGateway::Stage type:

gc l -t APIGateway::Stage
Listing resources on 1 provider: aws
✓ aws us-east-1
✓ Initialising
✓ Listing 2/2
┌──────────────────────────────────────────────────────────────────────────────────────────────┐
│ 2 APIGateway::Stage from aws │
├──────────────────────────────────────────────────────────────────────────────────────────────┤
│ name: PetStore::dev │
│ managedByUs: Yes │
│ live: │
│ cacheClusterEnabled: false │
│ cacheClusterSize: 0.5 │
│ cacheClusterStatus: NOT_AVAILABLE │
│ createdDate: 2022-08-05T11:22:12.000Z │
│ deploymentId: 7bvcv4 │
│ description: dev │
│ lastUpdatedDate: 2022-08-05T11:22:13.000Z │
│ methodSettings: │
│ */*: │
│ cacheDataEncrypted: false │
│ cacheTtlInSeconds: 300 │
│ cachingEnabled: false │
│ dataTraceEnabled: false │
│ metricsEnabled: false │
│ requireAuthorizationForCacheControl: true │
│ throttlingBurstLimit: 5000 │
│ throttlingRateLimit: 10000 │
│ unauthorizedCacheControlHeaderStrategy: SUCCEED_WITH_RESPONSE_HEADER │
│ stageName: dev │
│ tags: │
│ gc-created-by-provider: aws │
│ gc-managed-by: grucloud │
│ gc-project-name: @grucloud/example-aws-api-gateway-restapi-lambda │
│ gc-stage: dev │
│ mykey: myvalue3 │
│ tracingEnabled: false │
│ restApiId: q5yambpydj │
│ restApiName: PetStore │
│ │
├──────────────────────────────────────────────────────────────────────────────────────────────┤
│ name: PetStore::prod │
│ managedByUs: Yes │
│ live: │
│ cacheClusterEnabled: false │
│ cacheClusterStatus: NOT_AVAILABLE │
│ createdDate: 2022-08-05T11:22:12.000Z │
│ deploymentId: 7bvcv4 │
│ description: prod │
│ lastUpdatedDate: 2022-08-05T11:22:13.000Z │
│ methodSettings: │
│ stageName: prod │
│ tags: │
│ gc-created-by-provider: aws │
│ gc-managed-by: grucloud │
│ gc-project-name: @grucloud/example-aws-api-gateway-restapi-lambda │
│ gc-stage: dev │
│ tracingEnabled: false │
│ restApiId: q5yambpydj │
│ restApiName: PetStore │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────┘


List Summary:
Provider: aws
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
│ aws │
├───────────────────┬─────────────────────────────────────────────────────────────────────────┤
│ APIGateway::Stage │ PetStore::dev │
│ │ PetStore::prod │
└───────────────────┴─────────────────────────────────────────────────────────────────────────┘
2 resources, 1 type, 1 provider
Command "gc l -t APIGateway::Stage" executed in 8s, 100 MB