1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. bigquery
  5. getTableIamPolicy
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

gcp.bigquery.getTableIamPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi

    Retrieves the current IAM policy data for table

    example

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const policy = gcp.bigquery.getTableIamPolicy({
        project: test.project,
        datasetId: test.datasetId,
        tableId: test.tableId,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    policy = gcp.bigquery.get_table_iam_policy(project=test["project"],
        dataset_id=test["datasetId"],
        table_id=test["tableId"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/bigquery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bigquery.GetTableIamPolicy(ctx, &bigquery.GetTableIamPolicyArgs{
    			Project:   pulumi.StringRef(test.Project),
    			DatasetId: test.DatasetId,
    			TableId:   test.TableId,
    		}, 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.GetTableIamPolicy.Invoke(new()
        {
            Project = test.Project,
            DatasetId = test.DatasetId,
            TableId = test.TableId,
        });
    
    });
    
    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.GetTableIamPolicyArgs;
    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.getTableIamPolicy(GetTableIamPolicyArgs.builder()
                .project(test.project())
                .datasetId(test.datasetId())
                .tableId(test.tableId())
                .build());
    
        }
    }
    
    variables:
      policy:
        fn::invoke:
          Function: gcp:bigquery:getTableIamPolicy
          Arguments:
            project: ${test.project}
            datasetId: ${test.datasetId}
            tableId: ${test.tableId}
    

    Using getTableIamPolicy

    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 getTableIamPolicy(args: GetTableIamPolicyArgs, opts?: InvokeOptions): Promise<GetTableIamPolicyResult>
    function getTableIamPolicyOutput(args: GetTableIamPolicyOutputArgs, opts?: InvokeOptions): Output<GetTableIamPolicyResult>
    def get_table_iam_policy(dataset_id: Optional[str] = None,
                             project: Optional[str] = None,
                             table_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetTableIamPolicyResult
    def get_table_iam_policy_output(dataset_id: Optional[pulumi.Input[str]] = None,
                             project: Optional[pulumi.Input[str]] = None,
                             table_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetTableIamPolicyResult]
    func GetTableIamPolicy(ctx *Context, args *GetTableIamPolicyArgs, opts ...InvokeOption) (*GetTableIamPolicyResult, error)
    func GetTableIamPolicyOutput(ctx *Context, args *GetTableIamPolicyOutputArgs, opts ...InvokeOption) GetTableIamPolicyResultOutput

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

    public static class GetTableIamPolicy 
    {
        public static Task<GetTableIamPolicyResult> InvokeAsync(GetTableIamPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetTableIamPolicyResult> Invoke(GetTableIamPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTableIamPolicyResult> getTableIamPolicy(GetTableIamPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:bigquery/getTableIamPolicy:getTableIamPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DatasetId string
    TableId 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.
    DatasetId string
    TableId 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.
    datasetId String
    tableId 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.
    datasetId string
    tableId 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.
    dataset_id str
    table_id 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.
    datasetId String
    tableId 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.

    getTableIamPolicy Result

    The following output properties are available:

    DatasetId string
    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    PolicyData string
    (Required only by gcp.bigquery.IamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    Project string
    TableId string
    DatasetId string
    Etag string
    (Computed) The etag of the IAM policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    PolicyData string
    (Required only by gcp.bigquery.IamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    Project string
    TableId string
    datasetId String
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    policyData String
    (Required only by gcp.bigquery.IamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project String
    tableId String
    datasetId string
    etag string
    (Computed) The etag of the IAM policy.
    id string
    The provider-assigned unique ID for this managed resource.
    policyData string
    (Required only by gcp.bigquery.IamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project string
    tableId string
    dataset_id str
    etag str
    (Computed) The etag of the IAM policy.
    id str
    The provider-assigned unique ID for this managed resource.
    policy_data str
    (Required only by gcp.bigquery.IamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project str
    table_id str
    datasetId String
    etag String
    (Computed) The etag of the IAM policy.
    id String
    The provider-assigned unique ID for this managed resource.
    policyData String
    (Required only by gcp.bigquery.IamPolicy) The policy data generated by a gcp.organizations.getIAMPolicy data source.
    project String
    tableId 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.
    gcp logo
    Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi