work_requests
Creates, updates, deletes, gets or lists a work_requests resource.
Overview​
| Name | work_requests |
| Type | Resource |
| Id | oci.identity.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 of the work request. |
compartmentId | string | The OCID of the compartment that contains the work request. |
errors | array | The errors for work request. |
logs | array | The logs for work request. |
operationType | string | An enum-like description of the type of work the work request is doing. (DELETE_COMPARTMENT, DELETE_TAG_DEFINITION) |
percentComplete | number (float) | How much progress the operation has made. |
resources | array | The resources this work request affects. |
status | string | The current status of the work request. (ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED) |
timeAccepted | string (date-time) | Date and time the work was accepted, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
timeFinished | string (date-time) | Date and time the work completed, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
timeStarted | string (date-time) | Date and time the work started, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
The work request summary. Tracks the status of the asynchronous operation.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the work request. |
compartmentId | string | The OCID of the compartment that contains the work request. |
errors | array | The errors for work request. |
operationType | string | An enum-like description of the type of work the work request is doing. (DELETE_COMPARTMENT, DELETE_TAG_DEFINITION) |
percentComplete | number (float) | How much progress the operation has made. |
resources | array | The resources this work request affects. |
status | string | The current status of the work request. (ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED) |
timeAccepted | string (date-time) | Date and time the work was accepted, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
timeFinished | string (date-time) | Date and time the work completed, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
timeStarted | string (date-time) | Date and time the work started, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | workRequestId, region | Gets details on a specified work request. The workRequestID is returned in the opc-work-request-id header<br />for any asynchronous operation in the compartment service.<br /> | |
list | select | compartmentId, region | page, limit, resourceIdentifier | Lists the work requests in 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 |
|---|---|---|
compartmentId | string | The OCID of the compartment (remember that the tenancy is simply the root compartment). |
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 of the work request. |
limit | integer | The maximum number of items to return in a paginated "List" call. |
page | string | The value of the opc-next-page response header from the previous "List" call. |
resourceIdentifier | string | The identifier of the resource the work request affects. |
SELECT examples​
- get
- list
Gets details on a specified work request. The workRequestID is returned in the opc-work-request-id header<br />for any asynchronous operation in the compartment service.<br />
SELECT
id,
compartmentId,
errors,
logs,
operationType,
percentComplete,
resources,
status,
timeAccepted,
timeFinished,
timeStarted
FROM oci.identity.work_requests
WHERE workRequestId = '{{ workRequestId }}' -- required
AND region = '{{ region }}' -- required
;
Lists the work requests in compartment.<br />
SELECT
id,
compartmentId,
errors,
operationType,
percentComplete,
resources,
status,
timeAccepted,
timeFinished,
timeStarted
FROM oci.identity.work_requests
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND page = '{{ page }}'
AND limit = '{{ limit }}'
AND resourceIdentifier = '{{ resourceIdentifier }}'
;