From 4136c10fabc1df012b028a5d407aaec326e448b6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:08:58 -0400 Subject: [PATCH] docs: [google-cloud-bigquery-datatransfer] add a note to the CreateTransferConfigRequest and UpdateTransferConfigRequest to disable restricting service account usage (#13051) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 670851613 Source-Link: https://github.com/googleapis/googleapis/commit/c13cea289cfb977c7a8776b43dfd63a48ddb2b71 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1f2c334ef5bac2d4a2027759e03b1eeba426f0f2 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiMWYyYzMzNGVmNWJhYzJkNGEyMDI3NzU5ZTAzYjFlZWJhNDI2ZjBmMiJ9 --------- Co-authored-by: Owl Bot --- .../bigquery_datatransfer/gapic_version.py | 2 +- .../bigquery_datatransfer_v1/gapic_version.py | 2 +- .../data_transfer_service/async_client.py | 38 +++++++++++-------- .../services/data_transfer_service/client.py | 38 +++++++++++-------- .../data_transfer_service/transports/rest.py | 38 +++++++++++-------- .../types/datatransfer.py | 18 +++++++-- ...google.cloud.bigquery.datatransfer.v1.json | 2 +- 7 files changed, 87 insertions(+), 51 deletions(-) diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer/gapic_version.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer/gapic_version.py index 769a9d92f8cf..558c8aab67c5 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer/gapic_version.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.15.6" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/gapic_version.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/gapic_version.py index 769a9d92f8cf..558c8aab67c5 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/gapic_version.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.15.6" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py index 87ab9e5d50f5..ea32882077da 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/async_client.py @@ -554,17 +554,20 @@ async def sample_create_transfer_config(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.CreateTransferConfigRequest, dict]]): - The request object. A request to create a data transfer - configuration. If new credentials are - needed for this transfer configuration, - authorization info must be provided. If - authorization info is provided, the - transfer configuration will be - associated with the user id - corresponding to the authorization info. - Otherwise, the transfer configuration - will be associated with the calling - user. + The request object. A request to create a data transfer configuration. If + new credentials are needed for this transfer + configuration, authorization info must be provided. If + authorization info is provided, the transfer + configuration will be associated with the user id + corresponding to the authorization info. Otherwise, the + transfer configuration will be associated with the + calling user. + + When using a cross project service account for creating + a transfer config, you must enable cross project service + account usage. For more information, see `Disable + attachment of service accounts to resources in other + projects `__. parent (:class:`str`): Required. The BigQuery project id where the transfer configuration should be created. Must be in the format @@ -693,10 +696,15 @@ async def sample_update_transfer_config(): Args: request (Optional[Union[google.cloud.bigquery_datatransfer_v1.types.UpdateTransferConfigRequest, dict]]): - The request object. A request to update a transfer - configuration. To update the user id of - the transfer configuration, - authorization info needs to be provided. + The request object. A request to update a transfer configuration. To update + the user id of the transfer configuration, authorization + info needs to be provided. + + When using a cross project service account for updating + a transfer config, you must enable cross project service + account usage. For more information, see `Disable + attachment of service accounts to resources in other + projects `__. transfer_config (:class:`google.cloud.bigquery_datatransfer_v1.types.TransferConfig`): Required. Data transfer configuration to create. diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py index 7bf64c346481..b5032cd300f4 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/client.py @@ -1002,17 +1002,20 @@ def sample_create_transfer_config(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.CreateTransferConfigRequest, dict]): - The request object. A request to create a data transfer - configuration. If new credentials are - needed for this transfer configuration, - authorization info must be provided. If - authorization info is provided, the - transfer configuration will be - associated with the user id - corresponding to the authorization info. - Otherwise, the transfer configuration - will be associated with the calling - user. + The request object. A request to create a data transfer configuration. If + new credentials are needed for this transfer + configuration, authorization info must be provided. If + authorization info is provided, the transfer + configuration will be associated with the user id + corresponding to the authorization info. Otherwise, the + transfer configuration will be associated with the + calling user. + + When using a cross project service account for creating + a transfer config, you must enable cross project service + account usage. For more information, see `Disable + attachment of service accounts to resources in other + projects `__. parent (str): Required. The BigQuery project id where the transfer configuration should be created. Must be in the format @@ -1138,10 +1141,15 @@ def sample_update_transfer_config(): Args: request (Union[google.cloud.bigquery_datatransfer_v1.types.UpdateTransferConfigRequest, dict]): - The request object. A request to update a transfer - configuration. To update the user id of - the transfer configuration, - authorization info needs to be provided. + The request object. A request to update a transfer configuration. To update + the user id of the transfer configuration, authorization + info needs to be provided. + + When using a cross project service account for updating + a transfer config, you must enable cross project service + account usage. For more information, see `Disable + attachment of service accounts to resources in other + projects `__. transfer_config (google.cloud.bigquery_datatransfer_v1.types.TransferConfig): Required. Data transfer configuration to create. diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/rest.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/rest.py index cd9e0af0c4d2..91347f2be728 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/rest.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/rest.py @@ -789,17 +789,20 @@ def __call__( Args: request (~.datatransfer.CreateTransferConfigRequest): - The request object. A request to create a data transfer - configuration. If new credentials are - needed for this transfer configuration, - authorization info must be provided. If - authorization info is provided, the - transfer configuration will be - associated with the user id - corresponding to the authorization info. - Otherwise, the transfer configuration - will be associated with the calling - user. + The request object. A request to create a data transfer configuration. If + new credentials are needed for this transfer + configuration, authorization info must be provided. If + authorization info is provided, the transfer + configuration will be associated with the user id + corresponding to the authorization info. Otherwise, the + transfer configuration will be associated with the + calling user. + + When using a cross project service account for creating + a transfer config, you must enable cross project service + account usage. For more information, see `Disable + attachment of service accounts to resources in other + projects `__. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2104,10 +2107,15 @@ def __call__( Args: request (~.datatransfer.UpdateTransferConfigRequest): - The request object. A request to update a transfer - configuration. To update the user id of - the transfer configuration, - authorization info needs to be provided. + The request object. A request to update a transfer configuration. To update + the user id of the transfer configuration, authorization + info needs to be provided. + + When using a cross project service account for updating + a transfer config, you must enable cross project service + account usage. For more information, see `Disable + attachment of service accounts to resources in other + projects `__. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/types/datatransfer.py b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/types/datatransfer.py index 30e607bd0c09..e0319b78c3e9 100644 --- a/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/types/datatransfer.py +++ b/packages/google-cloud-bigquery-datatransfer/google/cloud/bigquery_datatransfer_v1/types/datatransfer.py @@ -480,6 +480,12 @@ class CreateTransferConfigRequest(proto.Message): user id corresponding to the authorization info. Otherwise, the transfer configuration will be associated with the calling user. + When using a cross project service account for creating a transfer + config, you must enable cross project service account usage. For + more information, see `Disable attachment of service accounts to + resources in other + projects `__. + Attributes: parent (str): Required. The BigQuery project id where the transfer @@ -577,9 +583,15 @@ class CreateTransferConfigRequest(proto.Message): class UpdateTransferConfigRequest(proto.Message): - r"""A request to update a transfer configuration. To update the - user id of the transfer configuration, authorization info needs - to be provided. + r"""A request to update a transfer configuration. To update the user id + of the transfer configuration, authorization info needs to be + provided. + + When using a cross project service account for updating a transfer + config, you must enable cross project service account usage. For + more information, see `Disable attachment of service accounts to + resources in other + projects `__. Attributes: transfer_config (google.cloud.bigquery_datatransfer_v1.types.TransferConfig): diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json index 1fbf5757f11d..adc8c281da8f 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated_samples/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-bigquery-datatransfer", - "version": "3.15.6" + "version": "0.1.0" }, "snippets": [ {