gravitino.client.metadata_object_credential_operations.MetadataObjectCredentialOperations¶
- class gravitino.client.metadata_object_credential_operations.MetadataObjectCredentialOperations(metalake_name: str, metadata_object: MetadataObject, rest_client: HTTPClient)¶
Bases:
SupportsCredentials
- __init__(metalake_name: str, metadata_object: MetadataObject, rest_client: HTTPClient)¶
Methods
__init__
(metalake_name, metadata_object, ...)get_credential
(credential_type)Retrieves Credential object based on the specified credential type.
Retrieves a List of Credential objects.
to_credential
(credential_dto)to_credentials
(credentials)- get_credential(credential_type: str) Credential ¶
Retrieves Credential object based on the specified credential type.
- Args:
credential_type: The type of the credential like s3-token, s3-secret-key which are defined in the specific credentials.
- Returns:
An Credential object with the specified credential type.
- Raises:
NoSuchCredentialException If the specific credential cannot be found. IllegalStateException if multiple credential can be found.
- get_credentials() List[Credential] ¶
Retrieves a List of Credential objects.
- Returns:
A List of Credential objects. In most cases the array only contains
one credential. If the object like Fileset contains multiple locations for different storages like HDFS, S3, the array will contain multiple credentials. The array could be empty if you request a credential for a catalog but the credential provider couldn’t generate the credential for the catalog, like S3 token credential provider only generate credential for the specific object like Fileset,Table. There will be at most one credential for one credential type.