Crate aws-iam

A Rust crate for dealing with AWS IAM Policy resources.

MIT License Minimum Rust Version crates.io docs.rs GitHub stars

Model

TBD

Example

```rust use aws_iam::model::*;

let policy: Policy = PolicyBuilder::new() .named("confidential-data-access") .evaluatestatement( StatementBuilder::new() .autonamed() .allows() .unspecifiedprincipals() .mayperformactions(vec!["s3:List*", "s3:Get*"]) .onresources(vec![ "arn:aws:s3:::confidential-data", "arn:aws:s3:::confidential-data/*", ]) .ifcondition( ConditionBuilder::newbool() .righthandbool("aws:MultiFactorAuthPresent", true) .if_exists(), ), ) .into(); println!("{}", policy); ```

Results in the following JSON.

json { "Id": "confidential-data-access", "Statement": { "Sid": "sid_e4d7f2d3-cfed-4346-9c5e-a8e9e38ef44f", "Effect": "Allow", "Action": [ "s3:List*", "s3:Get*" ], "Resource": [ "arn:aws:s3:::confidential-data", "arn:aws:s3:::confidential-data/*" ], "Condition": { "BoolIfExists": { "aws:MultiFactorAuthPresent": "true" } } } }

policy Command-Line Tool

TBD

Changes

Version 0.1.0

Version 0.1.0

TODO

  1. Add Latex output to policy.