work_requests
Creates, updates, deletes, gets or lists a work_requests resource.
Overview​
| Name | work_requests |
| Type | Resource |
| Id | oci.container_engine.work_requests |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The work request.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the work request. (example: ocid1.clustersworkrequest.oc1.iad.aaaaaaaanifpelnyzmkvnepohbz4ntswkpl35syzzsugdxceth3oihe8hcfq) |
compartmentId | string | The OCID of the compartment in which the work request exists. (example: ocid1.compartment.oc1..aaaaaaaafqm2df7ckwmmbtdsl2bgxsw4fcpvkoojytxrqst24yww2tdmtqcq) |
operationType | string | The 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) |
resources | array | The resources this work request affects. |
status | string | The current status of the work request. (ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED) (example: IN_PROGRESS, x-obmcs-top-level-enum: #/definitions/WorkRequestStatus) |
timeAccepted | string (date-time) | The time the work request was accepted. (example: 2017-07-21T16:11:29Z) |
timeFinished | string (date-time) | The time the work request was finished. (example: 2017-07-21T16:11:29Z) |
timeStarted | string (date-time) | The time the work request was started. (example: 2017-07-21T16:11:29Z) |
The properties that define a work request summary.
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the work request. (example: ocid1.clustersworkrequest.oc1.iad.aaaaaaaanifpelnyzmkvnepohbz4ntswkpl35syzzsugdxceth3oihe8hcfq) |
compartmentId | string | The OCID of the compartment in which the work request exists. (example: ocid1.compartment.oc1..aaaaaaaafqm2df7ckwmmbtdsl2bgxsw4fcpvkoojytxrqst24yww2tdmtqcq) |
operationType | string | The 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) |
resources | array | The resources this work request affects. |
status | string | The current status of the work request. (ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED) (example: IN_PROGRESS, x-obmcs-top-level-enum: #/definitions/WorkRequestStatus) |
timeAccepted | string (date-time) | The time the work request was accepted. (example: 2017-07-21T16:11:29Z) |
timeFinished | string (date-time) | The time the work request was finished. (example: 2017-07-21T16:11:29Z) |
timeStarted | string (date-time) | The time the work request was started. (example: 2017-07-21T16:11:29Z) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | workRequestId, region | opc-request-id | Get the details of a work request. |
list | select | compartmentId, region | clusterId, resourceId, resourceType, status, limit, page, sortOrder, sortBy, opc-request-id | List all work requests in a compartment. |
delete | delete | workRequestId, region | if-match, opc-request-id | Cancel 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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The OCID of the 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. |
clusterId | string | The OCID of the cluster. |
if-match | string | For 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. |
limit | integer | For 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-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 | For 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). |
resourceId | string | The OCID of the resource associated with a work request |
resourceType | string | Type of the resource associated with a work request |
sortBy | string | The optional field to sort the results by. |
sortOrder | string | The optional order in which to sort the results. |
status | array | A work request status to filter on. Can have multiple parameters of this name. |
SELECT examples​
- get
- list
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 }}'
;
List all work requests in a compartment.
SELECT
id,
compartmentId,
operationType,
resources,
status,
timeAccepted,
timeFinished,
timeStarted
FROM oci.container_engine.work_requests
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND clusterId = '{{ clusterId }}'
AND resourceId = '{{ resourceId }}'
AND resourceType = '{{ resourceType }}'
AND status = '{{ status }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND sortOrder = '{{ sortOrder }}'
AND sortBy = '{{ sortBy }}'
AND opc-request-id = '{{ opc-request-id }}'
;
DELETE examples​
- delete
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 }}'
;