Usage API: Query¶
Manage OCI Usage API resources from Kubernetes. This page is generated from checked-in package metadata, CRD schemas, and sample manifests.
Resource Snapshot¶
| Field | Value |
|---|---|
| Service | usageapi |
| Resource | Query |
| API Version | usageapi.oracle.com/v1beta1 |
| Package | Usage API |
| Support Status | Preview |
| Latest Released Version | v2.1.0-alpha |
| Install Namespace | oci-service-operator-usageapi-system |
Quick Links¶
- Resource Guide Index
- Setup Guide
- Package Page
- API Reference
- Spec Reference
- Status Reference
- Rendered Sample (
config/samples/usageapi_v1beta1_query.yaml)
Spec Fields¶
This summary shows the top-level spec fields. Use the full API reference for nested fields, defaults, and enum values.
| Field | Description | Type | Required |
|---|---|---|---|
compartmentId |
The compartment OCID. | string |
Yes |
queryDefinition |
QueryDefinition defines nested fields for Query.QueryDefinition. | object |
Yes |
Status Fields¶
This summary shows the top-level status fields. Use the full API reference for nested fields, defaults, and enum values.
| Field | Description | Type | Required |
|---|---|---|---|
compartmentId |
The compartment OCID. | string |
No |
id |
The query OCID. | string |
No |
queryDefinition |
QueryDefinition defines nested fields for Query.QueryDefinition. | object |
No |
status |
- | object |
Yes |
Sample Manifest¶
This example is generated from the checked-in sample manifest at config/samples/usageapi_v1beta1_query.yaml. Replace placeholder values before applying it.
#
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
#
# Replace the OCI identifiers below before running e2e.
# Update metadata.name and spec.queryDefinition.displayName if you want to force a
# fresh create instead of binding to an existing Query with the same saved
# definition in the same compartment.
#
apiVersion: usageapi.oracle.com/v1beta1
kind: Query
metadata:
name: query-sample
spec:
compartmentId: ocid1.compartment.oc1..exampleuniqueID
queryDefinition:
displayName: "query-sample"
reportQuery:
tenantId: ocid1.tenancy.oc1..exampleuniqueID
granularity: MONTHLY
queryType: COST
groupBy:
- service
dateRangeName: LAST_THREE_MONTHS
costAnalysisUI:
graph: BARS
isCumulativeGraph: false
version: 1