pulumi-gcp 8.3.0a1727223968__py3-none-any.whl → 8.3.0a1727226164__py3-none-any.whl

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 (76) hide show
  1. pulumi_gcp/__init__.py +120 -0
  2. pulumi_gcp/alloydb/_inputs.py +20 -0
  3. pulumi_gcp/alloydb/instance.py +36 -0
  4. pulumi_gcp/alloydb/outputs.py +14 -0
  5. pulumi_gcp/compute/__init__.py +1 -0
  6. pulumi_gcp/compute/_inputs.py +1400 -0
  7. pulumi_gcp/compute/attached_disk.py +103 -0
  8. pulumi_gcp/compute/backend_service.py +29 -22
  9. pulumi_gcp/compute/firewall_policy_with_rules.py +769 -0
  10. pulumi_gcp/compute/outputs.py +1019 -0
  11. pulumi_gcp/compute/region_backend_service.py +29 -22
  12. pulumi_gcp/compute/router_nat.py +27 -66
  13. pulumi_gcp/config/__init__.pyi +2 -0
  14. pulumi_gcp/config/vars.py +4 -0
  15. pulumi_gcp/container/_inputs.py +72 -99
  16. pulumi_gcp/container/outputs.py +53 -70
  17. pulumi_gcp/databasemigrationservice/__init__.py +1 -0
  18. pulumi_gcp/databasemigrationservice/_inputs.py +362 -0
  19. pulumi_gcp/databasemigrationservice/migration_job.py +1739 -0
  20. pulumi_gcp/databasemigrationservice/outputs.py +268 -0
  21. pulumi_gcp/dataproc/get_metastore_service.py +11 -1
  22. pulumi_gcp/dataproc/metastore_service.py +93 -0
  23. pulumi_gcp/developerconnect/_inputs.py +42 -39
  24. pulumi_gcp/developerconnect/connection.py +86 -83
  25. pulumi_gcp/developerconnect/outputs.py +28 -26
  26. pulumi_gcp/discoveryengine/__init__.py +1 -0
  27. pulumi_gcp/discoveryengine/_inputs.py +131 -0
  28. pulumi_gcp/discoveryengine/outputs.py +131 -0
  29. pulumi_gcp/discoveryengine/target_site.py +870 -0
  30. pulumi_gcp/dns/managed_zone.py +1 -1
  31. pulumi_gcp/filestore/get_instance.py +21 -1
  32. pulumi_gcp/filestore/instance.py +94 -0
  33. pulumi_gcp/gkehub/feature_membership.py +140 -62
  34. pulumi_gcp/healthcare/__init__.py +1 -0
  35. pulumi_gcp/healthcare/_inputs.py +39 -0
  36. pulumi_gcp/healthcare/outputs.py +40 -0
  37. pulumi_gcp/healthcare/workspace.py +465 -0
  38. pulumi_gcp/looker/instance.py +81 -0
  39. pulumi_gcp/netapp/_inputs.py +63 -0
  40. pulumi_gcp/netapp/outputs.py +57 -0
  41. pulumi_gcp/netapp/storage_pool.py +54 -0
  42. pulumi_gcp/netapp/volume.py +82 -0
  43. pulumi_gcp/provider.py +20 -0
  44. pulumi_gcp/pubsub/subscription.py +43 -7
  45. pulumi_gcp/pulumi-plugin.json +1 -1
  46. pulumi_gcp/secretmanager/__init__.py +8 -0
  47. pulumi_gcp/secretmanager/_inputs.py +308 -0
  48. pulumi_gcp/secretmanager/get_regional_secret.py +279 -0
  49. pulumi_gcp/secretmanager/get_regional_secret_iam_policy.py +173 -0
  50. pulumi_gcp/secretmanager/get_regional_secret_version.py +241 -0
  51. pulumi_gcp/secretmanager/outputs.py +336 -0
  52. pulumi_gcp/secretmanager/regional_secret.py +1433 -0
  53. pulumi_gcp/secretmanager/regional_secret_iam_binding.py +1082 -0
  54. pulumi_gcp/secretmanager/regional_secret_iam_member.py +1082 -0
  55. pulumi_gcp/secretmanager/regional_secret_iam_policy.py +901 -0
  56. pulumi_gcp/secretmanager/regional_secret_version.py +753 -0
  57. pulumi_gcp/securitycenter/__init__.py +4 -0
  58. pulumi_gcp/securitycenter/folder_scc_big_query_export.py +795 -0
  59. pulumi_gcp/securitycenter/organization_scc_big_query_export.py +738 -0
  60. pulumi_gcp/securitycenter/project_scc_big_query_export.py +749 -0
  61. pulumi_gcp/securitycenter/v2_organization_scc_big_query_export.py +862 -0
  62. pulumi_gcp/securitycenter/v2_organization_scc_big_query_exports.py +6 -2
  63. pulumi_gcp/siteverification/__init__.py +3 -0
  64. pulumi_gcp/siteverification/_inputs.py +85 -0
  65. pulumi_gcp/siteverification/outputs.py +57 -0
  66. pulumi_gcp/siteverification/web_resource.py +398 -0
  67. pulumi_gcp/spanner/__init__.py +1 -0
  68. pulumi_gcp/spanner/_inputs.py +129 -0
  69. pulumi_gcp/spanner/backup_schedule.py +748 -0
  70. pulumi_gcp/spanner/get_instance.py +11 -1
  71. pulumi_gcp/spanner/instance.py +56 -0
  72. pulumi_gcp/spanner/outputs.py +93 -0
  73. {pulumi_gcp-8.3.0a1727223968.dist-info → pulumi_gcp-8.3.0a1727226164.dist-info}/METADATA +1 -1
  74. {pulumi_gcp-8.3.0a1727223968.dist-info → pulumi_gcp-8.3.0a1727226164.dist-info}/RECORD +76 -56
  75. {pulumi_gcp-8.3.0a1727223968.dist-info → pulumi_gcp-8.3.0a1727226164.dist-info}/WHEEL +0 -0
  76. {pulumi_gcp-8.3.0a1727223968.dist-info → pulumi_gcp-8.3.0a1727226164.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1739 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from .. import _utilities
16
+ from . import outputs
17
+ from ._inputs import *
18
+
19
+ __all__ = ['MigrationJobArgs', 'MigrationJob']
20
+
21
+ @pulumi.input_type
22
+ class MigrationJobArgs:
23
+ def __init__(__self__, *,
24
+ destination: pulumi.Input[str],
25
+ migration_job_id: pulumi.Input[str],
26
+ source: pulumi.Input[str],
27
+ type: pulumi.Input[str],
28
+ display_name: Optional[pulumi.Input[str]] = None,
29
+ dump_flags: Optional[pulumi.Input['MigrationJobDumpFlagsArgs']] = None,
30
+ dump_path: Optional[pulumi.Input[str]] = None,
31
+ dump_type: Optional[pulumi.Input[str]] = None,
32
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
33
+ location: Optional[pulumi.Input[str]] = None,
34
+ performance_config: Optional[pulumi.Input['MigrationJobPerformanceConfigArgs']] = None,
35
+ project: Optional[pulumi.Input[str]] = None,
36
+ reverse_ssh_connectivity: Optional[pulumi.Input['MigrationJobReverseSshConnectivityArgs']] = None,
37
+ static_ip_connectivity: Optional[pulumi.Input['MigrationJobStaticIpConnectivityArgs']] = None,
38
+ vpc_peering_connectivity: Optional[pulumi.Input['MigrationJobVpcPeeringConnectivityArgs']] = None):
39
+ """
40
+ The set of arguments for constructing a MigrationJob resource.
41
+ :param pulumi.Input[str] destination: The name of the destination connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{destinationConnectionProfile}.
42
+ :param pulumi.Input[str] migration_job_id: The ID of the migration job.
43
+
44
+
45
+ - - -
46
+ :param pulumi.Input[str] source: The name of the source connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{sourceConnectionProfile}.
47
+ :param pulumi.Input[str] type: The type of the migration job.
48
+ Possible values are: `ONE_TIME`, `CONTINUOUS`.
49
+ :param pulumi.Input[str] display_name: The migration job display name.
50
+ :param pulumi.Input['MigrationJobDumpFlagsArgs'] dump_flags: The initial dump flags.
51
+ Structure is documented below.
52
+ :param pulumi.Input[str] dump_path: The path to the dump file in Google Cloud Storage,
53
+ in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
54
+ This field and the "dump_flags" field are mutually exclusive.
55
+ :param pulumi.Input[str] dump_type: The type of the data dump. Supported for MySQL to CloudSQL for MySQL
56
+ migrations only.
57
+ Possible values are: `LOGICAL`, `PHYSICAL`.
58
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs.
59
+
60
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
61
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
62
+ :param pulumi.Input[str] location: The location where the migration job should reside.
63
+ :param pulumi.Input['MigrationJobPerformanceConfigArgs'] performance_config: Data dump parallelism settings used by the migration.
64
+ Structure is documented below.
65
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
66
+ If it is not provided, the provider project is used.
67
+ :param pulumi.Input['MigrationJobReverseSshConnectivityArgs'] reverse_ssh_connectivity: The details of the VPC network that the source database is located in.
68
+ Structure is documented below.
69
+ :param pulumi.Input['MigrationJobStaticIpConnectivityArgs'] static_ip_connectivity: If set to an empty object (`{}`), the source database will allow incoming
70
+ connections from the public IP of the destination database.
71
+ You can retrieve the public IP of the Cloud SQL instance from the
72
+ Cloud SQL console or using Cloud SQL APIs.
73
+ :param pulumi.Input['MigrationJobVpcPeeringConnectivityArgs'] vpc_peering_connectivity: The details of the VPC network that the source database is located in.
74
+ Structure is documented below.
75
+ """
76
+ pulumi.set(__self__, "destination", destination)
77
+ pulumi.set(__self__, "migration_job_id", migration_job_id)
78
+ pulumi.set(__self__, "source", source)
79
+ pulumi.set(__self__, "type", type)
80
+ if display_name is not None:
81
+ pulumi.set(__self__, "display_name", display_name)
82
+ if dump_flags is not None:
83
+ pulumi.set(__self__, "dump_flags", dump_flags)
84
+ if dump_path is not None:
85
+ pulumi.set(__self__, "dump_path", dump_path)
86
+ if dump_type is not None:
87
+ pulumi.set(__self__, "dump_type", dump_type)
88
+ if labels is not None:
89
+ pulumi.set(__self__, "labels", labels)
90
+ if location is not None:
91
+ pulumi.set(__self__, "location", location)
92
+ if performance_config is not None:
93
+ pulumi.set(__self__, "performance_config", performance_config)
94
+ if project is not None:
95
+ pulumi.set(__self__, "project", project)
96
+ if reverse_ssh_connectivity is not None:
97
+ pulumi.set(__self__, "reverse_ssh_connectivity", reverse_ssh_connectivity)
98
+ if static_ip_connectivity is not None:
99
+ pulumi.set(__self__, "static_ip_connectivity", static_ip_connectivity)
100
+ if vpc_peering_connectivity is not None:
101
+ pulumi.set(__self__, "vpc_peering_connectivity", vpc_peering_connectivity)
102
+
103
+ @property
104
+ @pulumi.getter
105
+ def destination(self) -> pulumi.Input[str]:
106
+ """
107
+ The name of the destination connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{destinationConnectionProfile}.
108
+ """
109
+ return pulumi.get(self, "destination")
110
+
111
+ @destination.setter
112
+ def destination(self, value: pulumi.Input[str]):
113
+ pulumi.set(self, "destination", value)
114
+
115
+ @property
116
+ @pulumi.getter(name="migrationJobId")
117
+ def migration_job_id(self) -> pulumi.Input[str]:
118
+ """
119
+ The ID of the migration job.
120
+
121
+
122
+ - - -
123
+ """
124
+ return pulumi.get(self, "migration_job_id")
125
+
126
+ @migration_job_id.setter
127
+ def migration_job_id(self, value: pulumi.Input[str]):
128
+ pulumi.set(self, "migration_job_id", value)
129
+
130
+ @property
131
+ @pulumi.getter
132
+ def source(self) -> pulumi.Input[str]:
133
+ """
134
+ The name of the source connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{sourceConnectionProfile}.
135
+ """
136
+ return pulumi.get(self, "source")
137
+
138
+ @source.setter
139
+ def source(self, value: pulumi.Input[str]):
140
+ pulumi.set(self, "source", value)
141
+
142
+ @property
143
+ @pulumi.getter
144
+ def type(self) -> pulumi.Input[str]:
145
+ """
146
+ The type of the migration job.
147
+ Possible values are: `ONE_TIME`, `CONTINUOUS`.
148
+ """
149
+ return pulumi.get(self, "type")
150
+
151
+ @type.setter
152
+ def type(self, value: pulumi.Input[str]):
153
+ pulumi.set(self, "type", value)
154
+
155
+ @property
156
+ @pulumi.getter(name="displayName")
157
+ def display_name(self) -> Optional[pulumi.Input[str]]:
158
+ """
159
+ The migration job display name.
160
+ """
161
+ return pulumi.get(self, "display_name")
162
+
163
+ @display_name.setter
164
+ def display_name(self, value: Optional[pulumi.Input[str]]):
165
+ pulumi.set(self, "display_name", value)
166
+
167
+ @property
168
+ @pulumi.getter(name="dumpFlags")
169
+ def dump_flags(self) -> Optional[pulumi.Input['MigrationJobDumpFlagsArgs']]:
170
+ """
171
+ The initial dump flags.
172
+ Structure is documented below.
173
+ """
174
+ return pulumi.get(self, "dump_flags")
175
+
176
+ @dump_flags.setter
177
+ def dump_flags(self, value: Optional[pulumi.Input['MigrationJobDumpFlagsArgs']]):
178
+ pulumi.set(self, "dump_flags", value)
179
+
180
+ @property
181
+ @pulumi.getter(name="dumpPath")
182
+ def dump_path(self) -> Optional[pulumi.Input[str]]:
183
+ """
184
+ The path to the dump file in Google Cloud Storage,
185
+ in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
186
+ This field and the "dump_flags" field are mutually exclusive.
187
+ """
188
+ return pulumi.get(self, "dump_path")
189
+
190
+ @dump_path.setter
191
+ def dump_path(self, value: Optional[pulumi.Input[str]]):
192
+ pulumi.set(self, "dump_path", value)
193
+
194
+ @property
195
+ @pulumi.getter(name="dumpType")
196
+ def dump_type(self) -> Optional[pulumi.Input[str]]:
197
+ """
198
+ The type of the data dump. Supported for MySQL to CloudSQL for MySQL
199
+ migrations only.
200
+ Possible values are: `LOGICAL`, `PHYSICAL`.
201
+ """
202
+ return pulumi.get(self, "dump_type")
203
+
204
+ @dump_type.setter
205
+ def dump_type(self, value: Optional[pulumi.Input[str]]):
206
+ pulumi.set(self, "dump_type", value)
207
+
208
+ @property
209
+ @pulumi.getter
210
+ def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
211
+ """
212
+ The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs.
213
+
214
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
215
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
216
+ """
217
+ return pulumi.get(self, "labels")
218
+
219
+ @labels.setter
220
+ def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
221
+ pulumi.set(self, "labels", value)
222
+
223
+ @property
224
+ @pulumi.getter
225
+ def location(self) -> Optional[pulumi.Input[str]]:
226
+ """
227
+ The location where the migration job should reside.
228
+ """
229
+ return pulumi.get(self, "location")
230
+
231
+ @location.setter
232
+ def location(self, value: Optional[pulumi.Input[str]]):
233
+ pulumi.set(self, "location", value)
234
+
235
+ @property
236
+ @pulumi.getter(name="performanceConfig")
237
+ def performance_config(self) -> Optional[pulumi.Input['MigrationJobPerformanceConfigArgs']]:
238
+ """
239
+ Data dump parallelism settings used by the migration.
240
+ Structure is documented below.
241
+ """
242
+ return pulumi.get(self, "performance_config")
243
+
244
+ @performance_config.setter
245
+ def performance_config(self, value: Optional[pulumi.Input['MigrationJobPerformanceConfigArgs']]):
246
+ pulumi.set(self, "performance_config", value)
247
+
248
+ @property
249
+ @pulumi.getter
250
+ def project(self) -> Optional[pulumi.Input[str]]:
251
+ """
252
+ The ID of the project in which the resource belongs.
253
+ If it is not provided, the provider project is used.
254
+ """
255
+ return pulumi.get(self, "project")
256
+
257
+ @project.setter
258
+ def project(self, value: Optional[pulumi.Input[str]]):
259
+ pulumi.set(self, "project", value)
260
+
261
+ @property
262
+ @pulumi.getter(name="reverseSshConnectivity")
263
+ def reverse_ssh_connectivity(self) -> Optional[pulumi.Input['MigrationJobReverseSshConnectivityArgs']]:
264
+ """
265
+ The details of the VPC network that the source database is located in.
266
+ Structure is documented below.
267
+ """
268
+ return pulumi.get(self, "reverse_ssh_connectivity")
269
+
270
+ @reverse_ssh_connectivity.setter
271
+ def reverse_ssh_connectivity(self, value: Optional[pulumi.Input['MigrationJobReverseSshConnectivityArgs']]):
272
+ pulumi.set(self, "reverse_ssh_connectivity", value)
273
+
274
+ @property
275
+ @pulumi.getter(name="staticIpConnectivity")
276
+ def static_ip_connectivity(self) -> Optional[pulumi.Input['MigrationJobStaticIpConnectivityArgs']]:
277
+ """
278
+ If set to an empty object (`{}`), the source database will allow incoming
279
+ connections from the public IP of the destination database.
280
+ You can retrieve the public IP of the Cloud SQL instance from the
281
+ Cloud SQL console or using Cloud SQL APIs.
282
+ """
283
+ return pulumi.get(self, "static_ip_connectivity")
284
+
285
+ @static_ip_connectivity.setter
286
+ def static_ip_connectivity(self, value: Optional[pulumi.Input['MigrationJobStaticIpConnectivityArgs']]):
287
+ pulumi.set(self, "static_ip_connectivity", value)
288
+
289
+ @property
290
+ @pulumi.getter(name="vpcPeeringConnectivity")
291
+ def vpc_peering_connectivity(self) -> Optional[pulumi.Input['MigrationJobVpcPeeringConnectivityArgs']]:
292
+ """
293
+ The details of the VPC network that the source database is located in.
294
+ Structure is documented below.
295
+ """
296
+ return pulumi.get(self, "vpc_peering_connectivity")
297
+
298
+ @vpc_peering_connectivity.setter
299
+ def vpc_peering_connectivity(self, value: Optional[pulumi.Input['MigrationJobVpcPeeringConnectivityArgs']]):
300
+ pulumi.set(self, "vpc_peering_connectivity", value)
301
+
302
+
303
+ @pulumi.input_type
304
+ class _MigrationJobState:
305
+ def __init__(__self__, *,
306
+ create_time: Optional[pulumi.Input[str]] = None,
307
+ destination: Optional[pulumi.Input[str]] = None,
308
+ display_name: Optional[pulumi.Input[str]] = None,
309
+ dump_flags: Optional[pulumi.Input['MigrationJobDumpFlagsArgs']] = None,
310
+ dump_path: Optional[pulumi.Input[str]] = None,
311
+ dump_type: Optional[pulumi.Input[str]] = None,
312
+ effective_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
313
+ errors: Optional[pulumi.Input[Sequence[pulumi.Input['MigrationJobErrorArgs']]]] = None,
314
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
315
+ location: Optional[pulumi.Input[str]] = None,
316
+ migration_job_id: Optional[pulumi.Input[str]] = None,
317
+ name: Optional[pulumi.Input[str]] = None,
318
+ performance_config: Optional[pulumi.Input['MigrationJobPerformanceConfigArgs']] = None,
319
+ phase: Optional[pulumi.Input[str]] = None,
320
+ project: Optional[pulumi.Input[str]] = None,
321
+ pulumi_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
322
+ reverse_ssh_connectivity: Optional[pulumi.Input['MigrationJobReverseSshConnectivityArgs']] = None,
323
+ source: Optional[pulumi.Input[str]] = None,
324
+ state: Optional[pulumi.Input[str]] = None,
325
+ static_ip_connectivity: Optional[pulumi.Input['MigrationJobStaticIpConnectivityArgs']] = None,
326
+ type: Optional[pulumi.Input[str]] = None,
327
+ vpc_peering_connectivity: Optional[pulumi.Input['MigrationJobVpcPeeringConnectivityArgs']] = None):
328
+ """
329
+ Input properties used for looking up and filtering MigrationJob resources.
330
+ :param pulumi.Input[str] create_time: Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC 'Zulu' format, accurate to nanoseconds. Example: '2014-10-02T15:01:23.045123456Z'.
331
+ :param pulumi.Input[str] destination: The name of the destination connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{destinationConnectionProfile}.
332
+ :param pulumi.Input[str] display_name: The migration job display name.
333
+ :param pulumi.Input['MigrationJobDumpFlagsArgs'] dump_flags: The initial dump flags.
334
+ Structure is documented below.
335
+ :param pulumi.Input[str] dump_path: The path to the dump file in Google Cloud Storage,
336
+ in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
337
+ This field and the "dump_flags" field are mutually exclusive.
338
+ :param pulumi.Input[str] dump_type: The type of the data dump. Supported for MySQL to CloudSQL for MySQL
339
+ migrations only.
340
+ Possible values are: `LOGICAL`, `PHYSICAL`.
341
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] effective_labels: All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
342
+ :param pulumi.Input[Sequence[pulumi.Input['MigrationJobErrorArgs']]] errors: Output only. The error details in case of state FAILED.
343
+ Structure is documented below.
344
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs.
345
+
346
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
347
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
348
+ :param pulumi.Input[str] location: The location where the migration job should reside.
349
+ :param pulumi.Input[str] migration_job_id: The ID of the migration job.
350
+
351
+
352
+ - - -
353
+ :param pulumi.Input[str] name: The name of this migration job resource in the form of projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
354
+ :param pulumi.Input['MigrationJobPerformanceConfigArgs'] performance_config: Data dump parallelism settings used by the migration.
355
+ Structure is documented below.
356
+ :param pulumi.Input[str] phase: The current migration job phase.
357
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
358
+ If it is not provided, the provider project is used.
359
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] pulumi_labels: The combination of labels configured directly on the resource
360
+ and default labels configured on the provider.
361
+ :param pulumi.Input['MigrationJobReverseSshConnectivityArgs'] reverse_ssh_connectivity: The details of the VPC network that the source database is located in.
362
+ Structure is documented below.
363
+ :param pulumi.Input[str] source: The name of the source connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{sourceConnectionProfile}.
364
+ :param pulumi.Input[str] state: The current migration job state.
365
+ :param pulumi.Input['MigrationJobStaticIpConnectivityArgs'] static_ip_connectivity: If set to an empty object (`{}`), the source database will allow incoming
366
+ connections from the public IP of the destination database.
367
+ You can retrieve the public IP of the Cloud SQL instance from the
368
+ Cloud SQL console or using Cloud SQL APIs.
369
+ :param pulumi.Input[str] type: The type of the migration job.
370
+ Possible values are: `ONE_TIME`, `CONTINUOUS`.
371
+ :param pulumi.Input['MigrationJobVpcPeeringConnectivityArgs'] vpc_peering_connectivity: The details of the VPC network that the source database is located in.
372
+ Structure is documented below.
373
+ """
374
+ if create_time is not None:
375
+ pulumi.set(__self__, "create_time", create_time)
376
+ if destination is not None:
377
+ pulumi.set(__self__, "destination", destination)
378
+ if display_name is not None:
379
+ pulumi.set(__self__, "display_name", display_name)
380
+ if dump_flags is not None:
381
+ pulumi.set(__self__, "dump_flags", dump_flags)
382
+ if dump_path is not None:
383
+ pulumi.set(__self__, "dump_path", dump_path)
384
+ if dump_type is not None:
385
+ pulumi.set(__self__, "dump_type", dump_type)
386
+ if effective_labels is not None:
387
+ pulumi.set(__self__, "effective_labels", effective_labels)
388
+ if errors is not None:
389
+ pulumi.set(__self__, "errors", errors)
390
+ if labels is not None:
391
+ pulumi.set(__self__, "labels", labels)
392
+ if location is not None:
393
+ pulumi.set(__self__, "location", location)
394
+ if migration_job_id is not None:
395
+ pulumi.set(__self__, "migration_job_id", migration_job_id)
396
+ if name is not None:
397
+ pulumi.set(__self__, "name", name)
398
+ if performance_config is not None:
399
+ pulumi.set(__self__, "performance_config", performance_config)
400
+ if phase is not None:
401
+ pulumi.set(__self__, "phase", phase)
402
+ if project is not None:
403
+ pulumi.set(__self__, "project", project)
404
+ if pulumi_labels is not None:
405
+ pulumi.set(__self__, "pulumi_labels", pulumi_labels)
406
+ if reverse_ssh_connectivity is not None:
407
+ pulumi.set(__self__, "reverse_ssh_connectivity", reverse_ssh_connectivity)
408
+ if source is not None:
409
+ pulumi.set(__self__, "source", source)
410
+ if state is not None:
411
+ pulumi.set(__self__, "state", state)
412
+ if static_ip_connectivity is not None:
413
+ pulumi.set(__self__, "static_ip_connectivity", static_ip_connectivity)
414
+ if type is not None:
415
+ pulumi.set(__self__, "type", type)
416
+ if vpc_peering_connectivity is not None:
417
+ pulumi.set(__self__, "vpc_peering_connectivity", vpc_peering_connectivity)
418
+
419
+ @property
420
+ @pulumi.getter(name="createTime")
421
+ def create_time(self) -> Optional[pulumi.Input[str]]:
422
+ """
423
+ Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC 'Zulu' format, accurate to nanoseconds. Example: '2014-10-02T15:01:23.045123456Z'.
424
+ """
425
+ return pulumi.get(self, "create_time")
426
+
427
+ @create_time.setter
428
+ def create_time(self, value: Optional[pulumi.Input[str]]):
429
+ pulumi.set(self, "create_time", value)
430
+
431
+ @property
432
+ @pulumi.getter
433
+ def destination(self) -> Optional[pulumi.Input[str]]:
434
+ """
435
+ The name of the destination connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{destinationConnectionProfile}.
436
+ """
437
+ return pulumi.get(self, "destination")
438
+
439
+ @destination.setter
440
+ def destination(self, value: Optional[pulumi.Input[str]]):
441
+ pulumi.set(self, "destination", value)
442
+
443
+ @property
444
+ @pulumi.getter(name="displayName")
445
+ def display_name(self) -> Optional[pulumi.Input[str]]:
446
+ """
447
+ The migration job display name.
448
+ """
449
+ return pulumi.get(self, "display_name")
450
+
451
+ @display_name.setter
452
+ def display_name(self, value: Optional[pulumi.Input[str]]):
453
+ pulumi.set(self, "display_name", value)
454
+
455
+ @property
456
+ @pulumi.getter(name="dumpFlags")
457
+ def dump_flags(self) -> Optional[pulumi.Input['MigrationJobDumpFlagsArgs']]:
458
+ """
459
+ The initial dump flags.
460
+ Structure is documented below.
461
+ """
462
+ return pulumi.get(self, "dump_flags")
463
+
464
+ @dump_flags.setter
465
+ def dump_flags(self, value: Optional[pulumi.Input['MigrationJobDumpFlagsArgs']]):
466
+ pulumi.set(self, "dump_flags", value)
467
+
468
+ @property
469
+ @pulumi.getter(name="dumpPath")
470
+ def dump_path(self) -> Optional[pulumi.Input[str]]:
471
+ """
472
+ The path to the dump file in Google Cloud Storage,
473
+ in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
474
+ This field and the "dump_flags" field are mutually exclusive.
475
+ """
476
+ return pulumi.get(self, "dump_path")
477
+
478
+ @dump_path.setter
479
+ def dump_path(self, value: Optional[pulumi.Input[str]]):
480
+ pulumi.set(self, "dump_path", value)
481
+
482
+ @property
483
+ @pulumi.getter(name="dumpType")
484
+ def dump_type(self) -> Optional[pulumi.Input[str]]:
485
+ """
486
+ The type of the data dump. Supported for MySQL to CloudSQL for MySQL
487
+ migrations only.
488
+ Possible values are: `LOGICAL`, `PHYSICAL`.
489
+ """
490
+ return pulumi.get(self, "dump_type")
491
+
492
+ @dump_type.setter
493
+ def dump_type(self, value: Optional[pulumi.Input[str]]):
494
+ pulumi.set(self, "dump_type", value)
495
+
496
+ @property
497
+ @pulumi.getter(name="effectiveLabels")
498
+ def effective_labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
499
+ """
500
+ All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
501
+ """
502
+ return pulumi.get(self, "effective_labels")
503
+
504
+ @effective_labels.setter
505
+ def effective_labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
506
+ pulumi.set(self, "effective_labels", value)
507
+
508
+ @property
509
+ @pulumi.getter
510
+ def errors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MigrationJobErrorArgs']]]]:
511
+ """
512
+ Output only. The error details in case of state FAILED.
513
+ Structure is documented below.
514
+ """
515
+ return pulumi.get(self, "errors")
516
+
517
+ @errors.setter
518
+ def errors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MigrationJobErrorArgs']]]]):
519
+ pulumi.set(self, "errors", value)
520
+
521
+ @property
522
+ @pulumi.getter
523
+ def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
524
+ """
525
+ The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs.
526
+
527
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
528
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
529
+ """
530
+ return pulumi.get(self, "labels")
531
+
532
+ @labels.setter
533
+ def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
534
+ pulumi.set(self, "labels", value)
535
+
536
+ @property
537
+ @pulumi.getter
538
+ def location(self) -> Optional[pulumi.Input[str]]:
539
+ """
540
+ The location where the migration job should reside.
541
+ """
542
+ return pulumi.get(self, "location")
543
+
544
+ @location.setter
545
+ def location(self, value: Optional[pulumi.Input[str]]):
546
+ pulumi.set(self, "location", value)
547
+
548
+ @property
549
+ @pulumi.getter(name="migrationJobId")
550
+ def migration_job_id(self) -> Optional[pulumi.Input[str]]:
551
+ """
552
+ The ID of the migration job.
553
+
554
+
555
+ - - -
556
+ """
557
+ return pulumi.get(self, "migration_job_id")
558
+
559
+ @migration_job_id.setter
560
+ def migration_job_id(self, value: Optional[pulumi.Input[str]]):
561
+ pulumi.set(self, "migration_job_id", value)
562
+
563
+ @property
564
+ @pulumi.getter
565
+ def name(self) -> Optional[pulumi.Input[str]]:
566
+ """
567
+ The name of this migration job resource in the form of projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
568
+ """
569
+ return pulumi.get(self, "name")
570
+
571
+ @name.setter
572
+ def name(self, value: Optional[pulumi.Input[str]]):
573
+ pulumi.set(self, "name", value)
574
+
575
+ @property
576
+ @pulumi.getter(name="performanceConfig")
577
+ def performance_config(self) -> Optional[pulumi.Input['MigrationJobPerformanceConfigArgs']]:
578
+ """
579
+ Data dump parallelism settings used by the migration.
580
+ Structure is documented below.
581
+ """
582
+ return pulumi.get(self, "performance_config")
583
+
584
+ @performance_config.setter
585
+ def performance_config(self, value: Optional[pulumi.Input['MigrationJobPerformanceConfigArgs']]):
586
+ pulumi.set(self, "performance_config", value)
587
+
588
+ @property
589
+ @pulumi.getter
590
+ def phase(self) -> Optional[pulumi.Input[str]]:
591
+ """
592
+ The current migration job phase.
593
+ """
594
+ return pulumi.get(self, "phase")
595
+
596
+ @phase.setter
597
+ def phase(self, value: Optional[pulumi.Input[str]]):
598
+ pulumi.set(self, "phase", value)
599
+
600
+ @property
601
+ @pulumi.getter
602
+ def project(self) -> Optional[pulumi.Input[str]]:
603
+ """
604
+ The ID of the project in which the resource belongs.
605
+ If it is not provided, the provider project is used.
606
+ """
607
+ return pulumi.get(self, "project")
608
+
609
+ @project.setter
610
+ def project(self, value: Optional[pulumi.Input[str]]):
611
+ pulumi.set(self, "project", value)
612
+
613
+ @property
614
+ @pulumi.getter(name="pulumiLabels")
615
+ def pulumi_labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
616
+ """
617
+ The combination of labels configured directly on the resource
618
+ and default labels configured on the provider.
619
+ """
620
+ return pulumi.get(self, "pulumi_labels")
621
+
622
+ @pulumi_labels.setter
623
+ def pulumi_labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
624
+ pulumi.set(self, "pulumi_labels", value)
625
+
626
+ @property
627
+ @pulumi.getter(name="reverseSshConnectivity")
628
+ def reverse_ssh_connectivity(self) -> Optional[pulumi.Input['MigrationJobReverseSshConnectivityArgs']]:
629
+ """
630
+ The details of the VPC network that the source database is located in.
631
+ Structure is documented below.
632
+ """
633
+ return pulumi.get(self, "reverse_ssh_connectivity")
634
+
635
+ @reverse_ssh_connectivity.setter
636
+ def reverse_ssh_connectivity(self, value: Optional[pulumi.Input['MigrationJobReverseSshConnectivityArgs']]):
637
+ pulumi.set(self, "reverse_ssh_connectivity", value)
638
+
639
+ @property
640
+ @pulumi.getter
641
+ def source(self) -> Optional[pulumi.Input[str]]:
642
+ """
643
+ The name of the source connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{sourceConnectionProfile}.
644
+ """
645
+ return pulumi.get(self, "source")
646
+
647
+ @source.setter
648
+ def source(self, value: Optional[pulumi.Input[str]]):
649
+ pulumi.set(self, "source", value)
650
+
651
+ @property
652
+ @pulumi.getter
653
+ def state(self) -> Optional[pulumi.Input[str]]:
654
+ """
655
+ The current migration job state.
656
+ """
657
+ return pulumi.get(self, "state")
658
+
659
+ @state.setter
660
+ def state(self, value: Optional[pulumi.Input[str]]):
661
+ pulumi.set(self, "state", value)
662
+
663
+ @property
664
+ @pulumi.getter(name="staticIpConnectivity")
665
+ def static_ip_connectivity(self) -> Optional[pulumi.Input['MigrationJobStaticIpConnectivityArgs']]:
666
+ """
667
+ If set to an empty object (`{}`), the source database will allow incoming
668
+ connections from the public IP of the destination database.
669
+ You can retrieve the public IP of the Cloud SQL instance from the
670
+ Cloud SQL console or using Cloud SQL APIs.
671
+ """
672
+ return pulumi.get(self, "static_ip_connectivity")
673
+
674
+ @static_ip_connectivity.setter
675
+ def static_ip_connectivity(self, value: Optional[pulumi.Input['MigrationJobStaticIpConnectivityArgs']]):
676
+ pulumi.set(self, "static_ip_connectivity", value)
677
+
678
+ @property
679
+ @pulumi.getter
680
+ def type(self) -> Optional[pulumi.Input[str]]:
681
+ """
682
+ The type of the migration job.
683
+ Possible values are: `ONE_TIME`, `CONTINUOUS`.
684
+ """
685
+ return pulumi.get(self, "type")
686
+
687
+ @type.setter
688
+ def type(self, value: Optional[pulumi.Input[str]]):
689
+ pulumi.set(self, "type", value)
690
+
691
+ @property
692
+ @pulumi.getter(name="vpcPeeringConnectivity")
693
+ def vpc_peering_connectivity(self) -> Optional[pulumi.Input['MigrationJobVpcPeeringConnectivityArgs']]:
694
+ """
695
+ The details of the VPC network that the source database is located in.
696
+ Structure is documented below.
697
+ """
698
+ return pulumi.get(self, "vpc_peering_connectivity")
699
+
700
+ @vpc_peering_connectivity.setter
701
+ def vpc_peering_connectivity(self, value: Optional[pulumi.Input['MigrationJobVpcPeeringConnectivityArgs']]):
702
+ pulumi.set(self, "vpc_peering_connectivity", value)
703
+
704
+
705
+ class MigrationJob(pulumi.CustomResource):
706
+ @overload
707
+ def __init__(__self__,
708
+ resource_name: str,
709
+ opts: Optional[pulumi.ResourceOptions] = None,
710
+ destination: Optional[pulumi.Input[str]] = None,
711
+ display_name: Optional[pulumi.Input[str]] = None,
712
+ dump_flags: Optional[pulumi.Input[Union['MigrationJobDumpFlagsArgs', 'MigrationJobDumpFlagsArgsDict']]] = None,
713
+ dump_path: Optional[pulumi.Input[str]] = None,
714
+ dump_type: Optional[pulumi.Input[str]] = None,
715
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
716
+ location: Optional[pulumi.Input[str]] = None,
717
+ migration_job_id: Optional[pulumi.Input[str]] = None,
718
+ performance_config: Optional[pulumi.Input[Union['MigrationJobPerformanceConfigArgs', 'MigrationJobPerformanceConfigArgsDict']]] = None,
719
+ project: Optional[pulumi.Input[str]] = None,
720
+ reverse_ssh_connectivity: Optional[pulumi.Input[Union['MigrationJobReverseSshConnectivityArgs', 'MigrationJobReverseSshConnectivityArgsDict']]] = None,
721
+ source: Optional[pulumi.Input[str]] = None,
722
+ static_ip_connectivity: Optional[pulumi.Input[Union['MigrationJobStaticIpConnectivityArgs', 'MigrationJobStaticIpConnectivityArgsDict']]] = None,
723
+ type: Optional[pulumi.Input[str]] = None,
724
+ vpc_peering_connectivity: Optional[pulumi.Input[Union['MigrationJobVpcPeeringConnectivityArgs', 'MigrationJobVpcPeeringConnectivityArgsDict']]] = None,
725
+ __props__=None):
726
+ """
727
+ A migration job definition.
728
+
729
+ To get more information about MigrationJob, see:
730
+
731
+ * [API documentation](https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/create)
732
+ * How-to Guides
733
+ * [Database Migration](https://cloud.google.com/database-migration/docs/)
734
+
735
+ ## Example Usage
736
+
737
+ ### Database Migration Service Migration Job Mysql To Mysql
738
+
739
+ ```python
740
+ import pulumi
741
+ import pulumi_gcp as gcp
742
+
743
+ project = gcp.organizations.get_project()
744
+ source_csql = gcp.sql.DatabaseInstance("source_csql",
745
+ name="source-csql",
746
+ database_version="MYSQL_5_7",
747
+ settings={
748
+ "tier": "db-n1-standard-1",
749
+ "deletion_protection_enabled": False,
750
+ },
751
+ deletion_protection=False)
752
+ source_sql_client_cert = gcp.sql.SslCert("source_sql_client_cert",
753
+ common_name="cert",
754
+ instance=source_csql.name,
755
+ opts = pulumi.ResourceOptions(depends_on=[source_csql]))
756
+ source_sqldb_user = gcp.sql.User("source_sqldb_user",
757
+ name="username",
758
+ instance=source_csql.name,
759
+ password="password",
760
+ opts = pulumi.ResourceOptions(depends_on=[source_sql_client_cert]))
761
+ source_cp = gcp.databasemigrationservice.ConnectionProfile("source_cp",
762
+ location="us-central1",
763
+ connection_profile_id="source-cp",
764
+ display_name="source-cp_display",
765
+ labels={
766
+ "foo": "bar",
767
+ },
768
+ mysql={
769
+ "host": source_csql.ip_addresses[0].ip_address,
770
+ "port": 3306,
771
+ "username": source_sqldb_user.name,
772
+ "password": source_sqldb_user.password,
773
+ "ssl": {
774
+ "client_key": source_sql_client_cert.private_key,
775
+ "client_certificate": source_sql_client_cert.cert,
776
+ "ca_certificate": source_sql_client_cert.server_ca_cert,
777
+ },
778
+ "cloud_sql_id": "source-csql",
779
+ },
780
+ opts = pulumi.ResourceOptions(depends_on=[source_sqldb_user]))
781
+ destination_csql = gcp.sql.DatabaseInstance("destination_csql",
782
+ name="destination-csql",
783
+ database_version="MYSQL_5_7",
784
+ settings={
785
+ "tier": "db-n1-standard-1",
786
+ "deletion_protection_enabled": False,
787
+ },
788
+ deletion_protection=False)
789
+ destination_cp = gcp.databasemigrationservice.ConnectionProfile("destination_cp",
790
+ location="us-central1",
791
+ connection_profile_id="destination-cp",
792
+ display_name="destination-cp_display",
793
+ labels={
794
+ "foo": "bar",
795
+ },
796
+ mysql={
797
+ "cloud_sql_id": "destination-csql",
798
+ },
799
+ opts = pulumi.ResourceOptions(depends_on=[destination_csql]))
800
+ default = gcp.compute.Network("default", name="destination-csql")
801
+ mysqltomysql = gcp.databasemigrationservice.MigrationJob("mysqltomysql",
802
+ location="us-central1",
803
+ migration_job_id="my-migrationid",
804
+ display_name="my-migrationid_display",
805
+ labels={
806
+ "foo": "bar",
807
+ },
808
+ performance_config={
809
+ "dump_parallel_level": "MAX",
810
+ },
811
+ vpc_peering_connectivity={
812
+ "vpc": default.id,
813
+ },
814
+ dump_type="LOGICAL",
815
+ dump_flags={
816
+ "dump_flags": [{
817
+ "name": "max-allowed-packet",
818
+ "value": "1073741824",
819
+ }],
820
+ },
821
+ source=source_cp.name,
822
+ destination=destination_cp.name,
823
+ type="CONTINUOUS")
824
+ ```
825
+ ### Database Migration Service Migration Job Postgres To Postgres
826
+
827
+ ```python
828
+ import pulumi
829
+ import pulumi_gcp as gcp
830
+
831
+ project = gcp.organizations.get_project()
832
+ source_csql = gcp.sql.DatabaseInstance("source_csql",
833
+ name="source-csql",
834
+ database_version="POSTGRES_15",
835
+ settings={
836
+ "tier": "db-custom-2-13312",
837
+ "deletion_protection_enabled": False,
838
+ },
839
+ deletion_protection=False)
840
+ source_sql_client_cert = gcp.sql.SslCert("source_sql_client_cert",
841
+ common_name="cert",
842
+ instance=source_csql.name,
843
+ opts = pulumi.ResourceOptions(depends_on=[source_csql]))
844
+ source_sqldb_user = gcp.sql.User("source_sqldb_user",
845
+ name="username",
846
+ instance=source_csql.name,
847
+ password="password",
848
+ opts = pulumi.ResourceOptions(depends_on=[source_sql_client_cert]))
849
+ source_cp = gcp.databasemigrationservice.ConnectionProfile("source_cp",
850
+ location="us-central1",
851
+ connection_profile_id="source-cp",
852
+ display_name="source-cp_display",
853
+ labels={
854
+ "foo": "bar",
855
+ },
856
+ postgresql={
857
+ "host": source_csql.ip_addresses[0].ip_address,
858
+ "port": 3306,
859
+ "username": source_sqldb_user.name,
860
+ "password": source_sqldb_user.password,
861
+ "ssl": {
862
+ "client_key": source_sql_client_cert.private_key,
863
+ "client_certificate": source_sql_client_cert.cert,
864
+ "ca_certificate": source_sql_client_cert.server_ca_cert,
865
+ },
866
+ "cloud_sql_id": "source-csql",
867
+ },
868
+ opts = pulumi.ResourceOptions(depends_on=[source_sqldb_user]))
869
+ destination_csql = gcp.sql.DatabaseInstance("destination_csql",
870
+ name="destination-csql",
871
+ database_version="POSTGRES_15",
872
+ settings={
873
+ "tier": "db-custom-2-13312",
874
+ "deletion_protection_enabled": False,
875
+ },
876
+ deletion_protection=False)
877
+ destination_cp = gcp.databasemigrationservice.ConnectionProfile("destination_cp",
878
+ location="us-central1",
879
+ connection_profile_id="destination-cp",
880
+ display_name="destination-cp_display",
881
+ labels={
882
+ "foo": "bar",
883
+ },
884
+ postgresql={
885
+ "cloud_sql_id": "destination-csql",
886
+ },
887
+ opts = pulumi.ResourceOptions(depends_on=[destination_csql]))
888
+ psqltopsql = gcp.databasemigrationservice.MigrationJob("psqltopsql",
889
+ location="us-central1",
890
+ migration_job_id="my-migrationid",
891
+ display_name="my-migrationid_display",
892
+ labels={
893
+ "foo": "bar",
894
+ },
895
+ static_ip_connectivity={},
896
+ source=source_cp.name,
897
+ destination=destination_cp.name,
898
+ type="CONTINUOUS")
899
+ ```
900
+ ### Database Migration Service Migration Job Postgres To Alloydb
901
+
902
+ ```python
903
+ import pulumi
904
+ import pulumi_gcp as gcp
905
+
906
+ project = gcp.organizations.get_project()
907
+ source_csql = gcp.sql.DatabaseInstance("source_csql",
908
+ name="source-csql",
909
+ database_version="POSTGRES_15",
910
+ settings={
911
+ "tier": "db-custom-2-13312",
912
+ "deletion_protection_enabled": False,
913
+ },
914
+ deletion_protection=False)
915
+ source_sql_client_cert = gcp.sql.SslCert("source_sql_client_cert",
916
+ common_name="cert",
917
+ instance=source_csql.name,
918
+ opts = pulumi.ResourceOptions(depends_on=[source_csql]))
919
+ source_sqldb_user = gcp.sql.User("source_sqldb_user",
920
+ name="username",
921
+ instance=source_csql.name,
922
+ password="password",
923
+ opts = pulumi.ResourceOptions(depends_on=[source_sql_client_cert]))
924
+ source_cp = gcp.databasemigrationservice.ConnectionProfile("source_cp",
925
+ location="us-central1",
926
+ connection_profile_id="source-cp",
927
+ display_name="source-cp_display",
928
+ labels={
929
+ "foo": "bar",
930
+ },
931
+ postgresql={
932
+ "host": source_csql.ip_addresses[0].ip_address,
933
+ "port": 3306,
934
+ "username": source_sqldb_user.name,
935
+ "password": source_sqldb_user.password,
936
+ "ssl": {
937
+ "client_key": source_sql_client_cert.private_key,
938
+ "client_certificate": source_sql_client_cert.cert,
939
+ "ca_certificate": source_sql_client_cert.server_ca_cert,
940
+ },
941
+ "cloud_sql_id": "source-csql",
942
+ },
943
+ opts = pulumi.ResourceOptions(depends_on=[source_sqldb_user]))
944
+ default = gcp.compute.Network("default", name="destination-alloydb")
945
+ destination_alloydb = gcp.alloydb.Cluster("destination_alloydb",
946
+ cluster_id="destination-alloydb",
947
+ location="us-central1",
948
+ network_config={
949
+ "network": default.id,
950
+ },
951
+ database_version="POSTGRES_15",
952
+ initial_user={
953
+ "user": "destination-alloydb",
954
+ "password": "destination-alloydb",
955
+ })
956
+ private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
957
+ name="destination-alloydb",
958
+ address_type="INTERNAL",
959
+ purpose="VPC_PEERING",
960
+ prefix_length=16,
961
+ network=default.id)
962
+ vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
963
+ network=default.id,
964
+ service="servicenetworking.googleapis.com",
965
+ reserved_peering_ranges=[private_ip_alloc.name])
966
+ destination_alloydb_primary = gcp.alloydb.Instance("destination_alloydb_primary",
967
+ cluster=destination_alloydb.name,
968
+ instance_id="destination-alloydb-primary",
969
+ instance_type="PRIMARY",
970
+ opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
971
+ destination_cp = gcp.databasemigrationservice.ConnectionProfile("destination_cp",
972
+ location="us-central1",
973
+ connection_profile_id="destination-cp",
974
+ display_name="destination-cp_display",
975
+ labels={
976
+ "foo": "bar",
977
+ },
978
+ postgresql={
979
+ "alloydb_cluster_id": "destination-alloydb",
980
+ },
981
+ opts = pulumi.ResourceOptions(depends_on=[
982
+ destination_alloydb,
983
+ destination_alloydb_primary,
984
+ ]))
985
+ psqltoalloydb = gcp.databasemigrationservice.MigrationJob("psqltoalloydb",
986
+ location="us-central1",
987
+ migration_job_id="my-migrationid",
988
+ display_name="my-migrationid_display",
989
+ labels={
990
+ "foo": "bar",
991
+ },
992
+ static_ip_connectivity={},
993
+ source=source_cp.name,
994
+ destination=destination_cp.name,
995
+ type="CONTINUOUS")
996
+ ```
997
+
998
+ ## Import
999
+
1000
+ MigrationJob can be imported using any of these accepted formats:
1001
+
1002
+ * `projects/{{project}}/locations/{{location}}/migrationJobs/{{migration_job_id}}`
1003
+
1004
+ * `{{project}}/{{location}}/{{migration_job_id}}`
1005
+
1006
+ * `{{location}}/{{migration_job_id}}`
1007
+
1008
+ When using the `pulumi import` command, MigrationJob can be imported using one of the formats above. For example:
1009
+
1010
+ ```sh
1011
+ $ pulumi import gcp:databasemigrationservice/migrationJob:MigrationJob default projects/{{project}}/locations/{{location}}/migrationJobs/{{migration_job_id}}
1012
+ ```
1013
+
1014
+ ```sh
1015
+ $ pulumi import gcp:databasemigrationservice/migrationJob:MigrationJob default {{project}}/{{location}}/{{migration_job_id}}
1016
+ ```
1017
+
1018
+ ```sh
1019
+ $ pulumi import gcp:databasemigrationservice/migrationJob:MigrationJob default {{location}}/{{migration_job_id}}
1020
+ ```
1021
+
1022
+ :param str resource_name: The name of the resource.
1023
+ :param pulumi.ResourceOptions opts: Options for the resource.
1024
+ :param pulumi.Input[str] destination: The name of the destination connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{destinationConnectionProfile}.
1025
+ :param pulumi.Input[str] display_name: The migration job display name.
1026
+ :param pulumi.Input[Union['MigrationJobDumpFlagsArgs', 'MigrationJobDumpFlagsArgsDict']] dump_flags: The initial dump flags.
1027
+ Structure is documented below.
1028
+ :param pulumi.Input[str] dump_path: The path to the dump file in Google Cloud Storage,
1029
+ in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
1030
+ This field and the "dump_flags" field are mutually exclusive.
1031
+ :param pulumi.Input[str] dump_type: The type of the data dump. Supported for MySQL to CloudSQL for MySQL
1032
+ migrations only.
1033
+ Possible values are: `LOGICAL`, `PHYSICAL`.
1034
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs.
1035
+
1036
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
1037
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
1038
+ :param pulumi.Input[str] location: The location where the migration job should reside.
1039
+ :param pulumi.Input[str] migration_job_id: The ID of the migration job.
1040
+
1041
+
1042
+ - - -
1043
+ :param pulumi.Input[Union['MigrationJobPerformanceConfigArgs', 'MigrationJobPerformanceConfigArgsDict']] performance_config: Data dump parallelism settings used by the migration.
1044
+ Structure is documented below.
1045
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
1046
+ If it is not provided, the provider project is used.
1047
+ :param pulumi.Input[Union['MigrationJobReverseSshConnectivityArgs', 'MigrationJobReverseSshConnectivityArgsDict']] reverse_ssh_connectivity: The details of the VPC network that the source database is located in.
1048
+ Structure is documented below.
1049
+ :param pulumi.Input[str] source: The name of the source connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{sourceConnectionProfile}.
1050
+ :param pulumi.Input[Union['MigrationJobStaticIpConnectivityArgs', 'MigrationJobStaticIpConnectivityArgsDict']] static_ip_connectivity: If set to an empty object (`{}`), the source database will allow incoming
1051
+ connections from the public IP of the destination database.
1052
+ You can retrieve the public IP of the Cloud SQL instance from the
1053
+ Cloud SQL console or using Cloud SQL APIs.
1054
+ :param pulumi.Input[str] type: The type of the migration job.
1055
+ Possible values are: `ONE_TIME`, `CONTINUOUS`.
1056
+ :param pulumi.Input[Union['MigrationJobVpcPeeringConnectivityArgs', 'MigrationJobVpcPeeringConnectivityArgsDict']] vpc_peering_connectivity: The details of the VPC network that the source database is located in.
1057
+ Structure is documented below.
1058
+ """
1059
+ ...
1060
+ @overload
1061
+ def __init__(__self__,
1062
+ resource_name: str,
1063
+ args: MigrationJobArgs,
1064
+ opts: Optional[pulumi.ResourceOptions] = None):
1065
+ """
1066
+ A migration job definition.
1067
+
1068
+ To get more information about MigrationJob, see:
1069
+
1070
+ * [API documentation](https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/create)
1071
+ * How-to Guides
1072
+ * [Database Migration](https://cloud.google.com/database-migration/docs/)
1073
+
1074
+ ## Example Usage
1075
+
1076
+ ### Database Migration Service Migration Job Mysql To Mysql
1077
+
1078
+ ```python
1079
+ import pulumi
1080
+ import pulumi_gcp as gcp
1081
+
1082
+ project = gcp.organizations.get_project()
1083
+ source_csql = gcp.sql.DatabaseInstance("source_csql",
1084
+ name="source-csql",
1085
+ database_version="MYSQL_5_7",
1086
+ settings={
1087
+ "tier": "db-n1-standard-1",
1088
+ "deletion_protection_enabled": False,
1089
+ },
1090
+ deletion_protection=False)
1091
+ source_sql_client_cert = gcp.sql.SslCert("source_sql_client_cert",
1092
+ common_name="cert",
1093
+ instance=source_csql.name,
1094
+ opts = pulumi.ResourceOptions(depends_on=[source_csql]))
1095
+ source_sqldb_user = gcp.sql.User("source_sqldb_user",
1096
+ name="username",
1097
+ instance=source_csql.name,
1098
+ password="password",
1099
+ opts = pulumi.ResourceOptions(depends_on=[source_sql_client_cert]))
1100
+ source_cp = gcp.databasemigrationservice.ConnectionProfile("source_cp",
1101
+ location="us-central1",
1102
+ connection_profile_id="source-cp",
1103
+ display_name="source-cp_display",
1104
+ labels={
1105
+ "foo": "bar",
1106
+ },
1107
+ mysql={
1108
+ "host": source_csql.ip_addresses[0].ip_address,
1109
+ "port": 3306,
1110
+ "username": source_sqldb_user.name,
1111
+ "password": source_sqldb_user.password,
1112
+ "ssl": {
1113
+ "client_key": source_sql_client_cert.private_key,
1114
+ "client_certificate": source_sql_client_cert.cert,
1115
+ "ca_certificate": source_sql_client_cert.server_ca_cert,
1116
+ },
1117
+ "cloud_sql_id": "source-csql",
1118
+ },
1119
+ opts = pulumi.ResourceOptions(depends_on=[source_sqldb_user]))
1120
+ destination_csql = gcp.sql.DatabaseInstance("destination_csql",
1121
+ name="destination-csql",
1122
+ database_version="MYSQL_5_7",
1123
+ settings={
1124
+ "tier": "db-n1-standard-1",
1125
+ "deletion_protection_enabled": False,
1126
+ },
1127
+ deletion_protection=False)
1128
+ destination_cp = gcp.databasemigrationservice.ConnectionProfile("destination_cp",
1129
+ location="us-central1",
1130
+ connection_profile_id="destination-cp",
1131
+ display_name="destination-cp_display",
1132
+ labels={
1133
+ "foo": "bar",
1134
+ },
1135
+ mysql={
1136
+ "cloud_sql_id": "destination-csql",
1137
+ },
1138
+ opts = pulumi.ResourceOptions(depends_on=[destination_csql]))
1139
+ default = gcp.compute.Network("default", name="destination-csql")
1140
+ mysqltomysql = gcp.databasemigrationservice.MigrationJob("mysqltomysql",
1141
+ location="us-central1",
1142
+ migration_job_id="my-migrationid",
1143
+ display_name="my-migrationid_display",
1144
+ labels={
1145
+ "foo": "bar",
1146
+ },
1147
+ performance_config={
1148
+ "dump_parallel_level": "MAX",
1149
+ },
1150
+ vpc_peering_connectivity={
1151
+ "vpc": default.id,
1152
+ },
1153
+ dump_type="LOGICAL",
1154
+ dump_flags={
1155
+ "dump_flags": [{
1156
+ "name": "max-allowed-packet",
1157
+ "value": "1073741824",
1158
+ }],
1159
+ },
1160
+ source=source_cp.name,
1161
+ destination=destination_cp.name,
1162
+ type="CONTINUOUS")
1163
+ ```
1164
+ ### Database Migration Service Migration Job Postgres To Postgres
1165
+
1166
+ ```python
1167
+ import pulumi
1168
+ import pulumi_gcp as gcp
1169
+
1170
+ project = gcp.organizations.get_project()
1171
+ source_csql = gcp.sql.DatabaseInstance("source_csql",
1172
+ name="source-csql",
1173
+ database_version="POSTGRES_15",
1174
+ settings={
1175
+ "tier": "db-custom-2-13312",
1176
+ "deletion_protection_enabled": False,
1177
+ },
1178
+ deletion_protection=False)
1179
+ source_sql_client_cert = gcp.sql.SslCert("source_sql_client_cert",
1180
+ common_name="cert",
1181
+ instance=source_csql.name,
1182
+ opts = pulumi.ResourceOptions(depends_on=[source_csql]))
1183
+ source_sqldb_user = gcp.sql.User("source_sqldb_user",
1184
+ name="username",
1185
+ instance=source_csql.name,
1186
+ password="password",
1187
+ opts = pulumi.ResourceOptions(depends_on=[source_sql_client_cert]))
1188
+ source_cp = gcp.databasemigrationservice.ConnectionProfile("source_cp",
1189
+ location="us-central1",
1190
+ connection_profile_id="source-cp",
1191
+ display_name="source-cp_display",
1192
+ labels={
1193
+ "foo": "bar",
1194
+ },
1195
+ postgresql={
1196
+ "host": source_csql.ip_addresses[0].ip_address,
1197
+ "port": 3306,
1198
+ "username": source_sqldb_user.name,
1199
+ "password": source_sqldb_user.password,
1200
+ "ssl": {
1201
+ "client_key": source_sql_client_cert.private_key,
1202
+ "client_certificate": source_sql_client_cert.cert,
1203
+ "ca_certificate": source_sql_client_cert.server_ca_cert,
1204
+ },
1205
+ "cloud_sql_id": "source-csql",
1206
+ },
1207
+ opts = pulumi.ResourceOptions(depends_on=[source_sqldb_user]))
1208
+ destination_csql = gcp.sql.DatabaseInstance("destination_csql",
1209
+ name="destination-csql",
1210
+ database_version="POSTGRES_15",
1211
+ settings={
1212
+ "tier": "db-custom-2-13312",
1213
+ "deletion_protection_enabled": False,
1214
+ },
1215
+ deletion_protection=False)
1216
+ destination_cp = gcp.databasemigrationservice.ConnectionProfile("destination_cp",
1217
+ location="us-central1",
1218
+ connection_profile_id="destination-cp",
1219
+ display_name="destination-cp_display",
1220
+ labels={
1221
+ "foo": "bar",
1222
+ },
1223
+ postgresql={
1224
+ "cloud_sql_id": "destination-csql",
1225
+ },
1226
+ opts = pulumi.ResourceOptions(depends_on=[destination_csql]))
1227
+ psqltopsql = gcp.databasemigrationservice.MigrationJob("psqltopsql",
1228
+ location="us-central1",
1229
+ migration_job_id="my-migrationid",
1230
+ display_name="my-migrationid_display",
1231
+ labels={
1232
+ "foo": "bar",
1233
+ },
1234
+ static_ip_connectivity={},
1235
+ source=source_cp.name,
1236
+ destination=destination_cp.name,
1237
+ type="CONTINUOUS")
1238
+ ```
1239
+ ### Database Migration Service Migration Job Postgres To Alloydb
1240
+
1241
+ ```python
1242
+ import pulumi
1243
+ import pulumi_gcp as gcp
1244
+
1245
+ project = gcp.organizations.get_project()
1246
+ source_csql = gcp.sql.DatabaseInstance("source_csql",
1247
+ name="source-csql",
1248
+ database_version="POSTGRES_15",
1249
+ settings={
1250
+ "tier": "db-custom-2-13312",
1251
+ "deletion_protection_enabled": False,
1252
+ },
1253
+ deletion_protection=False)
1254
+ source_sql_client_cert = gcp.sql.SslCert("source_sql_client_cert",
1255
+ common_name="cert",
1256
+ instance=source_csql.name,
1257
+ opts = pulumi.ResourceOptions(depends_on=[source_csql]))
1258
+ source_sqldb_user = gcp.sql.User("source_sqldb_user",
1259
+ name="username",
1260
+ instance=source_csql.name,
1261
+ password="password",
1262
+ opts = pulumi.ResourceOptions(depends_on=[source_sql_client_cert]))
1263
+ source_cp = gcp.databasemigrationservice.ConnectionProfile("source_cp",
1264
+ location="us-central1",
1265
+ connection_profile_id="source-cp",
1266
+ display_name="source-cp_display",
1267
+ labels={
1268
+ "foo": "bar",
1269
+ },
1270
+ postgresql={
1271
+ "host": source_csql.ip_addresses[0].ip_address,
1272
+ "port": 3306,
1273
+ "username": source_sqldb_user.name,
1274
+ "password": source_sqldb_user.password,
1275
+ "ssl": {
1276
+ "client_key": source_sql_client_cert.private_key,
1277
+ "client_certificate": source_sql_client_cert.cert,
1278
+ "ca_certificate": source_sql_client_cert.server_ca_cert,
1279
+ },
1280
+ "cloud_sql_id": "source-csql",
1281
+ },
1282
+ opts = pulumi.ResourceOptions(depends_on=[source_sqldb_user]))
1283
+ default = gcp.compute.Network("default", name="destination-alloydb")
1284
+ destination_alloydb = gcp.alloydb.Cluster("destination_alloydb",
1285
+ cluster_id="destination-alloydb",
1286
+ location="us-central1",
1287
+ network_config={
1288
+ "network": default.id,
1289
+ },
1290
+ database_version="POSTGRES_15",
1291
+ initial_user={
1292
+ "user": "destination-alloydb",
1293
+ "password": "destination-alloydb",
1294
+ })
1295
+ private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
1296
+ name="destination-alloydb",
1297
+ address_type="INTERNAL",
1298
+ purpose="VPC_PEERING",
1299
+ prefix_length=16,
1300
+ network=default.id)
1301
+ vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
1302
+ network=default.id,
1303
+ service="servicenetworking.googleapis.com",
1304
+ reserved_peering_ranges=[private_ip_alloc.name])
1305
+ destination_alloydb_primary = gcp.alloydb.Instance("destination_alloydb_primary",
1306
+ cluster=destination_alloydb.name,
1307
+ instance_id="destination-alloydb-primary",
1308
+ instance_type="PRIMARY",
1309
+ opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
1310
+ destination_cp = gcp.databasemigrationservice.ConnectionProfile("destination_cp",
1311
+ location="us-central1",
1312
+ connection_profile_id="destination-cp",
1313
+ display_name="destination-cp_display",
1314
+ labels={
1315
+ "foo": "bar",
1316
+ },
1317
+ postgresql={
1318
+ "alloydb_cluster_id": "destination-alloydb",
1319
+ },
1320
+ opts = pulumi.ResourceOptions(depends_on=[
1321
+ destination_alloydb,
1322
+ destination_alloydb_primary,
1323
+ ]))
1324
+ psqltoalloydb = gcp.databasemigrationservice.MigrationJob("psqltoalloydb",
1325
+ location="us-central1",
1326
+ migration_job_id="my-migrationid",
1327
+ display_name="my-migrationid_display",
1328
+ labels={
1329
+ "foo": "bar",
1330
+ },
1331
+ static_ip_connectivity={},
1332
+ source=source_cp.name,
1333
+ destination=destination_cp.name,
1334
+ type="CONTINUOUS")
1335
+ ```
1336
+
1337
+ ## Import
1338
+
1339
+ MigrationJob can be imported using any of these accepted formats:
1340
+
1341
+ * `projects/{{project}}/locations/{{location}}/migrationJobs/{{migration_job_id}}`
1342
+
1343
+ * `{{project}}/{{location}}/{{migration_job_id}}`
1344
+
1345
+ * `{{location}}/{{migration_job_id}}`
1346
+
1347
+ When using the `pulumi import` command, MigrationJob can be imported using one of the formats above. For example:
1348
+
1349
+ ```sh
1350
+ $ pulumi import gcp:databasemigrationservice/migrationJob:MigrationJob default projects/{{project}}/locations/{{location}}/migrationJobs/{{migration_job_id}}
1351
+ ```
1352
+
1353
+ ```sh
1354
+ $ pulumi import gcp:databasemigrationservice/migrationJob:MigrationJob default {{project}}/{{location}}/{{migration_job_id}}
1355
+ ```
1356
+
1357
+ ```sh
1358
+ $ pulumi import gcp:databasemigrationservice/migrationJob:MigrationJob default {{location}}/{{migration_job_id}}
1359
+ ```
1360
+
1361
+ :param str resource_name: The name of the resource.
1362
+ :param MigrationJobArgs args: The arguments to use to populate this resource's properties.
1363
+ :param pulumi.ResourceOptions opts: Options for the resource.
1364
+ """
1365
+ ...
1366
+ def __init__(__self__, resource_name: str, *args, **kwargs):
1367
+ resource_args, opts = _utilities.get_resource_args_opts(MigrationJobArgs, pulumi.ResourceOptions, *args, **kwargs)
1368
+ if resource_args is not None:
1369
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
1370
+ else:
1371
+ __self__._internal_init(resource_name, *args, **kwargs)
1372
+
1373
+ def _internal_init(__self__,
1374
+ resource_name: str,
1375
+ opts: Optional[pulumi.ResourceOptions] = None,
1376
+ destination: Optional[pulumi.Input[str]] = None,
1377
+ display_name: Optional[pulumi.Input[str]] = None,
1378
+ dump_flags: Optional[pulumi.Input[Union['MigrationJobDumpFlagsArgs', 'MigrationJobDumpFlagsArgsDict']]] = None,
1379
+ dump_path: Optional[pulumi.Input[str]] = None,
1380
+ dump_type: Optional[pulumi.Input[str]] = None,
1381
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1382
+ location: Optional[pulumi.Input[str]] = None,
1383
+ migration_job_id: Optional[pulumi.Input[str]] = None,
1384
+ performance_config: Optional[pulumi.Input[Union['MigrationJobPerformanceConfigArgs', 'MigrationJobPerformanceConfigArgsDict']]] = None,
1385
+ project: Optional[pulumi.Input[str]] = None,
1386
+ reverse_ssh_connectivity: Optional[pulumi.Input[Union['MigrationJobReverseSshConnectivityArgs', 'MigrationJobReverseSshConnectivityArgsDict']]] = None,
1387
+ source: Optional[pulumi.Input[str]] = None,
1388
+ static_ip_connectivity: Optional[pulumi.Input[Union['MigrationJobStaticIpConnectivityArgs', 'MigrationJobStaticIpConnectivityArgsDict']]] = None,
1389
+ type: Optional[pulumi.Input[str]] = None,
1390
+ vpc_peering_connectivity: Optional[pulumi.Input[Union['MigrationJobVpcPeeringConnectivityArgs', 'MigrationJobVpcPeeringConnectivityArgsDict']]] = None,
1391
+ __props__=None):
1392
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
1393
+ if not isinstance(opts, pulumi.ResourceOptions):
1394
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
1395
+ if opts.id is None:
1396
+ if __props__ is not None:
1397
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
1398
+ __props__ = MigrationJobArgs.__new__(MigrationJobArgs)
1399
+
1400
+ if destination is None and not opts.urn:
1401
+ raise TypeError("Missing required property 'destination'")
1402
+ __props__.__dict__["destination"] = destination
1403
+ __props__.__dict__["display_name"] = display_name
1404
+ __props__.__dict__["dump_flags"] = dump_flags
1405
+ __props__.__dict__["dump_path"] = dump_path
1406
+ __props__.__dict__["dump_type"] = dump_type
1407
+ __props__.__dict__["labels"] = labels
1408
+ __props__.__dict__["location"] = location
1409
+ if migration_job_id is None and not opts.urn:
1410
+ raise TypeError("Missing required property 'migration_job_id'")
1411
+ __props__.__dict__["migration_job_id"] = migration_job_id
1412
+ __props__.__dict__["performance_config"] = performance_config
1413
+ __props__.__dict__["project"] = project
1414
+ __props__.__dict__["reverse_ssh_connectivity"] = reverse_ssh_connectivity
1415
+ if source is None and not opts.urn:
1416
+ raise TypeError("Missing required property 'source'")
1417
+ __props__.__dict__["source"] = source
1418
+ __props__.__dict__["static_ip_connectivity"] = static_ip_connectivity
1419
+ if type is None and not opts.urn:
1420
+ raise TypeError("Missing required property 'type'")
1421
+ __props__.__dict__["type"] = type
1422
+ __props__.__dict__["vpc_peering_connectivity"] = vpc_peering_connectivity
1423
+ __props__.__dict__["create_time"] = None
1424
+ __props__.__dict__["effective_labels"] = None
1425
+ __props__.__dict__["errors"] = None
1426
+ __props__.__dict__["name"] = None
1427
+ __props__.__dict__["phase"] = None
1428
+ __props__.__dict__["pulumi_labels"] = None
1429
+ __props__.__dict__["state"] = None
1430
+ secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["effectiveLabels", "pulumiLabels"])
1431
+ opts = pulumi.ResourceOptions.merge(opts, secret_opts)
1432
+ super(MigrationJob, __self__).__init__(
1433
+ 'gcp:databasemigrationservice/migrationJob:MigrationJob',
1434
+ resource_name,
1435
+ __props__,
1436
+ opts)
1437
+
1438
+ @staticmethod
1439
+ def get(resource_name: str,
1440
+ id: pulumi.Input[str],
1441
+ opts: Optional[pulumi.ResourceOptions] = None,
1442
+ create_time: Optional[pulumi.Input[str]] = None,
1443
+ destination: Optional[pulumi.Input[str]] = None,
1444
+ display_name: Optional[pulumi.Input[str]] = None,
1445
+ dump_flags: Optional[pulumi.Input[Union['MigrationJobDumpFlagsArgs', 'MigrationJobDumpFlagsArgsDict']]] = None,
1446
+ dump_path: Optional[pulumi.Input[str]] = None,
1447
+ dump_type: Optional[pulumi.Input[str]] = None,
1448
+ effective_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1449
+ errors: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MigrationJobErrorArgs', 'MigrationJobErrorArgsDict']]]]] = None,
1450
+ labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1451
+ location: Optional[pulumi.Input[str]] = None,
1452
+ migration_job_id: Optional[pulumi.Input[str]] = None,
1453
+ name: Optional[pulumi.Input[str]] = None,
1454
+ performance_config: Optional[pulumi.Input[Union['MigrationJobPerformanceConfigArgs', 'MigrationJobPerformanceConfigArgsDict']]] = None,
1455
+ phase: Optional[pulumi.Input[str]] = None,
1456
+ project: Optional[pulumi.Input[str]] = None,
1457
+ pulumi_labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
1458
+ reverse_ssh_connectivity: Optional[pulumi.Input[Union['MigrationJobReverseSshConnectivityArgs', 'MigrationJobReverseSshConnectivityArgsDict']]] = None,
1459
+ source: Optional[pulumi.Input[str]] = None,
1460
+ state: Optional[pulumi.Input[str]] = None,
1461
+ static_ip_connectivity: Optional[pulumi.Input[Union['MigrationJobStaticIpConnectivityArgs', 'MigrationJobStaticIpConnectivityArgsDict']]] = None,
1462
+ type: Optional[pulumi.Input[str]] = None,
1463
+ vpc_peering_connectivity: Optional[pulumi.Input[Union['MigrationJobVpcPeeringConnectivityArgs', 'MigrationJobVpcPeeringConnectivityArgsDict']]] = None) -> 'MigrationJob':
1464
+ """
1465
+ Get an existing MigrationJob resource's state with the given name, id, and optional extra
1466
+ properties used to qualify the lookup.
1467
+
1468
+ :param str resource_name: The unique name of the resulting resource.
1469
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
1470
+ :param pulumi.ResourceOptions opts: Options for the resource.
1471
+ :param pulumi.Input[str] create_time: Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC 'Zulu' format, accurate to nanoseconds. Example: '2014-10-02T15:01:23.045123456Z'.
1472
+ :param pulumi.Input[str] destination: The name of the destination connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{destinationConnectionProfile}.
1473
+ :param pulumi.Input[str] display_name: The migration job display name.
1474
+ :param pulumi.Input[Union['MigrationJobDumpFlagsArgs', 'MigrationJobDumpFlagsArgsDict']] dump_flags: The initial dump flags.
1475
+ Structure is documented below.
1476
+ :param pulumi.Input[str] dump_path: The path to the dump file in Google Cloud Storage,
1477
+ in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
1478
+ This field and the "dump_flags" field are mutually exclusive.
1479
+ :param pulumi.Input[str] dump_type: The type of the data dump. Supported for MySQL to CloudSQL for MySQL
1480
+ migrations only.
1481
+ Possible values are: `LOGICAL`, `PHYSICAL`.
1482
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] effective_labels: All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
1483
+ :param pulumi.Input[Sequence[pulumi.Input[Union['MigrationJobErrorArgs', 'MigrationJobErrorArgsDict']]]] errors: Output only. The error details in case of state FAILED.
1484
+ Structure is documented below.
1485
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs.
1486
+
1487
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
1488
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
1489
+ :param pulumi.Input[str] location: The location where the migration job should reside.
1490
+ :param pulumi.Input[str] migration_job_id: The ID of the migration job.
1491
+
1492
+
1493
+ - - -
1494
+ :param pulumi.Input[str] name: The name of this migration job resource in the form of projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
1495
+ :param pulumi.Input[Union['MigrationJobPerformanceConfigArgs', 'MigrationJobPerformanceConfigArgsDict']] performance_config: Data dump parallelism settings used by the migration.
1496
+ Structure is documented below.
1497
+ :param pulumi.Input[str] phase: The current migration job phase.
1498
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
1499
+ If it is not provided, the provider project is used.
1500
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] pulumi_labels: The combination of labels configured directly on the resource
1501
+ and default labels configured on the provider.
1502
+ :param pulumi.Input[Union['MigrationJobReverseSshConnectivityArgs', 'MigrationJobReverseSshConnectivityArgsDict']] reverse_ssh_connectivity: The details of the VPC network that the source database is located in.
1503
+ Structure is documented below.
1504
+ :param pulumi.Input[str] source: The name of the source connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{sourceConnectionProfile}.
1505
+ :param pulumi.Input[str] state: The current migration job state.
1506
+ :param pulumi.Input[Union['MigrationJobStaticIpConnectivityArgs', 'MigrationJobStaticIpConnectivityArgsDict']] static_ip_connectivity: If set to an empty object (`{}`), the source database will allow incoming
1507
+ connections from the public IP of the destination database.
1508
+ You can retrieve the public IP of the Cloud SQL instance from the
1509
+ Cloud SQL console or using Cloud SQL APIs.
1510
+ :param pulumi.Input[str] type: The type of the migration job.
1511
+ Possible values are: `ONE_TIME`, `CONTINUOUS`.
1512
+ :param pulumi.Input[Union['MigrationJobVpcPeeringConnectivityArgs', 'MigrationJobVpcPeeringConnectivityArgsDict']] vpc_peering_connectivity: The details of the VPC network that the source database is located in.
1513
+ Structure is documented below.
1514
+ """
1515
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
1516
+
1517
+ __props__ = _MigrationJobState.__new__(_MigrationJobState)
1518
+
1519
+ __props__.__dict__["create_time"] = create_time
1520
+ __props__.__dict__["destination"] = destination
1521
+ __props__.__dict__["display_name"] = display_name
1522
+ __props__.__dict__["dump_flags"] = dump_flags
1523
+ __props__.__dict__["dump_path"] = dump_path
1524
+ __props__.__dict__["dump_type"] = dump_type
1525
+ __props__.__dict__["effective_labels"] = effective_labels
1526
+ __props__.__dict__["errors"] = errors
1527
+ __props__.__dict__["labels"] = labels
1528
+ __props__.__dict__["location"] = location
1529
+ __props__.__dict__["migration_job_id"] = migration_job_id
1530
+ __props__.__dict__["name"] = name
1531
+ __props__.__dict__["performance_config"] = performance_config
1532
+ __props__.__dict__["phase"] = phase
1533
+ __props__.__dict__["project"] = project
1534
+ __props__.__dict__["pulumi_labels"] = pulumi_labels
1535
+ __props__.__dict__["reverse_ssh_connectivity"] = reverse_ssh_connectivity
1536
+ __props__.__dict__["source"] = source
1537
+ __props__.__dict__["state"] = state
1538
+ __props__.__dict__["static_ip_connectivity"] = static_ip_connectivity
1539
+ __props__.__dict__["type"] = type
1540
+ __props__.__dict__["vpc_peering_connectivity"] = vpc_peering_connectivity
1541
+ return MigrationJob(resource_name, opts=opts, __props__=__props__)
1542
+
1543
+ @property
1544
+ @pulumi.getter(name="createTime")
1545
+ def create_time(self) -> pulumi.Output[str]:
1546
+ """
1547
+ Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC 'Zulu' format, accurate to nanoseconds. Example: '2014-10-02T15:01:23.045123456Z'.
1548
+ """
1549
+ return pulumi.get(self, "create_time")
1550
+
1551
+ @property
1552
+ @pulumi.getter
1553
+ def destination(self) -> pulumi.Output[str]:
1554
+ """
1555
+ The name of the destination connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{destinationConnectionProfile}.
1556
+ """
1557
+ return pulumi.get(self, "destination")
1558
+
1559
+ @property
1560
+ @pulumi.getter(name="displayName")
1561
+ def display_name(self) -> pulumi.Output[Optional[str]]:
1562
+ """
1563
+ The migration job display name.
1564
+ """
1565
+ return pulumi.get(self, "display_name")
1566
+
1567
+ @property
1568
+ @pulumi.getter(name="dumpFlags")
1569
+ def dump_flags(self) -> pulumi.Output[Optional['outputs.MigrationJobDumpFlags']]:
1570
+ """
1571
+ The initial dump flags.
1572
+ Structure is documented below.
1573
+ """
1574
+ return pulumi.get(self, "dump_flags")
1575
+
1576
+ @property
1577
+ @pulumi.getter(name="dumpPath")
1578
+ def dump_path(self) -> pulumi.Output[Optional[str]]:
1579
+ """
1580
+ The path to the dump file in Google Cloud Storage,
1581
+ in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).
1582
+ This field and the "dump_flags" field are mutually exclusive.
1583
+ """
1584
+ return pulumi.get(self, "dump_path")
1585
+
1586
+ @property
1587
+ @pulumi.getter(name="dumpType")
1588
+ def dump_type(self) -> pulumi.Output[Optional[str]]:
1589
+ """
1590
+ The type of the data dump. Supported for MySQL to CloudSQL for MySQL
1591
+ migrations only.
1592
+ Possible values are: `LOGICAL`, `PHYSICAL`.
1593
+ """
1594
+ return pulumi.get(self, "dump_type")
1595
+
1596
+ @property
1597
+ @pulumi.getter(name="effectiveLabels")
1598
+ def effective_labels(self) -> pulumi.Output[Mapping[str, str]]:
1599
+ """
1600
+ All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
1601
+ """
1602
+ return pulumi.get(self, "effective_labels")
1603
+
1604
+ @property
1605
+ @pulumi.getter
1606
+ def errors(self) -> pulumi.Output[Sequence['outputs.MigrationJobError']]:
1607
+ """
1608
+ Output only. The error details in case of state FAILED.
1609
+ Structure is documented below.
1610
+ """
1611
+ return pulumi.get(self, "errors")
1612
+
1613
+ @property
1614
+ @pulumi.getter
1615
+ def labels(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
1616
+ """
1617
+ The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs.
1618
+
1619
+ **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
1620
+ Please refer to the field `effective_labels` for all of the labels present on the resource.
1621
+ """
1622
+ return pulumi.get(self, "labels")
1623
+
1624
+ @property
1625
+ @pulumi.getter
1626
+ def location(self) -> pulumi.Output[Optional[str]]:
1627
+ """
1628
+ The location where the migration job should reside.
1629
+ """
1630
+ return pulumi.get(self, "location")
1631
+
1632
+ @property
1633
+ @pulumi.getter(name="migrationJobId")
1634
+ def migration_job_id(self) -> pulumi.Output[str]:
1635
+ """
1636
+ The ID of the migration job.
1637
+
1638
+
1639
+ - - -
1640
+ """
1641
+ return pulumi.get(self, "migration_job_id")
1642
+
1643
+ @property
1644
+ @pulumi.getter
1645
+ def name(self) -> pulumi.Output[str]:
1646
+ """
1647
+ The name of this migration job resource in the form of projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
1648
+ """
1649
+ return pulumi.get(self, "name")
1650
+
1651
+ @property
1652
+ @pulumi.getter(name="performanceConfig")
1653
+ def performance_config(self) -> pulumi.Output[Optional['outputs.MigrationJobPerformanceConfig']]:
1654
+ """
1655
+ Data dump parallelism settings used by the migration.
1656
+ Structure is documented below.
1657
+ """
1658
+ return pulumi.get(self, "performance_config")
1659
+
1660
+ @property
1661
+ @pulumi.getter
1662
+ def phase(self) -> pulumi.Output[str]:
1663
+ """
1664
+ The current migration job phase.
1665
+ """
1666
+ return pulumi.get(self, "phase")
1667
+
1668
+ @property
1669
+ @pulumi.getter
1670
+ def project(self) -> pulumi.Output[str]:
1671
+ """
1672
+ The ID of the project in which the resource belongs.
1673
+ If it is not provided, the provider project is used.
1674
+ """
1675
+ return pulumi.get(self, "project")
1676
+
1677
+ @property
1678
+ @pulumi.getter(name="pulumiLabels")
1679
+ def pulumi_labels(self) -> pulumi.Output[Mapping[str, str]]:
1680
+ """
1681
+ The combination of labels configured directly on the resource
1682
+ and default labels configured on the provider.
1683
+ """
1684
+ return pulumi.get(self, "pulumi_labels")
1685
+
1686
+ @property
1687
+ @pulumi.getter(name="reverseSshConnectivity")
1688
+ def reverse_ssh_connectivity(self) -> pulumi.Output[Optional['outputs.MigrationJobReverseSshConnectivity']]:
1689
+ """
1690
+ The details of the VPC network that the source database is located in.
1691
+ Structure is documented below.
1692
+ """
1693
+ return pulumi.get(self, "reverse_ssh_connectivity")
1694
+
1695
+ @property
1696
+ @pulumi.getter
1697
+ def source(self) -> pulumi.Output[str]:
1698
+ """
1699
+ The name of the source connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{sourceConnectionProfile}.
1700
+ """
1701
+ return pulumi.get(self, "source")
1702
+
1703
+ @property
1704
+ @pulumi.getter
1705
+ def state(self) -> pulumi.Output[str]:
1706
+ """
1707
+ The current migration job state.
1708
+ """
1709
+ return pulumi.get(self, "state")
1710
+
1711
+ @property
1712
+ @pulumi.getter(name="staticIpConnectivity")
1713
+ def static_ip_connectivity(self) -> pulumi.Output[Optional['outputs.MigrationJobStaticIpConnectivity']]:
1714
+ """
1715
+ If set to an empty object (`{}`), the source database will allow incoming
1716
+ connections from the public IP of the destination database.
1717
+ You can retrieve the public IP of the Cloud SQL instance from the
1718
+ Cloud SQL console or using Cloud SQL APIs.
1719
+ """
1720
+ return pulumi.get(self, "static_ip_connectivity")
1721
+
1722
+ @property
1723
+ @pulumi.getter
1724
+ def type(self) -> pulumi.Output[str]:
1725
+ """
1726
+ The type of the migration job.
1727
+ Possible values are: `ONE_TIME`, `CONTINUOUS`.
1728
+ """
1729
+ return pulumi.get(self, "type")
1730
+
1731
+ @property
1732
+ @pulumi.getter(name="vpcPeeringConnectivity")
1733
+ def vpc_peering_connectivity(self) -> pulumi.Output[Optional['outputs.MigrationJobVpcPeeringConnectivity']]:
1734
+ """
1735
+ The details of the VPC network that the source database is located in.
1736
+ Structure is documented below.
1737
+ """
1738
+ return pulumi.get(self, "vpc_peering_connectivity")
1739
+