google-cloud-memorystore 0.5.1__tar.gz → 0.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {google_cloud_memorystore-0.5.1/google_cloud_memorystore.egg-info → google_cloud_memorystore-0.5.2}/PKG-INFO +4 -5
  2. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore/__init__.py +8 -0
  3. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore/gapic_version.py +1 -1
  4. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/__init__.py +12 -4
  5. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/gapic_metadata.json +30 -0
  6. {google_cloud_memorystore-0.5.1/google/cloud/memorystore_v1beta → google_cloud_memorystore-0.5.2/google/cloud/memorystore_v1}/gapic_version.py +1 -1
  7. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/async_client.py +275 -13
  8. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/client.py +288 -13
  9. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/transports/base.py +33 -1
  10. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/transports/grpc.py +66 -0
  11. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/transports/grpc_asyncio.py +80 -0
  12. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/transports/rest.py +444 -13
  13. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/transports/rest_base.py +114 -0
  14. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/types/__init__.py +8 -0
  15. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/types/memorystore.py +210 -26
  16. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/__init__.py +4 -4
  17. {google_cloud_memorystore-0.5.1/google/cloud/memorystore_v1 → google_cloud_memorystore-0.5.2/google/cloud/memorystore_v1beta}/gapic_version.py +1 -1
  18. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2/google_cloud_memorystore.egg-info}/PKG-INFO +4 -5
  19. google_cloud_memorystore-0.5.2/google_cloud_memorystore.egg-info/requires.txt +8 -0
  20. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/setup.py +7 -5
  21. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/tests/unit/gapic/memorystore_v1/test_memorystore.py +2458 -1108
  22. google_cloud_memorystore-0.5.1/google_cloud_memorystore.egg-info/requires.txt +0 -11
  23. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/LICENSE +0 -0
  24. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/MANIFEST.in +0 -0
  25. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/README.rst +0 -0
  26. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore/py.typed +0 -0
  27. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/py.typed +0 -0
  28. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/__init__.py +0 -0
  29. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/__init__.py +0 -0
  30. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/pagers.py +0 -0
  31. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1/services/memorystore/transports/__init__.py +0 -0
  32. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/gapic_metadata.json +0 -0
  33. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/py.typed +0 -0
  34. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/__init__.py +0 -0
  35. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/__init__.py +0 -0
  36. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/async_client.py +0 -0
  37. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/client.py +0 -0
  38. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/pagers.py +0 -0
  39. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/transports/__init__.py +0 -0
  40. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/transports/base.py +0 -0
  41. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/transports/grpc.py +0 -0
  42. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/transports/grpc_asyncio.py +0 -0
  43. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/transports/rest.py +0 -0
  44. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/services/memorystore/transports/rest_base.py +0 -0
  45. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/types/__init__.py +0 -0
  46. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google/cloud/memorystore_v1beta/types/memorystore.py +0 -0
  47. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google_cloud_memorystore.egg-info/SOURCES.txt +0 -0
  48. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google_cloud_memorystore.egg-info/dependency_links.txt +0 -0
  49. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google_cloud_memorystore.egg-info/not-zip-safe +0 -0
  50. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/google_cloud_memorystore.egg-info/top_level.txt +0 -0
  51. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/setup.cfg +0 -0
  52. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/tests/__init__.py +0 -0
  53. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/tests/unit/__init__.py +0 -0
  54. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/tests/unit/gapic/__init__.py +0 -0
  55. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/tests/unit/gapic/memorystore_v1/__init__.py +0 -0
  56. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/tests/unit/gapic/memorystore_v1beta/__init__.py +0 -0
  57. {google_cloud_memorystore-0.5.1 → google_cloud_memorystore-0.5.2}/tests/unit/gapic/memorystore_v1beta/test_memorystore.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-memorystore
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Google Cloud Memorystore API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-memorystore
6
6
  Author: Google LLC
@@ -21,13 +21,12 @@ Classifier: Operating System :: OS Independent
21
21
  Classifier: Topic :: Internet
22
22
  Requires-Python: >=3.10
23
23
  License-File: LICENSE
24
- Requires-Dist: google-api-core[grpc]<3.0.0,>=2.17.1
24
+ Requires-Dist: google-api-core[grpc]<3.0.0,>=2.24.2
25
25
  Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
26
26
  Requires-Dist: grpcio<2.0.0,>=1.59.0
27
27
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
28
- Requires-Dist: proto-plus<2.0.0,>=1.22.3
29
- Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
30
- Requires-Dist: protobuf<8.0.0,>=4.25.8
28
+ Requires-Dist: proto-plus<2.0.0,>=1.26.1
29
+ Requires-Dist: protobuf<8.0.0,>=6.33.5
31
30
  Dynamic: author
32
31
  Dynamic: author-email
33
32
  Dynamic: classifier
@@ -37,6 +37,7 @@ from google.cloud.memorystore_v1.types.memorystore import (
37
37
  DiscoveryEndpoint,
38
38
  EncryptionInfo,
39
39
  ExportBackupRequest,
40
+ FinishMigrationRequest,
40
41
  GetBackupCollectionRequest,
41
42
  GetBackupRequest,
42
43
  GetCertificateAuthorityRequest,
@@ -51,6 +52,7 @@ from google.cloud.memorystore_v1.types.memorystore import (
51
52
  ListInstancesResponse,
52
53
  MaintenancePolicy,
53
54
  MaintenanceSchedule,
55
+ MigrationConfig,
54
56
  NodeConfig,
55
57
  OperationMetadata,
56
58
  PersistenceConfig,
@@ -59,7 +61,9 @@ from google.cloud.memorystore_v1.types.memorystore import (
59
61
  PscConnection,
60
62
  PscConnectionStatus,
61
63
  RescheduleMaintenanceRequest,
64
+ SelfManagedSource,
62
65
  SharedRegionalCertificateAuthority,
66
+ StartMigrationRequest,
63
67
  UpdateInstanceRequest,
64
68
  WeeklyMaintenanceWindow,
65
69
  ZoneDistributionConfig,
@@ -81,6 +85,7 @@ __all__ = (
81
85
  "DiscoveryEndpoint",
82
86
  "EncryptionInfo",
83
87
  "ExportBackupRequest",
88
+ "FinishMigrationRequest",
84
89
  "GetBackupCollectionRequest",
85
90
  "GetBackupRequest",
86
91
  "GetCertificateAuthorityRequest",
@@ -95,6 +100,7 @@ __all__ = (
95
100
  "ListInstancesResponse",
96
101
  "MaintenancePolicy",
97
102
  "MaintenanceSchedule",
103
+ "MigrationConfig",
98
104
  "NodeConfig",
99
105
  "OperationMetadata",
100
106
  "PersistenceConfig",
@@ -102,7 +108,9 @@ __all__ = (
102
108
  "PscAutoConnection",
103
109
  "PscConnection",
104
110
  "RescheduleMaintenanceRequest",
111
+ "SelfManagedSource",
105
112
  "SharedRegionalCertificateAuthority",
113
+ "StartMigrationRequest",
106
114
  "UpdateInstanceRequest",
107
115
  "WeeklyMaintenanceWindow",
108
116
  "ZoneDistributionConfig",
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.5.1" # {x-release-please-version}
16
+ __version__ = "0.5.2" # {x-release-please-version}
@@ -39,6 +39,7 @@ from .types.memorystore import (
39
39
  DiscoveryEndpoint,
40
40
  EncryptionInfo,
41
41
  ExportBackupRequest,
42
+ FinishMigrationRequest,
42
43
  GetBackupCollectionRequest,
43
44
  GetBackupRequest,
44
45
  GetCertificateAuthorityRequest,
@@ -53,6 +54,7 @@ from .types.memorystore import (
53
54
  ListInstancesResponse,
54
55
  MaintenancePolicy,
55
56
  MaintenanceSchedule,
57
+ MigrationConfig,
56
58
  NodeConfig,
57
59
  OperationMetadata,
58
60
  PersistenceConfig,
@@ -61,7 +63,9 @@ from .types.memorystore import (
61
63
  PscConnection,
62
64
  PscConnectionStatus,
63
65
  RescheduleMaintenanceRequest,
66
+ SelfManagedSource,
64
67
  SharedRegionalCertificateAuthority,
68
+ StartMigrationRequest,
65
69
  UpdateInstanceRequest,
66
70
  WeeklyMaintenanceWindow,
67
71
  ZoneDistributionConfig,
@@ -92,7 +96,7 @@ else: # pragma: NO COVER
92
96
 
93
97
  def parse_version_to_tuple(version_string: str):
94
98
  """Safely converts a semantic version string to a comparable tuple of integers.
95
- Example: "4.25.8" -> (4, 25, 8)
99
+ Example: "6.33.5" -> (6, 33, 5)
96
100
  Ignores non-numeric parts and handles common version formats.
97
101
  Args:
98
102
  version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
@@ -121,9 +125,9 @@ else: # pragma: NO COVER
121
125
  return (None, "--")
122
126
 
123
127
  _dependency_package = "google.protobuf"
124
- _next_supported_version = "4.25.8"
125
- _next_supported_version_tuple = (4, 25, 8)
126
- _recommendation = " (we recommend 6.x)"
128
+ _next_supported_version = "6.33.5"
129
+ _next_supported_version_tuple = (6, 33, 5)
130
+ _recommendation = " (we recommend 7.x)"
127
131
  (_version_used, _version_used_string) = _get_version(_dependency_package)
128
132
  if _version_used and _version_used < _next_supported_version_tuple:
129
133
  warnings.warn(
@@ -166,6 +170,7 @@ __all__ = (
166
170
  "DiscoveryEndpoint",
167
171
  "EncryptionInfo",
168
172
  "ExportBackupRequest",
173
+ "FinishMigrationRequest",
169
174
  "GetBackupCollectionRequest",
170
175
  "GetBackupRequest",
171
176
  "GetCertificateAuthorityRequest",
@@ -181,6 +186,7 @@ __all__ = (
181
186
  "MaintenancePolicy",
182
187
  "MaintenanceSchedule",
183
188
  "MemorystoreClient",
189
+ "MigrationConfig",
184
190
  "NodeConfig",
185
191
  "OperationMetadata",
186
192
  "PersistenceConfig",
@@ -189,7 +195,9 @@ __all__ = (
189
195
  "PscConnection",
190
196
  "PscConnectionStatus",
191
197
  "RescheduleMaintenanceRequest",
198
+ "SelfManagedSource",
192
199
  "SharedRegionalCertificateAuthority",
200
+ "StartMigrationRequest",
193
201
  "UpdateInstanceRequest",
194
202
  "WeeklyMaintenanceWindow",
195
203
  "ZoneDistributionConfig",
@@ -35,6 +35,11 @@
35
35
  "export_backup"
36
36
  ]
37
37
  },
38
+ "FinishMigration": {
39
+ "methods": [
40
+ "finish_migration"
41
+ ]
42
+ },
38
43
  "GetBackup": {
39
44
  "methods": [
40
45
  "get_backup"
@@ -80,6 +85,11 @@
80
85
  "reschedule_maintenance"
81
86
  ]
82
87
  },
88
+ "StartMigration": {
89
+ "methods": [
90
+ "start_migration"
91
+ ]
92
+ },
83
93
  "UpdateInstance": {
84
94
  "methods": [
85
95
  "update_instance"
@@ -115,6 +125,11 @@
115
125
  "export_backup"
116
126
  ]
117
127
  },
128
+ "FinishMigration": {
129
+ "methods": [
130
+ "finish_migration"
131
+ ]
132
+ },
118
133
  "GetBackup": {
119
134
  "methods": [
120
135
  "get_backup"
@@ -160,6 +175,11 @@
160
175
  "reschedule_maintenance"
161
176
  ]
162
177
  },
178
+ "StartMigration": {
179
+ "methods": [
180
+ "start_migration"
181
+ ]
182
+ },
163
183
  "UpdateInstance": {
164
184
  "methods": [
165
185
  "update_instance"
@@ -195,6 +215,11 @@
195
215
  "export_backup"
196
216
  ]
197
217
  },
218
+ "FinishMigration": {
219
+ "methods": [
220
+ "finish_migration"
221
+ ]
222
+ },
198
223
  "GetBackup": {
199
224
  "methods": [
200
225
  "get_backup"
@@ -240,6 +265,11 @@
240
265
  "reschedule_maintenance"
241
266
  ]
242
267
  },
268
+ "StartMigration": {
269
+ "methods": [
270
+ "start_migration"
271
+ ]
272
+ },
243
273
  "UpdateInstance": {
244
274
  "methods": [
245
275
  "update_instance"
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.5.1" # {x-release-please-version}
16
+ __version__ = "0.5.2" # {x-release-please-version}
@@ -109,6 +109,10 @@ class MemorystoreAsyncClient:
109
109
  parse_instance_path = staticmethod(MemorystoreClient.parse_instance_path)
110
110
  network_path = staticmethod(MemorystoreClient.network_path)
111
111
  parse_network_path = staticmethod(MemorystoreClient.parse_network_path)
112
+ network_attachment_path = staticmethod(MemorystoreClient.network_attachment_path)
113
+ parse_network_attachment_path = staticmethod(
114
+ MemorystoreClient.parse_network_attachment_path
115
+ )
112
116
  service_attachment_path = staticmethod(MemorystoreClient.service_attachment_path)
113
117
  parse_service_attachment_path = staticmethod(
114
118
  MemorystoreClient.parse_service_attachment_path
@@ -392,7 +396,7 @@ class MemorystoreAsyncClient:
392
396
 
393
397
  Returns:
394
398
  google.cloud.memorystore_v1.services.memorystore.pagers.ListInstancesAsyncPager:
395
- Response message for [ListInstances][].
399
+ Response message for ListInstances.
396
400
 
397
401
  Iterating over this object will yield results and
398
402
  resolve additional pages automatically.
@@ -1033,7 +1037,7 @@ class MemorystoreAsyncClient:
1033
1037
 
1034
1038
  Args:
1035
1039
  request (Optional[Union[google.cloud.memorystore_v1.types.GetCertificateAuthorityRequest, dict]]):
1036
- The request object. Request message for [GetCertificateAuthority][].
1040
+ The request object. Request message for ``GetCertificateAuthority``.
1037
1041
  name (:class:`str`):
1038
1042
  Required. The name of the certificate
1039
1043
  authority. Format:
@@ -1148,8 +1152,7 @@ class MemorystoreAsyncClient:
1148
1152
 
1149
1153
  Args:
1150
1154
  request (Optional[Union[google.cloud.memorystore_v1.types.GetSharedRegionalCertificateAuthorityRequest, dict]]):
1151
- The request object. Request for
1152
- [GetSharedRegionalCertificateAuthority][google.cloud.memorystore.v1.Memorystore.GetSharedRegionalCertificateAuthority].
1155
+ The request object. Request for ``GetSharedRegionalCertificateAuthority``.
1153
1156
  name (:class:`str`):
1154
1157
  Required. Regional certificate authority resource name
1155
1158
  using the form:
@@ -1420,7 +1423,7 @@ class MemorystoreAsyncClient:
1420
1423
 
1421
1424
  Args:
1422
1425
  request (Optional[Union[google.cloud.memorystore_v1.types.ListBackupCollectionsRequest, dict]]):
1423
- The request object. Request for [ListBackupCollections]
1426
+ The request object. Request for ``ListBackupCollections``.
1424
1427
  parent (:class:`str`):
1425
1428
  Required. The resource name of the backupCollection
1426
1429
  location using the form:
@@ -1440,7 +1443,7 @@ class MemorystoreAsyncClient:
1440
1443
 
1441
1444
  Returns:
1442
1445
  google.cloud.memorystore_v1.services.memorystore.pagers.ListBackupCollectionsAsyncPager:
1443
- Response for [ListBackupCollections].
1446
+ Response for ListBackupCollections.
1444
1447
 
1445
1448
  Iterating over this object will yield results and
1446
1449
  resolve additional pages automatically.
@@ -1545,7 +1548,7 @@ class MemorystoreAsyncClient:
1545
1548
 
1546
1549
  Args:
1547
1550
  request (Optional[Union[google.cloud.memorystore_v1.types.GetBackupCollectionRequest, dict]]):
1548
- The request object. Request for [GetBackupCollection].
1551
+ The request object. Request for ``GetBackupCollection``.
1549
1552
  name (:class:`str`):
1550
1553
  Required. Instance backupCollection resource name using
1551
1554
  the form:
@@ -1656,7 +1659,7 @@ class MemorystoreAsyncClient:
1656
1659
 
1657
1660
  Args:
1658
1661
  request (Optional[Union[google.cloud.memorystore_v1.types.ListBackupsRequest, dict]]):
1659
- The request object. Request for [ListBackups].
1662
+ The request object. Request for ``ListBackups``.
1660
1663
  parent (:class:`str`):
1661
1664
  Required. The resource name of the backupCollection
1662
1665
  using the form:
@@ -1675,7 +1678,7 @@ class MemorystoreAsyncClient:
1675
1678
 
1676
1679
  Returns:
1677
1680
  google.cloud.memorystore_v1.services.memorystore.pagers.ListBackupsAsyncPager:
1678
- Response for [ListBackups].
1681
+ Response for ListBackups.
1679
1682
 
1680
1683
  Iterating over this object will yield results and
1681
1684
  resolve additional pages automatically.
@@ -1780,7 +1783,7 @@ class MemorystoreAsyncClient:
1780
1783
 
1781
1784
  Args:
1782
1785
  request (Optional[Union[google.cloud.memorystore_v1.types.GetBackupRequest, dict]]):
1783
- The request object. Request for [GetBackup].
1786
+ The request object. Request for ``GetBackup``.
1784
1787
  name (:class:`str`):
1785
1788
  Required. Instance backup resource name using the form:
1786
1789
  ``projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}``
@@ -1892,7 +1895,7 @@ class MemorystoreAsyncClient:
1892
1895
 
1893
1896
  Args:
1894
1897
  request (Optional[Union[google.cloud.memorystore_v1.types.DeleteBackupRequest, dict]]):
1895
- The request object. Request for [DeleteBackup].
1898
+ The request object. Request for ``DeleteBackup``.
1896
1899
  name (:class:`str`):
1897
1900
  Required. Instance backup resource name using the form:
1898
1901
  ``projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}``
@@ -2025,7 +2028,7 @@ class MemorystoreAsyncClient:
2025
2028
 
2026
2029
  Args:
2027
2030
  request (Optional[Union[google.cloud.memorystore_v1.types.ExportBackupRequest, dict]]):
2028
- The request object. Request for [ExportBackup].
2031
+ The request object. Request for ``ExportBackup``.
2029
2032
  retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
2030
2033
  should be retried.
2031
2034
  timeout (float): The timeout for this request.
@@ -2141,7 +2144,7 @@ class MemorystoreAsyncClient:
2141
2144
 
2142
2145
  Args:
2143
2146
  request (Optional[Union[google.cloud.memorystore_v1.types.BackupInstanceRequest, dict]]):
2144
- The request object. Request for [BackupInstance].
2147
+ The request object. Request for ``BackupInstance``.
2145
2148
  name (:class:`str`):
2146
2149
  Required. Instance resource name using the form:
2147
2150
  ``projects/{project_id}/locations/{location_id}/instances/{instance_id}``
@@ -2224,6 +2227,265 @@ class MemorystoreAsyncClient:
2224
2227
  # Done; return the response.
2225
2228
  return response
2226
2229
 
2230
+ async def start_migration(
2231
+ self,
2232
+ request: Optional[Union[memorystore.StartMigrationRequest, dict]] = None,
2233
+ *,
2234
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
2235
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2236
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
2237
+ ) -> operation_async.AsyncOperation:
2238
+ r"""Initiates the migration of a source instance to the
2239
+ target Memorystore instance.
2240
+
2241
+ After the successful completion of this operation, the
2242
+ target instance will:
2243
+
2244
+ 1. Set up replication with the source instance and
2245
+ replicate any writes to the source instance.
2246
+ 2. Only allow reads.
2247
+
2248
+ .. code-block:: python
2249
+
2250
+ # This snippet has been automatically generated and should be regarded as a
2251
+ # code template only.
2252
+ # It will require modifications to work:
2253
+ # - It may require correct/in-range values for request initialization.
2254
+ # - It may require specifying regional endpoints when creating the service
2255
+ # client as shown in:
2256
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
2257
+ from google.cloud import memorystore_v1
2258
+
2259
+ async def sample_start_migration():
2260
+ # Create a client
2261
+ client = memorystore_v1.MemorystoreAsyncClient()
2262
+
2263
+ # Initialize request argument(s)
2264
+ self_managed_source = memorystore_v1.SelfManagedSource()
2265
+ self_managed_source.ip_address = "ip_address_value"
2266
+ self_managed_source.port = 453
2267
+ self_managed_source.network_attachment = "network_attachment_value"
2268
+
2269
+ request = memorystore_v1.StartMigrationRequest(
2270
+ self_managed_source=self_managed_source,
2271
+ name="name_value",
2272
+ )
2273
+
2274
+ # Make the request
2275
+ operation = await client.start_migration(request=request)
2276
+
2277
+ print("Waiting for operation to complete...")
2278
+
2279
+ response = await operation.result()
2280
+
2281
+ # Handle the response
2282
+ print(response)
2283
+
2284
+ Args:
2285
+ request (Optional[Union[google.cloud.memorystore_v1.types.StartMigrationRequest, dict]]):
2286
+ The request object. Request for ``StartMigration``.
2287
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
2288
+ should be retried.
2289
+ timeout (float): The timeout for this request.
2290
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
2291
+ sent along with the request as metadata. Normally, each value must be of type `str`,
2292
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
2293
+ be of type `bytes`.
2294
+
2295
+ Returns:
2296
+ google.api_core.operation_async.AsyncOperation:
2297
+ An object representing a long-running operation.
2298
+
2299
+ The result type for the operation will be
2300
+ :class:`google.cloud.memorystore_v1.types.Instance` A
2301
+ Memorystore instance.
2302
+
2303
+ """
2304
+ # Create or coerce a protobuf request object.
2305
+ # - Use the request object if provided (there's no risk of modifying the input as
2306
+ # there are no flattened fields), or create one.
2307
+ if not isinstance(request, memorystore.StartMigrationRequest):
2308
+ request = memorystore.StartMigrationRequest(request)
2309
+
2310
+ # Wrap the RPC method; this adds retry and timeout information,
2311
+ # and friendly error handling.
2312
+ rpc = self._client._transport._wrapped_methods[
2313
+ self._client._transport.start_migration
2314
+ ]
2315
+
2316
+ # Certain fields should be provided within the metadata header;
2317
+ # add these here.
2318
+ metadata = tuple(metadata) + (
2319
+ gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
2320
+ )
2321
+
2322
+ # Validate the universe domain.
2323
+ self._client._validate_universe_domain()
2324
+
2325
+ # Send the request.
2326
+ response = await rpc(
2327
+ request,
2328
+ retry=retry,
2329
+ timeout=timeout,
2330
+ metadata=metadata,
2331
+ )
2332
+
2333
+ # Wrap the response in an operation future.
2334
+ response = operation_async.from_gapic(
2335
+ response,
2336
+ self._client._transport.operations_client,
2337
+ memorystore.Instance,
2338
+ metadata_type=memorystore.OperationMetadata,
2339
+ )
2340
+
2341
+ # Done; return the response.
2342
+ return response
2343
+
2344
+ async def finish_migration(
2345
+ self,
2346
+ request: Optional[Union[memorystore.FinishMigrationRequest, dict]] = None,
2347
+ *,
2348
+ name: Optional[str] = None,
2349
+ force: Optional[bool] = None,
2350
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
2351
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
2352
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
2353
+ ) -> operation_async.AsyncOperation:
2354
+ r"""Finalizes the migration process.
2355
+
2356
+ After the successful completion of this operation, the
2357
+ target instance will:
2358
+
2359
+ 1. Stop replicating from the source instance.
2360
+ 2. Allow both reads and writes.
2361
+
2362
+ .. code-block:: python
2363
+
2364
+ # This snippet has been automatically generated and should be regarded as a
2365
+ # code template only.
2366
+ # It will require modifications to work:
2367
+ # - It may require correct/in-range values for request initialization.
2368
+ # - It may require specifying regional endpoints when creating the service
2369
+ # client as shown in:
2370
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
2371
+ from google.cloud import memorystore_v1
2372
+
2373
+ async def sample_finish_migration():
2374
+ # Create a client
2375
+ client = memorystore_v1.MemorystoreAsyncClient()
2376
+
2377
+ # Initialize request argument(s)
2378
+ request = memorystore_v1.FinishMigrationRequest(
2379
+ name="name_value",
2380
+ )
2381
+
2382
+ # Make the request
2383
+ operation = await client.finish_migration(request=request)
2384
+
2385
+ print("Waiting for operation to complete...")
2386
+
2387
+ response = await operation.result()
2388
+
2389
+ # Handle the response
2390
+ print(response)
2391
+
2392
+ Args:
2393
+ request (Optional[Union[google.cloud.memorystore_v1.types.FinishMigrationRequest, dict]]):
2394
+ The request object. Request for ``FinishMigration``.
2395
+ name (:class:`str`):
2396
+ Required. The resource name of the
2397
+ instance to finalize migration on.
2398
+ Format:
2399
+ projects/{project}/locations/{location}/instances/{instance}
2400
+
2401
+ This corresponds to the ``name`` field
2402
+ on the ``request`` instance; if ``request`` is provided, this
2403
+ should not be set.
2404
+ force (:class:`bool`):
2405
+ Optional. By default, the ``FinishMigration`` operation
2406
+ ensures the target replication offset to catch up to the
2407
+ source offset as of the time of the call. Set this field
2408
+ to ``true`` to bypass this offset verification check.
2409
+
2410
+ This corresponds to the ``force`` field
2411
+ on the ``request`` instance; if ``request`` is provided, this
2412
+ should not be set.
2413
+ retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
2414
+ should be retried.
2415
+ timeout (float): The timeout for this request.
2416
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
2417
+ sent along with the request as metadata. Normally, each value must be of type `str`,
2418
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
2419
+ be of type `bytes`.
2420
+
2421
+ Returns:
2422
+ google.api_core.operation_async.AsyncOperation:
2423
+ An object representing a long-running operation.
2424
+
2425
+ The result type for the operation will be
2426
+ :class:`google.cloud.memorystore_v1.types.Instance` A
2427
+ Memorystore instance.
2428
+
2429
+ """
2430
+ # Create or coerce a protobuf request object.
2431
+ # - Quick check: If we got a request object, we should *not* have
2432
+ # gotten any keyword arguments that map to the request.
2433
+ flattened_params = [name, force]
2434
+ has_flattened_params = (
2435
+ len([param for param in flattened_params if param is not None]) > 0
2436
+ )
2437
+ if request is not None and has_flattened_params:
2438
+ raise ValueError(
2439
+ "If the `request` argument is set, then none of "
2440
+ "the individual field arguments should be set."
2441
+ )
2442
+
2443
+ # - Use the request object if provided (there's no risk of modifying the input as
2444
+ # there are no flattened fields), or create one.
2445
+ if not isinstance(request, memorystore.FinishMigrationRequest):
2446
+ request = memorystore.FinishMigrationRequest(request)
2447
+
2448
+ # If we have keyword arguments corresponding to fields on the
2449
+ # request, apply these.
2450
+ if name is not None:
2451
+ request.name = name
2452
+ if force is not None:
2453
+ request.force = force
2454
+
2455
+ # Wrap the RPC method; this adds retry and timeout information,
2456
+ # and friendly error handling.
2457
+ rpc = self._client._transport._wrapped_methods[
2458
+ self._client._transport.finish_migration
2459
+ ]
2460
+
2461
+ # Certain fields should be provided within the metadata header;
2462
+ # add these here.
2463
+ metadata = tuple(metadata) + (
2464
+ gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
2465
+ )
2466
+
2467
+ # Validate the universe domain.
2468
+ self._client._validate_universe_domain()
2469
+
2470
+ # Send the request.
2471
+ response = await rpc(
2472
+ request,
2473
+ retry=retry,
2474
+ timeout=timeout,
2475
+ metadata=metadata,
2476
+ )
2477
+
2478
+ # Wrap the response in an operation future.
2479
+ response = operation_async.from_gapic(
2480
+ response,
2481
+ self._client._transport.operations_client,
2482
+ memorystore.Instance,
2483
+ metadata_type=memorystore.OperationMetadata,
2484
+ )
2485
+
2486
+ # Done; return the response.
2487
+ return response
2488
+
2227
2489
  async def list_operations(
2228
2490
  self,
2229
2491
  request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,