[−][src]Struct aws_iam::model::types::Statement
The Statement element is the main element for a policy. This element is required. It can
include multiple elements (see the subsequent sections in this page). The Statement element
contains an array of individual statements. Each individual statement is a JSON block
enclosed in braces { }
.
Fields
sid: Option<String>
The Sid (statement ID) is an optional identifier that you provide for the policy statement. You can assign a Sid value to each statement in a statement array. In services that let you specify an ID element, such as SQS and SNS, the Sid value is just a sub-ID of the policy document's ID. In IAM, the Sid value must be unique within a JSON policy
In IAM, the Sid is not exposed in the IAM API. You can't retrieve a particular statement based on this ID.
principal: Option<Principal>
The principals, or not-principals to match as part of this statement.
effect: Effect
The effect, outcome, if this statement is matched.
action: Action
The actions, or not-actions to match as part of this statement.
resource: Resource
The resources, or not-resources to match as part of this statement.
condition: Option<HashMap<ConditionOperator, HashMap<QString, OneOrAll<ConditionValue>>>>
Any condition(s) attached to this statement.
Methods
impl Statement
[src]
pub fn new(effect: Effect, action: Action, resource: Resource) -> Self
[src]
Create a minimal Statement
with only required fields.
Example
use aws_iam::model::*; use aws_iam::model::builder::*; use std::str::FromStr; let statement = Statement::new( Effect::Allow, Action::Action(OneOrAny::One("s3:ListBucket".parse().unwrap())), Resource::this("arn:aws:s3:::example_bucket".to_string()), );
pub fn new_sid() -> String
[src]
Construct a new, random, unique, ID for a Statement.
Trait Implementations
impl<'_> From<&'_ mut StatementBuilder> for Statement
[src]
fn from(sb: &mut StatementBuilder) -> Self
[src]
impl Clone for Statement
[src]
impl Debug for Statement
[src]
impl Serialize for Statement
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Statement
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
impl RefUnwindSafe for Statement
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,