pub struct StatementBuilder { /* private fields */ }
Expand description
A Statement
builder, used with PolicyBuilder::evaluate_statement()
.
Implementations§
Source§impl StatementBuilder
impl StatementBuilder
Sourcepub fn auto_named(&mut self) -> &mut Self
pub fn auto_named(&mut self) -> &mut Self
Set the id of this statement to a randomly generate value.
Sourcepub fn does_not_allow(&mut self) -> &mut Self
pub fn does_not_allow(&mut self) -> &mut Self
Set the effect of this statement to Deny
.
Sourcepub fn unspecified_principals(&mut self) -> &mut Self
pub fn unspecified_principals(&mut self) -> &mut Self
Unsets the principal associated with this statement
Sourcepub fn any_principal(&mut self, p_type: PrincipalType) -> &mut Self
pub fn any_principal(&mut self, p_type: PrincipalType) -> &mut Self
Sets the principal of this statement to be a wildcard.
Sourcepub fn only_this_principal(
&mut self,
p_type: PrincipalType,
arn: &str,
) -> &mut Self
pub fn only_this_principal( &mut self, p_type: PrincipalType, arn: &str, ) -> &mut Self
Sets the principal of this statement to be only this value.
Sourcepub fn only_these_principals(
&mut self,
p_type: PrincipalType,
arns: Vec<&str>,
) -> &mut Self
pub fn only_these_principals( &mut self, p_type: PrincipalType, arns: Vec<&str>, ) -> &mut Self
Sets the principal of this statement to be any of these values.
Sourcepub fn not_this_principal(
&mut self,
p_type: PrincipalType,
arn: &str,
) -> &mut Self
pub fn not_this_principal( &mut self, p_type: PrincipalType, arn: &str, ) -> &mut Self
Sets the principal of this statement to exclude this value.
Sourcepub fn not_these_principals(
&mut self,
p_type: PrincipalType,
arns: Vec<&str>,
) -> &mut Self
pub fn not_these_principals( &mut self, p_type: PrincipalType, arns: Vec<&str>, ) -> &mut Self
Sets the principal of this statement to exclude of these values.
Sourcepub fn may_perform_any_action(&mut self) -> &mut Self
pub fn may_perform_any_action(&mut self) -> &mut Self
Sets the action of this statement to be a wildcard.
Sourcepub fn may_perform_action(&mut self, action: &str) -> &mut Self
pub fn may_perform_action(&mut self, action: &str) -> &mut Self
Sets the action of this statement to be only this value.
Sourcepub fn may_perform_actions(&mut self, actions: Vec<&str>) -> &mut Self
pub fn may_perform_actions(&mut self, actions: Vec<&str>) -> &mut Self
Sets the action of this statement to be any of these values.
Sourcepub fn may_perform_no_action(&mut self) -> &mut Self
pub fn may_perform_no_action(&mut self) -> &mut Self
Sets the action of this statement to exclude the wildcard.
Sourcepub fn may_not_perform_action(&mut self, action: &str) -> &mut Self
pub fn may_not_perform_action(&mut self, action: &str) -> &mut Self
Sets the action of this statement to exclude this value.
Sourcepub fn may_not_perform_actions(&mut self, actions: Vec<&str>) -> &mut Self
pub fn may_not_perform_actions(&mut self, actions: Vec<&str>) -> &mut Self
Sets the action of this statement to exclude any of these values.
Sourcepub fn on_any_resource(&mut self) -> &mut Self
pub fn on_any_resource(&mut self) -> &mut Self
Sets the resource of this statement to be a wildcard.
Sourcepub fn on_resource(&mut self, resource: &str) -> &mut Self
pub fn on_resource(&mut self, resource: &str) -> &mut Self
Sets the resource of this statement to be only this value.
Sourcepub fn on_resources(&mut self, resources: Vec<&str>) -> &mut Self
pub fn on_resources(&mut self, resources: Vec<&str>) -> &mut Self
Sets the resource of this statement to be any of these values.
Sourcepub fn on_no_resource(&mut self) -> &mut Self
pub fn on_no_resource(&mut self) -> &mut Self
Sets the resource of this statement to exclude the wildcard.
Sourcepub fn not_on_resource(&mut self, resource: &str) -> &mut Self
pub fn not_on_resource(&mut self, resource: &str) -> &mut Self
Sets the resource of this statement to exclude this value.
Sourcepub fn not_on_resources(&mut self, resources: Vec<&str>) -> &mut Self
pub fn not_on_resources(&mut self, resources: Vec<&str>) -> &mut Self
Sets the resource of this statement to exclude any of these values.
Sourcepub fn if_condition(&mut self, condition: &mut ConditionBuilder) -> &mut Self
pub fn if_condition(&mut self, condition: &mut ConditionBuilder) -> &mut Self
Adds this condition to the statement.
Trait Implementations§
Source§impl Clone for StatementBuilder
impl Clone for StatementBuilder
Source§fn clone(&self) -> StatementBuilder
fn clone(&self) -> StatementBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more