UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

328 lines (327 loc) • 16.1 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a SageMaker AI Notebook Instance resource. * * ## Example Usage * * ### Basic usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const ni = new aws.sagemaker.NotebookInstance("ni", { * name: "my-notebook-instance", * roleArn: role.arn, * instanceType: "ml.t2.medium", * tags: { * Name: "foo", * }, * }); * ``` * * ### Code repository usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.sagemaker.CodeRepository("example", { * codeRepositoryName: "my-notebook-instance-code-repo", * gitConfig: { * repositoryUrl: "https://github.com/github/docs.git", * }, * }); * const ni = new aws.sagemaker.NotebookInstance("ni", { * name: "my-notebook-instance", * roleArn: role.arn, * instanceType: "ml.t2.medium", * defaultCodeRepository: example.codeRepositoryName, * tags: { * Name: "foo", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import SageMaker AI Notebook Instances using the `name`. For example: * * ```sh * $ pulumi import aws:sagemaker/notebookInstance:NotebookInstance test_notebook_instance my-notebook-instance * ``` */ export declare class NotebookInstance extends pulumi.CustomResource { /** * Get an existing NotebookInstance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NotebookInstanceState, opts?: pulumi.CustomResourceOptions): NotebookInstance; /** * 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. */ static isInstance(obj: any): obj is NotebookInstance; /** * An array of up to three Git repositories to associate with the notebook instance. * These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. */ readonly additionalCodeRepositories: pulumi.Output<string[] | undefined>; /** * The Amazon Resource Name (ARN) assigned by AWS to this notebook instance. */ readonly arn: pulumi.Output<string>; /** * The Git repository associated with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository. */ readonly defaultCodeRepository: 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 AI training and endpoint services unless your configure a NAT Gateway in your VPC. */ readonly directInternetAccess: pulumi.Output<string | undefined>; /** * Information on the IMDS configuration of the notebook instance. Conflicts with `instanceMetadataServiceConfiguration`. see details below. */ readonly instanceMetadataServiceConfiguration: pulumi.Output<outputs.sagemaker.NotebookInstanceInstanceMetadataServiceConfiguration | undefined>; /** * The name of ML compute instance type. */ readonly instanceType: pulumi.Output<string>; /** * The AWS Key Management Service (AWS KMS) key that Amazon SageMaker AI uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. */ readonly kmsKeyId: pulumi.Output<string | undefined>; /** * The name of a lifecycle configuration to associate with the notebook instance. */ readonly lifecycleConfigName: pulumi.Output<string | undefined>; /** * The name of the notebook instance (must be unique). */ readonly name: pulumi.Output<string>; /** * The network interface ID that Amazon SageMaker AI created at the time of creating the instance. Only available when setting `subnetId`. */ readonly networkInterfaceId: pulumi.Output<string>; /** * The platform identifier of the notebook instance runtime environment. This value can be either `notebook-al1-v1`, `notebook-al2-v1`, `notebook-al2-v2`, or `notebook-al2-v3`, depending on which version of Amazon Linux you require. */ readonly platformIdentifier: pulumi.Output<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * The ARN of the IAM role to be used by the notebook instance which allows SageMaker AI to call other services on your behalf. */ readonly roleArn: pulumi.Output<string>; /** * Whether root access is `Enabled` or `Disabled` for users of the notebook instance. The default value is `Enabled`. */ readonly rootAccess: pulumi.Output<string | undefined>; /** * The associated security groups. */ readonly securityGroups: pulumi.Output<string[]>; /** * The VPC subnet ID. */ readonly subnetId: pulumi.Output<string | undefined>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * The URL that you use to connect to the Jupyter notebook that is running in your notebook instance. */ readonly url: pulumi.Output<string>; /** * The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. */ readonly volumeSize: pulumi.Output<number | undefined>; /** * Create a NotebookInstance resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: NotebookInstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NotebookInstance resources. */ export interface NotebookInstanceState { /** * An array of up to three Git repositories to associate with the notebook instance. * These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. */ additionalCodeRepositories?: pulumi.Input<pulumi.Input<string>[]>; /** * The Amazon Resource Name (ARN) assigned by AWS to this notebook instance. */ arn?: pulumi.Input<string>; /** * The Git repository associated with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository. */ defaultCodeRepository?: 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 AI training and endpoint services unless your configure a NAT Gateway in your VPC. */ directInternetAccess?: pulumi.Input<string>; /** * Information on the IMDS configuration of the notebook instance. Conflicts with `instanceMetadataServiceConfiguration`. see details below. */ instanceMetadataServiceConfiguration?: pulumi.Input<inputs.sagemaker.NotebookInstanceInstanceMetadataServiceConfiguration>; /** * The name of ML compute instance type. */ instanceType?: pulumi.Input<string>; /** * The AWS Key Management Service (AWS KMS) key that Amazon SageMaker AI uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. */ kmsKeyId?: pulumi.Input<string>; /** * The name of a lifecycle configuration to associate with the notebook instance. */ lifecycleConfigName?: pulumi.Input<string>; /** * The name of the notebook instance (must be unique). */ name?: pulumi.Input<string>; /** * The network interface ID that Amazon SageMaker AI created at the time of creating the instance. Only available when setting `subnetId`. */ networkInterfaceId?: pulumi.Input<string>; /** * The platform identifier of the notebook instance runtime environment. This value can be either `notebook-al1-v1`, `notebook-al2-v1`, `notebook-al2-v2`, or `notebook-al2-v3`, depending on which version of Amazon Linux you require. */ platformIdentifier?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * The ARN of the IAM role to be used by the notebook instance which allows SageMaker AI to call other services on your behalf. */ roleArn?: pulumi.Input<string>; /** * Whether root access is `Enabled` or `Disabled` for users of the notebook instance. The default value is `Enabled`. */ rootAccess?: pulumi.Input<string>; /** * The associated security groups. */ securityGroups?: pulumi.Input<pulumi.Input<string>[]>; /** * The VPC subnet ID. */ subnetId?: pulumi.Input<string>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The URL that you use to connect to the Jupyter notebook that is running in your notebook instance. */ url?: pulumi.Input<string>; /** * The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. */ volumeSize?: pulumi.Input<number>; } /** * The set of arguments for constructing a NotebookInstance resource. */ export interface NotebookInstanceArgs { /** * An array of up to three Git repositories to associate with the notebook instance. * These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. */ additionalCodeRepositories?: pulumi.Input<pulumi.Input<string>[]>; /** * The Git repository associated with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or in any other Git repository. */ defaultCodeRepository?: 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 AI training and endpoint services unless your configure a NAT Gateway in your VPC. */ directInternetAccess?: pulumi.Input<string>; /** * Information on the IMDS configuration of the notebook instance. Conflicts with `instanceMetadataServiceConfiguration`. see details below. */ instanceMetadataServiceConfiguration?: pulumi.Input<inputs.sagemaker.NotebookInstanceInstanceMetadataServiceConfiguration>; /** * The name of ML compute instance type. */ instanceType: pulumi.Input<string>; /** * The AWS Key Management Service (AWS KMS) key that Amazon SageMaker AI uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. */ kmsKeyId?: pulumi.Input<string>; /** * The name of a lifecycle configuration to associate with the notebook instance. */ lifecycleConfigName?: pulumi.Input<string>; /** * The name of the notebook instance (must be unique). */ name?: pulumi.Input<string>; /** * The platform identifier of the notebook instance runtime environment. This value can be either `notebook-al1-v1`, `notebook-al2-v1`, `notebook-al2-v2`, or `notebook-al2-v3`, depending on which version of Amazon Linux you require. */ platformIdentifier?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * The ARN of the IAM role to be used by the notebook instance which allows SageMaker AI to call other services on your behalf. */ roleArn: pulumi.Input<string>; /** * Whether root access is `Enabled` or `Disabled` for users of the notebook instance. The default value is `Enabled`. */ rootAccess?: pulumi.Input<string>; /** * The associated security groups. */ securityGroups?: pulumi.Input<pulumi.Input<string>[]>; /** * The VPC subnet ID. */ subnetId?: pulumi.Input<string>; /** * A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. */ volumeSize?: pulumi.Input<number>; }