Skip to main content

work_requests

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

Overview​

Namework_requests
TypeResource
Idoci.object_storage.work_requests

Fields​

The following fields are returned by SELECT queries:

The details of the work request.

NameDatatypeDescription
idstringThe id of the work request.
compartmentIdstringThe [OCID](/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request. Work requests are scoped to the same compartment as the resource the work request affects. If the work request affects multiple resources and those resources are not in the same compartment, the OCID of the primary resource is used. For example, you can copy an object in a bucket in one compartment to a bucket in another compartment. In this case, the OCID of the source compartment is used.
operationTypestringThe type of work request. (COPY_OBJECT, REENCRYPT, PRIVATE_ENDPOINT_CREATE, PRIVATE_ENDPOINT_UPDATE, PRIVATE_ENDPOINT_DELETE)
percentCompletenumber (float)Percentage of the work request completed.
resourcesarray
statusstringThe status of the specified work request. (ACCEPTED, IN_PROGRESS, FAILED, COMPLETED, CANCELING, CANCELED)
timeAcceptedstring (date-time)The date and time the work request was created, as described in [RFC 3339](https:​//tools.ietf.org/html/rfc3339).
timeFinishedstring (date-time)The date and time the work request was finished, as described in [RFC 3339](https:​//tools.ietf.org/html/rfc3339).
timeStartedstring (date-time)The date and time the work request was started, as described in [RFC 3339](https:​//tools.ietf.org/html/rfc3339).

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectworkRequestId, regionopc-client-request-idGets the status of the work request for the given ID.
listselectcompartmentId, regionprivateEndpointName, opc-client-request-id, page, limitLists the work requests in a compartment.<br />
cancel_work_requestexecworkRequestId, regionopc-client-request-idCancels a work request.<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
compartmentIdstringThe ID of the compartment in which to list buckets.
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 ID of the asynchronous request.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
opc-client-request-idstringThe client request ID for tracing.
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).
privateEndpointNamestringThe name of the privateEndpoint for which to list work requests.

SELECT examples​

Gets the status of the work request for the given ID.

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

Lifecycle Methods​

Cancels a work request.<br />

EXEC oci.object_storage.work_requests.cancel_work_request
@workRequestId='{{ workRequestId }}' --required,
@region='{{ region }}' --required,
@opc-client-request-id='{{ opc-client-request-id }}'
;