1. Packages
  2. AWS Classic
  3. API Docs
  4. sagemaker
  5. NotebookInstanceLifecycleConfiguration

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.sagemaker.NotebookInstanceLifecycleConfiguration

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    Provides a lifecycle configuration for SageMaker Notebook Instances.

    Example Usage

    Usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as std from "@pulumi/std";
    
    const lc = new aws.sagemaker.NotebookInstanceLifecycleConfiguration("lc", {
        name: "foo",
        onCreate: std.base64encode({
            input: "echo foo",
        }).then(invoke => invoke.result),
        onStart: std.base64encode({
            input: "echo bar",
        }).then(invoke => invoke.result),
    });
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_std as std
    
    lc = aws.sagemaker.NotebookInstanceLifecycleConfiguration("lc",
        name="foo",
        on_create=std.base64encode(input="echo foo").result,
        on_start=std.base64encode(input="echo bar").result)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sagemaker"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
    			Input: "echo foo",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		invokeBase64encode1, err := std.Base64encode(ctx, &std.Base64encodeArgs{
    			Input: "echo bar",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = sagemaker.NewNotebookInstanceLifecycleConfiguration(ctx, "lc", &sagemaker.NotebookInstanceLifecycleConfigurationArgs{
    			Name:     pulumi.String("foo"),
    			OnCreate: invokeBase64encode.Result,
    			OnStart:  invokeBase64encode1.Result,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var lc = new Aws.Sagemaker.NotebookInstanceLifecycleConfiguration("lc", new()
        {
            Name = "foo",
            OnCreate = Std.Base64encode.Invoke(new()
            {
                Input = "echo foo",
            }).Apply(invoke => invoke.Result),
            OnStart = Std.Base64encode.Invoke(new()
            {
                Input = "echo bar",
            }).Apply(invoke => invoke.Result),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sagemaker.NotebookInstanceLifecycleConfiguration;
    import com.pulumi.aws.sagemaker.NotebookInstanceLifecycleConfigurationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var lc = new NotebookInstanceLifecycleConfiguration("lc", NotebookInstanceLifecycleConfigurationArgs.builder()        
                .name("foo")
                .onCreate(StdFunctions.base64encode(Base64encodeArgs.builder()
                    .input("echo foo")
                    .build()).result())
                .onStart(StdFunctions.base64encode(Base64encodeArgs.builder()
                    .input("echo bar")
                    .build()).result())
                .build());
    
        }
    }
    
    resources:
      lc:
        type: aws:sagemaker:NotebookInstanceLifecycleConfiguration
        properties:
          name: foo
          onCreate:
            fn::invoke:
              Function: std:base64encode
              Arguments:
                input: echo foo
              Return: result
          onStart:
            fn::invoke:
              Function: std:base64encode
              Arguments:
                input: echo bar
              Return: result
    

    Create NotebookInstanceLifecycleConfiguration Resource

    new NotebookInstanceLifecycleConfiguration(name: string, args?: NotebookInstanceLifecycleConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def NotebookInstanceLifecycleConfiguration(resource_name: str,
                                               opts: Optional[ResourceOptions] = None,
                                               name: Optional[str] = None,
                                               on_create: Optional[str] = None,
                                               on_start: Optional[str] = None)
    @overload
    def NotebookInstanceLifecycleConfiguration(resource_name: str,
                                               args: Optional[NotebookInstanceLifecycleConfigurationArgs] = None,
                                               opts: Optional[ResourceOptions] = None)
    func NewNotebookInstanceLifecycleConfiguration(ctx *Context, name string, args *NotebookInstanceLifecycleConfigurationArgs, opts ...ResourceOption) (*NotebookInstanceLifecycleConfiguration, error)
    public NotebookInstanceLifecycleConfiguration(string name, NotebookInstanceLifecycleConfigurationArgs? args = null, CustomResourceOptions? opts = null)
    public NotebookInstanceLifecycleConfiguration(String name, NotebookInstanceLifecycleConfigurationArgs args)
    public NotebookInstanceLifecycleConfiguration(String name, NotebookInstanceLifecycleConfigurationArgs args, CustomResourceOptions options)
    
    type: aws:sagemaker:NotebookInstanceLifecycleConfiguration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args NotebookInstanceLifecycleConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NotebookInstanceLifecycleConfigurationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NotebookInstanceLifecycleConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NotebookInstanceLifecycleConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NotebookInstanceLifecycleConfigurationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    NotebookInstanceLifecycleConfiguration Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NotebookInstanceLifecycleConfiguration resource accepts the following input properties:

    Name string
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    OnCreate string
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    OnStart string
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    Name string
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    OnCreate string
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    OnStart string
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    name String
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    onCreate String
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    onStart String
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    name string
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    onCreate string
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    onStart string
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    name str
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    on_create str
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    on_start str
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    name String
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    onCreate String
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    onStart String
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NotebookInstanceLifecycleConfiguration resource produces the following output properties:

    Arn string
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NotebookInstanceLifecycleConfiguration Resource

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

    public static get(name: string, id: Input<ID>, state?: NotebookInstanceLifecycleConfigurationState, opts?: CustomResourceOptions): NotebookInstanceLifecycleConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            name: Optional[str] = None,
            on_create: Optional[str] = None,
            on_start: Optional[str] = None) -> NotebookInstanceLifecycleConfiguration
    func GetNotebookInstanceLifecycleConfiguration(ctx *Context, name string, id IDInput, state *NotebookInstanceLifecycleConfigurationState, opts ...ResourceOption) (*NotebookInstanceLifecycleConfiguration, error)
    public static NotebookInstanceLifecycleConfiguration Get(string name, Input<string> id, NotebookInstanceLifecycleConfigurationState? state, CustomResourceOptions? opts = null)
    public static NotebookInstanceLifecycleConfiguration get(String name, Output<String> id, NotebookInstanceLifecycleConfigurationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    Name string
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    OnCreate string
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    OnStart string
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    Arn string
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    Name string
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    OnCreate string
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    OnStart string
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    arn String
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    name String
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    onCreate String
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    onStart String
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    arn string
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    name string
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    onCreate string
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    onStart string
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    arn str
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    name str
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    on_create str
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    on_start str
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.
    arn String
    The Amazon Resource Name (ARN) assigned by AWS to this lifecycle configuration.
    name String
    The name of the lifecycle configuration (must be unique). If omitted, this provider will assign a random, unique name.
    onCreate String
    A shell script (base64-encoded) that runs only once when the SageMaker Notebook Instance is created.
    onStart String
    A shell script (base64-encoded) that runs every time the SageMaker Notebook Instance is started including the time it's created.

    Import

    Using pulumi import, import models using the name. For example:

    $ pulumi import aws:sagemaker/notebookInstanceLifecycleConfiguration:NotebookInstanceLifecycleConfiguration lc foo
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi