Skip to content
v2.278.0

BlueGreenUpdatePolicyProperty Struct ​

Update policy for a blue/green deployment.

If this update policy is specified, SageMaker creates a new fleet during the deployment while maintaining the old fleet. SageMaker flips traffic to the new fleet according to the specified traffic routing configuration. Only one update policy should be used in the deployment configuration. If no update policy is specified, SageMaker uses a blue/green deployment strategy with all at once traffic shifting by default.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const blueGreenUpdatePolicyProperty: sagemaker.CfnEndpoint.BlueGreenUpdatePolicyProperty = {
  trafficRoutingConfiguration: {
    type: 'type',

    // the properties below are optional
    canarySize: {
      type: 'type',
      value: 123,
    },
    linearStepSize: {
      type: 'type',
      value: 123,
    },
    waitIntervalInSeconds: 123,
  },

  // the properties below are optional
  maximumExecutionTimeoutInSeconds: 123,
  terminationWaitInSeconds: 123,
};
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_sagemaker as sagemaker

blue_green_update_policy_property = sagemaker.CfnEndpoint.BlueGreenUpdatePolicyProperty(
    traffic_routing_configuration=sagemaker.CfnEndpoint.TrafficRoutingConfigProperty(
        type="type",

        # the properties below are optional
        canary_size=sagemaker.CfnEndpoint.CapacitySizeProperty(
            type="type",
            value=123
        ),
        linear_step_size=sagemaker.CfnEndpoint.CapacitySizeProperty(
            type="type",
            value=123
        ),
        wait_interval_in_seconds=123
    ),

    # the properties below are optional
    maximum_execution_timeout_in_seconds=123,
    termination_wait_in_seconds=123
)
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.sagemaker.*;

BlueGreenUpdatePolicyProperty blueGreenUpdatePolicyProperty = BlueGreenUpdatePolicyProperty.builder()
        .trafficRoutingConfiguration(TrafficRoutingConfigProperty.builder()
                .type("type")

                // the properties below are optional
                .canarySize(CapacitySizeProperty.builder()
                        .type("type")
                        .value(123)
                        .build())
                .linearStepSize(CapacitySizeProperty.builder()
                        .type("type")
                        .value(123)
                        .build())
                .waitIntervalInSeconds(123)
                .build())

        // the properties below are optional
        .maximumExecutionTimeoutInSeconds(123)
        .terminationWaitInSeconds(123)
        .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.Sagemaker;

var blueGreenUpdatePolicyProperty = new BlueGreenUpdatePolicyProperty {
    TrafficRoutingConfiguration = new TrafficRoutingConfigProperty {
        Type = "type",

        // the properties below are optional
        CanarySize = new CapacitySizeProperty {
            Type = "type",
            Value = 123
        },
        LinearStepSize = new CapacitySizeProperty {
            Type = "type",
            Value = 123
        },
        WaitIntervalInSeconds = 123
    },

    // the properties below are optional
    MaximumExecutionTimeoutInSeconds = 123,
    TerminationWaitInSeconds = 123
};
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"

blueGreenUpdatePolicyProperty := &BlueGreenUpdatePolicyProperty{
	TrafficRoutingConfiguration: &TrafficRoutingConfigProperty{
		Type: jsii.String("type"),

		// the properties below are optional
		CanarySize: &CapacitySizeProperty{
			Type: jsii.String("type"),
			Value: jsii.Number(123),
		},
		LinearStepSize: &CapacitySizeProperty{
			Type: jsii.String("type"),
			Value: jsii.Number(123),
		},
		WaitIntervalInSeconds: jsii.Number(123),
	},

	// the properties below are optional
	MaximumExecutionTimeoutInSeconds: jsii.Number(123),
	TerminationWaitInSeconds: jsii.Number(123),
}

Properties ​

maximumExecutionTimeoutInSecondsoptionalnumbermaximum_execution_timeout_in_secondsoptionalint | floatmaximumExecutionTimeoutInSecondsoptionalNumberMaximumExecutionTimeoutInSecondsoptionaldoubleMaximumExecutionTimeoutInSecondsoptional*float64 #
Maximum execution timeout for the deployment.

Note that the timeout value should be larger than the total waiting time specified in TerminationWaitInSeconds and WaitIntervalInSeconds .

terminationWaitInSecondsoptionalnumbertermination_wait_in_secondsoptionalint | floatterminationWaitInSecondsoptionalNumberTerminationWaitInSecondsoptionaldoubleTerminationWaitInSecondsoptional*float64 #
Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet.

Default is 0.

trafficRoutingConfigurationIResolvable | CfnEndpoint.TrafficRoutingConfigPropertytraffic_routing_configurationtyping.Union[IResolvable, TrafficRoutingConfigProperty]trafficRoutingConfigurationIResolvableTrafficRoutingConfigurationIResolvableTrafficRoutingConfigurationinterface{} required #
Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment.