1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. colab
  5. Schedule
Google Cloud v8.25.1 published on Wednesday, Apr 9, 2025 by Pulumi

gcp.colab.Schedule

Explore with Pulumi AI

‘Colab Enterprise Notebook Execution Schedules.’

To get more information about Schedule, see:

Example Usage

Colab Schedule Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myRuntimeTemplate = new gcp.colab.RuntimeTemplate("my_runtime_template", {
    name: "runtime-template",
    displayName: "Runtime template",
    location: "us-central1",
    machineSpec: {
        machineType: "e2-standard-4",
    },
    networkSpec: {
        enableInternetAccess: true,
    },
});
const outputBucket = new gcp.storage.Bucket("output_bucket", {
    name: "my_bucket",
    location: "US",
    forceDestroy: true,
    uniformBucketLevelAccess: true,
});
const notebook = new gcp.storage.BucketObject("notebook", {
    name: "hello_world.ipynb",
    bucket: outputBucket.name,
    content: `    {
      "cells": [
        {
          "cell_type": "code",
          "execution_count": null,
          "metadata": {},
          "outputs": [],
          "source": [
            "print(\\"Hello, World!\\")"
          ]
        }
      ],
      "metadata": {
        "kernelspec": {
          "display_name": "Python 3",
          "language": "python",
          "name": "python3"
        },
        "language_info": {
          "codemirror_mode": {
            "name": "ipython",
            "version": 3
          },
          "file_extension": ".py",
          "mimetype": "text/x-python",
          "name": "python",
          "nbconvert_exporter": "python",
          "pygments_lexer": "ipython3",
          "version": "3.8.5"
        }
      },
      "nbformat": 4,
      "nbformat_minor": 4
    }
`,
});
const schedule = new gcp.colab.Schedule("schedule", {
    displayName: "basic-schedule",
    location: "us-west1",
    maxConcurrentRunCount: "2",
    cron: "TZ=America/Los_Angeles * * * * *",
    createNotebookExecutionJobRequest: {
        notebookExecutionJob: {
            displayName: "Notebook execution",
            gcsNotebookSource: {
                uri: pulumi.interpolate`gs://${notebook.bucket}/${notebook.name}`,
                generation: notebook.generation,
            },
            notebookRuntimeTemplateResourceName: pulumi.interpolate`projects/${myRuntimeTemplate.project}/locations/${myRuntimeTemplate.location}/notebookRuntimeTemplates/${myRuntimeTemplate.name}`,
            gcsOutputUri: pulumi.interpolate`gs://${outputBucket.name}`,
            serviceAccount: "my@service-account.com",
        },
    },
}, {
    dependsOn: [
        myRuntimeTemplate,
        outputBucket,
    ],
});
Copy
import pulumi
import pulumi_gcp as gcp

my_runtime_template = gcp.colab.RuntimeTemplate("my_runtime_template",
    name="runtime-template",
    display_name="Runtime template",
    location="us-central1",
    machine_spec={
        "machine_type": "e2-standard-4",
    },
    network_spec={
        "enable_internet_access": True,
    })
output_bucket = gcp.storage.Bucket("output_bucket",
    name="my_bucket",
    location="US",
    force_destroy=True,
    uniform_bucket_level_access=True)
notebook = gcp.storage.BucketObject("notebook",
    name="hello_world.ipynb",
    bucket=output_bucket.name,
    content="""    {
      "cells": [
        {
          "cell_type": "code",
          "execution_count": null,
          "metadata": {},
          "outputs": [],
          "source": [
            "print(\"Hello, World!\")"
          ]
        }
      ],
      "metadata": {
        "kernelspec": {
          "display_name": "Python 3",
          "language": "python",
          "name": "python3"
        },
        "language_info": {
          "codemirror_mode": {
            "name": "ipython",
            "version": 3
          },
          "file_extension": ".py",
          "mimetype": "text/x-python",
          "name": "python",
          "nbconvert_exporter": "python",
          "pygments_lexer": "ipython3",
          "version": "3.8.5"
        }
      },
      "nbformat": 4,
      "nbformat_minor": 4
    }
""")
schedule = gcp.colab.Schedule("schedule",
    display_name="basic-schedule",
    location="us-west1",
    max_concurrent_run_count="2",
    cron="TZ=America/Los_Angeles * * * * *",
    create_notebook_execution_job_request={
        "notebook_execution_job": {
            "display_name": "Notebook execution",
            "gcs_notebook_source": {
                "uri": pulumi.Output.all(
                    bucket=notebook.bucket,
                    name=notebook.name
).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucket']}/{resolved_outputs['name']}")
,
                "generation": notebook.generation,
            },
            "notebook_runtime_template_resource_name": pulumi.Output.all(
                project=my_runtime_template.project,
                location=my_runtime_template.location,
                name=my_runtime_template.name
).apply(lambda resolved_outputs: f"projects/{resolved_outputs['project']}/locations/{resolved_outputs['location']}/notebookRuntimeTemplates/{resolved_outputs['name']}")
,
            "gcs_output_uri": output_bucket.name.apply(lambda name: f"gs://{name}"),
            "service_account": "my@service-account.com",
        },
    },
    opts = pulumi.ResourceOptions(depends_on=[
            my_runtime_template,
            output_bucket,
        ]))
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/colab"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myRuntimeTemplate, err := colab.NewRuntimeTemplate(ctx, "my_runtime_template", &colab.RuntimeTemplateArgs{
			Name:        pulumi.String("runtime-template"),
			DisplayName: pulumi.String("Runtime template"),
			Location:    pulumi.String("us-central1"),
			MachineSpec: &colab.RuntimeTemplateMachineSpecArgs{
				MachineType: pulumi.String("e2-standard-4"),
			},
			NetworkSpec: &colab.RuntimeTemplateNetworkSpecArgs{
				EnableInternetAccess: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		outputBucket, err := storage.NewBucket(ctx, "output_bucket", &storage.BucketArgs{
			Name:                     pulumi.String("my_bucket"),
			Location:                 pulumi.String("US"),
			ForceDestroy:             pulumi.Bool(true),
			UniformBucketLevelAccess: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		notebook, err := storage.NewBucketObject(ctx, "notebook", &storage.BucketObjectArgs{
			Name:   pulumi.String("hello_world.ipynb"),
			Bucket: outputBucket.Name,
			Content: pulumi.String(`    {
      "cells": [
        {
          "cell_type": "code",
          "execution_count": null,
          "metadata": {},
          "outputs": [],
          "source": [
            "print(\"Hello, World!\")"
          ]
        }
      ],
      "metadata": {
        "kernelspec": {
          "display_name": "Python 3",
          "language": "python",
          "name": "python3"
        },
        "language_info": {
          "codemirror_mode": {
            "name": "ipython",
            "version": 3
          },
          "file_extension": ".py",
          "mimetype": "text/x-python",
          "name": "python",
          "nbconvert_exporter": "python",
          "pygments_lexer": "ipython3",
          "version": "3.8.5"
        }
      },
      "nbformat": 4,
      "nbformat_minor": 4
    }
`),
		})
		if err != nil {
			return err
		}
		_, err = colab.NewSchedule(ctx, "schedule", &colab.ScheduleArgs{
			DisplayName:           pulumi.String("basic-schedule"),
			Location:              pulumi.String("us-west1"),
			MaxConcurrentRunCount: pulumi.String("2"),
			Cron:                  pulumi.String("TZ=America/Los_Angeles * * * * *"),
			CreateNotebookExecutionJobRequest: &colab.ScheduleCreateNotebookExecutionJobRequestArgs{
				NotebookExecutionJob: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs{
					DisplayName: pulumi.String("Notebook execution"),
					GcsNotebookSource: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs{
						Uri: pulumi.All(notebook.Bucket, notebook.Name).ApplyT(func(_args []interface{}) (string, error) {
							bucket := _args[0].(string)
							name := _args[1].(string)
							return fmt.Sprintf("gs://%v/%v", bucket, name), nil
						}).(pulumi.StringOutput),
						Generation: notebook.Generation,
					},
					NotebookRuntimeTemplateResourceName: pulumi.All(myRuntimeTemplate.Project, myRuntimeTemplate.Location, myRuntimeTemplate.Name).ApplyT(func(_args []interface{}) (string, error) {
						project := _args[0].(string)
						location := _args[1].(string)
						name := _args[2].(string)
						return fmt.Sprintf("projects/%v/locations/%v/notebookRuntimeTemplates/%v", project, location, name), nil
					}).(pulumi.StringOutput),
					GcsOutputUri: outputBucket.Name.ApplyT(func(name string) (string, error) {
						return fmt.Sprintf("gs://%v", name), nil
					}).(pulumi.StringOutput),
					ServiceAccount: pulumi.String("my@service-account.com"),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			myRuntimeTemplate,
			outputBucket,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var myRuntimeTemplate = new Gcp.Colab.RuntimeTemplate("my_runtime_template", new()
    {
        Name = "runtime-template",
        DisplayName = "Runtime template",
        Location = "us-central1",
        MachineSpec = new Gcp.Colab.Inputs.RuntimeTemplateMachineSpecArgs
        {
            MachineType = "e2-standard-4",
        },
        NetworkSpec = new Gcp.Colab.Inputs.RuntimeTemplateNetworkSpecArgs
        {
            EnableInternetAccess = true,
        },
    });

    var outputBucket = new Gcp.Storage.Bucket("output_bucket", new()
    {
        Name = "my_bucket",
        Location = "US",
        ForceDestroy = true,
        UniformBucketLevelAccess = true,
    });

    var notebook = new Gcp.Storage.BucketObject("notebook", new()
    {
        Name = "hello_world.ipynb",
        Bucket = outputBucket.Name,
        Content = @"    {
      ""cells"": [
        {
          ""cell_type"": ""code"",
          ""execution_count"": null,
          ""metadata"": {},
          ""outputs"": [],
          ""source"": [
            ""print(\""Hello, World!\"")""
          ]
        }
      ],
      ""metadata"": {
        ""kernelspec"": {
          ""display_name"": ""Python 3"",
          ""language"": ""python"",
          ""name"": ""python3""
        },
        ""language_info"": {
          ""codemirror_mode"": {
            ""name"": ""ipython"",
            ""version"": 3
          },
          ""file_extension"": "".py"",
          ""mimetype"": ""text/x-python"",
          ""name"": ""python"",
          ""nbconvert_exporter"": ""python"",
          ""pygments_lexer"": ""ipython3"",
          ""version"": ""3.8.5""
        }
      },
      ""nbformat"": 4,
      ""nbformat_minor"": 4
    }
",
    });

    var schedule = new Gcp.Colab.Schedule("schedule", new()
    {
        DisplayName = "basic-schedule",
        Location = "us-west1",
        MaxConcurrentRunCount = "2",
        Cron = "TZ=America/Los_Angeles * * * * *",
        CreateNotebookExecutionJobRequest = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestArgs
        {
            NotebookExecutionJob = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs
            {
                DisplayName = "Notebook execution",
                GcsNotebookSource = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs
                {
                    Uri = Output.Tuple(notebook.Bucket, notebook.Name).Apply(values =>
                    {
                        var bucket = values.Item1;
                        var name = values.Item2;
                        return $"gs://{bucket}/{name}";
                    }),
                    Generation = notebook.Generation,
                },
                NotebookRuntimeTemplateResourceName = Output.Tuple(myRuntimeTemplate.Project, myRuntimeTemplate.Location, myRuntimeTemplate.Name).Apply(values =>
                {
                    var project = values.Item1;
                    var location = values.Item2;
                    var name = values.Item3;
                    return $"projects/{project}/locations/{location}/notebookRuntimeTemplates/{name}";
                }),
                GcsOutputUri = outputBucket.Name.Apply(name => $"gs://{name}"),
                ServiceAccount = "my@service-account.com",
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            myRuntimeTemplate,
            outputBucket,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.colab.RuntimeTemplate;
import com.pulumi.gcp.colab.RuntimeTemplateArgs;
import com.pulumi.gcp.colab.inputs.RuntimeTemplateMachineSpecArgs;
import com.pulumi.gcp.colab.inputs.RuntimeTemplateNetworkSpecArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.colab.Schedule;
import com.pulumi.gcp.colab.ScheduleArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs;
import com.pulumi.resources.CustomResourceOptions;
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 myRuntimeTemplate = new RuntimeTemplate("myRuntimeTemplate", RuntimeTemplateArgs.builder()
            .name("runtime-template")
            .displayName("Runtime template")
            .location("us-central1")
            .machineSpec(RuntimeTemplateMachineSpecArgs.builder()
                .machineType("e2-standard-4")
                .build())
            .networkSpec(RuntimeTemplateNetworkSpecArgs.builder()
                .enableInternetAccess(true)
                .build())
            .build());

        var outputBucket = new Bucket("outputBucket", BucketArgs.builder()
            .name("my_bucket")
            .location("US")
            .forceDestroy(true)
            .uniformBucketLevelAccess(true)
            .build());

        var notebook = new BucketObject("notebook", BucketObjectArgs.builder()
            .name("hello_world.ipynb")
            .bucket(outputBucket.name())
            .content("""
    {
      "cells": [
        {
          "cell_type": "code",
          "execution_count": null,
          "metadata": {},
          "outputs": [],
          "source": [
            "print(\"Hello, World!\")"
          ]
        }
      ],
      "metadata": {
        "kernelspec": {
          "display_name": "Python 3",
          "language": "python",
          "name": "python3"
        },
        "language_info": {
          "codemirror_mode": {
            "name": "ipython",
            "version": 3
          },
          "file_extension": ".py",
          "mimetype": "text/x-python",
          "name": "python",
          "nbconvert_exporter": "python",
          "pygments_lexer": "ipython3",
          "version": "3.8.5"
        }
      },
      "nbformat": 4,
      "nbformat_minor": 4
    }
            """)
            .build());

        var schedule = new Schedule("schedule", ScheduleArgs.builder()
            .displayName("basic-schedule")
            .location("us-west1")
            .maxConcurrentRunCount("2")
            .cron("TZ=America/Los_Angeles * * * * *")
            .createNotebookExecutionJobRequest(ScheduleCreateNotebookExecutionJobRequestArgs.builder()
                .notebookExecutionJob(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs.builder()
                    .displayName("Notebook execution")
                    .gcsNotebookSource(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs.builder()
                        .uri(Output.tuple(notebook.bucket(), notebook.name()).applyValue(values -> {
                            var bucket = values.t1;
                            var name = values.t2;
                            return String.format("gs://%s/%s", bucket,name);
                        }))
                        .generation(notebook.generation())
                        .build())
                    .notebookRuntimeTemplateResourceName(Output.tuple(myRuntimeTemplate.project(), myRuntimeTemplate.location(), myRuntimeTemplate.name()).applyValue(values -> {
                        var project = values.t1;
                        var location = values.t2;
                        var name = values.t3;
                        return String.format("projects/%s/locations/%s/notebookRuntimeTemplates/%s", project,location,name);
                    }))
                    .gcsOutputUri(outputBucket.name().applyValue(_name -> String.format("gs://%s", _name)))
                    .serviceAccount("my@service-account.com")
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(                
                    myRuntimeTemplate,
                    outputBucket)
                .build());

    }
}
Copy
resources:
  myRuntimeTemplate:
    type: gcp:colab:RuntimeTemplate
    name: my_runtime_template
    properties:
      name: runtime-template
      displayName: Runtime template
      location: us-central1
      machineSpec:
        machineType: e2-standard-4
      networkSpec:
        enableInternetAccess: true
  outputBucket:
    type: gcp:storage:Bucket
    name: output_bucket
    properties:
      name: my_bucket
      location: US
      forceDestroy: true
      uniformBucketLevelAccess: true
  notebook:
    type: gcp:storage:BucketObject
    properties:
      name: hello_world.ipynb
      bucket: ${outputBucket.name}
      content: |2
            {
              "cells": [
                {
                  "cell_type": "code",
                  "execution_count": null,
                  "metadata": {},
                  "outputs": [],
                  "source": [
                    "print(\"Hello, World!\")"
                  ]
                }
              ],
              "metadata": {
                "kernelspec": {
                  "display_name": "Python 3",
                  "language": "python",
                  "name": "python3"
                },
                "language_info": {
                  "codemirror_mode": {
                    "name": "ipython",
                    "version": 3
                  },
                  "file_extension": ".py",
                  "mimetype": "text/x-python",
                  "name": "python",
                  "nbconvert_exporter": "python",
                  "pygments_lexer": "ipython3",
                  "version": "3.8.5"
                }
              },
              "nbformat": 4,
              "nbformat_minor": 4
            }
  schedule:
    type: gcp:colab:Schedule
    properties:
      displayName: basic-schedule
      location: us-west1
      maxConcurrentRunCount: 2
      cron: TZ=America/Los_Angeles * * * * *
      createNotebookExecutionJobRequest:
        notebookExecutionJob:
          displayName: Notebook execution
          gcsNotebookSource:
            uri: gs://${notebook.bucket}/${notebook.name}
            generation: ${notebook.generation}
          notebookRuntimeTemplateResourceName: projects/${myRuntimeTemplate.project}/locations/${myRuntimeTemplate.location}/notebookRuntimeTemplates/${myRuntimeTemplate.name}
          gcsOutputUri: gs://${outputBucket.name}
          serviceAccount: my@service-account.com
    options:
      dependsOn:
        - ${myRuntimeTemplate}
        - ${outputBucket}
Copy

Colab Schedule Paused

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myRuntimeTemplate = new gcp.colab.RuntimeTemplate("my_runtime_template", {
    name: "runtime-template",
    displayName: "Runtime template",
    location: "us-central1",
    machineSpec: {
        machineType: "e2-standard-4",
    },
    networkSpec: {
        enableInternetAccess: true,
    },
});
const outputBucket = new gcp.storage.Bucket("output_bucket", {
    name: "my_bucket",
    location: "US",
    forceDestroy: true,
    uniformBucketLevelAccess: true,
});
const notebook = new gcp.storage.BucketObject("notebook", {
    name: "hello_world.ipynb",
    bucket: outputBucket.name,
    content: `    {
      "cells": [
        {
          "cell_type": "code",
          "execution_count": null,
          "metadata": {},
          "outputs": [],
          "source": [
            "print(\\"Hello, World!\\")"
          ]
        }
      ],
      "metadata": {
        "kernelspec": {
          "display_name": "Python 3",
          "language": "python",
          "name": "python3"
        },
        "language_info": {
          "codemirror_mode": {
            "name": "ipython",
            "version": 3
          },
          "file_extension": ".py",
          "mimetype": "text/x-python",
          "name": "python",
          "nbconvert_exporter": "python",
          "pygments_lexer": "ipython3",
          "version": "3.8.5"
        }
      },
      "nbformat": 4,
      "nbformat_minor": 4
    }
`,
});
const schedule = new gcp.colab.Schedule("schedule", {
    displayName: "paused-schedule",
    location: "us-west1",
    maxConcurrentRunCount: "2",
    cron: "TZ=America/Los_Angeles * * * * *",
    desiredState: "PAUSED",
    createNotebookExecutionJobRequest: {
        notebookExecutionJob: {
            displayName: "Notebook execution",
            gcsNotebookSource: {
                uri: pulumi.interpolate`gs://${notebook.bucket}/${notebook.name}`,
                generation: notebook.generation,
            },
            notebookRuntimeTemplateResourceName: pulumi.interpolate`projects/${myRuntimeTemplate.project}/locations/${myRuntimeTemplate.location}/notebookRuntimeTemplates/${myRuntimeTemplate.name}`,
            gcsOutputUri: pulumi.interpolate`gs://${outputBucket.name}`,
            serviceAccount: "my@service-account.com",
        },
    },
}, {
    dependsOn: [
        myRuntimeTemplate,
        outputBucket,
    ],
});
Copy
import pulumi
import pulumi_gcp as gcp

my_runtime_template = gcp.colab.RuntimeTemplate("my_runtime_template",
    name="runtime-template",
    display_name="Runtime template",
    location="us-central1",
    machine_spec={
        "machine_type": "e2-standard-4",
    },
    network_spec={
        "enable_internet_access": True,
    })
output_bucket = gcp.storage.Bucket("output_bucket",
    name="my_bucket",
    location="US",
    force_destroy=True,
    uniform_bucket_level_access=True)
notebook = gcp.storage.BucketObject("notebook",
    name="hello_world.ipynb",
    bucket=output_bucket.name,
    content="""    {
      "cells": [
        {
          "cell_type": "code",
          "execution_count": null,
          "metadata": {},
          "outputs": [],
          "source": [
            "print(\"Hello, World!\")"
          ]
        }
      ],
      "metadata": {
        "kernelspec": {
          "display_name": "Python 3",
          "language": "python",
          "name": "python3"
        },
        "language_info": {
          "codemirror_mode": {
            "name": "ipython",
            "version": 3
          },
          "file_extension": ".py",
          "mimetype": "text/x-python",
          "name": "python",
          "nbconvert_exporter": "python",
          "pygments_lexer": "ipython3",
          "version": "3.8.5"
        }
      },
      "nbformat": 4,
      "nbformat_minor": 4
    }
""")
schedule = gcp.colab.Schedule("schedule",
    display_name="paused-schedule",
    location="us-west1",
    max_concurrent_run_count="2",
    cron="TZ=America/Los_Angeles * * * * *",
    desired_state="PAUSED",
    create_notebook_execution_job_request={
        "notebook_execution_job": {
            "display_name": "Notebook execution",
            "gcs_notebook_source": {
                "uri": pulumi.Output.all(
                    bucket=notebook.bucket,
                    name=notebook.name
).apply(lambda resolved_outputs: f"gs://{resolved_outputs['bucket']}/{resolved_outputs['name']}")
,
                "generation": notebook.generation,
            },
            "notebook_runtime_template_resource_name": pulumi.Output.all(
                project=my_runtime_template.project,
                location=my_runtime_template.location,
                name=my_runtime_template.name
).apply(lambda resolved_outputs: f"projects/{resolved_outputs['project']}/locations/{resolved_outputs['location']}/notebookRuntimeTemplates/{resolved_outputs['name']}")
,
            "gcs_output_uri": output_bucket.name.apply(lambda name: f"gs://{name}"),
            "service_account": "my@service-account.com",
        },
    },
    opts = pulumi.ResourceOptions(depends_on=[
            my_runtime_template,
            output_bucket,
        ]))
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/colab"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myRuntimeTemplate, err := colab.NewRuntimeTemplate(ctx, "my_runtime_template", &colab.RuntimeTemplateArgs{
			Name:        pulumi.String("runtime-template"),
			DisplayName: pulumi.String("Runtime template"),
			Location:    pulumi.String("us-central1"),
			MachineSpec: &colab.RuntimeTemplateMachineSpecArgs{
				MachineType: pulumi.String("e2-standard-4"),
			},
			NetworkSpec: &colab.RuntimeTemplateNetworkSpecArgs{
				EnableInternetAccess: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		outputBucket, err := storage.NewBucket(ctx, "output_bucket", &storage.BucketArgs{
			Name:                     pulumi.String("my_bucket"),
			Location:                 pulumi.String("US"),
			ForceDestroy:             pulumi.Bool(true),
			UniformBucketLevelAccess: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		notebook, err := storage.NewBucketObject(ctx, "notebook", &storage.BucketObjectArgs{
			Name:   pulumi.String("hello_world.ipynb"),
			Bucket: outputBucket.Name,
			Content: pulumi.String(`    {
      "cells": [
        {
          "cell_type": "code",
          "execution_count": null,
          "metadata": {},
          "outputs": [],
          "source": [
            "print(\"Hello, World!\")"
          ]
        }
      ],
      "metadata": {
        "kernelspec": {
          "display_name": "Python 3",
          "language": "python",
          "name": "python3"
        },
        "language_info": {
          "codemirror_mode": {
            "name": "ipython",
            "version": 3
          },
          "file_extension": ".py",
          "mimetype": "text/x-python",
          "name": "python",
          "nbconvert_exporter": "python",
          "pygments_lexer": "ipython3",
          "version": "3.8.5"
        }
      },
      "nbformat": 4,
      "nbformat_minor": 4
    }
`),
		})
		if err != nil {
			return err
		}
		_, err = colab.NewSchedule(ctx, "schedule", &colab.ScheduleArgs{
			DisplayName:           pulumi.String("paused-schedule"),
			Location:              pulumi.String("us-west1"),
			MaxConcurrentRunCount: pulumi.String("2"),
			Cron:                  pulumi.String("TZ=America/Los_Angeles * * * * *"),
			DesiredState:          pulumi.String("PAUSED"),
			CreateNotebookExecutionJobRequest: &colab.ScheduleCreateNotebookExecutionJobRequestArgs{
				NotebookExecutionJob: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs{
					DisplayName: pulumi.String("Notebook execution"),
					GcsNotebookSource: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs{
						Uri: pulumi.All(notebook.Bucket, notebook.Name).ApplyT(func(_args []interface{}) (string, error) {
							bucket := _args[0].(string)
							name := _args[1].(string)
							return fmt.Sprintf("gs://%v/%v", bucket, name), nil
						}).(pulumi.StringOutput),
						Generation: notebook.Generation,
					},
					NotebookRuntimeTemplateResourceName: pulumi.All(myRuntimeTemplate.Project, myRuntimeTemplate.Location, myRuntimeTemplate.Name).ApplyT(func(_args []interface{}) (string, error) {
						project := _args[0].(string)
						location := _args[1].(string)
						name := _args[2].(string)
						return fmt.Sprintf("projects/%v/locations/%v/notebookRuntimeTemplates/%v", project, location, name), nil
					}).(pulumi.StringOutput),
					GcsOutputUri: outputBucket.Name.ApplyT(func(name string) (string, error) {
						return fmt.Sprintf("gs://%v", name), nil
					}).(pulumi.StringOutput),
					ServiceAccount: pulumi.String("my@service-account.com"),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			myRuntimeTemplate,
			outputBucket,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var myRuntimeTemplate = new Gcp.Colab.RuntimeTemplate("my_runtime_template", new()
    {
        Name = "runtime-template",
        DisplayName = "Runtime template",
        Location = "us-central1",
        MachineSpec = new Gcp.Colab.Inputs.RuntimeTemplateMachineSpecArgs
        {
            MachineType = "e2-standard-4",
        },
        NetworkSpec = new Gcp.Colab.Inputs.RuntimeTemplateNetworkSpecArgs
        {
            EnableInternetAccess = true,
        },
    });

    var outputBucket = new Gcp.Storage.Bucket("output_bucket", new()
    {
        Name = "my_bucket",
        Location = "US",
        ForceDestroy = true,
        UniformBucketLevelAccess = true,
    });

    var notebook = new Gcp.Storage.BucketObject("notebook", new()
    {
        Name = "hello_world.ipynb",
        Bucket = outputBucket.Name,
        Content = @"    {
      ""cells"": [
        {
          ""cell_type"": ""code"",
          ""execution_count"": null,
          ""metadata"": {},
          ""outputs"": [],
          ""source"": [
            ""print(\""Hello, World!\"")""
          ]
        }
      ],
      ""metadata"": {
        ""kernelspec"": {
          ""display_name"": ""Python 3"",
          ""language"": ""python"",
          ""name"": ""python3""
        },
        ""language_info"": {
          ""codemirror_mode"": {
            ""name"": ""ipython"",
            ""version"": 3
          },
          ""file_extension"": "".py"",
          ""mimetype"": ""text/x-python"",
          ""name"": ""python"",
          ""nbconvert_exporter"": ""python"",
          ""pygments_lexer"": ""ipython3"",
          ""version"": ""3.8.5""
        }
      },
      ""nbformat"": 4,
      ""nbformat_minor"": 4
    }
",
    });

    var schedule = new Gcp.Colab.Schedule("schedule", new()
    {
        DisplayName = "paused-schedule",
        Location = "us-west1",
        MaxConcurrentRunCount = "2",
        Cron = "TZ=America/Los_Angeles * * * * *",
        DesiredState = "PAUSED",
        CreateNotebookExecutionJobRequest = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestArgs
        {
            NotebookExecutionJob = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs
            {
                DisplayName = "Notebook execution",
                GcsNotebookSource = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs
                {
                    Uri = Output.Tuple(notebook.Bucket, notebook.Name).Apply(values =>
                    {
                        var bucket = values.Item1;
                        var name = values.Item2;
                        return $"gs://{bucket}/{name}";
                    }),
                    Generation = notebook.Generation,
                },
                NotebookRuntimeTemplateResourceName = Output.Tuple(myRuntimeTemplate.Project, myRuntimeTemplate.Location, myRuntimeTemplate.Name).Apply(values =>
                {
                    var project = values.Item1;
                    var location = values.Item2;
                    var name = values.Item3;
                    return $"projects/{project}/locations/{location}/notebookRuntimeTemplates/{name}";
                }),
                GcsOutputUri = outputBucket.Name.Apply(name => $"gs://{name}"),
                ServiceAccount = "my@service-account.com",
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            myRuntimeTemplate,
            outputBucket,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.colab.RuntimeTemplate;
import com.pulumi.gcp.colab.RuntimeTemplateArgs;
import com.pulumi.gcp.colab.inputs.RuntimeTemplateMachineSpecArgs;
import com.pulumi.gcp.colab.inputs.RuntimeTemplateNetworkSpecArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.colab.Schedule;
import com.pulumi.gcp.colab.ScheduleArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs;
import com.pulumi.resources.CustomResourceOptions;
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 myRuntimeTemplate = new RuntimeTemplate("myRuntimeTemplate", RuntimeTemplateArgs.builder()
            .name("runtime-template")
            .displayName("Runtime template")
            .location("us-central1")
            .machineSpec(RuntimeTemplateMachineSpecArgs.builder()
                .machineType("e2-standard-4")
                .build())
            .networkSpec(RuntimeTemplateNetworkSpecArgs.builder()
                .enableInternetAccess(true)
                .build())
            .build());

        var outputBucket = new Bucket("outputBucket", BucketArgs.builder()
            .name("my_bucket")
            .location("US")
            .forceDestroy(true)
            .uniformBucketLevelAccess(true)
            .build());

        var notebook = new BucketObject("notebook", BucketObjectArgs.builder()
            .name("hello_world.ipynb")
            .bucket(outputBucket.name())
            .content("""
    {
      "cells": [
        {
          "cell_type": "code",
          "execution_count": null,
          "metadata": {},
          "outputs": [],
          "source": [
            "print(\"Hello, World!\")"
          ]
        }
      ],
      "metadata": {
        "kernelspec": {
          "display_name": "Python 3",
          "language": "python",
          "name": "python3"
        },
        "language_info": {
          "codemirror_mode": {
            "name": "ipython",
            "version": 3
          },
          "file_extension": ".py",
          "mimetype": "text/x-python",
          "name": "python",
          "nbconvert_exporter": "python",
          "pygments_lexer": "ipython3",
          "version": "3.8.5"
        }
      },
      "nbformat": 4,
      "nbformat_minor": 4
    }
            """)
            .build());

        var schedule = new Schedule("schedule", ScheduleArgs.builder()
            .displayName("paused-schedule")
            .location("us-west1")
            .maxConcurrentRunCount("2")
            .cron("TZ=America/Los_Angeles * * * * *")
            .desiredState("PAUSED")
            .createNotebookExecutionJobRequest(ScheduleCreateNotebookExecutionJobRequestArgs.builder()
                .notebookExecutionJob(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs.builder()
                    .displayName("Notebook execution")
                    .gcsNotebookSource(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs.builder()
                        .uri(Output.tuple(notebook.bucket(), notebook.name()).applyValue(values -> {
                            var bucket = values.t1;
                            var name = values.t2;
                            return String.format("gs://%s/%s", bucket,name);
                        }))
                        .generation(notebook.generation())
                        .build())
                    .notebookRuntimeTemplateResourceName(Output.tuple(myRuntimeTemplate.project(), myRuntimeTemplate.location(), myRuntimeTemplate.name()).applyValue(values -> {
                        var project = values.t1;
                        var location = values.t2;
                        var name = values.t3;
                        return String.format("projects/%s/locations/%s/notebookRuntimeTemplates/%s", project,location,name);
                    }))
                    .gcsOutputUri(outputBucket.name().applyValue(_name -> String.format("gs://%s", _name)))
                    .serviceAccount("my@service-account.com")
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(                
                    myRuntimeTemplate,
                    outputBucket)
                .build());

    }
}
Copy
resources:
  myRuntimeTemplate:
    type: gcp:colab:RuntimeTemplate
    name: my_runtime_template
    properties:
      name: runtime-template
      displayName: Runtime template
      location: us-central1
      machineSpec:
        machineType: e2-standard-4
      networkSpec:
        enableInternetAccess: true
  outputBucket:
    type: gcp:storage:Bucket
    name: output_bucket
    properties:
      name: my_bucket
      location: US
      forceDestroy: true
      uniformBucketLevelAccess: true
  notebook:
    type: gcp:storage:BucketObject
    properties:
      name: hello_world.ipynb
      bucket: ${outputBucket.name}
      content: |2
            {
              "cells": [
                {
                  "cell_type": "code",
                  "execution_count": null,
                  "metadata": {},
                  "outputs": [],
                  "source": [
                    "print(\"Hello, World!\")"
                  ]
                }
              ],
              "metadata": {
                "kernelspec": {
                  "display_name": "Python 3",
                  "language": "python",
                  "name": "python3"
                },
                "language_info": {
                  "codemirror_mode": {
                    "name": "ipython",
                    "version": 3
                  },
                  "file_extension": ".py",
                  "mimetype": "text/x-python",
                  "name": "python",
                  "nbconvert_exporter": "python",
                  "pygments_lexer": "ipython3",
                  "version": "3.8.5"
                }
              },
              "nbformat": 4,
              "nbformat_minor": 4
            }
  schedule:
    type: gcp:colab:Schedule
    properties:
      displayName: paused-schedule
      location: us-west1
      maxConcurrentRunCount: 2
      cron: TZ=America/Los_Angeles * * * * *
      desiredState: PAUSED
      createNotebookExecutionJobRequest:
        notebookExecutionJob:
          displayName: Notebook execution
          gcsNotebookSource:
            uri: gs://${notebook.bucket}/${notebook.name}
            generation: ${notebook.generation}
          notebookRuntimeTemplateResourceName: projects/${myRuntimeTemplate.project}/locations/${myRuntimeTemplate.location}/notebookRuntimeTemplates/${myRuntimeTemplate.name}
          gcsOutputUri: gs://${outputBucket.name}
          serviceAccount: my@service-account.com
    options:
      dependsOn:
        - ${myRuntimeTemplate}
        - ${outputBucket}
Copy

Colab Schedule Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myRuntimeTemplate = new gcp.colab.RuntimeTemplate("my_runtime_template", {
    name: "runtime-template",
    displayName: "Runtime template",
    location: "us-central1",
    machineSpec: {
        machineType: "e2-standard-4",
    },
    networkSpec: {
        enableInternetAccess: true,
    },
});
const outputBucket = new gcp.storage.Bucket("output_bucket", {
    name: "my_bucket",
    location: "US",
    forceDestroy: true,
    uniformBucketLevelAccess: true,
});
const secret = new gcp.secretmanager.Secret("secret", {
    secretId: "secret",
    replication: {
        auto: {},
    },
});
const secretVersion = new gcp.secretmanager.SecretVersion("secret_version", {
    secret: secret.id,
    secretData: "secret-data",
});
const dataformRepository = new gcp.dataform.Repository("dataform_repository", {
    name: "dataform-repository",
    displayName: "dataform_repository",
    npmrcEnvironmentVariablesSecretVersion: secretVersion.id,
    kmsKeyName: "",
    labels: {
        label_foo1: "label-bar1",
    },
    gitRemoteSettings: {
        url: "https://github.com/OWNER/REPOSITORY.git",
        defaultBranch: "main",
        authenticationTokenSecretVersion: secretVersion.id,
    },
    workspaceCompilationOverrides: {
        defaultDatabase: "database",
        schemaSuffix: "_suffix",
        tablePrefix: "prefix_",
    },
});
const schedule = new gcp.colab.Schedule("schedule", {
    displayName: "full-schedule",
    location: "us-west1",
    allowQueueing: true,
    maxConcurrentRunCount: "2",
    cron: "TZ=America/Los_Angeles * * * * *",
    maxRunCount: "5",
    startTime: "2014-10-02T15:01:23Z",
    endTime: "2014-10-10T15:01:23Z",
    desiredState: "ACTIVE",
    createNotebookExecutionJobRequest: {
        notebookExecutionJob: {
            displayName: "Notebook execution",
            executionTimeout: "86400s",
            dataformRepositorySource: {
                commitSha: "randomsha123",
                dataformRepositoryResourceName: pulumi.interpolate`projects/my-project-name/locations/us-west1/repositories/${dataformRepository.name}`,
            },
            notebookRuntimeTemplateResourceName: pulumi.interpolate`projects/${myRuntimeTemplate.project}/locations/${myRuntimeTemplate.location}/notebookRuntimeTemplates/${myRuntimeTemplate.name}`,
            gcsOutputUri: pulumi.interpolate`gs://${outputBucket.name}`,
            serviceAccount: "my@service-account.com",
        },
    },
}, {
    dependsOn: [
        myRuntimeTemplate,
        outputBucket,
        secretVersion,
        dataformRepository,
    ],
});
Copy
import pulumi
import pulumi_gcp as gcp

my_runtime_template = gcp.colab.RuntimeTemplate("my_runtime_template",
    name="runtime-template",
    display_name="Runtime template",
    location="us-central1",
    machine_spec={
        "machine_type": "e2-standard-4",
    },
    network_spec={
        "enable_internet_access": True,
    })
output_bucket = gcp.storage.Bucket("output_bucket",
    name="my_bucket",
    location="US",
    force_destroy=True,
    uniform_bucket_level_access=True)
secret = gcp.secretmanager.Secret("secret",
    secret_id="secret",
    replication={
        "auto": {},
    })
secret_version = gcp.secretmanager.SecretVersion("secret_version",
    secret=secret.id,
    secret_data="secret-data")
dataform_repository = gcp.dataform.Repository("dataform_repository",
    name="dataform-repository",
    display_name="dataform_repository",
    npmrc_environment_variables_secret_version=secret_version.id,
    kms_key_name="",
    labels={
        "label_foo1": "label-bar1",
    },
    git_remote_settings={
        "url": "https://github.com/OWNER/REPOSITORY.git",
        "default_branch": "main",
        "authentication_token_secret_version": secret_version.id,
    },
    workspace_compilation_overrides={
        "default_database": "database",
        "schema_suffix": "_suffix",
        "table_prefix": "prefix_",
    })
schedule = gcp.colab.Schedule("schedule",
    display_name="full-schedule",
    location="us-west1",
    allow_queueing=True,
    max_concurrent_run_count="2",
    cron="TZ=America/Los_Angeles * * * * *",
    max_run_count="5",
    start_time="2014-10-02T15:01:23Z",
    end_time="2014-10-10T15:01:23Z",
    desired_state="ACTIVE",
    create_notebook_execution_job_request={
        "notebook_execution_job": {
            "display_name": "Notebook execution",
            "execution_timeout": "86400s",
            "dataform_repository_source": {
                "commit_sha": "randomsha123",
                "dataform_repository_resource_name": dataform_repository.name.apply(lambda name: f"projects/my-project-name/locations/us-west1/repositories/{name}"),
            },
            "notebook_runtime_template_resource_name": pulumi.Output.all(
                project=my_runtime_template.project,
                location=my_runtime_template.location,
                name=my_runtime_template.name
).apply(lambda resolved_outputs: f"projects/{resolved_outputs['project']}/locations/{resolved_outputs['location']}/notebookRuntimeTemplates/{resolved_outputs['name']}")
,
            "gcs_output_uri": output_bucket.name.apply(lambda name: f"gs://{name}"),
            "service_account": "my@service-account.com",
        },
    },
    opts = pulumi.ResourceOptions(depends_on=[
            my_runtime_template,
            output_bucket,
            secret_version,
            dataform_repository,
        ]))
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/colab"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dataform"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myRuntimeTemplate, err := colab.NewRuntimeTemplate(ctx, "my_runtime_template", &colab.RuntimeTemplateArgs{
			Name:        pulumi.String("runtime-template"),
			DisplayName: pulumi.String("Runtime template"),
			Location:    pulumi.String("us-central1"),
			MachineSpec: &colab.RuntimeTemplateMachineSpecArgs{
				MachineType: pulumi.String("e2-standard-4"),
			},
			NetworkSpec: &colab.RuntimeTemplateNetworkSpecArgs{
				EnableInternetAccess: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		outputBucket, err := storage.NewBucket(ctx, "output_bucket", &storage.BucketArgs{
			Name:                     pulumi.String("my_bucket"),
			Location:                 pulumi.String("US"),
			ForceDestroy:             pulumi.Bool(true),
			UniformBucketLevelAccess: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		secret, err := secretmanager.NewSecret(ctx, "secret", &secretmanager.SecretArgs{
			SecretId: pulumi.String("secret"),
			Replication: &secretmanager.SecretReplicationArgs{
				Auto: &secretmanager.SecretReplicationAutoArgs{},
			},
		})
		if err != nil {
			return err
		}
		secretVersion, err := secretmanager.NewSecretVersion(ctx, "secret_version", &secretmanager.SecretVersionArgs{
			Secret:     secret.ID(),
			SecretData: pulumi.String("secret-data"),
		})
		if err != nil {
			return err
		}
		dataformRepository, err := dataform.NewRepository(ctx, "dataform_repository", &dataform.RepositoryArgs{
			Name:                                   pulumi.String("dataform-repository"),
			DisplayName:                            pulumi.String("dataform_repository"),
			NpmrcEnvironmentVariablesSecretVersion: secretVersion.ID(),
			KmsKeyName:                             pulumi.String(""),
			Labels: pulumi.StringMap{
				"label_foo1": pulumi.String("label-bar1"),
			},
			GitRemoteSettings: &dataform.RepositoryGitRemoteSettingsArgs{
				Url:                              pulumi.String("https://github.com/OWNER/REPOSITORY.git"),
				DefaultBranch:                    pulumi.String("main"),
				AuthenticationTokenSecretVersion: secretVersion.ID(),
			},
			WorkspaceCompilationOverrides: &dataform.RepositoryWorkspaceCompilationOverridesArgs{
				DefaultDatabase: pulumi.String("database"),
				SchemaSuffix:    pulumi.String("_suffix"),
				TablePrefix:     pulumi.String("prefix_"),
			},
		})
		if err != nil {
			return err
		}
		_, err = colab.NewSchedule(ctx, "schedule", &colab.ScheduleArgs{
			DisplayName:           pulumi.String("full-schedule"),
			Location:              pulumi.String("us-west1"),
			AllowQueueing:         pulumi.Bool(true),
			MaxConcurrentRunCount: pulumi.String("2"),
			Cron:                  pulumi.String("TZ=America/Los_Angeles * * * * *"),
			MaxRunCount:           pulumi.String("5"),
			StartTime:             pulumi.String("2014-10-02T15:01:23Z"),
			EndTime:               pulumi.String("2014-10-10T15:01:23Z"),
			DesiredState:          pulumi.String("ACTIVE"),
			CreateNotebookExecutionJobRequest: &colab.ScheduleCreateNotebookExecutionJobRequestArgs{
				NotebookExecutionJob: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs{
					DisplayName:      pulumi.String("Notebook execution"),
					ExecutionTimeout: pulumi.String("86400s"),
					DataformRepositorySource: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySourceArgs{
						CommitSha: pulumi.String("randomsha123"),
						DataformRepositoryResourceName: dataformRepository.Name.ApplyT(func(name string) (string, error) {
							return fmt.Sprintf("projects/my-project-name/locations/us-west1/repositories/%v", name), nil
						}).(pulumi.StringOutput),
					},
					NotebookRuntimeTemplateResourceName: pulumi.All(myRuntimeTemplate.Project, myRuntimeTemplate.Location, myRuntimeTemplate.Name).ApplyT(func(_args []interface{}) (string, error) {
						project := _args[0].(string)
						location := _args[1].(string)
						name := _args[2].(string)
						return fmt.Sprintf("projects/%v/locations/%v/notebookRuntimeTemplates/%v", project, location, name), nil
					}).(pulumi.StringOutput),
					GcsOutputUri: outputBucket.Name.ApplyT(func(name string) (string, error) {
						return fmt.Sprintf("gs://%v", name), nil
					}).(pulumi.StringOutput),
					ServiceAccount: pulumi.String("my@service-account.com"),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			myRuntimeTemplate,
			outputBucket,
			secretVersion,
			dataformRepository,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var myRuntimeTemplate = new Gcp.Colab.RuntimeTemplate("my_runtime_template", new()
    {
        Name = "runtime-template",
        DisplayName = "Runtime template",
        Location = "us-central1",
        MachineSpec = new Gcp.Colab.Inputs.RuntimeTemplateMachineSpecArgs
        {
            MachineType = "e2-standard-4",
        },
        NetworkSpec = new Gcp.Colab.Inputs.RuntimeTemplateNetworkSpecArgs
        {
            EnableInternetAccess = true,
        },
    });

    var outputBucket = new Gcp.Storage.Bucket("output_bucket", new()
    {
        Name = "my_bucket",
        Location = "US",
        ForceDestroy = true,
        UniformBucketLevelAccess = true,
    });

    var secret = new Gcp.SecretManager.Secret("secret", new()
    {
        SecretId = "secret",
        Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
        {
            Auto = null,
        },
    });

    var secretVersion = new Gcp.SecretManager.SecretVersion("secret_version", new()
    {
        Secret = secret.Id,
        SecretData = "secret-data",
    });

    var dataformRepository = new Gcp.Dataform.Repository("dataform_repository", new()
    {
        Name = "dataform-repository",
        DisplayName = "dataform_repository",
        NpmrcEnvironmentVariablesSecretVersion = secretVersion.Id,
        KmsKeyName = "",
        Labels = 
        {
            { "label_foo1", "label-bar1" },
        },
        GitRemoteSettings = new Gcp.Dataform.Inputs.RepositoryGitRemoteSettingsArgs
        {
            Url = "https://github.com/OWNER/REPOSITORY.git",
            DefaultBranch = "main",
            AuthenticationTokenSecretVersion = secretVersion.Id,
        },
        WorkspaceCompilationOverrides = new Gcp.Dataform.Inputs.RepositoryWorkspaceCompilationOverridesArgs
        {
            DefaultDatabase = "database",
            SchemaSuffix = "_suffix",
            TablePrefix = "prefix_",
        },
    });

    var schedule = new Gcp.Colab.Schedule("schedule", new()
    {
        DisplayName = "full-schedule",
        Location = "us-west1",
        AllowQueueing = true,
        MaxConcurrentRunCount = "2",
        Cron = "TZ=America/Los_Angeles * * * * *",
        MaxRunCount = "5",
        StartTime = "2014-10-02T15:01:23Z",
        EndTime = "2014-10-10T15:01:23Z",
        DesiredState = "ACTIVE",
        CreateNotebookExecutionJobRequest = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestArgs
        {
            NotebookExecutionJob = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs
            {
                DisplayName = "Notebook execution",
                ExecutionTimeout = "86400s",
                DataformRepositorySource = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySourceArgs
                {
                    CommitSha = "randomsha123",
                    DataformRepositoryResourceName = dataformRepository.Name.Apply(name => $"projects/my-project-name/locations/us-west1/repositories/{name}"),
                },
                NotebookRuntimeTemplateResourceName = Output.Tuple(myRuntimeTemplate.Project, myRuntimeTemplate.Location, myRuntimeTemplate.Name).Apply(values =>
                {
                    var project = values.Item1;
                    var location = values.Item2;
                    var name = values.Item3;
                    return $"projects/{project}/locations/{location}/notebookRuntimeTemplates/{name}";
                }),
                GcsOutputUri = outputBucket.Name.Apply(name => $"gs://{name}"),
                ServiceAccount = "my@service-account.com",
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            myRuntimeTemplate,
            outputBucket,
            secretVersion,
            dataformRepository,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.colab.RuntimeTemplate;
import com.pulumi.gcp.colab.RuntimeTemplateArgs;
import com.pulumi.gcp.colab.inputs.RuntimeTemplateMachineSpecArgs;
import com.pulumi.gcp.colab.inputs.RuntimeTemplateNetworkSpecArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.dataform.Repository;
import com.pulumi.gcp.dataform.RepositoryArgs;
import com.pulumi.gcp.dataform.inputs.RepositoryGitRemoteSettingsArgs;
import com.pulumi.gcp.dataform.inputs.RepositoryWorkspaceCompilationOverridesArgs;
import com.pulumi.gcp.colab.Schedule;
import com.pulumi.gcp.colab.ScheduleArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs;
import com.pulumi.gcp.colab.inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySourceArgs;
import com.pulumi.resources.CustomResourceOptions;
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 myRuntimeTemplate = new RuntimeTemplate("myRuntimeTemplate", RuntimeTemplateArgs.builder()
            .name("runtime-template")
            .displayName("Runtime template")
            .location("us-central1")
            .machineSpec(RuntimeTemplateMachineSpecArgs.builder()
                .machineType("e2-standard-4")
                .build())
            .networkSpec(RuntimeTemplateNetworkSpecArgs.builder()
                .enableInternetAccess(true)
                .build())
            .build());

        var outputBucket = new Bucket("outputBucket", BucketArgs.builder()
            .name("my_bucket")
            .location("US")
            .forceDestroy(true)
            .uniformBucketLevelAccess(true)
            .build());

        var secret = new Secret("secret", SecretArgs.builder()
            .secretId("secret")
            .replication(SecretReplicationArgs.builder()
                .auto(SecretReplicationAutoArgs.builder()
                    .build())
                .build())
            .build());

        var secretVersion = new SecretVersion("secretVersion", SecretVersionArgs.builder()
            .secret(secret.id())
            .secretData("secret-data")
            .build());

        var dataformRepository = new Repository("dataformRepository", RepositoryArgs.builder()
            .name("dataform-repository")
            .displayName("dataform_repository")
            .npmrcEnvironmentVariablesSecretVersion(secretVersion.id())
            .kmsKeyName("")
            .labels(Map.of("label_foo1", "label-bar1"))
            .gitRemoteSettings(RepositoryGitRemoteSettingsArgs.builder()
                .url("https://github.com/OWNER/REPOSITORY.git")
                .defaultBranch("main")
                .authenticationTokenSecretVersion(secretVersion.id())
                .build())
            .workspaceCompilationOverrides(RepositoryWorkspaceCompilationOverridesArgs.builder()
                .defaultDatabase("database")
                .schemaSuffix("_suffix")
                .tablePrefix("prefix_")
                .build())
            .build());

        var schedule = new Schedule("schedule", ScheduleArgs.builder()
            .displayName("full-schedule")
            .location("us-west1")
            .allowQueueing(true)
            .maxConcurrentRunCount("2")
            .cron("TZ=America/Los_Angeles * * * * *")
            .maxRunCount("5")
            .startTime("2014-10-02T15:01:23Z")
            .endTime("2014-10-10T15:01:23Z")
            .desiredState("ACTIVE")
            .createNotebookExecutionJobRequest(ScheduleCreateNotebookExecutionJobRequestArgs.builder()
                .notebookExecutionJob(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs.builder()
                    .displayName("Notebook execution")
                    .executionTimeout("86400s")
                    .dataformRepositorySource(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySourceArgs.builder()
                        .commitSha("randomsha123")
                        .dataformRepositoryResourceName(dataformRepository.name().applyValue(_name -> String.format("projects/my-project-name/locations/us-west1/repositories/%s", _name)))
                        .build())
                    .notebookRuntimeTemplateResourceName(Output.tuple(myRuntimeTemplate.project(), myRuntimeTemplate.location(), myRuntimeTemplate.name()).applyValue(values -> {
                        var project = values.t1;
                        var location = values.t2;
                        var name = values.t3;
                        return String.format("projects/%s/locations/%s/notebookRuntimeTemplates/%s", project,location,name);
                    }))
                    .gcsOutputUri(outputBucket.name().applyValue(_name -> String.format("gs://%s", _name)))
                    .serviceAccount("my@service-account.com")
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(                
                    myRuntimeTemplate,
                    outputBucket,
                    secretVersion,
                    dataformRepository)
                .build());

    }
}
Copy
resources:
  myRuntimeTemplate:
    type: gcp:colab:RuntimeTemplate
    name: my_runtime_template
    properties:
      name: runtime-template
      displayName: Runtime template
      location: us-central1
      machineSpec:
        machineType: e2-standard-4
      networkSpec:
        enableInternetAccess: true
  outputBucket:
    type: gcp:storage:Bucket
    name: output_bucket
    properties:
      name: my_bucket
      location: US
      forceDestroy: true
      uniformBucketLevelAccess: true
  secret:
    type: gcp:secretmanager:Secret
    properties:
      secretId: secret
      replication:
        auto: {}
  secretVersion:
    type: gcp:secretmanager:SecretVersion
    name: secret_version
    properties:
      secret: ${secret.id}
      secretData: secret-data
  dataformRepository:
    type: gcp:dataform:Repository
    name: dataform_repository
    properties:
      name: dataform-repository
      displayName: dataform_repository
      npmrcEnvironmentVariablesSecretVersion: ${secretVersion.id}
      kmsKeyName: ""
      labels:
        label_foo1: label-bar1
      gitRemoteSettings:
        url: https://github.com/OWNER/REPOSITORY.git
        defaultBranch: main
        authenticationTokenSecretVersion: ${secretVersion.id}
      workspaceCompilationOverrides:
        defaultDatabase: database
        schemaSuffix: _suffix
        tablePrefix: prefix_
  schedule:
    type: gcp:colab:Schedule
    properties:
      displayName: full-schedule
      location: us-west1
      allowQueueing: true
      maxConcurrentRunCount: 2
      cron: TZ=America/Los_Angeles * * * * *
      maxRunCount: 5
      startTime: 2014-10-02T15:01:23Z
      endTime: 2014-10-10T15:01:23Z
      desiredState: ACTIVE
      createNotebookExecutionJobRequest:
        notebookExecutionJob:
          displayName: Notebook execution
          executionTimeout: 86400s
          dataformRepositorySource:
            commitSha: randomsha123
            dataformRepositoryResourceName: projects/my-project-name/locations/us-west1/repositories/${dataformRepository.name}
          notebookRuntimeTemplateResourceName: projects/${myRuntimeTemplate.project}/locations/${myRuntimeTemplate.location}/notebookRuntimeTemplates/${myRuntimeTemplate.name}
          gcsOutputUri: gs://${outputBucket.name}
          serviceAccount: my@service-account.com
    options:
      dependsOn:
        - ${myRuntimeTemplate}
        - ${outputBucket}
        - ${secretVersion}
        - ${dataformRepository}
Copy

Create Schedule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Schedule(name: string, args: ScheduleArgs, opts?: CustomResourceOptions);
@overload
def Schedule(resource_name: str,
             args: ScheduleArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Schedule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             create_notebook_execution_job_request: Optional[ScheduleCreateNotebookExecutionJobRequestArgs] = None,
             cron: Optional[str] = None,
             display_name: Optional[str] = None,
             location: Optional[str] = None,
             max_concurrent_run_count: Optional[str] = None,
             allow_queueing: Optional[bool] = None,
             desired_state: Optional[str] = None,
             end_time: Optional[str] = None,
             max_run_count: Optional[str] = None,
             project: Optional[str] = None,
             start_time: Optional[str] = None)
func NewSchedule(ctx *Context, name string, args ScheduleArgs, opts ...ResourceOption) (*Schedule, error)
public Schedule(string name, ScheduleArgs args, CustomResourceOptions? opts = null)
public Schedule(String name, ScheduleArgs args)
public Schedule(String name, ScheduleArgs args, CustomResourceOptions options)
type: gcp:colab:Schedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ScheduleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var scheduleResource = new Gcp.Colab.Schedule("scheduleResource", new()
{
    CreateNotebookExecutionJobRequest = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestArgs
    {
        NotebookExecutionJob = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs
        {
            DisplayName = "string",
            GcsOutputUri = "string",
            NotebookRuntimeTemplateResourceName = "string",
            DataformRepositorySource = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySourceArgs
            {
                DataformRepositoryResourceName = "string",
                CommitSha = "string",
            },
            ExecutionTimeout = "string",
            ExecutionUser = "string",
            GcsNotebookSource = new Gcp.Colab.Inputs.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs
            {
                Uri = "string",
                Generation = "string",
            },
            ServiceAccount = "string",
        },
    },
    Cron = "string",
    DisplayName = "string",
    Location = "string",
    MaxConcurrentRunCount = "string",
    AllowQueueing = false,
    DesiredState = "string",
    EndTime = "string",
    MaxRunCount = "string",
    Project = "string",
    StartTime = "string",
});
Copy
example, err := colab.NewSchedule(ctx, "scheduleResource", &colab.ScheduleArgs{
	CreateNotebookExecutionJobRequest: &colab.ScheduleCreateNotebookExecutionJobRequestArgs{
		NotebookExecutionJob: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs{
			DisplayName:                         pulumi.String("string"),
			GcsOutputUri:                        pulumi.String("string"),
			NotebookRuntimeTemplateResourceName: pulumi.String("string"),
			DataformRepositorySource: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySourceArgs{
				DataformRepositoryResourceName: pulumi.String("string"),
				CommitSha:                      pulumi.String("string"),
			},
			ExecutionTimeout: pulumi.String("string"),
			ExecutionUser:    pulumi.String("string"),
			GcsNotebookSource: &colab.ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs{
				Uri:        pulumi.String("string"),
				Generation: pulumi.String("string"),
			},
			ServiceAccount: pulumi.String("string"),
		},
	},
	Cron:                  pulumi.String("string"),
	DisplayName:           pulumi.String("string"),
	Location:              pulumi.String("string"),
	MaxConcurrentRunCount: pulumi.String("string"),
	AllowQueueing:         pulumi.Bool(false),
	DesiredState:          pulumi.String("string"),
	EndTime:               pulumi.String("string"),
	MaxRunCount:           pulumi.String("string"),
	Project:               pulumi.String("string"),
	StartTime:             pulumi.String("string"),
})
Copy
var scheduleResource = new Schedule("scheduleResource", ScheduleArgs.builder()
    .createNotebookExecutionJobRequest(ScheduleCreateNotebookExecutionJobRequestArgs.builder()
        .notebookExecutionJob(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs.builder()
            .displayName("string")
            .gcsOutputUri("string")
            .notebookRuntimeTemplateResourceName("string")
            .dataformRepositorySource(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySourceArgs.builder()
                .dataformRepositoryResourceName("string")
                .commitSha("string")
                .build())
            .executionTimeout("string")
            .executionUser("string")
            .gcsNotebookSource(ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs.builder()
                .uri("string")
                .generation("string")
                .build())
            .serviceAccount("string")
            .build())
        .build())
    .cron("string")
    .displayName("string")
    .location("string")
    .maxConcurrentRunCount("string")
    .allowQueueing(false)
    .desiredState("string")
    .endTime("string")
    .maxRunCount("string")
    .project("string")
    .startTime("string")
    .build());
Copy
schedule_resource = gcp.colab.Schedule("scheduleResource",
    create_notebook_execution_job_request={
        "notebook_execution_job": {
            "display_name": "string",
            "gcs_output_uri": "string",
            "notebook_runtime_template_resource_name": "string",
            "dataform_repository_source": {
                "dataform_repository_resource_name": "string",
                "commit_sha": "string",
            },
            "execution_timeout": "string",
            "execution_user": "string",
            "gcs_notebook_source": {
                "uri": "string",
                "generation": "string",
            },
            "service_account": "string",
        },
    },
    cron="string",
    display_name="string",
    location="string",
    max_concurrent_run_count="string",
    allow_queueing=False,
    desired_state="string",
    end_time="string",
    max_run_count="string",
    project="string",
    start_time="string")
Copy
const scheduleResource = new gcp.colab.Schedule("scheduleResource", {
    createNotebookExecutionJobRequest: {
        notebookExecutionJob: {
            displayName: "string",
            gcsOutputUri: "string",
            notebookRuntimeTemplateResourceName: "string",
            dataformRepositorySource: {
                dataformRepositoryResourceName: "string",
                commitSha: "string",
            },
            executionTimeout: "string",
            executionUser: "string",
            gcsNotebookSource: {
                uri: "string",
                generation: "string",
            },
            serviceAccount: "string",
        },
    },
    cron: "string",
    displayName: "string",
    location: "string",
    maxConcurrentRunCount: "string",
    allowQueueing: false,
    desiredState: "string",
    endTime: "string",
    maxRunCount: "string",
    project: "string",
    startTime: "string",
});
Copy
type: gcp:colab:Schedule
properties:
    allowQueueing: false
    createNotebookExecutionJobRequest:
        notebookExecutionJob:
            dataformRepositorySource:
                commitSha: string
                dataformRepositoryResourceName: string
            displayName: string
            executionTimeout: string
            executionUser: string
            gcsNotebookSource:
                generation: string
                uri: string
            gcsOutputUri: string
            notebookRuntimeTemplateResourceName: string
            serviceAccount: string
    cron: string
    desiredState: string
    displayName: string
    endTime: string
    location: string
    maxConcurrentRunCount: string
    maxRunCount: string
    project: string
    startTime: string
Copy

Schedule Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Schedule resource accepts the following input properties:

CreateNotebookExecutionJobRequest
This property is required.
Changes to this property will trigger replacement.
ScheduleCreateNotebookExecutionJobRequest
Request for google_colab_notebook_execution. Structure is documented below.
Cron This property is required. string
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
DisplayName This property is required. string
Required. The display name of the Schedule.
Location This property is required. string
The location for the resource: https://cloud.google.com/colab/docs/locations
MaxConcurrentRunCount This property is required. string
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
AllowQueueing bool
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
DesiredState string
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
EndTime string
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
MaxRunCount string
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
Project Changes to this property will trigger replacement. string
StartTime string
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
CreateNotebookExecutionJobRequest
This property is required.
Changes to this property will trigger replacement.
ScheduleCreateNotebookExecutionJobRequestArgs
Request for google_colab_notebook_execution. Structure is documented below.
Cron This property is required. string
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
DisplayName This property is required. string
Required. The display name of the Schedule.
Location This property is required. string
The location for the resource: https://cloud.google.com/colab/docs/locations
MaxConcurrentRunCount This property is required. string
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
AllowQueueing bool
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
DesiredState string
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
EndTime string
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
MaxRunCount string
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
Project Changes to this property will trigger replacement. string
StartTime string
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
createNotebookExecutionJobRequest
This property is required.
Changes to this property will trigger replacement.
ScheduleCreateNotebookExecutionJobRequest
Request for google_colab_notebook_execution. Structure is documented below.
cron This property is required. String
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
displayName This property is required. String
Required. The display name of the Schedule.
location This property is required. String
The location for the resource: https://cloud.google.com/colab/docs/locations
maxConcurrentRunCount This property is required. String
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
allowQueueing Boolean
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
desiredState String
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
endTime String
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
maxRunCount String
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
project Changes to this property will trigger replacement. String
startTime String
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
createNotebookExecutionJobRequest
This property is required.
Changes to this property will trigger replacement.
ScheduleCreateNotebookExecutionJobRequest
Request for google_colab_notebook_execution. Structure is documented below.
cron This property is required. string
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
displayName This property is required. string
Required. The display name of the Schedule.
location This property is required. string
The location for the resource: https://cloud.google.com/colab/docs/locations
maxConcurrentRunCount This property is required. string
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
allowQueueing boolean
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
desiredState string
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
endTime string
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
maxRunCount string
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
project Changes to this property will trigger replacement. string
startTime string
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
create_notebook_execution_job_request
This property is required.
Changes to this property will trigger replacement.
ScheduleCreateNotebookExecutionJobRequestArgs
Request for google_colab_notebook_execution. Structure is documented below.
cron This property is required. str
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
display_name This property is required. str
Required. The display name of the Schedule.
location This property is required. str
The location for the resource: https://cloud.google.com/colab/docs/locations
max_concurrent_run_count This property is required. str
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
allow_queueing bool
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
desired_state str
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
end_time str
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
max_run_count str
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
project Changes to this property will trigger replacement. str
start_time str
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
createNotebookExecutionJobRequest
This property is required.
Changes to this property will trigger replacement.
Property Map
Request for google_colab_notebook_execution. Structure is documented below.
cron This property is required. String
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
displayName This property is required. String
Required. The display name of the Schedule.
location This property is required. String
The location for the resource: https://cloud.google.com/colab/docs/locations
maxConcurrentRunCount This property is required. String
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
allowQueueing Boolean
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
desiredState String
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
endTime String
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
maxRunCount String
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
project Changes to this property will trigger replacement. String
startTime String
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource name of the Schedule
State string
Output only. The state of the schedule.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The resource name of the Schedule
State string
Output only. The state of the schedule.
id String
The provider-assigned unique ID for this managed resource.
name String
The resource name of the Schedule
state String
Output only. The state of the schedule.
id string
The provider-assigned unique ID for this managed resource.
name string
The resource name of the Schedule
state string
Output only. The state of the schedule.
id str
The provider-assigned unique ID for this managed resource.
name str
The resource name of the Schedule
state str
Output only. The state of the schedule.
id String
The provider-assigned unique ID for this managed resource.
name String
The resource name of the Schedule
state String
Output only. The state of the schedule.

Look up Existing Schedule Resource

Get an existing Schedule 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?: ScheduleState, opts?: CustomResourceOptions): Schedule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_queueing: Optional[bool] = None,
        create_notebook_execution_job_request: Optional[ScheduleCreateNotebookExecutionJobRequestArgs] = None,
        cron: Optional[str] = None,
        desired_state: Optional[str] = None,
        display_name: Optional[str] = None,
        end_time: Optional[str] = None,
        location: Optional[str] = None,
        max_concurrent_run_count: Optional[str] = None,
        max_run_count: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        start_time: Optional[str] = None,
        state: Optional[str] = None) -> Schedule
func GetSchedule(ctx *Context, name string, id IDInput, state *ScheduleState, opts ...ResourceOption) (*Schedule, error)
public static Schedule Get(string name, Input<string> id, ScheduleState? state, CustomResourceOptions? opts = null)
public static Schedule get(String name, Output<String> id, ScheduleState state, CustomResourceOptions options)
resources:  _:    type: gcp:colab:Schedule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AllowQueueing bool
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
CreateNotebookExecutionJobRequest Changes to this property will trigger replacement. ScheduleCreateNotebookExecutionJobRequest
Request for google_colab_notebook_execution. Structure is documented below.
Cron string
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
DesiredState string
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
DisplayName string
Required. The display name of the Schedule.
EndTime string
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
Location string
The location for the resource: https://cloud.google.com/colab/docs/locations
MaxConcurrentRunCount string
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
MaxRunCount string
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
Name string
The resource name of the Schedule
Project Changes to this property will trigger replacement. string
StartTime string
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
State string
Output only. The state of the schedule.
AllowQueueing bool
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
CreateNotebookExecutionJobRequest Changes to this property will trigger replacement. ScheduleCreateNotebookExecutionJobRequestArgs
Request for google_colab_notebook_execution. Structure is documented below.
Cron string
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
DesiredState string
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
DisplayName string
Required. The display name of the Schedule.
EndTime string
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
Location string
The location for the resource: https://cloud.google.com/colab/docs/locations
MaxConcurrentRunCount string
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
MaxRunCount string
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
Name string
The resource name of the Schedule
Project Changes to this property will trigger replacement. string
StartTime string
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
State string
Output only. The state of the schedule.
allowQueueing Boolean
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
createNotebookExecutionJobRequest Changes to this property will trigger replacement. ScheduleCreateNotebookExecutionJobRequest
Request for google_colab_notebook_execution. Structure is documented below.
cron String
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
desiredState String
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
displayName String
Required. The display name of the Schedule.
endTime String
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
location String
The location for the resource: https://cloud.google.com/colab/docs/locations
maxConcurrentRunCount String
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
maxRunCount String
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
name String
The resource name of the Schedule
project Changes to this property will trigger replacement. String
startTime String
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
state String
Output only. The state of the schedule.
allowQueueing boolean
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
createNotebookExecutionJobRequest Changes to this property will trigger replacement. ScheduleCreateNotebookExecutionJobRequest
Request for google_colab_notebook_execution. Structure is documented below.
cron string
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
desiredState string
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
displayName string
Required. The display name of the Schedule.
endTime string
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
location string
The location for the resource: https://cloud.google.com/colab/docs/locations
maxConcurrentRunCount string
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
maxRunCount string
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
name string
The resource name of the Schedule
project Changes to this property will trigger replacement. string
startTime string
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
state string
Output only. The state of the schedule.
allow_queueing bool
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
create_notebook_execution_job_request Changes to this property will trigger replacement. ScheduleCreateNotebookExecutionJobRequestArgs
Request for google_colab_notebook_execution. Structure is documented below.
cron str
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
desired_state str
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
display_name str
Required. The display name of the Schedule.
end_time str
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
location str
The location for the resource: https://cloud.google.com/colab/docs/locations
max_concurrent_run_count str
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
max_run_count str
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
name str
The resource name of the Schedule
project Changes to this property will trigger replacement. str
start_time str
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
state str
Output only. The state of the schedule.
allowQueueing Boolean
Whether new scheduled runs can be queued when max_concurrent_runs limit is reached. If set to true, new runs will be queued instead of skipped. Default to false.
createNotebookExecutionJobRequest Changes to this property will trigger replacement. Property Map
Request for google_colab_notebook_execution. Structure is documented below.
cron String
Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs.
desiredState String
Desired state of the Colab Schedule. Set this field to 'ACTIVE' to start/resume the schedule, and 'PAUSED' to pause the schedule.
displayName String
Required. The display name of the Schedule.
endTime String
Timestamp after which no new runs can be scheduled. If specified, the schedule will be completed when either end_time is reached or when scheduled_run_count >= max_run_count. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
location String
The location for the resource: https://cloud.google.com/colab/docs/locations
maxConcurrentRunCount String
Maximum number of runs that can be started concurrently for this Schedule. This is the limit for starting the scheduled requests and not the execution of the notebook execution jobs created by the requests.
maxRunCount String
Maximum run count of the schedule. If specified, The schedule will be completed when either startedRunCount >= maxRunCount or when endTime is reached. If not specified, new runs will keep getting scheduled until this Schedule is paused or deleted. Already scheduled runs will be allowed to complete. Unset if not specified.
name String
The resource name of the Schedule
project Changes to this property will trigger replacement. String
startTime String
The timestamp after which the first run can be scheduled. Defaults to the schedule creation time. Must be in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format.
state String
Output only. The state of the schedule.

Supporting Types

ScheduleCreateNotebookExecutionJobRequest
, ScheduleCreateNotebookExecutionJobRequestArgs

NotebookExecutionJob This property is required. ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJob
The NotebookExecutionJob to create. Structure is documented below.
NotebookExecutionJob This property is required. ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJob
The NotebookExecutionJob to create. Structure is documented below.
notebookExecutionJob This property is required. ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJob
The NotebookExecutionJob to create. Structure is documented below.
notebookExecutionJob This property is required. ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJob
The NotebookExecutionJob to create. Structure is documented below.
notebook_execution_job This property is required. ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJob
The NotebookExecutionJob to create. Structure is documented below.
notebookExecutionJob This property is required. Property Map
The NotebookExecutionJob to create. Structure is documented below.

ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJob
, ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobArgs

DisplayName This property is required. string
Required. The display name of the Notebook Execution.
GcsOutputUri This property is required. string
The Cloud Storage location to upload the result to. Format:gs://bucket-name
NotebookRuntimeTemplateResourceName This property is required. string
The NotebookRuntimeTemplate to source compute configuration from.
DataformRepositorySource ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySource
The Dataform Repository containing the input notebook. Structure is documented below.
ExecutionTimeout string
Max running time of the execution job in seconds (default 86400s / 24 hrs). A duration in seconds with up to nine fractional digits, ending with "s". Example: "3.5s".
ExecutionUser string
The user email to run the execution as.
GcsNotebookSource ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSource
The Cloud Storage uri for the input notebook. Structure is documented below.
ServiceAccount string
The service account to run the execution as.
DisplayName This property is required. string
Required. The display name of the Notebook Execution.
GcsOutputUri This property is required. string
The Cloud Storage location to upload the result to. Format:gs://bucket-name
NotebookRuntimeTemplateResourceName This property is required. string
The NotebookRuntimeTemplate to source compute configuration from.
DataformRepositorySource ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySource
The Dataform Repository containing the input notebook. Structure is documented below.
ExecutionTimeout string
Max running time of the execution job in seconds (default 86400s / 24 hrs). A duration in seconds with up to nine fractional digits, ending with "s". Example: "3.5s".
ExecutionUser string
The user email to run the execution as.
GcsNotebookSource ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSource
The Cloud Storage uri for the input notebook. Structure is documented below.
ServiceAccount string
The service account to run the execution as.
displayName This property is required. String
Required. The display name of the Notebook Execution.
gcsOutputUri This property is required. String
The Cloud Storage location to upload the result to. Format:gs://bucket-name
notebookRuntimeTemplateResourceName This property is required. String
The NotebookRuntimeTemplate to source compute configuration from.
dataformRepositorySource ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySource
The Dataform Repository containing the input notebook. Structure is documented below.
executionTimeout String
Max running time of the execution job in seconds (default 86400s / 24 hrs). A duration in seconds with up to nine fractional digits, ending with "s". Example: "3.5s".
executionUser String
The user email to run the execution as.
gcsNotebookSource ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSource
The Cloud Storage uri for the input notebook. Structure is documented below.
serviceAccount String
The service account to run the execution as.
displayName This property is required. string
Required. The display name of the Notebook Execution.
gcsOutputUri This property is required. string
The Cloud Storage location to upload the result to. Format:gs://bucket-name
notebookRuntimeTemplateResourceName This property is required. string
The NotebookRuntimeTemplate to source compute configuration from.
dataformRepositorySource ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySource
The Dataform Repository containing the input notebook. Structure is documented below.
executionTimeout string
Max running time of the execution job in seconds (default 86400s / 24 hrs). A duration in seconds with up to nine fractional digits, ending with "s". Example: "3.5s".
executionUser string
The user email to run the execution as.
gcsNotebookSource ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSource
The Cloud Storage uri for the input notebook. Structure is documented below.
serviceAccount string
The service account to run the execution as.
display_name This property is required. str
Required. The display name of the Notebook Execution.
gcs_output_uri This property is required. str
The Cloud Storage location to upload the result to. Format:gs://bucket-name
notebook_runtime_template_resource_name This property is required. str
The NotebookRuntimeTemplate to source compute configuration from.
dataform_repository_source ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySource
The Dataform Repository containing the input notebook. Structure is documented below.
execution_timeout str
Max running time of the execution job in seconds (default 86400s / 24 hrs). A duration in seconds with up to nine fractional digits, ending with "s". Example: "3.5s".
execution_user str
The user email to run the execution as.
gcs_notebook_source ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSource
The Cloud Storage uri for the input notebook. Structure is documented below.
service_account str
The service account to run the execution as.
displayName This property is required. String
Required. The display name of the Notebook Execution.
gcsOutputUri This property is required. String
The Cloud Storage location to upload the result to. Format:gs://bucket-name
notebookRuntimeTemplateResourceName This property is required. String
The NotebookRuntimeTemplate to source compute configuration from.
dataformRepositorySource Property Map
The Dataform Repository containing the input notebook. Structure is documented below.
executionTimeout String
Max running time of the execution job in seconds (default 86400s / 24 hrs). A duration in seconds with up to nine fractional digits, ending with "s". Example: "3.5s".
executionUser String
The user email to run the execution as.
gcsNotebookSource Property Map
The Cloud Storage uri for the input notebook. Structure is documented below.
serviceAccount String
The service account to run the execution as.

ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySource
, ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobDataformRepositorySourceArgs

DataformRepositoryResourceName This property is required. string
The resource name of the Dataform Repository.
CommitSha string
The commit SHA to read repository with. If unset, the file will be read at HEAD.
DataformRepositoryResourceName This property is required. string
The resource name of the Dataform Repository.
CommitSha string
The commit SHA to read repository with. If unset, the file will be read at HEAD.
dataformRepositoryResourceName This property is required. String
The resource name of the Dataform Repository.
commitSha String
The commit SHA to read repository with. If unset, the file will be read at HEAD.
dataformRepositoryResourceName This property is required. string
The resource name of the Dataform Repository.
commitSha string
The commit SHA to read repository with. If unset, the file will be read at HEAD.
dataform_repository_resource_name This property is required. str
The resource name of the Dataform Repository.
commit_sha str
The commit SHA to read repository with. If unset, the file will be read at HEAD.
dataformRepositoryResourceName This property is required. String
The resource name of the Dataform Repository.
commitSha String
The commit SHA to read repository with. If unset, the file will be read at HEAD.

ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSource
, ScheduleCreateNotebookExecutionJobRequestNotebookExecutionJobGcsNotebookSourceArgs

Uri This property is required. string
The Cloud Storage uri pointing to the ipynb file. Format: gs://bucket/notebook_file.ipynb
Generation string
The version of the Cloud Storage object to read. If unset, the current version of the object is read. See https://cloud.google.com/storage/docs/metadata#generation-number.


Uri This property is required. string
The Cloud Storage uri pointing to the ipynb file. Format: gs://bucket/notebook_file.ipynb
Generation string
The version of the Cloud Storage object to read. If unset, the current version of the object is read. See https://cloud.google.com/storage/docs/metadata#generation-number.


uri This property is required. String
The Cloud Storage uri pointing to the ipynb file. Format: gs://bucket/notebook_file.ipynb
generation String
The version of the Cloud Storage object to read. If unset, the current version of the object is read. See https://cloud.google.com/storage/docs/metadata#generation-number.


uri This property is required. string
The Cloud Storage uri pointing to the ipynb file. Format: gs://bucket/notebook_file.ipynb
generation string
The version of the Cloud Storage object to read. If unset, the current version of the object is read. See https://cloud.google.com/storage/docs/metadata#generation-number.


uri This property is required. str
The Cloud Storage uri pointing to the ipynb file. Format: gs://bucket/notebook_file.ipynb
generation str
The version of the Cloud Storage object to read. If unset, the current version of the object is read. See https://cloud.google.com/storage/docs/metadata#generation-number.


uri This property is required. String
The Cloud Storage uri pointing to the ipynb file. Format: gs://bucket/notebook_file.ipynb
generation String
The version of the Cloud Storage object to read. If unset, the current version of the object is read. See https://cloud.google.com/storage/docs/metadata#generation-number.


Import

Schedule can be imported using any of these accepted formats:

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

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

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

When using the pulumi import command, Schedule can be imported using one of the formats above. For example:

$ pulumi import gcp:colab/schedule:Schedule default projects/{{project}}/locations/{{location}}/schedules/{{name}}
Copy
$ pulumi import gcp:colab/schedule:Schedule default {{project}}/{{location}}/{{name}}
Copy
$ pulumi import gcp:colab/schedule:Schedule default {{location}}/{{name}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.