io.enterpriseai.resources.CredentialsClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/CredentialsClient.java. Back to the Java SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class CredentialsClient
Credential Broker short lived leases.
Constructor CredentialsClient
CredentialsClient(Transport transport)
Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
transport | Transport | yes | Transport shared by the sub-clients of one client. |
CredentialsClient.lease
JsonNode lease(Object body)
Obtain a credential lease. Issues a short lived lease on a connector instead of its secret (201): lease_id, token (shown once), scopes, expires_at, ttl_seconds. Requested scopes must be declared by the connector (403 scope_not_allowed; default: all of them); the connector must be active (409 connector_disabled). With on_behalf_of, the user must hold the relation can_invoke on the connector (403 relation_required). Needs tenant_admin, developer or agent. Audited as credential.lease.
Route: /v1/credentials/broker/lease (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Connector, scopes, lifetime, run and user acted for. |
Returns: JsonNode. Decoded JSON answer of the operation "Obtain a credential lease".
Raises: the typed errors of the transport (Errors).
CredentialsClient.lease
JsonNode lease(Object body, RequestOptions options)
Obtain a credential lease. Issues a short lived lease on a connector instead of its secret (201): lease_id, token (shown once), scopes, expires_at, ttl_seconds. Requested scopes must be declared by the connector (403 scope_not_allowed; default: all of them); the connector must be active (409 connector_disabled). With on_behalf_of, the user must hold the relation can_invoke on the connector (403 relation_required). Needs tenant_admin, developer or agent. Audited as credential.lease.
Route: /v1/credentials/broker/lease (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Connector, scopes, lifetime, run and user acted for. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Obtain a credential lease".
Raises: the typed errors of the transport (Errors).