lib/google/apis/run_v2/service.rb in google-apis-run_v2-0.45.0 vs lib/google/apis/run_v2/service.rb in google-apis-run_v2-0.46.0

- old
+ new

@@ -398,9 +398,44 @@ command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + # Cancels an Execution. + # @param [String] name + # Required. The name of the Execution to cancel. Format: projects/`project`/ + # locations/`location`/jobs/`job`/executions/`execution`, where `project` can be + # project id or number. + # @param [Google::Apis::RunV2::GoogleCloudRunV2CancelExecutionRequest] google_cloud_run_v2_cancel_execution_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::RunV2::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::RunV2::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_project_location_job_execution(name, google_cloud_run_v2_cancel_execution_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+name}:cancel', options) + command.request_representation = Google::Apis::RunV2::GoogleCloudRunV2CancelExecutionRequest::Representation + command.request_object = google_cloud_run_v2_cancel_execution_request_object + command.response_representation = Google::Apis::RunV2::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::RunV2::GoogleLongrunningOperation + 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 + # Deletes an Execution. # @param [String] name # Required. The name of the Execution to delete. Format: projects/`project`/ # locations/`location`/jobs/`job`/executions/`execution`, where `project` can be # project id or number.