work_requests
Creates, updates, deletes, gets or lists a work_requests resource.
Overview​
| Name | work_requests |
| Type | Resource |
| Id | oci.resource_manager.work_requests |
Fields​
The following fields are returned by SELECT queries:
- get
- list
Work request
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) identifying this work request. |
compartmentId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing this work request. |
operationType | string | The asynchronous operation tracked by this work request. (CHANGE_STACK_COMPARTMENT, CREATE_STACK_FROM_COMPARTMENT, DRIFT_DETECTION, CREATE_PRIVATE_ENDPOINT, UPDATE_PRIVATE_ENDPOINT, DELETE_PRIVATE_ENDPOINT) |
percentComplete | number (float) | The amount of work done relative to the total amount of work. |
resources | array | The resources affected by this work request. |
status | string | The status of the work request. (ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED) |
timeAccepted | string (date-time) | The date and time when the work request was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z |
timeFinished | string (date-time) | The date and time when the work request reached a terminal state (FAILED or SUCCEEDED). Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z |
timeStarted | string (date-time) | The date and time when the work request transitioned from ACCEPTED to IN_PROGRESS. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z |
A summary of the status of a work request.
| Name | Datatype | Description |
|---|---|---|
id | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) identifying this work request. |
compartmentId | string | Unique identifier ([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. (x-obmcs-enumref: #/definitions/WorkRequest/operationType) |
percentComplete | number (float) | Percentage of the work request completed. |
resources | array | The resources affected by this work request. |
status | string | The status of the specified work request. (x-obmcs-enumref: #/definitions/WorkRequest/status) |
timeAccepted | string (date-time) | The date and time when the work request was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z |
timeFinished | string (date-time) | The date and time when the work request reached a terminal state (FAILED or SUCCEEDED). Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z |
timeStarted | string (date-time) | The date and time when the work request transitioned from ACCEPTED to IN_PROGRESS. Format is defined by RFC3339. Example: 2020-01-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 | opc-request-id | Returns the specified work request.<br />For more information, see<br />[Getting a Work Request's Details](/iaas/Content/ResourceManager/Tasks/get-work-request.htm).<br /> |
list | select | compartmentId, region | resourceId, limit, page, opc-request-id | Lists the work requests in the specified compartment or for the specified resource.<br />For more information, see<br />[Listing Work Requests](/iaas/Content/ResourceManager/Tasks/list-work-request.htm).<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 | A filter to return only resources that exist in the compartment, identified by [OCID](/iaas/Content/General/Concepts/identifiers.htm). |
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 work request. |
limit | integer | The number of items returned in a paginated List call. For information about pagination, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
opc-request-id | string | 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 value of the opc-next-page response header from the preceding List call. For information about pagination, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). |
resourceId | string | The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the resource. |
SELECT examples​
- get
- list
Returns the specified work request.<br />For more information, see<br />[Getting a Work Request's Details](/iaas/Content/ResourceManager/Tasks/get-work-request.htm).<br />
SELECT
id,
compartmentId,
operationType,
percentComplete,
resources,
status,
timeAccepted,
timeFinished,
timeStarted
FROM oci.resource_manager.work_requests
WHERE workRequestId = '{{ workRequestId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;
Lists the work requests in the specified compartment or for the specified resource.<br />For more information, see<br />[Listing Work Requests](/iaas/Content/ResourceManager/Tasks/list-work-request.htm).<br />
SELECT
id,
compartmentId,
operationType,
percentComplete,
resources,
status,
timeAccepted,
timeFinished,
timeStarted
FROM oci.resource_manager.work_requests
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND resourceId = '{{ resourceId }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND opc-request-id = '{{ opc-request-id }}'
;