deletePolicy

Deletes the specified policy from your organization. Before you perform this operation, you must first detach the policy from all organizational units (OUs), roots, and accounts.

This operation can be called only from the organization's management account or by a member account that is a delegated administrator for an Amazon Web Services service.

Samples


fun main() { 
   //sampleStart 
   // The following example shows how to delete a policy from an organization. The example assumes that
// you previously detached the policy from all entities
organizationsClient.deletePolicy {
    policyId = "p-examplepolicyid111"
} 
   //sampleEnd
}