Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Viewing docs for Google Cloud v9.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Retrieves the current IAM policy data for a Dataproc cluster.
example
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = gcp.dataproc.getClusterIamPolicy({
cluster: cluster.name,
region: "us-central1",
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.dataproc.get_cluster_iam_policy(cluster=cluster["name"],
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.GetClusterIamPolicy(ctx, &dataproc.GetClusterIamPolicyArgs{
Cluster: cluster.Name,
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.GetClusterIamPolicy.Invoke(new()
{
Cluster = cluster.Name,
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.GetClusterIamPolicyArgs;
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.getClusterIamPolicy(GetClusterIamPolicyArgs.builder()
.cluster(cluster.name())
.region("us-central1")
.build());
}
}
variables:
policy:
fn::invoke:
function: gcp:dataproc:getClusterIamPolicy
arguments:
cluster: ${cluster.name}
region: us-central1
Using getClusterIamPolicy
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 getClusterIamPolicy(args: GetClusterIamPolicyArgs, opts?: InvokeOptions): Promise<GetClusterIamPolicyResult>
function getClusterIamPolicyOutput(args: GetClusterIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetClusterIamPolicyResult>def get_cluster_iam_policy(cluster: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetClusterIamPolicyResult
def get_cluster_iam_policy_output(cluster: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetClusterIamPolicyResult]func GetClusterIamPolicy(ctx *Context, args *GetClusterIamPolicyArgs, opts ...InvokeOption) (*GetClusterIamPolicyResult, error)
func GetClusterIamPolicyOutput(ctx *Context, args *GetClusterIamPolicyOutputArgs, opts ...InvokeOption) GetClusterIamPolicyResultOutput> Note: This function is named GetClusterIamPolicy in the Go SDK.
public static class GetClusterIamPolicy
{
public static Task<GetClusterIamPolicyResult> InvokeAsync(GetClusterIamPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetClusterIamPolicyResult> Invoke(GetClusterIamPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetClusterIamPolicyResult> getClusterIamPolicy(GetClusterIamPolicyArgs args, InvokeOptions options)
public static Output<GetClusterIamPolicyResult> getClusterIamPolicy(GetClusterIamPolicyArgs args, InvokeOptions options)
fn::invoke:
function: gcp:dataproc/getClusterIamPolicy:getClusterIamPolicy
arguments:
# arguments dictionaryThe following arguments are supported:
- Cluster string
- The name or relative resource id of the cluster to manage IAM policies for.
- Project string
- The project in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- Region string
- The region in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- Cluster string
- The name or relative resource id of the cluster to manage IAM policies for.
- Project string
- The project in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- Region string
- The region in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- cluster String
- The name or relative resource id of the cluster to manage IAM policies for.
- project String
- The project in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- region String
- The region in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- cluster string
- The name or relative resource id of the cluster to manage IAM policies for.
- project string
- The project in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- region string
- The region in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- cluster str
- The name or relative resource id of the cluster to manage IAM policies for.
- project str
- The project in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- region str
- The region in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- cluster String
- The name or relative resource id of the cluster to manage IAM policies for.
- project String
- The project in which the cluster belongs. If it is not provided, Terraform will use the provider default.
- region String
- The region in which the cluster belongs. If it is not provided, Terraform will use the provider default.
getClusterIamPolicy 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.15.0
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
