Module sagemaker

@pulumi/aws > sagemaker

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.apply(assumeRole => assumeRole.json),
});

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

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. 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: string;
    environment: {[key: string]: any};
    image: string;
    modelDataUrl: string;
}[] | undefined>;

Specifies containers in the inference pipeline. If not specified, the primary_container 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, Terraform will assign a random, unique name.

property primaryContainer

public primaryContainer: pulumi.Output<{
    containerHostname: string;
    environment: {[key: string]: any};
    image: string;
    modelDataUrl: 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",
    },
});

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

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. 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 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.

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 primary_container 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, Terraform 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 primary_container 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, Terraform 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 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 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 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.