@@ -112,6 +112,22 @@ def _get_default_mtls_endpoint(api_endpoint):
112
112
DEFAULT_ENDPOINT
113
113
)
114
114
115
+ @classmethod
116
+ def from_service_account_info (cls , info : dict , * args , ** kwargs ):
117
+ """Creates an instance of this client using the provided credentials info.
118
+
119
+ Args:
120
+ info (dict): The service account private key info.
121
+ args: Additional arguments to pass to the constructor.
122
+ kwargs: Additional arguments to pass to the constructor.
123
+
124
+ Returns:
125
+ ExecutionsClient: The constructed client.
126
+ """
127
+ credentials = service_account .Credentials .from_service_account_info (info )
128
+ kwargs ["credentials" ] = credentials
129
+ return cls (* args , ** kwargs )
130
+
115
131
@classmethod
116
132
def from_service_account_file (cls , filename : str , * args , ** kwargs ):
117
133
"""Creates an instance of this client using the provided credentials
@@ -124,7 +140,7 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):
124
140
kwargs: Additional arguments to pass to the constructor.
125
141
126
142
Returns:
127
- {@api.name} : The constructed client.
143
+ ExecutionsClient : The constructed client.
128
144
"""
129
145
credentials = service_account .Credentials .from_service_account_file (filename )
130
146
kwargs ["credentials" ] = credentials
@@ -250,10 +266,10 @@ def __init__(
250
266
credentials identify the application to the service; if none
251
267
are specified, the client will attempt to ascertain the
252
268
credentials from the environment.
253
- transport (Union[str, ~. ExecutionsTransport]): The
269
+ transport (Union[str, ExecutionsTransport]): The
254
270
transport to use. If set to None, a transport is chosen
255
271
automatically.
256
- client_options (client_options_lib .ClientOptions): Custom options for the
272
+ client_options (google.api_core.client_options .ClientOptions): Custom options for the
257
273
client. It won't take effect if a ``transport`` instance is provided.
258
274
(1) The ``api_endpoint`` property can be used to override the
259
275
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -367,15 +383,16 @@ def list_executions(
367
383
first).
368
384
369
385
Args:
370
- request (:class:`~.executions. ListExecutionsRequest` ):
386
+ request (google.cloud.workflows.executions_v1beta.types. ListExecutionsRequest):
371
387
The request object. Request for the
372
388
[ListExecutions][google.cloud.workflows.executions.v1beta.Executions.ListExecutions]
373
389
method.
374
- parent (:class:` str` ):
390
+ parent (str):
375
391
Required. Name of the workflow for
376
392
which the executions should be listed.
377
393
Format:
378
394
projects/{project}/locations/{location}/workflows/{workflow}
395
+
379
396
This corresponds to the ``parent`` field
380
397
on the ``request`` instance; if ``request`` is provided, this
381
398
should not be set.
@@ -387,10 +404,10 @@ def list_executions(
387
404
sent along with the request as metadata.
388
405
389
406
Returns:
390
- ~ .pagers.ListExecutionsPager:
407
+ google.cloud.workflows.executions_v1beta.services.executions .pagers.ListExecutionsPager:
391
408
Response for the
392
- [ListExecutions][google.cloud.workflows.executions.v1beta.Executions.ListExecutions]
393
- method.
409
+ [ListExecutions][google.cloud.workflows.executions.v1beta.Executions.ListExecutions]
410
+ method.
394
411
395
412
Iterating over this object will yield results and
396
413
resolve additional pages automatically.
@@ -455,21 +472,22 @@ def create_execution(
455
472
the given workflow.
456
473
457
474
Args:
458
- request (:class:`~.executions. CreateExecutionRequest` ):
475
+ request (google.cloud.workflows.executions_v1beta.types. CreateExecutionRequest):
459
476
The request object. Request for the
460
477
[CreateExecution][google.cloud.workflows.executions.v1beta.Executions.CreateExecution]
461
478
method.
462
- parent (:class:` str` ):
479
+ parent (str):
463
480
Required. Name of the workflow for
464
481
which an execution should be created.
465
482
Format:
466
483
projects/{project}/locations/{location}/workflows/{workflow}
467
484
The latest revision of the workflow will
468
485
be used.
486
+
469
487
This corresponds to the ``parent`` field
470
488
on the ``request`` instance; if ``request`` is provided, this
471
489
should not be set.
472
- execution (:class:`~.executions. Execution` ):
490
+ execution (google.cloud.workflows.executions_v1beta.types. Execution):
473
491
Required. Execution to be created.
474
492
This corresponds to the ``execution`` field
475
493
on the ``request`` instance; if ``request`` is provided, this
@@ -482,7 +500,7 @@ def create_execution(
482
500
sent along with the request as metadata.
483
501
484
502
Returns:
485
- ~.executions .Execution:
503
+ google.cloud.workflows.executions_v1beta.types .Execution:
486
504
A running instance of a
487
505
[Workflow][google.cloud.workflows.v1beta.Workflow].
488
506
@@ -540,14 +558,15 @@ def get_execution(
540
558
r"""Returns an execution of the given name.
541
559
542
560
Args:
543
- request (:class:`~.executions. GetExecutionRequest` ):
561
+ request (google.cloud.workflows.executions_v1beta.types. GetExecutionRequest):
544
562
The request object. Request for the
545
563
[GetExecution][google.cloud.workflows.executions.v1beta.Executions.GetExecution]
546
564
method.
547
- name (:class:` str` ):
565
+ name (str):
548
566
Required. Name of the execution to be
549
567
retrieved. Format:
550
568
projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
569
+
551
570
This corresponds to the ``name`` field
552
571
on the ``request`` instance; if ``request`` is provided, this
553
572
should not be set.
@@ -559,7 +578,7 @@ def get_execution(
559
578
sent along with the request as metadata.
560
579
561
580
Returns:
562
- ~.executions .Execution:
581
+ google.cloud.workflows.executions_v1beta.types .Execution:
563
582
A running instance of a
564
583
[Workflow][google.cloud.workflows.v1beta.Workflow].
565
584
@@ -615,14 +634,15 @@ def cancel_execution(
615
634
r"""Cancels an execution of the given name.
616
635
617
636
Args:
618
- request (:class:`~.executions. CancelExecutionRequest` ):
637
+ request (google.cloud.workflows.executions_v1beta.types. CancelExecutionRequest):
619
638
The request object. Request for the
620
639
[CancelExecution][google.cloud.workflows.executions.v1beta.Executions.CancelExecution]
621
640
method.
622
- name (:class:` str` ):
641
+ name (str):
623
642
Required. Name of the execution to be
624
643
cancelled. Format:
625
644
projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
645
+
626
646
This corresponds to the ``name`` field
627
647
on the ``request`` instance; if ``request`` is provided, this
628
648
should not be set.
@@ -634,7 +654,7 @@ def cancel_execution(
634
654
sent along with the request as metadata.
635
655
636
656
Returns:
637
- ~.executions .Execution:
657
+ google.cloud.workflows.executions_v1beta.types .Execution:
638
658
A running instance of a
639
659
[Workflow][google.cloud.workflows.v1beta.Workflow].
640
660
0 commit comments