@@ -227,6 +227,25 @@ async def create_migration_workflow(
227
227
) -> migration_entities .MigrationWorkflow :
228
228
r"""Creates a migration workflow.
229
229
230
+ .. code-block::
231
+
232
+ from google.cloud import bigquery_migration_v2alpha
233
+
234
+ def sample_create_migration_workflow():
235
+ # Create a client
236
+ client = bigquery_migration_v2alpha.MigrationServiceClient()
237
+
238
+ # Initialize request argument(s)
239
+ request = bigquery_migration_v2alpha.CreateMigrationWorkflowRequest(
240
+ parent="parent_value",
241
+ )
242
+
243
+ # Make the request
244
+ response = client.create_migration_workflow(request=request)
245
+
246
+ # Handle the response
247
+ print(response)
248
+
230
249
Args:
231
250
request (Union[google.cloud.bigquery_migration_v2alpha.types.CreateMigrationWorkflowRequest, dict]):
232
251
The request object. Request to create a migration
@@ -309,6 +328,25 @@ async def get_migration_workflow(
309
328
) -> migration_entities .MigrationWorkflow :
310
329
r"""Gets a previously created migration workflow.
311
330
331
+ .. code-block::
332
+
333
+ from google.cloud import bigquery_migration_v2alpha
334
+
335
+ def sample_get_migration_workflow():
336
+ # Create a client
337
+ client = bigquery_migration_v2alpha.MigrationServiceClient()
338
+
339
+ # Initialize request argument(s)
340
+ request = bigquery_migration_v2alpha.GetMigrationWorkflowRequest(
341
+ name="name_value",
342
+ )
343
+
344
+ # Make the request
345
+ response = client.get_migration_workflow(request=request)
346
+
347
+ # Handle the response
348
+ print(response)
349
+
312
350
Args:
313
351
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationWorkflowRequest, dict]):
314
352
The request object. A request to get a previously
@@ -391,6 +429,26 @@ async def list_migration_workflows(
391
429
) -> pagers .ListMigrationWorkflowsAsyncPager :
392
430
r"""Lists previously created migration workflow.
393
431
432
+ .. code-block::
433
+
434
+ from google.cloud import bigquery_migration_v2alpha
435
+
436
+ def sample_list_migration_workflows():
437
+ # Create a client
438
+ client = bigquery_migration_v2alpha.MigrationServiceClient()
439
+
440
+ # Initialize request argument(s)
441
+ request = bigquery_migration_v2alpha.ListMigrationWorkflowsRequest(
442
+ parent="parent_value",
443
+ )
444
+
445
+ # Make the request
446
+ page_result = client.list_migration_workflows(request=request)
447
+
448
+ # Handle the response
449
+ for response in page_result:
450
+ print(response)
451
+
394
452
Args:
395
453
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationWorkflowsRequest, dict]):
396
454
The request object. A request to list previously created
@@ -480,6 +538,22 @@ async def delete_migration_workflow(
480
538
) -> None :
481
539
r"""Deletes a migration workflow by name.
482
540
541
+ .. code-block::
542
+
543
+ from google.cloud import bigquery_migration_v2alpha
544
+
545
+ def sample_delete_migration_workflow():
546
+ # Create a client
547
+ client = bigquery_migration_v2alpha.MigrationServiceClient()
548
+
549
+ # Initialize request argument(s)
550
+ request = bigquery_migration_v2alpha.DeleteMigrationWorkflowRequest(
551
+ name="name_value",
552
+ )
553
+
554
+ # Make the request
555
+ client.delete_migration_workflow(request=request)
556
+
483
557
Args:
484
558
request (Union[google.cloud.bigquery_migration_v2alpha.types.DeleteMigrationWorkflowRequest, dict]):
485
559
The request object. A request to delete a previously
@@ -549,6 +623,23 @@ async def start_migration_workflow(
549
623
signaled if the state is anything other than DRAFT or
550
624
RUNNING.
551
625
626
+
627
+ .. code-block::
628
+
629
+ from google.cloud import bigquery_migration_v2alpha
630
+
631
+ def sample_start_migration_workflow():
632
+ # Create a client
633
+ client = bigquery_migration_v2alpha.MigrationServiceClient()
634
+
635
+ # Initialize request argument(s)
636
+ request = bigquery_migration_v2alpha.StartMigrationWorkflowRequest(
637
+ name="name_value",
638
+ )
639
+
640
+ # Make the request
641
+ client.start_migration_workflow(request=request)
642
+
552
643
Args:
553
644
request (Union[google.cloud.bigquery_migration_v2alpha.types.StartMigrationWorkflowRequest, dict]):
554
645
The request object. A request to start a previously
@@ -623,6 +714,25 @@ async def get_migration_subtask(
623
714
) -> migration_entities .MigrationSubtask :
624
715
r"""Gets a previously created migration subtask.
625
716
717
+ .. code-block::
718
+
719
+ from google.cloud import bigquery_migration_v2alpha
720
+
721
+ def sample_get_migration_subtask():
722
+ # Create a client
723
+ client = bigquery_migration_v2alpha.MigrationServiceClient()
724
+
725
+ # Initialize request argument(s)
726
+ request = bigquery_migration_v2alpha.GetMigrationSubtaskRequest(
727
+ name="name_value",
728
+ )
729
+
730
+ # Make the request
731
+ response = client.get_migration_subtask(request=request)
732
+
733
+ # Handle the response
734
+ print(response)
735
+
626
736
Args:
627
737
request (Union[google.cloud.bigquery_migration_v2alpha.types.GetMigrationSubtaskRequest, dict]):
628
738
The request object. A request to get a previously
@@ -708,6 +818,26 @@ async def list_migration_subtasks(
708
818
) -> pagers .ListMigrationSubtasksAsyncPager :
709
819
r"""Lists previously created migration subtasks.
710
820
821
+ .. code-block::
822
+
823
+ from google.cloud import bigquery_migration_v2alpha
824
+
825
+ def sample_list_migration_subtasks():
826
+ # Create a client
827
+ client = bigquery_migration_v2alpha.MigrationServiceClient()
828
+
829
+ # Initialize request argument(s)
830
+ request = bigquery_migration_v2alpha.ListMigrationSubtasksRequest(
831
+ parent="parent_value",
832
+ )
833
+
834
+ # Make the request
835
+ page_result = client.list_migration_subtasks(request=request)
836
+
837
+ # Handle the response
838
+ for response in page_result:
839
+ print(response)
840
+
711
841
Args:
712
842
request (Union[google.cloud.bigquery_migration_v2alpha.types.ListMigrationSubtasksRequest, dict]):
713
843
The request object. A request to list previously created
0 commit comments