Example usage for com.amazonaws.services.ec2.model Vpc getState

List of usage examples for com.amazonaws.services.ec2.model Vpc getState

Introduction

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

Prototype


public String getState() 

Source Link

Document

The current state of the VPC.

Usage

From source file:com.infinitechaos.vpcviewer.web.rest.dto.VpcDTO.java

License:Open Source License

public VpcDTO(final Vpc vpc) {
    this.vpcId = vpc.getVpcId();
    this.cidrBlock = vpc.getCidrBlock();
    this.state = vpc.getState();
    this.tags.addAll(vpc.getTags().stream().map(TagDTO::new).collect(Collectors.toList()));

    this.name = vpc.getTags().stream().filter(t -> t.getKey().equals("Name")).findFirst().map(Tag::getValue)
            .orElse("n/a");
}