Namespace Pulumi.Gcp.CloudScheduler
Classes
Job
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:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - Scheduler Job Http
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var job = new Gcp.CloudScheduler.Job("job", new Gcp.CloudScheduler.JobArgs
{
AttemptDeadline = "320s",
Description = "test http job",
HttpTarget = new Gcp.CloudScheduler.Inputs.JobHttpTargetArgs
{
HttpMethod = "POST",
Uri = "https://example.com/ping",
},
RetryConfig = new Gcp.CloudScheduler.Inputs.JobRetryConfigArgs
{
RetryCount = 1,
},
Schedule = "*/8 * * * *",
TimeZone = "America/New_York",
});
}
}
Example Usage - Scheduler Job App Engine
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var job = new Gcp.CloudScheduler.Job("job", new Gcp.CloudScheduler.JobArgs
{
AppEngineHttpTarget = new Gcp.CloudScheduler.Inputs.JobAppEngineHttpTargetArgs
{
AppEngineRouting = new Gcp.CloudScheduler.Inputs.JobAppEngineHttpTargetAppEngineRoutingArgs
{
Instance = "my-instance-001",
Service = "web",
Version = "prod",
},
HttpMethod = "POST",
RelativeUri = "/ping",
},
AttemptDeadline = "320s",
Description = "test app engine job",
RetryConfig = new Gcp.CloudScheduler.Inputs.JobRetryConfigArgs
{
MaxDoublings = 2,
MaxRetryDuration = "10s",
MinBackoffDuration = "1s",
RetryCount = 3,
},
Schedule = "*/4 * * * *",
TimeZone = "Europe/London",
});
}
}