CfnEndpoint

class aws_cdk.aws_sagemaker.CfnEndpoint(scope, id, *, endpoint_config_name, deployment_config=None, endpoint_name=None, exclude_retained_variant_properties=None, retain_all_variant_properties=None, retain_deployment_config=None, tags=None)

Bases: CfnResource

Use the AWS::SageMaker::Endpoint resource to create an endpoint using the specified configuration in the request.

Amazon SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the AWS::SageMaker::EndpointConfig resource. For more information, see Deploy a Model on Amazon SageMaker Hosting Services in the Amazon SageMaker Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpoint.html

CloudformationResource:

AWS::SageMaker::Endpoint

ExampleMetadata:

fixture=_generated

Example:

# 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 = sagemaker.CfnEndpoint(self, "MyCfnEndpoint",
    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"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • endpoint_config_name (str) –

    The name of the AWS::SageMaker::EndpointConfig resource that specifies the configuration for the endpoint. For more information, see CreateEndpointConfig .

  • deployment_config (Union[IResolvable, DeploymentConfigProperty, Dict[str, Any], None]) – The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.

  • endpoint_name (Optional[str]) – The name of the endpoint.The name must be unique within an AWS Region in your AWS account. The name is case-insensitive in CreateEndpoint , but the case is preserved and must be matched in ` <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html>`_ .

  • exclude_retained_variant_properties (Union[IResolvable, Sequence[Union[IResolvable, VariantPropertyProperty, Dict[str, Any]]], None]) – 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 .

  • retain_all_variant_properties (Union[bool, IResolvable, None]) – When updating endpoint resources, enables or disables the retention of variant properties, such as the instance count or the variant weight. 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.

  • retain_deployment_config (Union[bool, IResolvable, None]) – Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is not reused).

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – A list of key-value pairs to apply to this resource. For more information, see Resource Tag and Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::SageMaker::Endpoint'
attr_endpoint_name

The name of the endpoint, such as MyEndpoint .

CloudformationAttribute:

EndpointName

attr_id

Id

Type:

cloudformationAttribute

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

deployment_config

The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.

endpoint_config_name

//docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html>`_ .

Type:

The name of the `AWS::SageMaker::EndpointConfig <https

Type:

//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html>`_ resource that specifies the configuration for the endpoint. For more information, see `CreateEndpointConfig <https

endpoint_name

//docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html>`_ .

Type:

The name of the endpoint.The name must be unique within an AWS Region in your AWS account. The name is case-insensitive in CreateEndpoint , but the case is preserved and must be matched in ` <https

exclude_retained_variant_properties

//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-variantproperty.html>`_ 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 .

Type:

When you are updating endpoint resources with `RetainAllVariantProperties <https

Type:

//docs.aws.amazon.com/sagemaker/latest/dg/API_UpdateEndpoint.html#SageMaker-UpdateEndpoint-request-RetainAllVariantProperties>`_ whose value is set to true , ExcludeRetainedVariantProperties specifies the list of type `VariantProperty <https

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The tree node.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

retain_all_variant_properties

When updating endpoint resources, enables or disables the retention of variant properties, such as the instance count or the variant weight.

retain_deployment_config

Specifies whether to reuse the last deployment configuration.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

Tag Manager which manages the tags for this resource.

tags_raw

A list of key-value pairs to apply to this resource.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

AlarmProperty

class CfnEndpoint.AlarmProperty(*, alarm_name)

Bases: object

An Amazon CloudWatch alarm configured to monitor metrics on an endpoint.

Parameters:

alarm_name (str) – The name of a CloudWatch alarm in your account.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-alarm.html

ExampleMetadata:

fixture=_generated

Example:

# 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

alarm_property = sagemaker.CfnEndpoint.AlarmProperty(
    alarm_name="alarmName"
)

Attributes

alarm_name

The name of a CloudWatch alarm in your account.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-alarm.html#cfn-sagemaker-endpoint-alarm-alarmname

AutoRollbackConfigProperty

class CfnEndpoint.AutoRollbackConfigProperty(*, alarms)

Bases: object

Automatic rollback configuration for handling endpoint deployment failures and recovery.

Parameters:

alarms (Union[IResolvable, Sequence[Union[IResolvable, AlarmProperty, Dict[str, Any]]]]) – List of CloudWatch alarms in your account that are configured to monitor metrics on an endpoint. If any alarms are tripped during a deployment, SageMaker rolls back the deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-autorollbackconfig.html

ExampleMetadata:

fixture=_generated

Example:

# 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

auto_rollback_config_property = sagemaker.CfnEndpoint.AutoRollbackConfigProperty(
    alarms=[sagemaker.CfnEndpoint.AlarmProperty(
        alarm_name="alarmName"
    )]
)

Attributes

alarms

List of CloudWatch alarms in your account that are configured to monitor metrics on an endpoint.

If any alarms are tripped during a deployment, SageMaker rolls back the deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-autorollbackconfig.html#cfn-sagemaker-endpoint-autorollbackconfig-alarms

BlueGreenUpdatePolicyProperty

class CfnEndpoint.BlueGreenUpdatePolicyProperty(*, traffic_routing_configuration, maximum_execution_timeout_in_seconds=None, termination_wait_in_seconds=None)

Bases: object

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.

Parameters:
  • traffic_routing_configuration (Union[IResolvable, TrafficRoutingConfigProperty, Dict[str, Any]]) – Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment.

  • maximum_execution_timeout_in_seconds (Union[int, float, None]) – Maximum execution timeout for the deployment. Note that the timeout value should be larger than the total waiting time specified in TerminationWaitInSeconds and WaitIntervalInSeconds .

  • termination_wait_in_seconds (Union[int, float, None]) – Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet. Default is 0.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-bluegreenupdatepolicy.html

ExampleMetadata:

fixture=_generated

Example:

# 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
)

Attributes

maximum_execution_timeout_in_seconds

Maximum execution timeout for the deployment.

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-bluegreenupdatepolicy.html#cfn-sagemaker-endpoint-bluegreenupdatepolicy-maximumexecutiontimeoutinseconds

termination_wait_in_seconds

Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet.

Default is 0.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-bluegreenupdatepolicy.html#cfn-sagemaker-endpoint-bluegreenupdatepolicy-terminationwaitinseconds

traffic_routing_configuration

Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-bluegreenupdatepolicy.html#cfn-sagemaker-endpoint-bluegreenupdatepolicy-trafficroutingconfiguration

CapacitySizeProperty

class CfnEndpoint.CapacitySizeProperty(*, type, value)

Bases: object

Specifies the type and size of the endpoint capacity to activate for a blue/green deployment, a rolling deployment, or a rollback strategy.

You can specify your batches as either instance count or the overall percentage or your fleet.

For a rollback strategy, if you don’t specify the fields in this object, or if you set the Value to 100%, then SageMaker uses a blue/green rollback strategy and rolls all traffic back to the blue fleet.

Parameters:
  • type (str) – Specifies the endpoint capacity type. - INSTANCE_COUNT : The endpoint activates based on the number of instances. - CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

  • value (Union[int, float]) – Defines the capacity size, either as a number of instances or a capacity percentage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-capacitysize.html

ExampleMetadata:

fixture=_generated

Example:

# 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

capacity_size_property = sagemaker.CfnEndpoint.CapacitySizeProperty(
    type="type",
    value=123
)

Attributes

type

Specifies the endpoint capacity type.

  • INSTANCE_COUNT : The endpoint activates based on the number of instances.

  • CAPACITY_PERCENT : The endpoint activates based on the specified percentage of capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-capacitysize.html#cfn-sagemaker-endpoint-capacitysize-type

value

Defines the capacity size, either as a number of instances or a capacity percentage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-capacitysize.html#cfn-sagemaker-endpoint-capacitysize-value

DeploymentConfigProperty

class CfnEndpoint.DeploymentConfigProperty(*, auto_rollback_configuration=None, blue_green_update_policy=None, rolling_update_policy=None)

Bases: object

The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.

Parameters:
  • auto_rollback_configuration (Union[IResolvable, AutoRollbackConfigProperty, Dict[str, Any], None]) – Automatic rollback configuration for handling endpoint deployment failures and recovery.

  • blue_green_update_policy (Union[IResolvable, BlueGreenUpdatePolicyProperty, Dict[str, Any], None]) – 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.

  • rolling_update_policy (Union[IResolvable, RollingUpdatePolicyProperty, Dict[str, Any], None]) – Specifies a rolling deployment strategy for updating a SageMaker endpoint.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-deploymentconfig.html

ExampleMetadata:

fixture=_generated

Example:

# 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
        )
    )
)

Attributes

auto_rollback_configuration

Automatic rollback configuration for handling endpoint deployment failures and recovery.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-deploymentconfig.html#cfn-sagemaker-endpoint-deploymentconfig-autorollbackconfiguration

blue_green_update_policy

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-deploymentconfig.html#cfn-sagemaker-endpoint-deploymentconfig-bluegreenupdatepolicy

rolling_update_policy

Specifies a rolling deployment strategy for updating a SageMaker endpoint.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-deploymentconfig.html#cfn-sagemaker-endpoint-deploymentconfig-rollingupdatepolicy

RollingUpdatePolicyProperty

class CfnEndpoint.RollingUpdatePolicyProperty(*, maximum_batch_size, wait_interval_in_seconds, maximum_execution_timeout_in_seconds=None, rollback_maximum_batch_size=None)

Bases: object

Specifies a rolling deployment strategy for updating a SageMaker endpoint.

Parameters:
  • maximum_batch_size (Union[IResolvable, CapacitySizeProperty, Dict[str, Any]]) – Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet. Value must be between 5% to 50% of the variant’s total instance count.

  • wait_interval_in_seconds (Union[int, float]) – The length of the baking period, during which SageMaker monitors alarms for each batch on the new fleet.

  • maximum_execution_timeout_in_seconds (Union[int, float, None]) – The time limit for the total deployment. Exceeding this limit causes a timeout.

  • rollback_maximum_batch_size (Union[IResolvable, CapacitySizeProperty, Dict[str, Any], None]) – Batch size for rollback to the old endpoint fleet. Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html

ExampleMetadata:

fixture=_generated

Example:

# 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

rolling_update_policy_property = 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
    )
)

Attributes

maximum_batch_size

Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet.

Value must be between 5% to 50% of the variant’s total instance count.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html#cfn-sagemaker-endpoint-rollingupdatepolicy-maximumbatchsize

maximum_execution_timeout_in_seconds

The time limit for the total deployment.

Exceeding this limit causes a timeout.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html#cfn-sagemaker-endpoint-rollingupdatepolicy-maximumexecutiontimeoutinseconds

rollback_maximum_batch_size

Batch size for rollback to the old endpoint fleet.

Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html#cfn-sagemaker-endpoint-rollingupdatepolicy-rollbackmaximumbatchsize

wait_interval_in_seconds

The length of the baking period, during which SageMaker monitors alarms for each batch on the new fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-rollingupdatepolicy.html#cfn-sagemaker-endpoint-rollingupdatepolicy-waitintervalinseconds

TrafficRoutingConfigProperty

class CfnEndpoint.TrafficRoutingConfigProperty(*, type, canary_size=None, linear_step_size=None, wait_interval_in_seconds=None)

Bases: object

Defines the traffic routing strategy during an endpoint deployment to shift traffic from the old fleet to the new fleet.

Parameters:
  • type (str) – Traffic routing strategy type. - ALL_AT_ONCE : Endpoint traffic shifts to the new fleet in a single step. - CANARY : Endpoint traffic shifts to the new fleet in two steps. The first step is the canary, which is a small portion of the traffic. The second step is the remainder of the traffic. - LINEAR : Endpoint traffic shifts to the new fleet in n steps of a configurable size.

  • canary_size (Union[IResolvable, CapacitySizeProperty, Dict[str, Any], None]) – Batch size for the first step to turn on traffic on the new endpoint fleet. Value must be less than or equal to 50% of the variant’s total instance count.

  • linear_step_size (Union[IResolvable, CapacitySizeProperty, Dict[str, Any], None]) – Batch size for each step to turn on traffic on the new endpoint fleet. Value must be 10-50% of the variant’s total instance count.

  • wait_interval_in_seconds (Union[int, float, None]) – The waiting time (in seconds) between incremental steps to turn on traffic on the new endpoint fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-trafficroutingconfig.html

ExampleMetadata:

fixture=_generated

Example:

# 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

traffic_routing_config_property = 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
)

Attributes

canary_size

Batch size for the first step to turn on traffic on the new endpoint fleet.

Value must be less than or equal to 50% of the variant’s total instance count.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-trafficroutingconfig.html#cfn-sagemaker-endpoint-trafficroutingconfig-canarysize

linear_step_size

Batch size for each step to turn on traffic on the new endpoint fleet.

Value must be 10-50% of the variant’s total instance count.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-trafficroutingconfig.html#cfn-sagemaker-endpoint-trafficroutingconfig-linearstepsize

type

Traffic routing strategy type.

  • ALL_AT_ONCE : Endpoint traffic shifts to the new fleet in a single step.

  • CANARY : Endpoint traffic shifts to the new fleet in two steps. The first step is the canary, which is a small portion of the traffic. The second step is the remainder of the traffic.

  • LINEAR : Endpoint traffic shifts to the new fleet in n steps of a configurable size.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-trafficroutingconfig.html#cfn-sagemaker-endpoint-trafficroutingconfig-type

wait_interval_in_seconds

The waiting time (in seconds) between incremental steps to turn on traffic on the new endpoint fleet.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-trafficroutingconfig.html#cfn-sagemaker-endpoint-trafficroutingconfig-waitintervalinseconds

VariantPropertyProperty

class CfnEndpoint.VariantPropertyProperty(*, variant_property_type=None)

Bases: object

Specifies a production variant property type for an Endpoint.

If you are updating an Endpoint with the RetainAllVariantProperties option set to true , the VarientProperty objects listed in ExcludeRetainedVariantProperties override the existing variant properties of the Endpoint.

Parameters:

variant_property_type (Optional[str]) –

The type of variant property. The supported values are:. - DesiredInstanceCount : Overrides the existing variant instance counts using the InitialInstanceCount values in the ProductionVariants . - DesiredWeight : Overrides the existing variant weights using the InitialVariantWeight values in the ProductionVariants . - DataCaptureConfig : (Not currently supported.)

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-variantproperty.html

ExampleMetadata:

fixture=_generated

Example:

# 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

variant_property_property = sagemaker.CfnEndpoint.VariantPropertyProperty(
    variant_property_type="variantPropertyType"
)

Attributes

variant_property_type

.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpoint-variantproperty.html#cfn-sagemaker-endpoint-variantproperty-variantpropertytype

Type:

The type of variant property. The supported values are