pub struct AwsAccountId(/* private fields */);Expand description
A 12-digit AWS account id. Used as the optional bucket_owner on
MediaSource::S3 for cross-account S3Location references.
Cross-account S3 access in Bedrock requires the caller to pass the
bucket owner’s account id alongside the URI — without it the SDK
short-circuits with Confused deputy-style errors. Validating the
12-digit shape at construction surfaces the typo (or accidentally
passing the role arn) up-front.
Implementations§
Source§impl AwsAccountId
impl AwsAccountId
Sourcepub fn parse(
value: impl Into<String>,
) -> Result<AwsAccountId, AwsAccountIdError>
pub fn parse( value: impl Into<String>, ) -> Result<AwsAccountId, AwsAccountIdError>
Validate value and wrap it as an AwsAccountId.
§Errors
Returns AwsAccountIdError::NotTwelveDigits when the input is
not exactly twelve ASCII digits.
Trait Implementations§
Source§impl Clone for AwsAccountId
impl Clone for AwsAccountId
Source§fn clone(&self) -> AwsAccountId
fn clone(&self) -> AwsAccountId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AwsAccountId
impl Debug for AwsAccountId
Source§impl<'de> Deserialize<'de> for AwsAccountId
impl<'de> Deserialize<'de> for AwsAccountId
Source§fn deserialize<D>(d: D) -> Result<AwsAccountId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<AwsAccountId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for AwsAccountId
impl Display for AwsAccountId
impl Eq for AwsAccountId
Source§impl Hash for AwsAccountId
impl Hash for AwsAccountId
Source§impl PartialEq for AwsAccountId
impl PartialEq for AwsAccountId
Source§impl Serialize for AwsAccountId
impl Serialize for AwsAccountId
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AwsAccountId
Source§impl TryFrom<String> for AwsAccountId
impl TryFrom<String> for AwsAccountId
Source§type Error = AwsAccountIdError
type Error = AwsAccountIdError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<AwsAccountId, <AwsAccountId as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<AwsAccountId, <AwsAccountId as TryFrom<String>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for AwsAccountId
impl RefUnwindSafe for AwsAccountId
impl Send for AwsAccountId
impl Sync for AwsAccountId
impl Unpin for AwsAccountId
impl UnsafeUnpin for AwsAccountId
impl UnwindSafe for AwsAccountId
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.