Class CfnEndpointConfig
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConfigures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference.static interfaceSpecifies configuration for how an endpoint performs asynchronous inference.static interfaceSpecifies the configuration for notifications of inference results for asynchronous inference.static interfaceSpecifies the configuration for asynchronous inference invocation outputs.static final classA fluent builder forCfnEndpointConfig.static interfaceSpecifies the JSON and CSV content types of the data that the endpoint captures.static interfaceSpecifies whether the endpoint captures input data or output data.static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceExample:static interfaceSpecifies the configuration of your endpoint for model monitor data capture.static interfaceExample:static interfaceSpecifies a model that you want to host and the resources to deploy for hosting it.static interfaceSpecifies the serverless configuration for an endpoint variant.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnEndpointConfig(Construct scope, String id, CfnEndpointConfigProps props) Create a newAWS::SageMaker::EndpointConfig.protectedCfnEndpointConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnEndpointConfig(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionSpecifies configuration for how an endpoint performs asynchronous inference.The name of the endpoint configuration, such asMyEndpointConfiguration.Specifies how to capture endpoint data for model monitor.The name of the endpoint configuration.AWS::SageMaker::EndpointConfig.ExplainerConfig.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.A list ofProductionVariantobjects, one for each model that you want to host at this endpoint.Array ofProductionVariantobjects.getTags()A list of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidSpecifies configuration for how an endpoint performs asynchronous inference.voidSpecifies configuration for how an endpoint performs asynchronous inference.voidsetDataCaptureConfig(IResolvable value) Specifies how to capture endpoint data for model monitor.voidSpecifies how to capture endpoint data for model monitor.voidsetEndpointConfigName(String value) The name of the endpoint configuration.voidsetExplainerConfig(IResolvable value) AWS::SageMaker::EndpointConfig.ExplainerConfig.voidAWS::SageMaker::EndpointConfig.ExplainerConfig.voidsetKmsKeyId(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.voidsetProductionVariants(List<Object> value) A list ofProductionVariantobjects, one for each model that you want to host at this endpoint.voidsetProductionVariants(IResolvable value) A list ofProductionVariantobjects, one for each model that you want to host at this endpoint.voidsetShadowProductionVariants(List<Object> value) Array ofProductionVariantobjects.voidArray ofProductionVariantobjects.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 newAWS::SageMaker::EndpointConfig.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrEndpointConfigName
The name of the endpoint configuration, such asMyEndpointConfiguration. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
A list of key-value pairs to apply to this resource.For more information, see Resource Tag and Using Cost Allocation Tags .
-
getProductionVariants
A list ofProductionVariantobjects, one for each model that you want to host at this endpoint. -
setProductionVariants
A list ofProductionVariantobjects, one for each model that you want to host at this endpoint. -
setProductionVariants
A list ofProductionVariantobjects, one for each model that you want to host at this endpoint. -
getAsyncInferenceConfig
Specifies configuration for how an endpoint performs asynchronous inference. -
setAsyncInferenceConfig
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
Specifies how to capture endpoint data for model monitor.The data capture configuration applies to all production variants hosted at the endpoint.
-
setDataCaptureConfig
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
The name of the endpoint configuration. -
setEndpointConfigName
The name of the endpoint configuration. -
getExplainerConfig
AWS::SageMaker::EndpointConfig.ExplainerConfig. -
setExplainerConfig
AWS::SageMaker::EndpointConfig.ExplainerConfig. -
setExplainerConfig
@Stability(Stable) public void setExplainerConfig(@Nullable CfnEndpointConfig.ExplainerConfigProperty value) AWS::SageMaker::EndpointConfig.ExplainerConfig. -
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,UpdateEndpointrequests. For more information, refer to the AWS Key Management Service section Using Key Policies in AWS KMSCertain 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
KmsKeyIdwhen using an instance type with local storage. If any of the models that you specify in theProductionVariantsparameter use nitro-based instances with local storage, do not specify a value for theKmsKeyIdparameter. If you specify a value forKmsKeyIdwhen using any nitro-based instances with local storage, the call toCreateEndpointConfigfails.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 .
- Key ID:
-
setKmsKeyId
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,UpdateEndpointrequests. For more information, refer to the AWS Key Management Service section Using Key Policies in AWS KMSCertain 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
KmsKeyIdwhen using an instance type with local storage. If any of the models that you specify in theProductionVariantsparameter use nitro-based instances with local storage, do not specify a value for theKmsKeyIdparameter. If you specify a value forKmsKeyIdwhen using any nitro-based instances with local storage, the call toCreateEndpointConfigfails.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 .
- Key ID:
-
getShadowProductionVariants
Array ofProductionVariantobjects.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 forProductionVariantsand one variant forShadowProductionVariants. -
setShadowProductionVariants
Array ofProductionVariantobjects.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 forProductionVariantsand one variant forShadowProductionVariants. -
setShadowProductionVariants
Array ofProductionVariantobjects.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 forProductionVariantsand one variant forShadowProductionVariants.
-