pub struct SsmService {
client: Client,
}
Expand description
SSM service for interacting with AWS Systems Manager
This service provides a high-level interface for SSM operations with dependency injection for better performance and testability.
Fields§
§client: Client
Implementations§
Source§impl SsmService
impl SsmService
Sourcepub fn with_client(client: Client) -> Self
pub fn with_client(client: Client) -> Self
Sourcepub fn with_config(config: &SdkConfig) -> Self
pub fn with_config(config: &SdkConfig) -> Self
Sourcepub async fn get_parameter(&self, name: &str) -> Result<String>
pub async fn get_parameter(&self, name: &str) -> Result<String>
Get an SSM parameter
§Arguments
name
- The name of the parameter to get
§Returns
Returns the parameter value as a String
§Errors
SsmError::Service
- If the SSM client fails to create.SsmError::Timeout
- If the request times out.SsmError::Transport
- If the request fails to dispatch.SsmError::Build
- If the request fails to build.SsmError::InvalidResponse
- If the parameter is not found.
Sourcepub async fn put_parameter(
&self,
name: &str,
value: &str,
parameter_type: ParameterType,
overwrite: bool,
) -> Result<()>
pub async fn put_parameter( &self, name: &str, value: &str, parameter_type: ParameterType, overwrite: bool, ) -> Result<()>
Put an SSM parameter
§Arguments
name
- The name of the parameter to putvalue
- The value of the parameter to putparameter_type
- The type of the parameteroverwrite
- Whether to overwrite an existing parameter
§Returns
Returns nothing
§Errors
SsmError::Service
- If the SSM client fails to create.SsmError::Timeout
- If the request times out.SsmError::Transport
- If the request fails to dispatch.SsmError::Build
- If the request fails to build.
Auto Trait Implementations§
impl Freeze for SsmService
impl !RefUnwindSafe for SsmService
impl Send for SsmService
impl Sync for SsmService
impl Unpin for SsmService
impl !UnwindSafe for SsmService
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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.