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

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

Introduction

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

Prototype


public java.util.List<Tag> getTags() 

Source Link

Document

Any tags assigned to 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");
}