Skip to main content

work_requests

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

Overview​

Namework_requests
TypeResource
Idoci.container_engine.work_requests

Fields​

The following fields are returned by SELECT queries:

The work request.

NameDatatypeDescription
idstringThe OCID of the work request. (example: ocid1.clustersworkrequest.oc1.iad.aaaaaaaanifpelnyzmkvnepohbz4ntswkpl35syzzsugdxceth3oihe8hcfq)
compartmentIdstringThe OCID of the compartment in which the work request exists. (example: ocid1.compartment.oc1..aaaaaaaafqm2df7ckwmmbtdsl2bgxsw4fcpvkoojytxrqst24yww2tdmtqcq)
operationTypestringThe type of work the work request is doing. (CLUSTER_CREATE, CLUSTER_UPDATE, CLUSTER_DELETE, CREATE_NAMESPACE, NODEPOOL_CREATE, NODEPOOL_UPDATE, NODEPOOL_DELETE, NODEPOOL_RECONCILE, NODEPOOL_CYCLING, WORKREQUEST_CANCEL, VIRTUALNODEPOOL_CREATE, VIRTUALNODEPOOL_UPDATE, VIRTUALNODEPOOL_DELETE, VIRTUALNODE_DELETE, VIRTUALNODEPOOL_CYCLING, ENABLE_ADDON, UPDATE_ADDON, DISABLE_ADDON, RECONCILE_ADDON, CLUSTER_NODE_REBOOT, CLUSTER_NODE_REPLACE_BOOT_VOLUME, START_PUBLIC_API_ENDPOINT_DECOMMISSION, ROLLBACK_PUBLIC_API_ENDPOINT_DECOMMISSION) (example: CLUSTER_UPDATE, x-obmcs-top-level-enum: #/definitions/WorkRequestOperationType)
resourcesarrayThe resources this work request affects.
statusstringThe current status of the work request. (ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED) (example: IN_PROGRESS, x-obmcs-top-level-enum: #/definitions/WorkRequestStatus)
timeAcceptedstring (date-time)The time the work request was accepted. (example: 2017-07-21T16:11:29Z)
timeFinishedstring (date-time)The time the work request was finished. (example: 2017-07-21T16:11:29Z)
timeStartedstring (date-time)The time the work request was started. (example: 2017-07-21T16:11:29Z)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectworkRequestId, regionopc-request-idGet the details of a work request.
listselectcompartmentId, regionclusterId, resourceId, resourceType, status, limit, page, sortOrder, sortBy, opc-request-idList all work requests in a compartment.
deletedeleteworkRequestId, regionif-match, opc-request-idCancel a work request that has not started.

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
compartmentIdstringThe OCID of the compartment.
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 of the work request.
clusterIdstringThe OCID of the cluster.
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, 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.
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
resourceIdstringThe OCID of the resource associated with a work request
resourceTypestringType of the resource associated with a work request
sortBystringThe optional field to sort the results by.
sortOrderstringThe optional order in which to sort the results.
statusarrayA work request status to filter on. Can have multiple parameters of this name.

SELECT examples​

Get the details of a work request.

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

DELETE examples​

Cancel a work request that has not started.

DELETE FROM oci.container_engine.work_requests
WHERE workRequestId = '{{ workRequestId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
AND opc-request-id = '{{ opc-request-id }}'
;