isIPv6
isIPv6(address: IpAddress) : Bool
Tests whether the specified IpAddress is an IPv6 address. For example,
isIPv6(ipAddress("2001:0db8:85a3:0000:0000:8a2e:0370:7334")) returns true and
isIPv6(ipAddress("1.2.3.4"))returns false.
This function will raise an error if address is absent.
isIPv6(subnet: IpSubnet) : Bool
Tests whether the specified IpSubnet is an IPv6 subnet. For example,
isIPv6(ipSubnet("2001:0db8:abcd:0000::/56")) returns true and
isIPv6(ipSubnet("192.168.1.0/24")) returns false.
This function will raise an error if subnet is absent.
An example usage would be the following query that gets all used IPv6 VPC subnets:
getVpcIPv6Subnets =
foreach cloudAccount in network.cloudAccounts
foreach vpc in cloudAccount
foreach subnet in vpc.subnets
foreach address in subnet.addresses
where isIPv6(address)
select address;