Skip to content
v2.274.0

CfnEndpointConfig L1 construct ​

The AWS::SageMaker::EndpointConfig resource creates a configuration for an Amazon SageMaker endpoint.

For more information, see CreateEndpointConfig in the SageMaker Developer Guide .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const cfnEndpointConfig = new sagemaker.CfnEndpointConfig(this, 'MyCfnEndpointConfig', {
  productionVariants: [{
    variantName: 'variantName',

    // the properties below are optional
    acceleratorType: 'acceleratorType',
    capacityReservationConfig: {
      capacityReservationPreference: 'capacityReservationPreference',
      mlReservationArn: 'mlReservationArn',
    },
    containerStartupHealthCheckTimeoutInSeconds: 123,
    coreDumpConfig: {
      destinationS3Uri: 'destinationS3Uri',

      // the properties below are optional
      kmsKeyId: 'kmsKeyId',
    },
    enableSsmAccess: false,
    inferenceAmiVersion: 'inferenceAmiVersion',
    initialInstanceCount: 123,
    initialVariantWeight: 123,
    instancePools: [{
      instanceType: 'instanceType',
      priority: 123,

      // the properties below are optional
      modelNameOverride: 'modelNameOverride',
    }],
    instanceType: 'instanceType',
    managedInstanceScaling: {
      maxInstanceCount: 123,
      minInstanceCount: 123,
      scaleInPolicy: {
        strategy: 'strategy',

        // the properties below are optional
        cooldownInMinutes: 123,
        maximumStepSize: 123,
      },
      status: 'status',
    },
    modelDataDownloadTimeoutInSeconds: 123,
    modelName: 'modelName',
    routingConfig: {
      prefixAwareRoutingConfig: {
        concurrencyThreshold: 123,
        prefixLength: 123,
      },
      routingStrategy: 'routingStrategy',
    },
    serverlessConfig: {
      maxConcurrency: 123,
      memorySizeInMb: 123,

      // the properties below are optional
      provisionedConcurrency: 123,
    },
    variantInstanceProvisionTimeoutInSeconds: 123,
    volumeSizeInGb: 123,
  }],

  // the properties below are optional
  asyncInferenceConfig: {
    outputConfig: {
      kmsKeyId: 'kmsKeyId',
      notificationConfig: {
        errorTopic: 'errorTopic',
        includeInferenceResponseIn: ['includeInferenceResponseIn'],
        successTopic: 'successTopic',
      },
      s3FailurePath: 's3FailurePath',
      s3OutputPath: 's3OutputPath',
    },

    // the properties below are optional
    clientConfig: {
      maxConcurrentInvocationsPerInstance: 123,
    },
  },
  dataCaptureConfig: {
    captureOptions: [{
      captureMode: 'captureMode',
    }],
    destinationS3Uri: 'destinationS3Uri',
    initialSamplingPercentage: 123,

    // the properties below are optional
    captureContentTypeHeader: {
      csvContentTypes: ['csvContentTypes'],
      jsonContentTypes: ['jsonContentTypes'],
    },
    enableCapture: false,
    kmsKeyId: 'kmsKeyId',
  },
  enableNetworkIsolation: false,
  endpointConfigName: 'endpointConfigName',
  executionRoleArn: 'executionRoleArn',
  explainerConfig: {
    clarifyExplainerConfig: {
      shapConfig: {
        shapBaselineConfig: {
          mimeType: 'mimeType',
          shapBaseline: 'shapBaseline',
          shapBaselineUri: 'shapBaselineUri',
        },

        // the properties below are optional
        numberOfSamples: 123,
        seed: 123,
        textConfig: {
          granularity: 'granularity',
          language: 'language',
        },
        useLogit: false,
      },

      // the properties below are optional
      enableExplanations: 'enableExplanations',
      inferenceConfig: {
        contentTemplate: 'contentTemplate',
        featureHeaders: ['featureHeaders'],
        featuresAttribute: 'featuresAttribute',
        featureTypes: ['featureTypes'],
        labelAttribute: 'labelAttribute',
        labelHeaders: ['labelHeaders'],
        labelIndex: 123,
        maxPayloadInMb: 123,
        maxRecordCount: 123,
        probabilityAttribute: 'probabilityAttribute',
        probabilityIndex: 123,
      },
    },
  },
  kmsKeyId: 'kmsKeyId',
  metricsConfig: {
    enableDetailedObservability: false,
    enableEnhancedMetrics: false,
    metricPublishFrequencyInSeconds: 123,
  },
  shadowProductionVariants: [{
    variantName: 'variantName',

    // the properties below are optional
    acceleratorType: 'acceleratorType',
    capacityReservationConfig: {
      capacityReservationPreference: 'capacityReservationPreference',
      mlReservationArn: 'mlReservationArn',
    },
    containerStartupHealthCheckTimeoutInSeconds: 123,
    coreDumpConfig: {
      destinationS3Uri: 'destinationS3Uri',

      // the properties below are optional
      kmsKeyId: 'kmsKeyId',
    },
    enableSsmAccess: false,
    inferenceAmiVersion: 'inferenceAmiVersion',
    initialInstanceCount: 123,
    initialVariantWeight: 123,
    instancePools: [{
      instanceType: 'instanceType',
      priority: 123,

      // the properties below are optional
      modelNameOverride: 'modelNameOverride',
    }],
    instanceType: 'instanceType',
    managedInstanceScaling: {
      maxInstanceCount: 123,
      minInstanceCount: 123,
      scaleInPolicy: {
        strategy: 'strategy',

        // the properties below are optional
        cooldownInMinutes: 123,
        maximumStepSize: 123,
      },
      status: 'status',
    },
    modelDataDownloadTimeoutInSeconds: 123,
    modelName: 'modelName',
    routingConfig: {
      prefixAwareRoutingConfig: {
        concurrencyThreshold: 123,
        prefixLength: 123,
      },
      routingStrategy: 'routingStrategy',
    },
    serverlessConfig: {
      maxConcurrency: 123,
      memorySizeInMb: 123,

      // the properties below are optional
      provisionedConcurrency: 123,
    },
    variantInstanceProvisionTimeoutInSeconds: 123,
    volumeSizeInGb: 123,
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
  vpcConfig: {
    securityGroupIds: ['securityGroupIds'],
    subnets: ['subnets'],
  },
});
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

cfn_endpoint_config = sagemaker.CfnEndpointConfig(self, "MyCfnEndpointConfig",
    production_variants=[sagemaker.CfnEndpointConfig.ProductionVariantProperty(
        variant_name="variantName",

        # the properties below are optional
        accelerator_type="acceleratorType",
        capacity_reservation_config=sagemaker.CfnEndpointConfig.CapacityReservationConfigProperty(
            capacity_reservation_preference="capacityReservationPreference",
            ml_reservation_arn="mlReservationArn"
        ),
        container_startup_health_check_timeout_in_seconds=123,
        core_dump_config=sagemaker.CfnEndpointConfig.CoreDumpConfigProperty(
            destination_s3_uri="destinationS3Uri",

            # the properties below are optional
            kms_key_id="kmsKeyId"
        ),
        enable_ssm_access=False,
        inference_ami_version="inferenceAmiVersion",
        initial_instance_count=123,
        initial_variant_weight=123,
        instance_pools=[sagemaker.CfnEndpointConfig.InstancePoolProperty(
            instance_type="instanceType",
            priority=123,

            # the properties below are optional
            model_name_override="modelNameOverride"
        )],
        instance_type="instanceType",
        managed_instance_scaling=sagemaker.CfnEndpointConfig.ManagedInstanceScalingProperty(
            max_instance_count=123,
            min_instance_count=123,
            scale_in_policy=sagemaker.CfnEndpointConfig.ScaleInPolicyProperty(
                strategy="strategy",

                # the properties below are optional
                cooldown_in_minutes=123,
                maximum_step_size=123
            ),
            status="status"
        ),
        model_data_download_timeout_in_seconds=123,
        model_name="modelName",
        routing_config=sagemaker.CfnEndpointConfig.RoutingConfigProperty(
            prefix_aware_routing_config=sagemaker.CfnEndpointConfig.PrefixAwareRoutingConfigProperty(
                concurrency_threshold=123,
                prefix_length=123
            ),
            routing_strategy="routingStrategy"
        ),
        serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
            max_concurrency=123,
            memory_size_in_mb=123,

            # the properties below are optional
            provisioned_concurrency=123
        ),
        variant_instance_provision_timeout_in_seconds=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"
    ),
    enable_network_isolation=False,
    endpoint_config_name="endpointConfigName",
    execution_role_arn="executionRoleArn",
    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",
    metrics_config=sagemaker.CfnEndpointConfig.MetricsConfigProperty(
        enable_detailed_observability=False,
        enable_enhanced_metrics=False,
        metric_publish_frequency_in_seconds=123
    ),
    shadow_production_variants=[sagemaker.CfnEndpointConfig.ProductionVariantProperty(
        variant_name="variantName",

        # the properties below are optional
        accelerator_type="acceleratorType",
        capacity_reservation_config=sagemaker.CfnEndpointConfig.CapacityReservationConfigProperty(
            capacity_reservation_preference="capacityReservationPreference",
            ml_reservation_arn="mlReservationArn"
        ),
        container_startup_health_check_timeout_in_seconds=123,
        core_dump_config=sagemaker.CfnEndpointConfig.CoreDumpConfigProperty(
            destination_s3_uri="destinationS3Uri",

            # the properties below are optional
            kms_key_id="kmsKeyId"
        ),
        enable_ssm_access=False,
        inference_ami_version="inferenceAmiVersion",
        initial_instance_count=123,
        initial_variant_weight=123,
        instance_pools=[sagemaker.CfnEndpointConfig.InstancePoolProperty(
            instance_type="instanceType",
            priority=123,

            # the properties below are optional
            model_name_override="modelNameOverride"
        )],
        instance_type="instanceType",
        managed_instance_scaling=sagemaker.CfnEndpointConfig.ManagedInstanceScalingProperty(
            max_instance_count=123,
            min_instance_count=123,
            scale_in_policy=sagemaker.CfnEndpointConfig.ScaleInPolicyProperty(
                strategy="strategy",

                # the properties below are optional
                cooldown_in_minutes=123,
                maximum_step_size=123
            ),
            status="status"
        ),
        model_data_download_timeout_in_seconds=123,
        model_name="modelName",
        routing_config=sagemaker.CfnEndpointConfig.RoutingConfigProperty(
            prefix_aware_routing_config=sagemaker.CfnEndpointConfig.PrefixAwareRoutingConfigProperty(
                concurrency_threshold=123,
                prefix_length=123
            ),
            routing_strategy="routingStrategy"
        ),
        serverless_config=sagemaker.CfnEndpointConfig.ServerlessConfigProperty(
            max_concurrency=123,
            memory_size_in_mb=123,

            # the properties below are optional
            provisioned_concurrency=123
        ),
        variant_instance_provision_timeout_in_seconds=123,
        volume_size_in_gb=123
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vpc_config=sagemaker.CfnEndpointConfig.VpcConfigProperty(
        security_group_ids=["securityGroupIds"],
        subnets=["subnets"]
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;

CfnEndpointConfig cfnEndpointConfig = CfnEndpointConfig.Builder.create(this, "MyCfnEndpointConfig")
        .productionVariants(List.of(ProductionVariantProperty.builder()
                .variantName("variantName")

                // the properties below are optional
                .acceleratorType("acceleratorType")
                .capacityReservationConfig(CapacityReservationConfigProperty.builder()
                        .capacityReservationPreference("capacityReservationPreference")
                        .mlReservationArn("mlReservationArn")
                        .build())
                .containerStartupHealthCheckTimeoutInSeconds(123)
                .coreDumpConfig(CoreDumpConfigProperty.builder()
                        .destinationS3Uri("destinationS3Uri")

                        // the properties below are optional
                        .kmsKeyId("kmsKeyId")
                        .build())
                .enableSsmAccess(false)
                .inferenceAmiVersion("inferenceAmiVersion")
                .initialInstanceCount(123)
                .initialVariantWeight(123)
                .instancePools(List.of(InstancePoolProperty.builder()
                        .instanceType("instanceType")
                        .priority(123)

                        // the properties below are optional
                        .modelNameOverride("modelNameOverride")
                        .build()))
                .instanceType("instanceType")
                .managedInstanceScaling(ManagedInstanceScalingProperty.builder()
                        .maxInstanceCount(123)
                        .minInstanceCount(123)
                        .scaleInPolicy(ScaleInPolicyProperty.builder()
                                .strategy("strategy")

                                // the properties below are optional
                                .cooldownInMinutes(123)
                                .maximumStepSize(123)
                                .build())
                        .status("status")
                        .build())
                .modelDataDownloadTimeoutInSeconds(123)
                .modelName("modelName")
                .routingConfig(RoutingConfigProperty.builder()
                        .prefixAwareRoutingConfig(PrefixAwareRoutingConfigProperty.builder()
                                .concurrencyThreshold(123)
                                .prefixLength(123)
                                .build())
                        .routingStrategy("routingStrategy")
                        .build())
                .serverlessConfig(ServerlessConfigProperty.builder()
                        .maxConcurrency(123)
                        .memorySizeInMb(123)

                        // the properties below are optional
                        .provisionedConcurrency(123)
                        .build())
                .variantInstanceProvisionTimeoutInSeconds(123)
                .volumeSizeInGb(123)
                .build()))

        // the properties below are optional
        .asyncInferenceConfig(AsyncInferenceConfigProperty.builder()
                .outputConfig(AsyncInferenceOutputConfigProperty.builder()
                        .kmsKeyId("kmsKeyId")
                        .notificationConfig(AsyncInferenceNotificationConfigProperty.builder()
                                .errorTopic("errorTopic")
                                .includeInferenceResponseIn(List.of("includeInferenceResponseIn"))
                                .successTopic("successTopic")
                                .build())
                        .s3FailurePath("s3FailurePath")
                        .s3OutputPath("s3OutputPath")
                        .build())

                // the properties below are optional
                .clientConfig(AsyncInferenceClientConfigProperty.builder()
                        .maxConcurrentInvocationsPerInstance(123)
                        .build())
                .build())
        .dataCaptureConfig(DataCaptureConfigProperty.builder()
                .captureOptions(List.of(CaptureOptionProperty.builder()
                        .captureMode("captureMode")
                        .build()))
                .destinationS3Uri("destinationS3Uri")
                .initialSamplingPercentage(123)

                // the properties below are optional
                .captureContentTypeHeader(CaptureContentTypeHeaderProperty.builder()
                        .csvContentTypes(List.of("csvContentTypes"))
                        .jsonContentTypes(List.of("jsonContentTypes"))
                        .build())
                .enableCapture(false)
                .kmsKeyId("kmsKeyId")
                .build())
        .enableNetworkIsolation(false)
        .endpointConfigName("endpointConfigName")
        .executionRoleArn("executionRoleArn")
        .explainerConfig(ExplainerConfigProperty.builder()
                .clarifyExplainerConfig(ClarifyExplainerConfigProperty.builder()
                        .shapConfig(ClarifyShapConfigProperty.builder()
                                .shapBaselineConfig(ClarifyShapBaselineConfigProperty.builder()
                                        .mimeType("mimeType")
                                        .shapBaseline("shapBaseline")
                                        .shapBaselineUri("shapBaselineUri")
                                        .build())

                                // the properties below are optional
                                .numberOfSamples(123)
                                .seed(123)
                                .textConfig(ClarifyTextConfigProperty.builder()
                                        .granularity("granularity")
                                        .language("language")
                                        .build())
                                .useLogit(false)
                                .build())

                        // the properties below are optional
                        .enableExplanations("enableExplanations")
                        .inferenceConfig(ClarifyInferenceConfigProperty.builder()
                                .contentTemplate("contentTemplate")
                                .featureHeaders(List.of("featureHeaders"))
                                .featuresAttribute("featuresAttribute")
                                .featureTypes(List.of("featureTypes"))
                                .labelAttribute("labelAttribute")
                                .labelHeaders(List.of("labelHeaders"))
                                .labelIndex(123)
                                .maxPayloadInMb(123)
                                .maxRecordCount(123)
                                .probabilityAttribute("probabilityAttribute")
                                .probabilityIndex(123)
                                .build())
                        .build())
                .build())
        .kmsKeyId("kmsKeyId")
        .metricsConfig(MetricsConfigProperty.builder()
                .enableDetailedObservability(false)
                .enableEnhancedMetrics(false)
                .metricPublishFrequencyInSeconds(123)
                .build())
        .shadowProductionVariants(List.of(ProductionVariantProperty.builder()
                .variantName("variantName")

                // the properties below are optional
                .acceleratorType("acceleratorType")
                .capacityReservationConfig(CapacityReservationConfigProperty.builder()
                        .capacityReservationPreference("capacityReservationPreference")
                        .mlReservationArn("mlReservationArn")
                        .build())
                .containerStartupHealthCheckTimeoutInSeconds(123)
                .coreDumpConfig(CoreDumpConfigProperty.builder()
                        .destinationS3Uri("destinationS3Uri")

                        // the properties below are optional
                        .kmsKeyId("kmsKeyId")
                        .build())
                .enableSsmAccess(false)
                .inferenceAmiVersion("inferenceAmiVersion")
                .initialInstanceCount(123)
                .initialVariantWeight(123)
                .instancePools(List.of(InstancePoolProperty.builder()
                        .instanceType("instanceType")
                        .priority(123)

                        // the properties below are optional
                        .modelNameOverride("modelNameOverride")
                        .build()))
                .instanceType("instanceType")
                .managedInstanceScaling(ManagedInstanceScalingProperty.builder()
                        .maxInstanceCount(123)
                        .minInstanceCount(123)
                        .scaleInPolicy(ScaleInPolicyProperty.builder()
                                .strategy("strategy")

                                // the properties below are optional
                                .cooldownInMinutes(123)
                                .maximumStepSize(123)
                                .build())
                        .status("status")
                        .build())
                .modelDataDownloadTimeoutInSeconds(123)
                .modelName("modelName")
                .routingConfig(RoutingConfigProperty.builder()
                        .prefixAwareRoutingConfig(PrefixAwareRoutingConfigProperty.builder()
                                .concurrencyThreshold(123)
                                .prefixLength(123)
                                .build())
                        .routingStrategy("routingStrategy")
                        .build())
                .serverlessConfig(ServerlessConfigProperty.builder()
                        .maxConcurrency(123)
                        .memorySizeInMb(123)

                        // the properties below are optional
                        .provisionedConcurrency(123)
                        .build())
                .variantInstanceProvisionTimeoutInSeconds(123)
                .volumeSizeInGb(123)
                .build()))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .vpcConfig(VpcConfigProperty.builder()
                .securityGroupIds(List.of("securityGroupIds"))
                .subnets(List.of("subnets"))
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var cfnEndpointConfig = new CfnEndpointConfig(this, "MyCfnEndpointConfig", new CfnEndpointConfigProps {
    ProductionVariants = new [] { new ProductionVariantProperty {
        VariantName = "variantName",

        // the properties below are optional
        AcceleratorType = "acceleratorType",
        CapacityReservationConfig = new CapacityReservationConfigProperty {
            CapacityReservationPreference = "capacityReservationPreference",
            MlReservationArn = "mlReservationArn"
        },
        ContainerStartupHealthCheckTimeoutInSeconds = 123,
        CoreDumpConfig = new CoreDumpConfigProperty {
            DestinationS3Uri = "destinationS3Uri",

            // the properties below are optional
            KmsKeyId = "kmsKeyId"
        },
        EnableSsmAccess = false,
        InferenceAmiVersion = "inferenceAmiVersion",
        InitialInstanceCount = 123,
        InitialVariantWeight = 123,
        InstancePools = new [] { new InstancePoolProperty {
            InstanceType = "instanceType",
            Priority = 123,

            // the properties below are optional
            ModelNameOverride = "modelNameOverride"
        } },
        InstanceType = "instanceType",
        ManagedInstanceScaling = new ManagedInstanceScalingProperty {
            MaxInstanceCount = 123,
            MinInstanceCount = 123,
            ScaleInPolicy = new ScaleInPolicyProperty {
                Strategy = "strategy",

                // the properties below are optional
                CooldownInMinutes = 123,
                MaximumStepSize = 123
            },
            Status = "status"
        },
        ModelDataDownloadTimeoutInSeconds = 123,
        ModelName = "modelName",
        RoutingConfig = new RoutingConfigProperty {
            PrefixAwareRoutingConfig = new PrefixAwareRoutingConfigProperty {
                ConcurrencyThreshold = 123,
                PrefixLength = 123
            },
            RoutingStrategy = "routingStrategy"
        },
        ServerlessConfig = new ServerlessConfigProperty {
            MaxConcurrency = 123,
            MemorySizeInMb = 123,

            // the properties below are optional
            ProvisionedConcurrency = 123
        },
        VariantInstanceProvisionTimeoutInSeconds = 123,
        VolumeSizeInGb = 123
    } },

    // the properties below are optional
    AsyncInferenceConfig = new AsyncInferenceConfigProperty {
        OutputConfig = new AsyncInferenceOutputConfigProperty {
            KmsKeyId = "kmsKeyId",
            NotificationConfig = new AsyncInferenceNotificationConfigProperty {
                ErrorTopic = "errorTopic",
                IncludeInferenceResponseIn = new [] { "includeInferenceResponseIn" },
                SuccessTopic = "successTopic"
            },
            S3FailurePath = "s3FailurePath",
            S3OutputPath = "s3OutputPath"
        },

        // the properties below are optional
        ClientConfig = new AsyncInferenceClientConfigProperty {
            MaxConcurrentInvocationsPerInstance = 123
        }
    },
    DataCaptureConfig = new DataCaptureConfigProperty {
        CaptureOptions = new [] { new CaptureOptionProperty {
            CaptureMode = "captureMode"
        } },
        DestinationS3Uri = "destinationS3Uri",
        InitialSamplingPercentage = 123,

        // the properties below are optional
        CaptureContentTypeHeader = new CaptureContentTypeHeaderProperty {
            CsvContentTypes = new [] { "csvContentTypes" },
            JsonContentTypes = new [] { "jsonContentTypes" }
        },
        EnableCapture = false,
        KmsKeyId = "kmsKeyId"
    },
    EnableNetworkIsolation = false,
    EndpointConfigName = "endpointConfigName",
    ExecutionRoleArn = "executionRoleArn",
    ExplainerConfig = new ExplainerConfigProperty {
        ClarifyExplainerConfig = new ClarifyExplainerConfigProperty {
            ShapConfig = new ClarifyShapConfigProperty {
                ShapBaselineConfig = new ClarifyShapBaselineConfigProperty {
                    MimeType = "mimeType",
                    ShapBaseline = "shapBaseline",
                    ShapBaselineUri = "shapBaselineUri"
                },

                // the properties below are optional
                NumberOfSamples = 123,
                Seed = 123,
                TextConfig = new ClarifyTextConfigProperty {
                    Granularity = "granularity",
                    Language = "language"
                },
                UseLogit = false
            },

            // the properties below are optional
            EnableExplanations = "enableExplanations",
            InferenceConfig = new ClarifyInferenceConfigProperty {
                ContentTemplate = "contentTemplate",
                FeatureHeaders = new [] { "featureHeaders" },
                FeaturesAttribute = "featuresAttribute",
                FeatureTypes = new [] { "featureTypes" },
                LabelAttribute = "labelAttribute",
                LabelHeaders = new [] { "labelHeaders" },
                LabelIndex = 123,
                MaxPayloadInMb = 123,
                MaxRecordCount = 123,
                ProbabilityAttribute = "probabilityAttribute",
                ProbabilityIndex = 123
            }
        }
    },
    KmsKeyId = "kmsKeyId",
    MetricsConfig = new MetricsConfigProperty {
        EnableDetailedObservability = false,
        EnableEnhancedMetrics = false,
        MetricPublishFrequencyInSeconds = 123
    },
    ShadowProductionVariants = new [] { new ProductionVariantProperty {
        VariantName = "variantName",

        // the properties below are optional
        AcceleratorType = "acceleratorType",
        CapacityReservationConfig = new CapacityReservationConfigProperty {
            CapacityReservationPreference = "capacityReservationPreference",
            MlReservationArn = "mlReservationArn"
        },
        ContainerStartupHealthCheckTimeoutInSeconds = 123,
        CoreDumpConfig = new CoreDumpConfigProperty {
            DestinationS3Uri = "destinationS3Uri",

            // the properties below are optional
            KmsKeyId = "kmsKeyId"
        },
        EnableSsmAccess = false,
        InferenceAmiVersion = "inferenceAmiVersion",
        InitialInstanceCount = 123,
        InitialVariantWeight = 123,
        InstancePools = new [] { new InstancePoolProperty {
            InstanceType = "instanceType",
            Priority = 123,

            // the properties below are optional
            ModelNameOverride = "modelNameOverride"
        } },
        InstanceType = "instanceType",
        ManagedInstanceScaling = new ManagedInstanceScalingProperty {
            MaxInstanceCount = 123,
            MinInstanceCount = 123,
            ScaleInPolicy = new ScaleInPolicyProperty {
                Strategy = "strategy",

                // the properties below are optional
                CooldownInMinutes = 123,
                MaximumStepSize = 123
            },
            Status = "status"
        },
        ModelDataDownloadTimeoutInSeconds = 123,
        ModelName = "modelName",
        RoutingConfig = new RoutingConfigProperty {
            PrefixAwareRoutingConfig = new PrefixAwareRoutingConfigProperty {
                ConcurrencyThreshold = 123,
                PrefixLength = 123
            },
            RoutingStrategy = "routingStrategy"
        },
        ServerlessConfig = new ServerlessConfigProperty {
            MaxConcurrency = 123,
            MemorySizeInMb = 123,

            // the properties below are optional
            ProvisionedConcurrency = 123
        },
        VariantInstanceProvisionTimeoutInSeconds = 123,
        VolumeSizeInGb = 123
    } },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    VpcConfig = new VpcConfigProperty {
        SecurityGroupIds = new [] { "securityGroupIds" },
        Subnets = new [] { "subnets" }
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnEndpointConfig := awscdk.Aws_sagemaker.NewCfnEndpointConfig(this, jsii.String("MyCfnEndpointConfig"), &CfnEndpointConfigProps{
	ProductionVariants: []interface{}{
		&ProductionVariantProperty{
			VariantName: jsii.String("variantName"),

			// the properties below are optional
			AcceleratorType: jsii.String("acceleratorType"),
			CapacityReservationConfig: &CapacityReservationConfigProperty{
				CapacityReservationPreference: jsii.String("capacityReservationPreference"),
				MlReservationArn: jsii.String("mlReservationArn"),
			},
			ContainerStartupHealthCheckTimeoutInSeconds: jsii.Number(123),
			CoreDumpConfig: &CoreDumpConfigProperty{
				DestinationS3Uri: jsii.String("destinationS3Uri"),

				// the properties below are optional
				KmsKeyId: jsii.String("kmsKeyId"),
			},
			EnableSsmAccess: jsii.Boolean(false),
			InferenceAmiVersion: jsii.String("inferenceAmiVersion"),
			InitialInstanceCount: jsii.Number(123),
			InitialVariantWeight: jsii.Number(123),
			InstancePools: []interface{}{
				&InstancePoolProperty{
					InstanceType: jsii.String("instanceType"),
					Priority: jsii.Number(123),

					// the properties below are optional
					ModelNameOverride: jsii.String("modelNameOverride"),
				},
			},
			InstanceType: jsii.String("instanceType"),
			ManagedInstanceScaling: &ManagedInstanceScalingProperty{
				MaxInstanceCount: jsii.Number(123),
				MinInstanceCount: jsii.Number(123),
				ScaleInPolicy: &ScaleInPolicyProperty{
					Strategy: jsii.String("strategy"),

					// the properties below are optional
					CooldownInMinutes: jsii.Number(123),
					MaximumStepSize: jsii.Number(123),
				},
				Status: jsii.String("status"),
			},
			ModelDataDownloadTimeoutInSeconds: jsii.Number(123),
			ModelName: jsii.String("modelName"),
			RoutingConfig: &RoutingConfigProperty{
				PrefixAwareRoutingConfig: &PrefixAwareRoutingConfigProperty{
					ConcurrencyThreshold: jsii.Number(123),
					PrefixLength: jsii.Number(123),
				},
				RoutingStrategy: jsii.String("routingStrategy"),
			},
			ServerlessConfig: &ServerlessConfigProperty{
				MaxConcurrency: jsii.Number(123),
				MemorySizeInMb: jsii.Number(123),

				// the properties below are optional
				ProvisionedConcurrency: jsii.Number(123),
			},
			VariantInstanceProvisionTimeoutInSeconds: jsii.Number(123),
			VolumeSizeInGb: jsii.Number(123),
		},
	},

	// the properties below are optional
	AsyncInferenceConfig: &AsyncInferenceConfigProperty{
		OutputConfig: &AsyncInferenceOutputConfigProperty{
			KmsKeyId: jsii.String("kmsKeyId"),
			NotificationConfig: &AsyncInferenceNotificationConfigProperty{
				ErrorTopic: jsii.String("errorTopic"),
				IncludeInferenceResponseIn: []*string{
					jsii.String("includeInferenceResponseIn"),
				},
				SuccessTopic: jsii.String("successTopic"),
			},
			S3FailurePath: jsii.String("s3FailurePath"),
			S3OutputPath: jsii.String("s3OutputPath"),
		},

		// the properties below are optional
		ClientConfig: &AsyncInferenceClientConfigProperty{
			MaxConcurrentInvocationsPerInstance: jsii.Number(123),
		},
	},
	DataCaptureConfig: &DataCaptureConfigProperty{
		CaptureOptions: []interface{}{
			&CaptureOptionProperty{
				CaptureMode: jsii.String("captureMode"),
			},
		},
		DestinationS3Uri: jsii.String("destinationS3Uri"),
		InitialSamplingPercentage: jsii.Number(123),

		// the properties below are optional
		CaptureContentTypeHeader: &CaptureContentTypeHeaderProperty{
			CsvContentTypes: []*string{
				jsii.String("csvContentTypes"),
			},
			JsonContentTypes: []*string{
				jsii.String("jsonContentTypes"),
			},
		},
		EnableCapture: jsii.Boolean(false),
		KmsKeyId: jsii.String("kmsKeyId"),
	},
	EnableNetworkIsolation: jsii.Boolean(false),
	EndpointConfigName: jsii.String("endpointConfigName"),
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	ExplainerConfig: &ExplainerConfigProperty{
		ClarifyExplainerConfig: &ClarifyExplainerConfigProperty{
			ShapConfig: &ClarifyShapConfigProperty{
				ShapBaselineConfig: &ClarifyShapBaselineConfigProperty{
					MimeType: jsii.String("mimeType"),
					ShapBaseline: jsii.String("shapBaseline"),
					ShapBaselineUri: jsii.String("shapBaselineUri"),
				},

				// the properties below are optional
				NumberOfSamples: jsii.Number(123),
				Seed: jsii.Number(123),
				TextConfig: &ClarifyTextConfigProperty{
					Granularity: jsii.String("granularity"),
					Language: jsii.String("language"),
				},
				UseLogit: jsii.Boolean(false),
			},

			// the properties below are optional
			EnableExplanations: jsii.String("enableExplanations"),
			InferenceConfig: &ClarifyInferenceConfigProperty{
				ContentTemplate: jsii.String("contentTemplate"),
				FeatureHeaders: []*string{
					jsii.String("featureHeaders"),
				},
				FeaturesAttribute: jsii.String("featuresAttribute"),
				FeatureTypes: []*string{
					jsii.String("featureTypes"),
				},
				LabelAttribute: jsii.String("labelAttribute"),
				LabelHeaders: []*string{
					jsii.String("labelHeaders"),
				},
				LabelIndex: jsii.Number(123),
				MaxPayloadInMb: jsii.Number(123),
				MaxRecordCount: jsii.Number(123),
				ProbabilityAttribute: jsii.String("probabilityAttribute"),
				ProbabilityIndex: jsii.Number(123),
			},
		},
	},
	KmsKeyId: jsii.String("kmsKeyId"),
	MetricsConfig: &MetricsConfigProperty{
		EnableDetailedObservability: jsii.Boolean(false),
		EnableEnhancedMetrics: jsii.Boolean(false),
		MetricPublishFrequencyInSeconds: jsii.Number(123),
	},
	ShadowProductionVariants: []interface{}{
		&ProductionVariantProperty{
			VariantName: jsii.String("variantName"),

			// the properties below are optional
			AcceleratorType: jsii.String("acceleratorType"),
			CapacityReservationConfig: &CapacityReservationConfigProperty{
				CapacityReservationPreference: jsii.String("capacityReservationPreference"),
				MlReservationArn: jsii.String("mlReservationArn"),
			},
			ContainerStartupHealthCheckTimeoutInSeconds: jsii.Number(123),
			CoreDumpConfig: &CoreDumpConfigProperty{
				DestinationS3Uri: jsii.String("destinationS3Uri"),

				// the properties below are optional
				KmsKeyId: jsii.String("kmsKeyId"),
			},
			EnableSsmAccess: jsii.Boolean(false),
			InferenceAmiVersion: jsii.String("inferenceAmiVersion"),
			InitialInstanceCount: jsii.Number(123),
			InitialVariantWeight: jsii.Number(123),
			InstancePools: []interface{}{
				&InstancePoolProperty{
					InstanceType: jsii.String("instanceType"),
					Priority: jsii.Number(123),

					// the properties below are optional
					ModelNameOverride: jsii.String("modelNameOverride"),
				},
			},
			InstanceType: jsii.String("instanceType"),
			ManagedInstanceScaling: &ManagedInstanceScalingProperty{
				MaxInstanceCount: jsii.Number(123),
				MinInstanceCount: jsii.Number(123),
				ScaleInPolicy: &ScaleInPolicyProperty{
					Strategy: jsii.String("strategy"),

					// the properties below are optional
					CooldownInMinutes: jsii.Number(123),
					MaximumStepSize: jsii.Number(123),
				},
				Status: jsii.String("status"),
			},
			ModelDataDownloadTimeoutInSeconds: jsii.Number(123),
			ModelName: jsii.String("modelName"),
			RoutingConfig: &RoutingConfigProperty{
				PrefixAwareRoutingConfig: &PrefixAwareRoutingConfigProperty{
					ConcurrencyThreshold: jsii.Number(123),
					PrefixLength: jsii.Number(123),
				},
				RoutingStrategy: jsii.String("routingStrategy"),
			},
			ServerlessConfig: &ServerlessConfigProperty{
				MaxConcurrency: jsii.Number(123),
				MemorySizeInMb: jsii.Number(123),

				// the properties below are optional
				ProvisionedConcurrency: jsii.Number(123),
			},
			VariantInstanceProvisionTimeoutInSeconds: jsii.Number(123),
			VolumeSizeInGb: jsii.Number(123),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	VpcConfig: &VpcConfigProperty{
		SecurityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
		Subnets: []*string{
			jsii.String("subnets"),
		},
	},
})

Initializer ​

ts
new CfnEndpointConfig(scope: Construct, id: string, props: CfnEndpointConfigProps)
python
CfnEndpointConfig(scope: Construct, id: str, props: CfnEndpointConfigProps)
java
new CfnEndpointConfig(Construct scope, String id, CfnEndpointConfigProps props)
csharp
new CfnEndpointConfig(Construct scope, string id, CfnEndpointConfigProps props)
go
NewCfnEndpointConfig(Scope Construct, Id *string, Props CfnEndpointConfigProps)

Construct Props ​

asyncInferenceConfigoptionalIResolvable | CfnEndpointConfig.AsyncInferenceConfigPropertyasync_inference_configoptionaltyping.Union[IResolvable, AsyncInferenceConfigProperty]asyncInferenceConfigoptionalIResolvableAsyncInferenceConfigoptionalIResolvableAsyncInferenceConfigoptionalinterface{}#
Specifies configuration for how an endpoint performs asynchronous inference.
dataCaptureConfigoptionalIResolvable | CfnEndpointConfig.DataCaptureConfigPropertydata_capture_configoptionaltyping.Union[IResolvable, DataCaptureConfigProperty]dataCaptureConfigoptionalIResolvableDataCaptureConfigoptionalIResolvableDataCaptureConfigoptionalinterface{}#
Specifies how to capture endpoint data for model monitor.

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

enableNetworkIsolationoptionalboolean | IResolvableenable_network_isolationoptionaltyping.Union[bool, IResolvable]enableNetworkIsolationoptionalBooleanEnableNetworkIsolationoptionalboolEnableNetworkIsolationoptionalinterface{}#
Sets whether all model containers deployed to the endpoint are isolated.

If they are, no inbound or outbound network calls can be made to or from the model containers.

endpointConfigNameoptionalstringendpoint_config_nameoptionalstrendpointConfigNameoptionalStringEndpointConfigNameoptionalstringEndpointConfigNameoptional*string#
The name of the endpoint configuration.
executionRoleArnoptionalstringexecution_role_arnoptionalstrexecutionRoleArnoptionalStringExecutionRoleArnoptionalstringExecutionRoleArnoptional*string#
The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf.
explainerConfigoptionalIResolvable | CfnEndpointConfig.ExplainerConfigPropertyexplainer_configoptionaltyping.Union[IResolvable, ExplainerConfigProperty]explainerConfigoptionalIResolvableExplainerConfigoptionalIResolvableExplainerConfigoptionalinterface{}#
A parameter to activate explainers.
kmsKeyIdoptionalstringkms_key_idoptionalstrkmsKeyIdoptionalStringKmsKeyIdoptionalstringKmsKeyIdoptional*string#
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.
notes
  • 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

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 .

metricsConfigoptionalIResolvable | CfnEndpointConfig.MetricsConfigPropertymetrics_configoptionaltyping.Union[IResolvable, MetricsConfigProperty]metricsConfigoptionalIResolvableMetricsConfigoptionalIResolvableMetricsConfigoptionalinterface{}#
Specifies the metrics that the endpoint publishes to Amazon CloudWatch, the frequency of publication, and whether to enable enhanced or detailed observability metrics.
productionVariantsIResolvable | IResolvable | CfnEndpointConfig.ProductionVariantProperty[]production_variantstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProductionVariantProperty]]]productionVariantsIResolvableProductionVariantsIResolvableProductionVariantsinterface{}required#
A list of `ProductionVariant` objects, one for each model that you want to host at this endpoint.
shadowProductionVariantsoptionalIResolvable | IResolvable | CfnEndpointConfig.ProductionVariantProperty[]shadow_production_variantsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProductionVariantProperty]]]shadowProductionVariantsoptionalIResolvableShadowProductionVariantsoptionalIResolvableShadowProductionVariantsoptionalinterface{}#
Array of `ProductionVariant` objects.
notes

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 .

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
A list of key-value pairs to apply to this resource.
notes

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

vpcConfigoptionalIResolvable | CfnEndpointConfig.VpcConfigPropertyvpc_configoptionaltyping.Union[IResolvable, VpcConfigProperty]vpcConfigoptionalIResolvableVpcConfigoptionalIResolvableVpcConfigoptionalinterface{}#
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.

You can control access to and from your resources by configuring a VPC.

Properties ​

asyncInferenceConfigmay be undefinedIResolvable | CfnEndpointConfig.AsyncInferenceConfigPropertyasync_inference_configmay be undefinedtyping.Union[IResolvable, AsyncInferenceConfigProperty]asyncInferenceConfigmay be undefinedIResolvableAsyncInferenceConfigmay be undefinedIResolvableAsyncInferenceConfigmay be undefinedinterface{}#
Specifies configuration for how an endpoint performs asynchronous inference.
attrEndpointConfigArnstringattr_endpoint_config_arnstrattrEndpointConfigArnStringAttrEndpointConfigArnstringAttrEndpointConfigArn*stringrequired#
The Amazon Resource Name (ARN) of the endpoint configuration.
attrEndpointConfigNamestringattr_endpoint_config_namestrattrEndpointConfigNameStringAttrEndpointConfigNamestringAttrEndpointConfigName*stringrequired#
The name of the endpoint configuration, such as `MyEndpointConfiguration` .
CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringrequiredstatic#
The CloudFormation resource type name for this resource class.
Options for this resource, such as condition, update policy etc.
cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*stringrequired#
AWS resource type.
creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*stringrequired#
dataCaptureConfigmay be undefinedIResolvable | CfnEndpointConfig.DataCaptureConfigPropertydata_capture_configmay be undefinedtyping.Union[IResolvable, DataCaptureConfigProperty]dataCaptureConfigmay be undefinedIResolvableDataCaptureConfigmay be undefinedIResolvableDataCaptureConfigmay be undefinedinterface{}#
Specifies how to capture endpoint data for model monitor.
enableNetworkIsolationmay be undefinedboolean | IResolvableenable_network_isolationmay be undefinedtyping.Union[bool, IResolvable]enableNetworkIsolationmay be undefinedBooleanEnableNetworkIsolationmay be undefinedboolEnableNetworkIsolationmay be undefinedinterface{}#
Sets whether all model containers deployed to the endpoint are isolated.
endpointConfigNamemay be undefinedstringendpoint_config_namemay be undefinedstrendpointConfigNamemay be undefinedStringEndpointConfigNamemay be undefinedstringEndpointConfigNamemay be undefined*string#
The name of the endpoint configuration.
endpointConfigRefEndpointConfigReferenceendpoint_config_refEndpointConfigReferenceendpointConfigRefEndpointConfigReferenceEndpointConfigRefEndpointConfigReferenceEndpointConfigRefEndpointConfigReferencerequired#
A reference to a EndpointConfig resource.
executionRoleArnmay be undefinedstringexecution_role_arnmay be undefinedstrexecutionRoleArnmay be undefinedStringExecutionRoleArnmay be undefinedstringExecutionRoleArnmay be undefined*string#
The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf.
explainerConfigmay be undefinedIResolvable | CfnEndpointConfig.ExplainerConfigPropertyexplainer_configmay be undefinedtyping.Union[IResolvable, ExplainerConfigProperty]explainerConfigmay be undefinedIResolvableExplainerConfigmay be undefinedIResolvableExplainerConfigmay be undefinedinterface{}#
A parameter to activate explainers.
kmsKeyIdmay be undefinedstringkms_key_idmay be undefinedstrkmsKeyIdmay be undefinedStringKmsKeyIdmay be undefinedstringKmsKeyIdmay be undefined*string#
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.
logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*stringrequired#
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).

metricsConfigmay be undefinedIResolvable | CfnEndpointConfig.MetricsConfigPropertymetrics_configmay be undefinedtyping.Union[IResolvable, MetricsConfigProperty]metricsConfigmay be undefinedIResolvableMetricsConfigmay be undefinedIResolvableMetricsConfigmay be undefinedinterface{}#
Specifies the metrics that the endpoint publishes to Amazon CloudWatch, the frequency of publication, and whether to enable enhanced or detailed observability metrics.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
productionVariantsIResolvable | IResolvable | CfnEndpointConfig.ProductionVariantProperty[]production_variantstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProductionVariantProperty]]]productionVariantsIResolvableProductionVariantsIResolvableProductionVariantsinterface{}required#
A list of `ProductionVariant` objects, one for each model that you want to host at this endpoint.
refstringrefstrrefStringRefstringRef*stringrequired#
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 }).

shadowProductionVariantsmay be undefinedIResolvable | IResolvable | CfnEndpointConfig.ProductionVariantProperty[]shadow_production_variantsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProductionVariantProperty]]]shadowProductionVariantsmay be undefinedIResolvableShadowProductionVariantsmay be undefinedIResolvableShadowProductionVariantsmay be undefinedinterface{}#
Array of `ProductionVariant` objects.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this element is defined.

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

Tag Manager which manages the tags for this resource.
tagsRawmay be undefinedCfnTag[]tags_rawmay be undefinedtyping.List[CfnTag]tagsRawmay be undefinedList<CfnTag>TagsRawmay be undefinedCfnTag[]TagsRawmay be undefined*[]CfnTag#
A list of key-value pairs to apply to this resource.
vpcConfigmay be undefinedIResolvable | CfnEndpointConfig.VpcConfigPropertyvpc_configmay be undefinedtyping.Union[IResolvable, VpcConfigProperty]vpcConfigmay be undefinedIResolvableVpcConfigmay be undefinedIResolvableVpcConfigmay be undefinedinterface{}#
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to.

Methods ​

addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#
Syntactic sugar for `addOverride(path, undefined)`.
1 parameter

Parameters

  • pathpathpathpathPath — The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#
Use `addResourceDependency` instead.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#
Use `addResourceDependency` instead.
notes

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

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#
Add a value to the CloudFormation Resource Metadata.
addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#
Adds an override to the synthesized CloudFormation resource.
notes · 2 parameters

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,

typescript
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');

would add the overrides

json
"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

  • pathpathpathpathPath — - The path of the property, you can use dot notation to override values in complex types.
  • valuevaluevaluevalueValue — - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#
Adds an override that deletes the value of a property from the resource definition.
1 parameter

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#
Adds an override to a resource property.

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

2 parameters

Parameters

  • propertyPathproperty_pathpropertyPathpropertyPathPropertyPath — The path of the property.
  • valuevaluevaluevalueValue — The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
notes

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

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

1 parameter

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#
Sets the deletion policy of the resource based on the removal policy specified.
notes

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:

arnForEndpointConfig(resource: IEndpointConfigRef): string@staticmethod def arn_for_endpoint_config(resource: IEndpointConfigRef) -> strpublic static String arnForEndpointConfig(IEndpointConfigRef resource)public static string ArnForEndpointConfig(IEndpointConfigRef resource)func ArnForEndpointConfig(Resource IEndpointConfigRef) *stringstatic#
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#
getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#
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.

1 parameter

Parameters

  • attributeNameattribute_nameattributeNameattributeNameAttributeName — The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#
Retrieve a value value from the CloudFormation Resource Metadata.
inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#
Examines the CloudFormation resource and discloses attributes.
1 parameter

Parameters

  • inspectorinspectorinspectorinspectorInspector — tree inspector to collect and process attributes.
isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#
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.

returns

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

isCfnEndpointConfig(x: any): boolean@staticmethod def is_cfn_endpoint_config(x: Any) -> boolpublic static Boolean isCfnEndpointConfig(Object x)public static bool IsCfnEndpointConfig(object x)func IsCfnEndpointConfig(X interface{}) *boolstatic#
Checks whether the given object is a CfnEndpointConfig.
isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#
Check whether the given object is a CfnResource.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

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

  • xxxxX — Any object.

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

obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#
Retrieves an array of resources and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#
Overrides the auto-generated logical ID with a specific ID.
1 parameter

Parameters

  • newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId — The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#
Use `removeResourceDependency` instead

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

removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#
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.

replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#
Replaces one dependency with another.
2 parameters

Parameters

  • targettargettargettargetTarget — The dependency to replace.
  • newTargetnew_targetnewTargetnewTargetNewTarget — The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
returns

Returns: a string representation of this resource

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.