Class: AWSCDK::CodeDeploy::BaseDeploymentConfigProps
- Inherits:
-
BaseDeploymentConfigOptions
- Object
- BaseDeploymentConfigOptions
- AWSCDK::CodeDeploy::BaseDeploymentConfigProps
- Defined in:
- code_deploy/base_deployment_config_props.rb
Overview
Complete base deployment config properties that are required to be supplied by the implementation of the BaseDeploymentConfig class.
Instance Attribute Summary collapse
-
#compute_platform ⇒ AWSCDK::CodeDeploy::ComputePlatform?
readonly
The destination compute platform for the deployment.
-
#deployment_config_name ⇒ String?
readonly
The physical, human-readable name of the Deployment Configuration.
-
#minimum_healthy_hosts ⇒ AWSCDK::CodeDeploy::MinimumHealthyHosts?
readonly
Minimum number of healthy hosts.
-
#traffic_routing ⇒ AWSCDK::CodeDeploy::TrafficRouting?
readonly
The configuration that specifies how traffic is shifted during a deployment.
-
#zonal_config ⇒ AWSCDK::CodeDeploy::ZonalConfig?
readonly
Configure 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(deployment_config_name: nil, compute_platform: nil, minimum_healthy_hosts: nil, traffic_routing: nil, zonal_config: nil) ⇒ BaseDeploymentConfigProps
constructor
A new instance of BaseDeploymentConfigProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(deployment_config_name: nil, compute_platform: nil, minimum_healthy_hosts: nil, traffic_routing: nil, zonal_config: nil) ⇒ BaseDeploymentConfigProps
Returns a new instance of BaseDeploymentConfigProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'code_deploy/base_deployment_config_props.rb', line 12 def initialize(deployment_config_name: nil, compute_platform: nil, minimum_healthy_hosts: nil, traffic_routing: nil, zonal_config: 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? @compute_platform = compute_platform Jsii::Type.check_type(@compute_platform, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5Db21wdXRlUGxhdGZvcm0ifQ==")), "computePlatform") unless @compute_platform.nil? @minimum_healthy_hosts = minimum_healthy_hosts Jsii::Type.check_type(@minimum_healthy_hosts, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5NaW5pbXVtSGVhbHRoeUhvc3RzIn0=")), "minimumHealthyHosts") unless @minimum_healthy_hosts.nil? @traffic_routing = traffic_routing Jsii::Type.check_type(@traffic_routing, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5UcmFmZmljUm91dGluZyJ9")), "trafficRouting") unless @traffic_routing.nil? @zonal_config = zonal_config.is_a?(Hash) ? ::AWSCDK::CodeDeploy::ZonalConfig.new(**zonal_config.transform_keys(&:to_sym)) : zonal_config Jsii::Type.check_type(@zonal_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5ab25hbENvbmZpZyJ9")), "zonalConfig") unless @zonal_config.nil? end |
Instance Attribute Details
#compute_platform ⇒ AWSCDK::CodeDeploy::ComputePlatform? (readonly)
Default: ComputePlatform.Server
The destination compute platform for the deployment.
34 35 36 |
# File 'code_deploy/base_deployment_config_props.rb', line 34 def compute_platform @compute_platform end |
#deployment_config_name ⇒ String? (readonly)
Default: - automatically generated name
The physical, human-readable name of the Deployment Configuration.
29 30 31 |
# File 'code_deploy/base_deployment_config_props.rb', line 29 def deployment_config_name @deployment_config_name end |
#minimum_healthy_hosts ⇒ AWSCDK::CodeDeploy::MinimumHealthyHosts? (readonly)
Default: None
Minimum number of healthy hosts.
39 40 41 |
# File 'code_deploy/base_deployment_config_props.rb', line 39 def minimum_healthy_hosts @minimum_healthy_hosts end |
#traffic_routing ⇒ AWSCDK::CodeDeploy::TrafficRouting? (readonly)
Default: None
The configuration that specifies how traffic is shifted during a deployment.
Only applicable to ECS and Lambda deployments, and must not be specified for Server deployments.
46 47 48 |
# File 'code_deploy/base_deployment_config_props.rb', line 46 def traffic_routing @traffic_routing end |
#zonal_config ⇒ AWSCDK::CodeDeploy::ZonalConfig? (readonly)
Default: - deploy your application to a random selection of hosts across a Region
Configure CodeDeploy to deploy your application to one Availability Zone at a time within an AWS Region.
52 53 54 |
# File 'code_deploy/base_deployment_config_props.rb', line 52 def zonal_config @zonal_config end |
Class Method Details
.jsii_properties ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'code_deploy/base_deployment_config_props.rb', line 54 def self.jsii_properties { :deployment_config_name => "deploymentConfigName", :compute_platform => "computePlatform", :minimum_healthy_hosts => "minimumHealthyHosts", :traffic_routing => "trafficRouting", :zonal_config => "zonalConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'code_deploy/base_deployment_config_props.rb', line 64 def to_jsii result = {} result.merge!(super) result.merge!({ "deploymentConfigName" => @deployment_config_name, "computePlatform" => @compute_platform, "minimumHealthyHosts" => @minimum_healthy_hosts, "trafficRouting" => @traffic_routing, "zonalConfig" => @zonal_config, }) result.compact end |