1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. dataproc
  5. getMetastoreTableIamPolicy
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.dataproc.getMetastoreTableIamPolicy

Explore with Pulumi AI

Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

Retrieves the current IAM policy data for table

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const policy = gcp.dataproc.getMetastoreTableIamPolicy({
    project: dpmsService.project,
    location: dpmsService.location,
    serviceId: dpmsService.serviceId,
    databaseId: hive.hiveConfig[0].properties.database,
    table: hive.hiveConfig[0].properties.table,
});
Copy
import pulumi
import pulumi_gcp as gcp

policy = gcp.dataproc.get_metastore_table_iam_policy(project=dpms_service["project"],
    location=dpms_service["location"],
    service_id=dpms_service["serviceId"],
    database_id=hive["hiveConfig"][0]["properties"]["database"],
    table=hive["hiveConfig"][0]["properties"]["table"])
Copy
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.LookupMetastoreTableIamPolicy(ctx, &dataproc.LookupMetastoreTableIamPolicyArgs{
			Project:    pulumi.StringRef(dpmsService.Project),
			Location:   pulumi.StringRef(dpmsService.Location),
			ServiceId:  dpmsService.ServiceId,
			DatabaseId: hive.HiveConfig[0].Properties.Database,
			Table:      hive.HiveConfig[0].Properties.Table,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var policy = Gcp.Dataproc.GetMetastoreTableIamPolicy.Invoke(new()
    {
        Project = dpmsService.Project,
        Location = dpmsService.Location,
        ServiceId = dpmsService.ServiceId,
        DatabaseId = hive.HiveConfig[0].Properties.Database,
        Table = hive.HiveConfig[0].Properties.Table,
    });

});
Copy
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.GetMetastoreTableIamPolicyArgs;
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.getMetastoreTableIamPolicy(GetMetastoreTableIamPolicyArgs.builder()
            .project(dpmsService.project())
            .location(dpmsService.location())
            .serviceId(dpmsService.serviceId())
            .databaseId(hive.hiveConfig()[0].properties().database())
            .table(hive.hiveConfig()[0].properties().table())
            .build());

    }
}
Copy
variables:
  policy:
    fn::invoke:
      function: gcp:dataproc:getMetastoreTableIamPolicy
      arguments:
        project: ${dpmsService.project}
        location: ${dpmsService.location}
        serviceId: ${dpmsService.serviceId}
        databaseId: ${hive.hiveConfig[0].properties.database}
        table: ${hive.hiveConfig[0].properties.table}
Copy

Using getMetastoreTableIamPolicy

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 getMetastoreTableIamPolicy(args: GetMetastoreTableIamPolicyArgs, opts?: InvokeOptions): Promise<GetMetastoreTableIamPolicyResult>
function getMetastoreTableIamPolicyOutput(args: GetMetastoreTableIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetMetastoreTableIamPolicyResult>
Copy
def get_metastore_table_iam_policy(database_id: Optional[str] = None,
                                   location: Optional[str] = None,
                                   project: Optional[str] = None,
                                   service_id: Optional[str] = None,
                                   table: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetMetastoreTableIamPolicyResult
def get_metastore_table_iam_policy_output(database_id: Optional[pulumi.Input[str]] = None,
                                   location: Optional[pulumi.Input[str]] = None,
                                   project: Optional[pulumi.Input[str]] = None,
                                   service_id: Optional[pulumi.Input[str]] = None,
                                   table: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetMetastoreTableIamPolicyResult]
Copy
func LookupMetastoreTableIamPolicy(ctx *Context, args *LookupMetastoreTableIamPolicyArgs, opts ...InvokeOption) (*LookupMetastoreTableIamPolicyResult, error)
func LookupMetastoreTableIamPolicyOutput(ctx *Context, args *LookupMetastoreTableIamPolicyOutputArgs, opts ...InvokeOption) LookupMetastoreTableIamPolicyResultOutput
Copy

> Note: This function is named LookupMetastoreTableIamPolicy in the Go SDK.

public static class GetMetastoreTableIamPolicy 
{
    public static Task<GetMetastoreTableIamPolicyResult> InvokeAsync(GetMetastoreTableIamPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetMetastoreTableIamPolicyResult> Invoke(GetMetastoreTableIamPolicyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMetastoreTableIamPolicyResult> getMetastoreTableIamPolicy(GetMetastoreTableIamPolicyArgs args, InvokeOptions options)
public static Output<GetMetastoreTableIamPolicyResult> getMetastoreTableIamPolicy(GetMetastoreTableIamPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:dataproc/getMetastoreTableIamPolicy:getMetastoreTableIamPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DatabaseId
This property is required.
Changes to this property will trigger replacement.
string
ServiceId
This property is required.
Changes to this property will trigger replacement.
string
Table
This property is required.
Changes to this property will trigger replacement.
string
Used to find the parent resource to bind the IAM policy to
Location Changes to this property will trigger replacement. string
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
DatabaseId
This property is required.
Changes to this property will trigger replacement.
string
ServiceId
This property is required.
Changes to this property will trigger replacement.
string
Table
This property is required.
Changes to this property will trigger replacement.
string
Used to find the parent resource to bind the IAM policy to
Location Changes to this property will trigger replacement. string
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
databaseId
This property is required.
Changes to this property will trigger replacement.
String
serviceId
This property is required.
Changes to this property will trigger replacement.
String
table
This property is required.
Changes to this property will trigger replacement.
String
Used to find the parent resource to bind the IAM policy to
location Changes to this property will trigger replacement. String
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
databaseId
This property is required.
Changes to this property will trigger replacement.
string
serviceId
This property is required.
Changes to this property will trigger replacement.
string
table
This property is required.
Changes to this property will trigger replacement.
string
Used to find the parent resource to bind the IAM policy to
location Changes to this property will trigger replacement. string
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
database_id
This property is required.
Changes to this property will trigger replacement.
str
service_id
This property is required.
Changes to this property will trigger replacement.
str
table
This property is required.
Changes to this property will trigger replacement.
str
Used to find the parent resource to bind the IAM policy to
location Changes to this property will trigger replacement. str
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
databaseId
This property is required.
Changes to this property will trigger replacement.
String
serviceId
This property is required.
Changes to this property will trigger replacement.
String
table
This property is required.
Changes to this property will trigger replacement.
String
Used to find the parent resource to bind the IAM policy to
location Changes to this property will trigger replacement. String
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.

getMetastoreTableIamPolicy Result

The following output properties are available:

DatabaseId string
Etag string
(Computed) The etag of the IAM policy.
Id string
The provider-assigned unique ID for this managed resource.
Location string
PolicyData string
(Required only by gcp.dataproc.MetastoreTableIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
Project string
ServiceId string
Table string
DatabaseId string
Etag string
(Computed) The etag of the IAM policy.
Id string
The provider-assigned unique ID for this managed resource.
Location string
PolicyData string
(Required only by gcp.dataproc.MetastoreTableIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
Project string
ServiceId string
Table string
databaseId String
etag String
(Computed) The etag of the IAM policy.
id String
The provider-assigned unique ID for this managed resource.
location String
policyData String
(Required only by gcp.dataproc.MetastoreTableIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
project String
serviceId String
table String
databaseId string
etag string
(Computed) The etag of the IAM policy.
id string
The provider-assigned unique ID for this managed resource.
location string
policyData string
(Required only by gcp.dataproc.MetastoreTableIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
project string
serviceId string
table string
database_id str
etag str
(Computed) The etag of the IAM policy.
id str
The provider-assigned unique ID for this managed resource.
location str
policy_data str
(Required only by gcp.dataproc.MetastoreTableIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
project str
service_id str
table str
databaseId String
etag String
(Computed) The etag of the IAM policy.
id String
The provider-assigned unique ID for this managed resource.
location String
policyData String
(Required only by gcp.dataproc.MetastoreTableIamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
project String
serviceId String
table String

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.
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi