Class: AWSCDK::CodeDeploy::ECSDeploymentGroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_deploy/ecs_deployment_group_props.rb

Overview

Construction properties for EcsDeploymentGroup.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(blue_green_deployment_config:, service:, alarms: nil, application: nil, auto_rollback: nil, deployment_config: nil, deployment_group_name: nil, ignore_alarm_configuration: nil, ignore_poll_alarms_failure: nil, role: nil) ⇒ ECSDeploymentGroupProps

Returns a new instance of ECSDeploymentGroupProps.

Parameters:

  • blue_green_deployment_config (AWSCDK::CodeDeploy::ECSBlueGreenDeploymentConfig)

    The configuration options for blue-green ECS deployments.

  • service (AWSCDK::ECS::IBaseService)

    The ECS service to deploy with this Deployment Group.

  • alarms (Array<AWSCDK::Interfaces::AWSCloudwatch::IAlarmRef>, nil) (defaults to: nil)

    The CloudWatch alarms associated with this Deployment Group.

  • application (AWSCDK::Interfaces::AWSCodedeploy::IApplicationRef, nil) (defaults to: nil)

    The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.

  • auto_rollback (AWSCDK::CodeDeploy::AutoRollbackConfig, nil) (defaults to: nil)

    The auto-rollback configuration for this Deployment Group.

  • deployment_config (AWSCDK::Interfaces::AWSCodedeploy::IDeploymentConfigRef, nil) (defaults to: nil)

    The Deployment Configuration this Deployment Group uses.

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

    The physical, human-readable name of the CodeDeploy Deployment Group.

  • ignore_alarm_configuration (Boolean, nil) (defaults to: nil)

    Whether to skip the step of checking CloudWatch alarms during the deployment process.

  • ignore_poll_alarms_failure (Boolean, nil) (defaults to: nil)

    Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The service Role of this Deployment Group.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'code_deploy/ecs_deployment_group_props.rb', line 17

def initialize(blue_green_deployment_config:, service:, alarms: nil, application: nil, auto_rollback: nil, deployment_config: nil, deployment_group_name: nil, ignore_alarm_configuration: nil, ignore_poll_alarms_failure: nil, role: nil)
  @blue_green_deployment_config = blue_green_deployment_config.is_a?(Hash) ? ::AWSCDK::CodeDeploy::ECSBlueGreenDeploymentConfig.new(**blue_green_deployment_config.transform_keys(&:to_sym)) : blue_green_deployment_config
  Jsii::Type.check_type(@blue_green_deployment_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5FY3NCbHVlR3JlZW5EZXBsb3ltZW50Q29uZmlnIn0=")), "blueGreenDeploymentConfig")
  @service = service
  Jsii::Type.check_type(@service, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLklCYXNlU2VydmljZSJ9")), "service")
  @alarms = alarms
  Jsii::Type.check_type(@alarms, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2Nsb3Vkd2F0Y2guSUFsYXJtUmVmIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "alarms") unless @alarms.nil?
  @application = application
  Jsii::Type.check_type(@application, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jb2RlZGVwbG95LklBcHBsaWNhdGlvblJlZiJ9")), "application") unless @application.nil?
  @auto_rollback = auto_rollback.is_a?(Hash) ? ::AWSCDK::CodeDeploy::AutoRollbackConfig.new(**auto_rollback.transform_keys(&:to_sym)) : auto_rollback
  Jsii::Type.check_type(@auto_rollback, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5BdXRvUm9sbGJhY2tDb25maWcifQ==")), "autoRollback") unless @auto_rollback.nil?
  @deployment_config = deployment_config
  Jsii::Type.check_type(@deployment_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jb2RlZGVwbG95LklEZXBsb3ltZW50Q29uZmlnUmVmIn0=")), "deploymentConfig") unless @deployment_config.nil?
  @deployment_group_name = deployment_group_name
  Jsii::Type.check_type(@deployment_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deploymentGroupName") unless @deployment_group_name.nil?
  @ignore_alarm_configuration = ignore_alarm_configuration
  Jsii::Type.check_type(@ignore_alarm_configuration, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "ignoreAlarmConfiguration") unless @ignore_alarm_configuration.nil?
  @ignore_poll_alarms_failure = ignore_poll_alarms_failure
  Jsii::Type.check_type(@ignore_poll_alarms_failure, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "ignorePollAlarmsFailure") unless @ignore_poll_alarms_failure.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
end

Instance Attribute Details

#alarmsArray<AWSCDK::Interfaces::AWSCloudwatch::IAlarmRef>? (readonly)

Note:

Default: []

The CloudWatch alarms associated with this Deployment Group.

CodeDeploy will stop (and optionally roll back) a deployment if during it any of the alarms trigger.

Alarms can also be added after the Deployment Group is created using the #addAlarm method.



58
59
60
# File 'code_deploy/ecs_deployment_group_props.rb', line 58

def alarms
  @alarms
end

#applicationAWSCDK::Interfaces::AWSCodedeploy::IApplicationRef? (readonly)

Note:

Default: One will be created for you.

The reference to the CodeDeploy ECS Application that this Deployment Group belongs to.



63
64
65
# File 'code_deploy/ecs_deployment_group_props.rb', line 63

def application
  @application
end

#auto_rollbackAWSCDK::CodeDeploy::AutoRollbackConfig? (readonly)

Note:

Default: - default AutoRollbackConfig.

The auto-rollback configuration for this Deployment Group.



68
69
70
# File 'code_deploy/ecs_deployment_group_props.rb', line 68

def auto_rollback
  @auto_rollback
end

#blue_green_deployment_configAWSCDK::CodeDeploy::ECSBlueGreenDeploymentConfig (readonly)

The configuration options for blue-green ECS deployments.



43
44
45
# File 'code_deploy/ecs_deployment_group_props.rb', line 43

def blue_green_deployment_config
  @blue_green_deployment_config
end

#deployment_configAWSCDK::Interfaces::AWSCodedeploy::IDeploymentConfigRef? (readonly)

Note:

Default: EcsDeploymentConfig.ALL_AT_ONCE

The Deployment Configuration this Deployment Group uses.



73
74
75
# File 'code_deploy/ecs_deployment_group_props.rb', line 73

def deployment_config
  @deployment_config
end

#deployment_group_nameString? (readonly)

Note:

Default: An auto-generated name will be used.

The physical, human-readable name of the CodeDeploy Deployment Group.

Returns:

  • (String, nil)


78
79
80
# File 'code_deploy/ecs_deployment_group_props.rb', line 78

def deployment_group_name
  @deployment_group_name
end

#ignore_alarm_configurationBoolean? (readonly)

Note:

Default: - false

Whether to skip the step of checking CloudWatch alarms during the deployment process.

Returns:

  • (Boolean, nil)


83
84
85
# File 'code_deploy/ecs_deployment_group_props.rb', line 83

def ignore_alarm_configuration
  @ignore_alarm_configuration
end

#ignore_poll_alarms_failureBoolean? (readonly)

Note:

Default: false

Whether to continue a deployment even if fetching the alarm status from CloudWatch failed.

Returns:

  • (Boolean, nil)


88
89
90
# File 'code_deploy/ecs_deployment_group_props.rb', line 88

def ignore_poll_alarms_failure
  @ignore_poll_alarms_failure
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - A new Role will be created.

The service Role of this Deployment Group.

Returns:



93
94
95
# File 'code_deploy/ecs_deployment_group_props.rb', line 93

def role
  @role
end

#serviceAWSCDK::ECS::IBaseService (readonly)

The ECS service to deploy with this Deployment Group.



47
48
49
# File 'code_deploy/ecs_deployment_group_props.rb', line 47

def service
  @service
end

Class Method Details

.jsii_propertiesObject



95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'code_deploy/ecs_deployment_group_props.rb', line 95

def self.jsii_properties
  {
    :blue_green_deployment_config => "blueGreenDeploymentConfig",
    :service => "service",
    :alarms => "alarms",
    :application => "application",
    :auto_rollback => "autoRollback",
    :deployment_config => "deploymentConfig",
    :deployment_group_name => "deploymentGroupName",
    :ignore_alarm_configuration => "ignoreAlarmConfiguration",
    :ignore_poll_alarms_failure => "ignorePollAlarmsFailure",
    :role => "role",
  }
end

Instance Method Details

#to_jsiiObject



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'code_deploy/ecs_deployment_group_props.rb', line 110

def to_jsii
  result = {}
  result.merge!({
    "blueGreenDeploymentConfig" => @blue_green_deployment_config,
    "service" => @service,
    "alarms" => @alarms,
    "application" => @application,
    "autoRollback" => @auto_rollback,
    "deploymentConfig" => @deployment_config,
    "deploymentGroupName" => @deployment_group_name,
    "ignoreAlarmConfiguration" => @ignore_alarm_configuration,
    "ignorePollAlarmsFailure" => @ignore_poll_alarms_failure,
    "role" => @role,
  })
  result.compact
end