Class: AWSCDK::ECS::CfnService::DeploymentCircuitBreakerProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_service.rb

Overview

The deployment circuit breaker can only be used for services using the rolling update ( ECS ) deployment type.

The deployment circuit breaker determines whether a service deployment will fail if the service can't reach a steady state. If it is turned on, a service deployment will transition to a failed state and stop launching new tasks. You can also configure Amazon ECS to roll back your service to the last completed deployment after a failure. For more information, see Rolling update in the Amazon Elastic Container Service Developer Guide .

For more information about API failure reasons, see API failure reasons in the Amazon Elastic Container Service Developer Guide .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enable:, rollback:) ⇒ DeploymentCircuitBreakerProperty

Returns a new instance of DeploymentCircuitBreakerProperty.

Parameters:

  • enable (Boolean, AWSCDK::IResolvable)

    Determines whether to use the deployment circuit breaker logic for the service.

  • rollback (Boolean, AWSCDK::IResolvable)

    Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.



1251
1252
1253
1254
1255
1256
# File 'ecs/cfn_service.rb', line 1251

def initialize(enable:, rollback:)
  @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

#enableBoolean, AWSCDK::IResolvable (readonly)

Determines whether to use the deployment circuit breaker logic for the service.



1262
1263
1264
# File 'ecs/cfn_service.rb', line 1262

def enable
  @enable
end

#rollbackBoolean, AWSCDK::IResolvable (readonly)

Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.

If rollback is on, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.



1269
1270
1271
# File 'ecs/cfn_service.rb', line 1269

def rollback
  @rollback
end

Class Method Details

.jsii_propertiesObject



1271
1272
1273
1274
1275
1276
# File 'ecs/cfn_service.rb', line 1271

def self.jsii_properties
  {
    :enable => "enable",
    :rollback => "rollback",
  }
end

Instance Method Details

#to_jsiiObject



1278
1279
1280
1281
1282
1283
1284
1285
# File 'ecs/cfn_service.rb', line 1278

def to_jsii
  result = {}
  result.merge!({
    "enable" => @enable,
    "rollback" => @rollback,
  })
  result.compact
end