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, IGrantable, IConnectable
Syntax (vb)
Public Class Model
Inherits Resource
Implements IModel, IResource, 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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Model(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Model(Construct, String, IModelProps) |
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. |
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(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Model(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Model(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Model(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Model(Construct, String, IModelProps)
public Model(Construct scope, string id, IModelProps props = null)
Parameters
- scope Constructs.Construct
- id System.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
System.String
Remarks
Stability: Experimental
Attribute: true
ModelName
(experimental) Returns the name of the model.
public virtual string ModelName { get; }
Property Value
System.String
Remarks
Stability: Experimental
Attribute: true
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 Constructs.Construct
the Construct scope.
- id System.String
the resource id.
- modelArn System.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 Constructs.Construct
the Construct scope.
- id System.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 Constructs.Construct
the Construct scope.
- id System.String
the resource id.
- modelName System.String
the name of the model.
Returns
Remarks
Stability: Experimental