Google Cloud Classic v8.3.1 published on Wednesday, Sep 25, 2024 by Pulumi
gcp.bigquery.getTableIamPolicy
Explore with Pulumi AI
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:
- Dataset
Id string - Table
Id 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 string - Table
Id 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 String - table
Id 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 string - table
Id 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.
- dataset
Id String - table
Id 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:
- 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 agcp.organizations.getIAMPolicy
data source. - project str
- table_
id str
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.