func FindSubnetIDsForAvailabilityZone(zoneName string, subnetsToZones map[Id][]string) ([]Id, error) {
	matchingSubnetIDs := set.NewStrings()
	for subnetID, zones := range subnetsToZones {
		zonesSet := set.NewStrings(zones...)
		if zonesSet.Size() == 0 && zoneName == "" || zonesSet.Contains(zoneName) {
			matchingSubnetIDs.Add(string(subnetID))
		}
	}

	if matchingSubnetIDs.IsEmpty() {
		return nil, errors.NotFoundf("subnets in AZ %q", zoneName)
	}

	sorted := make([]Id, matchingSubnetIDs.Size())
	for k, v := range matchingSubnetIDs.SortedValues() {
		sorted[k] = Id(v)
	}

	return sorted, nil
}
// FindSubnetIDsForAvailabilityZone returns a series of subnet IDs from a series
// of zones, if zones match the zoneName.
//
// Returns an error if no matching subnets match the zoneName.
FindSubnetIDsForAvailabilityZone returns a series of subnet IDs from a series
of zones, if zones match the zoneName.

Returns an error if no matching subnets match the zoneName.
// FindSubnetIDsForAvailabilityZone returns a series of subnet IDs from a series // of zones if zones match the zoneName . // // Returns an error if no matching subnets match the zoneName .
func FindSubnetIDsForAvailabilityZone(zoneName string, subnetsToZones map[Id][]string) ([]Id, error) {
	matchingSubnetIDs := set.NewStrings()
	for subnetID, zones := range subnetsToZones {
		zonesSet := set.NewStrings(zones...)
		if zonesSet.Size() == 0 && zoneName == "" || zonesSet.Contains(zoneName) {
			matchingSubnetIDs.Add(string(subnetID))
		}
	}
	if matchingSubnetIDs.IsEmpty() {
		return nil, errors.NotFoundf("subnets in AZ %q", zoneName)
	}
	sorted := make([]Id, matchingSubnetIDs.Size())
	for k, v := range matchingSubnetIDs.SortedValues() {
		sorted[k] = Id(v)
	}
	return sorted, nil
}
func FindSubnetIDsForAvailabilityZone ( zoneName string , subnetsToZones map [ Id ] [ ] string ) ( [ ] Id , error ) { matchingSubnetIDs := set . NewStrings ( ) for subnetID , zones := range subnetsToZones { zonesSet := set . NewStrings ( zones ... ) if zonesSet . Size ( ) == 0 && zoneName == " " || zonesSet . Contains ( zoneName ) { matchingSubnetIDs . Add ( string ( subnetID ) ) } } if matchingSubnetIDs . IsEmpty ( ) { return nil , errors . NotFoundf ( " " , zoneName ) } sorted := make ( [ ] Id , matchingSubnetIDs . Size ( ) ) for k , v := range matchingSubnetIDs . SortedValues ( ) { sorted [ k ] = Id ( v ) } return sorted , nil }
FindSubnetIDsForAvailabilityZone returns a series of subnet IDs from a series
of zones, if zones match the zoneName.
FindSubnetIDsForAvailabilityZone returns a series of subnet IDs from a series of zones if zones match the zoneName .