@aws-cdk_aws-sagemaker-alpha.Endpoint

class Endpoint (construct) ๐Ÿ”น

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

Implements IConstruct, IDependable, IResource, IEndpoint

Defines a SageMaker endpoint.

Example

import * as sagemaker from '@aws-cdk/aws-sagemaker-alpha';

declare const endpointConfig: sagemaker.EndpointConfig;

const endpoint = new sagemaker.Endpoint(this, 'Endpoint', { endpointConfig });
const productionVariant = endpoint.findInstanceProductionVariant('my-variant');
productionVariant.metricModelLatency().createAlarm(this, 'ModelLatencyAlarm', {
  threshold: 100000,
  evaluationPeriods: 3,
});

Initializer

new Endpoint(scope: Construct, id: string, props: EndpointProps)

Parameters

  • scope Construct
  • id string
  • props EndpointProps

Construct Props

NameTypeDescription
endpointConfig๐Ÿ”นIEndpointConfigThe endpoint configuration to use for this endpoint.
endpointName?๐Ÿ”นstringName of the endpoint.

endpointConfig๐Ÿ”น

Type: IEndpointConfig

The endpoint configuration to use for this endpoint.


endpointName?๐Ÿ”น

Type: string (optional, default: AWS CloudFormation generates a unique physical ID and uses that ID for the endpoint's name.)

Name of the endpoint.

Properties

NameTypeDescription
endpointArn๐Ÿ”นstringThe ARN of the endpoint.
endpointName๐Ÿ”นstringThe name of the endpoint.
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
instanceProductionVariants๐Ÿ”นIEndpointInstanceProductionVariant[]Get instance production variants associated with endpoint.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.

endpointArn๐Ÿ”น

Type: string

The ARN of the endpoint.


endpointName๐Ÿ”น

Type: string

The name of the endpoint.


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.


instanceProductionVariants๐Ÿ”น

Type: IEndpointInstanceProductionVariant[]

Get instance production variants associated with endpoint.


node๐Ÿ”น

Type: Node

The tree node.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
findInstanceProductionVariant(name)๐Ÿ”นFind instance production variant based on variant name.
grantInvoke(grantee)๐Ÿ”นPermits an IAM principal to invoke this endpoint.
toString()๐Ÿ”นReturns a string representation of this construct.
static fromEndpointArn(scope, id, endpointArn)๐Ÿ”นImports an Endpoint defined either outside the CDK or in a different CDK stack.
static fromEndpointAttributes(scope, id, attrs)๐Ÿ”นImports an Endpoint defined either outside the CDK or in a different CDK stack.
static fromEndpointName(scope, id, endpointName)๐Ÿ”นImports an Endpoint defined either outside the CDK or in a different CDK stack.

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).


findInstanceProductionVariant(name)๐Ÿ”น

public findInstanceProductionVariant(name: string): IEndpointInstanceProductionVariant

Parameters

  • name string โ€” Variant name from production variant.

Returns

  • IEndpointInstanceProductionVariant

Find instance production variant based on variant name.


grantInvoke(grantee)๐Ÿ”น

public grantInvoke(grantee: IGrantable): Grant

Parameters

  • grantee IGrantable โ€” The principal to grant access to.

Returns

  • Grant

Permits an IAM principal to invoke this endpoint.


toString()๐Ÿ”น

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromEndpointArn(scope, id, endpointArn)๐Ÿ”น

public static fromEndpointArn(scope: Construct, id: string, endpointArn: string): IEndpoint

Parameters

  • scope Construct โ€” the Construct scope.
  • id string โ€” the resource id.
  • endpointArn string โ€” the ARN of the endpoint.

Returns

  • IEndpoint

Imports an Endpoint defined either outside the CDK or in a different CDK stack.


static fromEndpointAttributes(scope, id, attrs)๐Ÿ”น

public static fromEndpointAttributes(scope: Construct, id: string, attrs: EndpointAttributes): IEndpoint

Parameters

  • scope Construct โ€” the Construct scope.
  • id string โ€” the resource id.
  • attrs EndpointAttributes โ€” the attributes of the endpoint to import.

Returns

  • IEndpoint

Imports an Endpoint defined either outside the CDK or in a different CDK stack.


static fromEndpointName(scope, id, endpointName)๐Ÿ”น

public static fromEndpointName(scope: Construct, id: string, endpointName: string): IEndpoint

Parameters

  • scope Construct โ€” the Construct scope.
  • id string โ€” the resource id.
  • endpointName string โ€” the name of the endpoint.

Returns

  • IEndpoint

Imports an Endpoint defined either outside the CDK or in a different CDK stack.