Search in sources :

Example 1 with CreateVpcRequest

use of com.amazonaws.services.ec2.model.CreateVpcRequest in project photon-model by vmware.

the class AWSNetworkClient method createVPC.

/**
 * Creates the VPC and returns the VPC id
 */
public String createVPC(String subnetCidr) {
    CreateVpcRequest req = new CreateVpcRequest().withCidrBlock(subnetCidr);
    CreateVpcResult vpc = this.client.createVpc(req);
    return vpc.getVpc().getVpcId();
}
Also used : CreateVpcResult(com.amazonaws.services.ec2.model.CreateVpcResult) CreateVpcRequest(com.amazonaws.services.ec2.model.CreateVpcRequest)

Aggregations

CreateVpcRequest (com.amazonaws.services.ec2.model.CreateVpcRequest)1 CreateVpcResult (com.amazonaws.services.ec2.model.CreateVpcResult)1