@aws-cdk_aws-sagemaker-alpha.IModel

interface IModel ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Sagemaker.Alpha.IModel
Gogithub.com/aws/aws-cdk-go/awscdksagemakeralpha/v2#IModel
Javasoftware.amazon.awscdk.services.sagemaker.alpha.IModel
Pythonaws_cdk.aws_sagemaker_alpha.IModel
TypeScript (source)@aws-cdk/aws-sagemaker-alpha ยป IModel

Implemented by Model

Obtainable from Model.fromModelArn(), Model.fromModelAttributes(), Model.fromModelName()

Interface that defines a Model resource.

Properties

NameTypeDescription
connections๐Ÿ”นConnectionsThe network connections associated with this resource.
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
grantPrincipal๐Ÿ”นIPrincipalThe principal to grant permissions to.
modelArn๐Ÿ”นstringReturns the ARN of this model.
modelName๐Ÿ”นstringReturns the name of this model.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.
role?๐Ÿ”นIRoleThe IAM role associated with this Model.

connections๐Ÿ”น

Type: Connections

The network connections associated with this resource.


env๐Ÿ”น

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


grantPrincipal๐Ÿ”น

Type: IPrincipal

The principal to grant permissions to.


modelArn๐Ÿ”น

Type: string

Returns the ARN of this model.


modelName๐Ÿ”น

Type: string

Returns the name of this model.


node๐Ÿ”น

Type: Node

The tree node.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.


role?๐Ÿ”น

Type: IRole (optional)

The IAM role associated with this Model.

Methods

NameDescription
addToRolePolicy(statement)๐Ÿ”นAdds a statement to the IAM role assumed by the instance.
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.

addToRolePolicy(statement)๐Ÿ”น

public addToRolePolicy(statement: PolicyStatement): void

Parameters

  • statement PolicyStatement

Adds a statement to the IAM role assumed by the instance.


applyRemovalPolicy(policy)๐Ÿ”น

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).