Skip to content
v2.278.0

ForceNewDeploymentProperty Struct ​

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.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const forceNewDeploymentProperty: ecs.CfnService.ForceNewDeploymentProperty = {
  enableForceNewDeployment: false,

  // the properties below are optional
  forceNewDeploymentNonce: 'forceNewDeploymentNonce',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

force_new_deployment_property = ecs.CfnService.ForceNewDeploymentProperty(
    enable_force_new_deployment=False,

    # the properties below are optional
    force_new_deployment_nonce="forceNewDeploymentNonce"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

ForceNewDeploymentProperty forceNewDeploymentProperty = ForceNewDeploymentProperty.builder()
        .enableForceNewDeployment(false)

        // the properties below are optional
        .forceNewDeploymentNonce("forceNewDeploymentNonce")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var forceNewDeploymentProperty = new ForceNewDeploymentProperty {
    EnableForceNewDeployment = false,

    // the properties below are optional
    ForceNewDeploymentNonce = "forceNewDeploymentNonce"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

forceNewDeploymentProperty := &ForceNewDeploymentProperty{
	EnableForceNewDeployment: jsii.Boolean(false),

	// the properties below are optional
	ForceNewDeploymentNonce: jsii.String("forceNewDeploymentNonce"),
}

Properties ​

enableForceNewDeploymentboolean | IResolvableenable_force_new_deploymenttyping.Union[bool, IResolvable]enableForceNewDeploymentBooleanEnableForceNewDeploymentboolEnableForceNewDeploymentinterface{} required #
Determines whether to force a new deployment of the service.
notes

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.

forceNewDeploymentNonceoptionalstringforce_new_deployment_nonceoptionalstrforceNewDeploymentNonceoptionalStringForceNewDeploymentNonceoptionalstringForceNewDeploymentNonceoptional*string #
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.
notes

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.