如何获取AWS iam策略详细信息(iam描述策略)?
可能有更好的方法,这是我尝试获取的方法-
aws iam get-policy --policy-arn arn:aws:iam::AWS_ACCOUNT_ID:policy/POLICY_NAME
{
"Policy": {
"PolicyName": "POLICY_NAME",
"Description": "This is Description",
"PermissionsBoundaryUsageCount": 0,
"CreateDate": "2019-05-13T13:09:12Z",
"AttachmentCount": 1,
"IsAttachable": true,
"PolicyId": "ANPAUE**********",
"DefaultVersionId": "v4",
"Path": "/",
"Arn": "arn:aws:iam::AWS_ACCOUNT_ID:policy/POLICY_NAME",
"UpdateDate": "2019-05-17T03:40:22Z"
}
}
aws iam get-policy-version --policy-arn arn:aws:iam::AWS_ACCOUNT_ID:policy/POLICY_NAME --version-id v4
"PolicyVersion": {
"CreateDate": "2019-05-17T03:40:22Z",
"VersionId": "v4",
"Document": {
"Version": "2012-10-17",
"Statement": [
...
]
},
"IsDefaultVersion": true
}
}