Class CfnEndpointConfig

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:35.180Z") @Stability(Stable) public class CfnEndpointConfig extends CfnResource implements IInspectable
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 .

Example:

 // 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()
                 .initialVariantWeight(123)
                 .modelName("modelName")
                 .variantName("variantName")
                 // the properties below are optional
                 .acceleratorType("acceleratorType")
                 .containerStartupHealthCheckTimeoutInSeconds(123)
                 .enableSsmAccess(false)
                 .initialInstanceCount(123)
                 .instanceType("instanceType")
                 .modelDataDownloadTimeoutInSeconds(123)
                 .serverlessConfig(ServerlessConfigProperty.builder()
                         .maxConcurrency(123)
                         .memorySizeInMb(123)
                         // the properties below are optional
                         .provisionedConcurrency(123)
                         .build())
                 .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())
         .endpointConfigName("endpointConfigName")
         .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")
         .shadowProductionVariants(List.of(ProductionVariantProperty.builder()
                 .initialVariantWeight(123)
                 .modelName("modelName")
                 .variantName("variantName")
                 // the properties below are optional
                 .acceleratorType("acceleratorType")
                 .containerStartupHealthCheckTimeoutInSeconds(123)
                 .enableSsmAccess(false)
                 .initialInstanceCount(123)
                 .instanceType("instanceType")
                 .modelDataDownloadTimeoutInSeconds(123)
                 .serverlessConfig(ServerlessConfigProperty.builder()
                         .maxConcurrency(123)
                         .memorySizeInMb(123)
                         // the properties below are optional
                         .provisionedConcurrency(123)
                         .build())
                 .volumeSizeInGb(123)
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnEndpointConfig

      protected CfnEndpointConfig(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnEndpointConfig

      protected CfnEndpointConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnEndpointConfig

      @Stability(Stable) public CfnEndpointConfig(@NotNull Construct scope, @NotNull String id, @NotNull CfnEndpointConfigProps props)
      Create a new AWS::SageMaker::EndpointConfig.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrEndpointConfigName

      @Stability(Stable) @NotNull public String getAttrEndpointConfigName()
      The name of the endpoint configuration, such as MyEndpointConfiguration .
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      A list of key-value pairs to apply to this resource.

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

    • getProductionVariants

      @Stability(Stable) @NotNull public Object getProductionVariants()
      A list of ProductionVariant objects, one for each model that you want to host at this endpoint.
    • setProductionVariants

      @Stability(Stable) public void setProductionVariants(@NotNull IResolvable value)
      A list of ProductionVariant objects, one for each model that you want to host at this endpoint.
    • setProductionVariants

      @Stability(Stable) public void setProductionVariants(@NotNull List<Object> value)
      A list of ProductionVariant objects, one for each model that you want to host at this endpoint.
    • getAsyncInferenceConfig

      @Stability(Stable) @Nullable public Object getAsyncInferenceConfig()
      Specifies configuration for how an endpoint performs asynchronous inference.
    • setAsyncInferenceConfig

      @Stability(Stable) public void setAsyncInferenceConfig(@Nullable IResolvable value)
      Specifies configuration for how an endpoint performs asynchronous inference.
    • setAsyncInferenceConfig

      @Stability(Stable) public void setAsyncInferenceConfig(@Nullable CfnEndpointConfig.AsyncInferenceConfigProperty value)
      Specifies configuration for how an endpoint performs asynchronous inference.
    • getDataCaptureConfig

      @Stability(Stable) @Nullable public Object getDataCaptureConfig()
      Specifies how to capture endpoint data for model monitor.

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

    • setDataCaptureConfig

      @Stability(Stable) public void setDataCaptureConfig(@Nullable IResolvable value)
      Specifies how to capture endpoint data for model monitor.

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

    • setDataCaptureConfig

      @Stability(Stable) public void setDataCaptureConfig(@Nullable CfnEndpointConfig.DataCaptureConfigProperty value)
      Specifies how to capture endpoint data for model monitor.

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

    • getEndpointConfigName

      @Stability(Stable) @Nullable public String getEndpointConfigName()
      The name of the endpoint configuration.
    • setEndpointConfigName

      @Stability(Stable) public void setEndpointConfigName(@Nullable String value)
      The name of the endpoint configuration.
    • getExplainerConfig

      @Stability(Stable) @Nullable public Object getExplainerConfig()
      AWS::SageMaker::EndpointConfig.ExplainerConfig.
    • setExplainerConfig

      @Stability(Stable) public void setExplainerConfig(@Nullable IResolvable value)
      AWS::SageMaker::EndpointConfig.ExplainerConfig.
    • setExplainerConfig

      @Stability(Stable) public void setExplainerConfig(@Nullable CfnEndpointConfig.ExplainerConfigProperty value)
      AWS::SageMaker::EndpointConfig.ExplainerConfig.
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      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

      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 .

    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      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

      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 .

    • getShadowProductionVariants

      @Stability(Stable) @Nullable public Object getShadowProductionVariants()
      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 .

    • setShadowProductionVariants

      @Stability(Stable) public void setShadowProductionVariants(@Nullable IResolvable value)
      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 .

    • setShadowProductionVariants

      @Stability(Stable) public void setShadowProductionVariants(@Nullable List<Object> value)
      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 .