pub struct ShieldState {
pub subscription: Option<Subscription>,
pub protections: HashMap<String, Protection>,
pub tags: HashMap<String, Vec<Tag>>,
}Expand description
In-memory state for the Shield service.
Fields§
§subscription: Option<Subscription>The Shield Advanced subscription, if any.
protections: HashMap<String, Protection>Protections keyed by protection ID.
Tags keyed by resource ARN.
Implementations§
Source§impl ShieldState
impl ShieldState
pub fn create_subscription( &mut self, account_id: &str, region: &str, ) -> Result<&Subscription, ShieldError>
pub fn describe_subscription(&self) -> Result<&Subscription, ShieldError>
pub fn create_protection( &mut self, name: &str, resource_arn: &str, account_id: &str, region: &str, ) -> Result<&Protection, ShieldError>
pub fn describe_protection( &self, protection_id: Option<&str>, resource_arn: Option<&str>, ) -> Result<&Protection, ShieldError>
pub fn delete_protection( &mut self, protection_id: &str, ) -> Result<(), ShieldError>
pub fn list_protections(&self) -> Vec<&Protection>
Trait Implementations§
Source§impl Debug for ShieldState
impl Debug for ShieldState
Source§impl Default for ShieldState
impl Default for ShieldState
Source§fn default() -> ShieldState
fn default() -> ShieldState
Returns the “default value” for a type. Read more
Source§impl From<&ShieldState> for ShieldStateView
impl From<&ShieldState> for ShieldStateView
Source§fn from(state: &ShieldState) -> Self
fn from(state: &ShieldState) -> Self
Converts to this type from the input type.
Source§impl From<ShieldStateView> for ShieldState
impl From<ShieldStateView> for ShieldState
Source§fn from(view: ShieldStateView) -> Self
fn from(view: ShieldStateView) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ShieldState
impl RefUnwindSafe for ShieldState
impl Send for ShieldState
impl Sync for ShieldState
impl Unpin for ShieldState
impl UnsafeUnpin for ShieldState
impl UnwindSafe for ShieldState
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.