github.com/aavshr/aws-sdk-go@v1.41.3/example/service/ec2/filterInstances/README.md (about)

     1  # Example
     2  
     3  This is an example using the AWS SDK for Go to list ec2 instances that match provided tag name filter.
     4  
     5  
     6  # Usage
     7  
     8  The example uses the tag name provided, and lists all matching ec2 instances.
     9  
    10  ```sh
    11  go run filter_ec2_by_tag.go <name_filter>
    12  ```
    13  
    14  Output:
    15  ```
    16  listing instances with tag vpn in: us-east-1
    17  [{
    18    Instances: [{
    19        AmiLaunchIndex: 0,
    20        Architecture: "x86_64",
    21        BlockDeviceMappings: [{
    22            DeviceName: "/dev/xvda",
    23            Ebs: {
    24              AttachTime: 2016-07-06 18:04:53 +0000 UTC,
    25              DeleteOnTermination: true,
    26              Status: "attached",
    27              VolumeId: "vol-xxxx"
    28            }
    29          }],
    30        ...
    31  ```