Skip to main content

work_requests

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

Overview​

Namework_requests
TypeResource
Idoci.resource_manager.work_requests

Fields​

The following fields are returned by SELECT queries:

Work request

NameDatatypeDescription
idstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) identifying this work request.
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing this work request.
operationTypestringThe 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)
percentCompletenumber (float)The amount of work done relative to the total amount of work.
resourcesarrayThe resources affected by this work request.
statusstringThe status of the work request. (ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED)
timeAcceptedstring (date-time)The date and time when the work request was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
timeFinishedstring (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
timeStartedstring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectworkRequestId, regionopc-request-idReturns 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 />
listselectcompartmentId, regionresourceId, limit, page, opc-request-idLists 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.

NameDatatypeDescription
compartmentIdstringA filter to return only resources that exist in the compartment, identified by [OCID](/iaas/Content/General/Concepts/identifiers.htm).
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 work request.
limitintegerThe 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-idstringUnique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
pagestringThe 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).
resourceIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the resource.

SELECT examples​

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 }}'
;