Reference documentation and code samples for the Workflows V1beta API class Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.
REST client for the Workflows service.
Workflows is used to deploy and execute workflow programs. Workflows makes sure the program executes reliably, despite hardware and networking interruptions.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the Workflows Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all Workflows clients ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the Workflows Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_workflow
def create_workflow(request, options = nil) -> ::Gapic::Operation
def create_workflow(parent: nil, workflow: nil, workflow_id: nil) -> ::Gapic::Operation
Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
def create_workflow(request, options = nil) -> ::Gapic::Operation
create_workflow
via a request object, either of type
CreateWorkflowRequest or an equivalent Hash.
- request (::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_workflow(parent: nil, workflow: nil, workflow_id: nil) -> ::Gapic::Operation
create_workflow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Project and location in which the workflow should be created. Format: projects/{project}/locations/{location}
- workflow (::Google::Cloud::Workflows::V1beta::Workflow, ::Hash) — Required. Workflow to be created.
-
workflow_id (::String) —
Required. The ID of the workflow to be created. It has to fulfill the following requirements:
- Must contain only letters, numbers, underscores and hyphens.
- Must start with a letter.
- Must be between 1-64 characters.
- Must end with a number or a letter.
- Must be unique within the customer project and location.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#delete_workflow
def delete_workflow(request, options = nil) -> ::Gapic::Operation
def delete_workflow(name: nil) -> ::Gapic::Operation
Deletes a workflow with the specified name. This method also cancels and deletes all running executions of the workflow.
def delete_workflow(request, options = nil) -> ::Gapic::Operation
delete_workflow
via a request object, either of type
DeleteWorkflowRequest or an equivalent Hash.
- request (::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_workflow(name: nil) -> ::Gapic::Operation
delete_workflow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the workflow to be deleted. Format: projects/{project}/locations/{location}/workflows/{workflow}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_workflow
def get_workflow(request, options = nil) -> ::Google::Cloud::Workflows::V1beta::Workflow
def get_workflow(name: nil) -> ::Google::Cloud::Workflows::V1beta::Workflow
Gets details of a single Workflow.
def get_workflow(request, options = nil) -> ::Google::Cloud::Workflows::V1beta::Workflow
get_workflow
via a request object, either of type
GetWorkflowRequest or an equivalent Hash.
- request (::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_workflow(name: nil) -> ::Google::Cloud::Workflows::V1beta::Workflow
get_workflow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- name (::String) — Required. Name of the workflow which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workflows::V1beta::Workflow)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#initialize
def initialize() { |config| ... } -> Client
Create a new Workflows REST client object.
- (config) — Configure the Workflows client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| config.timeout = 10.0 end
#list_workflows
def list_workflows(request, options = nil) -> ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse
def list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse
Lists Workflows in a given project and location. The default order is not specified.
def list_workflows(request, options = nil) -> ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse
list_workflows
via a request object, either of type
ListWorkflowsRequest or an equivalent Hash.
- request (::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse
list_workflows
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Project and location from which the workflows should be listed. Format: projects/{project}/locations/{location}
- page_size (::Integer) — Maximum number of workflows to return per call. The service may return fewer than this value. If the value is not specified, a default value of 500 will be used. The maximum permitted value is 1000 and values greater than 1000 will be coerced down to 1000.
-
page_token (::String) — A page token, received from a previous
ListWorkflows
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListWorkflows
must match the call that provided the page token. - filter (::String) — Filter to restrict results to specific workflows.
- order_by (::String) — Comma-separated list of fields that that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a " desc" suffix. If not specified, the results will be returned in an unspecified order.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#operations_client
def operations_client() -> ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Operations
Get the associated client for long-running operations.
#update_workflow
def update_workflow(request, options = nil) -> ::Gapic::Operation
def update_workflow(workflow: nil, update_mask: nil) -> ::Gapic::Operation
Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow may be created as a result of a successful update operation. In that case, such revision will be used in new workflow executions.
def update_workflow(request, options = nil) -> ::Gapic::Operation
update_workflow
via a request object, either of type
UpdateWorkflowRequest or an equivalent Hash.
- request (::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_workflow(workflow: nil, update_mask: nil) -> ::Gapic::Operation
update_workflow
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- workflow (::Google::Cloud::Workflows::V1beta::Workflow, ::Hash) — Required. Workflow to be updated.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — List of fields to be updated. If not present, the entire workflow will be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.