Example usage for com.amazonaws.services.ec2.model CreateVpcRequest getCidrBlock

List of usage examples for com.amazonaws.services.ec2.model CreateVpcRequest getCidrBlock

Introduction

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

Prototype


public String getCidrBlock() 

Source Link

Document

The IPv4 network range for the VPC, in CIDR notation.

Usage

From source file:web.component.impl.aws.AWSEC2Impl.java

@Override
public CreateVpcResult createVpc(CreateVpcRequest request) {

    if (request.getCidrBlock() == null || request.getCidrBlock().isEmpty())
        throw new IllegalArgumentException("CIDR block not specified.");
    if (request.getInstanceTenancy() == null || request.getInstanceTenancy().isEmpty())
        throw new IllegalArgumentException("Instance tenancy not specified.");

    return awsHttpClient.createVpc(request);
}