Skip to main content

custom_tables

Creates, updates, deletes, gets or lists a custom_tables resource.

Overview​

Namecustom_tables
TypeResource
Idoci.usage.custom_tables

Fields​

The following fields are returned by SELECT queries:

The saved custom table.

NameDatatypeDescription
idstringThe custom table OCID.
compartmentIdstringThe custom table compartment OCID.
savedCustomTableobjectThe custom table for Cost Analysis UI rendering.
savedReportIdstringThe custom table associated saved report OCID.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcustomTableId, regionopc-request-idReturns the saved custom table.<br />
listselectcompartmentId, savedReportId, regionopc-request-id, limit, page, sortBy, sortOrderReturns the saved custom table list.<br />
createinsertregion, compartmentId, savedReportId, savedCustomTableopc-request-id, opc-retry-tokenReturns the created custom table.<br />
updateupdatecustomTableId, region, savedCustomTableopc-request-id, if-matchUpdate a saved custom table by table ID.<br />
deletedeletecustomTableId, regionopc-request-id, if-matchDelete a saved custom table by the OCID.<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
compartmentIdstringThe compartment ID in which to list resources.
customTableIdstringThe custom table unique OCID.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
savedReportIdstringThe saved report ID in which to list resources.
if-matchstringFor 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.
limitintegerThe maximum number of items to return.
opc-request-idstringUnique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
opc-retry-tokenstringA 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.
pagestringThe page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
sortBystringThe field to sort by. If not specified, the default is displayName.
sortOrderstringThe sort order to use, whether 'asc' or 'desc'.

SELECT examples​

Returns the saved custom table.<br />

SELECT
id,
compartmentId,
savedCustomTable,
savedReportId
FROM oci.usage.custom_tables
WHERE customTableId = '{{ customTableId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
;

INSERT examples​

Returns the created custom table.<br />

INSERT INTO oci.usage.custom_tables (
compartmentId,
savedCustomTable,
savedReportId,
region,
opc-request-id,
opc-retry-token
)
SELECT
'{{ compartmentId }}' /* required */,
'{{ savedCustomTable }}' /* required */,
'{{ savedReportId }}' /* required */,
'{{ region }}',
'{{ opc-request-id }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
savedCustomTable,
savedReportId
;

UPDATE examples​

Update a saved custom table by table ID.<br />

UPDATE oci.usage.custom_tables
SET
savedCustomTable = '{{ savedCustomTable }}'
WHERE
customTableId = '{{ customTableId }}' --required
AND region = '{{ region }}' --required
AND savedCustomTable = '{{ savedCustomTable }}' --required
AND opc-request-id = '{{ opc-request-id}}'
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
savedCustomTable,
savedReportId;

DELETE examples​

Delete a saved custom table by the OCID.<br />

DELETE FROM oci.usage.custom_tables
WHERE customTableId = '{{ customTableId }}' --required
AND region = '{{ region }}' --required
AND opc-request-id = '{{ opc-request-id }}'
AND if-match = '{{ if-match }}'
;