-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathec2publishimg.1
126 lines (125 loc) · 4.18 KB
/
ec2publishimg.1
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.\" Process this file with
.\" groff -man -Tascii ec2publishimg.1
.\"
.TH ec2publishimg.1
.SH NAME
ec2publishimg \- Modify the visibility permissions for an AMI
.SH SYNOPSIS
.B ec2publishimg [option]
.SH DESCRIPTION
.B ec2publishimg
Set the visibility of an AMI to allow others to use the image or to make the
image private, i.e. only available to the account owner.
.SH OPTIONS
.IP "-a --account ACCOUNT_NAME"
Specifies the account to use to connect to EC2. The account is specified
in the config file
.IR ~/.ec2utils.conf .
The account is specified as a section with [account-ACCOUNT_NAME] delimiter.
The options of the sections are:
.IR access_key_id ,
.IR secret_access_key ,
.I ssh_key_name
and
.IR ssh_private_key .
These allow the program to connect to EC2.
If the access_key_id and/or secret_access_key are not found in
.IR ~/.ec2utils.conf,
the search will use the ACCOUNT_NAME to look for a matching section
[profile ACCOUNT_NAME] in
.IR ~/.aws/config
or [ACCOUNT_NAME] in
.IR ~/.aws/credentials.
.IP "--access-id AWS_ACCESS_KEY"
Specifies the AWS access key and overrides the value given for the
.I account
with the
.I access_key_id
in the configuration file.
.IP "--allow-copy"
Set the image copy permissions. The option supports the keyword
.I image
to allow those that the image is shared with to copy it; the keyword
.I none
which does not allow copy access and is the default behavior. The option
allows the specification of an AWS account number or a comma separated list
with no white space to specify multiple account numbers to allow those
accounts to copy the image.
.IP "-n --dry-run"
The program will not perform any action. It will provide information on
.I stdout
about the actions it would perform.
.IP "-f --file CONFIG_FILE"
Specifies the configuration file to use. The default is
.IR ~/.ec2utils.conf .
.IP "--image-id AMI_ID"
Specify the AMI ID of the image to be published. This option is
mutually exclusive with
.IR --image-name ,
.IR --image-name-frag ,
and
.IR --image-name-match .
.IP "--image-name IMAGE_NAME"
Specify the name of the image to be published. The program will look for
an exact match of the name. This option is mutually exclusive with
.IR --image-id ,
.IR --image-name-frag ,
and
.I --image-name-match
options.
.IP "--image-name-frag IMAGE_NAME_FRAGMENT"
Specify a section of an image name for the image(s) to be published. Every
image that matches the name fragment will be published. This
option is mutually exclusive with the
.IR --image-id ,
.IR --image-name-name ,
and
.I --image-name-match
options.
.IP "--image-name-match REGEX"
Specify a regular expression to match an image name. Every image matching the
regular expression will be published. This option is mutually
exclusive with the
.IR --image-id ,
.IR --image-name-name ,
and
.I --image-name-frag
options.
.IP "-r --regions EC2_REGIONS"
A comma separated list of Amazon EC2 regions, or a single region. If no
region argument is specified all EC2 connected regions will be processed.
EC2 disconnected regions have different API keys and thus the specified
.I account
would not work with the disconnected regions. If a disconnected region is to
be processed specify the region explicitly on the command line, and only the
region of interest along with the matching
.IR account .
.IP "-s --secret-key AWS_SECRET_KEY"
Specifies the AWS secret access key and overrides the value given for the
.I account
with the
.I secret_access_key
in the configuration file.
.IP "--share-with SHARE"
Specify the scope of the image publishing/sharing. The option supports the
keyword
.I all
to set the image to public, the keyword
.I none
to set the image private, or expects a AWS account number to share the image
with a specific account. Use a comma separated list with no white space to
specify multiple account numbers. By default the selected image will be
published, i.e.
.I all
is the default value.
.IP "--verbose"
Print extra output about the operations performed to STDOUT.
.IP "--version"
Print the version of he program
.SH EXAMPLE
ec2publishimg --account example --image-name-match production-v2 --share-with all
Will set all images in all connected regions that match the
.I production-v2
regular expression as public.
.SH AUTHOR
Robert Schweikert ([email protected])