Skip to main content

work_requests

Creates, updates, deletes, gets or lists a work_requests resource.

Overview​

Namework_requests
TypeResource
Idoci.streaming.work_requests

Fields​

The following fields are returned by SELECT queries:

The work request was retrieved.

NameDatatypeDescription
idstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the work request.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request.
operationTypestringThe asynchronous operation tracked by this work request. (CREATE_STREAM, UPDATE_STREAM, DELETE_STREAM, CREATE_STREAM_POOL, UPDATE_STREAM_POOL, DELETE_STREAM_POOL, CREATE_CONNECT_HARNESS, UPDATE_CONNECT_HARNESS, DELETE_CONNECT_HARNESS) (x-obmcs-top-level-enum: #/definitions/OperationType)
percentCompletenumber (float)Shows the progress of the operation tracked by the work request, as a percentage of the total work that must be performed.
resourcesarrayThe resources that are affected by the work request.
statusstringThe status of the work request. (ACCEPTED, IN_PROGRESS, WAITING, NEEDS_ATTENTION, FAILED, SUCCEEDED, CANCELING, CANCELED) (x-obmcs-top-level-enum: #/definitions/OperationStatus)
timeAcceptedstring (date-time)The date and time the request was created, as described in [RFC 3339](https:​//tools.ietf.org/rfc/rfc3339), section 14.29.
timeFinishedstring (date-time)The date and time the object was finished, as described in [RFC 3339](https:​//tools.ietf.org/rfc/rfc3339).
timeStartedstring (date-time)The date and time the request was started, as described in [RFC 3339](https:​//tools.ietf.org/rfc/rfc3339), section 14.29.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectworkRequestId, regionopc-request-idGets the details of a work request.
listselectregionworkRequestId, compartmentId, page, limit, sortOrder, sortBy, resourceId, opc-request-idLists the work requests in a compartment.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
workRequestIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request.
compartmentIdstringThe OCID of the compartment. Is exclusive with the streamPoolId parameter. One of them is required.
limitintegerThe maximum number of items to return. The value must be between 1 and 50. The default is 10.
opc-request-idstringThe unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
pagestringThe page at which to start retrieving results.
resourceIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request.
sortBystringThe field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.
sortOrderstringThe sort order to use, either 'asc' or 'desc'.
workRequestIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request.

SELECT examples​

Gets the details of a work request.

SELECT
id,
compartmentId,
operationType,
percentComplete,
resources,
status,
timeAccepted,
timeFinished,
timeStarted
FROM oci.streaming.work_requests
WHERE workRequestId = '{{ workRequestId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;