Class: AWSCDK::CfnCodeDeployBlueGreenLifecycleEventHooks

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cfn_code_deploy_blue_green_lifecycle_event_hooks.rb

Overview

Lifecycle events for blue-green deployments.

The type of the CfnCodeDeployBlueGreenHookProps.lifecycleEventHooks property.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(after_allow_test_traffic: nil, after_allow_traffic: nil, after_install: nil, before_allow_traffic: nil, before_install: nil) ⇒ CfnCodeDeployBlueGreenLifecycleEventHooks

Returns a new instance of CfnCodeDeployBlueGreenLifecycleEventHooks.

Parameters:

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

    Function to use to run tasks after the test listener serves traffic to the replacement task set.

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

    Function to use to run tasks after the second target group serves traffic to the replacement task set.

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

    Function to use to run tasks after the replacement task set is created and one of the target groups is associated with it.

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

    Function to use to run tasks after the second target group is associated with the replacement task set, but before traffic is shifted to the replacement task set.

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

    Function to use to run tasks before the replacement task set is created.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'cfn_code_deploy_blue_green_lifecycle_event_hooks.rb', line 14

def initialize(after_allow_test_traffic: nil, after_allow_traffic: nil, after_install: nil, before_allow_traffic: nil, before_install: nil)
  @after_allow_test_traffic = after_allow_test_traffic
  Jsii::Type.check_type(@after_allow_test_traffic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "afterAllowTestTraffic") unless @after_allow_test_traffic.nil?
  @after_allow_traffic = after_allow_traffic
  Jsii::Type.check_type(@after_allow_traffic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "afterAllowTraffic") unless @after_allow_traffic.nil?
  @after_install = after_install
  Jsii::Type.check_type(@after_install, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "afterInstall") unless @after_install.nil?
  @before_allow_traffic = before_allow_traffic
  Jsii::Type.check_type(@before_allow_traffic, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "beforeAllowTraffic") unless @before_allow_traffic.nil?
  @before_install = before_install
  Jsii::Type.check_type(@before_install, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "beforeInstall") unless @before_install.nil?
end

Instance Attribute Details

#after_allow_test_trafficString? (readonly)

Note:

Default: - none

Function to use to run tasks after the test listener serves traffic to the replacement task set.

Returns:

  • (String, nil)


31
32
33
# File 'cfn_code_deploy_blue_green_lifecycle_event_hooks.rb', line 31

def after_allow_test_traffic
  @after_allow_test_traffic
end

#after_allow_trafficString? (readonly)

Note:

Default: - none

Function to use to run tasks after the second target group serves traffic to the replacement task set.

Returns:

  • (String, nil)


36
37
38
# File 'cfn_code_deploy_blue_green_lifecycle_event_hooks.rb', line 36

def after_allow_traffic
  @after_allow_traffic
end

#after_installString? (readonly)

Note:

Default: - none

Function to use to run tasks after the replacement task set is created and one of the target groups is associated with it.

Returns:

  • (String, nil)


41
42
43
# File 'cfn_code_deploy_blue_green_lifecycle_event_hooks.rb', line 41

def after_install
  @after_install
end

#before_allow_trafficString? (readonly)

Note:

Default: - none

Function to use to run tasks after the second target group is associated with the replacement task set, but before traffic is shifted to the replacement task set.

Returns:

  • (String, nil)


46
47
48
# File 'cfn_code_deploy_blue_green_lifecycle_event_hooks.rb', line 46

def before_allow_traffic
  @before_allow_traffic
end

#before_installString? (readonly)

Note:

Default: - none

Function to use to run tasks before the replacement task set is created.

Returns:

  • (String, nil)


51
52
53
# File 'cfn_code_deploy_blue_green_lifecycle_event_hooks.rb', line 51

def before_install
  @before_install
end

Class Method Details

.jsii_propertiesObject



53
54
55
56
57
58
59
60
61
# File 'cfn_code_deploy_blue_green_lifecycle_event_hooks.rb', line 53

def self.jsii_properties
  {
    :after_allow_test_traffic => "afterAllowTestTraffic",
    :after_allow_traffic => "afterAllowTraffic",
    :after_install => "afterInstall",
    :before_allow_traffic => "beforeAllowTraffic",
    :before_install => "beforeInstall",
  }
end

Instance Method Details

#to_jsiiObject



63
64
65
66
67
68
69
70
71
72
73
# File 'cfn_code_deploy_blue_green_lifecycle_event_hooks.rb', line 63

def to_jsii
  result = {}
  result.merge!({
    "afterAllowTestTraffic" => @after_allow_test_traffic,
    "afterAllowTraffic" => @after_allow_traffic,
    "afterInstall" => @after_install,
    "beforeAllowTraffic" => @before_allow_traffic,
    "beforeInstall" => @before_install,
  })
  result.compact
end