Governance Rules CP Work Request Functions

Package: DBMS_CLOUD_OCI_GRCP_WORK_REQUEST

CANCEL_WORK_REQUEST Function

Cancels the work request with the given ID.

Syntax

FUNCTION cancel_work_request (
  work_request_id varchar2,
  if_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_grcp_work_request_cancel_work_request_response_t;

Parameters

Parameter Description

work_request_id

(required) The ID of the asynchronous request.

if_match

(optional) 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.

opc_request_id

(optional) The client request ID for tracing.

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://governance-rules.organizations.{region}.oci.{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.

GET_WORK_REQUEST Function

Gets details of the work request with the given ID.

Syntax

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

Parameters

Parameter Description

work_request_id

(required) The ID of the asynchronous request.

opc_request_id

(optional) The client request ID for tracing.

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://governance-rules.organizations.{region}.oci.{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

Returns a (paginated) list of errors for the work request with the given ID.

Syntax

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

Parameters

Parameter Description

work_request_id

(required) The ID of the asynchronous request.

opc_request_id

(optional) The client request ID for tracing.

page

(optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.

limit

(optional) The maximum number of items to return.

sort_by

(optional) The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.

Allowed values are: 'timeAccepted'

sort_order

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

Allowed values are: 'ASC', 'DESC'

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://governance-rules.organizations.{region}.oci.{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

Returns a (paginated) list of logs for the work request with the given ID.

Syntax

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

Parameters

Parameter Description

work_request_id

(required) The ID of the asynchronous request.

opc_request_id

(optional) The client request ID for tracing.

page

(optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.

limit

(optional) The maximum number of items to return.

sort_by

(optional) The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.

Allowed values are: 'timeAccepted'

sort_order

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

Allowed values are: 'ASC', 'DESC'

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://governance-rules.organizations.{region}.oci.{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 compartment.

Syntax

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

Parameters

Parameter Description

compartment_id

(optional) The ID of the compartment in which to list resources.

work_request_id

(optional) The ID of the asynchronous work request.

status

(optional) A filter to return only resources their lifecycleState matches the given OperationStatus.

Allowed values are: 'ACCEPTED', 'IN_PROGRESS', 'WAITING', 'FAILED', 'SUCCEEDED', 'CANCELING', 'CANCELED'

resource_id

(optional) The ID of the resource affected by the work request.

opc_request_id

(optional) The client request ID for tracing.

page

(optional) A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.

limit

(optional) The maximum number of items to return.

sort_order

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

Allowed values are: 'ASC', 'DESC'

sort_by

(optional) The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.

Allowed values are: 'timeAccepted'

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://governance-rules.organizations.{region}.oci.{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.