Skip to content

Commit 6fa4ff8

Browse files
feat: [google-cloud-datastream] A new field ssl_config is added to message .google.cloud.datastream.v1.PostgresqlProfile (googleapis#13456)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: A new message `PostgresqlSslConfig` is added docs: A comment for message `OracleAsmConfig` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.OracleAsmConfig` is changed docs: A comment for field `name` in message `.google.cloud.datastream.v1.PrivateConnection` is changed docs: A comment for field `name` in message `.google.cloud.datastream.v1.Route` is changed docs: A comment for field `name` in message `.google.cloud.datastream.v1.ConnectionProfile` is changed docs: A comment for field `name` in message `.google.cloud.datastream.v1.Stream` is changed docs: A comment for field `name` in message `.google.cloud.datastream.v1.StreamObject` is changed END_COMMIT_OVERRIDE PiperOrigin-RevId: 717526711 Source-Link: googleapis/googleapis@5c2ccb6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/56c10375a6adb08d9e5e870497b83d03f7408b3e Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0vLk93bEJvdC55YW1sIiwiaCI6IjU2YzEwMzc1YTZhZGIwOGQ5ZTVlODcwNDk3YjgzZDAzZjc0MDhiM2UifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3bd08e8 commit 6fa4ff8

File tree

10 files changed

+145
-12
lines changed

10 files changed

+145
-12
lines changed

packages/google-cloud-datastream/google/cloud/datastream/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
PostgresqlRdbms,
9696
PostgresqlSchema,
9797
PostgresqlSourceConfig,
98+
PostgresqlSslConfig,
9899
PostgresqlTable,
99100
PrivateConnection,
100101
PrivateConnectivity,
@@ -192,6 +193,7 @@
192193
"PostgresqlRdbms",
193194
"PostgresqlSchema",
194195
"PostgresqlSourceConfig",
196+
"PostgresqlSslConfig",
195197
"PostgresqlTable",
196198
"PrivateConnection",
197199
"PrivateConnectivity",

packages/google-cloud-datastream/google/cloud/datastream/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.11.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-datastream/google/cloud/datastream_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
PostgresqlRdbms,
9393
PostgresqlSchema,
9494
PostgresqlSourceConfig,
95+
PostgresqlSslConfig,
9596
PostgresqlTable,
9697
PrivateConnection,
9798
PrivateConnectivity,
@@ -182,6 +183,7 @@
182183
"PostgresqlRdbms",
183184
"PostgresqlSchema",
184185
"PostgresqlSourceConfig",
186+
"PostgresqlSslConfig",
185187
"PostgresqlTable",
186188
"PrivateConnection",
187189
"PrivateConnectivity",

packages/google-cloud-datastream/google/cloud/datastream_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.11.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-datastream/google/cloud/datastream_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
PostgresqlRdbms,
8787
PostgresqlSchema,
8888
PostgresqlSourceConfig,
89+
PostgresqlSslConfig,
8990
PostgresqlTable,
9091
PrivateConnection,
9192
PrivateConnectivity,
@@ -181,6 +182,7 @@
181182
"PostgresqlRdbms",
182183
"PostgresqlSchema",
183184
"PostgresqlSourceConfig",
185+
"PostgresqlSslConfig",
184186
"PostgresqlTable",
185187
"PrivateConnection",
186188
"PrivateConnectivity",

packages/google-cloud-datastream/google/cloud/datastream_v1/types/datastream_resources.py

Lines changed: 118 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"Route",
4040
"MysqlSslConfig",
4141
"OracleSslConfig",
42+
"PostgresqlSslConfig",
4243
"ConnectionProfile",
4344
"OracleColumn",
4445
"OracleTable",
@@ -158,7 +159,7 @@ class OracleProfile(proto.Message):
158159

159160
class OracleAsmConfig(proto.Message):
160161
r"""Configuration for Oracle Automatic Storage Management (ASM)
161-
connection.
162+
connection. .
162163
163164
Attributes:
164165
hostname (str):
@@ -170,7 +171,7 @@ class OracleAsmConfig(proto.Message):
170171
Required. Username for the Oracle ASM
171172
connection.
172173
password (str):
173-
Required. Password for the Oracle ASM
174+
Optional. Password for the Oracle ASM
174175
connection.
175176
asm_service (str):
176177
Required. ASM service name for the Oracle ASM
@@ -276,6 +277,12 @@ class PostgresqlProfile(proto.Message):
276277
database (str):
277278
Required. Database for the PostgreSQL
278279
connection.
280+
ssl_config (google.cloud.datastream_v1.types.PostgresqlSslConfig):
281+
Optional. SSL configuration for the PostgreSQL connection.
282+
In case PostgresqlSslConfig is not set, the connection will
283+
use the default SSL mode, which is ``prefer`` (i.e. this
284+
mode will only use encryption if enabled from database side,
285+
otherwise will use unencrypted communication)
279286
"""
280287

281288
hostname: str = proto.Field(
@@ -298,6 +305,11 @@ class PostgresqlProfile(proto.Message):
298305
proto.STRING,
299306
number=5,
300307
)
308+
ssl_config: "PostgresqlSslConfig" = proto.Field(
309+
proto.MESSAGE,
310+
number=7,
311+
message="PostgresqlSslConfig",
312+
)
301313

302314

303315
class SqlServerProfile(proto.Message):
@@ -459,7 +471,7 @@ class PrivateConnection(proto.Message):
459471
460472
Attributes:
461473
name (str):
462-
Output only. The resource's name.
474+
Output only. Identifier. The resource's name.
463475
create_time (google.protobuf.timestamp_pb2.Timestamp):
464476
Output only. The create time of the resource.
465477
update_time (google.protobuf.timestamp_pb2.Timestamp):
@@ -567,7 +579,7 @@ class Route(proto.Message):
567579
568580
Attributes:
569581
name (str):
570-
Output only. The resource's name.
582+
Output only. Identifier. The resource's name.
571583
create_time (google.protobuf.timestamp_pb2.Timestamp):
572584
Output only. The create time of the resource.
573585
update_time (google.protobuf.timestamp_pb2.Timestamp):
@@ -692,6 +704,104 @@ class OracleSslConfig(proto.Message):
692704
)
693705

694706

707+
class PostgresqlSslConfig(proto.Message):
708+
r"""PostgreSQL SSL configuration information.
709+
710+
This message has `oneof`_ fields (mutually exclusive fields).
711+
For each oneof, at most one member field can be set at the same time.
712+
Setting any member of the oneof automatically clears all other
713+
members.
714+
715+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
716+
717+
Attributes:
718+
server_verification (google.cloud.datastream_v1.types.PostgresqlSslConfig.ServerVerification):
719+
If this field is set, the communication will
720+
be encrypted with TLS encryption and the server
721+
identity will be authenticated.
722+
723+
This field is a member of `oneof`_ ``encryption_setting``.
724+
server_and_client_verification (google.cloud.datastream_v1.types.PostgresqlSslConfig.ServerAndClientVerification):
725+
If this field is set, the communication will
726+
be encrypted with TLS encryption and both the
727+
server identity and the client identity will be
728+
authenticated.
729+
730+
This field is a member of `oneof`_ ``encryption_setting``.
731+
"""
732+
733+
class ServerVerification(proto.Message):
734+
r"""Message represents the option where Datastream will enforce the
735+
encryption and authenticate the server identity. ca_certificate must
736+
be set if user selects this option.
737+
738+
Attributes:
739+
ca_certificate (str):
740+
Required. Input only. PEM-encoded server root
741+
CA certificate.
742+
"""
743+
744+
ca_certificate: str = proto.Field(
745+
proto.STRING,
746+
number=1,
747+
)
748+
749+
class ServerAndClientVerification(proto.Message):
750+
r"""Message represents the option where Datastream will enforce the
751+
encryption and authenticate the server identity as well as the
752+
client identity. ca_certificate, client_certificate and client_key
753+
must be set if user selects this option.
754+
755+
Attributes:
756+
client_certificate (str):
757+
Required. Input only. PEM-encoded certificate
758+
used by the source database to authenticate the
759+
client identity (i.e., the Datastream's
760+
identity). This certificate is signed by either
761+
a root certificate trusted by the server or one
762+
or more intermediate certificates (which is
763+
stored with the leaf certificate) to link the
764+
this certificate to the trusted root
765+
certificate.
766+
client_key (str):
767+
Required. Input only. PEM-encoded private key
768+
associated with the client certificate. This
769+
value will be used during the SSL/TLS handshake,
770+
allowing the PostgreSQL server to authenticate
771+
the client's identity, i.e. identity of the
772+
Datastream.
773+
ca_certificate (str):
774+
Required. Input only. PEM-encoded server root
775+
CA certificate.
776+
"""
777+
778+
client_certificate: str = proto.Field(
779+
proto.STRING,
780+
number=1,
781+
)
782+
client_key: str = proto.Field(
783+
proto.STRING,
784+
number=2,
785+
)
786+
ca_certificate: str = proto.Field(
787+
proto.STRING,
788+
number=3,
789+
)
790+
791+
server_verification: ServerVerification = proto.Field(
792+
proto.MESSAGE,
793+
number=1,
794+
oneof="encryption_setting",
795+
message=ServerVerification,
796+
)
797+
server_and_client_verification: ServerAndClientVerification = proto.Field(
798+
proto.MESSAGE,
799+
number=2,
800+
oneof="encryption_setting",
801+
message=ServerAndClientVerification,
802+
)
803+
804+
695805
class ConnectionProfile(proto.Message):
696806
r"""A set of reusable connection configurations to be used as a
697807
source or destination for a stream.
@@ -705,7 +815,7 @@ class ConnectionProfile(proto.Message):
705815
706816
Attributes:
707817
name (str):
708-
Output only. The resource's name.
818+
Output only. Identifier. The resource's name.
709819
create_time (google.protobuf.timestamp_pb2.Timestamp):
710820
Output only. The create time of the resource.
711821
update_time (google.protobuf.timestamp_pb2.Timestamp):
@@ -2043,7 +2153,7 @@ class Stream(proto.Message):
20432153
20442154
Attributes:
20452155
name (str):
2046-
Output only. The stream's name.
2156+
Output only. Identifier. The stream's name.
20472157
create_time (google.protobuf.timestamp_pb2.Timestamp):
20482158
Output only. The creation time of the stream.
20492159
update_time (google.protobuf.timestamp_pb2.Timestamp):
@@ -2264,7 +2374,8 @@ class StreamObject(proto.Message):
22642374
22652375
Attributes:
22662376
name (str):
2267-
Output only. The object resource's name.
2377+
Output only. Identifier. The object
2378+
resource's name.
22682379
create_time (google.protobuf.timestamp_pb2.Timestamp):
22692380
Output only. The creation time of the object.
22702381
update_time (google.protobuf.timestamp_pb2.Timestamp):

packages/google-cloud-datastream/google/cloud/datastream_v1alpha1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.11.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-datastream/samples/generated_samples/snippet_metadata_google.cloud.datastream.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-datastream",
11-
"version": "1.11.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-datastream/samples/generated_samples/snippet_metadata_google.cloud.datastream.v1alpha1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-datastream",
11-
"version": "1.11.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-datastream/tests/unit/gapic/datastream_v1/test_datastream.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17966,6 +17966,14 @@ def test_create_connection_profile_rest_call_success(request_type):
1796617966
"username": "username_value",
1796717967
"password": "password_value",
1796817968
"database": "database_value",
17969+
"ssl_config": {
17970+
"server_verification": {"ca_certificate": "ca_certificate_value"},
17971+
"server_and_client_verification": {
17972+
"client_certificate": "client_certificate_value",
17973+
"client_key": "client_key_value",
17974+
"ca_certificate": "ca_certificate_value",
17975+
},
17976+
},
1796917977
},
1797017978
"sql_server_profile": {
1797117979
"hostname": "hostname_value",
@@ -18229,6 +18237,14 @@ def test_update_connection_profile_rest_call_success(request_type):
1822918237
"username": "username_value",
1823018238
"password": "password_value",
1823118239
"database": "database_value",
18240+
"ssl_config": {
18241+
"server_verification": {"ca_certificate": "ca_certificate_value"},
18242+
"server_and_client_verification": {
18243+
"client_certificate": "client_certificate_value",
18244+
"client_key": "client_key_value",
18245+
"ca_certificate": "ca_certificate_value",
18246+
},
18247+
},
1823218248
},
1823318249
"sql_server_profile": {
1823418250
"hostname": "hostname_value",

0 commit comments

Comments
 (0)