OS Management Hub Work Request Functions

Package: DBMS_CLOUD_OCI_OMH_WORK_REQUEST

GET_WORK_REQUEST Function

Gets information about the specified work request.

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_omh_work_request_get_work_request_response_t;

Parameters

Parameter Description

work_request_id

(required) The OCID of the work request.

opc_request_id

(optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

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://osmh.{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

Gets the errors for the specified work request.

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_omh_work_request_list_work_request_errors_response_t;

Parameters

Parameter Description

work_request_id

(required) The OCID of the work request.

opc_request_id

(optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

page

(optional) For 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. Example: `3`

limit

(optional) For 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. Example: `50`

sort_by

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

Allowed values are: 'timeCreated', 'displayName'

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://osmh.{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

Gets the logs for the specified work request.

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_omh_work_request_list_work_request_logs_response_t;

Parameters

Parameter Description

work_request_id

(required) The OCID of the work request.

opc_request_id

(optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

page

(optional) For 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. Example: `3`

limit

(optional) For 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. Example: `50`

sort_by

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

Allowed values are: 'timeCreated', 'displayName'

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://osmh.{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 work requests that match the specified compartment or work request OCID. Filter the list against a variety of criteria including but not limited to its name, status, and operation type.

Syntax

FUNCTION list_work_requests (
  compartment_id varchar2 DEFAULT NULL,
  work_request_id varchar2 DEFAULT NULL,
  status dbms_cloud_oci_os_management_hub_varchar2_tbl 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,
  initiator_id varchar2 DEFAULT NULL,
  parent_id varchar2 DEFAULT NULL,
  parent_resources_not_equal_to dbms_cloud_oci_os_management_hub_varchar2_tbl DEFAULT NULL,
  operation_type dbms_cloud_oci_os_management_hub_varchar2_tbl DEFAULT NULL,
  display_name_contains varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_omh_work_request_list_work_requests_response_t;

Parameters

Parameter Description

compartment_id

(optional) The OCID of the compartment that contains the resources to list.

work_request_id

(optional) The OCID of the work request.

status

(optional) A filter to return work requests that match the given status.

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

resource_id

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

opc_request_id

(optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

page

(optional) For 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. Example: `3`

limit

(optional) For 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. Example: `50`

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 timeCreated is descending.

Allowed values are: 'timeCreated', 'displayName'

initiator_id

(optional) The OCID of the schedule job that initiated the work request.

parent_id

(optional) The OCID of the parent work request.

parent_resources_not_equal_to

(optional) A filter to return the resources whose parent resources are not the same as the given resource OCID(s).

operation_type

(optional) The asynchronous operation tracked by this work request. The filter returns only resources that match the given OperationType.

Allowed values are: 'INSTALL_PACKAGES', 'REMOVE_PACKAGES', 'UPDATE_PACKAGES', 'UPDATE_ALL_PACKAGES', 'UPDATE_SECURITY', 'UPDATE_BUGFIX', 'UPDATE_ENHANCEMENT', 'UPDATE_OTHER', 'UPDATE_KSPLICE_KERNEL', 'UPDATE_KSPLICE_USERSPACE', 'ENABLE_MODULE_STREAMS', 'DISABLE_MODULE_STREAMS', 'SWITCH_MODULE_STREAM', 'INSTALL_MODULE_PROFILES', 'REMOVE_MODULE_PROFILES', 'SET_SOFTWARE_SOURCES', 'LIST_PACKAGES', 'SET_MANAGEMENT_STATION_CONFIG', 'SYNC_MANAGEMENT_STATION_MIRROR', 'UPDATE_MANAGEMENT_STATION_SOFTWARE', 'UPDATE', 'MODULE_ACTIONS', 'LIFECYCLE_PROMOTION', 'CREATE_SOFTWARE_SOURCE', 'UPDATE_SOFTWARE_SOURCE'

display_name_contains

(optional) A filter to return resources that may partially match the given display name.

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://osmh.{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.