Interface IDeploymentProps
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDeploymentProps
Syntax (vb)
Public Interface IDeploymentProps
Remarks
ExampleMetadata: infused
Examples
// production stage
var prodLogGroup = new LogGroup(this, "PrdLogs");
var api = new RestApi(this, "books", new RestApiProps {
DeployOptions = new StageOptions {
AccessLogDestination = new LogGroupLogDestination(prodLogGroup),
AccessLogFormat = AccessLogFormat.JsonWithStandardFields()
}
});
var deployment = new Deployment(this, "Deployment", new DeploymentProps { Api = api });
// development stage
var devLogGroup = new LogGroup(this, "DevLogs");
new Stage(this, "dev", new StageProps {
Deployment = deployment,
AccessLogDestination = new LogGroupLogDestination(devLogGroup),
AccessLogFormat = AccessLogFormat.JsonWithStandardFields(new JsonWithStandardFieldProps {
Caller = false,
HttpMethod = true,
Ip = true,
Protocol = true,
RequestTime = true,
ResourcePath = true,
ResponseLength = true,
Status = true,
User = true
})
});
Synopsis
Properties
Api | The Rest API to deploy. |
Description | A description of the purpose of the API Gateway deployment. |
RetainDeployments | When an API Gateway model is updated, a new deployment will automatically be created. |
StageName | The name of the stage the API Gateway deployment deploys to. |
Properties
Api
Description
A description of the purpose of the API Gateway deployment.
virtual string Description { get; }
Property Value
System.String
Remarks
Default: - No description.
RetainDeployments
When an API Gateway model is updated, a new deployment will automatically be created.
virtual Nullable<bool> RetainDeployments { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
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
Default: false
StageName
The name of the stage the API Gateway deployment deploys to.
virtual string StageName { get; }
Property Value
System.String
Remarks
Default: - No stage name. If the stageName
property is set but a stage with the
corresponding name does not exist, a new stage resource will be created with the
provided stage name.