@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-07-01T09:58:41.357Z") public class CfnDeploymentConfig extends CfnResource implements IInspectable
The AWS::CodeDeploy::DeploymentConfig
resource creates a set of deployment rules, deployment success conditions, and deployment failure conditions that AWS CodeDeploy uses during a deployment. The deployment configuration specifies, through the use of a MinimumHealthyHosts
value, the number or percentage of instances that must remain available at any time during a deployment.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.codedeploy.*; CfnDeploymentConfig cfnDeploymentConfig = CfnDeploymentConfig.Builder.create(this, "MyCfnDeploymentConfig") .computePlatform("computePlatform") .deploymentConfigName("deploymentConfigName") .minimumHealthyHosts(MinimumHealthyHostsProperty.builder() .type("type") .value(123) .build()) .trafficRoutingConfig(TrafficRoutingConfigProperty.builder() .type("type") // the properties below are optional .timeBasedCanary(TimeBasedCanaryProperty.builder() .canaryInterval(123) .canaryPercentage(123) .build()) .timeBasedLinear(TimeBasedLinearProperty.builder() .linearInterval(123) .linearPercentage(123) .build()) .build()) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnDeploymentConfig.Builder
A fluent builder for
CfnDeploymentConfig . |
static interface |
CfnDeploymentConfig.MinimumHealthyHostsProperty
`MinimumHealthyHosts` is a property of the [DeploymentConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentconfig.html) resource that defines how many instances must remain healthy during an AWS CodeDeploy deployment.
|
static interface |
CfnDeploymentConfig.TimeBasedCanaryProperty
A configuration that shifts traffic from one version of a Lambda function or Amazon ECS task set to another in two increments.
|
static interface |
CfnDeploymentConfig.TimeBasedLinearProperty
A configuration that shifts traffic from one version of a Lambda function or ECS task set to another in equal increments, with an equal number of minutes between each increment.
|
static interface |
CfnDeploymentConfig.TrafficRoutingConfigProperty
The configuration that specifies how traffic is shifted from one version of a Lambda function to another version during an AWS Lambda deployment, or from one Amazon ECS task set to another during an Amazon ECS deployment.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDeploymentConfig(Construct scope,
java.lang.String id)
Create a new `AWS::CodeDeploy::DeploymentConfig`.
|
|
CfnDeploymentConfig(Construct scope,
java.lang.String id,
CfnDeploymentConfigProps props)
Create a new `AWS::CodeDeploy::DeploymentConfig`.
|
protected |
CfnDeploymentConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDeploymentConfig(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getComputePlatform()
The destination platform type for the deployment ( `Lambda` , `Server` , or `ECS` ).
|
java.lang.String |
getDeploymentConfigName()
A name for the deployment configuration.
|
java.lang.Object |
getMinimumHealthyHosts()
The minimum number of healthy instances that should be available at any time during the deployment.
|
java.lang.Object |
getTrafficRoutingConfig()
The configuration that specifies how the deployment traffic is routed.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setComputePlatform(java.lang.String value)
The destination platform type for the deployment ( `Lambda` , `Server` , or `ECS` ).
|
void |
setDeploymentConfigName(java.lang.String value)
A name for the deployment configuration.
|
void |
setMinimumHealthyHosts(CfnDeploymentConfig.MinimumHealthyHostsProperty value)
The minimum number of healthy instances that should be available at any time during the deployment.
|
void |
setMinimumHealthyHosts(IResolvable value)
The minimum number of healthy instances that should be available at any time during the deployment.
|
void |
setTrafficRoutingConfig(CfnDeploymentConfig.TrafficRoutingConfigProperty value)
The configuration that specifies how the deployment traffic is routed.
|
void |
setTrafficRoutingConfig(IResolvable value)
The configuration that specifies how the deployment traffic is routed.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDeploymentConfig(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDeploymentConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDeploymentConfig(Construct scope, java.lang.String id, CfnDeploymentConfigProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties.public CfnDeploymentConfig(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getComputePlatform()
public void setComputePlatform(java.lang.String value)
public java.lang.String getDeploymentConfigName()
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the deployment configuration name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
public void setDeploymentConfigName(java.lang.String value)
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the deployment configuration name. For more information, see Name Type .
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
public java.lang.Object getMinimumHealthyHosts()
There are two parameters expected in the input: type and value.
The type parameter takes either of the following values:
The value parameter takes an integer.
For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 95.
For more information about instance health, see CodeDeploy Instance Health in the AWS CodeDeploy User Guide.
public void setMinimumHealthyHosts(CfnDeploymentConfig.MinimumHealthyHostsProperty value)
There are two parameters expected in the input: type and value.
The type parameter takes either of the following values:
The value parameter takes an integer.
For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 95.
For more information about instance health, see CodeDeploy Instance Health in the AWS CodeDeploy User Guide.
public void setMinimumHealthyHosts(IResolvable value)
There are two parameters expected in the input: type and value.
The type parameter takes either of the following values:
The value parameter takes an integer.
For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 95.
For more information about instance health, see CodeDeploy Instance Health in the AWS CodeDeploy User Guide.
public java.lang.Object getTrafficRoutingConfig()
public void setTrafficRoutingConfig(IResolvable value)
public void setTrafficRoutingConfig(CfnDeploymentConfig.TrafficRoutingConfigProperty value)