Skip to content

Commit e3cdd49

Browse files
feat: [google-cloud-datastream] A new method RunStream is added to service Datastream (googleapis#13293)
BEGIN_COMMIT_OVERRIDE feat: A new method `RunStream` is added to service `Datastream` feat: A new field `sql_server_rdbms` is added to message `.google.cloud.datastream.v1.DiscoverConnectionProfileRequest` feat: A new field `sql_server_rdbms` is added to message `.google.cloud.datastream.v1.DiscoverConnectionProfileResponse` feat: A new message `RunStreamRequest` is added feat: A new field `oracle_ssl_config` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new field `oracle_asm_config` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new field `secret_manager_stored_password` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new message `OracleAsmConfig` is added feat: A new message `SqlServerProfile` is added feat: A new message `OracleSslConfig` is added feat: A new field `sql_server_profile` is added to message `.google.cloud.datastream.v1.ConnectionProfile` feat: A new message `LogMiner` is added feat: A new message `BinaryLogParser` is added feat: A new field `log_miner` is added to message `.google.cloud.datastream.v1.OracleSourceConfig` feat: A new field `binary_log_parser` is added to message `.google.cloud.datastream.v1.OracleSourceConfig` feat: A new message `SqlServerColumn` is added feat: A new message `SqlServerTable` is added feat: A new message `SqlServerSchema` is added feat: A new message `SqlServerRdbms` is added feat: A new message `SqlServerSourceConfig` is added feat: A new message `SqlServerTransactionLogs` is added feat: A new message `SqlServerChangeTables` is added feat: A new message `BinaryLogPosition` is added feat: A new message `Gtid` is added feat: A new field `binary_log_position` is added to message `.google.cloud.datastream.v1.MysqlSourceConfig` feat: A new field `gtid` is added to message `.google.cloud.datastream.v1.MysqlSourceConfig` feat: A new field `sql_server_source_config` is added to message `.google.cloud.datastream.v1.SourceConfig` feat: A new message `AppendOnly` is added feat: A new message `Merge` is added feat: A new field `merge` is added to message `.google.cloud.datastream.v1.BigQueryDestinationConfig` feat: A new field `append_only` is added to message `.google.cloud.datastream.v1.BigQueryDestinationConfig` feat: A new field `sql_server_excluded_objects` is added to message `.google.cloud.datastream.v1.Stream` feat: A new field `last_recovery_time` is added to message `.google.cloud.datastream.v1.Stream` feat: A new message `SqlServerObjectIdentifier` is added feat: A new field `sql_server_identifier` is added to message `.google.cloud.datastream.v1.SourceObjectIdentifier` feat: A new value `WARNING` is added to enum `State` feat: A new message `CdcStrategy` is added feat: A new message `SqlServerLsnPosition` is added feat: A new message `OracleScnPosition` is added feat: A new message `MysqlLogPosition` is added docs: A comment for field `requested_cancellation` in message `.google.cloud.datastream.v1.OperationMetadata` is changed docs: A comment for message `OracleProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.OracleProfile` is changed docs: A comment for message `MysqlProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.MysqlProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.PostgresqlProfile` is changed docs: A comment for field `stream_large_objects` in message `.google.cloud.datastream.v1.OracleSourceConfig` is changed docs: A comment for field `dataset_id` in message `.google.cloud.datastream.v1.BigQueryDestinationConfig` is changed docs: A comment for field `state` in message `.google.cloud.datastream.v1.BackfillJob` is changed docs: A comment for field `state` in message `.google.cloud.datastream.v1.Validation` is changed END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. feat: A new field `sql_server_rdbms` is added to message `.google.cloud.datastream.v1.DiscoverConnectionProfileRequest` feat: A new field `sql_server_rdbms` is added to message `.google.cloud.datastream.v1.DiscoverConnectionProfileResponse` feat: A new message `RunStreamRequest` is added feat: A new field `oracle_ssl_config` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new field `oracle_asm_config` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new field `secret_manager_stored_password` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new message `OracleAsmConfig` is added feat: A new message `SqlServerProfile` is added feat: A new message `OracleSslConfig` is added feat: A new field `sql_server_profile` is added to message `.google.cloud.datastream.v1.ConnectionProfile` feat: A new message `LogMiner` is added feat: A new message `BinaryLogParser` is added feat: A new field `log_miner` is added to message `.google.cloud.datastream.v1.OracleSourceConfig` feat: A new field `binary_log_parser` is added to message `.google.cloud.datastream.v1.OracleSourceConfig` feat: A new message `SqlServerColumn` is added feat: A new message `SqlServerTable` is added feat: A new message `SqlServerSchema` is added feat: A new message `SqlServerRdbms` is added feat: A new message `SqlServerSourceConfig` is added feat: A new message `SqlServerTransactionLogs` is added feat: A new message `SqlServerChangeTables` is added feat: A new message `BinaryLogPosition` is added feat: A new message `Gtid` is added feat: A new field `binary_log_position` is added to message `.google.cloud.datastream.v1.MysqlSourceConfig` feat: A new field `gtid` is added to message `.google.cloud.datastream.v1.MysqlSourceConfig` feat: A new field `sql_server_source_config` is added to message `.google.cloud.datastream.v1.SourceConfig` feat: A new message `AppendOnly` is added feat: A new message `Merge` is added feat: A new field `merge` is added to message `.google.cloud.datastream.v1.BigQueryDestinationConfig` feat: A new field `append_only` is added to message `.google.cloud.datastream.v1.BigQueryDestinationConfig` feat: A new field `sql_server_excluded_objects` is added to message `.google.cloud.datastream.v1.Stream` feat: A new field `last_recovery_time` is added to message `.google.cloud.datastream.v1.Stream` feat: A new message `SqlServerObjectIdentifier` is added feat: A new field `sql_server_identifier` is added to message `.google.cloud.datastream.v1.SourceObjectIdentifier` feat: A new value `WARNING` is added to enum `State` feat: A new message `CdcStrategy` is added feat: A new message `SqlServerLsnPosition` is added feat: A new message `OracleScnPosition` is added feat: A new message `MysqlLogPosition` is added docs: A comment for field `requested_cancellation` in message `.google.cloud.datastream.v1.OperationMetadata` is changed docs: A comment for message `OracleProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.OracleProfile` is changed docs: A comment for message `MysqlProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.MysqlProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.PostgresqlProfile` is changed docs: A comment for field `stream_large_objects` in message `.google.cloud.datastream.v1.OracleSourceConfig` is changed docs: A comment for field `dataset_id` in message `.google.cloud.datastream.v1.BigQueryDestinationConfig` is changed docs: A comment for field `state` in message `.google.cloud.datastream.v1.BackfillJob` is changed docs: A comment for field `state` in message `.google.cloud.datastream.v1.Validation` is changed PiperOrigin-RevId: 698715682 Source-Link: googleapis/googleapis@798a8be Source-Link: https://github.com/googleapis/googleapis-gen/commit/c1fe03a818c9c10b2d58ba7f34eb66c3f0a0819a Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0vLk93bEJvdC55YW1sIiwiaCI6ImMxZmUwM2E4MThjOWMxMGIyZDU4YmE3ZjM0ZWI2NmMzZjBhMDgxOWEifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <[email protected]>
1 parent 2b05355 commit e3cdd49

28 files changed

+2379
-92
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
ListStreamsResponse,
5353
LookupStreamObjectRequest,
5454
OperationMetadata,
55+
RunStreamRequest,
5556
StartBackfillJobRequest,
5657
StartBackfillJobResponse,
5758
StopBackfillJobRequest,
@@ -64,6 +65,7 @@
6465
BackfillJob,
6566
BigQueryDestinationConfig,
6667
BigQueryProfile,
68+
CdcStrategy,
6769
ConnectionProfile,
6870
DestinationConfig,
6971
Error,
@@ -73,16 +75,20 @@
7375
JsonFileFormat,
7476
MysqlColumn,
7577
MysqlDatabase,
78+
MysqlLogPosition,
7679
MysqlProfile,
7780
MysqlRdbms,
7881
MysqlSourceConfig,
7982
MysqlSslConfig,
8083
MysqlTable,
84+
OracleAsmConfig,
8185
OracleColumn,
8286
OracleProfile,
8387
OracleRdbms,
8488
OracleSchema,
89+
OracleScnPosition,
8590
OracleSourceConfig,
91+
OracleSslConfig,
8692
OracleTable,
8793
PostgresqlColumn,
8894
PostgresqlProfile,
@@ -95,6 +101,15 @@
95101
Route,
96102
SourceConfig,
97103
SourceObjectIdentifier,
104+
SqlServerChangeTables,
105+
SqlServerColumn,
106+
SqlServerLsnPosition,
107+
SqlServerProfile,
108+
SqlServerRdbms,
109+
SqlServerSchema,
110+
SqlServerSourceConfig,
111+
SqlServerTable,
112+
SqlServerTransactionLogs,
98113
StaticServiceIpConnectivity,
99114
Stream,
100115
StreamObject,
@@ -136,6 +151,7 @@
136151
"ListStreamsResponse",
137152
"LookupStreamObjectRequest",
138153
"OperationMetadata",
154+
"RunStreamRequest",
139155
"StartBackfillJobRequest",
140156
"StartBackfillJobResponse",
141157
"StopBackfillJobRequest",
@@ -146,6 +162,7 @@
146162
"BackfillJob",
147163
"BigQueryDestinationConfig",
148164
"BigQueryProfile",
165+
"CdcStrategy",
149166
"ConnectionProfile",
150167
"DestinationConfig",
151168
"Error",
@@ -155,16 +172,20 @@
155172
"JsonFileFormat",
156173
"MysqlColumn",
157174
"MysqlDatabase",
175+
"MysqlLogPosition",
158176
"MysqlProfile",
159177
"MysqlRdbms",
160178
"MysqlSourceConfig",
161179
"MysqlSslConfig",
162180
"MysqlTable",
181+
"OracleAsmConfig",
163182
"OracleColumn",
164183
"OracleProfile",
165184
"OracleRdbms",
166185
"OracleSchema",
186+
"OracleScnPosition",
167187
"OracleSourceConfig",
188+
"OracleSslConfig",
168189
"OracleTable",
169190
"PostgresqlColumn",
170191
"PostgresqlProfile",
@@ -177,6 +198,15 @@
177198
"Route",
178199
"SourceConfig",
179200
"SourceObjectIdentifier",
201+
"SqlServerChangeTables",
202+
"SqlServerColumn",
203+
"SqlServerLsnPosition",
204+
"SqlServerProfile",
205+
"SqlServerRdbms",
206+
"SqlServerSchema",
207+
"SqlServerSourceConfig",
208+
"SqlServerTable",
209+
"SqlServerTransactionLogs",
180210
"StaticServiceIpConnectivity",
181211
"Stream",
182212
"StreamObject",

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.10.1" # {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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
ListStreamsResponse,
5050
LookupStreamObjectRequest,
5151
OperationMetadata,
52+
RunStreamRequest,
5253
StartBackfillJobRequest,
5354
StartBackfillJobResponse,
5455
StopBackfillJobRequest,
@@ -61,6 +62,7 @@
6162
BackfillJob,
6263
BigQueryDestinationConfig,
6364
BigQueryProfile,
65+
CdcStrategy,
6466
ConnectionProfile,
6567
DestinationConfig,
6668
Error,
@@ -70,16 +72,20 @@
7072
JsonFileFormat,
7173
MysqlColumn,
7274
MysqlDatabase,
75+
MysqlLogPosition,
7376
MysqlProfile,
7477
MysqlRdbms,
7578
MysqlSourceConfig,
7679
MysqlSslConfig,
7780
MysqlTable,
81+
OracleAsmConfig,
7882
OracleColumn,
7983
OracleProfile,
8084
OracleRdbms,
8185
OracleSchema,
86+
OracleScnPosition,
8287
OracleSourceConfig,
88+
OracleSslConfig,
8389
OracleTable,
8490
PostgresqlColumn,
8591
PostgresqlProfile,
@@ -92,6 +98,15 @@
9298
Route,
9399
SourceConfig,
94100
SourceObjectIdentifier,
101+
SqlServerChangeTables,
102+
SqlServerColumn,
103+
SqlServerLsnPosition,
104+
SqlServerProfile,
105+
SqlServerRdbms,
106+
SqlServerSchema,
107+
SqlServerSourceConfig,
108+
SqlServerTable,
109+
SqlServerTransactionLogs,
95110
StaticServiceIpConnectivity,
96111
Stream,
97112
StreamObject,
@@ -107,6 +122,7 @@
107122
"BackfillJob",
108123
"BigQueryDestinationConfig",
109124
"BigQueryProfile",
125+
"CdcStrategy",
110126
"ConnectionProfile",
111127
"CreateConnectionProfileRequest",
112128
"CreatePrivateConnectionRequest",
@@ -145,17 +161,21 @@
145161
"LookupStreamObjectRequest",
146162
"MysqlColumn",
147163
"MysqlDatabase",
164+
"MysqlLogPosition",
148165
"MysqlProfile",
149166
"MysqlRdbms",
150167
"MysqlSourceConfig",
151168
"MysqlSslConfig",
152169
"MysqlTable",
153170
"OperationMetadata",
171+
"OracleAsmConfig",
154172
"OracleColumn",
155173
"OracleProfile",
156174
"OracleRdbms",
157175
"OracleSchema",
176+
"OracleScnPosition",
158177
"OracleSourceConfig",
178+
"OracleSslConfig",
159179
"OracleTable",
160180
"PostgresqlColumn",
161181
"PostgresqlProfile",
@@ -166,8 +186,18 @@
166186
"PrivateConnection",
167187
"PrivateConnectivity",
168188
"Route",
189+
"RunStreamRequest",
169190
"SourceConfig",
170191
"SourceObjectIdentifier",
192+
"SqlServerChangeTables",
193+
"SqlServerColumn",
194+
"SqlServerLsnPosition",
195+
"SqlServerProfile",
196+
"SqlServerRdbms",
197+
"SqlServerSchema",
198+
"SqlServerSourceConfig",
199+
"SqlServerTable",
200+
"SqlServerTransactionLogs",
171201
"StartBackfillJobRequest",
172202
"StartBackfillJobResponse",
173203
"StaticServiceIpConnectivity",

packages/google-cloud-datastream/google/cloud/datastream_v1/gapic_metadata.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@
115115
"lookup_stream_object"
116116
]
117117
},
118+
"RunStream": {
119+
"methods": [
120+
"run_stream"
121+
]
122+
},
118123
"StartBackfillJob": {
119124
"methods": [
120125
"start_backfill_job"
@@ -245,6 +250,11 @@
245250
"lookup_stream_object"
246251
]
247252
},
253+
"RunStream": {
254+
"methods": [
255+
"run_stream"
256+
]
257+
},
248258
"StartBackfillJob": {
249259
"methods": [
250260
"start_backfill_job"
@@ -375,6 +385,11 @@
375385
"lookup_stream_object"
376386
]
377387
},
388+
"RunStream": {
389+
"methods": [
390+
"run_stream"
391+
]
392+
},
378393
"StartBackfillJob": {
379394
"methods": [
380395
"start_backfill_job"

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.10.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-datastream/google/cloud/datastream_v1/services/datastream/async_client.py

Lines changed: 100 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ async def sample_create_connection_profile():
537537
connection_profile = datastream_v1.ConnectionProfile()
538538
connection_profile.oracle_profile.hostname = "hostname_value"
539539
connection_profile.oracle_profile.username = "username_value"
540-
connection_profile.oracle_profile.password = "password_value"
541540
connection_profile.oracle_profile.database_service = "database_service_value"
542541
connection_profile.display_name = "display_name_value"
543542
@@ -688,7 +687,6 @@ async def sample_update_connection_profile():
688687
connection_profile = datastream_v1.ConnectionProfile()
689688
connection_profile.oracle_profile.hostname = "hostname_value"
690689
connection_profile.oracle_profile.username = "username_value"
691-
connection_profile.oracle_profile.password = "password_value"
692690
connection_profile.oracle_profile.database_service = "database_service_value"
693691
connection_profile.display_name = "display_name_value"
694692
@@ -965,7 +963,6 @@ async def sample_discover_connection_profile():
965963
connection_profile = datastream_v1.ConnectionProfile()
966964
connection_profile.oracle_profile.hostname = "hostname_value"
967965
connection_profile.oracle_profile.username = "username_value"
968-
connection_profile.oracle_profile.password = "password_value"
969966
connection_profile.oracle_profile.database_service = "database_service_value"
970967
connection_profile.display_name = "display_name_value"
971968
@@ -1672,6 +1669,106 @@ async def sample_delete_stream():
16721669
# Done; return the response.
16731670
return response
16741671

1672+
async def run_stream(
1673+
self,
1674+
request: Optional[Union[datastream.RunStreamRequest, dict]] = None,
1675+
*,
1676+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1677+
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1678+
metadata: Sequence[Tuple[str, str]] = (),
1679+
) -> operation_async.AsyncOperation:
1680+
r"""Use this method to start, resume or recover a stream
1681+
with a non default CDC strategy.
1682+
1683+
.. code-block:: python
1684+
1685+
# This snippet has been automatically generated and should be regarded as a
1686+
# code template only.
1687+
# It will require modifications to work:
1688+
# - It may require correct/in-range values for request initialization.
1689+
# - It may require specifying regional endpoints when creating the service
1690+
# client as shown in:
1691+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
1692+
from google.cloud import datastream_v1
1693+
1694+
async def sample_run_stream():
1695+
# Create a client
1696+
client = datastream_v1.DatastreamAsyncClient()
1697+
1698+
# Initialize request argument(s)
1699+
request = datastream_v1.RunStreamRequest(
1700+
name="name_value",
1701+
)
1702+
1703+
# Make the request
1704+
operation = client.run_stream(request=request)
1705+
1706+
print("Waiting for operation to complete...")
1707+
1708+
response = (await operation).result()
1709+
1710+
# Handle the response
1711+
print(response)
1712+
1713+
Args:
1714+
request (Optional[Union[google.cloud.datastream_v1.types.RunStreamRequest, dict]]):
1715+
The request object. Request message for running a stream.
1716+
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
1717+
should be retried.
1718+
timeout (float): The timeout for this request.
1719+
metadata (Sequence[Tuple[str, str]]): Strings which should be
1720+
sent along with the request as metadata.
1721+
1722+
Returns:
1723+
google.api_core.operation_async.AsyncOperation:
1724+
An object representing a long-running operation.
1725+
1726+
The result type for the operation will be
1727+
:class:`google.cloud.datastream_v1.types.Stream` A
1728+
resource representing streaming data from a source to a
1729+
destination.
1730+
1731+
"""
1732+
# Create or coerce a protobuf request object.
1733+
# - Use the request object if provided (there's no risk of modifying the input as
1734+
# there are no flattened fields), or create one.
1735+
if not isinstance(request, datastream.RunStreamRequest):
1736+
request = datastream.RunStreamRequest(request)
1737+
1738+
# Wrap the RPC method; this adds retry and timeout information,
1739+
# and friendly error handling.
1740+
rpc = self._client._transport._wrapped_methods[
1741+
self._client._transport.run_stream
1742+
]
1743+
1744+
# Certain fields should be provided within the metadata header;
1745+
# add these here.
1746+
metadata = tuple(metadata) + (
1747+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1748+
)
1749+
1750+
# Validate the universe domain.
1751+
self._client._validate_universe_domain()
1752+
1753+
# Send the request.
1754+
response = await rpc(
1755+
request,
1756+
retry=retry,
1757+
timeout=timeout,
1758+
metadata=metadata,
1759+
)
1760+
1761+
# Wrap the response in an operation future.
1762+
response = operation_async.from_gapic(
1763+
response,
1764+
self._client._transport.operations_client,
1765+
datastream_resources.Stream,
1766+
metadata_type=datastream.OperationMetadata,
1767+
)
1768+
1769+
# Done; return the response.
1770+
return response
1771+
16751772
async def get_stream_object(
16761773
self,
16771774
request: Optional[Union[datastream.GetStreamObjectRequest, dict]] = None,

0 commit comments

Comments
 (0)