Lazily initialized ConfigFileAuthenticationDetailsProvider instance. Wrapped in delay so that requiring this namespace does not trigger file I/O for ~/.oci/config — only dereferencing does.
Lazily initialized ConfigFileAuthenticationDetailsProvider instance. Wrapped in delay so that requiring this namespace does not trigger file I/O for ~/.oci/config — only dereferencing does.
(build clazz & args)OCI has two significant patterns for building API objects. In one pattern, a gratuitous build object is created, zero configuration is performed on the builder object at all, and all configuration is passed as arguments to the build method.
This macro cleans up (DRYs up) that pattern by making object construction look
and work like object construction using the new function. For example:
(build FileStorageClient @authentication-details)
OCI has two significant patterns for building API objects. In one pattern, a gratuitous build object is created, zero configuration is performed on the builder object at all, and all configuration is passed as arguments to the build method. This macro cleans up (DRYs up) that pattern by making object construction look and work like object construction using the `new` function. For example: (build FileStorageClient @authentication-details)
(build* clazz & args)Implementation function for build macro. Given a class and arguments,
generates code that constructs an instance of the class using the builder pattern
employed by the OCI SDK.
Implementation function for `build` macro. Given a class and arguments, generates code that constructs an instance of the class using the builder pattern employed by the OCI SDK.
(build-compute-client auth-details)Construct a ComputeClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a ComputeClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-domain-client auth-details)Construct a DomainClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a DomainClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-domain-governance-client auth-details)Construct a DomainGovernanceClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a DomainGovernanceClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-file-storage-client auth-details)Construct a FileStorageClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a FileStorageClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-generativeai-agent-client auth-details)Construct a GenerativeAiAgentClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a GenerativeAiAgentClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-generativeai-client auth-details)Construct a GenerativeAiClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a GenerativeAiClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-governance-client auth-details)Construct a GovernanceClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a GovernanceClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-identity-client auth-details)Construct an IdentityClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct an IdentityClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-link-client auth-details)Construct a LinkClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a LinkClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-organization-client auth-details)Construct an OrganizationClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct an OrganizationClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-secrets-client auth-details)Construct a SecretsClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a SecretsClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
(build-usageapi-client auth-details)Construct a UsageapiClient with the given auth provider, preserving the custom circuit-breaker configuration (HTTP 429 is excluded from failure counting; rate-limits are handled by http-request's retry logic). Caller owns the lifecycle — close it with (.close client) when done.
Construct a UsageapiClient with the given auth provider, preserving the custom circuit-breaker configuration (HTTP 429 is excluded from failure counting; rate-limits are handled by http-request's retry logic). Caller owns the lifecycle — close it with (.close client) when done.
(build-vaults-client auth-details)Construct a VaultsClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Construct a VaultsClient with the given auth provider. Caller owns the lifecycle — close it with (.close client) when done.
Lazily initialized ComputeClient instance.
Dereferencing triggers authentication via ~/.oci/config.
Lazily initialized ComputeClient instance. Dereferencing triggers authentication via `~/.oci/config`.
(compute-client-for opts)(compute-client-for opts ocid)Returns the ComputeClient for the region resolved from opts (and
optionally an ocid). Composition of resolve-region and
compute-client-for-region; the most common entry point for compute fns
that need region-aware routing.
Honors :auth-details on opts — pass a provider built via
clj-oci.auth to authenticate as something other than the default
~/.oci/config singleton.
Returns the `ComputeClient` for the region resolved from `opts` (and optionally an `ocid`). Composition of `resolve-region` and `compute-client-for-region`; the most common entry point for compute fns that need region-aware routing. Honors `:auth-details` on `opts` — pass a provider built via `clj-oci.auth` to authenticate as something other than the default `~/.oci/config` singleton.
(compute-client-for-region region-str)(compute-client-for-region region-str auth-details)Returns a ComputeClient configured for region-str (region-id like
"us-phoenix-1" or 3-letter code like "phx"). Returns the singleton
when the resolved region matches the auth provider's default; otherwise
returns a memoized per-region client.
2-arity accepts an explicit auth provider; the per-region cache key
distinguishes provider-injected clients from the default :default
slot, so callers that hold on to their provider get cache reuse.
Returns a `ComputeClient` configured for `region-str` (region-id like "us-phoenix-1" or 3-letter code like "phx"). Returns the singleton when the resolved region matches the auth provider's default; otherwise returns a memoized per-region client. 2-arity accepts an explicit auth provider; the per-region cache key distinguishes provider-injected clients from the default `:default` slot, so callers that hold on to their provider get cache reuse.
Lazily initialized DomainClient. Handles Domain CRUD + list.
Lazily initialized DomainClient. Handles Domain CRUD + list.
(domain-client-for opts)(domain-client-for opts ocid)Returns the DomainClient for the region resolved from opts and
optional ocid. Honors :auth-details on opts.
Returns the `DomainClient` for the region resolved from `opts` and optional `ocid`. Honors `:auth-details` on `opts`.
(domain-client-for-region region-str)(domain-client-for-region region-str auth-details)Returns a DomainClient configured for region-str. 2-arity accepts an
explicit auth provider.
Returns a `DomainClient` configured for `region-str`. 2-arity accepts an explicit auth provider.
Lazily initialized DomainGovernanceClient. Handles DomainGovernance CRUD + list (the ONS-notification governance attached to a Domain).
Lazily initialized DomainGovernanceClient. Handles DomainGovernance CRUD + list (the ONS-notification governance attached to a Domain).
(domain-governance-client-for opts)(domain-governance-client-for opts ocid)Returns the DomainGovernanceClient for the region resolved from opts
and optional ocid. Honors :auth-details on opts.
Returns the `DomainGovernanceClient` for the region resolved from `opts` and optional `ocid`. Honors `:auth-details` on `opts`.
(domain-governance-client-for-region region-str)(domain-governance-client-for-region region-str auth-details)Returns a DomainGovernanceClient configured for region-str. 2-arity
accepts an explicit auth provider.
Returns a `DomainGovernanceClient` configured for `region-str`. 2-arity accepts an explicit auth provider.
Lazily initialized FileStorageClient instance.
Dereferencing triggers authentication via ~/.oci/config.
Lazily initialized FileStorageClient instance. Dereferencing triggers authentication via `~/.oci/config`.
(file-storage-client-for-region region-str)(file-storage-client-for-region region-str auth-details)Returns a FileStorageClient configured for region-str. Same semantics
as compute-client-for-region — returns the singleton when the region
matches the default, otherwise a memoized per-region client. 2-arity
accepts an explicit auth provider.
Returns a `FileStorageClient` configured for `region-str`. Same semantics as `compute-client-for-region` — returns the singleton when the region matches the default, otherwise a memoized per-region client. 2-arity accepts an explicit auth provider.
Lazily initialized GenerativeAiAgentClient instance for the OCI
Generative AI Agents service management API (agents, agent endpoints,
knowledge bases, data sources, tools, provisioned capacity).
Dereferencing triggers authentication via ~/.oci/config. This is
the management/control-plane client — the agent runtime client
(chat / invoke) is a separate SDK class.
Lazily initialized GenerativeAiAgentClient instance for the OCI Generative AI Agents service management API (agents, agent endpoints, knowledge bases, data sources, tools, provisioned capacity). Dereferencing triggers authentication via `~/.oci/config`. This is the management/control-plane client — the agent runtime client (chat / invoke) is a separate SDK class.
(generativeai-agent-client-for opts)(generativeai-agent-client-for opts ocid)Returns the GenerativeAiAgentClient for the region resolved from opts
(and optionally an ocid). Composition of resolve-region and
generativeai-agent-client-for-region. Honors :auth-details on opts.
Returns the `GenerativeAiAgentClient` for the region resolved from `opts` (and optionally an `ocid`). Composition of `resolve-region` and `generativeai-agent-client-for-region`. Honors `:auth-details` on `opts`.
(generativeai-agent-client-for-region region-str)(generativeai-agent-client-for-region region-str auth-details)Returns a GenerativeAiAgentClient configured for region-str. Same
semantics as generativeai-client-for-region — returns the singleton when
the resolved region matches the auth provider's default; otherwise returns
a memoized per-region client. The Generative AI Agents service is regional;
list/get operations against agents in non-default regions require this.
2-arity accepts an explicit auth provider.
Returns a `GenerativeAiAgentClient` configured for `region-str`. Same semantics as `generativeai-client-for-region` — returns the singleton when the resolved region matches the auth provider's default; otherwise returns a memoized per-region client. The Generative AI Agents service is regional; list/get operations against agents in non-default regions require this. 2-arity accepts an explicit auth provider.
Lazily initialized GenerativeAiClient instance for the OCI Generative
AI Service Management API. Dereferencing triggers authentication via
~/.oci/config. Note: this is the management/control-plane client
(models, imported models, endpoints, dedicated AI clusters); the
inference client is a separate SDK class.
Lazily initialized GenerativeAiClient instance for the OCI Generative AI Service Management API. Dereferencing triggers authentication via `~/.oci/config`. Note: this is the management/control-plane client (models, imported models, endpoints, dedicated AI clusters); the inference client is a separate SDK class.
(generativeai-client-for opts)(generativeai-client-for opts ocid)Returns the GenerativeAiClient for the region resolved from opts (and
optionally an ocid). Composition of resolve-region and
generativeai-client-for-region. Honors :auth-details on opts.
Returns the `GenerativeAiClient` for the region resolved from `opts` (and optionally an `ocid`). Composition of `resolve-region` and `generativeai-client-for-region`. Honors `:auth-details` on `opts`.
(generativeai-client-for-region region-str)(generativeai-client-for-region region-str auth-details)Returns a GenerativeAiClient configured for region-str. Same semantics
as compute-client-for-region — returns the singleton when the region
matches the default, otherwise a memoized per-region client. The Generative
AI Service Management API is regional (12 endpoints), so cross-region
reads/writes against model OCIDs require this dispatch. 2-arity accepts
an explicit auth provider.
Returns a `GenerativeAiClient` configured for `region-str`. Same semantics as `compute-client-for-region` — returns the singleton when the region matches the default, otherwise a memoized per-region client. The Generative AI Service Management API is regional (12 endpoints), so cross-region reads/writes against model OCIDs require this dispatch. 2-arity accepts an explicit auth provider.
Lazily initialized GovernanceClient. Handles AddGovernance / RemoveGovernance on an organization's child tenancies.
Lazily initialized GovernanceClient. Handles AddGovernance / RemoveGovernance on an organization's child tenancies.
(governance-client-for opts)(governance-client-for opts ocid)Returns the GovernanceClient for the region resolved from opts and
optional ocid. Honors :auth-details on opts.
Returns the `GovernanceClient` for the region resolved from `opts` and optional `ocid`. Honors `:auth-details` on `opts`.
(governance-client-for-region region-str)(governance-client-for-region region-str auth-details)Returns a GovernanceClient configured for region-str. 2-arity accepts
an explicit auth provider.
Returns a `GovernanceClient` configured for `region-str`. 2-arity accepts an explicit auth provider.
Lazily initialized IdentityClient instance.
Dereferencing triggers authentication via ~/.oci/config.
Lazily initialized IdentityClient instance. Dereferencing triggers authentication via `~/.oci/config`.
(identity-client-for opts)(identity-client-for opts ocid)Returns the IdentityClient for the region resolved from opts (and
optionally an ocid). Composition of resolve-region and
identity-client-for-region. Honors :auth-details on opts.
Identity-service ops typically accept tenancy or compartment OCIDs,
neither of which carries a region segment — region resolution comes
from :region in opts (or the default). The ocid arity exists
for API symmetry with the compute pattern.
Returns the `IdentityClient` for the region resolved from `opts` (and optionally an `ocid`). Composition of `resolve-region` and `identity-client-for-region`. Honors `:auth-details` on `opts`. Identity-service ops typically accept tenancy or compartment OCIDs, neither of which carries a region segment — region resolution comes from `:region` in `opts` (or the default). The `ocid` arity exists for API symmetry with the compute pattern.
(identity-client-for-region region-str)(identity-client-for-region region-str auth-details)Returns an IdentityClient configured for region-str (region-id like
"us-phoenix-1" or 3-letter code like "phx"). Returns the singleton
when the resolved region matches the auth provider's default; otherwise
returns a memoized per-region client.
The OCI Identity service is regional: the endpoint at
identity.<region>.oraclecloud.com only knows about tenancies whose
home region is <region>. Cross-tenancy queries against a tenancy
whose home region differs from the caller's must use this dispatch.
2-arity accepts an explicit auth provider.
Returns an `IdentityClient` configured for `region-str` (region-id like "us-phoenix-1" or 3-letter code like "phx"). Returns the singleton when the resolved region matches the auth provider's default; otherwise returns a memoized per-region client. The OCI Identity service is regional: the endpoint at `identity.<region>.oraclecloud.com` only knows about tenancies whose home region is `<region>`. Cross-tenancy queries against a tenancy whose home region differs from the caller's must use this dispatch. 2-arity accepts an explicit auth provider.
Lazily initialized LinkClient. Handles get/list/delete on the parent↔child Link resource.
Lazily initialized LinkClient. Handles get/list/delete on the parent↔child Link resource.
(link-client-for opts)(link-client-for opts ocid)Returns the LinkClient for the region resolved from opts and
optional ocid. Honors :auth-details on opts.
Returns the `LinkClient` for the region resolved from `opts` and optional `ocid`. Honors `:auth-details` on `opts`.
(link-client-for-region region-str)(link-client-for-region region-str auth-details)Returns a LinkClient configured for region-str. 2-arity accepts an
explicit auth provider.
Returns a `LinkClient` configured for `region-str`. 2-arity accepts an explicit auth provider.
Lazily initialized OrganizationClient instance for the OCI Tenant
Manager Control Plane Organization API. Handles Organization +
OrganizationTenancy operations. Dereferencing triggers authentication
via ~/.oci/config.
Lazily initialized OrganizationClient instance for the OCI Tenant Manager Control Plane Organization API. Handles Organization + OrganizationTenancy operations. Dereferencing triggers authentication via `~/.oci/config`.
(organization-client-for opts)(organization-client-for opts ocid)Returns the OrganizationClient for the region resolved from opts (and
optionally an ocid). Composition of resolve-region and
organization-client-for-region. Honors :auth-details on opts.
Returns the `OrganizationClient` for the region resolved from `opts` (and optionally an `ocid`). Composition of `resolve-region` and `organization-client-for-region`. Honors `:auth-details` on `opts`.
(organization-client-for-region region-str)(organization-client-for-region region-str auth-details)Returns an OrganizationClient configured for region-str. Same semantics
as compute-client-for-region — returns the singleton when the region
matches the default, otherwise a memoized per-region client. 2-arity
accepts an explicit auth provider.
Returns an `OrganizationClient` configured for `region-str`. Same semantics as `compute-client-for-region` — returns the singleton when the region matches the default, otherwise a memoized per-region client. 2-arity accepts an explicit auth provider.
(resolve-region opts)(resolve-region opts ocid)Resolves the OCI region-id for a request.
Precedence:
ocid when it carries oneReturns a region string suitable for passing to
Region/fromRegionCodeOrId. Never throws; if the auth provider has no
region configured (extremely unusual), the underlying NPE will propagate.
Resolves the OCI region-id for a request.
Precedence:
1. (:region opts) when present (accepts region-id like "us-phoenix-1"
or 3-letter code like "phx" — passed through verbatim)
2. region segment of `ocid` when it carries one
3. the singleton auth provider's default region
Returns a region string suitable for passing to
`Region/fromRegionCodeOrId`. Never throws; if the auth provider has no
region configured (extremely unusual), the underlying NPE will propagate.Lazily initialized SecretsClient instance for the OCI Vault Secret
Retrieval API (GetSecretBundle, GetSecretBundleByName,
ListSecretBundleVersions). Dereferencing triggers authentication via
~/.oci/config. Distinct from vaults-client — SecretsClient is the
data-plane for fetching decrypted secret contents (endpoint
secrets.vaults.<region>.oci.oraclecloud.com, path /20190301);
VaultsClient is the management/control-plane.
Lazily initialized SecretsClient instance for the OCI Vault Secret Retrieval API (GetSecretBundle, GetSecretBundleByName, ListSecretBundleVersions). Dereferencing triggers authentication via `~/.oci/config`. Distinct from `vaults-client` — SecretsClient is the data-plane for fetching decrypted secret contents (endpoint `secrets.vaults.<region>.oci.oraclecloud.com`, path `/20190301`); VaultsClient is the management/control-plane.
(secrets-client-for opts)(secrets-client-for opts ocid)Returns the SecretsClient for the region resolved from opts (and
optionally an ocid). Composition of resolve-region and
secrets-client-for-region. Honors :auth-details on opts.
Returns the `SecretsClient` for the region resolved from `opts` (and optionally an `ocid`). Composition of `resolve-region` and `secrets-client-for-region`. Honors `:auth-details` on `opts`.
(secrets-client-for-region region-str)(secrets-client-for-region region-str auth-details)Returns a SecretsClient configured for region-str. Same semantics as
vaults-client-for-region. The Secret Retrieval API is regional and is
served by a different endpoint family
(secrets.vaults.<region>.oci.oraclecloud.com) than the management API.
2-arity accepts an explicit auth provider.
Returns a `SecretsClient` configured for `region-str`. Same semantics as `vaults-client-for-region`. The Secret Retrieval API is regional and is served by a different endpoint family (`secrets.vaults.<region>.oci.oraclecloud.com`) than the management API. 2-arity accepts an explicit auth provider.
Lazily initialized UsageapiClient instance with a custom circuit breaker
that excludes HTTP 429 from failure counting. Dereferencing triggers
authentication via ~/.oci/config.
Lazily initialized UsageapiClient instance with a custom circuit breaker that excludes HTTP 429 from failure counting. Dereferencing triggers authentication via `~/.oci/config`.
Lazily initialized VaultsClient instance for the OCI Vault Secret
Management API (Secret + SecretVersion CRUD, scheduleDeletion,
changeCompartment, rotate). Dereferencing triggers authentication via
~/.oci/config. Distinct from secrets-client — VaultsClient is the
management/control-plane (endpoint vaults.<region>.oci.oraclecloud.com,
path /20180608); SecretsClient is the data-plane for retrieving
secret bundles.
Lazily initialized VaultsClient instance for the OCI Vault Secret Management API (Secret + SecretVersion CRUD, scheduleDeletion, changeCompartment, rotate). Dereferencing triggers authentication via `~/.oci/config`. Distinct from `secrets-client` — VaultsClient is the management/control-plane (endpoint `vaults.<region>.oci.oraclecloud.com`, path `/20180608`); SecretsClient is the data-plane for retrieving secret bundles.
(vaults-client-for opts)(vaults-client-for opts ocid)Returns the VaultsClient for the region resolved from opts (and
optionally an ocid). Composition of resolve-region and
vaults-client-for-region. Honors :auth-details on opts.
Returns the `VaultsClient` for the region resolved from `opts` (and optionally an `ocid`). Composition of `resolve-region` and `vaults-client-for-region`. Honors `:auth-details` on `opts`.
(vaults-client-for-region region-str)(vaults-client-for-region region-str auth-details)Returns a VaultsClient configured for region-str. Same semantics as
compute-client-for-region — returns the singleton when the resolved region
matches the auth provider's default; otherwise returns a memoized per-region
client. The Vault Secret Management API is regional; cross-region operations
against a vault outside the auth provider's home region require this.
2-arity accepts an explicit auth provider.
Returns a `VaultsClient` configured for `region-str`. Same semantics as `compute-client-for-region` — returns the singleton when the resolved region matches the auth provider's default; otherwise returns a memoized per-region client. The Vault Secret Management API is regional; cross-region operations against a vault outside the auth provider's home region require this. 2-arity accepts an explicit auth provider.
(with-oci client request-type params)Make an OCI request/response.
Make an OCI request/response.
(with-oci-async client request-type params)Make an asynchronous OCI request/response.
Make an asynchronous OCI request/response.
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 |