Reference documentation and code samples for the Workflows V1 API class Google::Cloud::Workflows::V1::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::V1::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 returns a [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::V1::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::V1::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::V1::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::V1::Workflow
def get_workflow(name: nil, revision_id: nil) -> ::Google::Cloud::Workflows::V1::Workflow
Gets details of a single workflow.
def get_workflow(request, options = nil) -> ::Google::Cloud::Workflows::V1::Workflow
get_workflow
via a request object, either of type
GetWorkflowRequest or an equivalent Hash.
- request (::Google::Cloud::Workflows::V1::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, revision_id: nil) -> ::Google::Cloud::Workflows::V1::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 for which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}
- revision_id (::String) — Optional. The revision of the workflow to retrieve. If the revision_id is empty, the latest revision is retrieved. The format is "000001-a4d", where the first six characters define the zero-padded decimal revision number. They are followed by a hyphen and three hexadecimal characters.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workflows::V1::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::V1::Workflows::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| config.timeout = 10.0 end
#list_workflows
def list_workflows(request, options = nil) -> ::Google::Cloud::Workflows::V1::ListWorkflowsResponse
def list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Workflows::V1::ListWorkflowsResponse
Lists workflows in a given project and location. The default order is not specified.
def list_workflows(request, options = nil) -> ::Google::Cloud::Workflows::V1::ListWorkflowsResponse
list_workflows
via a request object, either of type
ListWorkflowsRequest or an equivalent Hash.
- request (::Google::Cloud::Workflows::V1::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::V1::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 might return fewer than this value even if not at the end of the collection. If a value is not specified, a default value of 500 is used. The maximum permitted value is 1000 and values greater than 1000 are 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 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 are returned in an unspecified order.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Workflows::V1::ListWorkflowsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#operations_client
def operations_client() -> ::Google::Cloud::Workflows::V1::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 might be created as a result of a successful update operation. In that case, the new revision is 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::V1::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::V1::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.