module AWS::IAM::PolicyCollection

def has_key? name

Returns:
  • (Boolean) - True if there is a policy with the given name.

Parameters:
  • name (String) -- The name of the policy to check.
def has_key? name
  get_policy(:policy_name => name)
  true
rescue Errors::NoSuchEntity => e
  false
end