Interface ICfnModelProps
Properties for defining a CfnModel
.
Namespace: Amazon.CDK.AWS.Sagemaker
Assembly: Amazon.CDK.AWS.Sagemaker.dll
Syntax (csharp)
public interface ICfnModelProps
Syntax (vb)
Public Interface ICfnModelProps
Remarks
Link: 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;
CfnModelProps cfnModelProps = new CfnModelProps {
ExecutionRoleArn = "executionRoleArn",
// the properties below are optional
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",
ModelDataUrl = "modelDataUrl",
ModelPackageName = "modelPackageName",
MultiModelConfig = new MultiModelConfigProperty {
ModelCacheSetting = "modelCacheSetting"
}
} },
EnableNetworkIsolation = false,
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",
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
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. |
Properties
Containers
Specifies the containers in the inference pipeline.
virtual object Containers { get; }
Property Value
System.Object
Remarks
EnableNetworkIsolation
Isolates the model container.
virtual object EnableNetworkIsolation { get; }
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.
string ExecutionRoleArn { get; }
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.
virtual object InferenceExecutionConfig { get; }
Property Value
System.Object
Remarks
ModelName
The name of the new model.
virtual string ModelName { get; }
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.
virtual object PrimaryContainer { get; }
Property Value
System.Object
Remarks
Tags
A list of key-value pairs to apply to this resource.
virtual ICfnTag[] Tags { get; }
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 .
virtual object VpcConfig { get; }
Property Value
System.Object