Usage API Functions

Package: DBMS_CLOUD_OCI_UA_USAGEAPI

CREATE_CUSTOM_TABLE Function

Returns the created custom table.

Syntax

FUNCTION create_custom_table (
  create_custom_table_details dbms_cloud_oci_usageapi_create_custom_table_details_t,
  opc_request_id varchar2 DEFAULT NULL,
  opc_retry_token varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_create_custom_table_response_t;

Parameters

Parameter Description

create_custom_table_details

(required) New custom table details.

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.

opc_retry_token

(optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

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

CREATE_QUERY Function

Returns the created query.

Syntax

FUNCTION create_query (
  create_query_details dbms_cloud_oci_usageapi_create_query_details_t,
  opc_request_id varchar2 DEFAULT NULL,
  opc_retry_token varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_create_query_response_t;

Parameters

Parameter Description

create_query_details

(required) New query details. Up to ten saved queries.

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.

opc_retry_token

(optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

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

CREATE_SCHEDULE Function

Returns the created schedule.

Syntax

FUNCTION create_schedule (
  create_schedule_details dbms_cloud_oci_usageapi_create_schedule_details_t,
  opc_request_id varchar2 DEFAULT NULL,
  opc_retry_token varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_create_schedule_response_t;

Parameters

Parameter Description

create_schedule_details

(required) New schedule details.

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.

opc_retry_token

(optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

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

CREATE_USAGE_CARBON_EMISSIONS_QUERY Function

Returns the created usage carbon emissions query.

Syntax

FUNCTION create_usage_carbon_emissions_query (
  create_usage_carbon_emissions_query_details dbms_cloud_oci_usageapi_create_usage_carbon_emissions_query_details_t,
  opc_request_id varchar2 DEFAULT NULL,
  opc_retry_token varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_create_usage_carbon_emissions_query_response_t;

Parameters

Parameter Description

create_usage_carbon_emissions_query_details

(required) New query details. Up to ten saved queries.

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.

opc_retry_token

(optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error, without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

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

DELETE_CUSTOM_TABLE Function

Delete a saved custom table by the OCID.

Syntax

FUNCTION delete_custom_table (
  custom_table_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_delete_custom_table_response_t;

Parameters

Parameter Description

custom_table_id

(required) The custom table unique OCID.

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.

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.

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

DELETE_QUERY Function

Delete a saved query by the OCID.

Syntax

FUNCTION delete_query (
  query_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_delete_query_response_t;

Parameters

Parameter Description

query_id

(required) The query unique OCID.

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.

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.

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

DELETE_SCHEDULE Function

Delete a saved scheduled report by the OCID.

Syntax

FUNCTION delete_schedule (
  schedule_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_delete_schedule_response_t;

Parameters

Parameter Description

schedule_id

(required) The schedule unique OCID.

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.

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.

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

DELETE_USAGE_CARBON_EMISSIONS_QUERY Function

Delete a usage carbon emissions saved query by the OCID.

Syntax

FUNCTION delete_usage_carbon_emissions_query (
  usage_carbon_emissions_query_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_delete_usage_carbon_emissions_query_response_t;

Parameters

Parameter Description

usage_carbon_emissions_query_id

(required) The query unique OCID.

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.

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.

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://usageapi.{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_CUSTOM_TABLE Function

Returns the saved custom table.

Syntax

FUNCTION get_custom_table (
  custom_table_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_ua_usageapi_get_custom_table_response_t;

Parameters

Parameter Description

custom_table_id

(required) The custom table unique OCID.

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://usageapi.{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_QUERY Function

Returns the saved query.

Syntax

FUNCTION get_query (
  query_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_ua_usageapi_get_query_response_t;

Parameters

Parameter Description

query_id

(required) The query unique OCID.

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://usageapi.{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_SCHEDULE Function

Returns the saved schedule.

Syntax

FUNCTION get_schedule (
  schedule_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_ua_usageapi_get_schedule_response_t;

Parameters

Parameter Description

schedule_id

(required) The schedule unique OCID.

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://usageapi.{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_SCHEDULED_RUN Function

Returns the saved schedule run.

Syntax

FUNCTION get_scheduled_run (
  scheduled_run_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_ua_usageapi_get_scheduled_run_response_t;

Parameters

Parameter Description

scheduled_run_id

(required) The scheduledRun unique OCID.

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://usageapi.{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_USAGE_CARBON_EMISSIONS_QUERY Function

Returns the usage carbon emissions saved query.

Syntax

FUNCTION get_usage_carbon_emissions_query (
  usage_carbon_emissions_query_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_ua_usageapi_get_usage_carbon_emissions_query_response_t;

Parameters

Parameter Description

usage_carbon_emissions_query_id

(required) The query unique OCID.

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://usageapi.{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_CUSTOM_TABLES Function

Returns the saved custom table list.

Syntax

FUNCTION list_custom_tables (
  compartment_id varchar2,
  saved_report_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  page varchar2 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_ua_usageapi_list_custom_tables_response_t;

Parameters

Parameter Description

compartment_id

(required) The compartment ID in which to list resources.

saved_report_id

(required) The saved report ID in which to list resources.

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.

limit

(optional) The maximumimum number of items to return.

page

(optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

sort_by

(optional) The field to sort by. If not specified, the default is displayName.

Allowed values are: 'displayName'

sort_order

(optional) The sort order to use, whether '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://usageapi.{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_QUERIES Function

Returns the saved query list.

Syntax

FUNCTION list_queries (
  compartment_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  page varchar2 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_ua_usageapi_list_queries_response_t;

Parameters

Parameter Description

compartment_id

(required) The compartment ID in which to list resources.

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.

limit

(optional) The maximumimum number of items to return.

page

(optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

sort_by

(optional) The field to sort by. If not specified, the default is displayName.

Allowed values are: 'displayName'

sort_order

(optional) The sort order to use, whether '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://usageapi.{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_SCHEDULED_RUNS Function

Returns schedule history list.

Syntax

FUNCTION list_scheduled_runs (
  schedule_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_ua_usageapi_list_scheduled_runs_response_t;

Parameters

Parameter Description

schedule_id

(required) The unique ID of a schedule.

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) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

limit

(optional) The maximumimum number of items to return.

sort_by

(optional) The field to sort by. If not specified, the default is timeCreated.

Allowed values are: 'timeCreated'

sort_order

(optional) The sort order to use, whether '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://usageapi.{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_SCHEDULES Function

Returns the saved schedule list.

Syntax

FUNCTION list_schedules (
  compartment_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,
  name varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_list_schedules_response_t;

Parameters

Parameter Description

compartment_id

(required) The compartment ID in which to list resources.

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) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

limit

(optional) The maximumimum number of items to return.

sort_by

(optional) The field to sort by. If not specified, the default is timeCreated.

Allowed values are: 'name', 'timeCreated'

sort_order

(optional) The sort order to use, whether 'asc' or 'desc'.

Allowed values are: 'ASC', 'DESC'

name

(optional) Query parameter for filtering by 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://usageapi.{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_USAGE_CARBON_EMISSIONS_QUERIES Function

Returns the usage carbon emissions saved query list.

Syntax

FUNCTION list_usage_carbon_emissions_queries (
  compartment_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  page varchar2 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_ua_usageapi_list_usage_carbon_emissions_queries_response_t;

Parameters

Parameter Description

compartment_id

(required) The compartment ID in which to list resources.

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.

limit

(optional) The maximumimum number of items to return.

page

(optional) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

sort_by

(optional) The field to sort by. If not specified, the default is displayName.

Allowed values are: 'displayName'

sort_order

(optional) The sort order to use, whether '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://usageapi.{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.

REQUEST_AVERAGE_CARBON_EMISSION Function

Returns the average carbon emissions summary by SKU.

Syntax

FUNCTION request_average_carbon_emission (
  sku_part_number varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_request_average_carbon_emission_response_t;

Parameters

Parameter Description

sku_part_number

(required) The SKU part number.

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

REQUEST_CLEAN_ENERGY_USAGE Function

Returns the clean energy usage summary by region.

Syntax

FUNCTION request_clean_energy_usage (
  l_region varchar2,
  ad 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_ua_usageapi_request_clean_energy_usage_response_t;

Parameters

Parameter Description

l_region

(required) The region.

ad

(optional) The availability domain.

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

REQUEST_SUMMARIZED_CONFIGURATIONS Function

Returns the configurations list for the UI drop-down list.

Syntax

FUNCTION request_summarized_configurations (
  tenant_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_ua_usageapi_request_summarized_configurations_response_t;

Parameters

Parameter Description

tenant_id

(required) tenant id

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

REQUEST_SUMMARIZED_USAGES Function

Returns usage for the given account.

Syntax

FUNCTION request_summarized_usages (
  request_summarized_usages_details dbms_cloud_oci_usageapi_request_summarized_usages_details_t,
  opc_request_id varchar2 DEFAULT NULL,
  page varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_request_summarized_usages_response_t;

Parameters

Parameter Description

request_summarized_usages_details

(required) getUsageRequest contains query inforamtion.

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) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

limit

(optional) The maximumimum number of items to return.

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

REQUEST_USAGE_CARBON_EMISSION_CONFIG Function

Returns the configuration list for the UI drop-down list of carbon emission console.

Syntax

FUNCTION request_usage_carbon_emission_config (
  tenant_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_ua_usageapi_request_usage_carbon_emission_config_response_t;

Parameters

Parameter Description

tenant_id

(required) tenant id

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

REQUEST_USAGE_CARBON_EMISSIONS Function

Returns usage carbon emission for the given account.

Syntax

FUNCTION request_usage_carbon_emissions (
  request_usage_carbon_emissions_details dbms_cloud_oci_usageapi_request_usage_carbon_emissions_details_t,
  opc_request_id varchar2 DEFAULT NULL,
  page varchar2 DEFAULT NULL,
  limit number DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_request_usage_carbon_emissions_response_t;

Parameters

Parameter Description

request_usage_carbon_emissions_details

(required) getUsageCarbonEmissionRequest contains query inforamtion.

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) The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

limit

(optional) The maximumimum number of items to return.

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

UPDATE_CUSTOM_TABLE Function

Update a saved custom table by table id.

Syntax

FUNCTION update_custom_table (
  update_custom_table_details dbms_cloud_oci_usageapi_update_custom_table_details_t,
  custom_table_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_update_custom_table_response_t;

Parameters

Parameter Description

update_custom_table_details

(required) The information to be updated.

custom_table_id

(required) The custom table unique OCID.

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.

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.

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

UPDATE_QUERY Function

Update a saved query by the OCID.

Syntax

FUNCTION update_query (
  update_query_details dbms_cloud_oci_usageapi_update_query_details_t,
  query_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_update_query_response_t;

Parameters

Parameter Description

update_query_details

(required) The information to be updated.

query_id

(required) The query unique OCID.

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.

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.

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

UPDATE_SCHEDULE Function

Update a saved schedule

Syntax

FUNCTION update_schedule (
  update_schedule_details dbms_cloud_oci_usageapi_update_schedule_details_t,
  schedule_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_update_schedule_response_t;

Parameters

Parameter Description

update_schedule_details

(required) The information to be updated. Currently supports only tags

schedule_id

(required) The schedule unique OCID.

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.

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.

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

UPDATE_USAGE_CARBON_EMISSIONS_QUERY Function

Update a usage carbon emissions saved query by the OCID.

Syntax

FUNCTION update_usage_carbon_emissions_query (
  update_usage_carbon_emissions_query_details dbms_cloud_oci_usageapi_update_usage_carbon_emissions_query_details_t,
  usage_carbon_emissions_query_id varchar2,
  opc_request_id varchar2 DEFAULT NULL,
  if_match varchar2 DEFAULT NULL,
  region varchar2 DEFAULT NULL, 
  endpoint varchar2 DEFAULT NULL,
  credential_name varchar2 DEFAULT NULL
) RETURN dbms_cloud_oci_ua_usageapi_update_usage_carbon_emissions_query_response_t;

Parameters

Parameter Description

update_usage_carbon_emissions_query_details

(required) The information to be updated.

usage_carbon_emissions_query_id

(required) The query unique OCID.

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.

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.

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