Resource Search Functions

Package: DBMS_CLOUD_OCI_RS_RESOURCE_SEARCH

GET_RESOURCE_TYPE Function

Gets detailed information about a resource type by using the resource type name.

Syntax

FUNCTION get_resource_type (
  name varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_rs_resource_search_get_resource_type_response_t;

Parameters

Parameter Description

name

(required) The name of the resource type.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the complete 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://query.{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_RESOURCE_TYPES Function

Lists all resource types that you can search or query for.

Syntax

FUNCTION list_resource_types (
  limit number DEFAULT NULL,
  page 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_rs_resource_search_list_resource_types_response_t;

Parameters

Parameter Description

limit

(optional) The maximum number of items to return. The value must be between 1 and 1000.

page

(optional) The page at which to start retrieving results.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the complete 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://query.{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.

SEARCH_RESOURCES Function

Queries any and all compartments in the specified tenancy to find resources that match the specified criteria. Results include resources that you have permission to view and can span different resource types. You can also sort results based on a specified resource attribute.

Syntax

FUNCTION search_resources (
  search_details dbms_cloud_oci_resource_search_search_details_t,
  limit number DEFAULT NULL,
  page varchar2 DEFAULT NULL,
  tenant_id 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_rs_resource_search_search_resources_response_t;

Parameters

Parameter Description

search_details

(required) Request parameters that describe query criteria. For more information, see SEARCH_DETAILS Function.

limit

(optional) The maximum number of items to return. The value must be between 1 and 1000.

page

(optional) The page at which to start retrieving results.

tenant_id

(optional) The tenancy ID, which can be used to specify a different tenancy (for cross-tenancy authorization) when searching for resources in a different tenancy.

opc_request_id

(optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the complete 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://query.{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.