EnvironmentArgs

data class EnvironmentArgs(val containerImage: Output<EnvironmentContainerImageArgs>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val postStartupScript: Output<String>? = null, val project: Output<String>? = null, val vmImage: Output<EnvironmentVmImageArgs>? = null) : ConvertibleToJava<EnvironmentArgs>

A Cloud AI Platform Notebook environment. To get more information about Environment, see:

Example Usage

Notebook Environment Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const environment = new gcp.notebooks.Environment("environment", {
name: "notebooks-environment",
location: "us-west1-a",
containerImage: {
repository: "gcr.io/deeplearning-platform-release/base-cpu",
},
});
import pulumi
import pulumi_gcp as gcp
environment = gcp.notebooks.Environment("environment",
name="notebooks-environment",
location="us-west1-a",
container_image={
"repository": "gcr.io/deeplearning-platform-release/base-cpu",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var environment = new Gcp.Notebooks.Environment("environment", new()
{
Name = "notebooks-environment",
Location = "us-west1-a",
ContainerImage = new Gcp.Notebooks.Inputs.EnvironmentContainerImageArgs
{
Repository = "gcr.io/deeplearning-platform-release/base-cpu",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/notebooks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := notebooks.NewEnvironment(ctx, "environment", &notebooks.EnvironmentArgs{
Name: pulumi.String("notebooks-environment"),
Location: pulumi.String("us-west1-a"),
ContainerImage: &notebooks.EnvironmentContainerImageArgs{
Repository: pulumi.String("gcr.io/deeplearning-platform-release/base-cpu"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.notebooks.Environment;
import com.pulumi.gcp.notebooks.EnvironmentArgs;
import com.pulumi.gcp.notebooks.inputs.EnvironmentContainerImageArgs;
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 environment = new Environment("environment", EnvironmentArgs.builder()
.name("notebooks-environment")
.location("us-west1-a")
.containerImage(EnvironmentContainerImageArgs.builder()
.repository("gcr.io/deeplearning-platform-release/base-cpu")
.build())
.build());
}
}
resources:
environment:
type: gcp:notebooks:Environment
properties:
name: notebooks-environment
location: us-west1-a
containerImage:
repository: gcr.io/deeplearning-platform-release/base-cpu

Import

Environment can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/environments/{{name}}

  • {{project}}/{{location}}/{{name}}

  • {{location}}/{{name}} When using the pulumi import command, Environment can be imported using one of the formats above. For example:

$ pulumi import gcp:notebooks/environment:Environment default projects/{{project}}/locations/{{location}}/environments/{{name}}
$ pulumi import gcp:notebooks/environment:Environment default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:notebooks/environment:Environment default {{location}}/{{name}}

Constructors

Link copied to clipboard
constructor(containerImage: Output<EnvironmentContainerImageArgs>? = null, description: Output<String>? = null, displayName: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, postStartupScript: Output<String>? = null, project: Output<String>? = null, vmImage: Output<EnvironmentVmImageArgs>? = null)

Properties

Link copied to clipboard

Use a container image to start the notebook instance. Structure is documented below.

Link copied to clipboard
val description: Output<String>? = null

A brief description of this environment.

Link copied to clipboard
val displayName: Output<String>? = null

Display name of this environment for the UI.

Link copied to clipboard
val location: Output<String>? = null

A reference to the zone where the machine resides.

Link copied to clipboard
val name: Output<String>? = null

The name specified for the Environment instance. Format: projects/{project_id}/locations/{location}/environments/{environmentId}

Link copied to clipboard
val postStartupScript: Output<String>? = null

Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path. Example: "gs://path-to-file/file-name"

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val vmImage: Output<EnvironmentVmImageArgs>? = null

Use a Compute Engine VM image to start the notebook instance. Structure is documented below.

Functions

Link copied to clipboard
open override fun toJava(): EnvironmentArgs