docs(components): update WaitGcpResourcesOp component documentation

PiperOrigin-RevId: 540143366
This commit is contained in:
Connor McCarthy 2023-06-13 19:45:09 -07:00 committed by Google Cloud Pipeline Components maintainers
parent 3a69d2b43d
commit 76c6af73b5
1 changed files with 18 additions and 18 deletions

View File

@ -24,31 +24,31 @@ def wait_gcp_resources(
output__gcp_resources: OutputPath(str),
):
# fmt: off
"""Receives a GCP Resource, polling the resource status and waits for it to
finish. Currently this component only support waiting on a DataflowJob
resource.
"""Waits for the completion of one or more GCP resources by polling for completion statuses.
To use this component, first create a component that outputs a JSON formatted gcp_resources proto, then pass it to the wait component.
Currently this component only supports waiting on a `DataflowJob <https://cloud.google.com/config-connector/docs/reference/resource-docs/dataflow/dataflowjob>`_ resource.
For details on how to create a Json serialized gcp_resources proto as output, see
https://github.com/kubeflow/pipelines/tree/master/components/google-cloud/google_cloud_pipeline_components/proto
To use this component, first create a component that outputs a ``gcp_resources`` proto as JSON, then pass it to this component's ``gcp_resources`` parameter.
See `details <https://github.com/kubeflow/pipelines/tree/master/components/google-cloud/google_cloud_pipeline_components/proto>`_ on how to create a ``gcp_resources`` proto as a component output.
Examples:
::
dataflow_python_op = gcpc.v1.dataflow.LaunchPythonOp(
python_file_path=...
)
dataflow_wait_op = WaitGcpResourcesOp(
gcp_resources=dataflow_python_op.outputs["gcp_resources"]
)
Args:
gcp_resources: Serialized JSON of gcp_resources proto, indicating the resource to wait on by this component
For details, see https://github.com/kubeflow/pipelines/tree/master/components/google-cloud/google_cloud_pipeline_components/proto
gcp_resources: Serialized JSON of ``gcp_resources`` proto, indicating the resource(s) this component should wait on.
Returns:
gcp_resources: The final result of the gcp resource, including the error information, if exists.
gcp_resources: The ``gcp_resource``, including any relevant error information.
Examples::
dataflow_python_op = gcpc.v1.dataflow.LaunchPythonOp(
python_file_path = ...
)
dataflow_wait_op = gcpc.v1.wait_gcp_resources.WaitGcp_ResourcesOp(
gcp_resources = dataflow_python_op.outputs["gcp_resources"]
)
"""
# fmt: on
return dsl.ContainerSpec(