def delete_vpc(region, host_vpc_id=None, host_vpc_region=None):
    'Method to delete VPC, Subnet, Internet Gateway, Route Table and VPC peering.\n    Args:\n        region (str): Region name to query the VPC.\n    '
    vpc_region_tag = RESOURCE_PREFIX_FORMAT.format(region)
    client = get_client(region)
    region_vpc = get_vpc(client, vpc_region_tag)
    if (region_vpc is None):
        raise YBOpsRuntimeError('VPC not setup.')
    zones = get_zones(region)
    sg_group_name = get_yb_sg_name(region)
    cleanup_security_group(client=client, group_name=sg_group_name, vpc=region_vpc)
    for (zone, subnet_id) in zones.iteritems():
        vpc_zone_tag = SUBNET_PREFIX_FORMAT.format(zone)
        if (subnet_id is not None):
            client.Subnet(subnet_id).delete()
    igw_tag = IGW_PREFIX_FORMAT.format(region)
    cleanup_igw(client=client, tag_name=igw_tag)
    host_vpc = None
    if ((host_vpc_id is not None) and (host_vpc_region is not None)):
        host_vpc = get_client(host_vpc_region).Vpc(host_vpc_id)
        for rt in list(host_vpc.route_tables.all()):
            delete_route(rt, region_vpc.cidr_block)
    cleanup_vpc_peering(client=client, vpc=region_vpc, host_vpc=None)
    region_vpc.delete()
    route_table_tag = ROUTE_TABLE_PREFIX_FORMAT.format(region)
    cleanup_route_table(client=client, tag_name=route_table_tag)
    return {'success': 'VPC deleted.'}
Method to delete VPC, Subnet, Internet Gateway, Route Table and VPC peering.
Args:
    region (str): Region name to query the VPC.
def delete_vpc(region, host_vpc_id=None, host_vpc_region=None):
    'Method to delete VPC, Subnet, Internet Gateway, Route Table and VPC peering.\n    Args:\n        region (str): Region name to query the VPC.\n    '
    vpc_region_tag = RESOURCE_PREFIX_FORMAT.format(region)
    client = get_client(region)
    region_vpc = get_vpc(client, vpc_region_tag)
    if (region_vpc is None):
        raise YBOpsRuntimeError('VPC not setup.')
    zones = get_zones(region)
    sg_group_name = get_yb_sg_name(region)
    cleanup_security_group(client=client, group_name=sg_group_name, vpc=region_vpc)
    for (zone, subnet_id) in zones.iteritems():
        vpc_zone_tag = SUBNET_PREFIX_FORMAT.format(zone)
        if (subnet_id is not None):
            client.Subnet(subnet_id).delete()
    igw_tag = IGW_PREFIX_FORMAT.format(region)
    cleanup_igw(client=client, tag_name=igw_tag)
    host_vpc = None
    if ((host_vpc_id is not None) and (host_vpc_region is not None)):
        host_vpc = get_client(host_vpc_region).Vpc(host_vpc_id)
        for rt in list(host_vpc.route_tables.all()):
            delete_route(rt, region_vpc.cidr_block)
    cleanup_vpc_peering(client=client, vpc=region_vpc, host_vpc=None)
    region_vpc.delete()
    route_table_tag = ROUTE_TABLE_PREFIX_FORMAT.format(region)
    cleanup_route_table(client=client, tag_name=route_table_tag)
    return {'success': 'VPC deleted.'}