获取托管政策

时间:2019-11-16 09:35:44

标签: amazon-web-services

如何获取AWS iam策略详细信息(iam描述策略)?

可能有更好的方法,这是我尝试获取的方法-

  1. 获取政策详细信息-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"
    }
}
  1. 使用策略arn和版本ID获取策略详细信息- 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
    }
}

0 个答案:

没有答案