Class DataTransferConfig
Represents a data transfer configuration. A transfer configuration contains all metadata needed to perform a data transfer.
To get more information about Config, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - Scheduled Query
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var project = Output.Create(Gcp.Organizations.GetProject.InvokeAsync());
var permissions = new Gcp.Projects.IAMMember("permissions", new Gcp.Projects.IAMMemberArgs
{
Role = "roles/iam.serviceAccountShortTermTokenMinter",
Member = project.Apply(project => $"serviceAccount:service-{project.Number}@gcp-sa-bigquerydatatransfer.iam.gserviceaccount.com"),
});
var myDataset = new Gcp.BigQuery.Dataset("myDataset", new Gcp.BigQuery.DatasetArgs
{
DatasetId = "my_dataset",
FriendlyName = "foo",
Description = "bar",
Location = "asia-northeast1",
});
var queryConfig = new Gcp.BigQuery.DataTransferConfig("queryConfig", new Gcp.BigQuery.DataTransferConfigArgs
{
DisplayName = "my-query",
Location = "asia-northeast1",
DataSourceId = "scheduled_query",
Schedule = "first sunday of quarter 00:00",
DestinationDatasetId = myDataset.DatasetId,
Params =
{
{ "destination_table_name_template", "my-table" },
{ "write_disposition", "WRITE_APPEND" },
{ "query", "SELECT name FROM tabl WHERE x = 'y'" },
},
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.BigQuery
Assembly: Pulumi.Gcp.dll
Syntax
public class DataTransferConfig : CustomResource
Constructors
View SourceDataTransferConfig(String, DataTransferConfigArgs, CustomResourceOptions)
Create a DataTransferConfig resource with the given unique name, arguments, and options.
Declaration
public DataTransferConfig(string name, DataTransferConfigArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DataTransferConfigArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDataRefreshWindowDays
The number of days to look back to automatically refresh the data. For example, if dataRefreshWindowDays = 10, then every day BigQuery reingests data for [today-10, today-1], rather than ingesting data for just [today-1]. Only valid if the data source supports the feature. Set the value to 0 to use the default value.
Declaration
public Output<int?> DataRefreshWindowDays { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
DataSourceId
The data source id. Cannot be changed once the transfer config is created.
Declaration
public Output<string> DataSourceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DestinationDatasetId
The BigQuery target dataset id.
Declaration
public Output<string> DestinationDatasetId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Disabled
When set to true, no runs are scheduled for a given transfer.
Declaration
public Output<bool?> Disabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
DisplayName
The user specified display name for the transfer config.
Declaration
public Output<string> DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Location
The geographic location where the transfer config should reside. Examples: US, EU, asia-northeast1. The default value is US.
Declaration
public Output<string> Location { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The resource name of the transfer config. Transfer config names have the form projects/{projectId}/locations/{location}/transferConfigs/{configId}. Where configId is usually a uuid, but this is not required. The name is ignored when creating a transfer config.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Params
These parameters are specific to each data source.
Declaration
public Output<ImmutableDictionary<string, string>> Params { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Schedule
Data transfer schedule. If the data source does not support a custom schedule, this should be empty. If it is empty, the default value for the data source will be used. The specified times are in UTC. Examples of valid format: 1st,3rd monday of month 15:30, every wed,fri of jan, jun 13:15, and first sunday of quarter 00:00. See more explanation about the format here: https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format NOTE: the granularity should be at least 8 hours, or less frequent.
Declaration
public Output<string> Schedule { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServiceAccountName
Optional service account name. If this field is set, transfer config will be created with this service account credentials. It requires that requesting user calling this API has permissions to act as this service account.
Declaration
public Output<string> ServiceAccountName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, DataTransferConfigState, CustomResourceOptions)
Get an existing DataTransferConfig resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DataTransferConfig Get(string name, Input<string> id, DataTransferConfigState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DataTransferConfigState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DataTransferConfig |