Example usage for com.amazonaws.services.ec2.model Subnet Subnet

List of usage examples for com.amazonaws.services.ec2.model Subnet Subnet

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2.model Subnet Subnet.

Prototype

Subnet

Source Link

Usage

From source file:jp.primecloud.auto.ui.mock.service.MockAwsDescribeService.java

License:Open Source License

@Override
public List<Subnet> getSubnets(Long userNo, Long platformNo) {
    List<Subnet> subnets = new ArrayList<Subnet>();

    {//  www  . ja  v a2  s  .  c  o  m
        Subnet subnet = new Subnet();
        subnet.withSubnetId("subnet-a");
        subnet.withCidrBlock("192.168.1.0/26");
        subnet.withAvailabilityZone("ap-northeast-1a");
        subnets.add(subnet);
    }

    {
        Subnet subnet = new Subnet();
        subnet.withSubnetId("subnet-b");
        subnet.withCidrBlock("192.168.1.64/26");
        subnet.withAvailabilityZone("ap-northeast-1b");
        subnets.add(subnet);
    }

    {
        Subnet subnet = new Subnet();
        subnet.withSubnetId("subnet-c");
        subnet.withCidrBlock("192.168.1.128/26");
        subnet.withAvailabilityZone("ap-northeast-1c");
        subnets.add(subnet);
    }

    return subnets;
}

From source file:org.finra.dm.dao.impl.MockSubnet.java

License:Apache License

/**
 * Converts this object into an AWS equivalent object.
 * /*  w  w w . j  av  a2 s . co  m*/
 * @return A new equivalent AWS object
 */
public Subnet toAwsObject() {
    Subnet subnet = new Subnet();
    subnet.setSubnetId(subnetId);
    subnet.setAvailabilityZone(availabilityZone);
    subnet.setAvailableIpAddressCount(availableIpAddressCount);
    return subnet;
}