@staticmethod
def from_pieces(region, vpc_id, sg_id, rt_id, az_to_subnet_ids):
    c = YbVpcComponents()
    c.region = region
    client = get_client(region)
    c.vpc = client.Vpc(vpc_id)
    c.sg_yugabyte = client.SecurityGroup(sg_id)
    c.route_table = client.RouteTable(rt_id)
    c.subnets = {az: client.Subnet(subnet_id) for (az, subnet_id) in az_to_subnet_ids.iteritems()}
    return c
@staticmethod
def from_pieces(region, vpc_id, sg_id, rt_id, az_to_subnet_ids):
    c = YbVpcComponents()
    c.region = region
    client = get_client(region)
    c.vpc = client.Vpc(vpc_id)
    c.sg_yugabyte = client.SecurityGroup(sg_id)
    c.route_table = client.RouteTable(rt_id)
    c.subnets = {az: client.Subnet(subnet_id) for (az, subnet_id) in az_to_subnet_ids.iteritems()}
    return c