Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.2 (#71)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.63.2
docs: add generated snippets

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: googleapis/googleapis-gen@bf4e86b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 11, 2022
1 parent c2fe4bd commit 8e7688d
Show file tree
Hide file tree
Showing 49 changed files with 3,906 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,24 @@ async def launch_flex_template(
) -> templates.LaunchFlexTemplateResponse:
r"""Launch a job with a FlexTemplate.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_launch_flex_template():
# Create a client
client = dataflow_v1beta3.FlexTemplatesServiceClient()
# Initialize request argument(s)
request = dataflow_v1beta3.LaunchFlexTemplateRequest(
)
# Make the request
response = client.launch_flex_template(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.LaunchFlexTemplateRequest, dict]):
The request object. A request to launch a Cloud Dataflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,25 @@ def launch_flex_template(
) -> templates.LaunchFlexTemplateResponse:
r"""Launch a job with a FlexTemplate.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_launch_flex_template():
# Create a client
client = dataflow_v1beta3.FlexTemplatesServiceClient()
# Initialize request argument(s)
request = dataflow_v1beta3.LaunchFlexTemplateRequest(
)
# Make the request
response = client.launch_flex_template(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.LaunchFlexTemplateRequest, dict]):
The request object. A request to launch a Cloud Dataflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,25 @@ async def create_job(
Using ``projects.jobs.create`` is not recommended, as your job
will always start in ``us-central1``.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_create_job():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
# Initialize request argument(s)
request = dataflow_v1beta3.CreateJobRequest(
)
# Make the request
response = client.create_job(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.CreateJobRequest, dict]):
The request object. Request to create a Cloud Dataflow
Expand Down Expand Up @@ -268,6 +287,25 @@ async def get_job(
Using ``projects.jobs.get`` is not recommended, as you can only
get the state of jobs that are running in ``us-central1``.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_get_job():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
# Initialize request argument(s)
request = dataflow_v1beta3.GetJobRequest(
)
# Make the request
response = client.get_job(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.GetJobRequest, dict]):
The request object. Request to get the state of a Cloud
Expand Down Expand Up @@ -318,6 +356,25 @@ async def update_job(
only update the state of jobs that are running in
``us-central1``.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_update_job():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
# Initialize request argument(s)
request = dataflow_v1beta3.UpdateJobRequest(
)
# Make the request
response = client.update_job(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.UpdateJobRequest, dict]):
The request object. Request to update a Cloud Dataflow
Expand Down Expand Up @@ -369,6 +426,26 @@ async def list_jobs(
not recommended, as you can only get the list of jobs that are
running in ``us-central1``.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_list_jobs():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
# Initialize request argument(s)
request = dataflow_v1beta3.ListJobsRequest(
)
# Make the request
page_result = client.list_jobs(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.ListJobsRequest, dict]):
The request object. Request to list Cloud Dataflow jobs.
Expand Down Expand Up @@ -427,6 +504,25 @@ async def aggregated_list_jobs(
) -> pagers.AggregatedListJobsAsyncPager:
r"""List the jobs of a project across all regions.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_aggregated_list_jobs():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
# Initialize request argument(s)
request = dataflow_v1beta3.ListJobsRequest(
)
# Make the request
page_result = client.aggregated_list_jobs(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.ListJobsRequest, dict]):
The request object. Request to list Cloud Dataflow jobs.
Expand Down Expand Up @@ -486,6 +582,25 @@ async def check_active_jobs(
r"""Check for existence of active jobs in the given
project across all regions.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_check_active_jobs():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
# Initialize request argument(s)
request = dataflow_v1beta3.CheckActiveJobsRequest(
)
# Make the request
response = client.check_active_jobs(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.CheckActiveJobsRequest, dict]):
The request object. Request to check is active jobs
Expand Down Expand Up @@ -527,6 +642,24 @@ async def snapshot_job(
) -> snapshots.Snapshot:
r"""Snapshot the state of a streaming job.
.. code-block::
from google.cloud import dataflow_v1beta3
def sample_snapshot_job():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
# Initialize request argument(s)
request = dataflow_v1beta3.SnapshotJobRequest(
)
# Make the request
response = client.snapshot_job(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.dataflow_v1beta3.types.SnapshotJobRequest, dict]):
The request object. Request to create a snapshot of a
Expand Down
Loading

0 comments on commit 8e7688d

Please sign in to comment.