Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi
gcp.dataproc.getJobIamPolicy
Explore with Pulumi AI
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/v8/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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:dataproc/getJobIamPolicy:getJobIamPolicy
arguments:
# arguments dictionary
The following arguments are supported:
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-beta
Terraform Provider.