custom_tables
Creates, updates, deletes, gets or lists a custom_tables resource.
Overview​
| Name | custom_tables |
| Type | Resource |
| Id | oci.usage.custom_tables |
Fields​
The following fields are returned by SELECT queries:
- get
- list
The saved custom table.
| Name | Datatype | Description |
|---|---|---|
id | string | The custom table OCID. |
compartmentId | string | The custom table compartment OCID. |
savedCustomTable | object | The custom table for Cost Analysis UI rendering. |
savedReportId | string | The custom table associated saved report OCID. |
The saved custom table list.
| Name | Datatype | Description |
|---|---|---|
id | string | The custom table OCID. |
savedCustomTable | object | The custom table for Cost Analysis UI rendering. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | customTableId, region | opc-request-id | Returns the saved custom table.<br /> |
list | select | compartmentId, savedReportId, region | opc-request-id, limit, page, sortBy, sortOrder | Returns the saved custom table list.<br /> |
create | insert | region, compartmentId, savedReportId, savedCustomTable | opc-request-id, opc-retry-token | Returns the created custom table.<br /> |
update | update | customTableId, region, savedCustomTable | opc-request-id, if-match | Update a saved custom table by table ID.<br /> |
delete | delete | customTableId, region | opc-request-id, if-match | Delete 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.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The compartment ID in which to list resources. |
customTableId | string | The custom table unique OCID. |
region | string | OCI 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) |
savedReportId | string | The saved report ID in which to list resources. |
if-match | string | 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. |
limit | integer | The maximum number of items to return. |
opc-request-id | string | 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 | string | 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. |
page | string | The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. |
sortBy | string | The field to sort by. If not specified, the default is displayName. |
sortOrder | string | The sort order to use, whether 'asc' or 'desc'. |
SELECT examples​
- get
- list
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 }}'
;
Returns the saved custom table list.<br />
SELECT
id,
savedCustomTable
FROM oci.usage.custom_tables
WHERE compartmentId = '{{ compartmentId }}' -- required
AND savedReportId = '{{ savedReportId }}' -- required
AND region = '{{ region }}' -- required
AND opc-request-id = '{{ opc-request-id }}'
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: custom_tables
props:
- name: region
value: "{{ region }}"
description: Required parameter for the custom_tables resource.
- name: compartmentId
value: "{{ compartmentId }}"
description: |
The compartment OCID.
- name: savedCustomTable
description: |
The custom table for Cost Analysis UI rendering.
value:
columnGroupBy:
- "{{ columnGroupBy }}"
compartmentDepth: {{ compartmentDepth }}
displayName: "{{ displayName }}"
groupByTag:
- key: "{{ key }}"
namespace: "{{ namespace }}"
value: "{{ value }}"
rowGroupBy:
- "{{ rowGroupBy }}"
version: {{ version }}
- name: savedReportId
value: "{{ savedReportId }}"
description: |
The associated saved report OCID.
- name: opc-request-id
value: "{{ opc-request-id }}"
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
description: Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
- name: opc-retry-token
value: "{{ opc-retry-token }}"
description: 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.
description: 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.
UPDATE examples​
- update
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
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 }}'
;