Class: AWSCDK::CfnCodeDeployBlueGreenHook
- Inherits:
-
CfnHook
- Object
- CfnHook
- AWSCDK::CfnCodeDeployBlueGreenHook
- 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
-
#additional_options ⇒ AWSCDK::CfnCodeDeployBlueGreenAdditionalOptions?
Additional options for the blue/green deployment.
- #additional_options=(value) ⇒ Object
-
#applications ⇒ Array<AWSCDK::CfnCodeDeployBlueGreenApplication>
Properties of the Amazon ECS applications being deployed.
- #applications=(value) ⇒ Object
- #creation_stack ⇒ Array<String>
-
#initialize(scope, id, props) ⇒ CfnCodeDeployBlueGreenHook
constructor
Creates a new CodeDeploy blue-green ECS Hook.
-
#lifecycle_event_hooks ⇒ AWSCDK::CfnCodeDeployBlueGreenLifecycleEventHooks?
Use lifecycle event hooks to specify a Lambda function that CodeDeploy can call to validate a deployment.
- #lifecycle_event_hooks=(value) ⇒ Object
-
#logical_id ⇒ String
The logical ID for this CloudFormation stack element.
-
#node ⇒ Constructs::Node
The tree node.
-
#override_logical_id(new_logical_id) ⇒ void
Overrides the auto-generated logical ID with a specific ID.
- #render_properties(_props = nil) ⇒ Hash{String => Object}?
-
#service_role ⇒ String
The IAM Role for CloudFormation to use to perform blue-green deployments.
- #service_role=(value) ⇒ Object
-
#stack ⇒ AWSCDK::Stack
The stack in which this element is defined.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#traffic_routing_config ⇒ AWSCDK::CfnTrafficRoutingConfig?
Traffic routing configuration settings.
- #traffic_routing_config=(value) ⇒ Object
-
#type ⇒ String
The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ CfnCodeDeployBlueGreenHook
Creates a new CodeDeploy blue-green ECS 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_methods ⇒ Object
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_options ⇒ AWSCDK::CfnCodeDeployBlueGreenAdditionalOptions?
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 () 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 (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 |
#applications ⇒ Array<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_stack ⇒ 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_hooks ⇒ AWSCDK::CfnCodeDeployBlueGreenLifecycleEventHooks?
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_id ⇒ String
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).
62 63 64 |
# File 'cfn_code_deploy_blue_green_hook.rb', line 62 def logical_id() jsii_get_property("logicalId") end |
#node ⇒ Constructs::Node
The tree 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.
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}?
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_role ⇒ String
The IAM Role for CloudFormation to use to perform blue-green deployments.
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 |
#stack ⇒ AWSCDK::Stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
71 72 73 |
# File 'cfn_code_deploy_blue_green_hook.rb', line 71 def stack() jsii_get_property("stack") end |
#to_string ⇒ String
Returns a string representation of this construct.
157 158 159 |
# File 'cfn_code_deploy_blue_green_hook.rb', line 157 def to_string() jsii_call_method("toString", []) end |
#traffic_routing_config ⇒ AWSCDK::CfnTrafficRoutingConfig?
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 |
#type ⇒ String
The type of the hook (for example, "AWS::CodeDeploy::BlueGreen").
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.
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 |