OCI Usage API built on oci-build.
Where clj-oci.usageapi hand-rolls builders for each SDK type, this namespace
uses the introspected schema (oci-doc) and oci-build to construct request
objects from plain Clojure maps. Enum keywords, nested builders, and
List<T> elements are all handled automatically.
OCI Usage API built on `oci-build`. Where `clj-oci.usageapi` hand-rolls builders for each SDK type, this namespace uses the introspected schema (`oci-doc`) and `oci-build` to construct request objects from plain Clojure maps. Enum keywords, nested builders, and List<T> elements are all handled automatically.
(filter-compartment-id compartment-id)Returns a filter params map that restricts results to compartment-id.
Returns a filter params map that restricts results to `compartment-id`.
(filter-resource-id resource-id)Returns a filter params map that restricts results to resource-id.
Returns a filter params map that restricts results to `resource-id`.
(request-summarized-usages tenant-id granularity start-time end-time)(request-summarized-usages tenant-id granularity start-time end-time params)Fetches summarized usage data from the OCI Usage API.
Arguments:
tenant-id — OCI tenancy OCID
granularity — :hourly, :daily, :monthly, or :total
start-time — java.util.Date
end-time — java.util.Date
params — (optional) map of additional detail fields, e.g.:
{:filter {:operator :and :dimensions [{:key "k" :value "v"}]}
:groupBy ["service"]}
Returns the usage items (from :usageAggregation :items) or nil on failure.
Results are cached via service.cache/call-cached-api with value-aware cache
keys — different params (e.g. resource-id filters) produce distinct cache
entries, eliminating cache contamination.
Fetches summarized usage data from the OCI Usage API.
Arguments:
`tenant-id` — OCI tenancy OCID
`granularity` — :hourly, :daily, :monthly, or :total
`start-time` — java.util.Date
`end-time` — java.util.Date
`params` — (optional) map of additional detail fields, e.g.:
{:filter {:operator :and :dimensions [{:key "k" :value "v"}]}
:groupBy ["service"]}
Returns the usage items (from :usageAggregation :items) or nil on failure.
Results are cached via `service.cache/call-cached-api` with value-aware cache
keys — different `params` (e.g. resource-id filters) produce distinct cache
entries, eliminating cache contamination.(summarized-usages-details params)Builds a RequestSummarizedUsagesDetails from a Clojure map.
Required keys: :tenantId, :granularity, :timeUsageStarted, :timeUsageEnded
Granularity accepts keywords — :hourly, :daily, :monthly, :total — which
oci-build resolves via the enum registry.
Optional keys mirror the SDK builder setters: :compartmentDepth, :filter, :groupBy, :queryType, etc.
Nested maps are recursively built. For example:
{:filter {:operator :and :dimensions [{:key "resourceId" :value "ocid1.r"}]}}
Builds a `RequestSummarizedUsagesDetails` from a Clojure map.
Required keys:
:tenantId, :granularity, :timeUsageStarted, :timeUsageEnded
Granularity accepts keywords — :hourly, :daily, :monthly, :total — which
`oci-build` resolves via the enum registry.
Optional keys mirror the SDK builder setters:
:compartmentDepth, :filter, :groupBy, :queryType, etc.
Nested maps are recursively built. For example:
{:filter {:operator :and
:dimensions [{:key "resourceId" :value "ocid1.r"}]}}(summarized-usages-request details opts)Builds a RequestSummarizedUsagesRequest wrapping the given details object.
Uses builder/to-java with :limit pre-coerced to Integer to satisfy
the SDK setter type while remaining compatible with cloverage instrumentation.
opts may include :opcRequestId and :limit (defaults provided).
Builds a `RequestSummarizedUsagesRequest` wrapping the given details object. Uses `builder/to-java` with `:limit` pre-coerced to `Integer` to satisfy the SDK setter type while remaining compatible with cloverage instrumentation. `opts` may include :opcRequestId and :limit (defaults provided).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |