CfnEndpointConfig

class aws_cdk.aws_sagemaker.CfnEndpointConfig(scope, id, *, production_variants, async_inference_config=None, data_capture_config=None, endpoint_config_name=None, explainer_config=None, kms_key_id=None, shadow_production_variants=None, tags=None)

Bases: CfnResource

A CloudFormation AWS::SageMaker::EndpointConfig.

The AWS::SageMaker::EndpointConfig resource creates a configuration for an Amazon SageMaker endpoint. For more information, see CreateEndpointConfig in the SageMaker Developer Guide .

CloudformationResource:

AWS::SageMaker::EndpointConfig

Link:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

cfn_endpoint_config = sagemaker.CfnEndpointConfig(self, "MyCfnEndpointConfig",
    production_variants=[sagemaker.CfnEndpointConfig.ProductionVariantProperty(
        initial_variant_weight=123,
        model_name="modelName",
        variant_name="variantName",

        # the properties below are optional
        accelerator_type="acceleratorType",
        container_startup_health_check_timeout_in_seconds=123,
        enable_ssm_access=False,
        initial_instance_count=123,
        instance_type="instanceType",
        model_data_download_timeout_in_seconds=123,
        serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
            max_concurrency=123,
            memory_size_in_mb=123,

            # the properties below are optional
            provisioned_concurrency=123
        ),
        volume_size_in_gb=123
    )],

    # the properties below are optional
    async_inference_config=sagemaker.CfnEndpointConfig.AsyncInferenceConfigProperty(
        output_config=sagemaker.CfnEndpointConfig.AsyncInferenceOutputConfigProperty(
            kms_key_id="kmsKeyId",
            notification_config=sagemaker.CfnEndpointConfig.AsyncInferenceNotificationConfigProperty(
                error_topic="errorTopic",
                include_inference_response_in=["includeInferenceResponseIn"],
                success_topic="successTopic"
            ),
            s3_failure_path="s3FailurePath",
            s3_output_path="s3OutputPath"
        ),

        # the properties below are optional
        client_config=sagemaker.CfnEndpointConfig.AsyncInferenceClientConfigProperty(
            max_concurrent_invocations_per_instance=123
        )
    ),
    data_capture_config=sagemaker.CfnEndpointConfig.DataCaptureConfigProperty(
        capture_options=[sagemaker.CfnEndpointConfig.CaptureOptionProperty(
            capture_mode="captureMode"
        )],
        destination_s3_uri="destinationS3Uri",
        initial_sampling_percentage=123,

        # the properties below are optional
        capture_content_type_header=sagemaker.CfnEndpointConfig.CaptureContentTypeHeaderProperty(
            csv_content_types=["csvContentTypes"],
            json_content_types=["jsonContentTypes"]
        ),
        enable_capture=False,
        kms_key_id="kmsKeyId"
    ),
    endpoint_config_name="endpointConfigName",
    explainer_config=sagemaker.CfnEndpointConfig.ExplainerConfigProperty(
        clarify_explainer_config=sagemaker.CfnEndpointConfig.ClarifyExplainerConfigProperty(
            shap_config=sagemaker.CfnEndpointConfig.ClarifyShapConfigProperty(
                shap_baseline_config=sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty(
                    mime_type="mimeType",
                    shap_baseline="shapBaseline",
                    shap_baseline_uri="shapBaselineUri"
                ),

                # the properties below are optional
                number_of_samples=123,
                seed=123,
                text_config=sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
                    granularity="granularity",
                    language="language"
                ),
                use_logit=False
            ),

            # the properties below are optional
            enable_explanations="enableExplanations",
            inference_config=sagemaker.CfnEndpointConfig.ClarifyInferenceConfigProperty(
                content_template="contentTemplate",
                feature_headers=["featureHeaders"],
                features_attribute="featuresAttribute",
                feature_types=["featureTypes"],
                label_attribute="labelAttribute",
                label_headers=["labelHeaders"],
                label_index=123,
                max_payload_in_mb=123,
                max_record_count=123,
                probability_attribute="probabilityAttribute",
                probability_index=123
            )
        )
    ),
    kms_key_id="kmsKeyId",
    shadow_production_variants=[sagemaker.CfnEndpointConfig.ProductionVariantProperty(
        initial_variant_weight=123,
        model_name="modelName",
        variant_name="variantName",

        # the properties below are optional
        accelerator_type="acceleratorType",
        container_startup_health_check_timeout_in_seconds=123,
        enable_ssm_access=False,
        initial_instance_count=123,
        instance_type="instanceType",
        model_data_download_timeout_in_seconds=123,
        serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
            max_concurrency=123,
            memory_size_in_mb=123,

            # the properties below are optional
            provisioned_concurrency=123
        ),
        volume_size_in_gb=123
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Create a new AWS::SageMaker::EndpointConfig.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • production_variants (Union[IResolvable, Sequence[Union[IResolvable, ProductionVariantProperty, Dict[str, Any]]]]) – A list of ProductionVariant objects, one for each model that you want to host at this endpoint.

  • async_inference_config (Union[IResolvable, AsyncInferenceConfigProperty, Dict[str, Any], None]) – Specifies configuration for how an endpoint performs asynchronous inference.

  • data_capture_config (Union[IResolvable, DataCaptureConfigProperty, Dict[str, Any], None]) – Specifies how to capture endpoint data for model monitor. The data capture configuration applies to all production variants hosted at the endpoint.

  • endpoint_config_name (Optional[str]) – The name of the endpoint configuration.

  • explainer_config (Union[IResolvable, ExplainerConfigProperty, Dict[str, Any], None]) – AWS::SageMaker::EndpointConfig.ExplainerConfig.

  • kms_key_id (Optional[str]) – The Amazon Resource Name (ARN) of an AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - Alias name: alias/ExampleAlias - Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint , UpdateEndpoint requests. For more information, refer to the AWS Key Management Service section Using Key Policies in AWS KMS .. epigraph:: Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can’t request a KmsKeyId when using an instance type with local storage. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, do not specify a value for the KmsKeyId parameter. If you specify a value for KmsKeyId when using any nitro-based instances with local storage, the call to CreateEndpointConfig fails. For a list of instance types that support local instance storage, see Instance Store Volumes . For more information about local instance storage encryption, see SSD Instance Store Volumes .

  • shadow_production_variants (Union[IResolvable, Sequence[Union[IResolvable, ProductionVariantProperty, Dict[str, Any]]], None]) – Array of ProductionVariant objects. There is one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants . If you use this field, you can only specify one variant for ProductionVariants and one variant for ShadowProductionVariants .

  • 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 .

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_depends_on(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_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 intermdediate 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).

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 resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

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.

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

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

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::EndpointConfig'
async_inference_config

Specifies configuration for how an endpoint performs asynchronous inference.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceconfig

attr_endpoint_config_name

The name of the endpoint configuration, such as MyEndpointConfiguration .

CloudformationAttribute:

EndpointConfigName

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.

data_capture_config

Specifies how to capture endpoint data for model monitor.

The data capture configuration applies to all production variants hosted at the endpoint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-datacaptureconfig

endpoint_config_name

The name of the endpoint configuration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-endpointconfigname

explainer_config

AWS::SageMaker::EndpointConfig.ExplainerConfig.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-explainerconfig

kms_key_id

The Amazon Resource Name (ARN) of an AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias

The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint , UpdateEndpoint requests. For more information, refer to the AWS Key Management Service section Using Key Policies in AWS KMS .. epigraph:

Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a ``KmsKeyId`` when using an instance type with local storage. If any of the models that you specify in the ``ProductionVariants`` parameter use nitro-based instances with local storage, do not specify a value for the ``KmsKeyId`` parameter. If you specify a value for ``KmsKeyId`` when using any nitro-based instances with local storage, the call to ``CreateEndpointConfig`` fails.

For a list of instance types that support local instance storage, see `Instance Store Volumes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#instance-store-volumes>`_ .

For more information about local instance storage encryption, see `SSD Instance Store Volumes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ssd-instance-store.html>`_ .
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-kmskeyid

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 construct tree node associated with this construct.

production_variants

A list of ProductionVariant objects, one for each model that you want to host at this endpoint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-productionvariants

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 }).

shadow_production_variants

Array of ProductionVariant objects.

There is one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants . If you use this field, you can only specify one variant for ProductionVariants and one variant for ShadowProductionVariants .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-shadowproductionvariants

stack

The stack in which this element is defined.

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

tags

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

For more information, see Resource Tag and Using Cost Allocation Tags .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-endpointconfig.html#cfn-sagemaker-endpointconfig-tags

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(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AsyncInferenceClientConfigProperty

class CfnEndpointConfig.AsyncInferenceClientConfigProperty(*, max_concurrent_invocations_per_instance=None)

Bases: object

Configures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference.

Parameters:

max_concurrent_invocations_per_instance (Union[int, float, None]) – The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker will choose an optimal value for you.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceclientconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

async_inference_client_config_property = sagemaker.CfnEndpointConfig.AsyncInferenceClientConfigProperty(
    max_concurrent_invocations_per_instance=123
)

Attributes

max_concurrent_invocations_per_instance

The maximum number of concurrent requests sent by the SageMaker client to the model container.

If no value is provided, SageMaker will choose an optimal value for you.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceclientconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceclientconfig-maxconcurrentinvocationsperinstance

AsyncInferenceConfigProperty

class CfnEndpointConfig.AsyncInferenceConfigProperty(*, output_config, client_config=None)

Bases: object

Specifies configuration for how an endpoint performs asynchronous inference.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

async_inference_config_property = sagemaker.CfnEndpointConfig.AsyncInferenceConfigProperty(
    output_config=sagemaker.CfnEndpointConfig.AsyncInferenceOutputConfigProperty(
        kms_key_id="kmsKeyId",
        notification_config=sagemaker.CfnEndpointConfig.AsyncInferenceNotificationConfigProperty(
            error_topic="errorTopic",
            include_inference_response_in=["includeInferenceResponseIn"],
            success_topic="successTopic"
        ),
        s3_failure_path="s3FailurePath",
        s3_output_path="s3OutputPath"
    ),

    # the properties below are optional
    client_config=sagemaker.CfnEndpointConfig.AsyncInferenceClientConfigProperty(
        max_concurrent_invocations_per_instance=123
    )
)

Attributes

client_config

Configures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceconfig-clientconfig

output_config

Specifies the configuration for asynchronous inference invocation outputs.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceconfig-outputconfig

AsyncInferenceNotificationConfigProperty

class CfnEndpointConfig.AsyncInferenceNotificationConfigProperty(*, error_topic=None, include_inference_response_in=None, success_topic=None)

Bases: object

Specifies the configuration for notifications of inference results for asynchronous inference.

Parameters:
  • error_topic (Optional[str]) – Amazon SNS topic to post a notification to when an inference fails. If no topic is provided, no notification is sent on failure.

  • include_inference_response_in (Optional[Sequence[str]]) – CfnEndpointConfig.AsyncInferenceNotificationConfigProperty.IncludeInferenceResponseIn.

  • success_topic (Optional[str]) – Amazon SNS topic to post a notification to when an inference completes successfully. If no topic is provided, no notification is sent on success.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferencenotificationconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

async_inference_notification_config_property = sagemaker.CfnEndpointConfig.AsyncInferenceNotificationConfigProperty(
    error_topic="errorTopic",
    include_inference_response_in=["includeInferenceResponseIn"],
    success_topic="successTopic"
)

Attributes

error_topic

Amazon SNS topic to post a notification to when an inference fails.

If no topic is provided, no notification is sent on failure.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferencenotificationconfig.html#cfn-sagemaker-endpointconfig-asyncinferencenotificationconfig-errortopic

include_inference_response_in

CfnEndpointConfig.AsyncInferenceNotificationConfigProperty.IncludeInferenceResponseIn.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferencenotificationconfig.html#cfn-sagemaker-endpointconfig-asyncinferencenotificationconfig-includeinferenceresponsein

success_topic

Amazon SNS topic to post a notification to when an inference completes successfully.

If no topic is provided, no notification is sent on success.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferencenotificationconfig.html#cfn-sagemaker-endpointconfig-asyncinferencenotificationconfig-successtopic

AsyncInferenceOutputConfigProperty

class CfnEndpointConfig.AsyncInferenceOutputConfigProperty(*, kms_key_id=None, notification_config=None, s3_failure_path=None, s3_output_path=None)

Bases: object

Specifies the configuration for asynchronous inference invocation outputs.

Parameters:
  • kms_key_id (Optional[str]) – The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt the asynchronous inference output in Amazon S3.

  • notification_config (Union[IResolvable, AsyncInferenceNotificationConfigProperty, Dict[str, Any], None]) – Specifies the configuration for notifications of inference results for asynchronous inference.

  • s3_failure_path (Optional[str]) – CfnEndpointConfig.AsyncInferenceOutputConfigProperty.S3FailurePath.

  • s3_output_path (Optional[str]) – The Amazon S3 location to upload inference responses to.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceoutputconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

async_inference_output_config_property = sagemaker.CfnEndpointConfig.AsyncInferenceOutputConfigProperty(
    kms_key_id="kmsKeyId",
    notification_config=sagemaker.CfnEndpointConfig.AsyncInferenceNotificationConfigProperty(
        error_topic="errorTopic",
        include_inference_response_in=["includeInferenceResponseIn"],
        success_topic="successTopic"
    ),
    s3_failure_path="s3FailurePath",
    s3_output_path="s3OutputPath"
)

Attributes

kms_key_id

The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt the asynchronous inference output in Amazon S3.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceoutputconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceoutputconfig-kmskeyid

notification_config

Specifies the configuration for notifications of inference results for asynchronous inference.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceoutputconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceoutputconfig-notificationconfig

s3_failure_path

CfnEndpointConfig.AsyncInferenceOutputConfigProperty.S3FailurePath.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceoutputconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceoutputconfig-s3failurepath

s3_output_path

The Amazon S3 location to upload inference responses to.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-asyncinferenceoutputconfig.html#cfn-sagemaker-endpointconfig-asyncinferenceoutputconfig-s3outputpath

CaptureContentTypeHeaderProperty

class CfnEndpointConfig.CaptureContentTypeHeaderProperty(*, csv_content_types=None, json_content_types=None)

Bases: object

Specifies the JSON and CSV content types of the data that the endpoint captures.

Parameters:
  • csv_content_types (Optional[Sequence[str]]) – A list of the CSV content types of the data that the endpoint captures. For the endpoint to capture the data, you must also specify the content type when you invoke the endpoint.

  • json_content_types (Optional[Sequence[str]]) – A list of the JSON content types of the data that the endpoint captures. For the endpoint to capture the data, you must also specify the content type when you invoke the endpoint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig-capturecontenttypeheader.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

capture_content_type_header_property = sagemaker.CfnEndpointConfig.CaptureContentTypeHeaderProperty(
    csv_content_types=["csvContentTypes"],
    json_content_types=["jsonContentTypes"]
)

Attributes

csv_content_types

A list of the CSV content types of the data that the endpoint captures.

For the endpoint to capture the data, you must also specify the content type when you invoke the endpoint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig-capturecontenttypeheader.html#cfn-sagemaker-endpointconfig-datacaptureconfig-capturecontenttypeheader-csvcontenttypes

json_content_types

A list of the JSON content types of the data that the endpoint captures.

For the endpoint to capture the data, you must also specify the content type when you invoke the endpoint.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig-capturecontenttypeheader.html#cfn-sagemaker-endpointconfig-datacaptureconfig-capturecontenttypeheader-jsoncontenttypes

CaptureOptionProperty

class CfnEndpointConfig.CaptureOptionProperty(*, capture_mode)

Bases: object

Specifies whether the endpoint captures input data or output data.

Parameters:

capture_mode (str) – Specifies whether the endpoint captures input data or output data.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-captureoption.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

capture_option_property = sagemaker.CfnEndpointConfig.CaptureOptionProperty(
    capture_mode="captureMode"
)

Attributes

capture_mode

Specifies whether the endpoint captures input data or output data.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-captureoption.html#cfn-sagemaker-endpointconfig-captureoption-capturemode

ClarifyExplainerConfigProperty

class CfnEndpointConfig.ClarifyExplainerConfigProperty(*, shap_config, enable_explanations=None, inference_config=None)

Bases: object

Parameters:
  • shap_config (Union[IResolvable, ClarifyShapConfigProperty, Dict[str, Any]]) – CfnEndpointConfig.ClarifyExplainerConfigProperty.ShapConfig.

  • enable_explanations (Optional[str]) – CfnEndpointConfig.ClarifyExplainerConfigProperty.EnableExplanations.

  • inference_config (Union[IResolvable, ClarifyInferenceConfigProperty, Dict[str, Any], None]) – CfnEndpointConfig.ClarifyExplainerConfigProperty.InferenceConfig.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyexplainerconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

clarify_explainer_config_property = sagemaker.CfnEndpointConfig.ClarifyExplainerConfigProperty(
    shap_config=sagemaker.CfnEndpointConfig.ClarifyShapConfigProperty(
        shap_baseline_config=sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty(
            mime_type="mimeType",
            shap_baseline="shapBaseline",
            shap_baseline_uri="shapBaselineUri"
        ),

        # the properties below are optional
        number_of_samples=123,
        seed=123,
        text_config=sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
            granularity="granularity",
            language="language"
        ),
        use_logit=False
    ),

    # the properties below are optional
    enable_explanations="enableExplanations",
    inference_config=sagemaker.CfnEndpointConfig.ClarifyInferenceConfigProperty(
        content_template="contentTemplate",
        feature_headers=["featureHeaders"],
        features_attribute="featuresAttribute",
        feature_types=["featureTypes"],
        label_attribute="labelAttribute",
        label_headers=["labelHeaders"],
        label_index=123,
        max_payload_in_mb=123,
        max_record_count=123,
        probability_attribute="probabilityAttribute",
        probability_index=123
    )
)

Attributes

enable_explanations

CfnEndpointConfig.ClarifyExplainerConfigProperty.EnableExplanations.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyexplainerconfig.html#cfn-sagemaker-endpointconfig-clarifyexplainerconfig-enableexplanations

inference_config

CfnEndpointConfig.ClarifyExplainerConfigProperty.InferenceConfig.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyexplainerconfig.html#cfn-sagemaker-endpointconfig-clarifyexplainerconfig-inferenceconfig

shap_config

CfnEndpointConfig.ClarifyExplainerConfigProperty.ShapConfig.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyexplainerconfig.html#cfn-sagemaker-endpointconfig-clarifyexplainerconfig-shapconfig

ClarifyInferenceConfigProperty

class CfnEndpointConfig.ClarifyInferenceConfigProperty(*, content_template=None, feature_headers=None, features_attribute=None, feature_types=None, label_attribute=None, label_headers=None, label_index=None, max_payload_in_mb=None, max_record_count=None, probability_attribute=None, probability_index=None)

Bases: object

Parameters:
  • content_template (Optional[str]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.ContentTemplate.

  • feature_headers (Optional[Sequence[str]]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.FeatureHeaders.

  • features_attribute (Optional[str]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.FeaturesAttribute.

  • feature_types (Optional[Sequence[str]]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.FeatureTypes.

  • label_attribute (Optional[str]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.LabelAttribute.

  • label_headers (Optional[Sequence[str]]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.LabelHeaders.

  • label_index (Union[int, float, None]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.LabelIndex.

  • max_payload_in_mb (Union[int, float, None]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.MaxPayloadInMB.

  • max_record_count (Union[int, float, None]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.MaxRecordCount.

  • probability_attribute (Optional[str]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.ProbabilityAttribute.

  • probability_index (Union[int, float, None]) – CfnEndpointConfig.ClarifyInferenceConfigProperty.ProbabilityIndex.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

clarify_inference_config_property = sagemaker.CfnEndpointConfig.ClarifyInferenceConfigProperty(
    content_template="contentTemplate",
    feature_headers=["featureHeaders"],
    features_attribute="featuresAttribute",
    feature_types=["featureTypes"],
    label_attribute="labelAttribute",
    label_headers=["labelHeaders"],
    label_index=123,
    max_payload_in_mb=123,
    max_record_count=123,
    probability_attribute="probabilityAttribute",
    probability_index=123
)

Attributes

content_template

CfnEndpointConfig.ClarifyInferenceConfigProperty.ContentTemplate.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-contenttemplate

feature_headers

CfnEndpointConfig.ClarifyInferenceConfigProperty.FeatureHeaders.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-featureheaders

feature_types

CfnEndpointConfig.ClarifyInferenceConfigProperty.FeatureTypes.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-featuretypes

features_attribute

CfnEndpointConfig.ClarifyInferenceConfigProperty.FeaturesAttribute.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-featuresattribute

label_attribute

CfnEndpointConfig.ClarifyInferenceConfigProperty.LabelAttribute.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-labelattribute

label_headers

CfnEndpointConfig.ClarifyInferenceConfigProperty.LabelHeaders.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-labelheaders

label_index

CfnEndpointConfig.ClarifyInferenceConfigProperty.LabelIndex.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-labelindex

max_payload_in_mb

CfnEndpointConfig.ClarifyInferenceConfigProperty.MaxPayloadInMB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-maxpayloadinmb

max_record_count

CfnEndpointConfig.ClarifyInferenceConfigProperty.MaxRecordCount.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-maxrecordcount

probability_attribute

CfnEndpointConfig.ClarifyInferenceConfigProperty.ProbabilityAttribute.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-probabilityattribute

probability_index

CfnEndpointConfig.ClarifyInferenceConfigProperty.ProbabilityIndex.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyinferenceconfig.html#cfn-sagemaker-endpointconfig-clarifyinferenceconfig-probabilityindex

ClarifyShapBaselineConfigProperty

class CfnEndpointConfig.ClarifyShapBaselineConfigProperty(*, mime_type=None, shap_baseline=None, shap_baseline_uri=None)

Bases: object

Parameters:
  • mime_type (Optional[str]) – CfnEndpointConfig.ClarifyShapBaselineConfigProperty.MimeType.

  • shap_baseline (Optional[str]) – CfnEndpointConfig.ClarifyShapBaselineConfigProperty.ShapBaseline.

  • shap_baseline_uri (Optional[str]) – CfnEndpointConfig.ClarifyShapBaselineConfigProperty.ShapBaselineUri.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapbaselineconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

clarify_shap_baseline_config_property = sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty(
    mime_type="mimeType",
    shap_baseline="shapBaseline",
    shap_baseline_uri="shapBaselineUri"
)

Attributes

mime_type

CfnEndpointConfig.ClarifyShapBaselineConfigProperty.MimeType.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapbaselineconfig.html#cfn-sagemaker-endpointconfig-clarifyshapbaselineconfig-mimetype

shap_baseline

CfnEndpointConfig.ClarifyShapBaselineConfigProperty.ShapBaseline.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapbaselineconfig.html#cfn-sagemaker-endpointconfig-clarifyshapbaselineconfig-shapbaseline

shap_baseline_uri

CfnEndpointConfig.ClarifyShapBaselineConfigProperty.ShapBaselineUri.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapbaselineconfig.html#cfn-sagemaker-endpointconfig-clarifyshapbaselineconfig-shapbaselineuri

ClarifyShapConfigProperty

class CfnEndpointConfig.ClarifyShapConfigProperty(*, shap_baseline_config, number_of_samples=None, seed=None, text_config=None, use_logit=None)

Bases: object

Parameters:
  • shap_baseline_config (Union[IResolvable, ClarifyShapBaselineConfigProperty, Dict[str, Any]]) – CfnEndpointConfig.ClarifyShapConfigProperty.ShapBaselineConfig.

  • number_of_samples (Union[int, float, None]) – CfnEndpointConfig.ClarifyShapConfigProperty.NumberOfSamples.

  • seed (Union[int, float, None]) – CfnEndpointConfig.ClarifyShapConfigProperty.Seed.

  • text_config (Union[IResolvable, ClarifyTextConfigProperty, Dict[str, Any], None]) – CfnEndpointConfig.ClarifyShapConfigProperty.TextConfig.

  • use_logit (Union[bool, IResolvable, None]) – CfnEndpointConfig.ClarifyShapConfigProperty.UseLogit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

clarify_shap_config_property = sagemaker.CfnEndpointConfig.ClarifyShapConfigProperty(
    shap_baseline_config=sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty(
        mime_type="mimeType",
        shap_baseline="shapBaseline",
        shap_baseline_uri="shapBaselineUri"
    ),

    # the properties below are optional
    number_of_samples=123,
    seed=123,
    text_config=sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
        granularity="granularity",
        language="language"
    ),
    use_logit=False
)

Attributes

number_of_samples

CfnEndpointConfig.ClarifyShapConfigProperty.NumberOfSamples.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapconfig.html#cfn-sagemaker-endpointconfig-clarifyshapconfig-numberofsamples

seed

CfnEndpointConfig.ClarifyShapConfigProperty.Seed.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapconfig.html#cfn-sagemaker-endpointconfig-clarifyshapconfig-seed

shap_baseline_config

CfnEndpointConfig.ClarifyShapConfigProperty.ShapBaselineConfig.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapconfig.html#cfn-sagemaker-endpointconfig-clarifyshapconfig-shapbaselineconfig

text_config

CfnEndpointConfig.ClarifyShapConfigProperty.TextConfig.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapconfig.html#cfn-sagemaker-endpointconfig-clarifyshapconfig-textconfig

use_logit

CfnEndpointConfig.ClarifyShapConfigProperty.UseLogit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifyshapconfig.html#cfn-sagemaker-endpointconfig-clarifyshapconfig-uselogit

ClarifyTextConfigProperty

class CfnEndpointConfig.ClarifyTextConfigProperty(*, granularity, language)

Bases: object

Parameters:
  • granularity (str) – CfnEndpointConfig.ClarifyTextConfigProperty.Granularity.

  • language (str) – CfnEndpointConfig.ClarifyTextConfigProperty.Language.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifytextconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

clarify_text_config_property = sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
    granularity="granularity",
    language="language"
)

Attributes

granularity

CfnEndpointConfig.ClarifyTextConfigProperty.Granularity.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifytextconfig.html#cfn-sagemaker-endpointconfig-clarifytextconfig-granularity

language

CfnEndpointConfig.ClarifyTextConfigProperty.Language.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-clarifytextconfig.html#cfn-sagemaker-endpointconfig-clarifytextconfig-language

DataCaptureConfigProperty

class CfnEndpointConfig.DataCaptureConfigProperty(*, capture_options, destination_s3_uri, initial_sampling_percentage, capture_content_type_header=None, enable_capture=None, kms_key_id=None)

Bases: object

Specifies the configuration of your endpoint for model monitor data capture.

Parameters:
  • capture_options (Union[IResolvable, Sequence[Union[IResolvable, CaptureOptionProperty, Dict[str, Any]]]]) – Specifies whether the endpoint captures input data to your model, output data from your model, or both.

  • destination_s3_uri (str) – The S3 bucket where model monitor stores captured data.

  • initial_sampling_percentage (Union[int, float]) – The percentage of data to capture.

  • capture_content_type_header (Union[IResolvable, CaptureContentTypeHeaderProperty, Dict[str, Any], None]) – A list of the JSON and CSV content type that the endpoint captures.

  • enable_capture (Union[bool, IResolvable, None]) – Set to True to enable data capture.

  • kms_key_id (Optional[str]) – The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt the captured data at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias If you don’t provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role’s account. For more information, see KMS-Managed Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) in the Amazon Simple Storage Service Developer Guide. The KMS key policy must grant permission to the IAM role that you specify in your CreateModel (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html) request. For more information, see Using Key Policies in AWS KMS (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) in the AWS Key Management Service Developer Guide.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

data_capture_config_property = sagemaker.CfnEndpointConfig.DataCaptureConfigProperty(
    capture_options=[sagemaker.CfnEndpointConfig.CaptureOptionProperty(
        capture_mode="captureMode"
    )],
    destination_s3_uri="destinationS3Uri",
    initial_sampling_percentage=123,

    # the properties below are optional
    capture_content_type_header=sagemaker.CfnEndpointConfig.CaptureContentTypeHeaderProperty(
        csv_content_types=["csvContentTypes"],
        json_content_types=["jsonContentTypes"]
    ),
    enable_capture=False,
    kms_key_id="kmsKeyId"
)

Attributes

capture_content_type_header

A list of the JSON and CSV content type that the endpoint captures.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig.html#cfn-sagemaker-endpointconfig-datacaptureconfig-capturecontenttypeheader

capture_options

Specifies whether the endpoint captures input data to your model, output data from your model, or both.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig.html#cfn-sagemaker-endpointconfig-datacaptureconfig-captureoptions

destination_s3_uri

The S3 bucket where model monitor stores captured data.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig.html#cfn-sagemaker-endpointconfig-datacaptureconfig-destinations3uri

enable_capture

Set to True to enable data capture.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig.html#cfn-sagemaker-endpointconfig-datacaptureconfig-enablecapture

initial_sampling_percentage

The percentage of data to capture.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig.html#cfn-sagemaker-endpointconfig-datacaptureconfig-initialsamplingpercentage

kms_key_id

The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt the captured data at rest using Amazon S3 server-side encryption.

The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias If you don’t provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role’s account. For more information, see KMS-Managed Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) in the Amazon Simple Storage Service Developer Guide. The KMS key policy must grant permission to the IAM role that you specify in your CreateModel (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html) request. For more information, see Using Key Policies in AWS KMS (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) in the AWS Key Management Service Developer Guide.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-datacaptureconfig.html#cfn-sagemaker-endpointconfig-datacaptureconfig-kmskeyid

ExplainerConfigProperty

class CfnEndpointConfig.ExplainerConfigProperty(*, clarify_explainer_config=None)

Bases: object

Parameters:

clarify_explainer_config (Union[IResolvable, ClarifyExplainerConfigProperty, Dict[str, Any], None]) – CfnEndpointConfig.ExplainerConfigProperty.ClarifyExplainerConfig.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-explainerconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

explainer_config_property = sagemaker.CfnEndpointConfig.ExplainerConfigProperty(
    clarify_explainer_config=sagemaker.CfnEndpointConfig.ClarifyExplainerConfigProperty(
        shap_config=sagemaker.CfnEndpointConfig.ClarifyShapConfigProperty(
            shap_baseline_config=sagemaker.CfnEndpointConfig.ClarifyShapBaselineConfigProperty(
                mime_type="mimeType",
                shap_baseline="shapBaseline",
                shap_baseline_uri="shapBaselineUri"
            ),

            # the properties below are optional
            number_of_samples=123,
            seed=123,
            text_config=sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
                granularity="granularity",
                language="language"
            ),
            use_logit=False
        ),

        # the properties below are optional
        enable_explanations="enableExplanations",
        inference_config=sagemaker.CfnEndpointConfig.ClarifyInferenceConfigProperty(
            content_template="contentTemplate",
            feature_headers=["featureHeaders"],
            features_attribute="featuresAttribute",
            feature_types=["featureTypes"],
            label_attribute="labelAttribute",
            label_headers=["labelHeaders"],
            label_index=123,
            max_payload_in_mb=123,
            max_record_count=123,
            probability_attribute="probabilityAttribute",
            probability_index=123
        )
    )
)

Attributes

clarify_explainer_config

CfnEndpointConfig.ExplainerConfigProperty.ClarifyExplainerConfig.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-explainerconfig.html#cfn-sagemaker-endpointconfig-explainerconfig-clarifyexplainerconfig

ProductionVariantProperty

class CfnEndpointConfig.ProductionVariantProperty(*, initial_variant_weight, model_name, variant_name, accelerator_type=None, container_startup_health_check_timeout_in_seconds=None, enable_ssm_access=None, initial_instance_count=None, instance_type=None, model_data_download_timeout_in_seconds=None, serverless_config=None, volume_size_in_gb=None)

Bases: object

Specifies a model that you want to host and the resources to deploy for hosting it.

If you are deploying multiple models, tell Amazon SageMaker how to distribute traffic among the models by specifying the InitialVariantWeight objects.

Parameters:
  • initial_variant_weight (Union[int, float]) – Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. The traffic to a production variant is determined by the ratio of the VariantWeight to the sum of all VariantWeight values across all ProductionVariants. If unspecified, it defaults to 1.0.

  • model_name (str) – The name of the model that you want to host. This is the name that you specified when creating the model.

  • variant_name (str) – The name of the production variant.

  • accelerator_type (Optional[str]) –

    The size of the Elastic Inference (EI) instance to use for the production variant. EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker . For more information, see Using Elastic Inference in Amazon SageMaker .

  • container_startup_health_check_timeout_in_seconds (Union[int, float, None]) – CfnEndpointConfig.ProductionVariantProperty.ContainerStartupHealthCheckTimeoutInSeconds.

  • enable_ssm_access (Union[bool, IResolvable, None]) – CfnEndpointConfig.ProductionVariantProperty.EnableSSMAccess.

  • initial_instance_count (Union[int, float, None]) – Number of instances to launch initially.

  • instance_type (Optional[str]) – The ML compute instance type.

  • model_data_download_timeout_in_seconds (Union[int, float, None]) – CfnEndpointConfig.ProductionVariantProperty.ModelDataDownloadTimeoutInSeconds.

  • serverless_config (Union[IResolvable, ServerlessConfigProperty, Dict[str, Any], None]) – The serverless configuration for an endpoint. Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.

  • volume_size_in_gb (Union[int, float, None]) – CfnEndpointConfig.ProductionVariantProperty.VolumeSizeInGB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

production_variant_property = sagemaker.CfnEndpointConfig.ProductionVariantProperty(
    initial_variant_weight=123,
    model_name="modelName",
    variant_name="variantName",

    # the properties below are optional
    accelerator_type="acceleratorType",
    container_startup_health_check_timeout_in_seconds=123,
    enable_ssm_access=False,
    initial_instance_count=123,
    instance_type="instanceType",
    model_data_download_timeout_in_seconds=123,
    serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
        max_concurrency=123,
        memory_size_in_mb=123,

        # the properties below are optional
        provisioned_concurrency=123
    ),
    volume_size_in_gb=123
)

Attributes

accelerator_type

The size of the Elastic Inference (EI) instance to use for the production variant.

EI instances provide on-demand GPU computing for inference. For more information, see Using Elastic Inference in Amazon SageMaker . For more information, see Using Elastic Inference in Amazon SageMaker .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-acceleratortype

container_startup_health_check_timeout_in_seconds

CfnEndpointConfig.ProductionVariantProperty.ContainerStartupHealthCheckTimeoutInSeconds.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-containerstartuphealthchecktimeoutinseconds

enable_ssm_access

CfnEndpointConfig.ProductionVariantProperty.EnableSSMAccess.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-enablessmaccess

initial_instance_count

Number of instances to launch initially.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-initialinstancecount

initial_variant_weight

Determines initial traffic distribution among all of the models that you specify in the endpoint configuration.

The traffic to a production variant is determined by the ratio of the VariantWeight to the sum of all VariantWeight values across all ProductionVariants. If unspecified, it defaults to 1.0.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-initialvariantweight

instance_type

The ML compute instance type.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-instancetype

model_data_download_timeout_in_seconds

CfnEndpointConfig.ProductionVariantProperty.ModelDataDownloadTimeoutInSeconds.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-modeldatadownloadtimeoutinseconds

model_name

The name of the model that you want to host.

This is the name that you specified when creating the model.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-modelname

serverless_config

The serverless configuration for an endpoint.

Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-serverlessconfig

variant_name

The name of the production variant.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-variantname

volume_size_in_gb

CfnEndpointConfig.ProductionVariantProperty.VolumeSizeInGB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-volumesizeingb

ServerlessConfigProperty

class CfnEndpointConfig.ServerlessConfigProperty(*, max_concurrency, memory_size_in_mb, provisioned_concurrency=None)

Bases: object

Specifies the serverless configuration for an endpoint variant.

Parameters:
  • max_concurrency (Union[int, float]) – The maximum number of concurrent invocations your serverless endpoint can process.

  • memory_size_in_mb (Union[int, float]) – The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

  • provisioned_concurrency (Union[int, float, None]) – CfnEndpointConfig.ServerlessConfigProperty.ProvisionedConcurrency.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-serverlessconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_sagemaker as sagemaker

serverless_config_property = sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
    max_concurrency=123,
    memory_size_in_mb=123,

    # the properties below are optional
    provisioned_concurrency=123
)

Attributes

max_concurrency

The maximum number of concurrent invocations your serverless endpoint can process.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-serverlessconfig.html#cfn-sagemaker-endpointconfig-productionvariant-serverlessconfig-maxconcurrency

memory_size_in_mb

The memory size of your serverless endpoint.

Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-serverlessconfig.html#cfn-sagemaker-endpointconfig-productionvariant-serverlessconfig-memorysizeinmb

provisioned_concurrency

CfnEndpointConfig.ServerlessConfigProperty.ProvisionedConcurrency.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant-serverlessconfig.html#cfn-sagemaker-endpointconfig-productionvariant-serverlessconfig-provisionedconcurrency