REST Resource: projects.locations.workflows.subtasks

Resource: MigrationSubtask

A subtask for a migration which carries details about the configuration of the subtask. The content of the details should not matter to the end user, but is a contract between the subtask creator and subtask worker.

JSON representation
{
  "name": string,
  "taskId": string,
  "type": string,
  "state": enum (State),
  "processingError": {
    object (ErrorInfo)
  },
  "resourceErrorDetails": [
    {
      object (ResourceErrorDetail)
    }
  ],
  "resourceErrorCount": integer,
  "createTime": string,
  "lastUpdateTime": string,
  "metrics": [
    {
      object (TimeSeries)
    }
  ]
}
Fields
name

string

Output only. Immutable. The resource name for the migration subtask. The ID is server-generated.

Example: projects/123/locations/us/workflows/345/subtasks/678

taskId

string

The unique ID of the task to which this subtask belongs.

type

string

The type of the Subtask. The migration service does not check whether this is a known type. It is up to the task creator (i.e. orchestrator or worker) to ensure it only creates subtasks for which there are compatible workers polling for Subtasks.

state

enum (State)

Output only. The current state of the subtask.

processingError

object (ErrorInfo)

Output only. An explanation that may be populated when the task is in FAILED state.

resourceErrorDetails[]

object (ResourceErrorDetail)

Output only. Provides details to errors and issues encountered while processing the subtask. Presence of error details does not mean that the subtask failed.

resourceErrorCount

integer

The number or resources with errors. Note: This is not the total number of errors as each resource can have more than one error. This is used to indicate truncation by having a resourceErrorCount that is higher than the size of resourceErrorDetails.

createTime

string (Timestamp format)

Time when the subtask was created.

lastUpdateTime

string (Timestamp format)

Time when the subtask was last updated.

metrics[]

object (TimeSeries)

The metrics for the subtask.

State

Possible states of a migration subtask.

Enums
STATE_UNSPECIFIED The state is unspecified.
ACTIVE The subtask is ready, i.e. it is ready for execution.
RUNNING The subtask is running, i.e. it is assigned to a worker for execution.
SUCCEEDED The subtask finished successfully.
FAILED The subtask finished unsuccessfully.
PAUSED The subtask is paused, i.e., it will not be scheduled. If it was already assigned,it might still finish but no new lease renewals will be granted.

ResourceErrorDetail

Provides details for errors and the corresponding resources.

JSON representation
{
  "resourceInfo": {
    object (ResourceInfo)
  },
  "errorDetails": [
    {
      object (ErrorDetail)
    }
  ],
  "errorCount": integer
}
Fields
resourceInfo

object (ResourceInfo)

Required. Information about the resource where the error is located.

errorDetails[]

object (ErrorDetail)

Required. The error details for the resource.

errorCount

integer

Required. How many errors there are in total for the resource. Truncation can be indicated by having an errorCount that is higher than the size of errorDetails.

ErrorDetail

Provides details for errors, e.g. issues that where encountered when processing a subtask.

JSON representation
{
  "location": {
    object (ErrorLocation)
  },
  "errorInfo": {
    object (ErrorInfo)
  }
}
Fields
location

object (ErrorLocation)

Optional. The exact location within the resource (if applicable).

errorInfo

object (ErrorInfo)

Required. Describes the cause of the error with structured detail.

ErrorLocation

Holds information about where the error is located.

JSON representation
{
  "line": integer,
  "column": integer
}
Fields
line

integer

Optional. If applicable, denotes the line where the error occurred. A zero value means that there is no line information.

column

integer

Optional. If applicable, denotes the column where the error occurred. A zero value means that there is no columns information.

TimeSeries

The metrics object for a SubTask.

JSON representation
{
  "metric": string,
  "valueType": enum (ValueType),
  "metricKind": enum (MetricKind),
  "points": [
    {
      object (Point)
    }
  ]
}
Fields
metric

string

Required. The name of the metric.

If the metric is not known by the service yet, it will be auto-created.

valueType

enum (ValueType)

Required. The value type of the time series.

metricKind

enum (MetricKind)

Optional. The metric kind of the time series.

If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE.

points[]

object (Point)

Required. The data points of this time series. When listing time series, points are returned in reverse time order.

When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION.

Point

A single data point in a time series.

JSON representation
{
  "interval": {
    object (TimeInterval)
  },
  "value": {
    object (TypedValue)
  }
}
Fields
interval

object (TimeInterval)

The time interval to which the data point applies. For GAUGE metrics, the start time does not need to be supplied, but if it is supplied, it must equal the end time. For DELTA metrics, the start and end time should specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For CUMULATIVE metrics, the start and end time should specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points.

value

object (TypedValue)

The value of the data point.

TimeInterval

A time interval extending just after a start time through an end time. If the start time is the same as the end time, then the interval represents a single point in time.

JSON representation
{
  "startTime": string,
  "endTime": string
}
Fields
startTime

string (Timestamp format)

Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.

endTime

string (Timestamp format)

Required. The end of the time interval.

TypedValue

A single strongly-typed value.

JSON representation
{

  // Union field value can be only one of the following:
  "boolValue": boolean,
  "int64Value": string,
  "doubleValue": number,
  "stringValue": string,
  "distributionValue": {
    object (Distribution)
  }
  // End of list of possible types for union field value.
}
Fields
Union field value. The typed value field. value can be only one of the following:
boolValue

boolean

A Boolean value: true or false.

int64Value

string (int64 format)

A 64-bit integer. Its range is approximately +/-9.2x10^18.

doubleValue

number

A 64-bit double-precision floating-point number. Its magnitude is approximately +/-10^(+/-300) and it has 16 significant digits of precision.

stringValue

string

A variable-length string value.

distributionValue

object (Distribution)

A distribution value.

Methods

get

Gets a previously created migration subtask.

list

Lists previously created migration subtasks.