pub struct AwsResolver { /* private fields */ }Expand description
Resolves secrets from AWS Secrets Manager
Mode is auto-negotiated based on environment:
- If
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYare set → HTTP mode - Otherwise → CLI mode (uses
awsCLI)
The source field in SecretSpec can be:
- A simple secret ID (name or ARN)
- A JSON-encoded
AwsSecretConfigfor advanced options
Implementations§
Source§impl AwsResolver
impl AwsResolver
Sourcepub async fn new() -> Result<Self, SecretError>
pub async fn new() -> Result<Self, SecretError>
Create a new AWS resolver with auto-detected mode
If AWS credentials are available in environment, initializes HTTP client. Otherwise, CLI mode will be used.
§Errors
Returns error if AWS configuration cannot be loaded.
Trait Implementations§
Source§impl Debug for AwsResolver
impl Debug for AwsResolver
Source§impl SecretResolver for AwsResolver
impl SecretResolver for AwsResolver
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Get the provider name for this resolver. Read more
Source§fn supports_native_batch(&self) -> bool
fn supports_native_batch(&self) -> bool
Check if this resolver supports native batch resolution. Read more
Source§fn resolve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
spec: &'life2 SecretSpec,
) -> Pin<Box<dyn Future<Output = Result<String, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
spec: &'life2 SecretSpec,
) -> Pin<Box<dyn Future<Output = Result<String, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolve a single secret by name and spec. Read more
Source§fn resolve_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
secrets: &'life1 HashMap<String, SecretSpec>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, SecureSecret>, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
secrets: &'life1 HashMap<String, SecretSpec>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, SecureSecret>, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve multiple secrets in batch with concurrent execution. Read more
Source§fn resolve_secure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
spec: &'life2 SecretSpec,
) -> Pin<Box<dyn Future<Output = Result<SecureSecret, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn resolve_secure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
spec: &'life2 SecretSpec,
) -> Pin<Box<dyn Future<Output = Result<SecureSecret, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Resolve a single secret returning a secure value. Read more
Auto Trait Implementations§
impl Freeze for AwsResolver
impl !RefUnwindSafe for AwsResolver
impl Send for AwsResolver
impl Sync for AwsResolver
impl Unpin for AwsResolver
impl !UnwindSafe for AwsResolver
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
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.