def detach_role_policy(iam, policy_arn, role_name):
    """
    Detach a managed policy (specified by ARN) from a role (specified by
    friendly name).
    """
    return iam.get_response('DetachRolePolicy', {'PolicyArn': policy_arn,
        'RoleName': role_name})
