getJob

suspend fun getJob(argument: GetJobPlainArgs): GetJobResult

Get information about a Google Cloud Run v2 Job. For more information see the official documentation and API.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myJob = gcp.cloudrunv2.getJob({
name: "my-job",
location: "us-central1",
});
import pulumi
import pulumi_gcp as gcp
my_job = gcp.cloudrunv2.get_job(name="my-job",
location="us-central1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var myJob = Gcp.CloudRunV2.GetJob.Invoke(new()
{
Name = "my-job",
Location = "us-central1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrunv2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudrunv2.LookupJob(ctx, &cloudrunv2.LookupJobArgs{
Name: "my-job",
Location: pulumi.StringRef("us-central1"),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudrunv2.Cloudrunv2Functions;
import com.pulumi.gcp.cloudrunv2.inputs.GetJobArgs;
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) {
final var myJob = Cloudrunv2Functions.getJob(GetJobArgs.builder()
.name("my-job")
.location("us-central1")
.build());
}
}
variables:
myJob:
fn::invoke:
Function: gcp:cloudrunv2:getJob
Arguments:
name: my-job
location: us-central1

Return

A collection of values returned by getJob.

Parameters

argument

A collection of arguments for invoking getJob.


suspend fun getJob(location: String? = null, name: String, project: String? = null): GetJobResult

Return

A collection of values returned by getJob.

Parameters

location

The location of the instance. eg us-central1

name

The name of the Cloud Run v2 Job.

project

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

See also


suspend fun getJob(argument: suspend GetJobPlainArgsBuilder.() -> Unit): GetJobResult

Return

A collection of values returned by getJob.

Parameters

argument

Builder for com.pulumi.gcp.cloudrunv2.kotlin.inputs.GetJobPlainArgs.

See also