Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.32.0 published on Wednesday, Jul 20, 2022 by Pulumi

DatasetAccess

Import

This resource does not support import.

Example Usage

Bigquery Dataset Access Basic User

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var dataset = new Gcp.BigQuery.Dataset("dataset", new Gcp.BigQuery.DatasetArgs
        {
            DatasetId = "example_dataset",
        });
        var bqowner = new Gcp.ServiceAccount.Account("bqowner", new Gcp.ServiceAccount.AccountArgs
        {
            AccountId = "bqowner",
        });
        var access = new Gcp.BigQuery.DatasetAccess("access", new Gcp.BigQuery.DatasetAccessArgs
        {
            DatasetId = dataset.DatasetId,
            Role = "OWNER",
            UserByEmail = bqowner.Email,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/bigquery"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/serviceAccount"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		dataset, err := bigquery.NewDataset(ctx, "dataset", &bigquery.DatasetArgs{
			DatasetId: pulumi.String("example_dataset"),
		})
		if err != nil {
			return err
		}
		bqowner, err := serviceAccount.NewAccount(ctx, "bqowner", &serviceAccount.AccountArgs{
			AccountId: pulumi.String("bqowner"),
		})
		if err != nil {
			return err
		}
		_, err = bigquery.NewDatasetAccess(ctx, "access", &bigquery.DatasetAccessArgs{
			DatasetId:   dataset.DatasetId,
			Role:        pulumi.String("OWNER"),
			UserByEmail: bqowner.Email,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var dataset = new Dataset("dataset", DatasetArgs.builder()        
            .datasetId("example_dataset")
            .build());

        var bqowner = new Account("bqowner", AccountArgs.builder()        
            .accountId("bqowner")
            .build());

        var access = new DatasetAccess("access", DatasetAccessArgs.builder()        
            .datasetId(dataset.datasetId())
            .role("OWNER")
            .userByEmail(bqowner.email())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

dataset = gcp.bigquery.Dataset("dataset", dataset_id="example_dataset")
bqowner = gcp.service_account.Account("bqowner", account_id="bqowner")
access = gcp.bigquery.DatasetAccess("access",
    dataset_id=dataset.dataset_id,
    role="OWNER",
    user_by_email=bqowner.email)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const dataset = new gcp.bigquery.Dataset("dataset", {datasetId: "example_dataset"});
const bqowner = new gcp.serviceaccount.Account("bqowner", {accountId: "bqowner"});
const access = new gcp.bigquery.DatasetAccess("access", {
    datasetId: dataset.datasetId,
    role: "OWNER",
    userByEmail: bqowner.email,
});
resources:
  access:
    type: gcp:bigquery:DatasetAccess
    properties:
      datasetId: ${dataset.datasetId}
      role: OWNER
      userByEmail: ${bqowner.email}
  dataset:
    type: gcp:bigquery:Dataset
    properties:
      datasetId: example_dataset
  bqowner:
    type: gcp:serviceAccount:Account
    properties:
      accountId: bqowner

Bigquery Dataset Access View

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var @private = new Gcp.BigQuery.Dataset("private", new Gcp.BigQuery.DatasetArgs
        {
            DatasetId = "example_dataset",
        });
        var publicDataset = new Gcp.BigQuery.Dataset("publicDataset", new Gcp.BigQuery.DatasetArgs
        {
            DatasetId = "example_dataset2",
        });
        var publicTable = new Gcp.BigQuery.Table("publicTable", new Gcp.BigQuery.TableArgs
        {
            DeletionProtection = false,
            DatasetId = publicDataset.DatasetId,
            TableId = "example_table",
            View = new Gcp.BigQuery.Inputs.TableViewArgs
            {
                Query = "SELECT state FROM [lookerdata:cdc.project_tycho_reports]",
                UseLegacySql = false,
            },
        });
        var access = new Gcp.BigQuery.DatasetAccess("access", new Gcp.BigQuery.DatasetAccessArgs
        {
            DatasetId = @private.DatasetId,
            View = new Gcp.BigQuery.Inputs.DatasetAccessViewArgs
            {
                ProjectId = publicTable.Project,
                DatasetId = publicDataset.DatasetId,
                TableId = publicTable.TableId,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/bigquery"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		private, err := bigquery.NewDataset(ctx, "private", &bigquery.DatasetArgs{
			DatasetId: pulumi.String("example_dataset"),
		})
		if err != nil {
			return err
		}
		publicDataset, err := bigquery.NewDataset(ctx, "publicDataset", &bigquery.DatasetArgs{
			DatasetId: pulumi.String("example_dataset2"),
		})
		if err != nil {
			return err
		}
		publicTable, err := bigquery.NewTable(ctx, "publicTable", &bigquery.TableArgs{
			DeletionProtection: pulumi.Bool(false),
			DatasetId:          publicDataset.DatasetId,
			TableId:            pulumi.String("example_table"),
			View: &bigquery.TableViewArgs{
				Query:        pulumi.String("SELECT state FROM [lookerdata:cdc.project_tycho_reports]"),
				UseLegacySql: pulumi.Bool(false),
			},
		})
		if err != nil {
			return err
		}
		_, err = bigquery.NewDatasetAccess(ctx, "access", &bigquery.DatasetAccessArgs{
			DatasetId: private.DatasetId,
			View: &bigquery.DatasetAccessViewArgs{
				ProjectId: publicTable.Project,
				DatasetId: publicDataset.DatasetId,
				TableId:   publicTable.TableId,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var private_ = new Dataset("private", DatasetArgs.builder()        
            .datasetId("example_dataset")
            .build());

        var publicDataset = new Dataset("publicDataset", DatasetArgs.builder()        
            .datasetId("example_dataset2")
            .build());

        var publicTable = new Table("publicTable", TableArgs.builder()        
            .deletionProtection(false)
            .datasetId(publicDataset.datasetId())
            .tableId("example_table")
            .view(TableViewArgs.builder()
                .query("SELECT state FROM [lookerdata:cdc.project_tycho_reports]")
                .useLegacySql(false)
                .build())
            .build());

        var access = new DatasetAccess("access", DatasetAccessArgs.builder()        
            .datasetId(private_.datasetId())
            .view(DatasetAccessViewArgs.builder()
                .projectId(publicTable.project())
                .datasetId(publicDataset.datasetId())
                .tableId(publicTable.tableId())
                .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

private = gcp.bigquery.Dataset("private", dataset_id="example_dataset")
public_dataset = gcp.bigquery.Dataset("publicDataset", dataset_id="example_dataset2")
public_table = gcp.bigquery.Table("publicTable",
    deletion_protection=False,
    dataset_id=public_dataset.dataset_id,
    table_id="example_table",
    view=gcp.bigquery.TableViewArgs(
        query="SELECT state FROM [lookerdata:cdc.project_tycho_reports]",
        use_legacy_sql=False,
    ))
access = gcp.bigquery.DatasetAccess("access",
    dataset_id=private.dataset_id,
    view=gcp.bigquery.DatasetAccessViewArgs(
        project_id=public_table.project,
        dataset_id=public_dataset.dataset_id,
        table_id=public_table.table_id,
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _private = new gcp.bigquery.Dataset("private", {datasetId: "example_dataset"});
const publicDataset = new gcp.bigquery.Dataset("publicDataset", {datasetId: "example_dataset2"});
const publicTable = new gcp.bigquery.Table("publicTable", {
    deletionProtection: false,
    datasetId: publicDataset.datasetId,
    tableId: "example_table",
    view: {
        query: "SELECT state FROM [lookerdata:cdc.project_tycho_reports]",
        useLegacySql: false,
    },
});
const access = new gcp.bigquery.DatasetAccess("access", {
    datasetId: _private.datasetId,
    view: {
        projectId: publicTable.project,
        datasetId: publicDataset.datasetId,
        tableId: publicTable.tableId,
    },
});
resources:
  access:
    type: gcp:bigquery:DatasetAccess
    properties:
      datasetId: ${private.datasetId}
      view:
        projectId: ${publicTable.project}
        datasetId: ${publicDataset.datasetId}
        tableId: ${publicTable.tableId}
  private:
    type: gcp:bigquery:Dataset
    properties:
      datasetId: example_dataset
  publicDataset:
    type: gcp:bigquery:Dataset
    properties:
      datasetId: example_dataset2
  publicTable:
    type: gcp:bigquery:Table
    properties:
      deletionProtection: false
      datasetId: ${publicDataset.datasetId}
      tableId: example_table
      view:
        query: SELECT state FROM [lookerdata:cdc.project_tycho_reports]
        useLegacySql: false

Bigquery Dataset Access Authorized Dataset

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var @private = new Gcp.BigQuery.Dataset("private", new Gcp.BigQuery.DatasetArgs
        {
            DatasetId = "private",
        });
        var @public = new Gcp.BigQuery.Dataset("public", new Gcp.BigQuery.DatasetArgs
        {
            DatasetId = "public",
        });
        var access = new Gcp.BigQuery.DatasetAccess("access", new Gcp.BigQuery.DatasetAccessArgs
        {
            DatasetId = @private.DatasetId,
            AuthorizedDataset = new Gcp.BigQuery.Inputs.DatasetAccessAuthorizedDatasetArgs
            {
                Dataset = new Gcp.BigQuery.Inputs.DatasetAccessAuthorizedDatasetDatasetArgs
                {
                    ProjectId = @public.Project,
                    DatasetId = @public.DatasetId,
                },
                TargetTypes = 
                {
                    "VIEWS",
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/bigquery"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		private, err := bigquery.NewDataset(ctx, "private", &bigquery.DatasetArgs{
			DatasetId: pulumi.String("private"),
		})
		if err != nil {
			return err
		}
		public, err := bigquery.NewDataset(ctx, "public", &bigquery.DatasetArgs{
			DatasetId: pulumi.String("public"),
		})
		if err != nil {
			return err
		}
		_, err = bigquery.NewDatasetAccess(ctx, "access", &bigquery.DatasetAccessArgs{
			DatasetId: private.DatasetId,
			AuthorizedDataset: &bigquery.DatasetAccessAuthorizedDatasetArgs{
				Dataset: &bigquery.DatasetAccessAuthorizedDatasetDatasetArgs{
					ProjectId: public.Project,
					DatasetId: public.DatasetId,
				},
				TargetTypes: pulumi.StringArray{
					pulumi.String("VIEWS"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var private_ = new Dataset("private", DatasetArgs.builder()        
            .datasetId("private")
            .build());

        var public_ = new Dataset("public", DatasetArgs.builder()        
            .datasetId("public")
            .build());

        var access = new DatasetAccess("access", DatasetAccessArgs.builder()        
            .datasetId(private_.datasetId())
            .authorizedDataset(DatasetAccessAuthorizedDatasetArgs.builder()
                .dataset(DatasetAccessAuthorizedDatasetDatasetArgs.builder()
                    .projectId(public_.project())
                    .datasetId(public_.datasetId())
                    .build())
                .targetTypes("VIEWS")
                .build())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

private = gcp.bigquery.Dataset("private", dataset_id="private")
public = gcp.bigquery.Dataset("public", dataset_id="public")
access = gcp.bigquery.DatasetAccess("access",
    dataset_id=private.dataset_id,
    authorized_dataset=gcp.bigquery.DatasetAccessAuthorizedDatasetArgs(
        dataset=gcp.bigquery.DatasetAccessAuthorizedDatasetDatasetArgs(
            project_id=public.project,
            dataset_id=public.dataset_id,
        ),
        target_types=["VIEWS"],
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _private = new gcp.bigquery.Dataset("private", {datasetId: "private"});
const _public = new gcp.bigquery.Dataset("public", {datasetId: "public"});
const access = new gcp.bigquery.DatasetAccess("access", {
    datasetId: _private.datasetId,
    authorizedDataset: {
        dataset: {
            projectId: _public.project,
            datasetId: _public.datasetId,
        },
        targetTypes: ["VIEWS"],
    },
});
resources:
  access:
    type: gcp:bigquery:DatasetAccess
    properties:
      datasetId: ${private.datasetId}
      authorizedDataset:
        dataset:
          projectId: ${public.project}
          datasetId: ${public.datasetId}
        targetTypes:
          - VIEWS
  private:
    type: gcp:bigquery:Dataset
    properties:
      datasetId: private
  public:
    type: gcp:bigquery:Dataset
    properties:
      datasetId: public

Create a DatasetAccess Resource

new DatasetAccess(name: string, args: DatasetAccessArgs, opts?: CustomResourceOptions);
@overload
def DatasetAccess(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  authorized_dataset: Optional[DatasetAccessAuthorizedDatasetArgs] = None,
                  dataset_id: Optional[str] = None,
                  domain: Optional[str] = None,
                  group_by_email: Optional[str] = None,
                  iam_member: Optional[str] = None,
                  project: Optional[str] = None,
                  role: Optional[str] = None,
                  special_group: Optional[str] = None,
                  user_by_email: Optional[str] = None,
                  view: Optional[DatasetAccessViewArgs] = None)
@overload
def DatasetAccess(resource_name: str,
                  args: DatasetAccessInitArgs,
                  opts: Optional[ResourceOptions] = None)
func NewDatasetAccess(ctx *Context, name string, args DatasetAccessArgs, opts ...ResourceOption) (*DatasetAccess, error)
public DatasetAccess(string name, DatasetAccessArgs args, CustomResourceOptions? opts = null)
public DatasetAccess(String name, DatasetAccessArgs args)
public DatasetAccess(String name, DatasetAccessArgs args, CustomResourceOptions options)
type: gcp:bigquery:DatasetAccess
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DatasetAccessArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DatasetAccessInitArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DatasetAccessArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatasetAccessArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DatasetAccessArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DatasetAccess Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DatasetAccess resource accepts the following input properties:

DatasetId string

The ID of the dataset containing this table.

AuthorizedDataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

Domain string

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

GroupByEmail string

An email address of a Google Group to grant access to.

IamMember string

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Role string

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

SpecialGroup string

A special group to grant access to. Possible values include:

UserByEmail string

An email address of a user to grant access to. For example: fred@example.com

View DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

DatasetId string

The ID of the dataset containing this table.

AuthorizedDataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

Domain string

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

GroupByEmail string

An email address of a Google Group to grant access to.

IamMember string

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Role string

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

SpecialGroup string

A special group to grant access to. Possible values include:

UserByEmail string

An email address of a user to grant access to. For example: fred@example.com

View DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

datasetId String

The ID of the dataset containing this table.

authorizedDataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

domain String

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

groupByEmail String

An email address of a Google Group to grant access to.

iamMember String

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role String

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

specialGroup String

A special group to grant access to. Possible values include:

userByEmail String

An email address of a user to grant access to. For example: fred@example.com

view DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

datasetId string

The ID of the dataset containing this table.

authorizedDataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

domain string

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

groupByEmail string

An email address of a Google Group to grant access to.

iamMember string

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role string

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

specialGroup string

A special group to grant access to. Possible values include:

userByEmail string

An email address of a user to grant access to. For example: fred@example.com

view DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

dataset_id str

The ID of the dataset containing this table.

authorized_dataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

domain str

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

group_by_email str

An email address of a Google Group to grant access to.

iam_member str

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role str

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

special_group str

A special group to grant access to. Possible values include:

user_by_email str

An email address of a user to grant access to. For example: fred@example.com

view DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

datasetId String

The ID of the dataset containing this table.

authorizedDataset Property Map

The dataset this entry applies to Structure is documented below.

domain String

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

groupByEmail String

An email address of a Google Group to grant access to.

iamMember String

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role String

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

specialGroup String

A special group to grant access to. Possible values include:

userByEmail String

An email address of a user to grant access to. For example: fred@example.com

view Property Map

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the DatasetAccess resource produces the following output properties:

ApiUpdatedMember bool

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

Id string

The provider-assigned unique ID for this managed resource.

ApiUpdatedMember bool

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

Id string

The provider-assigned unique ID for this managed resource.

apiUpdatedMember Boolean

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

id String

The provider-assigned unique ID for this managed resource.

apiUpdatedMember boolean

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

id string

The provider-assigned unique ID for this managed resource.

api_updated_member bool

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

id str

The provider-assigned unique ID for this managed resource.

apiUpdatedMember Boolean

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing DatasetAccess Resource

Get an existing DatasetAccess resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DatasetAccessState, opts?: CustomResourceOptions): DatasetAccess
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_updated_member: Optional[bool] = None,
        authorized_dataset: Optional[DatasetAccessAuthorizedDatasetArgs] = None,
        dataset_id: Optional[str] = None,
        domain: Optional[str] = None,
        group_by_email: Optional[str] = None,
        iam_member: Optional[str] = None,
        project: Optional[str] = None,
        role: Optional[str] = None,
        special_group: Optional[str] = None,
        user_by_email: Optional[str] = None,
        view: Optional[DatasetAccessViewArgs] = None) -> DatasetAccess
func GetDatasetAccess(ctx *Context, name string, id IDInput, state *DatasetAccessState, opts ...ResourceOption) (*DatasetAccess, error)
public static DatasetAccess Get(string name, Input<string> id, DatasetAccessState? state, CustomResourceOptions? opts = null)
public static DatasetAccess get(String name, Output<String> id, DatasetAccessState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApiUpdatedMember bool

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

AuthorizedDataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

DatasetId string

The ID of the dataset containing this table.

Domain string

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

GroupByEmail string

An email address of a Google Group to grant access to.

IamMember string

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Role string

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

SpecialGroup string

A special group to grant access to. Possible values include:

UserByEmail string

An email address of a user to grant access to. For example: fred@example.com

View DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

ApiUpdatedMember bool

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

AuthorizedDataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

DatasetId string

The ID of the dataset containing this table.

Domain string

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

GroupByEmail string

An email address of a Google Group to grant access to.

IamMember string

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Role string

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

SpecialGroup string

A special group to grant access to. Possible values include:

UserByEmail string

An email address of a user to grant access to. For example: fred@example.com

View DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

apiUpdatedMember Boolean

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

authorizedDataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

datasetId String

The ID of the dataset containing this table.

domain String

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

groupByEmail String

An email address of a Google Group to grant access to.

iamMember String

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role String

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

specialGroup String

A special group to grant access to. Possible values include:

userByEmail String

An email address of a user to grant access to. For example: fred@example.com

view DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

apiUpdatedMember boolean

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

authorizedDataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

datasetId string

The ID of the dataset containing this table.

domain string

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

groupByEmail string

An email address of a Google Group to grant access to.

iamMember string

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role string

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

specialGroup string

A special group to grant access to. Possible values include:

userByEmail string

An email address of a user to grant access to. For example: fred@example.com

view DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

api_updated_member bool

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

authorized_dataset DatasetAccessAuthorizedDatasetArgs

The dataset this entry applies to Structure is documented below.

dataset_id str

The ID of the dataset containing this table.

domain str

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

group_by_email str

An email address of a Google Group to grant access to.

iam_member str

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role str

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

special_group str

A special group to grant access to. Possible values include:

user_by_email str

An email address of a user to grant access to. For example: fred@example.com

view DatasetAccessViewArgs

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

apiUpdatedMember Boolean

If true, represents that that the iam_member in the config was translated to a different member type by the API, and is stored in state as a different member type

authorizedDataset Property Map

The dataset this entry applies to Structure is documented below.

datasetId String

The ID of the dataset containing this table.

domain String

A domain to grant access to. Any users signed in with the domain specified will be granted the specified access

groupByEmail String

An email address of a Google Group to grant access to.

iamMember String

Some other type of member that appears in the IAM Policy but isn't a user, group, domain, or special group. For example: allUsers

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

role String

Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts, and will show a diff post-create. See official docs.

specialGroup String

A special group to grant access to. Possible values include:

userByEmail String

An email address of a user to grant access to. For example: fred@example.com

view Property Map

A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. Structure is documented below.

Supporting Types

DatasetAccessAuthorizedDataset

Dataset DatasetAccessAuthorizedDatasetDataset

The dataset this entry applies to Structure is documented below.

TargetTypes List<string>

Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS

Dataset DatasetAccessAuthorizedDatasetDataset

The dataset this entry applies to Structure is documented below.

TargetTypes []string

Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS

dataset DatasetAccessAuthorizedDatasetDataset

The dataset this entry applies to Structure is documented below.

targetTypes List<String>

Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS

dataset DatasetAccessAuthorizedDatasetDataset

The dataset this entry applies to Structure is documented below.

targetTypes string[]

Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS

dataset DatasetAccessAuthorizedDatasetDataset

The dataset this entry applies to Structure is documented below.

target_types Sequence[str]

Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS

dataset Property Map

The dataset this entry applies to Structure is documented below.

targetTypes List<String>

Which resources in the dataset this entry applies to. Currently, only views are supported, but additional target types may be added in the future. Possible values: VIEWS

DatasetAccessAuthorizedDatasetDataset

DatasetId string

The ID of the dataset containing this table.

ProjectId string

The ID of the project containing this table.

DatasetId string

The ID of the dataset containing this table.

ProjectId string

The ID of the project containing this table.

datasetId String

The ID of the dataset containing this table.

projectId String

The ID of the project containing this table.

datasetId string

The ID of the dataset containing this table.

projectId string

The ID of the project containing this table.

dataset_id str

The ID of the dataset containing this table.

project_id str

The ID of the project containing this table.

datasetId String

The ID of the dataset containing this table.

projectId String

The ID of the project containing this table.

DatasetAccessView

DatasetId string

The ID of the dataset containing this table.

ProjectId string

The ID of the project containing this table.

TableId string

The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

DatasetId string

The ID of the dataset containing this table.

ProjectId string

The ID of the project containing this table.

TableId string

The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

datasetId String

The ID of the dataset containing this table.

projectId String

The ID of the project containing this table.

tableId String

The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

datasetId string

The ID of the dataset containing this table.

projectId string

The ID of the project containing this table.

tableId string

The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

dataset_id str

The ID of the dataset containing this table.

project_id str

The ID of the project containing this table.

table_id str

The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

datasetId String

The ID of the dataset containing this table.

projectId String

The ID of the project containing this table.

tableId String

The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.