'Creates a new policy that contains the necessary attributes
depending on the policy type. Policies are settings that are
saved for your load balancer and that can be applied to the
front-end listener, or the back-end application server.'

def create_lb_policy(self, lb_name, policy_name, policy_type, policy_attributes):

    params = {'LoadBalancerName': lb_name, 'PolicyName': policy_name, 'PolicyTypeName': policy_type}
    for (index, (name, value)) in enumerate(six.iteritems(policy_attributes), 1):
        params[('PolicyAttributes.member.%d.AttributeName' % index)] = name
        params[('PolicyAttributes.member.%d.AttributeValue' % index)] = value
    else:
        params['PolicyAttributes'] = ''
    return self.get_status('CreateLoadBalancerPolicy', params)
