Skip to main content

SecretsManagerState

Struct SecretsManagerState 

Source
pub struct SecretsManagerState {
    pub secrets: HashMap<String, Secret>,
}

Fields§

§secrets: HashMap<String, Secret>

Implementations§

Source§

impl SecretsManagerState

Source

pub fn create_secret( &mut self, name: &str, description: &str, secret_string: Option<&str>, secret_binary: Option<Vec<u8>>, account_id: &str, region: &str, tags: HashMap<String, String>, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn get_secret_value( &self, secret_id: &str, ) -> Result<(&Secret, &SecretVersion), SecretsManagerError>

Source

pub fn get_secret_value_by_version_id( &self, secret_id: &str, version_id: &str, ) -> Result<(&Secret, &SecretVersion), SecretsManagerError>

Source

pub fn get_secret_value_by_stage( &self, secret_id: &str, version_stage: Option<&str>, ) -> Result<(&Secret, &SecretVersion), SecretsManagerError>

Source

pub fn put_secret_value( &mut self, secret_id: &str, secret_string: Option<&str>, secret_binary: Option<Vec<u8>>, ) -> Result<(&Secret, String), SecretsManagerError>

Source

pub fn put_secret_value_ext( &mut self, secret_id: &str, secret_string: Option<&str>, secret_binary: Option<Vec<u8>>, client_request_token: Option<&str>, version_stages: Option<&[String]>, ) -> Result<(&Secret, String, Vec<String>), SecretsManagerError>

Source

pub fn delete_secret( &mut self, secret_id: &str, recovery_window_in_days: Option<i64>, force_delete: bool, account_id: &str, region: &str, ) -> Result<Secret, SecretsManagerError>

Source

pub fn restore_secret( &mut self, secret_id: &str, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn describe_secret( &self, secret_id: &str, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn list_secrets(&self) -> Vec<&Secret>

Source

pub fn update_secret( &mut self, secret_id: &str, description: Option<&str>, secret_string: Option<&str>, secret_binary: Option<Vec<u8>>, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn batch_get_secret_value( &self, secret_ids: &[String], ) -> Result<Vec<(&Secret, &SecretVersion)>, Vec<(String, SecretsManagerError)>>

Source

pub fn cancel_rotate_secret( &mut self, secret_id: &str, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn get_random_password( &self, password_length: Option<i64>, exclude_characters: Option<&str>, exclude_numbers: bool, exclude_punctuation: bool, exclude_uppercase: bool, exclude_lowercase: bool, include_space: bool, require_each_included_type: bool, ) -> Result<String, SecretsManagerError>

Source

pub fn put_resource_policy( &mut self, secret_id: &str, resource_policy: &str, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn get_resource_policy( &self, secret_id: &str, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn delete_resource_policy( &mut self, secret_id: &str, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn list_secret_version_ids( &self, secret_id: &str, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn rotate_secret( &mut self, secret_id: &str, rotation_lambda_arn: Option<&str>, rotation_rules: Option<RotationRules>, ) -> Result<(&Secret, String), SecretsManagerError>

Source

pub fn tag_resource( &mut self, secret_id: &str, tags: HashMap<String, String>, ) -> Result<(), SecretsManagerError>

Source

pub fn untag_resource( &mut self, secret_id: &str, tag_keys: &[String], ) -> Result<(), SecretsManagerError>

Source

pub fn update_secret_version_stage( &mut self, secret_id: &str, version_stage: &str, move_to_version_id: Option<&str>, remove_from_version_id: Option<&str>, ) -> Result<&Secret, SecretsManagerError>

Source

pub fn replicate_secret_to_regions( &mut self, secret_id: &str, regions: &[String], ) -> Result<&Secret, SecretsManagerError>

Source

pub fn remove_regions_from_replication( &mut self, secret_id: &str, regions: &[String], ) -> Result<&Secret, SecretsManagerError>

Trait Implementations§

Source§

impl Debug for SecretsManagerState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SecretsManagerState

Source§

fn default() -> SecretsManagerState

Returns the “default value” for a type. Read more
Source§

impl From<&SecretsManagerState> for SecretsmanagerStateView

Source§

fn from(state: &SecretsManagerState) -> Self

Converts to this type from the input type.
Source§

impl From<SecretsmanagerStateView> for SecretsManagerState

Source§

fn from(view: SecretsmanagerStateView) -> Self

Converts to this type from the input type.

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<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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<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