Skip to content

Commit

Permalink
feat: [google-cloud-datastream] A new field ssl_config is added to …
Browse files Browse the repository at this point in the history
…message `.google.cloud.datastream.v1.PostgresqlProfile` (#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:
googleapis/googleapis-gen@56c1037
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0vLk93bEJvdC55YW1sIiwiaCI6IjU2YzEwMzc1YTZhZGIwOGQ5ZTVlODcwNDk3YjgzZDAzZjc0MDhiM2UifQ==

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jan 20, 2025
1 parent 3bd08e8 commit 6fa4ff8
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
PostgresqlRdbms,
PostgresqlSchema,
PostgresqlSourceConfig,
PostgresqlSslConfig,
PostgresqlTable,
PrivateConnection,
PrivateConnectivity,
Expand Down Expand Up @@ -192,6 +193,7 @@
"PostgresqlRdbms",
"PostgresqlSchema",
"PostgresqlSourceConfig",
"PostgresqlSslConfig",
"PostgresqlTable",
"PrivateConnection",
"PrivateConnectivity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.11.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
PostgresqlRdbms,
PostgresqlSchema,
PostgresqlSourceConfig,
PostgresqlSslConfig,
PostgresqlTable,
PrivateConnection,
PrivateConnectivity,
Expand Down Expand Up @@ -182,6 +183,7 @@
"PostgresqlRdbms",
"PostgresqlSchema",
"PostgresqlSourceConfig",
"PostgresqlSslConfig",
"PostgresqlTable",
"PrivateConnection",
"PrivateConnectivity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.11.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
PostgresqlRdbms,
PostgresqlSchema,
PostgresqlSourceConfig,
PostgresqlSslConfig,
PostgresqlTable,
PrivateConnection,
PrivateConnectivity,
Expand Down Expand Up @@ -181,6 +182,7 @@
"PostgresqlRdbms",
"PostgresqlSchema",
"PostgresqlSourceConfig",
"PostgresqlSslConfig",
"PostgresqlTable",
"PrivateConnection",
"PrivateConnectivity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"Route",
"MysqlSslConfig",
"OracleSslConfig",
"PostgresqlSslConfig",
"ConnectionProfile",
"OracleColumn",
"OracleTable",
Expand Down Expand Up @@ -158,7 +159,7 @@ class OracleProfile(proto.Message):

class OracleAsmConfig(proto.Message):
r"""Configuration for Oracle Automatic Storage Management (ASM)
connection.
connection. .
Attributes:
hostname (str):
Expand All @@ -170,7 +171,7 @@ class OracleAsmConfig(proto.Message):
Required. Username for the Oracle ASM
connection.
password (str):
Required. Password for the Oracle ASM
Optional. Password for the Oracle ASM
connection.
asm_service (str):
Required. ASM service name for the Oracle ASM
Expand Down Expand Up @@ -276,6 +277,12 @@ class PostgresqlProfile(proto.Message):
database (str):
Required. Database for the PostgreSQL
connection.
ssl_config (google.cloud.datastream_v1.types.PostgresqlSslConfig):
Optional. SSL configuration for the PostgreSQL connection.
In case PostgresqlSslConfig is not set, the connection will
use the default SSL mode, which is ``prefer`` (i.e. this
mode will only use encryption if enabled from database side,
otherwise will use unencrypted communication)
"""

hostname: str = proto.Field(
Expand All @@ -298,6 +305,11 @@ class PostgresqlProfile(proto.Message):
proto.STRING,
number=5,
)
ssl_config: "PostgresqlSslConfig" = proto.Field(
proto.MESSAGE,
number=7,
message="PostgresqlSslConfig",
)


class SqlServerProfile(proto.Message):
Expand Down Expand Up @@ -459,7 +471,7 @@ class PrivateConnection(proto.Message):
Attributes:
name (str):
Output only. The resource's name.
Output only. Identifier. The resource's name.
create_time (google.protobuf.timestamp_pb2.Timestamp):
Output only. The create time of the resource.
update_time (google.protobuf.timestamp_pb2.Timestamp):
Expand Down Expand Up @@ -567,7 +579,7 @@ class Route(proto.Message):
Attributes:
name (str):
Output only. The resource's name.
Output only. Identifier. The resource's name.
create_time (google.protobuf.timestamp_pb2.Timestamp):
Output only. The create time of the resource.
update_time (google.protobuf.timestamp_pb2.Timestamp):
Expand Down Expand Up @@ -692,6 +704,104 @@ class OracleSslConfig(proto.Message):
)


class PostgresqlSslConfig(proto.Message):
r"""PostgreSQL SSL configuration information.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
server_verification (google.cloud.datastream_v1.types.PostgresqlSslConfig.ServerVerification):
If this field is set, the communication will
be encrypted with TLS encryption and the server
identity will be authenticated.
This field is a member of `oneof`_ ``encryption_setting``.
server_and_client_verification (google.cloud.datastream_v1.types.PostgresqlSslConfig.ServerAndClientVerification):
If this field is set, the communication will
be encrypted with TLS encryption and both the
server identity and the client identity will be
authenticated.
This field is a member of `oneof`_ ``encryption_setting``.
"""

class ServerVerification(proto.Message):
r"""Message represents the option where Datastream will enforce the
encryption and authenticate the server identity. ca_certificate must
be set if user selects this option.
Attributes:
ca_certificate (str):
Required. Input only. PEM-encoded server root
CA certificate.
"""

ca_certificate: str = proto.Field(
proto.STRING,
number=1,
)

class ServerAndClientVerification(proto.Message):
r"""Message represents the option where Datastream will enforce the
encryption and authenticate the server identity as well as the
client identity. ca_certificate, client_certificate and client_key
must be set if user selects this option.
Attributes:
client_certificate (str):
Required. Input only. PEM-encoded certificate
used by the source database to authenticate the
client identity (i.e., the Datastream's
identity). This certificate is signed by either
a root certificate trusted by the server or one
or more intermediate certificates (which is
stored with the leaf certificate) to link the
this certificate to the trusted root
certificate.
client_key (str):
Required. Input only. PEM-encoded private key
associated with the client certificate. This
value will be used during the SSL/TLS handshake,
allowing the PostgreSQL server to authenticate
the client's identity, i.e. identity of the
Datastream.
ca_certificate (str):
Required. Input only. PEM-encoded server root
CA certificate.
"""

client_certificate: str = proto.Field(
proto.STRING,
number=1,
)
client_key: str = proto.Field(
proto.STRING,
number=2,
)
ca_certificate: str = proto.Field(
proto.STRING,
number=3,
)

server_verification: ServerVerification = proto.Field(
proto.MESSAGE,
number=1,
oneof="encryption_setting",
message=ServerVerification,
)
server_and_client_verification: ServerAndClientVerification = proto.Field(
proto.MESSAGE,
number=2,
oneof="encryption_setting",
message=ServerAndClientVerification,
)


class ConnectionProfile(proto.Message):
r"""A set of reusable connection configurations to be used as a
source or destination for a stream.
Expand All @@ -705,7 +815,7 @@ class ConnectionProfile(proto.Message):
Attributes:
name (str):
Output only. The resource's name.
Output only. Identifier. The resource's name.
create_time (google.protobuf.timestamp_pb2.Timestamp):
Output only. The create time of the resource.
update_time (google.protobuf.timestamp_pb2.Timestamp):
Expand Down Expand Up @@ -2043,7 +2153,7 @@ class Stream(proto.Message):
Attributes:
name (str):
Output only. The stream's name.
Output only. Identifier. The stream's name.
create_time (google.protobuf.timestamp_pb2.Timestamp):
Output only. The creation time of the stream.
update_time (google.protobuf.timestamp_pb2.Timestamp):
Expand Down Expand Up @@ -2264,7 +2374,8 @@ class StreamObject(proto.Message):
Attributes:
name (str):
Output only. The object resource's name.
Output only. Identifier. The object
resource's name.
create_time (google.protobuf.timestamp_pb2.Timestamp):
Output only. The creation time of the object.
update_time (google.protobuf.timestamp_pb2.Timestamp):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.11.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-datastream",
"version": "1.11.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-datastream",
"version": "1.11.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17966,6 +17966,14 @@ def test_create_connection_profile_rest_call_success(request_type):
"username": "username_value",
"password": "password_value",
"database": "database_value",
"ssl_config": {
"server_verification": {"ca_certificate": "ca_certificate_value"},
"server_and_client_verification": {
"client_certificate": "client_certificate_value",
"client_key": "client_key_value",
"ca_certificate": "ca_certificate_value",
},
},
},
"sql_server_profile": {
"hostname": "hostname_value",
Expand Down Expand Up @@ -18229,6 +18237,14 @@ def test_update_connection_profile_rest_call_success(request_type):
"username": "username_value",
"password": "password_value",
"database": "database_value",
"ssl_config": {
"server_verification": {"ca_certificate": "ca_certificate_value"},
"server_and_client_verification": {
"client_certificate": "client_certificate_value",
"client_key": "client_key_value",
"ca_certificate": "ca_certificate_value",
},
},
},
"sql_server_profile": {
"hostname": "hostname_value",
Expand Down

0 comments on commit 6fa4ff8

Please # to comment.