Class: AWSCDK::CfnCodeDeployBlueGreenHook

Inherits:
CfnHook
  • Object
show all
Defined in:
cfn_code_deploy_blue_green_hook.rb

Overview

A CloudFormation Hook for CodeDeploy blue-green ECS deployments.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props) ⇒ CfnCodeDeployBlueGreenHook

Creates a new CodeDeploy blue-green ECS Hook.

Parameters:

  • scope (Constructs::Construct)

    the scope to create the hook in (usually the containing Stack object).

  • id (String)

    the identifier of the construct - will be used to generate the logical ID of the Hook.

  • props (AWSCDK::CfnCodeDeployBlueGreenHookProps)

    the properties of the Hook.



15
16
17
18
19
20
21
# File 'cfn_code_deploy_blue_green_hook.rb', line 15

def initialize(scope, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::CfnCodeDeployBlueGreenHookProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5Db2RlRGVwbG95Qmx1ZUdyZWVuSG9va1Byb3BzIn0=")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.jsii_overridable_methodsObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'cfn_code_deploy_blue_green_hook.rb', line 23

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :creation_stack => { kind: :property, name: "creationStack", is_optional: false },
    :logical_id => { kind: :property, name: "logicalId", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :type => { kind: :property, name: "type", is_optional: false },
    :applications => { kind: :property, name: "applications", is_optional: false },
    :service_role => { kind: :property, name: "serviceRole", is_optional: false },
    :additional_options => { kind: :property, name: "additionalOptions", is_optional: true },
    :lifecycle_event_hooks => { kind: :property, name: "lifecycleEventHooks", is_optional: true },
    :traffic_routing_config => { kind: :property, name: "trafficRoutingConfig", is_optional: true },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :override_logical_id => { kind: :method, name: "overrideLogicalId", is_optional: false },
    :render_properties => { kind: :method, name: "renderProperties", is_optional: false },
  }
end

Instance Method Details

#additional_optionsAWSCDK::CfnCodeDeployBlueGreenAdditionalOptions?

Note:

Default: - no additional options

Additional options for the blue/green deployment.



111
112
113
# File 'cfn_code_deploy_blue_green_hook.rb', line 111

def additional_options()
  jsii_get_property("additionalOptions")
end

#additional_options=(value) ⇒ Object



115
116
117
118
119
# File 'cfn_code_deploy_blue_green_hook.rb', line 115

def additional_options=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::CfnCodeDeployBlueGreenAdditionalOptions.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5Db2RlRGVwbG95Qmx1ZUdyZWVuQWRkaXRpb25hbE9wdGlvbnMifQ==")), "additionalOptions") unless value.nil?
  jsii_set_property("additionalOptions", value)
end

#applicationsArray<AWSCDK::CfnCodeDeployBlueGreenApplication>

Properties of the Amazon ECS applications being deployed.



85
86
87
# File 'cfn_code_deploy_blue_green_hook.rb', line 85

def applications()
  jsii_get_property("applications")
end

#applications=(value) ⇒ Object



89
90
91
92
93
# File 'cfn_code_deploy_blue_green_hook.rb', line 89

def applications=(value)
  value = value.is_a?(Array) ? value.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnCodeDeployBlueGreenApplication.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmbkNvZGVEZXBsb3lCbHVlR3JlZW5BcHBsaWNhdGlvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "applications")
  jsii_set_property("applications", value)
end

#creation_stackArray<String>

Returns:

  • (Array<String>)


50
51
52
# File 'cfn_code_deploy_blue_green_hook.rb', line 50

def creation_stack()
  jsii_get_property("creationStack")
end

#lifecycle_event_hooksAWSCDK::CfnCodeDeployBlueGreenLifecycleEventHooks?

Note:

Default: - no lifecycle event hooks

Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.

You can use the same function or a different one for deployment lifecycle events. Following completion of the validation tests, the Lambda CfnCodeDeployBlueGreenLifecycleEventHooks.afterAllowTraffic function calls back CodeDeploy and delivers a result of 'Succeeded' or 'Failed'.



130
131
132
# File 'cfn_code_deploy_blue_green_hook.rb', line 130

def lifecycle_event_hooks()
  jsii_get_property("lifecycleEventHooks")
end

#lifecycle_event_hooks=(value) ⇒ Object



134
135
136
137
138
# File 'cfn_code_deploy_blue_green_hook.rb', line 134

def lifecycle_event_hooks=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::CfnCodeDeployBlueGreenLifecycleEventHooks.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5Db2RlRGVwbG95Qmx1ZUdyZWVuTGlmZWN5Y2xlRXZlbnRIb29rcyJ9")), "lifecycleEventHooks") unless value.nil?
  jsii_set_property("lifecycleEventHooks", value)
end

#logical_idString

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use override_logical_id(new_logical_id).

Returns:

  • (String)


62
63
64
# File 'cfn_code_deploy_blue_green_hook.rb', line 62

def logical_id()
  jsii_get_property("logicalId")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


45
46
47
# File 'cfn_code_deploy_blue_green_hook.rb', line 45

def node()
  jsii_get_property("node")
end

#override_logical_id(new_logical_id) ⇒ void

This method returns an undefined value.

Overrides the auto-generated logical ID with a specific ID.

Parameters:

  • new_logical_id (String)

    The new logical ID to use for this stack element.



181
182
183
184
# File 'cfn_code_deploy_blue_green_hook.rb', line 181

def override_logical_id(new_logical_id)
  Jsii::Type.check_type(new_logical_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "newLogicalId")
  jsii_call_method("overrideLogicalId", [new_logical_id])
end

#render_properties(_props = nil) ⇒ Hash{String => Object}?

Parameters:

  • _props (Hash{String => Object}, nil) (defaults to: nil)

Returns:

  • (Hash{String => Object}, nil)


188
189
190
191
# File 'cfn_code_deploy_blue_green_hook.rb', line 188

def render_properties(_props = nil)
  Jsii::Type.check_type(_props, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "_props") unless _props.nil?
  jsii_call_method("renderProperties", [_props])
end

#service_roleString

The IAM Role for CloudFormation to use to perform blue-green deployments.

Returns:

  • (String)


98
99
100
# File 'cfn_code_deploy_blue_green_hook.rb', line 98

def service_role()
  jsii_get_property("serviceRole")
end

#service_role=(value) ⇒ Object



102
103
104
105
# File 'cfn_code_deploy_blue_green_hook.rb', line 102

def service_role=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceRole")
  jsii_set_property("serviceRole", value)
end

#stackAWSCDK::Stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Returns:



71
72
73
# File 'cfn_code_deploy_blue_green_hook.rb', line 71

def stack()
  jsii_get_property("stack")
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


157
158
159
# File 'cfn_code_deploy_blue_green_hook.rb', line 157

def to_string()
  jsii_call_method("toString", [])
end

#traffic_routing_configAWSCDK::CfnTrafficRoutingConfig?

Note:

Default: - time-based canary traffic shifting, with a 15% step percentage and a five minute bake time

Traffic routing configuration settings.



144
145
146
# File 'cfn_code_deploy_blue_green_hook.rb', line 144

def traffic_routing_config()
  jsii_get_property("trafficRoutingConfig")
end

#traffic_routing_config=(value) ⇒ Object



148
149
150
151
152
# File 'cfn_code_deploy_blue_green_hook.rb', line 148

def traffic_routing_config=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::CfnTrafficRoutingConfig.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UcmFmZmljUm91dGluZ0NvbmZpZyJ9")), "trafficRoutingConfig") unless value.nil?
  jsii_set_property("trafficRoutingConfig", value)
end

#typeString

The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").

Returns:

  • (String)


78
79
80
# File 'cfn_code_deploy_blue_green_hook.rb', line 78

def type()
  jsii_get_property("type")
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

Returns:

  • (Constructs::IConstruct)


170
171
172
173
174
175
# File 'cfn_code_deploy_blue_green_hook.rb', line 170

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end