Interface CfnModelProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnModelProps.Jsii$Proxy
CfnModel.
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.*;
Object environment;
CfnModelProps cfnModelProps = CfnModelProps.builder()
.containers(List.of(ContainerDefinitionProperty.builder()
.containerHostname("containerHostname")
.environment(environment)
.image("image")
.imageConfig(ImageConfigProperty.builder()
.repositoryAccessMode("repositoryAccessMode")
// the properties below are optional
.repositoryAuthConfig(RepositoryAuthConfigProperty.builder()
.repositoryCredentialsProviderArn("repositoryCredentialsProviderArn")
.build())
.build())
.inferenceSpecificationName("inferenceSpecificationName")
.mode("mode")
.modelDataSource(ModelDataSourceProperty.builder()
.s3DataSource(S3DataSourceProperty.builder()
.compressionType("compressionType")
.s3DataType("s3DataType")
.s3Uri("s3Uri")
// the properties below are optional
.hubAccessConfig(HubAccessConfigProperty.builder()
.hubContentArn("hubContentArn")
.build())
.modelAccessConfig(ModelAccessConfigProperty.builder()
.acceptEula(false)
.build())
.build())
.build())
.modelDataUrl("modelDataUrl")
.modelPackageName("modelPackageName")
.multiModelConfig(MultiModelConfigProperty.builder()
.modelCacheSetting("modelCacheSetting")
.build())
.build()))
.enableNetworkIsolation(false)
.executionRoleArn("executionRoleArn")
.inferenceExecutionConfig(InferenceExecutionConfigProperty.builder()
.mode("mode")
.build())
.modelName("modelName")
.primaryContainer(ContainerDefinitionProperty.builder()
.containerHostname("containerHostname")
.environment(environment)
.image("image")
.imageConfig(ImageConfigProperty.builder()
.repositoryAccessMode("repositoryAccessMode")
// the properties below are optional
.repositoryAuthConfig(RepositoryAuthConfigProperty.builder()
.repositoryCredentialsProviderArn("repositoryCredentialsProviderArn")
.build())
.build())
.inferenceSpecificationName("inferenceSpecificationName")
.mode("mode")
.modelDataSource(ModelDataSourceProperty.builder()
.s3DataSource(S3DataSourceProperty.builder()
.compressionType("compressionType")
.s3DataType("s3DataType")
.s3Uri("s3Uri")
// the properties below are optional
.hubAccessConfig(HubAccessConfigProperty.builder()
.hubContentArn("hubContentArn")
.build())
.modelAccessConfig(ModelAccessConfigProperty.builder()
.acceptEula(false)
.build())
.build())
.build())
.modelDataUrl("modelDataUrl")
.modelPackageName("modelPackageName")
.multiModelConfig(MultiModelConfigProperty.builder()
.modelCacheSetting("modelCacheSetting")
.build())
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.vpcConfig(VpcConfigProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnets(List.of("subnets"))
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnModelPropsstatic final classAn implementation forCfnModelProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnModelProps.Builderbuilder()default ObjectSpecifies the containers in the inference pipeline.default ObjectIsolates the model container.default StringThe Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs.default ObjectSpecifies details of how containers in a multi-container endpoint are called.default StringThe name of the new model.default ObjectThe location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.getTags()A list of key-value pairs to apply to this resource.default ObjectA VpcConfig object that specifies the VPC that you want your model to connect to.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContainers
Specifies the containers in the inference pipeline.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnModel.ContainerDefinitionProperty>- See Also:
-
getEnableNetworkIsolation
Isolates the model container.No inbound or outbound network calls can be made to or from the model container.
Returns union: either
BooleanorIResolvable- See Also:
-
getExecutionRoleArn
The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs.Deploying on ML compute instances is part of model hosting. For more information, see SageMaker Roles .
To be able to pass this role to SageMaker, the caller of this API must have the
iam:PassRolepermission.- See Also:
-
getInferenceExecutionConfig
Specifies details of how containers in a multi-container endpoint are called.Returns union: either
IResolvableorCfnModel.InferenceExecutionConfigProperty- See Also:
-
getModelName
The name of the new model.- See Also:
-
getPrimaryContainer
The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.Returns union: either
IResolvableorCfnModel.ContainerDefinitionProperty- See Also:
-
getTags
A list of key-value pairs to apply to this resource.For more information, see Resource Tag and Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .
- See Also:
-
getVpcConfig
A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC.VpcConfigis used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud .Returns union: either
IResolvableorCfnModel.VpcConfigProperty- See Also:
-
builder
- Returns:
- a
CfnModelProps.BuilderofCfnModelProps
-