listAccountsWithInvalidEffectivePolicy

Lists all the accounts in an organization that have invalid effective policies. An invalid effective policy is an effective policy that fails validation checks, resulting in the effective policy not being fully enforced on all the intended accounts within an organization.

You can only call this operation from the management account or a member account that is a delegated administrator.

Samples

import aws.sdk.kotlin.services.organizations.model.EffectivePolicyType

fun main() { 
   //sampleStart 
   // The following example shows you how to request a list of the accounts in an organization having
// invalid effective policy for a policy type
val resp = organizationsClient.listAccountsWithInvalidEffectivePolicy {
    policyType = EffectivePolicyType.fromValue("BACKUP_POLICY")
} 
   //sampleEnd
}