batchGetPolicy
Retrieves information about a group (batch) of policies.
The BatchGetPolicy
operation doesn't have its own IAM permission. To authorize this operation for Amazon Web Services principals, include the permission verifiedpermissions:GetPolicy
in their IAM policies.
Samples
import aws.sdk.kotlin.services.verifiedpermissions.model.BatchGetPolicyInputItem
fun main() {
//sampleStart
// The following example retrieves information about the specified policy contained in the specified
// policy store. In this example, the requested policy is a template linked policy, so it returns the ID of
// the policy template, and the specific principal and resource used by this policy.
val resp = verifiedPermissionsClient.batchGetPolicy {
requests = listOf<BatchGetPolicyInputItem>(
BatchGetPolicyInputItem {
policyId = "PWv5M6d5HePx3gVVLKY1nK"
policyStoreId = "ERZeDpRc34dkYZeb6FZRVC"
},
BatchGetPolicyInputItem {
policyId = "LzFn6KgLWvv4Mbegus35jn"
policyStoreId = "ERZeDpRc34dkYZeb6FZRVC"
},
BatchGetPolicyInputItem {
policyId = "77gLjer8H5o3mvrnMGrSL5"
policyStoreId = "ERZeDpRc34dkYZeb6FZRVC"
}
)
}
//sampleEnd
}