pub struct Policy {
pub version: Option<Version>,
pub id: Option<String>,
pub statement: OneOrAll<Statement>,
}
Expand description
An IAM policy resource.
Fields§
§version: Option<Version>
The IAM version of the policy grammar used in this resource
id: Option<String>
The identifier of this policy, if any
statement: OneOrAll<Statement>
One or more policy statements
Implementations§
Source§impl Policy
impl Policy
Sourcepub fn new(statement: OneOrAll<Statement>) -> Self
pub fn new(statement: OneOrAll<Statement>) -> Self
Create a minimal Policy
with only required fields.
Sourcepub fn default_version() -> Version
pub fn default_version() -> Version
The default version for a policy. Specifically according to the IAM documentation if no version is specified in a document it is assumed to be the 2008 version.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Policy
impl<'de> Deserialize<'de> for Policy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&mut PolicyBuilder> for Policy
impl From<&mut PolicyBuilder> for Policy
Source§fn from(pb: &mut PolicyBuilder) -> Self
fn from(pb: &mut PolicyBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
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