Class: AWSCDK::CodeDeploy::CfnDeploymentGroup::BlueInstanceTerminationOptionProperty

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

Overview

Information about whether instances in the original environment are terminated when a blue/green deployment is successful.

BlueInstanceTerminationOption does not apply to Lambda deployments.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action: nil, termination_wait_time_in_minutes: nil) ⇒ BlueInstanceTerminationOptionProperty

Returns a new instance of BlueInstanceTerminationOptionProperty.

Parameters:

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

    The action to take on instances in the original environment after a successful blue/green deployment.

  • termination_wait_time_in_minutes (Numeric, nil) (defaults to: nil)

    For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.



965
966
967
968
969
970
# File 'code_deploy/cfn_deployment_group.rb', line 965

def initialize(action: nil, termination_wait_time_in_minutes: nil)
  @action = action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") unless @action.nil?
  @termination_wait_time_in_minutes = termination_wait_time_in_minutes
  Jsii::Type.check_type(@termination_wait_time_in_minutes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "terminationWaitTimeInMinutes") unless @termination_wait_time_in_minutes.nil?
end

Instance Attribute Details

#actionString? (readonly)

The action to take on instances in the original environment after a successful blue/green deployment.

  • TERMINATE : Instances are terminated after a specified wait time.
  • KEEP_ALIVE : Instances are left running after they are deregistered from the load balancer and removed from the deployment group.


979
980
981
# File 'code_deploy/cfn_deployment_group.rb', line 979

def action
  @action
end

#termination_wait_time_in_minutesNumeric? (readonly)

For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.

For an Amazon ECS deployment, the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set.

The maximum setting is 2880 minutes (2 days).



988
989
990
# File 'code_deploy/cfn_deployment_group.rb', line 988

def termination_wait_time_in_minutes
  @termination_wait_time_in_minutes
end

Class Method Details

.jsii_propertiesObject



990
991
992
993
994
995
# File 'code_deploy/cfn_deployment_group.rb', line 990

def self.jsii_properties
  {
    :action => "action",
    :termination_wait_time_in_minutes => "terminationWaitTimeInMinutes",
  }
end

Instance Method Details

#to_jsiiObject



997
998
999
1000
1001
1002
1003
1004
# File 'code_deploy/cfn_deployment_group.rb', line 997

def to_jsii
  result = {}
  result.merge!({
    "action" => @action,
    "terminationWaitTimeInMinutes" => @termination_wait_time_in_minutes,
  })
  result.compact
end