ec2 list-instances
List ec2 instances
Description
List ec2 instances
Synopsis
ec2 list-instances
[--site <site>]
[--region <region>]
[--tags <tags>]
[--availability_zone <availability_zone>]
[--owner <owner>]
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
region
- (string)
AWS region for the service
Example: --region "region-1"
Default: _None_
Attributes: optional
tags
- (string)
Tags assigned to the instance. Just specify the key to filter all resources with that tag key. Specity key=[value1,value2,...] to filter by acceptable values
Example: --tags "creator_id=[user1,user2]"
, --tags "prod_env"
Default: _None_
Attributes: optional, multiple allowed
availability_zone
- (string)
Availability Zone of the instance
Example: --availability_zone "us-west-1c"
Default: _None_
Attributes: optional, multiple allowed
owner
- (string)
ID of Owner of the instance
Example: --owner "248495481387"
Default: _None_
Attributes: optional, multiple allowed
Examples
ec2 list-instances --region "region-1" --tags "creator_id=[user1,user2]" --availability_zone "us-west-1c" --owner "248495481387"
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "read" |
Service Type | "ec2" |
Service Instance | |
Namespace | |
Object Type | "instance" |
Object ID |
Please see Access Control for details.