Class: AWSCDK::CodeDeploy::ServerDeploymentConfigProps

Inherits:
BaseDeploymentConfigOptions
  • Object
show all
Defined in:
code_deploy/server_deployment_config_props.rb

Overview

Construction properties of ServerDeploymentConfig.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(deployment_config_name: nil, minimum_healthy_hosts:, zonal_config: nil) ⇒ ServerDeploymentConfigProps

Returns a new instance of ServerDeploymentConfigProps.

Parameters:

  • deployment_config_name (String, nil) (defaults to: nil)

    The physical, human-readable name of the Deployment Configuration.

  • minimum_healthy_hosts (AWSCDK::CodeDeploy::MinimumHealthyHosts)

    Minimum number of healthy hosts.

  • zonal_config (AWSCDK::CodeDeploy::ZonalConfig, nil) (defaults to: nil)

    Configure CodeDeploy to deploy your application to one Availability Zone at a time within an AWS Region.



10
11
12
13
14
15
16
17
# File 'code_deploy/server_deployment_config_props.rb', line 10

def initialize(deployment_config_name: nil, minimum_healthy_hosts:, 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?
  @minimum_healthy_hosts = minimum_healthy_hosts
  Jsii::Type.check_type(@minimum_healthy_hosts, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5NaW5pbXVtSGVhbHRoeUhvc3RzIn0=")), "minimumHealthyHosts")
  @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

#deployment_config_nameString? (readonly)

Note:

Default: - automatically generated name

The physical, human-readable name of the Deployment Configuration.

Returns:

  • (String, nil)


23
24
25
# File 'code_deploy/server_deployment_config_props.rb', line 23

def deployment_config_name
  @deployment_config_name
end

#minimum_healthy_hostsAWSCDK::CodeDeploy::MinimumHealthyHosts (readonly)

Minimum number of healthy hosts.



27
28
29
# File 'code_deploy/server_deployment_config_props.rb', line 27

def minimum_healthy_hosts
  @minimum_healthy_hosts
end

#zonal_configAWSCDK::CodeDeploy::ZonalConfig? (readonly)

Note:

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.



32
33
34
# File 'code_deploy/server_deployment_config_props.rb', line 32

def zonal_config
  @zonal_config
end

Class Method Details

.jsii_propertiesObject



34
35
36
37
38
39
40
# File 'code_deploy/server_deployment_config_props.rb', line 34

def self.jsii_properties
  {
    :deployment_config_name => "deploymentConfigName",
    :minimum_healthy_hosts => "minimumHealthyHosts",
    :zonal_config => "zonalConfig",
  }
end

Instance Method Details

#to_jsiiObject



42
43
44
45
46
47
48
49
50
51
# File 'code_deploy/server_deployment_config_props.rb', line 42

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "deploymentConfigName" => @deployment_config_name,
    "minimumHealthyHosts" => @minimum_healthy_hosts,
    "zonalConfig" => @zonal_config,
  })
  result.compact
end