Closed christiangrenzel closed 6 years ago
Do you mean something like this?
>>> from awacs.aws import Principal
>>> p = Principal("AWS", ["arn:aws:iam::AWS-account-ID1:root", "arn:aws:iam::AWS-account-ID2:root"])
>>> print p.data
{'AWS': ['arn:aws:iam::AWS-account-ID1:root', 'arn:aws:iam::AWS-account-ID2:root']}
>>> print p.to_json()
{
"AWS": [
"arn:aws:iam::AWS-account-ID1:root",
"arn:aws:iam::AWS-account-ID2:root"
]
}
If so, it already supports it. If not, please give more details on what you'd like to see from awacs and the JSON output.
Omg yes! that's what I need. Sorry for not seeing this.
Hi. The Statement class only allows a single principal as argument. When a list of principals has the same statement, I have to repeat the statement for each principal instead of creating a single statement with a list of principals. Would be cleaner to pass a list of principals and have a single statement for a list of principals. Thanks!