File: README.md

package info (click to toggle)
golang-github-aws-aws-sdk-go 1.16.18%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports, experimental
  • size: 93,084 kB
  • sloc: ruby: 193; makefile: 174; xml: 11
file content (31 lines) | stat: -rw-r--r-- 667 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Example

This is an example using the AWS SDK for Go to list ec2 instances that match provided tag name filter.


# Usage

The example uses the tag name provided, and lists all matching ec2 instances.

```sh
go run filter_ec2_by_tag.go <name_filter>
```

Output:
```
listing instances with tag vpn in: us-east-1
[{
  Instances: [{
      AmiLaunchIndex: 0,
      Architecture: "x86_64",
      BlockDeviceMappings: [{
          DeviceName: "/dev/xvda",
          Ebs: {
            AttachTime: 2016-07-06 18:04:53 +0000 UTC,
            DeleteOnTermination: true,
            Status: "attached",
            VolumeId: "vol-xxxx"
          }
        }],
      ...
```