pub struct TemporaryCredentialClient { /* private fields */ }Expand description
Client for vending temporary storage credentials for tables, volumes, and paths.
Wraps the generated low-level client with name → UUID resolution: callers may
pass a fully qualified name or a UUID, and the client issues the lookup needed
to obtain the ID the credential endpoint requires. Prefer
UnityCatalogClient::temporary_credentials.
Implementations§
Source§impl TemporaryCredentialClient
impl TemporaryCredentialClient
Sourcepub fn new_with_url(client: Transport, base_url: Url) -> Self
pub fn new_with_url(client: Transport, base_url: Url) -> Self
Creates a client from the per-target Transport (carrying auth) and a base URL.
The base URL is normalized to end in / so it joins cleanly with the
relative endpoint paths.
Sourcepub fn new(client: TemporaryCredentialClientBase) -> Self
pub fn new(client: TemporaryCredentialClientBase) -> Self
Creates a client wrapping an existing generated low-level client.
Sourcepub async fn temporary_table_credential(
&self,
table: impl Into<TableReference>,
operation: TableOperation,
) -> Result<(TemporaryCredential, Uuid)>
pub async fn temporary_table_credential( &self, table: impl Into<TableReference>, operation: TableOperation, ) -> Result<(TemporaryCredential, Uuid)>
Gets a temporary credential for reading or writing to a table.
§Arguments
table: The table to get a temporary credential for.operation: The operation to perform on the table.
Returns a tuple of the temporary credential and the resolved table ID.
Sourcepub async fn temporary_path_credential(
&self,
path: impl IntoUrl,
operation: PathOperation,
dry_run: impl Into<Option<bool>>,
) -> Result<(TemporaryCredential, Url)>
pub async fn temporary_path_credential( &self, path: impl IntoUrl, operation: PathOperation, dry_run: impl Into<Option<bool>>, ) -> Result<(TemporaryCredential, Url)>
Gets a temporary credential for reading or writing to a storage path.
Pass dry_run to validate access without vending a usable credential.
Returns a tuple of the temporary credential and the parsed path URL.
Sourcepub async fn temporary_volume_credential(
&self,
volume: impl Into<VolumeReference>,
operation: VolumeOperation,
) -> Result<(TemporaryCredential, Uuid)>
pub async fn temporary_volume_credential( &self, volume: impl Into<VolumeReference>, operation: VolumeOperation, ) -> Result<(TemporaryCredential, Uuid)>
Gets a temporary credential for reading or writing to a volume.
§Arguments
volume: The volume to get a temporary credential for. May be either aVolumeReference::Id(UUID, preferred when known) or aVolumeReference::Namein three-level dotted form (catalog.schema.volume). Names are resolved to IDs by issuing aGetVolumerequest.operation: Whether the credentials should grant read-only or read-write access.
Returns a tuple of the temporary credential and the resolved volume ID.
The Unity Catalog metastore must have external_access_enabled = true
and the caller must hold EXTERNAL_USE_SCHEMA on the parent schema.
Sourcepub async fn temporary_model_version_credential(
&self,
full_name: impl Into<String>,
version: i64,
operation: ModelVersionOperation,
) -> Result<TemporaryCredential>
pub async fn temporary_model_version_credential( &self, full_name: impl Into<String>, version: i64, operation: ModelVersionOperation, ) -> Result<TemporaryCredential>
Gets a temporary credential for reading or writing to a model version.
§Arguments
full_name: The three-level (catalog.schema.model) name of the parent registered model.version: The integer version number of the model version.operation: Whether the credentials should grant read-only or read-write access.
The Unity Catalog metastore must have external_access_enabled = true and
the caller must hold EXTERNAL_USE_SCHEMA on the parent schema.
Trait Implementations§
Source§impl Clone for TemporaryCredentialClient
impl Clone for TemporaryCredentialClient
Source§fn clone(&self) -> TemporaryCredentialClient
fn clone(&self) -> TemporaryCredentialClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more