Skip to main content

TemporaryCredentialClient

Struct TemporaryCredentialClient 

Source
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

Source

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.

Source

pub fn new(client: TemporaryCredentialClientBase) -> Self

Creates a client wrapping an existing generated low-level client.

Source

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.

Source

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.

Source

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 a VolumeReference::Id (UUID, preferred when known) or a VolumeReference::Name in three-level dotted form (catalog.schema.volume). Names are resolved to IDs by issuing a GetVolume request.
  • 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.

Source

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

Source§

fn clone(&self) -> TemporaryCredentialClient

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more