DeploymentConfigProperty Struct
The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.
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 deploymentConfigProperty: sagemaker.CfnEndpoint.DeploymentConfigProperty = {
autoRollbackConfiguration: {
alarms: [{
alarmName: 'alarmName',
}],
},
blueGreenUpdatePolicy: {
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,
},
rollingUpdatePolicy: {
maximumBatchSize: {
type: 'type',
value: 123,
},
waitIntervalInSeconds: 123,
// the properties below are optional
maximumExecutionTimeoutInSeconds: 123,
rollbackMaximumBatchSize: {
type: 'type',
value: 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
deployment_config_property = sagemaker.CfnEndpoint.DeploymentConfigProperty(
auto_rollback_configuration=sagemaker.CfnEndpoint.AutoRollbackConfigProperty(
alarms=[sagemaker.CfnEndpoint.AlarmProperty(
alarm_name="alarmName"
)]
),
blue_green_update_policy=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
),
rolling_update_policy=sagemaker.CfnEndpoint.RollingUpdatePolicyProperty(
maximum_batch_size=sagemaker.CfnEndpoint.CapacitySizeProperty(
type="type",
value=123
),
wait_interval_in_seconds=123,
# the properties below are optional
maximum_execution_timeout_in_seconds=123,
rollback_maximum_batch_size=sagemaker.CfnEndpoint.CapacitySizeProperty(
type="type",
value=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.*;
DeploymentConfigProperty deploymentConfigProperty = DeploymentConfigProperty.builder()
.autoRollbackConfiguration(AutoRollbackConfigProperty.builder()
.alarms(List.of(AlarmProperty.builder()
.alarmName("alarmName")
.build()))
.build())
.blueGreenUpdatePolicy(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())
.rollingUpdatePolicy(RollingUpdatePolicyProperty.builder()
.maximumBatchSize(CapacitySizeProperty.builder()
.type("type")
.value(123)
.build())
.waitIntervalInSeconds(123)
// the properties below are optional
.maximumExecutionTimeoutInSeconds(123)
.rollbackMaximumBatchSize(CapacitySizeProperty.builder()
.type("type")
.value(123)
.build())
.build())
.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 deploymentConfigProperty = new DeploymentConfigProperty {
AutoRollbackConfiguration = new AutoRollbackConfigProperty {
Alarms = new [] { new AlarmProperty {
AlarmName = "alarmName"
} }
},
BlueGreenUpdatePolicy = 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
},
RollingUpdatePolicy = new RollingUpdatePolicyProperty {
MaximumBatchSize = new CapacitySizeProperty {
Type = "type",
Value = 123
},
WaitIntervalInSeconds = 123,
// the properties below are optional
MaximumExecutionTimeoutInSeconds = 123,
RollbackMaximumBatchSize = new CapacitySizeProperty {
Type = "type",
Value = 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"
deploymentConfigProperty := &DeploymentConfigProperty{
AutoRollbackConfiguration: &AutoRollbackConfigProperty{
Alarms: []interface{}{
&AlarmProperty{
AlarmName: jsii.String("alarmName"),
},
},
},
BlueGreenUpdatePolicy: &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),
},
RollingUpdatePolicy: &RollingUpdatePolicyProperty{
MaximumBatchSize: &CapacitySizeProperty{
Type: jsii.String("type"),
Value: jsii.Number(123),
},
WaitIntervalInSeconds: jsii.Number(123),
// the properties below are optional
MaximumExecutionTimeoutInSeconds: jsii.Number(123),
RollbackMaximumBatchSize: &CapacitySizeProperty{
Type: jsii.String("type"),
Value: jsii.Number(123),
},
},
}
Properties
autoRollbackConfigurationoptionalIResolvable | CfnEndpoint.AutoRollbackConfigPropertyauto_rollback_configurationoptionaltyping.Union[IResolvable, AutoRollbackConfigProperty]autoRollbackConfigurationoptionalIResolvableAutoRollbackConfigurationoptionalIResolvableAutoRollbackConfigurationoptionalinterface{}#Automatic rollback configuration for handling endpoint deployment failures and recovery.
blueGreenUpdatePolicyoptionalIResolvable | CfnEndpoint.BlueGreenUpdatePolicyPropertyblue_green_update_policyoptionaltyping.Union[IResolvable, BlueGreenUpdatePolicyProperty]blueGreenUpdatePolicyoptionalIResolvableBlueGreenUpdatePolicyoptionalIResolvableBlueGreenUpdatePolicyoptionalinterface{}#Update policy for a blue/green deployment.
notes
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.
rollingUpdatePolicyoptionalIResolvable | CfnEndpoint.RollingUpdatePolicyPropertyrolling_update_policyoptionaltyping.Union[IResolvable, RollingUpdatePolicyProperty]rollingUpdatePolicyoptionalIResolvableRollingUpdatePolicyoptionalIResolvableRollingUpdatePolicyoptionalinterface{}#Specifies a rolling deployment strategy for updating a SageMaker endpoint.