Dataset

Datasets allow you to organize and control access to your tables.

To get more information about Dataset, see:

Create a Dataset Resource

new Dataset(name: string, args: DatasetArgs, opts?: CustomResourceOptions);
def Dataset(resource_name, opts=None, accesses=None, dataset_id=None, default_encryption_configuration=None, default_partition_expiration_ms=None, default_table_expiration_ms=None, delete_contents_on_destroy=None, description=None, friendly_name=None, labels=None, location=None, project=None, __props__=None);
func NewDataset(ctx *Context, name string, args DatasetArgs, opts ...ResourceOption) (*Dataset, error)
public Dataset(string name, DatasetArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DatasetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DatasetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatasetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Dataset Resource Properties

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

Inputs

The Dataset resource accepts the following input properties:

DatasetId string

The ID of the dataset containing this table.

Accesses List<DatasetAccessArgs>

An array of objects that define dataset access for one or more entities. Structure is documented below.

DefaultEncryptionConfiguration DatasetDefaultEncryptionConfigurationArgs

The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. Structure is documented below.

DefaultPartitionExpirationMs int

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

DefaultTableExpirationMs int

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

DeleteContentsOnDestroy bool

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

Description string

A user-friendly description of the dataset

FriendlyName string

A descriptive name for the dataset

Labels Dictionary<string, string>

The labels associated with this dataset. You can use these to organize and group your datasets

Location string

The geographic location where the dataset should reside. See official docs.

Project string

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

DatasetId string

The ID of the dataset containing this table.

Accesses []DatasetAccessType

An array of objects that define dataset access for one or more entities. Structure is documented below.

DefaultEncryptionConfiguration DatasetDefaultEncryptionConfiguration

The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. Structure is documented below.

DefaultPartitionExpirationMs int

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

DefaultTableExpirationMs int

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

DeleteContentsOnDestroy bool

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

Description string

A user-friendly description of the dataset

FriendlyName string

A descriptive name for the dataset

Labels map[string]string

The labels associated with this dataset. You can use these to organize and group your datasets

Location string

The geographic location where the dataset should reside. See official docs.

Project string

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

datasetId string

The ID of the dataset containing this table.

accesses DatasetAccess[]

An array of objects that define dataset access for one or more entities. Structure is documented below.

defaultEncryptionConfiguration DatasetDefaultEncryptionConfiguration

The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. Structure is documented below.

defaultPartitionExpirationMs number

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

defaultTableExpirationMs number

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

deleteContentsOnDestroy boolean

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

description string

A user-friendly description of the dataset

friendlyName string

A descriptive name for the dataset

labels {[key: string]: string}

The labels associated with this dataset. You can use these to organize and group your datasets

location string

The geographic location where the dataset should reside. See official docs.

project string

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

dataset_id str

The ID of the dataset containing this table.

accesses List[DatasetAccess]

An array of objects that define dataset access for one or more entities. Structure is documented below.

default_encryption_configuration Dict[DatasetDefaultEncryptionConfiguration]

The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. Structure is documented below.

default_partition_expiration_ms float

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

default_table_expiration_ms float

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

delete_contents_on_destroy bool

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

description str

A user-friendly description of the dataset

friendly_name str

A descriptive name for the dataset

labels Dict[str, str]

The labels associated with this dataset. You can use these to organize and group your datasets

location str

The geographic location where the dataset should reside. See official docs.

project str

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

Outputs

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

CreationTime int

The time when this dataset was created, in milliseconds since the epoch.

Etag string

A hash of the resource.

Id string
The provider-assigned unique ID for this managed resource.
LastModifiedTime int

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

SelfLink string

The URI of the created resource.

CreationTime int

The time when this dataset was created, in milliseconds since the epoch.

Etag string

A hash of the resource.

Id string
The provider-assigned unique ID for this managed resource.
LastModifiedTime int

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

SelfLink string

The URI of the created resource.

creationTime number

The time when this dataset was created, in milliseconds since the epoch.

etag string

A hash of the resource.

id string
The provider-assigned unique ID for this managed resource.
lastModifiedTime number

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

selfLink string

The URI of the created resource.

creation_time float

The time when this dataset was created, in milliseconds since the epoch.

etag str

A hash of the resource.

id str
The provider-assigned unique ID for this managed resource.
last_modified_time float

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

self_link str

The URI of the created resource.

Look up an Existing Dataset Resource

Get an existing Dataset 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?: DatasetState, opts?: CustomResourceOptions): Dataset
static get(resource_name, id, opts=None, accesses=None, creation_time=None, dataset_id=None, default_encryption_configuration=None, default_partition_expiration_ms=None, default_table_expiration_ms=None, delete_contents_on_destroy=None, description=None, etag=None, friendly_name=None, labels=None, last_modified_time=None, location=None, project=None, self_link=None, __props__=None);
func GetDataset(ctx *Context, name string, id IDInput, state *DatasetState, opts ...ResourceOption) (*Dataset, error)
public static Dataset Get(string name, Input<string> id, DatasetState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Accesses List<DatasetAccessArgs>

An array of objects that define dataset access for one or more entities. Structure is documented below.

CreationTime int

The time when this dataset was created, in milliseconds since the epoch.

DatasetId string

The ID of the dataset containing this table.

DefaultEncryptionConfiguration DatasetDefaultEncryptionConfigurationArgs

The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. Structure is documented below.

DefaultPartitionExpirationMs int

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

DefaultTableExpirationMs int

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

DeleteContentsOnDestroy bool

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

Description string

A user-friendly description of the dataset

Etag string

A hash of the resource.

FriendlyName string

A descriptive name for the dataset

Labels Dictionary<string, string>

The labels associated with this dataset. You can use these to organize and group your datasets

LastModifiedTime int

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

Location string

The geographic location where the dataset should reside. See official docs.

Project string

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

SelfLink string

The URI of the created resource.

Accesses []DatasetAccessType

An array of objects that define dataset access for one or more entities. Structure is documented below.

CreationTime int

The time when this dataset was created, in milliseconds since the epoch.

DatasetId string

The ID of the dataset containing this table.

DefaultEncryptionConfiguration DatasetDefaultEncryptionConfiguration

The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. Structure is documented below.

DefaultPartitionExpirationMs int

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

DefaultTableExpirationMs int

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

DeleteContentsOnDestroy bool

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

Description string

A user-friendly description of the dataset

Etag string

A hash of the resource.

FriendlyName string

A descriptive name for the dataset

Labels map[string]string

The labels associated with this dataset. You can use these to organize and group your datasets

LastModifiedTime int

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

Location string

The geographic location where the dataset should reside. See official docs.

Project string

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

SelfLink string

The URI of the created resource.

accesses DatasetAccess[]

An array of objects that define dataset access for one or more entities. Structure is documented below.

creationTime number

The time when this dataset was created, in milliseconds since the epoch.

datasetId string

The ID of the dataset containing this table.

defaultEncryptionConfiguration DatasetDefaultEncryptionConfiguration

The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. Structure is documented below.

defaultPartitionExpirationMs number

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

defaultTableExpirationMs number

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

deleteContentsOnDestroy boolean

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

description string

A user-friendly description of the dataset

etag string

A hash of the resource.

friendlyName string

A descriptive name for the dataset

labels {[key: string]: string}

The labels associated with this dataset. You can use these to organize and group your datasets

lastModifiedTime number

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

location string

The geographic location where the dataset should reside. See official docs.

project string

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

selfLink string

The URI of the created resource.

accesses List[DatasetAccess]

An array of objects that define dataset access for one or more entities. Structure is documented below.

creation_time float

The time when this dataset was created, in milliseconds since the epoch.

dataset_id str

The ID of the dataset containing this table.

default_encryption_configuration Dict[DatasetDefaultEncryptionConfiguration]

The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. Structure is documented below.

default_partition_expiration_ms float

The default partition expiration for all partitioned tables in the dataset, in milliseconds.

default_table_expiration_ms float

The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).

delete_contents_on_destroy bool

If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.

description str

A user-friendly description of the dataset

etag str

A hash of the resource.

friendly_name str

A descriptive name for the dataset

labels Dict[str, str]

The labels associated with this dataset. You can use these to organize and group your datasets

last_modified_time float

The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.

location str

The geographic location where the dataset should reside. See official docs.

project str

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

self_link str

The URI of the created resource.

Supporting Types

DatasetAccess

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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.

Role string

Describes the rights granted to the user specified by the other member of the access object. Primitive, Predefined and custom roles are supported. Predefined roles that have equivalent primitive roles are swapped by the API to their Primitive counterparts. 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.

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.

Role string

Describes the rights granted to the user specified by the other member of the access object. Primitive, Predefined and custom roles are supported. Predefined roles that have equivalent primitive roles are swapped by the API to their Primitive counterparts. 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 DatasetAccessView

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.

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.

role string

Describes the rights granted to the user specified by the other member of the access object. Primitive, Predefined and custom roles are supported. Predefined roles that have equivalent primitive roles are swapped by the API to their Primitive counterparts. 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 DatasetAccessView

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.

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.

role str

Describes the rights granted to the user specified by the other member of the access object. Primitive, Predefined and custom roles are supported. Predefined roles that have equivalent primitive roles are swapped by the API to their Primitive counterparts. 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 Dict[DatasetAccessView]

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.

DatasetAccessView

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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.

DatasetDefaultEncryptionConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

KmsKeyName string

Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.

KmsKeyName string

Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.

kmsKeyName string

Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.

kms_key_name str

Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key.

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.