Method: projects.locations.sessions.cancel

Cancels an in-progress automation session.

This RPC returns immediately and cancellation proceeds asynchronously. If the session is already finished, this RPC will have no effect.

HTTP request

POST https://devicerun.googleapis.com/v1alpha/{name=projects/*/locations/*/sessions/*}:cancel

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the session. Format: "projects/{project}/locations/{location}/sessions/{session}" It takes the form projects/{project}/locations/{location}/sessions/{session}.

Request body

The request body must be empty.

Response body

Response of the cancel session request.

If successful, the response body contains data with the following structure:

JSON representation
{
  "cancelResult": enum (CancelResult)
}
Fields
cancelResult

enum (CancelResult)

The result of the request.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CancelResult

The result of the request.

Enums
CANCEL_RESULT_UNSPECIFIED Unspecified cancel result.
SESSION_MARKED_AS_CANCELLED The session is marked as cancelled, but has not finished yet.
SESSION_FINISHED The session is finished, either by itself or by the cancel request.