Module cloudscheduler

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.

Resources

Others

Resources

Resource Job

class Job extends CustomResource

A scheduled job that can publish a pubsub message or a http request every X interval of time, using crontab format string.

To use Cloud Scheduler your project must contain an App Engine app that is located in one of the supported regions. If your project does not have an App Engine app, you must create one.

To get more information about Job, see:

Example Usage - Scheduler Job Pubsub

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

const topic = new gcp.pubsub.Topic("topic", {});
const job = new gcp.cloudscheduler.Job("job", {
    description: "test job",
    pubsubTarget: {
        data: Buffer.from("test").toString("base64"),
        topicName: topic.id,
    },
    schedule: "*/2 * * * *",
});

Example Usage - Scheduler Job Http

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

const job = new gcp.cloudscheduler.Job("job", {
    description: "test http job",
    httpTarget: {
        httpMethod: "POST",
        uri: "https://example.com/ping",
    },
    schedule: "*/8 * * * *",
    timeZone: "America/New_York",
});

Example Usage - Scheduler Job App Engine

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

const job = new gcp.cloudscheduler.Job("job", {
    appEngineHttpTarget: {
        appEngineRouting: {
            instance: "my-instance-001",
            service: "web",
            version: "prod",
        },
        httpMethod: "POST",
        relativeUri: "/ping",
    },
    description: "test app engine job",
    schedule: "*/4 * * * *",
    timeZone: "Europe/London",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/cloud_scheduler_job.html.markdown.

constructor

new Job(name: string, args?: JobArgs, opts?: pulumi.CustomResourceOptions)

Create a Job resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: JobState, opts?: pulumi.CustomResourceOptions): Job

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Job. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property appEngineHttpTarget

public appEngineHttpTarget: pulumi.Output<outputs.cloudscheduler.JobAppEngineHttpTarget | undefined>;

property description

public description: pulumi.Output<string | undefined>;

property httpTarget

public httpTarget: pulumi.Output<outputs.cloudscheduler.JobHttpTarget | undefined>;

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

property project

public project: pulumi.Output<string>;

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

property pubsubTarget

public pubsubTarget: pulumi.Output<outputs.cloudscheduler.JobPubsubTarget | undefined>;

property region

public region: pulumi.Output<string>;

property retryConfig

public retryConfig: pulumi.Output<outputs.cloudscheduler.JobRetryConfig | undefined>;

property schedule

public schedule: pulumi.Output<string | undefined>;

property timeZone

public timeZone: pulumi.Output<string | undefined>;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

interface JobArgs

interface JobArgs

The set of arguments for constructing a Job resource.

property appEngineHttpTarget

appEngineHttpTarget?: pulumi.Input<inputs.cloudscheduler.JobAppEngineHttpTarget>;

property description

description?: pulumi.Input<string>;

property httpTarget

httpTarget?: pulumi.Input<inputs.cloudscheduler.JobHttpTarget>;

property name

name?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

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

property pubsubTarget

pubsubTarget?: pulumi.Input<inputs.cloudscheduler.JobPubsubTarget>;

property region

region?: pulumi.Input<string>;

property retryConfig

retryConfig?: pulumi.Input<inputs.cloudscheduler.JobRetryConfig>;

property schedule

schedule?: pulumi.Input<string>;

property timeZone

timeZone?: pulumi.Input<string>;

interface JobState

interface JobState

Input properties used for looking up and filtering Job resources.

property appEngineHttpTarget

appEngineHttpTarget?: pulumi.Input<inputs.cloudscheduler.JobAppEngineHttpTarget>;

property description

description?: pulumi.Input<string>;

property httpTarget

httpTarget?: pulumi.Input<inputs.cloudscheduler.JobHttpTarget>;

property name

name?: pulumi.Input<string>;

property project

project?: pulumi.Input<string>;

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

property pubsubTarget

pubsubTarget?: pulumi.Input<inputs.cloudscheduler.JobPubsubTarget>;

property region

region?: pulumi.Input<string>;

property retryConfig

retryConfig?: pulumi.Input<inputs.cloudscheduler.JobRetryConfig>;

property schedule

schedule?: pulumi.Input<string>;

property timeZone

timeZone?: pulumi.Input<string>;