Managing Work Requests
A work request is an operation that completes a specific task such as creating or updating a schedule. This section describes how to view Resource Scheduler work requests, including details, errors, and logs. It contains procedures to complete the following tasks:
- Listing Work Requests
- Getting Work Request Details
- Canceling a Work Request
- Listing Work Request Error Messages
- Listing Work Request Log Messages
To manage work requests using these procedures, you must have the permissions to access Resource Scheduler work requests. See Authentication and Authorization and Resource Scheduler Policies for details.
Example policy: Allow the CloudScheduleUsers group to list work requests in tenancy.
Allow ResourceScheduleUsers to inspect resource-schedule-workrequest in tenancy
Listing Work Requests
List one or more Resource Scheduler work requests. This can be done only with the CLI or API.
Using the CLI
Use the Resource Scheduler list-work- requests CLI command and required parameters to list work requests.
oci resource-scheduler work-request list --all, --compartment-id | -c, -? | -h | --help, --resource-id, --schedule-id, --status, --work-request-id
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Using the API
Use the Resource Scheduler List Work Requests API command and required parameters to list work requests.
For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.
Getting Work Request Details
Get the details for one or more Resource Scheduler work requests. This can be done only with the CLI or API.
Using the CLI
Use the Resource Scheduler get work-request CLI command and required parameters to get the details of a work request.
oci resource-scheduler work-request get --work-request-id <work_request_ocid>
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Using the API
Use the Resource Scheduler Get Work Requests API command and required parameters to get work requests.
For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.
Canceling a Work Request
Cancel a Resource Scheduler work request. This can be done only with the CLI or API.
Using the CLI
Use the Resource Scheduler cancel work-request CLI command and required parameters to cancel a work request.
oci resource-scheduler work-request cancel --work-request-id, --force, -? | -h | --help
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Using the API
Use the Cancel Work Request operation to get work requests.
For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.
Listing Work Request Error Messages
List the error messages for one or more Resource Scheduler work requests. This can be done only with the CLI or API.
Using the CLI
Use the Resource Scheduler list work-request-error CLI command to list errors for a work request.
oci resource-scheduler work-request-error list --work-request-id <work_request_ocid>
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Using the API
Use the Resource Scheduler List Work Request Errors operation to list errors from a work request.
For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.
Listing Work Request Log Messages
List the work request log messages for one or more Resource Scheduler work requests. This can be done only with the CLI or API.
Using the CLI
Use the list work-request-log-entry command to list logs for work requests.
oci resource-scheduler work-request-log-entry list-work-request-logs --work-request-id <work_request_ocid>
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Using the API
Use the List Work Request Logs operation to list logs for work requests.
For a complete list of Resource Scheduler APIs, see Resource Scheduler APIs.