Class: Google::Apis::WorkflowexecutionsV1beta::WorkflowExecutionsService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
generated/google/apis/workflowexecutions_v1beta/service.rb

Overview

Workflow Executions API

Execute workflows created with Workflows API.

Examples:

require 'google/apis/workflowexecutions_v1beta'

Workflowexecutions = Google::Apis::WorkflowexecutionsV1beta # Alias the module
service = Workflowexecutions::WorkflowExecutionsService.new

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWorkflowExecutionsService

Returns a new instance of WorkflowExecutionsService.



45
46
47
48
# File 'generated/google/apis/workflowexecutions_v1beta/service.rb', line 45

def initialize
  super('https://workflowexecutions.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/workflowexecutions_v1beta/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



43
44
45
# File 'generated/google/apis/workflowexecutions_v1beta/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#cancel_execution(name, cancel_execution_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkflowexecutionsV1beta::Execution

Cancels an execution of the given name.

Parameters:

  • name (String)

    Required. Name of the execution to be cancelled. Format: projects/project/ locations/location/workflows/workflow/executions/execution

  • cancel_execution_request_object (Google::Apis::WorkflowexecutionsV1beta::CancelExecutionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



72
73
74
75
76
77
78
79
80
81
82
# File 'generated/google/apis/workflowexecutions_v1beta/service.rb', line 72

def cancel_execution(name, cancel_execution_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta/{+name}:cancel', options)
  command.request_representation = Google::Apis::WorkflowexecutionsV1beta::CancelExecutionRequest::Representation
  command.request_object = cancel_execution_request_object
  command.response_representation = Google::Apis::WorkflowexecutionsV1beta::Execution::Representation
  command.response_class = Google::Apis::WorkflowexecutionsV1beta::Execution
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_project_location_workflow_execution(parent, execution_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkflowexecutionsV1beta::Execution

Creates a new execution using the latest revision of the given workflow.

Parameters:

  • parent (String)

    Required. Name of the workflow for which an execution should be created. Format: projects/project/locations/location/workflows/workflow The latest revision of the workflow will be used.

  • execution_object (Google::Apis::WorkflowexecutionsV1beta::Execution) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



107
108
109
110
111
112
113
114
115
116
117
# File 'generated/google/apis/workflowexecutions_v1beta/service.rb', line 107

def create_project_location_workflow_execution(parent, execution_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta/{+parent}/executions', options)
  command.request_representation = Google::Apis::WorkflowexecutionsV1beta::Execution::Representation
  command.request_object = execution_object
  command.response_representation = Google::Apis::WorkflowexecutionsV1beta::Execution::Representation
  command.response_class = Google::Apis::WorkflowexecutionsV1beta::Execution
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_project_location_workflow_execution(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkflowexecutionsV1beta::Execution

Returns an execution of the given name.

Parameters:

  • name (String)

    Required. Name of the execution to be retrieved. Format: projects/project/ locations/location/workflows/workflow/executions/execution

  • view (String) (defaults to: nil)

    Optional. A view defining which fields should be filled in the returned execution. The API will default to the FULL view.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



143
144
145
146
147
148
149
150
151
152
# File 'generated/google/apis/workflowexecutions_v1beta/service.rb', line 143

def get_project_location_workflow_execution(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta/{+name}', options)
  command.response_representation = Google::Apis::WorkflowexecutionsV1beta::Execution::Representation
  command.response_class = Google::Apis::WorkflowexecutionsV1beta::Execution
  command.params['name'] = name unless name.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_project_location_workflow_executions(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkflowexecutionsV1beta::ListExecutionsResponse

Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).

Parameters:

  • parent (String)

    Required. Name of the workflow for which the executions should be listed. Format: projects/project/locations/location/workflows/workflow

  • page_size (Fixnum) (defaults to: nil)

    Maximum number of executions to return per call. Max supported value depends on the selected Execution view: it's 10000 for BASIC and 100 for FULL. The default value used if the field is not specified is 100, regardless of the selected view. Values greater than the max value will be coerced down to it.

  • page_token (String) (defaults to: nil)

    A page token, received from a previous ListExecutions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListExecutions must match the call that provided the page token.

  • view (String) (defaults to: nil)

    Optional. A view defining which fields should be filled in the returned executions. The API will default to the BASIC view.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



189
190
191
192
193
194
195
196
197
198
199
200
# File 'generated/google/apis/workflowexecutions_v1beta/service.rb', line 189

def list_project_location_workflow_executions(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta/{+parent}/executions', options)
  command.response_representation = Google::Apis::WorkflowexecutionsV1beta::ListExecutionsResponse::Representation
  command.response_class = Google::Apis::WorkflowexecutionsV1beta::ListExecutionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end