def describe_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None):
 try:
  subnet = _get_resource('subnet', name=subnet_name, resource_id=subnet_id, region=region, key=key, keyid=keyid, profile=profile)
 except BotoServerError as e:
  return {'error': salt.utils.boto.get_error(e)}
 if (not subnet):
  return {'subnet': None}
 log.debug('Found subnet: {0}'.format(subnet.id))
 keys = ('id', 'cidr_block', 'availability_zone', 'tags', 'vpc_id')
 ret = {'subnet': dict(((k, getattr(subnet, k)) for k in keys))}
 explicit_route_table_assoc = _get_subnet_explicit_route_table(ret['subnet']['id'], ret['subnet']['vpc_id'], conn=None, region=region, key=key, keyid=keyid, profile=profile)
 if explicit_route_table_assoc:
  ret['subnet']['explicit_route_table_association_id'] = explicit_route_table_assoc
 return ret

def describe_subnet ( subnet_id = None , subnet_name = None , region = None , key = None , keyid = None , profile = None ) : try : subnet = _get_resource ( 'subnet' , name = subnet_name , resource_id = subnet_id , region = region , key = key , keyid = keyid , profile = profile ) except BotoServerError as e : return { 'error' : salt . utils . boto . get_error ( e ) } if ( not subnet ) : return { 'subnet' : None } log . debug ( 'Found subnet: {0}' . format ( subnet . id ) ) keys = ( 'id' , 'cidr_block' , 'availability_zone' , 'tags' , 'vpc_id' ) ret = { 'subnet' : dict ( ( ( k , getattr ( subnet , k ) ) for k in keys ) ) } explicit_route_table_assoc = _get_subnet_explicit_route_table ( ret [ 'subnet' ] [ 'id' ] , ret [ 'subnet' ] [ 'vpc_id' ] , conn = None , region = region , key = key , keyid = keyid , profile = profile ) if explicit_route_table_assoc : ret [ 'subnet' ] [ 'explicit_route_table_association_id' ] = explicit_route_table_assoc return ret
given a subnet id or name .