Module sagemaker
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
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-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
Others
- EndpointArgs
- EndpointConfigurationArgs
- EndpointConfigurationState
- EndpointState
- ModelArgs
- ModelState
- NotebookInstanceArgs
- NotebookInstanceLifecycleConfigurationArgs
- NotebookInstanceLifecycleConfigurationState
- NotebookInstanceState
Resources
Resource Endpoint
class Endpoint extends CustomResourceProvides a SageMaker Endpoint resource.
Example 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",
},
});constructor
new Endpoint(name: string, args: EndpointArgs, opts?: pulumi.CustomResourceOptions)Create a Endpoint resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): EndpointGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is EndpointReturns 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.
Resource EndpointConfiguration
class EndpointConfiguration extends CustomResourceProvides a SageMaker endpoint configuration resource.
Example 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",
},
});constructor
new EndpointConfiguration(name: string, args: EndpointConfigurationArgs, opts?: pulumi.CustomResourceOptions)Create a EndpointConfiguration resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): EndpointConfigurationGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is EndpointConfigurationReturns 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<EndpointConfigurationProductionVariant[]>;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.
Resource Model
class Model extends CustomResourceProvides a SageMaker model resource.
Example 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",
}],
}],
}, { async: true }));
const role = new aws.iam.Role("r", {
assumeRolePolicy: assumeRole.json,
});constructor
new Model(name: string, args: ModelArgs, opts?: pulumi.CustomResourceOptions)Create a Model resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): ModelGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is ModelReturns 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<ModelContainer[] | 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<ModelPrimaryContainer | 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 map 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<ModelVpcConfig | undefined>;Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.
Resource NotebookInstance
class NotebookInstance extends CustomResourceProvides a Sagemaker Notebook Instance resource.
Example 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.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): NotebookInstanceGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is NotebookInstanceReturns 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 directInternetAccess
public directInternetAccess: pulumi.Output<string | undefined>;Set to Disabled to disable internet access to notebook. Requires securityGroups and subnetId to be set. Supported values: Enabled (Default) or Disabled. If set to Disabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.
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 map 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.
Resource NotebookInstanceLifecycleConfiguration
class NotebookInstanceLifecycleConfiguration extends CustomResourceProvides a lifecycle configuration for SageMaker Notebook Instances.
constructor
new NotebookInstanceLifecycleConfiguration(name: string, args?: NotebookInstanceLifecycleConfigurationArgs, opts?: pulumi.CustomResourceOptions)Create a NotebookInstanceLifecycleConfiguration resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): NotebookInstanceLifecycleConfigurationGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is NotebookInstanceLifecycleConfigurationReturns 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.
Others
interface EndpointArgs
interface EndpointArgsThe 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
interface EndpointConfigurationArgsThe 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<EndpointConfigurationProductionVariant>[]>;Fields are documented below.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
interface EndpointConfigurationState
interface EndpointConfigurationStateInput 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<EndpointConfigurationProductionVariant>[]>;Fields are documented below.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A mapping of tags to assign to the resource.
interface EndpointState
interface EndpointStateInput 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
interface ModelArgsThe set of arguments for constructing a Model resource.
property containers
containers?: pulumi.Input<pulumi.Input<ModelContainer>[]>;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<ModelPrimaryContainer>;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 map of tags to assign to the resource.
property vpcConfig
vpcConfig?: pulumi.Input<ModelVpcConfig>;Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.
interface ModelState
interface ModelStateInput 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<ModelContainer>[]>;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<ModelPrimaryContainer>;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 map of tags to assign to the resource.
property vpcConfig
vpcConfig?: pulumi.Input<ModelVpcConfig>;Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.
interface NotebookInstanceArgs
interface NotebookInstanceArgsThe set of arguments for constructing a NotebookInstance resource.
property directInternetAccess
directInternetAccess?: pulumi.Input<string>;Set to Disabled to disable internet access to notebook. Requires securityGroups and subnetId to be set. Supported values: Enabled (Default) or Disabled. If set to Disabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.
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 map of tags to assign to the resource.
interface NotebookInstanceLifecycleConfigurationArgs
interface NotebookInstanceLifecycleConfigurationArgsThe 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
interface NotebookInstanceLifecycleConfigurationStateInput 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
interface NotebookInstanceStateInput 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 directInternetAccess
directInternetAccess?: pulumi.Input<string>;Set to Disabled to disable internet access to notebook. Requires securityGroups and subnetId to be set. Supported values: Enabled (Default) or Disabled. If set to Disabled, the notebook instance will be able to access resources only in your VPC, and will not be able to connect to Amazon SageMaker training and endpoint services unless your configure a NAT Gateway in your VPC.
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 map of tags to assign to the resource.