Deployment
Manages an Api Gateway V2 Deployment.
Sample code
exports.createResources = () => [
  {
    type: "Api",
    group: "ApiGatewayV2",
    name: "my-api",
    properties: ({}) => ({
      ProtocolType: "HTTP",
      ApiKeySelectionExpression: "$request.header.x-api-key",
      DisableExecuteApiEndpoint: false,
      RouteSelectionExpression: "$request.method $request.path",
    }),
  },
  {
    type: "Stage",
    group: "ApiGatewayV2",
    name: "my-api-stage-dev",
    properties: ({}) => ({
      AccessLogSettings: {
        Format:
          '$context.identity.sourceIp - - [$context.requestTime] "$context.httpMethod $context.routeKey $context.protocol" $context.status $context.responseLength $context.requestId',
      },
    }),
    dependencies: () => ({
      api: "my-api",
      logGroup: "lg-http-test",
    }),
  },
  {
    type: "Deployment",
    group: "ApiGatewayV2",
    dependencies: () => ({
      api: "my-api",
      stage: "my-api-stage-dev",
    }),
  },
  { type: "LogGroup", group: "CloudWatchLogs", name: "lg-http-test" },
];
Properties
Dependencies
Full Examples
List
The Deployments can be filtered with the Deployment type:
gc l -t ApiGatewayV2::Deployment
Listing resources on 1 provider: aws
✓ aws
  ✓ Initialising
  ✓ Listing 3/3
┌────────────────────────────────────────────────────────────┐
│ 1 ApiGatewayV2::Deployment from aws                        │
├────────────────────────────────────────────────────────────┤
│ name: deployment::my-api                                   │
│ managedByUs: Yes                                           │
│ live:                                                      │
│   AutoDeployed: false                                      │
│   CreatedDate: 2022-03-10T02:57:19.000Z                    │
│   DeploymentId: dni6x2                                     │
│   DeploymentStatus: DEPLOYED                               │
│   ApiId: kfd5t0wyr4                                        │
│   ApiName: my-api                                          │
│                                                            │
└────────────────────────────────────────────────────────────┘
List Summary:
Provider: aws
┌───────────────────────────────────────────────────────────┐
│ aws                                                       │
├──────────────────────────┬────────────────────────────────┤
│ ApiGatewayV2::Deployment │ deployment::my-api             │
└──────────────────────────┴────────────────────────────────┘
1 resource, 1 type, 1 provider
Command "gc l -t ApiGatewayV2::Deployment" executed in 5s, 214 MB