Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
Retrieves the current IAM policy data for a Dataproc job.
example
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = gcp.dataproc.getJobIamPolicy({
jobId: pyspark.reference[0].jobId,
region: "us-central1",
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.dataproc.get_job_iam_policy(job_id=pyspark["reference"][0]["jobId"],
region="us-central1")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/dataproc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dataproc.GetJobIamPolicy(ctx, &dataproc.GetJobIamPolicyArgs{
JobId: pyspark.Reference[0].JobId,
Region: pulumi.StringRef("us-central1"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var policy = Gcp.Dataproc.GetJobIamPolicy.Invoke(new()
{
JobId = pyspark.Reference[0].JobId,
Region = "us-central1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataproc.DataprocFunctions;
import com.pulumi.gcp.dataproc.inputs.GetJobIamPolicyArgs;
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 policy = DataprocFunctions.getJobIamPolicy(GetJobIamPolicyArgs.builder()
.jobId(pyspark.reference()[0].jobId())
.region("us-central1")
.build());
}
}
variables:
policy:
fn::invoke:
function: gcp:dataproc:getJobIamPolicy
arguments:
jobId: ${pyspark.reference[0].jobId}
region: us-central1
Using getJobIamPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getJobIamPolicy(args: GetJobIamPolicyArgs, opts?: InvokeOptions): Promise<GetJobIamPolicyResult>
function getJobIamPolicyOutput(args: GetJobIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetJobIamPolicyResult>def get_job_iam_policy(job_id: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetJobIamPolicyResult
def get_job_iam_policy_output(job_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetJobIamPolicyResult]func GetJobIamPolicy(ctx *Context, args *GetJobIamPolicyArgs, opts ...InvokeOption) (*GetJobIamPolicyResult, error)
func GetJobIamPolicyOutput(ctx *Context, args *GetJobIamPolicyOutputArgs, opts ...InvokeOption) GetJobIamPolicyResultOutput> Note: This function is named GetJobIamPolicy in the Go SDK.
public static class GetJobIamPolicy
{
public static Task<GetJobIamPolicyResult> InvokeAsync(GetJobIamPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetJobIamPolicyResult> Invoke(GetJobIamPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetJobIamPolicyResult> getJobIamPolicy(GetJobIamPolicyArgs args, InvokeOptions options)
public static Output<GetJobIamPolicyResult> getJobIamPolicy(GetJobIamPolicyArgs args, InvokeOptions options)
fn::invoke:
function: gcp:dataproc/getJobIamPolicy:getJobIamPolicy
arguments:
# arguments dictionaryThe following arguments are supported:
- Job
Id string - The name or relative resource id of the job to manage IAM policies for.
- Project string
- The project in which the job belongs. If it is not provided, Terraform will use the provider default.
- Region string
- The region in which the job belongs. If it is not provided, Terraform will use the provider default.
- Job
Id string - The name or relative resource id of the job to manage IAM policies for.
- Project string
- The project in which the job belongs. If it is not provided, Terraform will use the provider default.
- Region string
- The region in which the job belongs. If it is not provided, Terraform will use the provider default.
- job
Id String - The name or relative resource id of the job to manage IAM policies for.
- project String
- The project in which the job belongs. If it is not provided, Terraform will use the provider default.
- region String
- The region in which the job belongs. If it is not provided, Terraform will use the provider default.
- job
Id string - The name or relative resource id of the job to manage IAM policies for.
- project string
- The project in which the job belongs. If it is not provided, Terraform will use the provider default.
- region string
- The region in which the job belongs. If it is not provided, Terraform will use the provider default.
- job_
id str - The name or relative resource id of the job to manage IAM policies for.
- project str
- The project in which the job belongs. If it is not provided, Terraform will use the provider default.
- region str
- The region in which the job belongs. If it is not provided, Terraform will use the provider default.
- job
Id String - The name or relative resource id of the job to manage IAM policies for.
- project String
- The project in which the job belongs. If it is not provided, Terraform will use the provider default.
- region String
- The region in which the job belongs. If it is not provided, Terraform will use the provider default.
getJobIamPolicy Result
The following output properties are available:
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
published on Thursday, Mar 19, 2026 by Pulumi
