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/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)) 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 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__))