Class: AWSCDK::CodeDeploy::CfnDeploymentConfigProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeDeploy::CfnDeploymentConfigProps
- Defined in:
- code_deploy/cfn_deployment_config_props.rb
Overview
Properties for defining a CfnDeploymentConfig.
Instance Attribute Summary collapse
-
#compute_platform ⇒ String?
readonly
The destination platform type for the deployment (
Lambda,Server, orECS). -
#deployment_config_name ⇒ String?
readonly
A name for the deployment configuration.
-
#minimum_healthy_hosts ⇒ AWSCDK::IResolvable, ...
readonly
The minimum number of healthy instances that should be available at any time during the deployment.
-
#traffic_routing_config ⇒ AWSCDK::IResolvable, ...
readonly
The configuration that specifies how the deployment traffic is routed.
-
#zonal_config ⇒ AWSCDK::IResolvable, ...
readonly
Configure the
ZonalConfigobject if you want AWS CodeDeploy to deploy your application to one Availability Zone at a time, within an AWS Region.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(compute_platform: nil, deployment_config_name: nil, minimum_healthy_hosts: nil, traffic_routing_config: nil, zonal_config: nil) ⇒ CfnDeploymentConfigProps
constructor
A new instance of CfnDeploymentConfigProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(compute_platform: nil, deployment_config_name: nil, minimum_healthy_hosts: nil, traffic_routing_config: nil, zonal_config: nil) ⇒ CfnDeploymentConfigProps
Returns a new instance of CfnDeploymentConfigProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'code_deploy/cfn_deployment_config_props.rb', line 14 def initialize(compute_platform: nil, deployment_config_name: nil, minimum_healthy_hosts: nil, traffic_routing_config: nil, zonal_config: nil) @compute_platform = compute_platform Jsii::Type.check_type(@compute_platform, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "computePlatform") unless @compute_platform.nil? @deployment_config_name = deployment_config_name Jsii::Type.check_type(@deployment_config_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deploymentConfigName") unless @deployment_config_name.nil? @minimum_healthy_hosts = minimum_healthy_hosts.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentConfig::MinimumHealthyHostsProperty.new(**minimum_healthy_hosts.transform_keys(&:to_sym)) : minimum_healthy_hosts Jsii::Type.check_type(@minimum_healthy_hosts, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRDb25maWcuTWluaW11bUhlYWx0aHlIb3N0c1Byb3BlcnR5In1dfX0=")), "minimumHealthyHosts") unless @minimum_healthy_hosts.nil? @traffic_routing_config = traffic_routing_config.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentConfig::TrafficRoutingConfigProperty.new(**traffic_routing_config.transform_keys(&:to_sym)) : traffic_routing_config Jsii::Type.check_type(@traffic_routing_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRDb25maWcuVHJhZmZpY1JvdXRpbmdDb25maWdQcm9wZXJ0eSJ9XX19")), "trafficRoutingConfig") unless @traffic_routing_config.nil? @zonal_config = zonal_config.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentConfig::ZonalConfigProperty.new(**zonal_config.transform_keys(&:to_sym)) : zonal_config Jsii::Type.check_type(@zonal_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRDb25maWcuWm9uYWxDb25maWdQcm9wZXJ0eSJ9XX19")), "zonalConfig") unless @zonal_config.nil? end |
Instance Attribute Details
#compute_platform ⇒ String? (readonly)
The destination platform type for the deployment ( Lambda , Server , or ECS ).
31 32 33 |
# File 'code_deploy/cfn_deployment_config_props.rb', line 31 def compute_platform @compute_platform end |
#deployment_config_name ⇒ String? (readonly)
A name for the deployment configuration.
If you don't specify a name, 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.
40 41 42 |
# File 'code_deploy/cfn_deployment_config_props.rb', line 40 def deployment_config_name @deployment_config_name end |
#minimum_healthy_hosts ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum number of healthy instances that should be available at any time during the deployment.
There are two parameters expected in the input: type and value.
The type parameter takes either of the following values:
- HOST_COUNT: The value parameter represents the minimum number of healthy instances as an absolute value.
- FLEET_PERCENT: The value parameter represents the minimum number of healthy instances as a percentage of the total number of instances in the deployment. If you specify FLEET_PERCENT, at the start of the deployment, AWS CodeDeploy converts the percentage to the equivalent number of instance and rounds up fractional instances.
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.
58 59 60 |
# File 'code_deploy/cfn_deployment_config_props.rb', line 58 def minimum_healthy_hosts @minimum_healthy_hosts end |
#traffic_routing_config ⇒ AWSCDK::IResolvable, ... (readonly)
The configuration that specifies how the deployment traffic is routed.
63 64 65 |
# File 'code_deploy/cfn_deployment_config_props.rb', line 63 def traffic_routing_config @traffic_routing_config end |
#zonal_config ⇒ AWSCDK::IResolvable, ... (readonly)
Configure the ZonalConfig object if you want AWS CodeDeploy to deploy your application to one Availability Zone at a time, within an AWS Region.
For more information about the zonal configuration feature, see zonal configuration in the CodeDeploy User Guide .
70 71 72 |
# File 'code_deploy/cfn_deployment_config_props.rb', line 70 def zonal_config @zonal_config end |
Class Method Details
.jsii_properties ⇒ Object
72 73 74 75 76 77 78 79 80 |
# File 'code_deploy/cfn_deployment_config_props.rb', line 72 def self.jsii_properties { :compute_platform => "computePlatform", :deployment_config_name => "deploymentConfigName", :minimum_healthy_hosts => "minimumHealthyHosts", :traffic_routing_config => "trafficRoutingConfig", :zonal_config => "zonalConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 |
# File 'code_deploy/cfn_deployment_config_props.rb', line 82 def to_jsii result = {} result.merge!({ "computePlatform" => @compute_platform, "deploymentConfigName" => @deployment_config_name, "minimumHealthyHosts" => @minimum_healthy_hosts, "trafficRoutingConfig" => @traffic_routing_config, "zonalConfig" => @zonal_config, }) result.compact end |