interface DeploymentProps
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.APIGateway.DeploymentProps | 
|  Java | software.amazon.awscdk.services.apigateway.DeploymentProps | 
|  Python | aws_cdk.aws_apigateway.DeploymentProps | 
|  TypeScript (source) | @aws-cdk/aws-apigateway»DeploymentProps | 
Example
// production stage
const prdLogGroup = new logs.LogGroup(this, "PrdLogs");
const api = new apigateway.RestApi(this, 'books', {
  deployOptions: {
    accessLogDestination: new apigateway.LogGroupLogDestination(prdLogGroup),
    accessLogFormat: apigateway.AccessLogFormat.jsonWithStandardFields()
  }
})
const deployment = new apigateway.Deployment(this, 'Deployment', {api});
// development stage
const devLogGroup = new logs.LogGroup(this, "DevLogs");
new apigateway.Stage(this, 'dev', {
  deployment,
  accessLogDestination: new apigateway.LogGroupLogDestination(devLogGroup),
  accessLogFormat: apigateway.AccessLogFormat.jsonWithStandardFields({
    caller: false,
    httpMethod: true,
    ip: true,
    protocol: true,
    requestTime: true,
    resourcePath: true,
    responseLength: true,
    status: true,
    user: true
  })
});
Properties
| Name | Type | Description | 
|---|---|---|
| api | IRest | The Rest API to deploy. | 
| description? | string | A description of the purpose of the API Gateway deployment. | 
| retain | boolean | When an API Gateway model is updated, a new deployment will automatically be created. | 
api
Type:
IRest
The Rest API to deploy.
description?
Type:
string
(optional, default: No description.)
A description of the purpose of the API Gateway deployment.
retainDeployments?
Type:
boolean
(optional, default: false)
When an API Gateway model is updated, a new deployment will automatically be created.
If this is true, the old API Gateway Deployment resource will not be deleted. This will allow manually reverting back to a previous deployment in case for example
