Class CfnModelProps
Properties for defining a CfnModel
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Sagemaker
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnModelProps : Object, ICfnModelProps
Syntax (vb)
Public Class CfnModelProps
Inherits Object
Implements ICfnModelProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-model.html
ExampleMetadata: fixture=_generated
Examples
// 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 environment;
var cfnModelProps = new CfnModelProps {
Containers = new [] { new ContainerDefinitionProperty {
ContainerHostname = "containerHostname",
Environment = environment,
Image = "image",
ImageConfig = new ImageConfigProperty {
RepositoryAccessMode = "repositoryAccessMode",
// the properties below are optional
RepositoryAuthConfig = new RepositoryAuthConfigProperty {
RepositoryCredentialsProviderArn = "repositoryCredentialsProviderArn"
}
},
InferenceSpecificationName = "inferenceSpecificationName",
Mode = "mode",
ModelDataSource = new ModelDataSourceProperty {
S3DataSource = new S3DataSourceProperty {
CompressionType = "compressionType",
S3DataType = "s3DataType",
S3Uri = "s3Uri",
// the properties below are optional
ModelAccessConfig = new ModelAccessConfigProperty {
AcceptEula = false
}
}
},
ModelDataUrl = "modelDataUrl",
ModelPackageName = "modelPackageName",
MultiModelConfig = new MultiModelConfigProperty {
ModelCacheSetting = "modelCacheSetting"
}
} },
EnableNetworkIsolation = false,
ExecutionRoleArn = "executionRoleArn",
InferenceExecutionConfig = new InferenceExecutionConfigProperty {
Mode = "mode"
},
ModelName = "modelName",
PrimaryContainer = new ContainerDefinitionProperty {
ContainerHostname = "containerHostname",
Environment = environment,
Image = "image",
ImageConfig = new ImageConfigProperty {
RepositoryAccessMode = "repositoryAccessMode",
// the properties below are optional
RepositoryAuthConfig = new RepositoryAuthConfigProperty {
RepositoryCredentialsProviderArn = "repositoryCredentialsProviderArn"
}
},
InferenceSpecificationName = "inferenceSpecificationName",
Mode = "mode",
ModelDataSource = new ModelDataSourceProperty {
S3DataSource = new S3DataSourceProperty {
CompressionType = "compressionType",
S3DataType = "s3DataType",
S3Uri = "s3Uri",
// the properties below are optional
ModelAccessConfig = new ModelAccessConfigProperty {
AcceptEula = false
}
}
},
ModelDataUrl = "modelDataUrl",
ModelPackageName = "modelPackageName",
MultiModelConfig = new MultiModelConfigProperty {
ModelCacheSetting = "modelCacheSetting"
}
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VpcConfig = new VpcConfigProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
Subnets = new [] { "subnets" }
}
};
Synopsis
Constructors
CfnModelProps() |
Properties
Containers | Specifies the containers in the inference pipeline. |
EnableNetworkIsolation | Isolates the model container. |
ExecutionRoleArn | 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. |
InferenceExecutionConfig | Specifies details of how containers in a multi-container endpoint are called. |
ModelName | The name of the new model. |
PrimaryContainer | 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. |
Tags | A list of key-value pairs to apply to this resource. |
VpcConfig | 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. |
Constructors
CfnModelProps()
public CfnModelProps()
Properties
Containers
Specifies the containers in the inference pipeline.
public object Containers { get; set; }
Property Value
System.Object
Remarks
EnableNetworkIsolation
Isolates the model container.
public object EnableNetworkIsolation { get; set; }
Property Value
System.Object
Remarks
No inbound or outbound network calls can be made to or from the model container.
ExecutionRoleArn
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.
public string ExecutionRoleArn { get; set; }
Property Value
System.String
Remarks
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:PassRole
permission.
InferenceExecutionConfig
Specifies details of how containers in a multi-container endpoint are called.
public object InferenceExecutionConfig { get; set; }
Property Value
System.Object
Remarks
ModelName
The name of the new model.
public string ModelName { get; set; }
Property Value
System.String
Remarks
PrimaryContainer
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.
public object PrimaryContainer { get; set; }
Property Value
System.Object
Remarks
Tags
A list of key-value pairs to apply to this resource.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
For more information, see Resource Tag and Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .
VpcConfig
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. VpcConfig
is 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 .
public object VpcConfig { get; set; }
Property Value
System.Object