Dataset
Datasets allow you to organize and control access to your tables.
To get more information about Dataset, see:
- API documentation
- How-to Guides
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:
- Dataset
Id string The ID of the dataset containing this table.
- Accesses
List<Dataset
Access Args> An array of objects that define dataset access for one or more entities. Structure is documented below.
- Default
Encryption DatasetConfiguration Default Encryption Configuration Args 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 intExpiration Ms The default partition expiration for all partitioned tables in the dataset, in milliseconds.
- Default
Table intExpiration Ms The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
- Delete
Contents boolOn Destroy 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
- Friendly
Name 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.
- Dataset
Id string The ID of the dataset containing this table.
- Accesses
[]Dataset
Access Type An array of objects that define dataset access for one or more entities. Structure is documented below.
- Default
Encryption DatasetConfiguration Default Encryption Configuration 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 intExpiration Ms The default partition expiration for all partitioned tables in the dataset, in milliseconds.
- Default
Table intExpiration Ms The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
- Delete
Contents boolOn Destroy 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
- Friendly
Name 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.
- dataset
Id string The ID of the dataset containing this table.
- accesses
Dataset
Access[] An array of objects that define dataset access for one or more entities. Structure is documented below.
- default
Encryption DatasetConfiguration Default Encryption Configuration 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 numberExpiration Ms The default partition expiration for all partitioned tables in the dataset, in milliseconds.
- default
Table numberExpiration Ms The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
- delete
Contents booleanOn Destroy 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
- friendly
Name 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[Dataset
Access] An array of objects that define dataset access for one or more entities. Structure is documented below.
- default_
encryption_ Dict[Datasetconfiguration Default Encryption Configuration] 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_ floatexpiration_ ms The default partition expiration for all partitioned tables in the dataset, in milliseconds.
- default_
table_ floatexpiration_ ms The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
- delete_
contents_ boolon_ destroy 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:
- Creation
Time 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.
- Last
Modified intTime The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
- Self
Link string The URI of the created resource.
- Creation
Time 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.
- Last
Modified intTime The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
- Self
Link string The URI of the created resource.
- creation
Time 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.
- last
Modified numberTime The date when this dataset or any of its tables was last modified, in milliseconds since the epoch.
- self
Link 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_ floattime 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): Datasetstatic 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<Dataset
Access Args> An array of objects that define dataset access for one or more entities. Structure is documented below.
- Creation
Time int The time when this dataset was created, in milliseconds since the epoch.
- Dataset
Id string The ID of the dataset containing this table.
- Default
Encryption DatasetConfiguration Default Encryption Configuration Args 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 intExpiration Ms The default partition expiration for all partitioned tables in the dataset, in milliseconds.
- Default
Table intExpiration Ms The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
- Delete
Contents boolOn Destroy 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.
- Friendly
Name 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
- Last
Modified intTime 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.
- Self
Link string The URI of the created resource.
- Accesses
[]Dataset
Access Type An array of objects that define dataset access for one or more entities. Structure is documented below.
- Creation
Time int The time when this dataset was created, in milliseconds since the epoch.
- Dataset
Id string The ID of the dataset containing this table.
- Default
Encryption DatasetConfiguration Default Encryption Configuration 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 intExpiration Ms The default partition expiration for all partitioned tables in the dataset, in milliseconds.
- Default
Table intExpiration Ms The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
- Delete
Contents boolOn Destroy 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.
- Friendly
Name 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
- Last
Modified intTime 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.
- Self
Link string The URI of the created resource.
- accesses
Dataset
Access[] An array of objects that define dataset access for one or more entities. Structure is documented below.
- creation
Time number The time when this dataset was created, in milliseconds since the epoch.
- dataset
Id string The ID of the dataset containing this table.
- default
Encryption DatasetConfiguration Default Encryption Configuration 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 numberExpiration Ms The default partition expiration for all partitioned tables in the dataset, in milliseconds.
- default
Table numberExpiration Ms The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
- delete
Contents booleanOn Destroy 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.
- friendly
Name 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
- last
Modified numberTime 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.
- self
Link string The URI of the created resource.
- accesses
List[Dataset
Access] 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_ Dict[Datasetconfiguration Default Encryption Configuration] 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_ floatexpiration_ ms The default partition expiration for all partitioned tables in the dataset, in milliseconds.
- default_
table_ floatexpiration_ ms The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour).
- delete_
contents_ boolon_ destroy 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_ floattime 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
- Domain string
A domain to grant access to. Any users signed in with the domain specified will be granted the specified access
- Group
By stringEmail 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.
- Special
Group string A special group to grant access to. Possible values include:
- User
By stringEmail An email address of a user to grant access to. For example: fred@example.com
- View
Dataset
Access View Args 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
- Group
By stringEmail 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.
- Special
Group string A special group to grant access to. Possible values include:
- User
By stringEmail An email address of a user to grant access to. For example: fred@example.com
- View
Dataset
Access View 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
- group
By stringEmail 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.
- special
Group string A special group to grant access to. Possible values include:
- user
By stringEmail An email address of a user to grant access to. For example: fred@example.com
- view
Dataset
Access View 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_ stremail 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_ stremail An email address of a user to grant access to. For example: fred@example.com
- view
Dict[Dataset
Access View] 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
- 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
- Kms
Key stringName 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 stringName 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 stringName 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_ strname 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-betaTerraform Provider.