The API interface for managing Workflow Templates in the Dataproc API.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
WorkflowTemplateServiceClient(WorkflowTemplateServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
WorkflowTemplateServiceClient const &
|
WorkflowTemplateServiceClient(WorkflowTemplateServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
WorkflowTemplateServiceClient &&
|
WorkflowTemplateServiceClient(std::shared_ptr< WorkflowTemplateServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< WorkflowTemplateServiceConnection >
|
opts |
Options
|
Operators
operator=(WorkflowTemplateServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
WorkflowTemplateServiceClient const &
|
Returns | |
---|---|
Type | Description |
WorkflowTemplateServiceClient & |
operator=(WorkflowTemplateServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
WorkflowTemplateServiceClient &&
|
Returns | |
---|---|
Type | Description |
WorkflowTemplateServiceClient & |
Functions
CreateWorkflowTemplate(std::string const &, google::cloud::dataproc::v1::WorkflowTemplate const &, Options)
Creates new workflow template.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
template_ |
google::cloud::dataproc::v1::WorkflowTemplate const &
Required. The Dataproc workflow template to create. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::dataproc::v1::WorkflowTemplate > | the result of the RPC. The response message type (google.cloud.dataproc.v1.WorkflowTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateWorkflowTemplate(google::cloud::dataproc::v1::CreateWorkflowTemplateRequest const &, Options)
Creates new workflow template.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::CreateWorkflowTemplateRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::dataproc::v1::WorkflowTemplate > | the result of the RPC. The response message type (google.cloud.dataproc.v1.WorkflowTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetWorkflowTemplate(std::string const &, Options)
Retrieves the latest workflow template.
Can retrieve previously instantiated template by specifying optional version parameter.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
|
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::dataproc::v1::WorkflowTemplate > | the result of the RPC. The response message type (google.cloud.dataproc.v1.WorkflowTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetWorkflowTemplate(google::cloud::dataproc::v1::GetWorkflowTemplateRequest const &, Options)
Retrieves the latest workflow template.
Can retrieve previously instantiated template by specifying optional version parameter.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::GetWorkflowTemplateRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::dataproc::v1::WorkflowTemplate > | the result of the RPC. The response message type (google.cloud.dataproc.v1.WorkflowTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
InstantiateWorkflowTemplate(std::string const &, Options)
Instantiates a template and begins execution.
The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.
The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.
The Operation.metadata will be WorkflowMetadata. Also see Using WorkflowMetadata.
On successful completion, Operation.response will be Empty.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
|
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::WorkflowMetadata > > | A |
InstantiateWorkflowTemplate(std::string const &, std::map< std::string, std::string > const &, Options)
Instantiates a template and begins execution.
The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.
The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.
The Operation.metadata will be WorkflowMetadata. Also see Using WorkflowMetadata.
On successful completion, Operation.response will be Empty.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
|
parameters |
std::map< std::string, std::string > const &
Optional. Map from parameter names to values that should be used for those parameters. Values may not exceed 1000 characters. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::WorkflowMetadata > > | A |
InstantiateWorkflowTemplate(google::cloud::dataproc::v1::InstantiateWorkflowTemplateRequest const &, Options)
Instantiates a template and begins execution.
The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.
The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.
The Operation.metadata will be WorkflowMetadata. Also see Using WorkflowMetadata.
On successful completion, Operation.response will be Empty.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::InstantiateWorkflowTemplateRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::WorkflowMetadata > > | A |
InstantiateInlineWorkflowTemplate(std::string const &, google::cloud::dataproc::v1::WorkflowTemplate const &, Options)
Instantiates a template and begins execution.
This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.
The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.
The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.
The Operation.metadata will be WorkflowMetadata. Also see Using WorkflowMetadata.
On successful completion, Operation.response will be Empty.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
template_ |
google::cloud::dataproc::v1::WorkflowTemplate const &
Required. The workflow template to instantiate. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::WorkflowMetadata > > | A |
InstantiateInlineWorkflowTemplate(google::cloud::dataproc::v1::InstantiateInlineWorkflowTemplateRequest const &, Options)
Instantiates a template and begins execution.
This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.
The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.
The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.
The Operation.metadata will be WorkflowMetadata. Also see Using WorkflowMetadata.
On successful completion, Operation.response will be Empty.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::InstantiateInlineWorkflowTemplateRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::dataproc::v1::WorkflowMetadata > > | A |
UpdateWorkflowTemplate(google::cloud::dataproc::v1::WorkflowTemplate const &, Options)
Updates (replaces) workflow template.
The updated template must contain version that matches the current server version.
Parameters | |
---|---|
Name | Description |
template_ |
google::cloud::dataproc::v1::WorkflowTemplate const &
Required. The updated workflow template. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::dataproc::v1::WorkflowTemplate > | the result of the RPC. The response message type (google.cloud.dataproc.v1.WorkflowTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateWorkflowTemplate(google::cloud::dataproc::v1::UpdateWorkflowTemplateRequest const &, Options)
Updates (replaces) workflow template.
The updated template must contain version that matches the current server version.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::UpdateWorkflowTemplateRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::dataproc::v1::WorkflowTemplate > | the result of the RPC. The response message type (google.cloud.dataproc.v1.WorkflowTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListWorkflowTemplates(std::string const &, Options)
Lists workflows that match the specified filter in the request.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.
|
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::dataproc::v1::WorkflowTemplate > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListWorkflowTemplates(google::cloud::dataproc::v1::ListWorkflowTemplatesRequest, Options)
Lists workflows that match the specified filter in the request.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::ListWorkflowTemplatesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::dataproc::v1::WorkflowTemplate > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
DeleteWorkflowTemplate(std::string const &, Options)
Deletes a workflow template.
It does not cancel in-progress workflows.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.
|
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status | a |
DeleteWorkflowTemplate(google::cloud::dataproc::v1::DeleteWorkflowTemplateRequest const &, Options)
Deletes a workflow template.
It does not cancel in-progress workflows.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::dataproc::v1::DeleteWorkflowTemplateRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status | a |