@Generated public class SecretsUcAPI extends Object
Secrets can be managed using standard Unity Catalog permissions and are scoped to a schema within a catalog.
| Constructor and Description |
|---|
SecretsUcAPI(ApiClient apiClient)
Regular-use constructor
|
SecretsUcAPI(SecretsUcService mock)
Constructor for mocks
|
| Modifier and Type | Method and Description |
|---|---|
Secret |
createSecret(CreateSecretRequest request)
Creates a new secret in Unity Catalog.
|
void |
deleteSecret(DeleteSecretRequest request)
Deletes a secret by its three-level (fully qualified) name.
|
void |
deleteSecret(String fullName) |
Secret |
getSecret(GetSecretRequest request)
Gets a secret by its three-level (fully qualified) name.
|
Secret |
getSecret(String fullName) |
SecretsUcService |
impl() |
Iterable<Secret> |
listSecrets(ListSecretsRequest request)
Lists secrets in Unity Catalog.
|
Secret |
updateSecret(UpdateSecretRequest request)
Updates an existing secret in Unity Catalog.
|
public SecretsUcAPI(ApiClient apiClient)
public SecretsUcAPI(SecretsUcService mock)
public Secret createSecret(CreateSecretRequest request)
You must be the owner of the parent schema or have the **CREATE_SECRET** and **USE SCHEMA** privileges on the parent schema and **USE CATALOG** on the parent catalog.
The secret is stored in the specified catalog and schema, and the **value** field contains the sensitive data to be securely stored.
public void deleteSecret(String fullName)
public void deleteSecret(DeleteSecretRequest request)
You must be the owner of the secret or a metastore admin.
public Secret getSecret(GetSecretRequest request)
You must be a metastore admin, the owner of the secret, or have the **MANAGE** privilege on the secret.
The secret value isn't returned by default. To retrieve it, you must also have the **READ_SECRET** privilege and set **include_value** to true in the request.
public Iterable<Secret> listSecrets(ListSecretsRequest request)
You must be a metastore admin, the owner of the secret, or have the **MANAGE** privilege on the secret.
Both **catalog_name** and **schema_name** must be specified together to filter secrets within a specific schema. Results are paginated; use the **page_token** field from the response to retrieve subsequent pages.
public Secret updateSecret(UpdateSecretRequest request)
You must be the owner of the secret or a metastore admin. If you are a metastore admin, only the **owner** field can be changed.
Use the **update_mask** field to specify which fields to update. Supported updatable fields include **value**, **comment**, **owner**, and **expire_time**.
public SecretsUcService impl()
Copyright © 2026. All rights reserved.