Module sagemaker

@pulumi/aws > sagemaker

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

class Endpoint

extends CustomResource

Provides a SageMaker Endpoint resource.

Example Usage

Basic usage:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const endpoint = new aws.sagemaker.Endpoint("e", {
    endpointConfigName: aws_sagemaker_endpoint_configuration_ec.name,
    tags: {
        Name: "foo",
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/sagemaker_endpoint.html.markdown.

constructor

new Endpoint(name: string, args: EndpointArgs, opts?: pulumi.CustomResourceOptions)

Create a Endpoint resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: EndpointState, opts?: pulumi.CustomResourceOptions): Endpoint

Get an existing Endpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Endpoint. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The Amazon Resource Name (ARN) assigned by AWS to this endpoint.

property endpointConfigName

public endpointConfigName: pulumi.Output<string>;

The name of the endpoint configuration to use.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the endpoint. If omitted, this provider will assign a random, unique name.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class EndpointConfiguration

extends CustomResource

Provides a SageMaker endpoint configuration resource.

Example Usage

Basic usage:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const ec = new aws.sagemaker.EndpointConfiguration("ec", {
    productionVariants: [{
        initialInstanceCount: 1,
        instanceType: "ml.t2.medium",
        modelName: aws_sagemaker_model_m.name,
        variantName: "variant-1",
    }],
    tags: {
        Name: "foo",
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/sagemaker_endpoint_configuration.html.markdown.

constructor

new EndpointConfiguration(name: string, args: EndpointConfigurationArgs, opts?: pulumi.CustomResourceOptions)

Create a EndpointConfiguration resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: EndpointConfigurationState, opts?: pulumi.CustomResourceOptions): EndpointConfiguration

Get an existing EndpointConfiguration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of EndpointConfiguration. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The Amazon Resource Name (ARN) assigned by AWS to this endpoint configuration.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property kmsKeyArn

public kmsKeyArn: pulumi.Output<string | undefined>;

Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.

property name

public name: pulumi.Output<string>;

The name of the endpoint configuration. If omitted, this provider will assign a random, unique name.

property productionVariants

public productionVariants: pulumi.Output<{
    acceleratorType: undefined | string;
    initialInstanceCount: number;
    initialVariantWeight: undefined | number;
    instanceType: string;
    modelName: string;
    variantName: string;
}[]>;

Fields are documented below.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class Model

extends CustomResource

Provides a SageMaker model resource.

Example Usage

Basic usage:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const model = new aws.sagemaker.Model("m", {
    executionRoleArn: aws_iam_role_foo.arn,
    primaryContainer: {
        image: "174872318107.dkr.ecr.us-west-2.amazonaws.com/kmeans:1",
    },
});
const assumeRole = pulumi.output(aws.iam.getPolicyDocument({
    statements: [{
        actions: ["sts:AssumeRole"],
        principals: [{
            identifiers: ["sagemaker.amazonaws.com"],
            type: "Service",
        }],
    }],
}));
const role = new aws.iam.Role("r", {
    assumeRolePolicy: assumeRole.json,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/sagemaker_model.html.markdown.

constructor

new Model(name: string, args: ModelArgs, opts?: pulumi.CustomResourceOptions)

Create a Model resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ModelState, opts?: pulumi.CustomResourceOptions): Model

Get an existing Model resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Model. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The Amazon Resource Name (ARN) assigned by AWS to this model.

property containers

public containers: pulumi.Output<{
    containerHostname: undefined | string;
    environment: undefined | {[key: string]: any};
    image: string;
    modelDataUrl: undefined | string;
}[] | undefined>;

Specifies containers in the inference pipeline. If not specified, the primaryContainer argument is required. Fields are documented below.

property enableNetworkIsolation

public enableNetworkIsolation: pulumi.Output<boolean | undefined>;

Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

property executionRoleArn

public executionRoleArn: pulumi.Output<string>;

A role that SageMaker can assume to access model artifacts and docker images for deployment.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the model (must be unique). If omitted, this provider will assign a random, unique name.

property primaryContainer

public primaryContainer: pulumi.Output<{
    containerHostname: undefined | string;
    environment: undefined | {[key: string]: any};
    image: string;
    modelDataUrl: undefined | string;
} | undefined>;

The primary docker image containing inference code that is used when the model is deployed for predictions. If not specified, the container argument is required. Fields are documented below.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property vpcConfig

public vpcConfig: pulumi.Output<{
    securityGroupIds: string[];
    subnets: string[];
} | undefined>;

Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.

class NotebookInstance

extends CustomResource

Provides a Sagemaker Notebook Instance resource.

Example Usage

Basic usage:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const ni = new aws.sagemaker.NotebookInstance("ni", {
    instanceType: "ml.t2.medium",
    roleArn: aws_iam_role_role.arn,
    tags: {
        Name: "foo",
    },
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/sagemaker_notebook_instance.html.markdown.

constructor

new NotebookInstance(name: string, args: NotebookInstanceArgs, opts?: pulumi.CustomResourceOptions)

Create a NotebookInstance resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NotebookInstanceState, opts?: pulumi.CustomResourceOptions): NotebookInstance

Get an existing NotebookInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of NotebookInstance. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instanceType

public instanceType: pulumi.Output<string>;

The name of ML compute instance type.

property kmsKeyId

public kmsKeyId: pulumi.Output<string | undefined>;

The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

property lifecycleConfigName

public lifecycleConfigName: pulumi.Output<string | undefined>;

The name of a lifecycle configuration to associate with the notebook instance.

property name

public name: pulumi.Output<string>;

The name of the notebook instance (must be unique).

property roleArn

public roleArn: pulumi.Output<string>;

The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.

property securityGroups

public securityGroups: pulumi.Output<string[]>;

The associated security groups.

property subnetId

public subnetId: pulumi.Output<string | undefined>;

The VPC subnet ID.

property tags

public tags: pulumi.Output<{[key: string]: any} | undefined>;

A mapping of tags to assign to the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class NotebookInstanceLifecycleConfiguration

extends CustomResource

Provides a lifecycle configuration for SageMaker Notebook Instances.

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/sagemaker_notebook_instance_lifecycle_configuration.html.markdown.

constructor

new NotebookInstanceLifecycleConfiguration(name: string, args?: NotebookInstanceLifecycleConfigurationArgs, opts?: pulumi.CustomResourceOptions)

Create a NotebookInstanceLifecycleConfiguration resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NotebookInstanceLifecycleConfigurationState, opts?: pulumi.CustomResourceOptions): NotebookInstanceLifecycleConfiguration

Get an existing NotebookInstanceLifecycleConfiguration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of NotebookInstanceLifecycleConfiguration. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property arn

public arn: pulumi.Output<string>;

The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.

property onCreate

public onCreate: pulumi.Output<string | undefined>;

A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.

property onStart

public onStart: pulumi.Output<string | undefined>;

A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it’s created.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface EndpointArgs

The set of arguments for constructing a Endpoint resource.

property endpointConfigName

endpointConfigName: pulumi.Input<string>;

The name of the endpoint configuration to use.

property name

name?: pulumi.Input<string>;

The name of the endpoint. If omitted, this provider will assign a random, unique name.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface EndpointConfigurationArgs

The set of arguments for constructing a EndpointConfiguration resource.

property kmsKeyArn

kmsKeyArn?: pulumi.Input<string>;

Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.

property name

name?: pulumi.Input<string>;

The name of the endpoint configuration. If omitted, this provider will assign a random, unique name.

property productionVariants

productionVariants: pulumi.Input<pulumi.Input<{
    acceleratorType: pulumi.Input<string>;
    initialInstanceCount: pulumi.Input<number>;
    initialVariantWeight: pulumi.Input<number>;
    instanceType: pulumi.Input<string>;
    modelName: pulumi.Input<string>;
    variantName: pulumi.Input<string>;
}>[]>;

Fields are documented below.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface EndpointConfigurationState

Input properties used for looking up and filtering EndpointConfiguration resources.

property arn

arn?: pulumi.Input<string>;

The Amazon Resource Name (ARN) assigned by AWS to this endpoint configuration.

property kmsKeyArn

kmsKeyArn?: pulumi.Input<string>;

Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.

property name

name?: pulumi.Input<string>;

The name of the endpoint configuration. If omitted, this provider will assign a random, unique name.

property productionVariants

productionVariants?: pulumi.Input<pulumi.Input<{
    acceleratorType: pulumi.Input<string>;
    initialInstanceCount: pulumi.Input<number>;
    initialVariantWeight: pulumi.Input<number>;
    instanceType: pulumi.Input<string>;
    modelName: pulumi.Input<string>;
    variantName: pulumi.Input<string>;
}>[]>;

Fields are documented below.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface EndpointState

Input properties used for looking up and filtering Endpoint resources.

property arn

arn?: pulumi.Input<string>;

The Amazon Resource Name (ARN) assigned by AWS to this endpoint.

property endpointConfigName

endpointConfigName?: pulumi.Input<string>;

The name of the endpoint configuration to use.

property name

name?: pulumi.Input<string>;

The name of the endpoint. If omitted, this provider will assign a random, unique name.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface ModelArgs

The set of arguments for constructing a Model resource.

property containers

containers?: pulumi.Input<pulumi.Input<{
    containerHostname: pulumi.Input<string>;
    environment: pulumi.Input<{[key: string]: any}>;
    image: pulumi.Input<string>;
    modelDataUrl: pulumi.Input<string>;
}>[]>;

Specifies containers in the inference pipeline. If not specified, the primaryContainer argument is required. Fields are documented below.

property enableNetworkIsolation

enableNetworkIsolation?: pulumi.Input<boolean>;

Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

property executionRoleArn

executionRoleArn: pulumi.Input<string>;

A role that SageMaker can assume to access model artifacts and docker images for deployment.

property name

name?: pulumi.Input<string>;

The name of the model (must be unique). If omitted, this provider will assign a random, unique name.

property primaryContainer

primaryContainer?: pulumi.Input<{
    containerHostname: pulumi.Input<string>;
    environment: pulumi.Input<{[key: string]: any}>;
    image: pulumi.Input<string>;
    modelDataUrl: pulumi.Input<string>;
}>;

The primary docker image containing inference code that is used when the model is deployed for predictions. If not specified, the container argument is required. Fields are documented below.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property vpcConfig

vpcConfig?: pulumi.Input<{
    securityGroupIds: pulumi.Input<pulumi.Input<string>[]>;
    subnets: pulumi.Input<pulumi.Input<string>[]>;
}>;

Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.

interface ModelState

Input properties used for looking up and filtering Model resources.

property arn

arn?: pulumi.Input<string>;

The Amazon Resource Name (ARN) assigned by AWS to this model.

property containers

containers?: pulumi.Input<pulumi.Input<{
    containerHostname: pulumi.Input<string>;
    environment: pulumi.Input<{[key: string]: any}>;
    image: pulumi.Input<string>;
    modelDataUrl: pulumi.Input<string>;
}>[]>;

Specifies containers in the inference pipeline. If not specified, the primaryContainer argument is required. Fields are documented below.

property enableNetworkIsolation

enableNetworkIsolation?: pulumi.Input<boolean>;

Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

property executionRoleArn

executionRoleArn?: pulumi.Input<string>;

A role that SageMaker can assume to access model artifacts and docker images for deployment.

property name

name?: pulumi.Input<string>;

The name of the model (must be unique). If omitted, this provider will assign a random, unique name.

property primaryContainer

primaryContainer?: pulumi.Input<{
    containerHostname: pulumi.Input<string>;
    environment: pulumi.Input<{[key: string]: any}>;
    image: pulumi.Input<string>;
    modelDataUrl: pulumi.Input<string>;
}>;

The primary docker image containing inference code that is used when the model is deployed for predictions. If not specified, the container argument is required. Fields are documented below.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

property vpcConfig

vpcConfig?: pulumi.Input<{
    securityGroupIds: pulumi.Input<pulumi.Input<string>[]>;
    subnets: pulumi.Input<pulumi.Input<string>[]>;
}>;

Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.

interface NotebookInstanceArgs

The set of arguments for constructing a NotebookInstance resource.

property instanceType

instanceType: pulumi.Input<string>;

The name of ML compute instance type.

property kmsKeyId

kmsKeyId?: pulumi.Input<string>;

The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

property lifecycleConfigName

lifecycleConfigName?: pulumi.Input<string>;

The name of a lifecycle configuration to associate with the notebook instance.

property name

name?: pulumi.Input<string>;

The name of the notebook instance (must be unique).

property roleArn

roleArn: pulumi.Input<string>;

The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.

property securityGroups

securityGroups?: pulumi.Input<pulumi.Input<string>[]>;

The associated security groups.

property subnetId

subnetId?: pulumi.Input<string>;

The VPC subnet ID.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.

interface NotebookInstanceLifecycleConfigurationArgs

The set of arguments for constructing a NotebookInstanceLifecycleConfiguration resource.

property name

name?: pulumi.Input<string>;

The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.

property onCreate

onCreate?: pulumi.Input<string>;

A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.

property onStart

onStart?: pulumi.Input<string>;

A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it’s created.

interface NotebookInstanceLifecycleConfigurationState

Input properties used for looking up and filtering NotebookInstanceLifecycleConfiguration resources.

property arn

arn?: pulumi.Input<string>;

The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.

property name

name?: pulumi.Input<string>;

The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.

property onCreate

onCreate?: pulumi.Input<string>;

A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.

property onStart

onStart?: pulumi.Input<string>;

A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it’s created.

interface NotebookInstanceState

Input properties used for looking up and filtering NotebookInstance resources.

property arn

arn?: pulumi.Input<string>;

The Amazon Resource Name (ARN) assigned by AWS to this notebook instance.

property instanceType

instanceType?: pulumi.Input<string>;

The name of ML compute instance type.

property kmsKeyId

kmsKeyId?: pulumi.Input<string>;

The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

property lifecycleConfigName

lifecycleConfigName?: pulumi.Input<string>;

The name of a lifecycle configuration to associate with the notebook instance.

property name

name?: pulumi.Input<string>;

The name of the notebook instance (must be unique).

property roleArn

roleArn?: pulumi.Input<string>;

The ARN of the IAM role to be used by the notebook instance which allows SageMaker to call other services on your behalf.

property securityGroups

securityGroups?: pulumi.Input<pulumi.Input<string>[]>;

The associated security groups.

property subnetId

subnetId?: pulumi.Input<string>;

The VPC subnet ID.

property tags

tags?: pulumi.Input<{[key: string]: any}>;

A mapping of tags to assign to the resource.