pub struct Client { /* private fields */ }Expand description
An API client for the AWS Glue Schema Registry.
Client is cheap to clone — internally it wraps an aws_sdk_glue::Client,
which is itself a clone-friendly handle backed by a shared connection pool.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn get_registry(
&self,
name: &str,
) -> Result<Registry, GetRegistryError>
pub async fn get_registry( &self, name: &str, ) -> Result<Registry, GetRegistryError>
Look up a registry by name.
Returns GetRegistryError::NotFound if the registry does not exist
in the configured account and region. Other errors (auth failures,
throttling, transport) surface as GetRegistryError::Other.
Sourcepub async fn get_schema_version_by_id(
&self,
id: Uuid,
) -> Result<SchemaVersion, GetSchemaVersionError>
pub async fn get_schema_version_by_id( &self, id: Uuid, ) -> Result<SchemaVersion, GetSchemaVersionError>
Fetch a schema version by its UUID.
This is the source-decode path: the UUID is read from the Glue
wire-format header, and the returned SchemaVersion::definition
carries the writer schema (Avro JSON, for our usage).
Glue schema-version UUIDs are globally unique within an AWS account
and this call does not scope to any registry — it returns the
matching version from anywhere the configured credentials can read.
Returns GetSchemaVersionError::NotFound only when no schema
version with this UUID exists in any visible registry. Callers that
need to enforce a specific registry must check the returned
SchemaArn themselves.
The AWS GetSchemaVersion API accepts either a SchemaVersionId
(the UUID, registry-agnostic) or SchemaId + SchemaVersionNumber,
never both — which is why looking up by name is a separate method,
Client::get_schema_version_latest_by_name.
Sourcepub async fn get_schema_version_latest_by_name(
&self,
registry_name: &str,
schema_name: &str,
) -> Result<SchemaVersion, GetSchemaVersionError>
pub async fn get_schema_version_latest_by_name( &self, registry_name: &str, schema_name: &str, ) -> Result<SchemaVersion, GetSchemaVersionError>
Fetch the latest version of a schema by (registry_name, schema_name).
This is the DDL-planning path: at CREATE SOURCE time we don’t yet
know any per-record UUIDs, so we pin the reader schema to whatever
the registry currently calls “latest”. Runtime schema resolution
for individual records still goes through
Client::get_schema_version_by_id using the UUID in each Kafka
payload’s Glue header.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more