Google Cloud v8.29.0 published on Thursday, May 1, 2025 by Pulumi
gcp.dataproc.getMetastoreDatabaseIamPolicy
Explore with Pulumi AI
Retrieves the current IAM policy data for database
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = gcp.dataproc.getMetastoreDatabaseIamPolicy({
project: dpmsService.project,
location: dpmsService.location,
serviceId: dpmsService.serviceId,
database: hive.hiveConfig[0].properties.database,
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.dataproc.get_metastore_database_iam_policy(project=dpms_service["project"],
location=dpms_service["location"],
service_id=dpms_service["serviceId"],
database=hive["hiveConfig"][0]["properties"]["database"])
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.LookupMetastoreDatabaseIamPolicy(ctx, &dataproc.LookupMetastoreDatabaseIamPolicyArgs{
Project: pulumi.StringRef(dpmsService.Project),
Location: pulumi.StringRef(dpmsService.Location),
ServiceId: dpmsService.ServiceId,
Database: hive.HiveConfig[0].Properties.Database,
}, 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.GetMetastoreDatabaseIamPolicy.Invoke(new()
{
Project = dpmsService.Project,
Location = dpmsService.Location,
ServiceId = dpmsService.ServiceId,
Database = hive.HiveConfig[0].Properties.Database,
});
});
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.GetMetastoreDatabaseIamPolicyArgs;
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.getMetastoreDatabaseIamPolicy(GetMetastoreDatabaseIamPolicyArgs.builder()
.project(dpmsService.project())
.location(dpmsService.location())
.serviceId(dpmsService.serviceId())
.database(hive.hiveConfig()[0].properties().database())
.build());
}
}
variables:
policy:
fn::invoke:
function: gcp:dataproc:getMetastoreDatabaseIamPolicy
arguments:
project: ${dpmsService.project}
location: ${dpmsService.location}
serviceId: ${dpmsService.serviceId}
database: ${hive.hiveConfig[0].properties.database}
Using getMetastoreDatabaseIamPolicy
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 getMetastoreDatabaseIamPolicy(args: GetMetastoreDatabaseIamPolicyArgs, opts?: InvokeOptions): Promise<GetMetastoreDatabaseIamPolicyResult>
function getMetastoreDatabaseIamPolicyOutput(args: GetMetastoreDatabaseIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetMetastoreDatabaseIamPolicyResult>
def get_metastore_database_iam_policy(database: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None,
service_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMetastoreDatabaseIamPolicyResult
def get_metastore_database_iam_policy_output(database: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
service_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMetastoreDatabaseIamPolicyResult]
func LookupMetastoreDatabaseIamPolicy(ctx *Context, args *LookupMetastoreDatabaseIamPolicyArgs, opts ...InvokeOption) (*LookupMetastoreDatabaseIamPolicyResult, error)
func LookupMetastoreDatabaseIamPolicyOutput(ctx *Context, args *LookupMetastoreDatabaseIamPolicyOutputArgs, opts ...InvokeOption) LookupMetastoreDatabaseIamPolicyResultOutput
> Note: This function is named LookupMetastoreDatabaseIamPolicy
in the Go SDK.
public static class GetMetastoreDatabaseIamPolicy
{
public static Task<GetMetastoreDatabaseIamPolicyResult> InvokeAsync(GetMetastoreDatabaseIamPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetMetastoreDatabaseIamPolicyResult> Invoke(GetMetastoreDatabaseIamPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMetastoreDatabaseIamPolicyResult> getMetastoreDatabaseIamPolicy(GetMetastoreDatabaseIamPolicyArgs args, InvokeOptions options)
public static Output<GetMetastoreDatabaseIamPolicyResult> getMetastoreDatabaseIamPolicy(GetMetastoreDatabaseIamPolicyArgs args, InvokeOptions options)
fn::invoke:
function: gcp:dataproc/getMetastoreDatabaseIamPolicy:getMetastoreDatabaseIamPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Database string
- Used to find the parent resource to bind the IAM policy to
- Service
Id string - Location string
- Project 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 string
- Used to find the parent resource to bind the IAM policy to
- Service
Id string - Location string
- Project 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 String
- Used to find the parent resource to bind the IAM policy to
- service
Id String - location String
- project 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 string
- Used to find the parent resource to bind the IAM policy to
- service
Id string - location string
- project 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 str
- Used to find the parent resource to bind the IAM policy to
- service_
id str - location str
- project 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.
- database String
- Used to find the parent resource to bind the IAM policy to
- service
Id String - location String
- project 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.
getMetastoreDatabaseIamPolicy Result
The following output properties are available:
- Database string
- Etag string
- (Computed) The etag of the IAM policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Policy
Data string - (Required only by
gcp.dataproc.MetastoreDatabaseIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - Project string
- Service
Id string
- Database string
- Etag string
- (Computed) The etag of the IAM policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Policy
Data string - (Required only by
gcp.dataproc.MetastoreDatabaseIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - Project string
- Service
Id string
- database String
- etag String
- (Computed) The etag of the IAM policy.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- policy
Data String - (Required only by
gcp.dataproc.MetastoreDatabaseIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project String
- service
Id String
- database string
- etag string
- (Computed) The etag of the IAM policy.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- policy
Data string - (Required only by
gcp.dataproc.MetastoreDatabaseIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project string
- service
Id string
- database 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.MetastoreDatabaseIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project str
- service_
id str
- database String
- etag String
- (Computed) The etag of the IAM policy.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- policy
Data String - (Required only by
gcp.dataproc.MetastoreDatabaseIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project String
- service
Id 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.