Given a vpc_id, creates a network acl.

    Returns the network acl id if successful, otherwise returns False.

    .. versionchanged:: 2015.8.0
        Added vpc_name, subnet_id, and subnet_name arguments

    CLI Example:

    .. code-block:: bash

        salt myminion boto_vpc.create_network_acl 'vpc-6b1fe402'

def create_network_acl(vpc_id=None, vpc_name=None, network_acl_name=None,
                       subnet_id=None, subnet_name=None, tags=None,
                       region=None, key=None, keyid=None, profile=None):
    '''
    Given a vpc_id, creates a network acl.

    Returns the network acl id if successful, otherwise returns False.

    .. versionchanged:: 2015.8.0
        Added vpc_name, subnet_id, and subnet_name arguments

    CLI Example:

    .. code-block:: bash

        salt myminion boto_vpc.create_network_acl 'vpc-6b1fe402'

    '''

    _id = vpc_name or vpc_id

    try:
        vpc_id = check_vpc(vpc_id, vpc_name, region, key, keyid, profile)
    except BotoServerError as e:
        return {'created': False, 'error': __utils__['boto.get_error'](e)}

    if not vpc_id:
        return {'created': False,
                'error': {'message': 'VPC {0} does not exist.'.format(_id)}}

    if all((subnet_id, subnet_name)):
        raise SaltInvocationError('Only one of subnet_name or subnet_id may be '
                                  'provided.')
    if subnet_name:
        subnet_id = _get_resource_id('subnet', subnet_name,
                                     region=region, key=key,
                                     keyid=keyid, profile=profile)
        if not subnet_id:
            return {'created': False,
                    'error': {'message': 'Subnet {0} does not exist.'.format(subnet_name)}}
    elif subnet_id:
        if not _get_resource('subnet', resource_id=subnet_id,
                             region=region, key=key, keyid=keyid, profile=profile):
            return {'created': False,
                    'error': {'message': 'Subnet {0} does not exist.'.format(subnet_id)}}

    r = _create_resource('network_acl', name=network_acl_name, vpc_id=vpc_id,
                         region=region, key=key, keyid=keyid,
                         profile=profile)

    if r.get('created') and subnet_id:
        try:
            conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
            association_id = conn.associate_network_acl(r['id'], subnet_id)
        except BotoServerError as e:
            return {'created': False, 'error': __utils__['boto.get_error'](e)}
        r['association_id'] = association_id
    return r