def disassociate_network_acl(subnet_id=None, vpc_id=None, subnet_name=None, vpc_name=None,
                             region=None, key=None, keyid=None, profile=None):
    '''
    Given a subnet ID, disassociates a network acl.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_vpc.disassociate_network_acl 'subnet-6a1fe403'

    '''

    if not _exactly_one((subnet_name, subnet_id)):
        raise SaltInvocationError('One (but not both) of subnet_id or subnet_name '
                                  'must be provided.')

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

        if vpc_name or vpc_id:
            vpc_id = check_vpc(vpc_id, vpc_name, region, key, keyid, profile)

        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        association_id = conn.disassociate_network_acl(subnet_id, vpc_id=vpc_id)
        return {'disassociated': True, 'association_id': association_id}
    except BotoServerError as e:
        return {'disassociated': False, 'error': __utils__['boto.get_error'](e)}
def disassociate_network_acl ( subnet_id = None , vpc_id = None , subnet_name = None , vpc_name = None , region = None , key = None , keyid = None , profile = None ) : if not _exactly_one ( ( subnet_name , subnet_id ) ) : raise SaltInvocationError ( 'One (but not both) of subnet_id or subnet_name ' 'must be provided.' ) if all ( ( vpc_name , vpc_id ) ) : raise SaltInvocationError ( 'Only one of vpc_id or vpc_name ' 'may be provided.' ) try : if subnet_name : subnet_id = _get_resource_id ( 'subnet' , subnet_name , region = region , key = key , keyid = keyid , profile = profile ) if not subnet_id : return { 'disassociated' : False , 'error' : { 'message' : 'Subnet {0} does not exist.' . format ( subnet_name ) } } if vpc_name or vpc_id : vpc_id = check_vpc ( vpc_id , vpc_name , region , key , keyid , profile ) conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) association_id = conn . disassociate_network_acl ( subnet_id , vpc_id = vpc_id ) return { 'disassociated' : True , 'association_id' : association_id } except BotoServerError as e : return { 'disassociated' : False , 'error' : __utils__ [ 'boto.get_error' ] ( e ) }
Given a subnet ID, disassociates a network acl.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_vpc.disassociate_network_acl 'subnet-6a1fe403'