@@ -54,30 +54,41 @@ const (
54
54
55
55
// Filter Flag Constants
56
56
const (
57
- vcpus = "vcpus"
58
- memory = "memory"
59
- vcpusToMemoryRatio = "vcpus-to-memory-ratio"
60
- cpuArchitecture = "cpu-architecture"
61
- gpus = "gpus"
62
- gpuMemoryTotal = "gpu-memory-total"
63
- placementGroupStrategy = "placement-group-strategy"
64
- usageClass = "usage-class"
65
- rootDeviceType = "root-device-type"
66
- enaSupport = "ena-support"
67
- efaSupport = "efa-support"
68
- hibernationSupport = "hibernation-support"
69
- baremetal = "baremetal"
70
- fpgaSupport = "fpga-support"
71
- burstSupport = "burst-support"
72
- hypervisor = "hypervisor"
73
- availabilityZones = "availability-zones"
74
- currentGeneration = "current-generation"
75
- networkInterfaces = "network-interfaces"
76
- networkPerformance = "network-performance"
77
- allowList = "allow-list"
78
- denyList = "deny-list"
79
- virtualizationType = "virtualization-type"
80
- pricePerHour = "price-per-hour"
57
+ vcpus = "vcpus"
58
+ memory = "memory"
59
+ vcpusToMemoryRatio = "vcpus-to-memory-ratio"
60
+ cpuArchitecture = "cpu-architecture"
61
+ gpus = "gpus"
62
+ gpuMemoryTotal = "gpu-memory-total"
63
+ inferenceAccelerators = "inference-accelerators"
64
+ placementGroupStrategy = "placement-group-strategy"
65
+ usageClass = "usage-class"
66
+ rootDeviceType = "root-device-type"
67
+ enaSupport = "ena-support"
68
+ efaSupport = "efa-support"
69
+ hibernationSupport = "hibernation-support"
70
+ baremetal = "baremetal"
71
+ fpgaSupport = "fpga-support"
72
+ burstSupport = "burst-support"
73
+ hypervisor = "hypervisor"
74
+ availabilityZones = "availability-zones"
75
+ currentGeneration = "current-generation"
76
+ networkInterfaces = "network-interfaces"
77
+ networkPerformance = "network-performance"
78
+ networkEncryption = "network-encryption"
79
+ ipv6 = "ipv6"
80
+ allowList = "allow-list"
81
+ denyList = "deny-list"
82
+ virtualizationType = "virtualization-type"
83
+ pricePerHour = "price-per-hour"
84
+ instanceStorage = "instance-storage"
85
+ diskType = "disk-type"
86
+ diskEncryption = "disk-encryption"
87
+ nvme = "nvme"
88
+ ebsOptimized = "ebs-optimized"
89
+ ebsOptimizedBaselineBandwidth = "ebs-optimized-baseline-bandwidth"
90
+ ebsOptimizedBaselineThroughput = "ebs-optimized-baseline-throughput"
91
+ ebsOptimizedBaselineIOPS = "ebs-optimized-baseline-iops"
81
92
)
82
93
83
94
// Aggregate Filter Flags
@@ -137,6 +148,7 @@ Full docs can be found at github.com/aws/amazon-` + binName
137
148
cli .StringOptionsFlag (cpuArchitecture , cli .StringMe ("a" ), nil , "CPU architecture [x86_64/amd64, x86_64_mac, i386, or arm64]" , []string {"x86_64" , "x86_64_mac" , "amd64" , "i386" , "arm64" })
138
149
cli .IntMinMaxRangeFlags (gpus , cli .StringMe ("g" ), nil , "Total Number of GPUs (Example: 4)" )
139
150
cli .ByteQuantityMinMaxRangeFlags (gpuMemoryTotal , nil , nil , "Number of GPUs' total memory (Example: 4 GiB)" )
151
+ cli .IntMinMaxRangeFlags (inferenceAccelerators , nil , nil , "Total Number of inference accelerators (Example: 4)" )
140
152
cli .StringOptionsFlag (placementGroupStrategy , nil , nil , "Placement group strategy: [cluster, partition, spread]" , []string {"cluster" , "partition" , "spread" })
141
153
cli .StringOptionsFlag (usageClass , cli .StringMe ("u" ), nil , "Usage class: [spot or on-demand]" , []string {"spot" , "on-demand" })
142
154
cli .StringOptionsFlag (rootDeviceType , nil , nil , "Supported root device types: [ebs or instance-store]" , []string {"ebs" , "instance-store" })
@@ -151,10 +163,20 @@ Full docs can be found at github.com/aws/amazon-` + binName
151
163
cli .BoolFlag (currentGeneration , nil , nil , "Current generation instance types (explicitly set this to false to not return current generation instance types)" )
152
164
cli .IntMinMaxRangeFlags (networkInterfaces , nil , nil , "Number of network interfaces (ENIs) that can be attached to the instance" )
153
165
cli .IntMinMaxRangeFlags (networkPerformance , nil , nil , "Bandwidth in Gib/s of network performance (Example: 100)" )
166
+ cli .BoolFlag (networkEncryption , nil , nil , "Instance Types that support automatic network encryption in-transit" )
167
+ cli .BoolFlag (ipv6 , nil , nil , "Instance Types that support IPv6" )
154
168
cli .RegexFlag (allowList , nil , nil , "List of allowed instance types to select from w/ regex syntax (Example: m[3-5]\\ .*)" )
155
169
cli .RegexFlag (denyList , nil , nil , "List of instance types which should be excluded w/ regex syntax (Example: m[1-2]\\ .*)" )
156
170
cli .StringOptionsFlag (virtualizationType , nil , nil , "Virtualization Type supported: [hvm or pv]" , []string {"hvm" , "paravirtual" , "pv" })
157
171
cli .Float64MinMaxRangeFlags (pricePerHour , nil , nil , "Price/hour in USD (Example: 0.09)" )
172
+ cli .ByteQuantityMinMaxRangeFlags (instanceStorage , nil , nil , "Amount of local instance storage (Example: 4 GiB)" )
173
+ cli .StringOptionsFlag (diskType , nil , nil , "Disk Type: [hdd or ssd]" , []string {"hdd" , "ssd" })
174
+ cli .BoolFlag (nvme , nil , nil , "EBS or local instance storage where NVME is supported or required" )
175
+ cli .BoolFlag (diskEncryption , nil , nil , "EBS or local instance storage where encryption is supported or required" )
176
+ cli .BoolFlag (ebsOptimized , nil , nil , "EBS Optimized is supported or default" )
177
+ cli .ByteQuantityMinMaxRangeFlags (ebsOptimizedBaselineBandwidth , nil , nil , "EBS Optimized baseline bandwidth (Example: 4 GiB)" )
178
+ cli .ByteQuantityMinMaxRangeFlags (ebsOptimizedBaselineThroughput , nil , nil , "EBS Optimized baseline throughput per second (Example: 4 GiB)" )
179
+ cli .IntMinMaxRangeFlags (ebsOptimizedBaselineIOPS , nil , nil , "EBS Optimized baseline IOPS per second (Example: 10000)" )
158
180
159
181
// Suite Flags - higher level aggregate filters that return opinionated result
160
182
@@ -230,35 +252,46 @@ Full docs can be found at github.com/aws/amazon-` + binName
230
252
}
231
253
232
254
filters := selector.Filters {
233
- VCpusRange : cli .IntRangeMe (flags [vcpus ]),
234
- MemoryRange : cli .ByteQuantityRangeMe (flags [memory ]),
235
- VCpusToMemoryRatio : cli .Float64Me (flags [vcpusToMemoryRatio ]),
236
- CPUArchitecture : cli .StringMe (flags [cpuArchitecture ]),
237
- GpusRange : cli .IntRangeMe (flags [gpus ]),
238
- GpuMemoryRange : cli .ByteQuantityRangeMe (flags [gpuMemoryTotal ]),
239
- PlacementGroupStrategy : cli .StringMe (flags [placementGroupStrategy ]),
240
- UsageClass : cli .StringMe (flags [usageClass ]),
241
- RootDeviceType : cli .StringMe (flags [rootDeviceType ]),
242
- EnaSupport : cli .BoolMe (flags [enaSupport ]),
243
- EfaSupport : cli .BoolMe (flags [efaSupport ]),
244
- HibernationSupported : cli .BoolMe (flags [hibernationSupport ]),
245
- Hypervisor : cli .StringMe (flags [hypervisor ]),
246
- BareMetal : cli .BoolMe (flags [baremetal ]),
247
- Fpga : cli .BoolMe (flags [fpgaSupport ]),
248
- Burstable : cli .BoolMe (flags [burstSupport ]),
249
- Region : cli .StringMe (flags [region ]),
250
- AvailabilityZones : cli .StringSliceMe (flags [availabilityZones ]),
251
- CurrentGeneration : cli .BoolMe (flags [currentGeneration ]),
252
- MaxResults : cli .IntMe (flags [maxResults ]),
253
- NetworkInterfaces : cli .IntRangeMe (flags [networkInterfaces ]),
254
- NetworkPerformance : cli .IntRangeMe (flags [networkPerformance ]),
255
- AllowList : cli .RegexMe (flags [allowList ]),
256
- DenyList : cli .RegexMe (flags [denyList ]),
257
- InstanceTypeBase : cli .StringMe (flags [instanceTypeBase ]),
258
- Flexible : cli .BoolMe (flags [flexible ]),
259
- Service : cli .StringMe (flags [service ]),
260
- VirtualizationType : cli .StringMe (flags [virtualizationType ]),
261
- PricePerHour : cli .Float64RangeMe (flags [pricePerHour ]),
255
+ VCpusRange : cli .IntRangeMe (flags [vcpus ]),
256
+ MemoryRange : cli .ByteQuantityRangeMe (flags [memory ]),
257
+ VCpusToMemoryRatio : cli .Float64Me (flags [vcpusToMemoryRatio ]),
258
+ CPUArchitecture : cli .StringMe (flags [cpuArchitecture ]),
259
+ GpusRange : cli .IntRangeMe (flags [gpus ]),
260
+ GpuMemoryRange : cli .ByteQuantityRangeMe (flags [gpuMemoryTotal ]),
261
+ InferenceAcceleratorsRange : cli .IntRangeMe (flags [inferenceAccelerators ]),
262
+ PlacementGroupStrategy : cli .StringMe (flags [placementGroupStrategy ]),
263
+ UsageClass : cli .StringMe (flags [usageClass ]),
264
+ RootDeviceType : cli .StringMe (flags [rootDeviceType ]),
265
+ EnaSupport : cli .BoolMe (flags [enaSupport ]),
266
+ EfaSupport : cli .BoolMe (flags [efaSupport ]),
267
+ HibernationSupported : cli .BoolMe (flags [hibernationSupport ]),
268
+ Hypervisor : cli .StringMe (flags [hypervisor ]),
269
+ BareMetal : cli .BoolMe (flags [baremetal ]),
270
+ Fpga : cli .BoolMe (flags [fpgaSupport ]),
271
+ Burstable : cli .BoolMe (flags [burstSupport ]),
272
+ Region : cli .StringMe (flags [region ]),
273
+ AvailabilityZones : cli .StringSliceMe (flags [availabilityZones ]),
274
+ CurrentGeneration : cli .BoolMe (flags [currentGeneration ]),
275
+ MaxResults : cli .IntMe (flags [maxResults ]),
276
+ NetworkInterfaces : cli .IntRangeMe (flags [networkInterfaces ]),
277
+ NetworkPerformance : cli .IntRangeMe (flags [networkPerformance ]),
278
+ NetworkEncryption : cli .BoolMe (flags [networkEncryption ]),
279
+ IPv6 : cli .BoolMe (flags [ipv6 ]),
280
+ AllowList : cli .RegexMe (flags [allowList ]),
281
+ DenyList : cli .RegexMe (flags [denyList ]),
282
+ InstanceTypeBase : cli .StringMe (flags [instanceTypeBase ]),
283
+ Flexible : cli .BoolMe (flags [flexible ]),
284
+ Service : cli .StringMe (flags [service ]),
285
+ VirtualizationType : cli .StringMe (flags [virtualizationType ]),
286
+ PricePerHour : cli .Float64RangeMe (flags [pricePerHour ]),
287
+ InstanceStorageRange : cli .ByteQuantityRangeMe (flags [instanceStorage ]),
288
+ DiskType : cli .StringMe (flags [diskType ]),
289
+ DiskEncryption : cli .BoolMe (flags [diskEncryption ]),
290
+ NVME : cli .BoolMe (flags [nvme ]),
291
+ EBSOptimized : cli .BoolMe (flags [ebsOptimized ]),
292
+ EBSOptimizedBaselineBandwidth : cli .ByteQuantityRangeMe (flags [ebsOptimizedBaselineBandwidth ]),
293
+ EBSOptimizedBaselineThroughput : cli .ByteQuantityRangeMe (flags [ebsOptimizedBaselineThroughput ]),
294
+ EBSOptimizedBaselineIOPS : cli .IntRangeMe (flags [ebsOptimizedBaselineIOPS ]),
262
295
}
263
296
264
297
if flags [verbose ] != nil {
0 commit comments