Class: AWSCDK::CodeDeploy::BaseDeploymentConfigProps

Inherits:
BaseDeploymentConfigOptions
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

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

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

  • compute_platform (AWSCDK::CodeDeploy::ComputePlatform, nil) (defaults to: nil)

    The destination compute platform for the deployment.

  • minimum_healthy_hosts (AWSCDK::CodeDeploy::MinimumHealthyHosts, nil) (defaults to: nil)

    Minimum number of healthy hosts.

  • traffic_routing (AWSCDK::CodeDeploy::TrafficRouting, nil) (defaults to: nil)

    The configuration that specifies how traffic is shifted during a deployment.

  • 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.



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_platformAWSCDK::CodeDeploy::ComputePlatform? (readonly)

Note:

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_nameString? (readonly)

Note:

Default: - automatically generated name

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

Returns:

  • (String, nil)


29
30
31
# File 'code_deploy/base_deployment_config_props.rb', line 29

def deployment_config_name
  @deployment_config_name
end

#minimum_healthy_hostsAWSCDK::CodeDeploy::MinimumHealthyHosts? (readonly)

Note:

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_routingAWSCDK::CodeDeploy::TrafficRouting? (readonly)

Note:

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_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.



52
53
54
# File 'code_deploy/base_deployment_config_props.rb', line 52

def zonal_config
  @zonal_config
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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