Data Source: awsIamPolicy
This data source can be used to fetch information about a specific IAM policy.
Example Usage
By ARN
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsIamPolicy.DataAwsIamPolicy(this, "example", {
arn: "arn:aws:iam::123456789012:policy/UsersManageOwnCredentials",
});
By Name
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsIamPolicy.DataAwsIamPolicy(this, "example", {
name: "test_policy",
});
Argument Reference
arn- (Optional) ARN of the IAM policy. Conflicts withnameandpathPrefix.name- (Optional) Name of the IAM policy. Conflicts witharn.pathPrefix- (Optional) Prefix of the path to the IAM policy. Defaults to a slash (/). Conflicts witharn.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn- ARN of the policy.path- Path to the policy.description- Description of the policy.policy- Policy document of the policy.policyId- Policy's ID.tags- Key-value mapping of tags for the IAM Policy.