MySQL Work Requests Functions

Package: DBMS_CLOUD_OCI_MS_WORK_REQUESTS

GET_WORK_REQUEST Function

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

Syntax

FUNCTION get_work_request (
  work_request_id varchar2,
  if_none_match varchar2 DEFAULT NULL,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ms_work_requests_get_work_request_response_t;

Parameters

Parameter Description

work_request_id

(required) the ID of the WorkRequest

if_none_match

(optional) For conditional requests. In the GET call for a resource, set the `If-None-Match` header to the value of the ETag from a previous GET (or POST or PUT) response for that resource. The server will return with either a 304 Not Modified response if the resource has not changed, or a 200 OK response with the updated representation.

opc_request_id

(optional) Customer-defined unique identifier for the request. If you need to contact Oracle about a specific request, please provide the request ID that you supplied in this header with the request.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://mysql.{region}.ocp.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

LIST_WORK_REQUEST_ERRORS Function

Return a (paginated) list of errors for a given work request.

Syntax

FUNCTION list_work_request_errors (
  work_request_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  page varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ms_work_requests_list_work_request_errors_response_t;

Parameters

Parameter Description

work_request_id

(required) the ID of the WorkRequest

opc_request_id

(optional) Customer-defined unique identifier for the request. If you need to contact Oracle about a specific request, please provide the request ID that you supplied in this header with the request.

limit

(optional) The maximum number of items to return in a paginated list call. For information about pagination, see List Pagination.

page

(optional) The value of the `opc-next-page` or `opc-prev-page` response header from the previous list call. For information about pagination, see List Pagination.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://mysql.{region}.ocp.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

LIST_WORK_REQUEST_LOGS Function

Return a (paginated) list of logs for a given work request.

Syntax

FUNCTION list_work_request_logs (
  work_request_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  page varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ms_work_requests_list_work_request_logs_response_t;

Parameters

Parameter Description

work_request_id

(required) the ID of the WorkRequest

opc_request_id

(optional) Customer-defined unique identifier for the request. If you need to contact Oracle about a specific request, please provide the request ID that you supplied in this header with the request.

limit

(optional) The maximum number of items to return in a paginated list call. For information about pagination, see List Pagination.

page

(optional) The value of the `opc-next-page` or `opc-prev-page` response header from the previous list call. For information about pagination, see List Pagination.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://mysql.{region}.ocp.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.

LIST_WORK_REQUESTS Function

Lists the work requests in a specified compartment.

Syntax

FUNCTION list_work_requests (
  compartment_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  sort_by varchar2 DEFAULT NULL,
  sort_order varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  page varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ms_work_requests_list_work_requests_response_t;

Parameters

Parameter Description

compartment_id

(required) The compartment OCID.

opc_request_id

(optional) Customer-defined unique identifier for the request. If you need to contact Oracle about a specific request, please provide the request ID that you supplied in this header with the request.

sort_by

(optional) The optional field to sort the results by.

Allowed values are: 'ID', 'OPERATION_TYPE', 'STATUS', 'TIME_ACCEPTED', 'TIME_STARTED', 'TIME_FINISHED'

sort_order

(optional) The sort order to use (ASC or DESC).

Allowed values are: 'ASC', 'DESC'

limit

(optional) The maximum number of items to return in a paginated list call. For information about pagination, see List Pagination.

page

(optional) The value of the `opc-next-page` or `opc-prev-page` response header from the previous list call. For information about pagination, see List Pagination.

region

(optional) OCI region id. e.g us-phoenix-1 for US West (Phoenix).

endpoint

(optional) The endpoint of the service to call using this function. e.g https://mysql.{region}.ocp.{secondLevelDomain}.If both endpoint and region are given, then endpoint takes precedence.

credential_name

(optional) The name of the credential for authenticating with the corresponding cloud native API.