CfnEndpointProps Struct
Properties for defining a CfnEndpoint.
| Source |
|---|
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 cfnEndpointProps: sagemaker.CfnEndpointProps = {
endpointConfigName: 'endpointConfigName',
// the properties below are optional
deploymentConfig: {
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,
},
},
},
endpointName: 'endpointName',
excludeRetainedVariantProperties: [{
variantPropertyType: 'variantPropertyType',
}],
retainAllVariantProperties: false,
retainDeploymentConfig: false,
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# 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
cfn_endpoint_props = sagemaker.CfnEndpointProps(
endpoint_config_name="endpointConfigName",
# the properties below are optional
deployment_config=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
)
)
),
endpoint_name="endpointName",
exclude_retained_variant_properties=[sagemaker.CfnEndpoint.VariantPropertyProperty(
variant_property_type="variantPropertyType"
)],
retain_all_variant_properties=False,
retain_deployment_config=False,
tags=[CfnTag(
key="key",
value="value"
)]
)
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.*;
CfnEndpointProps cfnEndpointProps = CfnEndpointProps.builder()
.endpointConfigName("endpointConfigName")
// the properties below are optional
.deploymentConfig(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())
.endpointName("endpointName")
.excludeRetainedVariantProperties(List.of(VariantPropertyProperty.builder()
.variantPropertyType("variantPropertyType")
.build()))
.retainAllVariantProperties(false)
.retainDeploymentConfig(false)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.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 cfnEndpointProps = new CfnEndpointProps {
EndpointConfigName = "endpointConfigName",
// the properties below are optional
DeploymentConfig = 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
}
}
},
EndpointName = "endpointName",
ExcludeRetainedVariantProperties = new [] { new VariantPropertyProperty {
VariantPropertyType = "variantPropertyType"
} },
RetainAllVariantProperties = false,
RetainDeploymentConfig = false,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
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"
cfnEndpointProps := &CfnEndpointProps{
EndpointConfigName: jsii.String("endpointConfigName"),
// the properties below are optional
DeploymentConfig: &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),
},
},
},
EndpointName: jsii.String("endpointName"),
ExcludeRetainedVariantProperties: []interface{}{
&VariantPropertyProperty{
VariantPropertyType: jsii.String("variantPropertyType"),
},
},
RetainAllVariantProperties: jsii.Boolean(false),
RetainDeploymentConfig: jsii.Boolean(false),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
deploymentConfigoptionalIResolvable | CfnEndpoint.deployment_configoptionaltyping.Union[IResolvable, DeploymentConfigProperty]deploymentConfigoptionalIResolvableDeploymentConfigoptionalIResolvableDeploymentConfigoptionalinterface{} #The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.
endpointConfigNamestringendpoint_config_namestrendpointConfigNameStringEndpointConfigNamestringEndpointConfigName*string required #The name of the AWS::SageMaker::EndpointConfig resource that specifies the configuration for the endpoint. For more information, see CreateEndpointConfig .
endpointNameoptionalstringendpoint_nameoptionalstrendpointNameoptionalStringEndpointNameoptionalstringEndpointNameoptional*string #The name of the endpoint.
excludeRetainedVariantPropertiesoptionalIResolvable | IResolvable | CfnEndpoint.exclude_retained_variant_propertiesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, VariantPropertyProperty]]]excludeRetainedVariantPropertiesoptionalIResolvableExcludeRetainedVariantPropertiesoptionalIResolvableExcludeRetainedVariantPropertiesoptionalinterface{} #When you are updating endpoint resources with RetainAllVariantProperties whose value is set to `true` , `ExcludeRetainedVariantProperties` specifies the list of type VariantProperty to override with the values provided by `EndpointConfig` . If you don't specify a value for `ExcludeAllVariantProperties` , no variant properties are overridden. Don't use this property when creating new endpoint resources or when `RetainAllVariantProperties` is set to `false` .
retainAllVariantPropertiesoptionalboolean | IResolvableretain_all_variant_propertiesoptionaltyping.Union[bool, IResolvable]retainAllVariantPropertiesoptionalBooleanRetainAllVariantPropertiesoptionalboolRetainAllVariantPropertiesoptionalinterface{} #When updating endpoint resources, enables or disables the retention of variant properties, such as the instance count or the variant weight.
notes
To retain the variant properties of an endpoint when updating it, set RetainAllVariantProperties to true . To use the variant properties specified in a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to false . Use this property only when updating endpoint resources, not when creating new endpoint resources.
retainDeploymentConfigoptionalboolean | IResolvableretain_deployment_configoptionaltyping.Union[bool, IResolvable]retainDeploymentConfigoptionalBooleanRetainDeploymentConfigoptionalboolRetainDeploymentConfigoptionalinterface{} #Specifies whether to reuse the last deployment configuration.
The default value is false (the configuration is not reused).
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #A list of key-value pairs to apply to this resource.
notes
For more information, see Resource Tag and Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .