Class: AWSCDK::ECS::CfnService::DeploymentAlarmsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnService::DeploymentAlarmsProperty
- Defined in:
- ecs/cfn_service.rb
Overview
One of the methods which provide a way for you to quickly identify when a deployment has failed, and then to optionally roll back the failure to the last working deployment.
When the alarms are generated, Amazon ECS sets the service deployment to failed. Set the rollback parameter to have Amazon ECS to roll back your service to the last completed deployment after a failure.
You can only use the DeploymentAlarms method to detect failures when the DeploymentController is set to ECS .
For more information, see Rolling update in the Amazon Elastic Container Service Developer Guide .
Instance Attribute Summary collapse
-
#alarm_names ⇒ Array<String>
readonly
One or more CloudWatch alarm names.
-
#enable ⇒ Boolean, AWSCDK::IResolvable
readonly
Determines whether to use the CloudWatch alarm option in the service deployment process.
-
#rollback ⇒ Boolean, AWSCDK::IResolvable
readonly
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alarm_names:, enable:, rollback:) ⇒ DeploymentAlarmsProperty
constructor
A new instance of DeploymentAlarmsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(alarm_names:, enable:, rollback:) ⇒ DeploymentAlarmsProperty
Returns a new instance of DeploymentAlarmsProperty.
1191 1192 1193 1194 1195 1196 1197 1198 |
# File 'ecs/cfn_service.rb', line 1191 def initialize(alarm_names:, enable:, rollback:) @alarm_names = alarm_names Jsii::Type.check_type(@alarm_names, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "alarmNames") @enable = enable Jsii::Type.check_type(@enable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enable") @rollback = rollback Jsii::Type.check_type(@rollback, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "rollback") end |
Instance Attribute Details
#alarm_names ⇒ Array<String> (readonly)
One or more CloudWatch alarm names.
Use a "," to separate the alarms.
1206 1207 1208 |
# File 'ecs/cfn_service.rb', line 1206 def alarm_names @alarm_names end |
#enable ⇒ Boolean, AWSCDK::IResolvable (readonly)
Determines whether to use the CloudWatch alarm option in the service deployment process.
1211 1212 1213 |
# File 'ecs/cfn_service.rb', line 1211 def enable @enable end |
#rollback ⇒ Boolean, AWSCDK::IResolvable (readonly)
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.
If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
1218 1219 1220 |
# File 'ecs/cfn_service.rb', line 1218 def rollback @rollback end |
Class Method Details
.jsii_properties ⇒ Object
1220 1221 1222 1223 1224 1225 1226 |
# File 'ecs/cfn_service.rb', line 1220 def self.jsii_properties { :alarm_names => "alarmNames", :enable => "enable", :rollback => "rollback", } end |
Instance Method Details
#to_jsii ⇒ Object
1228 1229 1230 1231 1232 1233 1234 1235 1236 |
# File 'ecs/cfn_service.rb', line 1228 def to_jsii result = {} result.merge!({ "alarmNames" => @alarm_names, "enable" => @enable, "rollback" => @rollback, }) result.compact end |