Class: AWSCDK::ECS::CfnService::ForceNewDeploymentProperty

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

Overview

Determines whether to force a new deployment of the service.

By default, deployments aren't forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service's tasks to use a newer Docker image with the same image/tag combination ( my_image:latest ) or to roll Fargate tasks onto a newer platform version.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enable_force_new_deployment:, force_new_deployment_nonce: nil) ⇒ ForceNewDeploymentProperty

Returns a new instance of ForceNewDeploymentProperty.

Parameters:

  • enable_force_new_deployment (Boolean, AWSCDK::IResolvable)

    Determines whether to force a new deployment of the service.

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

    When you change the ForceNewDeploymentNonce value in your template, it signals Amazon ECS to start a new deployment even though no other service parameters have changed.



1741
1742
1743
1744
1745
1746
# File 'ecs/cfn_service.rb', line 1741

def initialize(enable_force_new_deployment:, force_new_deployment_nonce: nil)
  @enable_force_new_deployment = enable_force_new_deployment
  Jsii::Type.check_type(@enable_force_new_deployment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableForceNewDeployment")
  @force_new_deployment_nonce = force_new_deployment_nonce
  Jsii::Type.check_type(@force_new_deployment_nonce, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "forceNewDeploymentNonce") unless @force_new_deployment_nonce.nil?
end

Instance Attribute Details

#enable_force_new_deploymentBoolean, AWSCDK::IResolvable (readonly)

Determines whether to force a new deployment of the service.

By default, deployments aren't forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service's tasks to use a newer Docker image with the same image/tag combination ( my_image:latest ) or to roll Fargate tasks onto a newer platform version.



1754
1755
1756
# File 'ecs/cfn_service.rb', line 1754

def enable_force_new_deployment
  @enable_force_new_deployment
end

#force_new_deployment_nonceString? (readonly)

When you change the ForceNewDeploymentNonce value in your template, it signals Amazon ECS to start a new deployment even though no other service parameters have changed.

The value must be a unique, time- varying value like a timestamp, random string, or sequence number. Use this property when you want to ensure your tasks pick up the latest version of a Docker image that uses the same tag but has been updated in the registry.



1761
1762
1763
# File 'ecs/cfn_service.rb', line 1761

def force_new_deployment_nonce
  @force_new_deployment_nonce
end

Class Method Details

.jsii_propertiesObject



1763
1764
1765
1766
1767
1768
# File 'ecs/cfn_service.rb', line 1763

def self.jsii_properties
  {
    :enable_force_new_deployment => "enableForceNewDeployment",
    :force_new_deployment_nonce => "forceNewDeploymentNonce",
  }
end

Instance Method Details

#to_jsiiObject



1770
1771
1772
1773
1774
1775
1776
1777
# File 'ecs/cfn_service.rb', line 1770

def to_jsii
  result = {}
  result.merge!({
    "enableForceNewDeployment" => @enable_force_new_deployment,
    "forceNewDeploymentNonce" => @force_new_deployment_nonce,
  })
  result.compact
end