From c57472ac166cc56adb1788fdb1867cbe29f59afc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Mar 2022 02:49:04 +0100 Subject: [PATCH 1/3] chore(deps): update dependency google-cloud-bigquery-connection to v1.3.4 (#180) --- samples/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 1d1078b..9b6b9a1 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-bigquery-connection==1.3.3 \ No newline at end of file +google-cloud-bigquery-connection==1.3.4 \ No newline at end of file From 1be012a7d7f585365cfd6c1e499188784838965a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 11:36:52 -0500 Subject: [PATCH 2/3] feat: Add Cloud_Resource Connection Support (#181) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add Cloud_Resource Connection Support PiperOrigin-RevId: 433053270 Source-Link: https://github.com/googleapis/googleapis/commit/eb0700c6f29ca94f460307f201eb605744f055cb Source-Link: https://github.com/googleapis/googleapis-gen/commit/06782869ed2b853b2750ea2a78fc4b081a822de9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDY3ODI4NjllZDJiODUzYjI3NTBlYTJhNzhmYzRiMDgxYTgyMmRlOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- google/cloud/bigquery_connection/__init__.py | 2 ++ .../cloud/bigquery_connection_v1/__init__.py | 2 ++ .../bigquery_connection_v1/types/__init__.py | 2 ++ .../types/connection.py | 32 +++++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/google/cloud/bigquery_connection/__init__.py b/google/cloud/bigquery_connection/__init__.py index 74b33c2..38d8d1f 100644 --- a/google/cloud/bigquery_connection/__init__.py +++ b/google/cloud/bigquery_connection/__init__.py @@ -24,6 +24,7 @@ from google.cloud.bigquery_connection_v1.types.connection import AwsAccessRole from google.cloud.bigquery_connection_v1.types.connection import AwsCrossAccountRole from google.cloud.bigquery_connection_v1.types.connection import AwsProperties +from google.cloud.bigquery_connection_v1.types.connection import CloudResourceProperties from google.cloud.bigquery_connection_v1.types.connection import CloudSpannerProperties from google.cloud.bigquery_connection_v1.types.connection import CloudSqlCredential from google.cloud.bigquery_connection_v1.types.connection import CloudSqlProperties @@ -41,6 +42,7 @@ "AwsAccessRole", "AwsCrossAccountRole", "AwsProperties", + "CloudResourceProperties", "CloudSpannerProperties", "CloudSqlCredential", "CloudSqlProperties", diff --git a/google/cloud/bigquery_connection_v1/__init__.py b/google/cloud/bigquery_connection_v1/__init__.py index e367619..72991c9 100644 --- a/google/cloud/bigquery_connection_v1/__init__.py +++ b/google/cloud/bigquery_connection_v1/__init__.py @@ -20,6 +20,7 @@ from .types.connection import AwsAccessRole from .types.connection import AwsCrossAccountRole from .types.connection import AwsProperties +from .types.connection import CloudResourceProperties from .types.connection import CloudSpannerProperties from .types.connection import CloudSqlCredential from .types.connection import CloudSqlProperties @@ -36,6 +37,7 @@ "AwsAccessRole", "AwsCrossAccountRole", "AwsProperties", + "CloudResourceProperties", "CloudSpannerProperties", "CloudSqlCredential", "CloudSqlProperties", diff --git a/google/cloud/bigquery_connection_v1/types/__init__.py b/google/cloud/bigquery_connection_v1/types/__init__.py index 29cfef9..4d07f1a 100644 --- a/google/cloud/bigquery_connection_v1/types/__init__.py +++ b/google/cloud/bigquery_connection_v1/types/__init__.py @@ -17,6 +17,7 @@ AwsAccessRole, AwsCrossAccountRole, AwsProperties, + CloudResourceProperties, CloudSpannerProperties, CloudSqlCredential, CloudSqlProperties, @@ -33,6 +34,7 @@ "AwsAccessRole", "AwsCrossAccountRole", "AwsProperties", + "CloudResourceProperties", "CloudSpannerProperties", "CloudSqlCredential", "CloudSqlProperties", diff --git a/google/cloud/bigquery_connection_v1/types/connection.py b/google/cloud/bigquery_connection_v1/types/connection.py index a1740de..2c8256f 100644 --- a/google/cloud/bigquery_connection_v1/types/connection.py +++ b/google/cloud/bigquery_connection_v1/types/connection.py @@ -34,6 +34,7 @@ "AwsProperties", "AwsCrossAccountRole", "AwsAccessRole", + "CloudResourceProperties", }, ) @@ -175,6 +176,10 @@ class Connection(proto.Message): cloud_spanner (google.cloud.bigquery_connection_v1.types.CloudSpannerProperties): Cloud Spanner properties. + This field is a member of `oneof`_ ``properties``. + cloud_resource (google.cloud.bigquery_connection_v1.types.CloudResourceProperties): + Cloud Resource properties. + This field is a member of `oneof`_ ``properties``. creation_time (int): Output only. The creation timestamp of the @@ -199,6 +204,9 @@ class Connection(proto.Message): cloud_spanner = proto.Field( proto.MESSAGE, number=21, oneof="properties", message="CloudSpannerProperties", ) + cloud_resource = proto.Field( + proto.MESSAGE, number=22, oneof="properties", message="CloudResourceProperties", + ) creation_time = proto.Field(proto.INT64, number=5,) last_modified_time = proto.Field(proto.INT64, number=6,) has_credential = proto.Field(proto.BOOL, number=7,) @@ -339,4 +347,28 @@ class AwsAccessRole(proto.Message): identity = proto.Field(proto.STRING, number=2,) +class CloudResourceProperties(proto.Message): + r"""Container for connection properties for delegation of access + to GCP resources. + + Attributes: + service_account_id (str): + Output only. The account ID of the service + created for the purpose of this connection. + The service account does not have any + permissions associated with it when it is + created. After creation, customers delegate + permissions to the service account. When the + connection is used in the context of an + operation in BigQuery, the service account will + be used to connect to the desired resources in + GCP. + + The account ID is in the form of: + @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com + """ + + service_account_id = proto.Field(proto.STRING, number=1,) + + __all__ = tuple(sorted(__protobuf__.manifest)) From 6785b61bd951781493a30e22c1c65aa6c7e26e04 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 11:56:12 -0500 Subject: [PATCH 3/3] chore(main): release 1.4.0 (#182) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 699d7ee..d70dca3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.4.0](https://github.com/googleapis/python-bigquery-connection/compare/v1.3.4...v1.4.0) (2022-03-08) + + +### Features + +* Add Cloud_Resource Connection Support ([#181](https://github.com/googleapis/python-bigquery-connection/issues/181)) ([1be012a](https://github.com/googleapis/python-bigquery-connection/commit/1be012a7d7f585365cfd6c1e499188784838965a)) + ### [1.3.4](https://github.com/googleapis/python-bigquery-connection/compare/v1.3.3...v1.3.4) (2022-03-05) diff --git a/setup.py b/setup.py index c91a617..9c0bb43 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ import os import setuptools # type: ignore -version = "1.3.4" +version = "1.4.0" package_root = os.path.abspath(os.path.dirname(__file__))