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:

Note

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
Note

More policy examples are shown in Example Policies

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.

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, -? | -h | --help

For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

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.

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.

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.

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.

resource-scheduler work-request-log-entry list --work-request-id <work_request_ocid>

For a complete list of parameters and values for CLI commands, see the CLI Command Reference.