work_requests
Creates, updates, deletes, gets or lists a work_requests resource.
Overview​
| Name | work_requests |
| Type | Resource |
| Id | oci.streaming.work_requests |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The work request was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the work request. |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. |
operationType | string | The 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) |
percentComplete | number (float) | Shows the progress of the operation tracked by the work request, as a percentage of the total work that must be performed. |
resources | array | The resources that are affected by the work request. |
status | string | The status of the work request. (ACCEPTED, IN_PROGRESS, WAITING, NEEDS_ATTENTION, FAILED, SUCCEEDED, CANCELING, CANCELED) (x-obmcs-top-level-enum: #/definitions/OperationStatus) |
timeAccepted | string (date-time) | The date and time the request was created, as described in [RFC 3339](https:​//tools.ietf.org/rfc/rfc3339), section 14.29. |
timeFinished | string (date-time) | The date and time the object was finished, as described in [RFC 3339](https:​//tools.ietf.org/rfc/rfc3339). |
timeStarted | string (date-time) | The date and time the request was started, as described in [RFC 3339](https:​//tools.ietf.org/rfc/rfc3339), section 14.29. |
The list of work requests was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the work request. |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. |
operationType | string | The 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) |
percentComplete | number (float) | Shows the progress of the operation tracked by the work request, as a percentage of the total work that must be performed. |
resources | array | The resources that are affected by the work request. |
status | string | The status of the work request. (ACCEPTED, IN_PROGRESS, WAITING, NEEDS_ATTENTION, FAILED, SUCCEEDED, CANCELING, CANCELED) (x-obmcs-top-level-enum: #/definitions/OperationStatus) |
timeAccepted | string (date-time) | The date and time the request was created, as described in [RFC 3339](https:​//tools.ietf.org/rfc/rfc3339), section 14.29. |
timeFinished | string (date-time) | The date and time the object was finished, as described in [RFC 3339](https:​//tools.ietf.org/rfc/rfc3339). |
timeStarted | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | workRequestId, region | opc-request-id | Gets the details of a work request. |
list | select | region | workRequestId, compartmentId, page, limit, sortOrder, sortBy, resourceId, opc-request-id | Lists 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.
| Name | Datatype | Description |
|---|---|---|
region | string | OCI 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) |
workRequestId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. |
compartmentId | string | The OCID of the compartment. Is exclusive with the streamPoolId parameter. One of them is required. |
limit | integer | The maximum number of items to return. The value must be between 1 and 50. The default is 10. |
opc-request-id | string | The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. |
page | string | The page at which to start retrieving results. |
resourceId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the resource affected by the work request. |
sortBy | string | The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. |
sortOrder | string | The sort order to use, either 'asc' or 'desc'. |
workRequestId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the asynchronous work request. |
SELECT examples​
- get
- list
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 }}'
;
Lists the work requests in a compartment.<br />
SELECT
id,
compartmentId,
operationType,
percentComplete,
resources,
status,
timeAccepted,
timeFinished,
timeStarted
FROM oci.streaming.work_requests
WHERE region = '{{ region }}' -- required
AND workRequestId = '{{ workRequestId }}'
AND compartmentId = '{{ compartmentId }}'
AND page = '{{ page }}'
AND limit = '{{ limit }}'
AND sortOrder = '{{ sortOrder }}'
AND sortBy = '{{ sortBy }}'
AND resourceId = '{{ resourceId }}'
AND opc-request-id = '{{ opc-request-id }}'
;