@aws-cdk_aws-sagemaker-alpha.EndpointConfig

class EndpointConfig (construct) ๐Ÿ”น

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

Implements IConstruct, IDependable, IResource, IEndpointConfig

Defines a SageMaker EndpointConfig.

Example

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

declare const modelA: sagemaker.Model;
declare const modelB: sagemaker.Model;

const endpointConfig = new sagemaker.EndpointConfig(this, 'EndpointConfig', {
  instanceProductionVariants: [
    {
      model: modelA,
      variantName: 'modelA',
      initialVariantWeight: 2.0,
    },
    {
      model: modelB,
      variantName: 'variantB',
      initialVariantWeight: 1.0,
    },
  ]
});

Initializer

new EndpointConfig(scope: Construct, id: string, props?: EndpointConfigProps)

Parameters

  • scope Construct
  • id string
  • props EndpointConfigProps

Construct Props

NameTypeDescription
encryptionKey?๐Ÿ”นIKeyOptional KMS encryption key associated with this stream.
endpointConfigName?๐Ÿ”นstringName of the endpoint configuration.
instanceProductionVariants?๐Ÿ”นInstanceProductionVariantProps[]A list of instance production variants.

encryptionKey?๐Ÿ”น

Type: IKey (optional, default: none)

Optional KMS encryption key associated with this stream.


endpointConfigName?๐Ÿ”น

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

Name of the endpoint configuration.


instanceProductionVariants?๐Ÿ”น

Type: InstanceProductionVariantProps[] (optional, default: none)

A list of instance production variants.

You can always add more variants later by calling EndpointConfig#addInstanceProductionVariant.

Properties

NameTypeDescription
endpointConfigArn๐Ÿ”นstringThe ARN of the endpoint configuration.
endpointConfigName๐Ÿ”นstringThe name of the endpoint configuration.
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.

endpointConfigArn๐Ÿ”น

Type: string

The ARN of the endpoint configuration.


endpointConfigName๐Ÿ”น

Type: string

The name of the endpoint configuration.


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.


node๐Ÿ”น

Type: Node

The tree node.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
addInstanceProductionVariant(props)๐Ÿ”นAdd production variant to the endpoint configuration.
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
toString()๐Ÿ”นReturns a string representation of this construct.
static fromEndpointConfigArn(scope, id, endpointConfigArn)๐Ÿ”นImports an EndpointConfig defined either outside the CDK or in a different CDK stack.
static fromEndpointConfigName(scope, id, endpointConfigName)๐Ÿ”นImports an EndpointConfig defined either outside the CDK or in a different CDK stack.

addInstanceProductionVariant(props)๐Ÿ”น

public addInstanceProductionVariant(props: InstanceProductionVariantProps): void

Parameters

  • props InstanceProductionVariantProps โ€” The properties of a production variant to add.

Add production variant to the endpoint configuration.


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


toString()๐Ÿ”น

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromEndpointConfigArn(scope, id, endpointConfigArn)๐Ÿ”น

public static fromEndpointConfigArn(scope: Construct, id: string, endpointConfigArn: string): IEndpointConfig

Parameters

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

Returns

  • IEndpointConfig

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


static fromEndpointConfigName(scope, id, endpointConfigName)๐Ÿ”น

public static fromEndpointConfigName(scope: Construct, id: string, endpointConfigName: string): IEndpointConfig

Parameters

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

Returns

  • IEndpointConfig

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