Class Model
(experimental) Defines a SageMaker Model.
Inherited Members
Namespace: Amazon.CDK.AWS.Sagemaker.Alpha
Assembly: Amazon.CDK.AWS.Sagemaker.Alpha.dll
Syntax (csharp)
public class Model : Resource, IModel, IResource, IConstruct, IDependable, IGrantable, IConnectable
Syntax (vb)
Public Class Model Inherits Resource Implements IModel, IResource, IConstruct, IDependable, IGrantable, IConnectable
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Sagemaker.Alpha;
ContainerImage image;
ModelData modelData;
var model = new Model(this, "ContainerModel", new ModelProps {
Containers = new [] { new ContainerDefinition {
Image = image,
ModelData = modelData
} },
NetworkIsolation = true
});
Synopsis
Constructors
Model(Construct, string, IModelProps?) | (experimental) Defines a SageMaker Model. |
Properties
Connections | (experimental) An accessor for the Connections object that will fail if this Model does not have a VPC configured. |
GrantPrincipal | (experimental) The principal this Model is running as. |
ModelArn | (experimental) Returns the ARN of this model. |
ModelName | (experimental) Returns the name of the model. |
PROPERTY_INJECTION_ID | (experimental) Uniquely identifies this class. |
Role | (experimental) Execution role for SageMaker Model. |
Methods
AddContainer(IContainerDefinition) | (experimental) Add containers to the model. |
AddToRolePolicy(PolicyStatement) | (experimental) Adds a statement to the IAM role assumed by the instance. |
FromModelArn(Construct, string, string) | (experimental) Imports a Model defined either outside the CDK or in a different CDK stack. |
FromModelAttributes(Construct, string, IModelAttributes) | (experimental) Imports a Model defined either outside the CDK or in a different CDK stack. |
FromModelName(Construct, string, string) | (experimental) Imports a Model defined either outside the CDK or in a different CDK stack. |
Constructors
Model(Construct, string, IModelProps?)
(experimental) Defines a SageMaker Model.
public Model(Construct scope, string id, IModelProps? props = null)
Parameters
- scope Construct
- id string
- props IModelProps
Remarks
Stability: Experimental
Properties
Connections
(experimental) An accessor for the Connections object that will fail if this Model does not have a VPC configured.
public virtual Connections_ Connections { get; }
Property Value
Remarks
Stability: Experimental
GrantPrincipal
(experimental) The principal this Model is running as.
public virtual IPrincipal GrantPrincipal { get; }
Property Value
Remarks
Stability: Experimental
ModelArn
(experimental) Returns the ARN of this model.
public virtual string ModelArn { get; }
Property Value
Remarks
Stability: Experimental
Attribute: true
ModelName
(experimental) Returns the name of the model.
public virtual string ModelName { get; }
Property Value
Remarks
Stability: Experimental
Attribute: true
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Stability: Experimental
Role
(experimental) Execution role for SageMaker Model.
public virtual IRole? Role { get; }
Property Value
Remarks
Stability: Experimental
Methods
AddContainer(IContainerDefinition)
(experimental) Add containers to the model.
public virtual void AddContainer(IContainerDefinition container)
Parameters
- container IContainerDefinition
The container definition to add.
Remarks
Stability: Experimental
AddToRolePolicy(PolicyStatement)
(experimental) Adds a statement to the IAM role assumed by the instance.
public virtual void AddToRolePolicy(PolicyStatement statement)
Parameters
- statement PolicyStatement
Remarks
Stability: Experimental
FromModelArn(Construct, string, string)
(experimental) Imports a Model defined either outside the CDK or in a different CDK stack.
public static IModel FromModelArn(Construct scope, string id, string modelArn)
Parameters
- scope Construct
the Construct scope.
- id string
the resource id.
- modelArn string
the ARN of the model.
Returns
Remarks
Stability: Experimental
FromModelAttributes(Construct, string, IModelAttributes)
(experimental) Imports a Model defined either outside the CDK or in a different CDK stack.
public static IModel FromModelAttributes(Construct scope, string id, IModelAttributes attrs)
Parameters
- scope Construct
the Construct scope.
- id string
the resource id.
- attrs IModelAttributes
the attributes of the model to import.
Returns
Remarks
Stability: Experimental
FromModelName(Construct, string, string)
(experimental) Imports a Model defined either outside the CDK or in a different CDK stack.
public static IModel FromModelName(Construct scope, string id, string modelName)
Parameters
- scope Construct
the Construct scope.
- id string
the resource id.
- modelName string
the name of the model.
Returns
Remarks
Stability: Experimental