The Id element is used by some services. For example, here's a KMS key generated by CloudTrail that includes an Id:
It's currently not possible to represent such a policy with a PolicyDocument. Instead, you have to convert the PolicyDocument to JSON and then append the Id field yourself.
The
Id
element is used by some services. For example, here's a KMS key generated by CloudTrail that includes anId
:It's currently not possible to represent such a policy with a
PolicyDocument
. Instead, you have to convert thePolicyDocument
to JSON and then append theId
field yourself.See https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_id.html.