Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi
gcp.bigquery.getDatapolicyv2DataPolicyIamPolicy
Retrieves the current IAM policy data for datapolicy
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const policy = gcp.bigquery.getDatapolicyv2DataPolicyIamPolicy({
project: basicDataPolicy.project,
location: basicDataPolicy.location,
dataPolicyId: basicDataPolicy.dataPolicyId,
});
import pulumi
import pulumi_gcp as gcp
policy = gcp.bigquery.get_datapolicyv2_data_policy_iam_policy(project=basic_data_policy["project"],
location=basic_data_policy["location"],
data_policy_id=basic_data_policy["dataPolicyId"])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bigquery.LookupDatapolicyv2DataPolicyIamPolicy(ctx, &bigquery.LookupDatapolicyv2DataPolicyIamPolicyArgs{
Project: pulumi.StringRef(basicDataPolicy.Project),
Location: pulumi.StringRef(basicDataPolicy.Location),
DataPolicyId: basicDataPolicy.DataPolicyId,
}, 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.BigQuery.GetDatapolicyv2DataPolicyIamPolicy.Invoke(new()
{
Project = basicDataPolicy.Project,
Location = basicDataPolicy.Location,
DataPolicyId = basicDataPolicy.DataPolicyId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigquery.BigqueryFunctions;
import com.pulumi.gcp.bigquery.inputs.GetDatapolicyv2DataPolicyIamPolicyArgs;
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 = BigqueryFunctions.getDatapolicyv2DataPolicyIamPolicy(GetDatapolicyv2DataPolicyIamPolicyArgs.builder()
.project(basicDataPolicy.project())
.location(basicDataPolicy.location())
.dataPolicyId(basicDataPolicy.dataPolicyId())
.build());
}
}
variables:
policy:
fn::invoke:
function: gcp:bigquery:getDatapolicyv2DataPolicyIamPolicy
arguments:
project: ${basicDataPolicy.project}
location: ${basicDataPolicy.location}
dataPolicyId: ${basicDataPolicy.dataPolicyId}
Using getDatapolicyv2DataPolicyIamPolicy
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 getDatapolicyv2DataPolicyIamPolicy(args: GetDatapolicyv2DataPolicyIamPolicyArgs, opts?: InvokeOptions): Promise<GetDatapolicyv2DataPolicyIamPolicyResult>
function getDatapolicyv2DataPolicyIamPolicyOutput(args: GetDatapolicyv2DataPolicyIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetDatapolicyv2DataPolicyIamPolicyResult>
def get_datapolicyv2_data_policy_iam_policy(data_policy_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatapolicyv2DataPolicyIamPolicyResult
def get_datapolicyv2_data_policy_iam_policy_output(data_policy_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatapolicyv2DataPolicyIamPolicyResult]
func LookupDatapolicyv2DataPolicyIamPolicy(ctx *Context, args *LookupDatapolicyv2DataPolicyIamPolicyArgs, opts ...InvokeOption) (*LookupDatapolicyv2DataPolicyIamPolicyResult, error)
func LookupDatapolicyv2DataPolicyIamPolicyOutput(ctx *Context, args *LookupDatapolicyv2DataPolicyIamPolicyOutputArgs, opts ...InvokeOption) LookupDatapolicyv2DataPolicyIamPolicyResultOutput
> Note: This function is named LookupDatapolicyv2DataPolicyIamPolicy
in the Go SDK.
public static class GetDatapolicyv2DataPolicyIamPolicy
{
public static Task<GetDatapolicyv2DataPolicyIamPolicyResult> InvokeAsync(GetDatapolicyv2DataPolicyIamPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetDatapolicyv2DataPolicyIamPolicyResult> Invoke(GetDatapolicyv2DataPolicyIamPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatapolicyv2DataPolicyIamPolicyResult> getDatapolicyv2DataPolicyIamPolicy(GetDatapolicyv2DataPolicyIamPolicyArgs args, InvokeOptions options)
public static Output<GetDatapolicyv2DataPolicyIamPolicyResult> getDatapolicyv2DataPolicyIamPolicy(GetDatapolicyv2DataPolicyIamPolicyArgs args, InvokeOptions options)
fn::invoke:
function: gcp:bigquery/getDatapolicyv2DataPolicyIamPolicy:getDatapolicyv2DataPolicyIamPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Data
Policy stringId - Used to find the parent resource to bind the IAM policy to
- Location string
- Resource ID segment making up resource
name
. It identifies the resource within its parent collection as described in https://google.aip.dev/122. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration. - 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.
- Data
Policy stringId - Used to find the parent resource to bind the IAM policy to
- Location string
- Resource ID segment making up resource
name
. It identifies the resource within its parent collection as described in https://google.aip.dev/122. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration. - 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.
- data
Policy StringId - Used to find the parent resource to bind the IAM policy to
- location String
- Resource ID segment making up resource
name
. It identifies the resource within its parent collection as described in https://google.aip.dev/122. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration. - 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.
- data
Policy stringId - Used to find the parent resource to bind the IAM policy to
- location string
- Resource ID segment making up resource
name
. It identifies the resource within its parent collection as described in https://google.aip.dev/122. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration. - 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.
- data_
policy_ strid - Used to find the parent resource to bind the IAM policy to
- location str
- Resource ID segment making up resource
name
. It identifies the resource within its parent collection as described in https://google.aip.dev/122. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration. - 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.
- data
Policy StringId - Used to find the parent resource to bind the IAM policy to
- location String
- Resource ID segment making up resource
name
. It identifies the resource within its parent collection as described in https://google.aip.dev/122. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no location is provided in the parent identifier and no location is specified, it is taken from the provider configuration. - 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.
getDatapolicyv2DataPolicyIamPolicy Result
The following output properties are available:
- Data
Policy stringId - 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.bigquery.Datapolicyv2DataPolicyIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - Project string
- Data
Policy stringId - 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.bigquery.Datapolicyv2DataPolicyIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - Project string
- data
Policy StringId - 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.bigquery.Datapolicyv2DataPolicyIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project String
- data
Policy stringId - 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.bigquery.Datapolicyv2DataPolicyIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project string
- data_
policy_ strid - 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.bigquery.Datapolicyv2DataPolicyIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project str
- data
Policy StringId - 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.bigquery.Datapolicyv2DataPolicyIamPolicy
) The policy data generated by agcp.organizations.getIAMPolicy
data source. - project 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.