Codebase list awscli / 9fa1342
New upstream version 1.18.219 Noah Meyerhans 3 years ago
294 changed file(s) with 11724 addition(s) and 1420 deletion(s). Raw diff Collapse all Expand all
0 include README.md
0 include README.rst
11 include LICENSE.txt
22 include requirements.txt
3 include UPGRADE_PY3.md
34 recursive-include awscli/examples *.rst *.txt
45 recursive-include awscli/data *.json
+278
-145
PKG-INFO less more
00 Metadata-Version: 1.1
11 Name: awscli
2 Version: 1.18.135
2 Version: 1.18.219
33 Summary: Universal Command Line Environment for AWS.
44 Home-page: http://aws.amazon.com/cli/
55 Author: Amazon Web Services
66 Author-email: UNKNOWN
77 License: Apache License 2.0
8 Description: # aws-cli
9
10 [![Build Status](https://travis-ci.org/aws/aws-cli.svg?branch=develop)](https://travis-ci.org/aws/aws-cli)
11
12 [![Gitter](https://badges.gitter.im/aws/aws-cli.svg)](https://gitter.im/aws/aws-cli)
13
14 This package provides a unified command line interface to Amazon Web Services.
8 Description: aws-cli
9 =======
10
11
12 .. image:: https://travis-ci.org/aws/aws-cli.svg?branch=develop
13 :target: https://travis-ci.org/aws/aws-cli
14 :alt: Build Status
15
16 .. image:: https://badges.gitter.im/aws/aws-cli.svg
17 :target: https://gitter.im/aws/aws-cli
18 :alt: Gitter
19
20
21 This package provides a unified command line interface to Amazon Web
22 Services.
1523
1624 Jump to:
1725
18 - [Getting Started](#getting-started)
19 - [Getting Help](#getting-help)
20 - [More Resources](#more-resources)
21
22 ## Getting Started
23
24 This README is for the AWS CLI version 1. If you are looking for information about the AWS CLI version 2, please visit the [v2 branch](https://github.com/aws/aws-cli/tree/v2).
25
26 ### Requirements
26 - `Getting Started <#getting-started>`__
27 - `Getting Help <#getting-help>`__
28 - `More Resources <#more-resources>`__
29
30 Getting Started
31 ---------------
32
33 This README is for the AWS CLI version 1. If you are looking for
34 information about the AWS CLI version 2, please visit the `v2
35 branch <https://github.com/aws/aws-cli/tree/v2>`__.
36
37 Requirements
38 ~~~~~~~~~~~~
2739
2840 The aws-cli package works on Python versions:
2941
30 - 2.7.x and greater
31 - 3.4.x and greater
32 - 3.5.x and greater
33 - 3.6.x and greater
34 - 3.7.x and greater
35 - 3.8.x and greater
36
37 On 10/09/2019 support for Python 2.6 and Python 3.3 was deprecated and support was dropped on 01/10/2020. To avoid disruption, customers using the AWS CLI on Python 2.6 or 3.3 will need to upgrade their version of Python or pin the version of the AWS CLI in use prior to 01/10/2020. For more information, see this [blog post](https://aws.amazon.com/blogs/developer/deprecation-of-python-2-6-and-python-3-3-in-botocore-boto3-and-the-aws-cli/).
42 - 2.7.x and greater
43 - 3.4.x and greater
44 - 3.5.x and greater
45 - 3.6.x and greater
46 - 3.7.x and greater
47 - 3.8.x and greater
48
49 On 10/09/2019 support for Python 2.6 and Python 3.3 was deprecated and
50 support was dropped on 01/10/2020. To avoid disruption, customers using
51 the AWS CLI on Python 2.6 or 3.3 will need to upgrade their version of
52 Python or pin the version of the AWS CLI in use prior to 01/10/2020. For
53 more information, see this `blog
54 post <https://aws.amazon.com/blogs/developer/deprecation-of-python-2-6-and-python-3-3-in-botocore-boto3-and-the-aws-cli/>`__.
3855
3956 *Attention!*
4057
41 *We recommend that all customers regularly monitor the [Amazon Web Services Security Bulletins website](https://aws.amazon.com/security/security-bulletins) for any important security bulletins related to aws-cli.*
42
43 ### Installation
44
45 The safest way to install the AWS CLI is to use [pip](https://pip.pypa.io/en/stable/) in a `virtualenv`:
46
47 $ python -m pip install awscli
48
49 or, if you are not installing in a `virtualenv`, to install globally:
50
51 $ sudo python -m pip install awscli
58 *We recommend that all customers regularly monitor the* `Amazon Web
59 Services Security Bulletins
60 website <https://aws.amazon.com/security/security-bulletins>`__ *for
61 any important security bulletins related to aws-cli.*
62
63 Maintenance and Support for CLI Major Versions
64 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
66 The AWS CLI version 1 was made generally available on 09/02/2013 and is currently in the full support phase of the availability life cycle.
67
68 For information about maintenance and support for SDK major versions and their underlying dependencies, see the `Maintenance Policy <https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html>`__ section in the *AWS SDKs and Tools Shared Configuration and Credentials Reference Guide*.
69
70 Installation
71 ~~~~~~~~~~~~
72
73 The safest way to install the AWS CLI is to use
74 `pip <https://pip.pypa.io/en/stable/>`__ in a ``virtualenv``:
75
76 ::
77
78 $ python -m pip install awscli
79
80 or, if you are not installing in a ``virtualenv``, to install globally:
81
82 ::
83
84 $ sudo python -m pip install awscli
5285
5386 or for your user:
5487
55 $ python -m pip install --user awscli
56
57 If you have the aws-cli package installed and want to upgrade to the latest version you can run:
58
59 $ python -m pip install --upgrade awscli
88 ::
89
90 $ python -m pip install --user awscli
91
92 If you have the aws-cli package installed and want to upgrade to the
93 latest version you can run:
94
95 ::
96
97 $ python -m pip install --upgrade awscli
6098
6199 This will install the aws-cli package as well as all dependencies.
62100
63 *Note*
64
65 *On macOS, if you see an error regarding the version of `six` that came with `distutils` in El Capitan, use the `--ignore-installed` option:*
66
67 $ sudo python -m pip install awscli --ignore-installed six
68
69 On Linux and Mac OS, the AWS CLI can be installed using a [bundled installer](https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled). The AWS CLI can also be installed on Windows via an [MSI Installer](https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#msi-on-windows).
70
71 If you want to run the `develop` branch of the AWS CLI, see the [Development Version](CONTRIBUTING.md#development-version) section of the contributing guide.
72
73 See the [installation](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html) section of the AWS CLI User Guide for more information.
74
75 ### Configuration
76
77 Before using the AWS CLI, you need to configure your AWS credentials. You can do this in several ways:
78
79 - Configuration command
80 - Environment variables
81 - Shared credentials file
82 - Config file
83 - IAM Role
84
85 The quickest way to get started is to run the `aws configure` command:
86
87 $ aws configure
88 AWS Access Key ID: MYACCESSKEY
89 AWS Secret Access Key: MYSECRETKEY
90 Default region name [us-west-2]: us-west-2
91 Default output format [None]: json
101 .. note::
102 On macOS, if you see an error regarding the version of ``six`` that
103 came with ``distutils`` in El Capitan, use the ``--ignore-installed``
104 option:
105
106 ::
107
108 $ sudo python -m pip install awscli --ignore-installed six
109
110 On Linux and Mac OS, the AWS CLI can be installed using a `bundled
111 installer <https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled>`__.
112 The AWS CLI can also be installed on Windows via an `MSI
113 Installer <https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#msi-on-windows>`__.
114
115 If you want to run the ``develop`` branch of the AWS CLI, see the
116 `Development Version <CONTRIBUTING.md#cli-development-version>`__ section of
117 the contributing guide.
118
119 See the
120 `installation <https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html>`__
121 section of the AWS CLI User Guide for more information.
122
123 Configuration
124 ~~~~~~~~~~~~~
125
126 Before using the AWS CLI, you need to configure your AWS credentials.
127 You can do this in several ways:
128
129 - Configuration command
130 - Environment variables
131 - Shared credentials file
132 - Config file
133 - IAM Role
134
135 The quickest way to get started is to run the ``aws configure`` command:
136
137 ::
138
139 $ aws configure
140 AWS Access Key ID: MYACCESSKEY
141 AWS Secret Access Key: MYSECRETKEY
142 Default region name [us-west-2]: us-west-2
143 Default output format [None]: json
92144
93145 To use environment variables, do the following:
94146
95 $ export AWS_ACCESS_KEY_ID=<access_key>
96 $ export AWS_SECRET_ACCESS_KEY=<secret_key>
97
98 To use the shared credentials file, create an INI formatted file like this:
99
100 [default]
101 aws_access_key_id=MYACCESSKEY
102 aws_secret_access_key=MYSECRETKEY
103
104 [testing]
105 aws_access_key_id=MYACCESKEY
106 aws_secret_access_key=MYSECRETKEY
107
108 and place it in `~/.aws/credentials` (or in `%UserProfile%\.aws/credentials` on Windows). If you wish to place the shared credentials file in a different location than the one specified above, you need to tell aws-cli where to find it. Do this by setting the appropriate environment variable:
109
110 $ export AWS_SHARED_CREDENTIALS_FILE=/path/to/shared_credentials_file
147 ::
148
149 $ export AWS_ACCESS_KEY_ID=<access_key>
150 $ export AWS_SECRET_ACCESS_KEY=<secret_key>
151
152 To use the shared credentials file, create an INI formatted file like
153 this:
154
155 ::
156
157 [default]
158 aws_access_key_id=MYACCESSKEY
159 aws_secret_access_key=MYSECRETKEY
160
161 [testing]
162 aws_access_key_id=MYACCESKEY
163 aws_secret_access_key=MYSECRETKEY
164
165 and place it in ``~/.aws/credentials`` (or in
166 ``%UserProfile%\.aws/credentials`` on Windows). If you wish to place the
167 shared credentials file in a different location than the one specified
168 above, you need to tell aws-cli where to find it. Do this by setting the
169 appropriate environment variable:
170
171 ::
172
173 $ export AWS_SHARED_CREDENTIALS_FILE=/path/to/shared_credentials_file
111174
112175 To use a config file, create an INI formatted file like this:
113176
114 [default]
115 aws_access_key_id=<default access key>
116 aws_secret_access_key=<default secret key>
117 # Optional, to define default region for this profile.
118 region=us-west-1
119
120 [profile testing]
121 aws_access_key_id=<testing access key>
122 aws_secret_access_key=<testing secret key>
123 region=us-west-2
124
125 and place it in `~/.aws/config` (or in `%UserProfile%\.aws\config` on Windows). If you wish to place the config file in a different location than the one specified above, you need to tell the AWS CLI where to find it. Do this by setting the appropriate environment variable:
126
127 $ export AWS_CONFIG_FILE=/path/to/config_file
128
129 As you can see, you can have multiple `profiles` defined in both the shared credentials file and the configuration file. You can then specify which profile to use by using the `--profile` option. If no profile is specified the `default` profile is used.
130
131 In the config file, except for the default profile, you **must** prefix each config section of a profile group with `profile`. For example, if you have a profile named \"testing\" the section header would be `[profile testing]`.
132
133 The final option for credentials is highly recommended if you are using the AWS CLI on an EC2 instance. [IAM Roles](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html) are a great way to have credentials installed automatically on your instance. If you are using IAM Roles, the AWS CLI will find and use them automatically.
134
135 In addition to credentials, a number of other variables can be configured either with environment variables, configuration file entries, or both. See the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/overview.html) for more information.
136
137 For more information about configuration options, please refer to the [AWS
138 CLI Configuration Variables topic](http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#cli-aws-help-config-vars). You can access this topic from the AWS CLI as well by running `aws help config-vars`.
139
140 ### Basic Commands
177 ::
178
179 [default]
180 aws_access_key_id=<default access key>
181 aws_secret_access_key=<default secret key>
182 # Optional, to define default region for this profile.
183 region=us-west-1
184
185 [profile testing]
186 aws_access_key_id=<testing access key>
187 aws_secret_access_key=<testing secret key>
188 region=us-west-2
189
190 and place it in ``~/.aws/config`` (or in ``%UserProfile%\.aws\config``
191 on Windows). If you wish to place the config file in a different
192 location than the one specified above, you need to tell the AWS CLI
193 where to find it. Do this by setting the appropriate environment
194 variable:
195
196 ::
197
198 $ export AWS_CONFIG_FILE=/path/to/config_file
199
200 As you can see, you can have multiple ``profiles`` defined in both the
201 shared credentials file and the configuration file. You can then specify
202 which profile to use by using the ``--profile`` option. If no profile is
203 specified the ``default`` profile is used.
204
205 In the config file, except for the default profile, you **must** prefix
206 each config section of a profile group with ``profile``. For example, if
207 you have a profile named "testing" the section header would be
208 ``[profile testing]``.
209
210 The final option for credentials is highly recommended if you are using
211 the AWS CLI on an EC2 instance. `IAM
212 Roles <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html>`__
213 are a great way to have credentials installed automatically on your
214 instance. If you are using IAM Roles, the AWS CLI will find and use them
215 automatically.
216
217 In addition to credentials, a number of other variables can be
218 configured either with environment variables, configuration file
219 entries, or both. See the `AWS Tools and SDKs Shared Configuration and
220 Credentials Reference
221 Guide <https://docs.aws.amazon.com/credref/latest/refdocs/overview.html>`__
222 for more information.
223
224 For more information about configuration options, please refer to the
225 `AWS CLI Configuration Variables
226 topic <http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#cli-aws-help-config-vars>`__.
227 You can access this topic from the AWS CLI as well by running
228 ``aws help config-vars``.
229
230 Basic Commands
231 ~~~~~~~~~~~~~~
141232
142233 An AWS CLI command has the following structure:
143234
144 $ aws <command> <subcommand> [options and parameters]
235 ::
236
237 $ aws <command> <subcommand> [options and parameters]
145238
146239 For example, to list S3 buckets, the command would be:
147240
148 $ aws s3 ls
241 ::
242
243 $ aws s3 ls
149244
150245 To view help documentation, use one of the following:
151246
152 $ aws help
153 $ aws <command> help
154 $ aws <command> <subcommand> help
247 ::
248
249 $ aws help
250 $ aws <command> help
251 $ aws <command> <subcommand> help
155252
156253 To get the version of the AWS CLI:
157254
158 $ aws --version
255 ::
256
257 $ aws --version
159258
160259 To turn on debugging output:
161260
162 $ aws --debug <command> <subcommand>
163
164 You can read more information on the [Using the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-using.html) chapter of the AWS CLI User Guide.
165
166 ### Command Completion
167
168 The aws-cli package includes a command completion feature for Unix-like systems. This feature is not automatically installed so you need to configure it manually. To learn more, read the [AWS CLI Command completion topic](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html).
169
170 ## Getting Help
171
172 The best way to interact with our team is through GitHub. You can [open an issue](https://github.com/aws/aws-cli/issues/new/choose) and choose from one of our templates for guidance, bug reports, or feature requests.
173
174 You may find help from the community on [Stack Overflow](https://stackoverflow.com/) with the tag [aws-cli](https://stackoverflow.com/questions/tagged/aws-cli) or on the [AWS Discussion Forum for CLI](https://forums.aws.amazon.com/forum.jspa?forumID=150). If you have a support plan with [AWS Premium Support](https://aws.amazon.com/premiumsupport), you can also create a new support case.
175
176 Please check for open similar [issues](https://github.com/aws/aws-cli/issues/) before opening another one.
177
178 The AWS CLI implements AWS service APIs. For general issues regarding the services or their limitations, you may find the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/) helpful.
179
180 ## More Resources
181
182 - [Changelog](https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst)
183 - [AWS CLI Documentation](https://docs.aws.amazon.com/cli/index.html)
184 - [AWS CLI User Guide](https://docs.aws.amazon.com/cli/latest/userguide/)
185 - [AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/)
186 - [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/)
187 - [AWS Support](https://console.aws.amazon.com/support/home#/)
261 ::
262
263 $ aws --debug <command> <subcommand>
264
265 You can read more information on the `Using the AWS
266 CLI <https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-using.html>`__
267 chapter of the AWS CLI User Guide.
268
269 Command Completion
270 ~~~~~~~~~~~~~~~~~~
271
272 The aws-cli package includes a command completion feature for Unix-like
273 systems. This feature is not automatically installed so you need to
274 configure it manually. To learn more, read the `AWS CLI Command
275 completion
276 topic <https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html>`__.
277
278 Getting Help
279 ------------
280
281 The best way to interact with our team is through GitHub. You can `open
282 an issue <https://github.com/aws/aws-cli/issues/new/choose>`__ and
283 choose from one of our templates for guidance, bug reports, or feature
284 requests.
285
286 You may find help from the community on `Stack
287 Overflow <https://stackoverflow.com/>`__ with the tag
288 `aws-cli <https://stackoverflow.com/questions/tagged/aws-cli>`__ or on
289 the `AWS Discussion Forum for
290 CLI <https://forums.aws.amazon.com/forum.jspa?forumID=150>`__. If you
291 have a support plan with `AWS Premium
292 Support <https://aws.amazon.com/premiumsupport>`__, you can also create
293 a new support case.
294
295 Please check for open similar
296 `issues <https://github.com/aws/aws-cli/issues/>`__ before opening
297 another one.
298
299 The AWS CLI implements AWS service APIs. For general issues regarding
300 the services or their limitations, you may find the `Amazon Web Services
301 Discussion Forums <https://forums.aws.amazon.com/>`__ helpful.
302
303 More Resources
304 --------------
305
306 - `Changelog <https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst>`__
307 - `AWS CLI
308 Documentation <https://docs.aws.amazon.com/cli/index.html>`__
309 - `AWS CLI User
310 Guide <https://docs.aws.amazon.com/cli/latest/userguide/>`__
311 - `AWS CLI Command
312 Reference <https://docs.aws.amazon.com/cli/latest/reference/>`__
313 - `Amazon Web Services Discussion
314 Forums <https://forums.aws.amazon.com/>`__
315 - `AWS Support <https://console.aws.amazon.com/support/home#/>`__
316
317 .. |Build Status| image:: https://travis-ci.org/aws/aws-cli.svg?branch=develop
318 :target: https://travis-ci.org/aws/aws-cli
319 .. |Gitter| image:: https://badges.gitter.im/aws/aws-cli.svg
320 :target: https://gitter.im/aws/aws-cli
188321
189322 Platform: UNKNOWN
190323 Classifier: Development Status :: 5 - Production/Stable
+0
-180
README.md less more
0 # aws-cli
1
2 [![Build Status](https://travis-ci.org/aws/aws-cli.svg?branch=develop)](https://travis-ci.org/aws/aws-cli)
3
4 [![Gitter](https://badges.gitter.im/aws/aws-cli.svg)](https://gitter.im/aws/aws-cli)
5
6 This package provides a unified command line interface to Amazon Web Services.
7
8 Jump to:
9
10 - [Getting Started](#getting-started)
11 - [Getting Help](#getting-help)
12 - [More Resources](#more-resources)
13
14 ## Getting Started
15
16 This README is for the AWS CLI version 1. If you are looking for information about the AWS CLI version 2, please visit the [v2 branch](https://github.com/aws/aws-cli/tree/v2).
17
18 ### Requirements
19
20 The aws-cli package works on Python versions:
21
22 - 2.7.x and greater
23 - 3.4.x and greater
24 - 3.5.x and greater
25 - 3.6.x and greater
26 - 3.7.x and greater
27 - 3.8.x and greater
28
29 On 10/09/2019 support for Python 2.6 and Python 3.3 was deprecated and support was dropped on 01/10/2020. To avoid disruption, customers using the AWS CLI on Python 2.6 or 3.3 will need to upgrade their version of Python or pin the version of the AWS CLI in use prior to 01/10/2020. For more information, see this [blog post](https://aws.amazon.com/blogs/developer/deprecation-of-python-2-6-and-python-3-3-in-botocore-boto3-and-the-aws-cli/).
30
31 *Attention!*
32
33 *We recommend that all customers regularly monitor the [Amazon Web Services Security Bulletins website](https://aws.amazon.com/security/security-bulletins) for any important security bulletins related to aws-cli.*
34
35 ### Installation
36
37 The safest way to install the AWS CLI is to use [pip](https://pip.pypa.io/en/stable/) in a `virtualenv`:
38
39 $ python -m pip install awscli
40
41 or, if you are not installing in a `virtualenv`, to install globally:
42
43 $ sudo python -m pip install awscli
44
45 or for your user:
46
47 $ python -m pip install --user awscli
48
49 If you have the aws-cli package installed and want to upgrade to the latest version you can run:
50
51 $ python -m pip install --upgrade awscli
52
53 This will install the aws-cli package as well as all dependencies.
54
55 *Note*
56
57 *On macOS, if you see an error regarding the version of `six` that came with `distutils` in El Capitan, use the `--ignore-installed` option:*
58
59 $ sudo python -m pip install awscli --ignore-installed six
60
61 On Linux and Mac OS, the AWS CLI can be installed using a [bundled installer](https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled). The AWS CLI can also be installed on Windows via an [MSI Installer](https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#msi-on-windows).
62
63 If you want to run the `develop` branch of the AWS CLI, see the [Development Version](CONTRIBUTING.md#development-version) section of the contributing guide.
64
65 See the [installation](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html) section of the AWS CLI User Guide for more information.
66
67 ### Configuration
68
69 Before using the AWS CLI, you need to configure your AWS credentials. You can do this in several ways:
70
71 - Configuration command
72 - Environment variables
73 - Shared credentials file
74 - Config file
75 - IAM Role
76
77 The quickest way to get started is to run the `aws configure` command:
78
79 $ aws configure
80 AWS Access Key ID: MYACCESSKEY
81 AWS Secret Access Key: MYSECRETKEY
82 Default region name [us-west-2]: us-west-2
83 Default output format [None]: json
84
85 To use environment variables, do the following:
86
87 $ export AWS_ACCESS_KEY_ID=<access_key>
88 $ export AWS_SECRET_ACCESS_KEY=<secret_key>
89
90 To use the shared credentials file, create an INI formatted file like this:
91
92 [default]
93 aws_access_key_id=MYACCESSKEY
94 aws_secret_access_key=MYSECRETKEY
95
96 [testing]
97 aws_access_key_id=MYACCESKEY
98 aws_secret_access_key=MYSECRETKEY
99
100 and place it in `~/.aws/credentials` (or in `%UserProfile%\.aws/credentials` on Windows). If you wish to place the shared credentials file in a different location than the one specified above, you need to tell aws-cli where to find it. Do this by setting the appropriate environment variable:
101
102 $ export AWS_SHARED_CREDENTIALS_FILE=/path/to/shared_credentials_file
103
104 To use a config file, create an INI formatted file like this:
105
106 [default]
107 aws_access_key_id=<default access key>
108 aws_secret_access_key=<default secret key>
109 # Optional, to define default region for this profile.
110 region=us-west-1
111
112 [profile testing]
113 aws_access_key_id=<testing access key>
114 aws_secret_access_key=<testing secret key>
115 region=us-west-2
116
117 and place it in `~/.aws/config` (or in `%UserProfile%\.aws\config` on Windows). If you wish to place the config file in a different location than the one specified above, you need to tell the AWS CLI where to find it. Do this by setting the appropriate environment variable:
118
119 $ export AWS_CONFIG_FILE=/path/to/config_file
120
121 As you can see, you can have multiple `profiles` defined in both the shared credentials file and the configuration file. You can then specify which profile to use by using the `--profile` option. If no profile is specified the `default` profile is used.
122
123 In the config file, except for the default profile, you **must** prefix each config section of a profile group with `profile`. For example, if you have a profile named \"testing\" the section header would be `[profile testing]`.
124
125 The final option for credentials is highly recommended if you are using the AWS CLI on an EC2 instance. [IAM Roles](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html) are a great way to have credentials installed automatically on your instance. If you are using IAM Roles, the AWS CLI will find and use them automatically.
126
127 In addition to credentials, a number of other variables can be configured either with environment variables, configuration file entries, or both. See the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/overview.html) for more information.
128
129 For more information about configuration options, please refer to the [AWS
130 CLI Configuration Variables topic](http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#cli-aws-help-config-vars). You can access this topic from the AWS CLI as well by running `aws help config-vars`.
131
132 ### Basic Commands
133
134 An AWS CLI command has the following structure:
135
136 $ aws <command> <subcommand> [options and parameters]
137
138 For example, to list S3 buckets, the command would be:
139
140 $ aws s3 ls
141
142 To view help documentation, use one of the following:
143
144 $ aws help
145 $ aws <command> help
146 $ aws <command> <subcommand> help
147
148 To get the version of the AWS CLI:
149
150 $ aws --version
151
152 To turn on debugging output:
153
154 $ aws --debug <command> <subcommand>
155
156 You can read more information on the [Using the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-using.html) chapter of the AWS CLI User Guide.
157
158 ### Command Completion
159
160 The aws-cli package includes a command completion feature for Unix-like systems. This feature is not automatically installed so you need to configure it manually. To learn more, read the [AWS CLI Command completion topic](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html).
161
162 ## Getting Help
163
164 The best way to interact with our team is through GitHub. You can [open an issue](https://github.com/aws/aws-cli/issues/new/choose) and choose from one of our templates for guidance, bug reports, or feature requests.
165
166 You may find help from the community on [Stack Overflow](https://stackoverflow.com/) with the tag [aws-cli](https://stackoverflow.com/questions/tagged/aws-cli) or on the [AWS Discussion Forum for CLI](https://forums.aws.amazon.com/forum.jspa?forumID=150). If you have a support plan with [AWS Premium Support](https://aws.amazon.com/premiumsupport), you can also create a new support case.
167
168 Please check for open similar [issues](https://github.com/aws/aws-cli/issues/) before opening another one.
169
170 The AWS CLI implements AWS service APIs. For general issues regarding the services or their limitations, you may find the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/) helpful.
171
172 ## More Resources
173
174 - [Changelog](https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst)
175 - [AWS CLI Documentation](https://docs.aws.amazon.com/cli/index.html)
176 - [AWS CLI User Guide](https://docs.aws.amazon.com/cli/latest/userguide/)
177 - [AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/)
178 - [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/)
179 - [AWS Support](https://console.aws.amazon.com/support/home#/)
0 aws-cli
1 =======
2
3
4 .. image:: https://travis-ci.org/aws/aws-cli.svg?branch=develop
5 :target: https://travis-ci.org/aws/aws-cli
6 :alt: Build Status
7
8 .. image:: https://badges.gitter.im/aws/aws-cli.svg
9 :target: https://gitter.im/aws/aws-cli
10 :alt: Gitter
11
12
13 This package provides a unified command line interface to Amazon Web
14 Services.
15
16 Jump to:
17
18 - `Getting Started <#getting-started>`__
19 - `Getting Help <#getting-help>`__
20 - `More Resources <#more-resources>`__
21
22 Getting Started
23 ---------------
24
25 This README is for the AWS CLI version 1. If you are looking for
26 information about the AWS CLI version 2, please visit the `v2
27 branch <https://github.com/aws/aws-cli/tree/v2>`__.
28
29 Requirements
30 ~~~~~~~~~~~~
31
32 The aws-cli package works on Python versions:
33
34 - 2.7.x and greater
35 - 3.4.x and greater
36 - 3.5.x and greater
37 - 3.6.x and greater
38 - 3.7.x and greater
39 - 3.8.x and greater
40
41 On 10/09/2019 support for Python 2.6 and Python 3.3 was deprecated and
42 support was dropped on 01/10/2020. To avoid disruption, customers using
43 the AWS CLI on Python 2.6 or 3.3 will need to upgrade their version of
44 Python or pin the version of the AWS CLI in use prior to 01/10/2020. For
45 more information, see this `blog
46 post <https://aws.amazon.com/blogs/developer/deprecation-of-python-2-6-and-python-3-3-in-botocore-boto3-and-the-aws-cli/>`__.
47
48 *Attention!*
49
50 *We recommend that all customers regularly monitor the* `Amazon Web
51 Services Security Bulletins
52 website <https://aws.amazon.com/security/security-bulletins>`__ *for
53 any important security bulletins related to aws-cli.*
54
55 Maintenance and Support for CLI Major Versions
56 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57
58 The AWS CLI version 1 was made generally available on 09/02/2013 and is currently in the full support phase of the availability life cycle.
59
60 For information about maintenance and support for SDK major versions and their underlying dependencies, see the `Maintenance Policy <https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html>`__ section in the *AWS SDKs and Tools Shared Configuration and Credentials Reference Guide*.
61
62 Installation
63 ~~~~~~~~~~~~
64
65 The safest way to install the AWS CLI is to use
66 `pip <https://pip.pypa.io/en/stable/>`__ in a ``virtualenv``:
67
68 ::
69
70 $ python -m pip install awscli
71
72 or, if you are not installing in a ``virtualenv``, to install globally:
73
74 ::
75
76 $ sudo python -m pip install awscli
77
78 or for your user:
79
80 ::
81
82 $ python -m pip install --user awscli
83
84 If you have the aws-cli package installed and want to upgrade to the
85 latest version you can run:
86
87 ::
88
89 $ python -m pip install --upgrade awscli
90
91 This will install the aws-cli package as well as all dependencies.
92
93 .. note::
94 On macOS, if you see an error regarding the version of ``six`` that
95 came with ``distutils`` in El Capitan, use the ``--ignore-installed``
96 option:
97
98 ::
99
100 $ sudo python -m pip install awscli --ignore-installed six
101
102 On Linux and Mac OS, the AWS CLI can be installed using a `bundled
103 installer <https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled>`__.
104 The AWS CLI can also be installed on Windows via an `MSI
105 Installer <https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#msi-on-windows>`__.
106
107 If you want to run the ``develop`` branch of the AWS CLI, see the
108 `Development Version <CONTRIBUTING.md#cli-development-version>`__ section of
109 the contributing guide.
110
111 See the
112 `installation <https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html>`__
113 section of the AWS CLI User Guide for more information.
114
115 Configuration
116 ~~~~~~~~~~~~~
117
118 Before using the AWS CLI, you need to configure your AWS credentials.
119 You can do this in several ways:
120
121 - Configuration command
122 - Environment variables
123 - Shared credentials file
124 - Config file
125 - IAM Role
126
127 The quickest way to get started is to run the ``aws configure`` command:
128
129 ::
130
131 $ aws configure
132 AWS Access Key ID: MYACCESSKEY
133 AWS Secret Access Key: MYSECRETKEY
134 Default region name [us-west-2]: us-west-2
135 Default output format [None]: json
136
137 To use environment variables, do the following:
138
139 ::
140
141 $ export AWS_ACCESS_KEY_ID=<access_key>
142 $ export AWS_SECRET_ACCESS_KEY=<secret_key>
143
144 To use the shared credentials file, create an INI formatted file like
145 this:
146
147 ::
148
149 [default]
150 aws_access_key_id=MYACCESSKEY
151 aws_secret_access_key=MYSECRETKEY
152
153 [testing]
154 aws_access_key_id=MYACCESKEY
155 aws_secret_access_key=MYSECRETKEY
156
157 and place it in ``~/.aws/credentials`` (or in
158 ``%UserProfile%\.aws/credentials`` on Windows). If you wish to place the
159 shared credentials file in a different location than the one specified
160 above, you need to tell aws-cli where to find it. Do this by setting the
161 appropriate environment variable:
162
163 ::
164
165 $ export AWS_SHARED_CREDENTIALS_FILE=/path/to/shared_credentials_file
166
167 To use a config file, create an INI formatted file like this:
168
169 ::
170
171 [default]
172 aws_access_key_id=<default access key>
173 aws_secret_access_key=<default secret key>
174 # Optional, to define default region for this profile.
175 region=us-west-1
176
177 [profile testing]
178 aws_access_key_id=<testing access key>
179 aws_secret_access_key=<testing secret key>
180 region=us-west-2
181
182 and place it in ``~/.aws/config`` (or in ``%UserProfile%\.aws\config``
183 on Windows). If you wish to place the config file in a different
184 location than the one specified above, you need to tell the AWS CLI
185 where to find it. Do this by setting the appropriate environment
186 variable:
187
188 ::
189
190 $ export AWS_CONFIG_FILE=/path/to/config_file
191
192 As you can see, you can have multiple ``profiles`` defined in both the
193 shared credentials file and the configuration file. You can then specify
194 which profile to use by using the ``--profile`` option. If no profile is
195 specified the ``default`` profile is used.
196
197 In the config file, except for the default profile, you **must** prefix
198 each config section of a profile group with ``profile``. For example, if
199 you have a profile named "testing" the section header would be
200 ``[profile testing]``.
201
202 The final option for credentials is highly recommended if you are using
203 the AWS CLI on an EC2 instance. `IAM
204 Roles <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html>`__
205 are a great way to have credentials installed automatically on your
206 instance. If you are using IAM Roles, the AWS CLI will find and use them
207 automatically.
208
209 In addition to credentials, a number of other variables can be
210 configured either with environment variables, configuration file
211 entries, or both. See the `AWS Tools and SDKs Shared Configuration and
212 Credentials Reference
213 Guide <https://docs.aws.amazon.com/credref/latest/refdocs/overview.html>`__
214 for more information.
215
216 For more information about configuration options, please refer to the
217 `AWS CLI Configuration Variables
218 topic <http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#cli-aws-help-config-vars>`__.
219 You can access this topic from the AWS CLI as well by running
220 ``aws help config-vars``.
221
222 Basic Commands
223 ~~~~~~~~~~~~~~
224
225 An AWS CLI command has the following structure:
226
227 ::
228
229 $ aws <command> <subcommand> [options and parameters]
230
231 For example, to list S3 buckets, the command would be:
232
233 ::
234
235 $ aws s3 ls
236
237 To view help documentation, use one of the following:
238
239 ::
240
241 $ aws help
242 $ aws <command> help
243 $ aws <command> <subcommand> help
244
245 To get the version of the AWS CLI:
246
247 ::
248
249 $ aws --version
250
251 To turn on debugging output:
252
253 ::
254
255 $ aws --debug <command> <subcommand>
256
257 You can read more information on the `Using the AWS
258 CLI <https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-using.html>`__
259 chapter of the AWS CLI User Guide.
260
261 Command Completion
262 ~~~~~~~~~~~~~~~~~~
263
264 The aws-cli package includes a command completion feature for Unix-like
265 systems. This feature is not automatically installed so you need to
266 configure it manually. To learn more, read the `AWS CLI Command
267 completion
268 topic <https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html>`__.
269
270 Getting Help
271 ------------
272
273 The best way to interact with our team is through GitHub. You can `open
274 an issue <https://github.com/aws/aws-cli/issues/new/choose>`__ and
275 choose from one of our templates for guidance, bug reports, or feature
276 requests.
277
278 You may find help from the community on `Stack
279 Overflow <https://stackoverflow.com/>`__ with the tag
280 `aws-cli <https://stackoverflow.com/questions/tagged/aws-cli>`__ or on
281 the `AWS Discussion Forum for
282 CLI <https://forums.aws.amazon.com/forum.jspa?forumID=150>`__. If you
283 have a support plan with `AWS Premium
284 Support <https://aws.amazon.com/premiumsupport>`__, you can also create
285 a new support case.
286
287 Please check for open similar
288 `issues <https://github.com/aws/aws-cli/issues/>`__ before opening
289 another one.
290
291 The AWS CLI implements AWS service APIs. For general issues regarding
292 the services or their limitations, you may find the `Amazon Web Services
293 Discussion Forums <https://forums.aws.amazon.com/>`__ helpful.
294
295 More Resources
296 --------------
297
298 - `Changelog <https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst>`__
299 - `AWS CLI
300 Documentation <https://docs.aws.amazon.com/cli/index.html>`__
301 - `AWS CLI User
302 Guide <https://docs.aws.amazon.com/cli/latest/userguide/>`__
303 - `AWS CLI Command
304 Reference <https://docs.aws.amazon.com/cli/latest/reference/>`__
305 - `Amazon Web Services Discussion
306 Forums <https://forums.aws.amazon.com/>`__
307 - `AWS Support <https://console.aws.amazon.com/support/home#/>`__
308
309 .. |Build Status| image:: https://travis-ci.org/aws/aws-cli.svg?branch=develop
310 :target: https://travis-ci.org/aws/aws-cli
311 .. |Gitter| image:: https://badges.gitter.im/aws/aws-cli.svg
312 :target: https://gitter.im/aws/aws-cli
0 # CLI Python 3 Migration Guide
1
2 Python 2.7 was deprecated by the [Python Software Foundation](https://www.python.org/psf-landing/)
3 back on January 1, 2020 following a multi-year process of phasing it out. Because of this, AWS is
4 deprecating support for Python 2.7, meaning versions the AWS CLI v1 released after the deprecation
5 date will no longer work with Python 2.7.
6
7 -----
8
9 **Note**
10
11 Since the AWS CLI v2 bundles its own copy of Python, this transition only impacts users of the CLI
12 v1. You can upgrade to the AWS CLI v2 to avoid these deprecations in the future.
13
14 ----
15 ## Timeline
16
17 Going forward, customers using the CLI v1 should transition to using Python 3, with Python 3.6 becoming
18 the minimum by the end of the transition. The deprecation dates for the affected versions of Python are:
19
20 |Python version|Deprecation date|
21 |--------------|----------------|
22 | Python 2.7| 7/15/2021|
23 | Python 3.4 and 3.5| 2/1/2021|
24
25 ## Impact on the AWS CLI
26
27 The AWS Command Line Interface is built using the Python SDK, so it's affected by this transition.
28 AWS CLI v2 isn't affected by this transition, since it bundles its own copy of Python 3. However,
29 if you still use the AWS CLI v1, you need to decide whether to
30 [upgrade to Python 3](#upgrading-to-python-3) or transition to the
31 [AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).
32
33 ## Upgrading to Python 3
34
35 Before starting this process, we highly recommend
36 [upgrading to AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).
37 This will avoid the requirement for future upgrades and isolate your CLI usage from conflicts
38 with other packages like boto3 and botocore.
39
40 ### Do I need to upgrade?
41
42 First, let’s check if you need to upgrade to Python 3. If you have the AWS CLI installed,
43 you can quickly check which version of Python it’s using with this command.
44 ```bash
45 $ aws --version
46 aws-cli/1.18.191 Python/2.7.18 Darwin/19.6.0 botocore/1.19.31
47 ```
48
49 If the second portion of the version string, starting with **Python/** isn’t Python/3.6.x
50 or higher, you should review the options below.
51
52 ### Installing CLI with Python 3
53
54 If you’re using the **MSI installer**, you can simply start using these Python 3 based installers
55 [[32 bit](https://s3.amazonaws.com/aws-cli/AWSCLI32PY3.msi)]
56 [[64 bit](https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi)].
57
58 Otherwise, upgrading Python versions isn’t difficult.
59
60 1. To begin, uninstall your existing copy of the AWS CLI. You can find instructions in the
61 [CLI v1 installation guide](https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html).
62 2. Now we’ll install Python 3.6 or later. You can get Python from
63 [Python.org](https://www.python.org/downloads) or using your local package manager.
64 In this example, we’ll use a recent version, Python 3.8.7, to ensure the longest support window.
65 3. Next, depending on your installation method, the new Python installation should be available at
66 one of these locations. Use these commands to verify:
67 ```bash
68 $ python --version
69 Python 3.8.7
70
71 $ python3 --version
72 Python 3.8.7
73
74 $ python3.8 --version
75 Python 3.8.7
76 ```
77 5. Here, we're using the **python** command from above to make sure we're installing with the right
78 version. Use whichever alias provided the desired Python version.
79 ```bash
80 $ python -m pip install awscli
81 ```
82 Alternatively, if you're using the bundled installer you can use:
83 ```bash
84 $ python awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
85 ```
86 7. If you wish, you may verify that the newly installed copy of the AWS CLI tool, **aws**, is
87 using the correct version of Python. The **aws --version** command reports the **aws** tool's
88 version number, followed by the version of Python it's running under, then the operating system
89 version and the version of botocore. As long as the Python version is at least 3.6,
90 you're ready to go:
91 ```bash
92 $ aws --version
93 aws-cli/1.18.191 Python/3.8.7 Darwin/19.6.0 botocore/1.19.31
94 ```
95
96 ## If you're unable to upgrade to Python 3
97
98 It may be possible that you're unable to upgrade to Python 3. Under these circumstances, you
99 should be prepared for the deprecation date, in order to not be inconvenienced when the time
100 arrives. If you're using a version of the AWS CLI v1 released prior to the deprecation date,
101 it will continue to function after end of support. These versions however will no longer be
102 receiving security or feature updates. If those are required, you will need to migrate to
103 Python 3 to start receiving updates again.
104
105 ### Upgrade a pip-based install
106
107 If you install the AWS CLI using pip, as long as you use pip 10.0 and later, you will
108 automatically install the last available version compatible with Python 2.7.
109
110 ### Windows MSI Installer
111
112 If you installed the AWS CLI v1 using the Windows MSI Installer for Python 3
113 [[32 bit](https://s3.amazonaws.com/aws-cli/AWSCLI32PY3.msi)]
114 [[64 bit](https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi)],
115 you're not impacted by this transition. These installers stay up-to-date with each release.
116
117 If you're still using the AWS CLI v1 as installed using the Windows MSI Installer for Python 2,
118 be aware that after the deprecation date, the download links for the latest version of the CLI v1
119 Windows MSI Installer will point to the Python 3 MSIs. Previous releases, including those for
120 Python 2, will remain available at their version-specific URLs:
121 * `https://s3.amazonaws.com/aws-cli/AWSCLI32-{VERSION}.msi`
122 * `https://s3.amazonaws.com/aws-cli/AWSCLI64-{VERSION}.msi`
123
124 ### Upgrade with the AWS CLI bundled installer
125
126 If you use the AWS CLI bundled installer to install the AWS CLI v1 and cannot upgrade,
127 you will need to ensure you’re downloading a Python 2 compatible version.
128 All versions released prior to the deprecation date should be compatible.
129 You can download a specific installer using the URL
130 `https://s3.amazonaws.com/aws-cli/awscli-bundle-{VERSION}.zip`,
131 where "`{VERSION}`" is the AWS CLI version you wish to install.
132
133 For example, you could choose version 1.18.200 using the following command:
134
135 ```bash
136 curl https://s3.amazonaws.com/aws-cli/awscli-bundle-1.18.200.zip -o awscli-bundle.zip
137 ```
138
139 Once you've downloaded the bundle, proceed with step 2 of the bundle-based installation
140 instructions for your platform:
141
142 * [Linux](https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled)
143 * [macOS](https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html#install-macosos-bundled-sudo)
1616 """
1717 import os
1818
19 __version__ = '1.18.135'
19 __version__ = '1.18.219'
2020
2121 #
2222 # Get our data path to be added to botocore's search path
0 # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12 __version__ = '0.16.0'
0 # Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12
13
14 DOC_EVENTS = {
15 'doc-breadcrumbs': '.%s',
16 'doc-title': '.%s',
17 'doc-description': '.%s',
18 'doc-synopsis-start': '.%s',
19 'doc-synopsis-option': '.%s.%s',
20 'doc-synopsis-end': '.%s',
21 'doc-options-start': '.%s',
22 'doc-option': '.%s.%s',
23 'doc-option-example': '.%s.%s',
24 'doc-options-end': '.%s',
25 'doc-examples': '.%s',
26 'doc-output': '.%s',
27 'doc-subitems-start': '.%s',
28 'doc-subitem': '.%s.%s',
29 'doc-subitems-end': '.%s',
30 'doc-relateditems-start': '.%s',
31 'doc-relateditem': '.%s.%s',
32 'doc-relateditems-end': '.%s'
33 }
34
35
36 def generate_events(session, help_command):
37 # Now generate the documentation events
38 session.emit('doc-breadcrumbs.%s' % help_command.event_class,
39 help_command=help_command)
40 session.emit('doc-title.%s' % help_command.event_class,
41 help_command=help_command)
42 session.emit('doc-description.%s' % help_command.event_class,
43 help_command=help_command)
44 session.emit('doc-synopsis-start.%s' % help_command.event_class,
45 help_command=help_command)
46 if help_command.arg_table:
47 for arg_name in help_command.arg_table:
48 # An argument can set an '_UNDOCUMENTED' attribute
49 # to True to indicate a parameter that exists
50 # but shouldn't be documented. This can be used
51 # for backwards compatibility of deprecated arguments.
52 if getattr(help_command.arg_table[arg_name],
53 '_UNDOCUMENTED', False):
54 continue
55 session.emit(
56 'doc-synopsis-option.%s.%s' % (help_command.event_class,
57 arg_name),
58 arg_name=arg_name, help_command=help_command)
59 session.emit('doc-synopsis-end.%s' % help_command.event_class,
60 help_command=help_command)
61 session.emit('doc-options-start.%s' % help_command.event_class,
62 help_command=help_command)
63 if help_command.arg_table:
64 for arg_name in help_command.arg_table:
65 if getattr(help_command.arg_table[arg_name],
66 '_UNDOCUMENTED', False):
67 continue
68 session.emit('doc-option.%s.%s' % (help_command.event_class,
69 arg_name),
70 arg_name=arg_name, help_command=help_command)
71 session.emit('doc-option-example.%s.%s' %
72 (help_command.event_class, arg_name),
73 arg_name=arg_name, help_command=help_command)
74 session.emit('doc-options-end.%s' % help_command.event_class,
75 help_command=help_command)
76 session.emit('doc-subitems-start.%s' % help_command.event_class,
77 help_command=help_command)
78 if help_command.command_table:
79 for command_name in sorted(help_command.command_table.keys()):
80 if hasattr(help_command.command_table[command_name],
81 '_UNDOCUMENTED'):
82 continue
83 session.emit('doc-subitem.%s.%s'
84 % (help_command.event_class, command_name),
85 command_name=command_name,
86 help_command=help_command)
87 session.emit('doc-subitems-end.%s' % help_command.event_class,
88 help_command=help_command)
89 session.emit('doc-examples.%s' % help_command.event_class,
90 help_command=help_command)
91 session.emit('doc-output.%s' % help_command.event_class,
92 help_command=help_command)
93 session.emit('doc-relateditems-start.%s' % help_command.event_class,
94 help_command=help_command)
95 if help_command.related_items:
96 for related_item in sorted(help_command.related_items):
97 session.emit('doc-relateditem.%s.%s'
98 % (help_command.event_class, related_item),
99 help_command=help_command,
100 related_item=related_item)
101 session.emit('doc-relateditems-end.%s' % help_command.event_class,
102 help_command=help_command)
0 # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12 from botocore.compat import six
13
14
15 class DocStringParser(six.moves.html_parser.HTMLParser):
16 """
17 A simple HTML parser. Focused on converting the subset of HTML
18 that appears in the documentation strings of the JSON models into
19 simple ReST format.
20 """
21
22 def __init__(self, doc):
23 self.tree = None
24 self.doc = doc
25 six.moves.html_parser.HTMLParser.__init__(self)
26
27 def reset(self):
28 six.moves.html_parser.HTMLParser.reset(self)
29 self.tree = HTMLTree(self.doc)
30
31 def feed(self, data):
32 # HTMLParser is an old style class, so the super() method will not work.
33 six.moves.html_parser.HTMLParser.feed(self, data)
34 self.tree.write()
35 self.tree = HTMLTree(self.doc)
36
37 def close(self):
38 six.moves.html_parser.HTMLParser.close(self)
39 # Write if there is anything remaining.
40 self.tree.write()
41 self.tree = HTMLTree(self.doc)
42
43 def handle_starttag(self, tag, attrs):
44 self.tree.add_tag(tag, attrs=attrs)
45
46 def handle_endtag(self, tag):
47 self.tree.add_tag(tag, is_start=False)
48
49 def handle_data(self, data):
50 self.tree.add_data(data)
51
52
53 class HTMLTree(object):
54 """
55 A tree which handles HTML nodes. Designed to work with a python HTML parser,
56 meaning that the current_node will be the most recently opened tag. When
57 a tag is closed, the current_node moves up to the parent node.
58 """
59 def __init__(self, doc):
60 self.doc = doc
61 self.head = StemNode()
62 self.current_node = self.head
63 self.unhandled_tags = []
64
65 def add_tag(self, tag, attrs=None, is_start=True):
66 if not self._doc_has_handler(tag, is_start):
67 self.unhandled_tags.append(tag)
68 return
69
70 if is_start:
71 if tag == 'li':
72 node = LineItemNode(attrs)
73 else:
74 node = TagNode(tag, attrs)
75 self.current_node.add_child(node)
76 self.current_node = node
77 else:
78 self.current_node = self.current_node.parent
79
80 def _doc_has_handler(self, tag, is_start):
81 if is_start:
82 handler_name = 'start_%s' % tag
83 else:
84 handler_name = 'end_%s' % tag
85
86 return hasattr(self.doc.style, handler_name)
87
88 def add_data(self, data):
89 self.current_node.add_child(DataNode(data))
90
91 def write(self):
92 self.head.write(self.doc)
93
94
95 class Node(object):
96 def __init__(self, parent=None):
97 self.parent = parent
98
99 def write(self, doc):
100 raise NotImplementedError
101
102
103 class StemNode(Node):
104 def __init__(self, parent=None):
105 super(StemNode, self).__init__(parent)
106 self.children = []
107
108 def add_child(self, child):
109 child.parent = self
110 self.children.append(child)
111
112 def write(self, doc):
113 self._write_children(doc)
114
115 def _write_children(self, doc):
116 for child in self.children:
117 child.write(doc)
118
119
120 class TagNode(StemNode):
121 """
122 A generic Tag node. It will verify that handlers exist before writing.
123 """
124 def __init__(self, tag, attrs=None, parent=None):
125 super(TagNode, self).__init__(parent)
126 self.attrs = attrs
127 self.tag = tag
128
129 def write(self, doc):
130 self._write_start(doc)
131 self._write_children(doc)
132 self._write_end(doc)
133
134 def _write_start(self, doc):
135 handler_name = 'start_%s' % self.tag
136 if hasattr(doc.style, handler_name):
137 getattr(doc.style, handler_name)(self.attrs)
138
139 def _write_end(self, doc):
140 handler_name = 'end_%s' % self.tag
141 if hasattr(doc.style, handler_name):
142 getattr(doc.style, handler_name)()
143
144
145 class LineItemNode(TagNode):
146 def __init__(self, attrs=None, parent=None):
147 super(LineItemNode, self).__init__('li', attrs, parent)
148
149 def write(self, doc):
150 self._lstrip(self)
151 super(LineItemNode, self).write(doc)
152
153 def _lstrip(self, node):
154 """
155 Traverses the tree, stripping out whitespace until text data is found
156 :param node: The node to strip
157 :return: True if non-whitespace data was found, False otherwise
158 """
159 for child in node.children:
160 if isinstance(child, DataNode):
161 child.lstrip()
162 if child.data:
163 return True
164 else:
165 found = self._lstrip(child)
166 if found:
167 return True
168
169 return False
170
171
172 class DataNode(Node):
173 """
174 A Node that contains only string data.
175 """
176 def __init__(self, data, parent=None):
177 super(DataNode, self).__init__(parent)
178 if not isinstance(data, six.string_types):
179 raise ValueError("Expecting string type, %s given." % type(data))
180 self.data = data
181
182 def lstrip(self):
183 self.data = self.data.lstrip()
184
185 def write(self, doc):
186 if not self.data:
187 return
188
189 if self.data.isspace():
190 str_data = ' '
191 else:
192 end_space = self.data[-1].isspace()
193 words = self.data.split()
194 words = doc.translate_words(words)
195 str_data = ' '.join(words)
196 if end_space:
197 str_data += ' '
198
199 doc.handle_data(str_data)
0 # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12 import logging
13
14 from botocore.compat import OrderedDict
15 from awscli.bcdoc.docstringparser import DocStringParser
16 from awscli.bcdoc.style import ReSTStyle
17
18 LOG = logging.getLogger('bcdocs')
19
20
21 class ReSTDocument(object):
22
23 def __init__(self, target='man'):
24 self.style = ReSTStyle(self)
25 self.target = target
26 self.parser = DocStringParser(self)
27 self.keep_data = True
28 self.do_translation = False
29 self.translation_map = {}
30 self.hrefs = {}
31 self._writes = []
32 self._last_doc_string = None
33
34 def _write(self, s):
35 if self.keep_data and s is not None:
36 self._writes.append(s)
37
38 def write(self, content):
39 """
40 Write content into the document.
41 """
42 self._write(content)
43
44 def writeln(self, content):
45 """
46 Write content on a newline.
47 """
48 self._write('%s%s\n' % (self.style.spaces(), content))
49
50 def peek_write(self):
51 """
52 Returns the last content written to the document without
53 removing it from the stack.
54 """
55 return self._writes[-1]
56
57 def pop_write(self):
58 """
59 Removes and returns the last content written to the stack.
60 """
61 return self._writes.pop()
62
63 def push_write(self, s):
64 """
65 Places new content on the stack.
66 """
67 self._writes.append(s)
68
69 def getvalue(self):
70 """
71 Returns the current content of the document as a string.
72 """
73 if self.hrefs:
74 self.style.new_paragraph()
75 for refname, link in self.hrefs.items():
76 self.style.link_target_definition(refname, link)
77 return ''.join(self._writes).encode('utf-8')
78
79 def translate_words(self, words):
80 return [self.translation_map.get(w, w) for w in words]
81
82 def handle_data(self, data):
83 if data and self.keep_data:
84 self._write(data)
85
86 def include_doc_string(self, doc_string):
87 if doc_string:
88 try:
89 start = len(self._writes)
90 self.parser.feed(doc_string)
91 self.parser.close()
92 end = len(self._writes)
93 self._last_doc_string = (start, end)
94 except Exception:
95 LOG.debug('Error parsing doc string', exc_info=True)
96 LOG.debug(doc_string)
97
98 def remove_last_doc_string(self):
99 # Removes all writes inserted by last doc string
100 if self._last_doc_string is not None:
101 start, end = self._last_doc_string
102 del self._writes[start:end]
103
104
105 class DocumentStructure(ReSTDocument):
106 def __init__(self, name, section_names=None, target='man', context=None):
107 """Provides a Hierarichial structure to a ReSTDocument
108
109 You can write to it similiar to as you can to a ReSTDocument but
110 has an innate structure for more orginaztion and abstraction.
111
112 :param name: The name of the document
113 :param section_names: A list of sections to be included
114 in the document.
115 :param target: The target documentation of the Document structure
116 :param context: A dictionary of data to store with the strucuture. These
117 are only stored per section not the entire structure.
118 """
119 super(DocumentStructure, self).__init__(target=target)
120 self._name = name
121 self._structure = OrderedDict()
122 self._path = [self._name]
123 self._context = {}
124 if context is not None:
125 self._context = context
126 if section_names is not None:
127 self._generate_structure(section_names)
128
129 @property
130 def name(self):
131 """The name of the document structure"""
132 return self._name
133
134 @property
135 def path(self):
136 """
137 A list of where to find a particular document structure in the
138 overlying document structure.
139 """
140 return self._path
141
142 @path.setter
143 def path(self, value):
144 self._path = value
145
146 @property
147 def available_sections(self):
148 return list(self._structure)
149
150 @property
151 def context(self):
152 return self._context
153
154 def _generate_structure(self, section_names):
155 for section_name in section_names:
156 self.add_new_section(section_name)
157
158 def add_new_section(self, name, context=None):
159 """Adds a new section to the current document structure
160
161 This document structure will be considered a section to the
162 current document structure but will in itself be an entirely
163 new document structure that can be written to and have sections
164 as well
165
166 :param name: The name of the section.
167 :param context: A dictionary of data to store with the strucuture. These
168 are only stored per section not the entire structure.
169 :rtype: DocumentStructure
170 :returns: A new document structure to add to but lives as a section
171 to the document structure it was instantiated from.
172 """
173 # Add a new section
174 section = self.__class__(name=name, target=self.target,
175 context=context)
176 section.path = self.path + [name]
177 # Indent the section apporpriately as well
178 section.style.indentation = self.style.indentation
179 section.translation_map = self.translation_map
180 section.hrefs = self.hrefs
181 self._structure[name] = section
182 return section
183
184 def get_section(self, name):
185 """Retrieve a section"""
186 return self._structure[name]
187
188 def delete_section(self, name):
189 """Delete a section"""
190 del self._structure[name]
191
192 def flush_structure(self):
193 """Flushes a doc structure to a ReSTructed string
194
195 The document is flushed out in a DFS style where sections and their
196 subsections' values are added to the string as they are visited.
197 """
198 # We are at the root flush the links at the beginning of the
199 # document
200 if len(self.path) == 1:
201 if self.hrefs:
202 self.style.new_paragraph()
203 for refname, link in self.hrefs.items():
204 self.style.link_target_definition(refname, link)
205 value = self.getvalue()
206 for name, section in self._structure.items():
207 value += section.flush_structure()
208 return value
209
210 def getvalue(self):
211 return ''.join(self._writes).encode('utf-8')
212
213 def remove_all_sections(self):
214 self._structure = OrderedDict()
215
216 def clear_text(self):
217 self._writes = []
0 # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12
13 import logging
14
15 logger = logging.getLogger('bcdocs')
16
17
18 class BaseStyle(object):
19
20 def __init__(self, doc, indent_width=2):
21 self.doc = doc
22 self.indent_width = indent_width
23 self._indent = 0
24 self.keep_data = True
25
26 @property
27 def indentation(self):
28 return self._indent
29
30 @indentation.setter
31 def indentation(self, value):
32 self._indent = value
33
34 def new_paragraph(self):
35 return '\n%s' % self.spaces()
36
37 def indent(self):
38 self._indent += 1
39
40 def dedent(self):
41 if self._indent > 0:
42 self._indent -= 1
43
44 def spaces(self):
45 return ' ' * (self._indent * self.indent_width)
46
47 def bold(self, s):
48 return s
49
50 def ref(self, link, title=None):
51 return link
52
53 def h2(self, s):
54 return s
55
56 def h3(self, s):
57 return s
58
59 def underline(self, s):
60 return s
61
62 def italics(self, s):
63 return s
64
65
66 class ReSTStyle(BaseStyle):
67
68 def __init__(self, doc, indent_width=2):
69 BaseStyle.__init__(self, doc, indent_width)
70 self.do_p = True
71 self.a_href = None
72 self.list_depth = 0
73
74 def new_paragraph(self):
75 self.doc.write('\n\n%s' % self.spaces())
76
77 def new_line(self):
78 self.doc.write('\n%s' % self.spaces())
79
80 def _start_inline(self, markup):
81 self.doc.write(markup)
82
83 def _end_inline(self, markup):
84 # Sometimes the HTML markup has whitespace between the end
85 # of the text inside the inline markup and the closing element
86 # (e.g. <b>foobar </b>). This trailing space will cause
87 # problems in the ReST inline markup so we remove it here
88 # by popping the last item written off the stack, striping
89 # the whitespace and then pushing it back on the stack.
90 last_write = self.doc.pop_write().rstrip(' ')
91
92 # Sometimes, for whatever reason, a tag like <b/> is present. This
93 # is problematic because if we simply translate that directly then
94 # we end up with something like ****, which rst will assume is a
95 # heading instead of an empty bold.
96 if last_write == markup:
97 return
98
99 self.doc.push_write(last_write)
100 self.doc.write(markup + ' ')
101
102 def start_bold(self, attrs=None):
103 self._start_inline('**')
104
105 def end_bold(self):
106 self._end_inline('**')
107
108 def start_b(self, attrs=None):
109 self.doc.do_translation = True
110 self.start_bold(attrs)
111
112 def end_b(self):
113 self.doc.do_translation = False
114 self.end_bold()
115
116 def bold(self, s):
117 if s:
118 self.start_bold()
119 self.doc.write(s)
120 self.end_bold()
121
122 def ref(self, title, link=None):
123 if link is None:
124 link = title
125 self.doc.write(':doc:`%s <%s>`' % (title, link))
126
127 def _heading(self, s, border_char):
128 border = border_char * len(s)
129 self.new_paragraph()
130 self.doc.write('%s\n%s\n%s' % (border, s, border))
131 self.new_paragraph()
132
133 def h1(self, s):
134 self._heading(s, '*')
135
136 def h2(self, s):
137 self._heading(s, '=')
138
139 def h3(self, s):
140 self._heading(s, '-')
141
142 def start_italics(self, attrs=None):
143 self._start_inline('*')
144
145 def end_italics(self):
146 self._end_inline('*')
147
148 def italics(self, s):
149 if s:
150 self.start_italics()
151 self.doc.write(s)
152 self.end_italics()
153
154 def start_p(self, attrs=None):
155 if self.do_p:
156 self.doc.write('\n\n%s' % self.spaces())
157
158 def end_p(self):
159 if self.do_p:
160 self.doc.write('\n\n%s' % self.spaces())
161
162 def start_code(self, attrs=None):
163 self.doc.do_translation = True
164 self._start_inline('``')
165
166 def end_code(self):
167 self.doc.do_translation = False
168 self._end_inline('``')
169
170 def code(self, s):
171 if s:
172 self.start_code()
173 self.doc.write(s)
174 self.end_code()
175
176 def start_note(self, attrs=None):
177 self.new_paragraph()
178 self.doc.write('.. note::')
179 self.indent()
180 self.new_paragraph()
181
182 def end_note(self):
183 self.dedent()
184 self.new_paragraph()
185
186 def start_important(self, attrs=None):
187 self.new_paragraph()
188 self.doc.write('.. warning::')
189 self.indent()
190 self.new_paragraph()
191
192 def end_important(self):
193 self.dedent()
194 self.new_paragraph()
195
196 def start_danger(self, attrs=None):
197 self.new_paragraph()
198 self.doc.write('.. danger::')
199 self.indent()
200 self.new_paragraph()
201
202 def end_danger(self):
203 self.dedent()
204 self.new_paragraph()
205
206 def start_a(self, attrs=None):
207 if attrs:
208 for attr_key, attr_value in attrs:
209 if attr_key == 'href':
210 self.a_href = attr_value
211 self.doc.write('`')
212 else:
213 # There are some model documentation that
214 # looks like this: <a>DescribeInstances</a>.
215 # In this case we just write out an empty
216 # string.
217 self.doc.write(' ')
218 self.doc.do_translation = True
219
220 def link_target_definition(self, refname, link):
221 self.doc.writeln('.. _%s: %s' % (refname, link))
222
223 def sphinx_reference_label(self, label, text=None):
224 if text is None:
225 text = label
226 if self.doc.target == 'html':
227 self.doc.write(':ref:`%s <%s>`' % (text, label))
228 else:
229 self.doc.write(text)
230
231 def end_a(self):
232 self.doc.do_translation = False
233 if self.a_href:
234 last_write = self.doc.pop_write()
235 last_write = last_write.rstrip(' ')
236 if last_write and last_write != '`':
237 if ':' in last_write:
238 last_write = last_write.replace(':', r'\:')
239 self.doc.push_write(last_write)
240 self.doc.push_write(' <%s>`__' % self.a_href)
241 elif last_write == '`':
242 # Look at start_a(). It will do a self.doc.write('`')
243 # which is the start of the link title. If that is the
244 # case then there was no link text. We should just
245 # use an inline link. The syntax of this is
246 # `<http://url>`_
247 self.doc.push_write('`<%s>`__' % self.a_href)
248 else:
249 self.doc.push_write(self.a_href)
250 self.doc.hrefs[self.a_href] = self.a_href
251 self.doc.write('`__')
252 self.a_href = None
253 self.doc.write(' ')
254
255 def start_i(self, attrs=None):
256 self.doc.do_translation = True
257 self.start_italics()
258
259 def end_i(self):
260 self.doc.do_translation = False
261 self.end_italics()
262
263 def start_li(self, attrs=None):
264 self.new_line()
265 self.do_p = False
266 self.doc.write('* ')
267
268 def end_li(self):
269 self.do_p = True
270 self.new_line()
271
272 def li(self, s):
273 if s:
274 self.start_li()
275 self.doc.writeln(s)
276 self.end_li()
277
278 def start_ul(self, attrs=None):
279 if self.list_depth != 0:
280 self.indent()
281 self.list_depth += 1
282 self.new_paragraph()
283
284 def end_ul(self):
285 self.list_depth -= 1
286 if self.list_depth != 0:
287 self.dedent()
288 self.new_paragraph()
289
290 def start_ol(self, attrs=None):
291 # TODO: Need to control the bullets used for LI items
292 if self.list_depth != 0:
293 self.indent()
294 self.list_depth += 1
295 self.new_paragraph()
296
297 def end_ol(self):
298 self.list_depth -= 1
299 if self.list_depth != 0:
300 self.dedent()
301 self.new_paragraph()
302
303 def start_examples(self, attrs=None):
304 self.doc.keep_data = False
305
306 def end_examples(self):
307 self.doc.keep_data = True
308
309 def start_fullname(self, attrs=None):
310 self.doc.keep_data = False
311
312 def end_fullname(self):
313 self.doc.keep_data = True
314
315 def start_codeblock(self, attrs=None):
316 self.doc.write('::')
317 self.indent()
318 self.new_paragraph()
319
320 def end_codeblock(self):
321 self.dedent()
322 self.new_paragraph()
323
324 def codeblock(self, code):
325 """
326 Literal code blocks are introduced by ending a paragraph with
327 the special marker ::. The literal block must be indented
328 (and, like all paragraphs, separated from the surrounding
329 ones by blank lines).
330 """
331 self.start_codeblock()
332 self.doc.writeln(code)
333 self.end_codeblock()
334
335 def toctree(self):
336 if self.doc.target == 'html':
337 self.doc.write('\n.. toctree::\n')
338 self.doc.write(' :maxdepth: 1\n')
339 self.doc.write(' :titlesonly:\n\n')
340 else:
341 self.start_ul()
342
343 def tocitem(self, item, file_name=None):
344 if self.doc.target == 'man':
345 self.li(item)
346 else:
347 if file_name:
348 self.doc.writeln(' %s' % file_name)
349 else:
350 self.doc.writeln(' %s' % item)
351
352 def hidden_toctree(self):
353 if self.doc.target == 'html':
354 self.doc.write('\n.. toctree::\n')
355 self.doc.write(' :maxdepth: 1\n')
356 self.doc.write(' :hidden:\n\n')
357
358 def hidden_tocitem(self, item):
359 if self.doc.target == 'html':
360 self.tocitem(item)
361
362 def table_of_contents(self, title=None, depth=None):
363 self.doc.write('.. contents:: ')
364 if title is not None:
365 self.doc.writeln(title)
366 if depth is not None:
367 self.doc.writeln(' :depth: %s' % depth)
368
369 def start_sphinx_py_class(self, class_name):
370 self.new_paragraph()
371 self.doc.write('.. py:class:: %s' % class_name)
372 self.indent()
373 self.new_paragraph()
374
375 def end_sphinx_py_class(self):
376 self.dedent()
377 self.new_paragraph()
378
379 def start_sphinx_py_method(self, method_name, parameters=None):
380 self.new_paragraph()
381 content = '.. py:method:: %s' % method_name
382 if parameters is not None:
383 content += '(%s)' % parameters
384 self.doc.write(content)
385 self.indent()
386 self.new_paragraph()
387
388 def end_sphinx_py_method(self):
389 self.dedent()
390 self.new_paragraph()
391
392 def start_sphinx_py_attr(self, attr_name):
393 self.new_paragraph()
394 self.doc.write('.. py:attribute:: %s' % attr_name)
395 self.indent()
396 self.new_paragraph()
397
398 def end_sphinx_py_attr(self):
399 self.dedent()
400 self.new_paragraph()
401
402 def write_py_doc_string(self, docstring):
403 docstring_lines = docstring.splitlines()
404 for docstring_line in docstring_lines:
405 self.doc.writeln(docstring_line)
406
407 def external_link(self, title, link):
408 if self.doc.target == 'html':
409 self.doc.write('`%s <%s>`_' % (title, link))
410 else:
411 self.doc.write(title)
412
413 def internal_link(self, title, page):
414 if self.doc.target == 'html':
415 self.doc.write(':doc:`%s <%s>`' % (title, page))
416 else:
417 self.doc.write(title)
0 # -*- coding: utf-8 -*-
1 """
2
3 Custom docutils writer for plain text.
4 Based heavily on the Sphinx text writer. See copyright below.
5
6 :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
7 :license: BSD, see LICENSE for details.
8
9 """
10 import os
11 import re
12 import textwrap
13
14 from docutils import nodes, writers
15
16
17 class TextWrapper(textwrap.TextWrapper):
18 """Custom subclass that uses a different word separator regex."""
19
20 wordsep_re = re.compile(
21 r'(\s+|' # any whitespace
22 r'(?<=\s)(?::[a-z-]+:)?`\S+|' # interpreted text start
23 r'[^\s\w]*\w+[a-zA-Z]-(?=\w+[a-zA-Z])|' # hyphenated words
24 r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash
25
26
27 MAXWIDTH = 70
28 STDINDENT = 3
29
30
31 def my_wrap(text, width=MAXWIDTH, **kwargs):
32 w = TextWrapper(width=width, **kwargs)
33 return w.wrap(text)
34
35
36 class TextWriter(writers.Writer):
37 supported = ('text',)
38 settings_spec = ('No options here.', '', ())
39 settings_defaults = {}
40
41 output = None
42
43 def __init__(self):
44 writers.Writer.__init__(self)
45
46 def translate(self):
47 visitor = TextTranslator(self.document)
48 self.document.walkabout(visitor)
49 self.output = visitor.body
50
51
52 class TextTranslator(nodes.NodeVisitor):
53 sectionchars = '*=-~"+`'
54
55 def __init__(self, document):
56 nodes.NodeVisitor.__init__(self, document)
57
58 self.nl = os.linesep
59 self.states = [[]]
60 self.stateindent = [0]
61 self.list_counter = []
62 self.sectionlevel = 0
63 self.table = None
64
65 def add_text(self, text):
66 self.states[-1].append((-1, text))
67
68 def new_state(self, indent=STDINDENT):
69 self.states.append([])
70 self.stateindent.append(indent)
71
72 def end_state(self, wrap=True, end=[''], first=None):
73 content = self.states.pop()
74 maxindent = sum(self.stateindent)
75 indent = self.stateindent.pop()
76 result = []
77 toformat = []
78
79 def do_format():
80 if not toformat:
81 return
82 if wrap:
83 res = my_wrap(''.join(toformat), width=MAXWIDTH-maxindent)
84 else:
85 res = ''.join(toformat).splitlines()
86 if end:
87 res += end
88 result.append((indent, res))
89 for itemindent, item in content:
90 if itemindent == -1:
91 toformat.append(item)
92 else:
93 do_format()
94 result.append((indent + itemindent, item))
95 toformat = []
96 do_format()
97 if first is not None and result:
98 itemindent, item = result[0]
99 if item:
100 result.insert(0, (itemindent - indent, [first + item[0]]))
101 result[1] = (itemindent, item[1:])
102 self.states[-1].extend(result)
103
104 def visit_document(self, node):
105 self.new_state(0)
106
107 def depart_document(self, node):
108 self.end_state()
109 self.body = self.nl.join(line and (' '*indent + line)
110 for indent, lines in self.states[0]
111 for line in lines)
112 # XXX header/footer?
113
114 def visit_highlightlang(self, node):
115 raise nodes.SkipNode
116
117 def visit_section(self, node):
118 self._title_char = self.sectionchars[self.sectionlevel]
119 self.sectionlevel += 1
120
121 def depart_section(self, node):
122 self.sectionlevel -= 1
123
124 def visit_topic(self, node):
125 self.new_state(0)
126
127 def depart_topic(self, node):
128 self.end_state()
129
130 visit_sidebar = visit_topic
131 depart_sidebar = depart_topic
132
133 def visit_rubric(self, node):
134 self.new_state(0)
135 self.add_text('-[ ')
136
137 def depart_rubric(self, node):
138 self.add_text(' ]-')
139 self.end_state()
140
141 def visit_compound(self, node):
142 pass
143
144 def depart_compound(self, node):
145 pass
146
147 def visit_glossary(self, node):
148 pass
149
150 def depart_glossary(self, node):
151 pass
152
153 def visit_title(self, node):
154 if isinstance(node.parent, nodes.Admonition):
155 self.add_text(node.astext()+': ')
156 raise nodes.SkipNode
157 self.new_state(0)
158
159 def depart_title(self, node):
160 if isinstance(node.parent, nodes.section):
161 char = self._title_char
162 else:
163 char = '^'
164 text = ''.join(x[1] for x in self.states.pop() if x[0] == -1)
165 self.stateindent.pop()
166 self.states[-1].append((0, ['', text, '%s' % (char * len(text)), '']))
167
168 def visit_subtitle(self, node):
169 pass
170
171 def depart_subtitle(self, node):
172 pass
173
174 def visit_attribution(self, node):
175 self.add_text('-- ')
176
177 def depart_attribution(self, node):
178 pass
179
180 def visit_desc(self, node):
181 pass
182
183 def depart_desc(self, node):
184 pass
185
186 def visit_desc_signature(self, node):
187 self.new_state(0)
188 if node.parent['objtype'] in ('class', 'exception'):
189 self.add_text('%s ' % node.parent['objtype'])
190
191 def depart_desc_signature(self, node):
192 # XXX: wrap signatures in a way that makes sense
193 self.end_state(wrap=False, end=None)
194
195 def visit_desc_name(self, node):
196 pass
197
198 def depart_desc_name(self, node):
199 pass
200
201 def visit_desc_addname(self, node):
202 pass
203
204 def depart_desc_addname(self, node):
205 pass
206
207 def visit_desc_type(self, node):
208 pass
209
210 def depart_desc_type(self, node):
211 pass
212
213 def visit_desc_returns(self, node):
214 self.add_text(' -> ')
215
216 def depart_desc_returns(self, node):
217 pass
218
219 def visit_desc_parameterlist(self, node):
220 self.add_text('(')
221 self.first_param = 1
222
223 def depart_desc_parameterlist(self, node):
224 self.add_text(')')
225
226 def visit_desc_parameter(self, node):
227 if not self.first_param:
228 self.add_text(', ')
229 else:
230 self.first_param = 0
231 self.add_text(node.astext())
232 raise nodes.SkipNode
233
234 def visit_desc_optional(self, node):
235 self.add_text('[')
236
237 def depart_desc_optional(self, node):
238 self.add_text(']')
239
240 def visit_desc_annotation(self, node):
241 pass
242
243 def depart_desc_annotation(self, node):
244 pass
245
246 def visit_refcount(self, node):
247 pass
248
249 def depart_refcount(self, node):
250 pass
251
252 def visit_desc_content(self, node):
253 self.new_state()
254 self.add_text(self.nl)
255
256 def depart_desc_content(self, node):
257 self.end_state()
258
259 def visit_figure(self, node):
260 self.new_state()
261
262 def depart_figure(self, node):
263 self.end_state()
264
265 def visit_caption(self, node):
266 pass
267
268 def depart_caption(self, node):
269 pass
270
271 def visit_productionlist(self, node):
272 self.new_state()
273 names = []
274 for production in node:
275 names.append(production['tokenname'])
276 maxlen = max(len(name) for name in names)
277 for production in node:
278 if production['tokenname']:
279 self.add_text(production['tokenname'].ljust(maxlen) + ' ::=')
280 lastname = production['tokenname']
281 else:
282 self.add_text('%s ' % (' '*len(lastname)))
283 self.add_text(production.astext() + self.nl)
284 self.end_state(wrap=False)
285 raise nodes.SkipNode
286
287 def visit_seealso(self, node):
288 self.new_state()
289
290 def depart_seealso(self, node):
291 self.end_state(first='')
292
293 def visit_footnote(self, node):
294 self._footnote = node.children[0].astext().strip()
295 self.new_state(len(self._footnote) + 3)
296
297 def depart_footnote(self, node):
298 self.end_state(first='[%s] ' % self._footnote)
299
300 def visit_citation(self, node):
301 if len(node) and isinstance(node[0], nodes.label):
302 self._citlabel = node[0].astext()
303 else:
304 self._citlabel = ''
305 self.new_state(len(self._citlabel) + 3)
306
307 def depart_citation(self, node):
308 self.end_state(first='[%s] ' % self._citlabel)
309
310 def visit_label(self, node):
311 raise nodes.SkipNode
312
313 # XXX: option list could use some better styling
314
315 def visit_option_list(self, node):
316 pass
317
318 def depart_option_list(self, node):
319 pass
320
321 def visit_option_list_item(self, node):
322 self.new_state(0)
323
324 def depart_option_list_item(self, node):
325 self.end_state()
326
327 def visit_option_group(self, node):
328 self._firstoption = True
329
330 def depart_option_group(self, node):
331 self.add_text(' ')
332
333 def visit_option(self, node):
334 if self._firstoption:
335 self._firstoption = False
336 else:
337 self.add_text(', ')
338
339 def depart_option(self, node):
340 pass
341
342 def visit_option_string(self, node):
343 pass
344
345 def depart_option_string(self, node):
346 pass
347
348 def visit_option_argument(self, node):
349 self.add_text(node['delimiter'])
350
351 def depart_option_argument(self, node):
352 pass
353
354 def visit_description(self, node):
355 pass
356
357 def depart_description(self, node):
358 pass
359
360 def visit_tabular_col_spec(self, node):
361 raise nodes.SkipNode
362
363 def visit_colspec(self, node):
364 self.table[0].append(node['colwidth'])
365 raise nodes.SkipNode
366
367 def visit_tgroup(self, node):
368 pass
369
370 def depart_tgroup(self, node):
371 pass
372
373 def visit_thead(self, node):
374 pass
375
376 def depart_thead(self, node):
377 pass
378
379 def visit_tbody(self, node):
380 self.table.append('sep')
381
382 def depart_tbody(self, node):
383 pass
384
385 def visit_row(self, node):
386 self.table.append([])
387
388 def depart_row(self, node):
389 pass
390
391 def visit_entry(self, node):
392 if 'morerows' in node or 'morecols' in node:
393 raise NotImplementedError('Column or row spanning cells are '
394 'not implemented.')
395 self.new_state(0)
396
397 def depart_entry(self, node):
398 text = self.nl.join(self.nl.join(x[1]) for x in self.states.pop())
399 self.stateindent.pop()
400 self.table[-1].append(text)
401
402 def visit_table(self, node):
403 if self.table:
404 raise NotImplementedError('Nested tables are not supported.')
405 self.new_state(0)
406 self.table = [[]]
407
408 def depart_table(self, node):
409 lines = self.table[1:]
410 fmted_rows = []
411 colwidths = self.table[0]
412 realwidths = colwidths[:]
413 separator = 0
414 # don't allow paragraphs in table cells for now
415 for line in lines:
416 if line == 'sep':
417 separator = len(fmted_rows)
418 else:
419 cells = []
420 for i, cell in enumerate(line):
421 par = my_wrap(cell, width=colwidths[i])
422 if par:
423 maxwidth = max(map(len, par))
424 else:
425 maxwidth = 0
426 realwidths[i] = max(realwidths[i], maxwidth)
427 cells.append(par)
428 fmted_rows.append(cells)
429
430 def writesep(char='-'):
431 out = ['+']
432 for width in realwidths:
433 out.append(char * (width+2))
434 out.append('+')
435 self.add_text(''.join(out) + self.nl)
436
437 def writerow(row):
438 lines = zip(*row)
439 for line in lines:
440 out = ['|']
441 for i, cell in enumerate(line):
442 if cell:
443 out.append(' ' + cell.ljust(realwidths[i]+1))
444 else:
445 out.append(' ' * (realwidths[i] + 2))
446 out.append('|')
447 self.add_text(''.join(out) + self.nl)
448
449 for i, row in enumerate(fmted_rows):
450 if separator and i == separator:
451 writesep('=')
452 else:
453 writesep('-')
454 writerow(row)
455 writesep('-')
456 self.table = None
457 self.end_state(wrap=False)
458
459 def visit_acks(self, node):
460 self.new_state(0)
461 self.add_text(
462 ', '.join(n.astext() for n in node.children[0].children) + '.')
463 self.end_state()
464 raise nodes.SkipNode
465
466 def visit_image(self, node):
467 if 'alt' in node.attributes:
468 self.add_text(_('[image: %s]') % node['alt'])
469 self.add_text(_('[image]'))
470 raise nodes.SkipNode
471
472 def visit_transition(self, node):
473 indent = sum(self.stateindent)
474 self.new_state(0)
475 self.add_text('=' * (MAXWIDTH - indent))
476 self.end_state()
477 raise nodes.SkipNode
478
479 def visit_bullet_list(self, node):
480 self.list_counter.append(-1)
481
482 def depart_bullet_list(self, node):
483 self.list_counter.pop()
484
485 def visit_enumerated_list(self, node):
486 self.list_counter.append(0)
487
488 def depart_enumerated_list(self, node):
489 self.list_counter.pop()
490
491 def visit_definition_list(self, node):
492 self.list_counter.append(-2)
493
494 def depart_definition_list(self, node):
495 self.list_counter.pop()
496
497 def visit_list_item(self, node):
498 if self.list_counter[-1] == -1:
499 # bullet list
500 self.new_state(2)
501 elif self.list_counter[-1] == -2:
502 # definition list
503 pass
504 else:
505 # enumerated list
506 self.list_counter[-1] += 1
507 self.new_state(len(str(self.list_counter[-1])) + 2)
508
509 def depart_list_item(self, node):
510 if self.list_counter[-1] == -1:
511 self.end_state(first='* ', end=None)
512 elif self.list_counter[-1] == -2:
513 pass
514 else:
515 self.end_state(first='%s. ' % self.list_counter[-1], end=None)
516
517 def visit_definition_list_item(self, node):
518 self._li_has_classifier = len(node) >= 2 and \
519 isinstance(node[1], nodes.classifier)
520
521 def depart_definition_list_item(self, node):
522 pass
523
524 def visit_term(self, node):
525 self.new_state(0)
526
527 def depart_term(self, node):
528 if not self._li_has_classifier:
529 self.end_state(end=None)
530
531 def visit_termsep(self, node):
532 self.add_text(', ')
533 raise nodes.SkipNode
534
535 def visit_classifier(self, node):
536 self.add_text(' : ')
537
538 def depart_classifier(self, node):
539 self.end_state(end=None)
540
541 def visit_definition(self, node):
542 self.new_state()
543
544 def depart_definition(self, node):
545 self.end_state()
546
547 def visit_field_list(self, node):
548 pass
549
550 def depart_field_list(self, node):
551 pass
552
553 def visit_field(self, node):
554 pass
555
556 def depart_field(self, node):
557 pass
558
559 def visit_field_name(self, node):
560 self.new_state(0)
561
562 def depart_field_name(self, node):
563 self.add_text(':')
564 self.end_state(end=None)
565
566 def visit_field_body(self, node):
567 self.new_state()
568
569 def depart_field_body(self, node):
570 self.end_state()
571
572 def visit_centered(self, node):
573 pass
574
575 def depart_centered(self, node):
576 pass
577
578 def visit_hlist(self, node):
579 pass
580
581 def depart_hlist(self, node):
582 pass
583
584 def visit_hlistcol(self, node):
585 pass
586
587 def depart_hlistcol(self, node):
588 pass
589
590 def visit_admonition(self, node):
591 self.new_state(0)
592
593 def depart_admonition(self, node):
594 self.end_state()
595
596 def visit_versionmodified(self, node):
597 self.new_state(0)
598
599 def depart_versionmodified(self, node):
600 self.end_state()
601
602 def visit_literal_block(self, node):
603 self.new_state()
604
605 def depart_literal_block(self, node):
606 self.end_state(wrap=False)
607
608 def visit_doctest_block(self, node):
609 self.new_state(0)
610
611 def depart_doctest_block(self, node):
612 self.end_state(wrap=False)
613
614 def visit_line_block(self, node):
615 self.new_state(0)
616
617 def depart_line_block(self, node):
618 self.end_state(wrap=False)
619
620 def visit_line(self, node):
621 pass
622
623 def depart_line(self, node):
624 pass
625
626 def visit_block_quote(self, node):
627 self.new_state()
628
629 def depart_block_quote(self, node):
630 self.end_state()
631
632 def visit_compact_paragraph(self, node):
633 pass
634
635 def depart_compact_paragraph(self, node):
636 pass
637
638 def visit_paragraph(self, node):
639 self.new_state(0)
640
641 def depart_paragraph(self, node):
642 self.end_state()
643
644 def visit_target(self, node):
645 raise nodes.SkipNode
646
647 def visit_index(self, node):
648 raise nodes.SkipNode
649
650 def visit_substitution_definition(self, node):
651 raise nodes.SkipNode
652
653 def visit_pending_xref(self, node):
654 pass
655
656 def depart_pending_xref(self, node):
657 pass
658
659 def visit_reference(self, node):
660 pass
661
662 def depart_reference(self, node):
663 pass
664
665 def visit_download_reference(self, node):
666 pass
667
668 def depart_download_reference(self, node):
669 pass
670
671 def visit_emphasis(self, node):
672 self.add_text('*')
673
674 def depart_emphasis(self, node):
675 self.add_text('*')
676
677 def visit_literal_emphasis(self, node):
678 self.add_text('*')
679
680 def depart_literal_emphasis(self, node):
681 self.add_text('*')
682
683 def visit_strong(self, node):
684 self.add_text('**')
685
686 def depart_strong(self, node):
687 self.add_text('**')
688
689 def visit_abbreviation(self, node):
690 self.add_text('')
691
692 def depart_abbreviation(self, node):
693 if node.hasattr('explanation'):
694 self.add_text(' (%s)' % node['explanation'])
695
696 def visit_title_reference(self, node):
697 self.add_text('*')
698
699 def depart_title_reference(self, node):
700 self.add_text('*')
701
702 def visit_literal(self, node):
703 self.add_text('"')
704
705 def depart_literal(self, node):
706 self.add_text('"')
707
708 def visit_subscript(self, node):
709 self.add_text('_')
710
711 def depart_subscript(self, node):
712 pass
713
714 def visit_superscript(self, node):
715 self.add_text('^')
716
717 def depart_superscript(self, node):
718 pass
719
720 def visit_footnote_reference(self, node):
721 self.add_text('[%s]' % node.astext())
722 raise nodes.SkipNode
723
724 def visit_citation_reference(self, node):
725 self.add_text('[%s]' % node.astext())
726 raise nodes.SkipNode
727
728 def visit_Text(self, node):
729 self.add_text(node.astext())
730
731 def depart_Text(self, node):
732 pass
733
734 def visit_generated(self, node):
735 pass
736
737 def depart_generated(self, node):
738 pass
739
740 def visit_inline(self, node):
741 pass
742
743 def depart_inline(self, node):
744 pass
745
746 def visit_problematic(self, node):
747 self.add_text('>>')
748
749 def depart_problematic(self, node):
750 self.add_text('<<')
751
752 def visit_system_message(self, node):
753 self.new_state(0)
754 self.add_text('<SYSTEM MESSAGE: %s>' % node.astext())
755 self.end_state()
756 raise nodes.SkipNode
757
758 def visit_comment(self, node):
759 raise nodes.SkipNode
760
761 def visit_meta(self, node):
762 # only valid for HTML
763 raise nodes.SkipNode
764
765 def visit_raw(self, node):
766 if 'text' in node.get('format', '').split():
767 self.body.append(node.astext())
768 raise nodes.SkipNode
769
770 def _visit_admonition(self, node):
771 self.new_state(2)
772
773 def _make_depart_admonition(name):
774 def depart_admonition(self, node):
775 self.end_state(first=name.capitalize() + ': ')
776 return depart_admonition
777
778 visit_attention = _visit_admonition
779 depart_attention = _make_depart_admonition('attention')
780 visit_caution = _visit_admonition
781 depart_caution = _make_depart_admonition('caution')
782 visit_danger = _visit_admonition
783 depart_danger = _make_depart_admonition('danger')
784 visit_error = _visit_admonition
785 depart_error = _make_depart_admonition('error')
786 visit_hint = _visit_admonition
787 depart_hint = _make_depart_admonition('hint')
788 visit_important = _visit_admonition
789 depart_important = _make_depart_admonition('important')
790 visit_note = _visit_admonition
791 depart_note = _make_depart_admonition('note')
792 visit_tip = _visit_admonition
793 depart_tip = _make_depart_admonition('tip')
794 visit_warning = _visit_admonition
795 depart_warning = _make_depart_admonition('warning')
796
797 def unknown_visit(self, node):
798 raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
1212 import logging
1313 import os
1414 from botocore import xform_name
15 from botocore.docs.bcdoc.docevents import DOC_EVENTS
1615 from botocore.model import StringShape
1716 from botocore.utils import is_json_value_header
1817
1918 from awscli import SCALAR_TYPES
2019 from awscli.argprocess import ParamShorthandDocGen
20 from awscli.bcdoc.docevents import DOC_EVENTS
2121 from awscli.topictags import TopicTagDB
2222 from awscli.utils import find_service_and_method_in_event_name
2323
8484 'lex-models.delete-intent-version.version': 'intent-version',
8585 'lex-models.delete-slot-type-version.version': 'slot-type-version',
8686 'lex-models.get-export.version': 'resource-version',
87 'license-manager.get-grant.version': 'grant-version',
88 'license-manager.delete-grant.version': 'grant-version',
89 'license-manager.get-license.version': 'license-version',
8790 'mobile.create-project.region': 'project-region',
8891 'rekognition.create-stream-processor.output': 'stream-processor-output',
8992 'eks.create-cluster.version': 'kubernetes-version',
9194 'eks.create-nodegroup.version': 'kubernetes-version',
9295 'eks.update-nodegroup-version.version': 'kubernetes-version',
9396 'schemas.*.version': 'schema-version',
97 'sagemaker.delete-image-version.version': 'version-number',
98 'sagemaker.describe-image-version.version': 'version-number',
99 'iotwireless.*.lo-ra-wan': 'lorawan',
94100 }
95101
96102 # Same format as ARGUMENT_RENAMES, but instead of renaming the arguments,
1212 from awscli.compat import urlparse, RawConfigParser, StringIO
1313 from awscli.customizations import utils as cli_utils
1414 from awscli.customizations.commands import BasicCommand
15 from awscli.customizations.utils import uni_print
1516
1617
1718 def get_relative_expiration_time(remaining):
3334
3435
3536 class BaseLogin(object):
36
37 def __init__(self, auth_token, expiration,
38 repository_endpoint, subprocess_utils, namespace=None):
37 _TOOL_NOT_FOUND_MESSAGE = '%s was not found. Please verify installation.'
38
39 def __init__(self, auth_token, expiration, repository_endpoint,
40 domain, repository, subprocess_utils, namespace=None):
3941 self.auth_token = auth_token
4042 self.expiration = expiration
4143 self.repository_endpoint = repository_endpoint
44 self.domain = domain
45 self.repository = repository
4246 self.subprocess_utils = subprocess_utils
4347 self.namespace = namespace
4448
8286 except OSError as ex:
8387 if ex.errno == errno.ENOENT:
8488 raise ValueError(
85 '%s was not found. Please verify installation.' % tool
89 self._TOOL_NOT_FOUND_MESSAGE % tool
8690 )
8791 raise ex
8892
9195 @classmethod
9296 def get_commands(cls, endpoint, auth_token, **kwargs):
9397 raise NotImplementedError('get_commands()')
98
99
100 class NuGetLogin(BaseLogin):
101 _NUGET_INDEX_URL_FMT = '{endpoint}v3/index.json'
102
103 def login(self, dry_run=False):
104 try:
105 source_to_url_dict = self._get_source_to_url_dict()
106 except OSError as ex:
107 if ex.errno == errno.ENOENT:
108 raise ValueError(
109 self._TOOL_NOT_FOUND_MESSAGE % 'nuget'
110 )
111 raise ex
112
113 nuget_index_url = self._NUGET_INDEX_URL_FMT.format(
114 endpoint=self.repository_endpoint
115 )
116 source_name, already_exists = self._get_source_name(
117 nuget_index_url, source_to_url_dict
118 )
119
120 if already_exists:
121 command = self._get_command(
122 'update', nuget_index_url, source_name
123 )
124 verb = "Updated"
125 else:
126 command = self._get_command('add', nuget_index_url, source_name)
127 verb = "Added"
128
129 if dry_run:
130 dry_run_command = ' '.join([str(cd) for cd in command])
131 uni_print(dry_run_command)
132 uni_print('\n')
133 return
134
135 try:
136 self.subprocess_utils.check_output(
137 command,
138 stderr=self.subprocess_utils.PIPE
139 )
140 except subprocess.CalledProcessError as e:
141 uni_print('Failed to update the user level NuGet.Config\n')
142 raise e
143
144 uni_print('%s source %s in the user level NuGet.Config\n'
145 % (verb, source_name))
146 self._write_success_message('nuget')
147
148 def _get_source_to_url_dict(self):
149 # The response from 'nuget sources list' takes the following form:
150 #
151 # Registered Sources:
152 # 1. Source Name 1 [Enabled]
153 # https://source1.com/index.json
154 # 2. Source Name 2 [Disabled]
155 # https://source2.com/index.json
156 # ...
157 # 100. Source Name 100
158 # https://source100.com/index.json
159
160 # Or it can be (blank line after Registered Sources:)
161
162 # Registered Sources:
163
164 # 1. Source Name 1 [Enabled]
165 # https://source1.com/index.json
166 # 2. Source Name 2 [Disabled]
167 # https://source2.com/index.json
168 # ...
169 # 100. Source Name 100
170 # https://source100.com/index.json
171
172 response = self.subprocess_utils.check_output(
173 ['nuget', 'sources', 'list', '-format', 'detailed'],
174 stderr=self.subprocess_utils.PIPE
175 )
176
177 lines = response.decode("utf-8").splitlines()
178 lines = [line for line in lines if line.strip() != '']
179
180 source_to_url_dict = {}
181 for i in range(1, len(lines), 2):
182 source_to_url_dict[self._parse_source_name(lines[i])] = \
183 self._parse_source_url(lines[i + 1])
184
185 return source_to_url_dict
186
187 def _parse_source_name(self, line):
188 # A source name line takes the following form:
189 # 1. NuGet Source [Enabled]
190
191 # Remove the Enabled/Disabled tag.
192 line_without_tag = line.strip().rsplit(' [', 1)[0]
193
194 # Remove the leading number.
195 return line_without_tag.split(None, 1)[1]
196
197 def _parse_source_url(self, line):
198 # A source url line takes the following form:
199 # https://source.com/index.json
200 return line.strip()
201
202 def _get_source_name(self, codeartifact_url, source_dict):
203 default_name = '{}/{}'.format(self.domain, self.repository)
204
205 # Check if the CodeArtifact URL is already present in the
206 # NuGet.Config file. If the URL already exists, use the source name
207 # already assigned to the CodeArtifact URL.
208 for source_name, source_url in source_dict.items():
209 if source_url == codeartifact_url:
210 return source_name, True
211
212 # If the CodeArtifact URL is not present in the NuGet.Config file,
213 # check if the default source name already exists so we can know
214 # whether we need to add a new entry or update the existing entry.
215 for source_name in source_dict.keys():
216 if source_name == default_name:
217 return source_name, True
218
219 # If neither the source url nor the source name already exist in the
220 # NuGet.Config file, use the default source name.
221 return default_name, False
222
223 def _get_command(self, operation, nuget_index_url, source_name):
224 return [
225 'nuget', 'sources', operation,
226 '-name', source_name,
227 '-source', nuget_index_url,
228 '-username', 'aws',
229 '-password', self.auth_token
230 ]
94231
95232
96233 class NpmLogin(BaseLogin):
205342 auth_token,
206343 expiration,
207344 repository_endpoint,
345 domain,
346 repository,
208347 subprocess_utils,
209348 pypi_rc_path=None
210349 ):
212351 pypi_rc_path = self.get_pypi_rc_path()
213352 self.pypi_rc_path = pypi_rc_path
214353 super(TwineLogin, self).__init__(
215 auth_token, expiration, repository_endpoint, subprocess_utils)
354 auth_token, expiration, repository_endpoint,
355 domain, repository, subprocess_utils)
216356
217357 @classmethod
218358 def get_commands(cls, endpoint, auth_token, **kwargs):
304444 '''Log in to the idiomatic tool for the requested package format.'''
305445
306446 TOOL_MAP = {
447 'nuget': {
448 'package_format': 'nuget',
449 'login_cls': NuGetLogin,
450 'namespace_support': False,
451 },
307452 'npm': {
308453 'package_format': 'npm',
309454 'login_cls': NpmLogin,
433578 codeartifact_client, parsed_args, package_format
434579 )
435580
581 domain = parsed_args.domain
582 repository = parsed_args.repository
436583 namespace = self._get_namespace(tool, parsed_args)
437584
438585 auth_token = auth_token_res['authorizationToken']
439586 expiration = parse_timestamp(auth_token_res['expiration'])
440587 login = self.TOOL_MAP[tool]['login_cls'](
441 auth_token, expiration, repository_endpoint, subprocess, namespace
588 auth_token, expiration, repository_endpoint,
589 domain, repository, subprocess, namespace
442590 )
443591
444592 login.login(parsed_args.dry_run)
33 from botocore import model
44 from botocore.compat import OrderedDict
55 from botocore.validate import validate_parameters
6 from botocore.docs.bcdoc import docevents
76
87 import awscli
98 from awscli.argparser import ArgTableArgParser
1110 from awscli.arguments import CustomArgument, create_argument_model_from_schema
1211 from awscli.clidocs import OperationDocumentEventHandler
1312 from awscli.clidriver import CLICommand
13 from awscli.bcdoc import docevents
1414 from awscli.help import HelpCommand
1515 from awscli.schema import SchemaTransformer
1616
1414
1515 # Lifecycle role names
1616 LIFECYCLE_DEFAULT_ROLE_NAME = "AWSDataLifecycleManagerDefaultRole"
17 LIFECYCLE_DEFAULT_ROLE_NAME_AMI = \
18 "AWSDataLifecycleManagerDefaultRoleForAMIManagement"
1719
1820 # Lifecycle role arn names
1921 LIFECYCLE_DEFAULT_MANAGED_POLICY_NAME = "AWSDataLifecycleManagerServiceRole"
22 LIFECYCLE_DEFAULT_MANAGED_POLICY_NAME_AMI = \
23 "AWSDataLifecycleManagerServiceRoleForAMIManagement"
2024
2125 POLICY_ARN_PATTERN = "arn:{0}:iam::aws:policy/service-role/{1}"
2226
3236 }
3337 ]
3438 }
39
40 RESOURCE_TYPE_SNAPSHOT = "snapshot"
41 RESOURCE_TYPE_IMAGE = "image"
42
43 RESOURCES = {
44 RESOURCE_TYPE_SNAPSHOT: {
45 'default_role_name': LIFECYCLE_DEFAULT_ROLE_NAME,
46 'default_policy_name': LIFECYCLE_DEFAULT_MANAGED_POLICY_NAME
47 },
48 RESOURCE_TYPE_IMAGE: {
49 'default_role_name': LIFECYCLE_DEFAULT_ROLE_NAME_AMI,
50 'default_policy_name': LIFECYCLE_DEFAULT_MANAGED_POLICY_NAME_AMI
51 }
52 }
1717 from awscli.customizations.commands import BasicCommand
1818 from awscli.customizations.dlm.iam import IAM
1919 from awscli.customizations.dlm.constants \
20 import LIFECYCLE_DEFAULT_ROLE_NAME, \
20 import RESOURCES, \
2121 LIFECYCLE_DEFAULT_ROLE_ASSUME_POLICY, \
22 LIFECYCLE_DEFAULT_MANAGED_POLICY_NAME, \
23 POLICY_ARN_PATTERN
22 POLICY_ARN_PATTERN, \
23 RESOURCE_TYPE_SNAPSHOT, \
24 RESOURCE_TYPE_IMAGE
2425
2526 LOG = logging.getLogger(__name__)
2627
6061
6162 class CreateDefaultRole(BasicCommand):
6263 NAME = "create-default-role"
63 DESCRIPTION = ('Creates the default IAM role ' +
64 LIFECYCLE_DEFAULT_ROLE_NAME +
64 DESCRIPTION = ('Creates the default IAM role '
6565 ' which will be used by Lifecycle service.\n'
6666 'If the role does not exist, create-default-role '
6767 'will automatically create it and set its policy.'
7575 'help_text': '<p>The IAM endpoint to call for creating the roles.'
7676 ' This is optional and should only be specified when a'
7777 ' custom endpoint should be called for IAM operations'
78 '.</p>'}
78 '.</p>'},
79 {'name': 'resource-type',
80 'default': RESOURCE_TYPE_SNAPSHOT,
81 'choices': [RESOURCE_TYPE_SNAPSHOT, RESOURCE_TYPE_IMAGE],
82 'help_text': (
83 "<p>The resource type for which the role needs to be created."
84 " The available options are '%s' and '%s'."
85 " This parameter defaults to '%s'.</p>"
86 % (RESOURCE_TYPE_SNAPSHOT, RESOURCE_TYPE_IMAGE,
87 RESOURCE_TYPE_SNAPSHOT))}
88
7989 ]
8090
8191 def __init__(self, session):
8696
8797 self._region = get_region(self._session, parsed_globals)
8898 self._endpoint_url = parsed_args.iam_endpoint
99 self._resource_type = parsed_args.resource_type
89100 self._iam_client = IAM(self._session.create_client(
90101 'iam',
91102 region_name=self._region,
108119 """Method to create default lifecycle role
109120 if it doesn't exist already
110121 """
111 role_name = LIFECYCLE_DEFAULT_ROLE_NAME
122
123 role_name = RESOURCES[self._resource_type]['default_role_name']
112124 assume_role_policy = LIFECYCLE_DEFAULT_ROLE_ASSUME_POLICY
113125
114126 if self._iam_client.check_if_role_exists(role_name):
128140
129141 managed_policy_arn = get_policy_arn(
130142 region,
131 LIFECYCLE_DEFAULT_MANAGED_POLICY_NAME
143 RESOURCES[self._resource_type]['default_policy_name']
132144 )
133145
134146 # Don't proceed if managed policy does not exist
0 # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12 from awscli.customizations.commands import BasicCommand
13 from awscli.customizations.utils import create_client_from_parsed_globals
14
15 from base64 import b64decode
16 import sys
17
18
19 def register_ecr_public_commands(cli):
20 cli.register('building-command-table.ecr-public', _inject_commands)
21
22
23 def _inject_commands(command_table, session, **kwargs):
24 command_table['get-login-password'] = ECRPublicGetLoginPassword(session)
25
26
27 class ECRPublicGetLoginPassword(BasicCommand):
28 """Get a password to be used with container clients such as Docker"""
29 NAME = 'get-login-password'
30
31 DESCRIPTION = BasicCommand.FROM_FILE(
32 'ecr-public/get-login-password_description.rst')
33
34 def _run_main(self, parsed_args, parsed_globals):
35 ecr_public_client = create_client_from_parsed_globals(
36 self._session,
37 'ecr-public',
38 parsed_globals)
39 result = ecr_public_client.get_authorization_token()
40 auth = result['authorizationData']
41 auth_token = b64decode(auth['authorizationToken']).decode()
42 _, password = auth_token.split(':')
43 sys.stdout.write(password)
44 sys.stdout.write('\n')
45 return 0
771771 }
772772 }
773773 }
774
775 PLACEMENT_GROUP_CONFIGS_SCHEMA = {
776 "type": "array",
777 "items": {
778 "type": "object",
779 "properties": {
780 "InstanceRole": {
781 "type": "string",
782 "description": "Role of the instance in the cluster.",
783 "enum": ["MASTER", "CORE", "TASK"],
784 "required": True
785 },
786 "PlacementStrategy": {
787 "type": "string",
788 "description": "EC2 Placement Group strategy associated "
789 "with instance role.",
790 "enum": ["SPREAD", "PARTITION", "CLUSTER", "NONE"]
791 }
792 }
793 }
794 }
124124 'help_text': helptext.STEP_CONCURRENCY_LEVEL},
125125 {'name': 'managed-scaling-policy',
126126 'schema': argumentschema.MANAGED_SCALING_POLICY_SCHEMA,
127 'help_text': helptext.MANAGED_SCALING_POLICY}
127 'help_text': helptext.MANAGED_SCALING_POLICY},
128 {'name': 'placement-group-configs',
129 'schema': argumentschema.PLACEMENT_GROUP_CONFIGS_SCHEMA,
130 'help_text': helptext.PLACEMENT_GROUP_CONFIGS}
128131 ]
129132 SYNOPSIS = BasicCommand.FROM_FILE('emr', 'create-cluster-synopsis.txt')
130133 EXAMPLES = BasicCommand.FROM_FILE('emr', 'create-cluster-examples.rst')
347350 if parsed_args.managed_scaling_policy is not None:
348351 emrutils.apply_dict(
349352 params, 'ManagedScalingPolicy', parsed_args.managed_scaling_policy)
353
354 if parsed_args.placement_group_configs is not None:
355 emrutils.apply_dict(
356 params, 'PlacementGroupConfigs',
357 parsed_args.placement_group_configs)
350358
351359 self._validate_required_applications(parsed_args)
352360
460460 'InstanceFleet cluster, the UnitType must be InstanceFleetUnits. For '
461461 'InstanceGroup clusters, the UnitType can be either VCPU or Instances.</p>'
462462 )
463
464 PLACEMENT_GROUP_CONFIGS = (
465 '<p>Placement group configuration for an Amazon EMR '
466 'cluster. The configuration specifies the EC2 placement group '
467 'strategy associated with each EMR Instance Role.</p> '
468 '<p>Currently, we support placement group only for <code>MASTER</code> '
469 'role with <code>SPREAD</code> strategy by default. You can opt-in by '
470 'passing <code>--placement-group-configs InstanceRole=MASTER</code> '
471 'during cluster creation.</p>'
472 )
0 # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12
13 from awscli.customizations.emrcontainers.update_role_trust_policy \
14 import UpdateRoleTrustPolicyCommand
15
16
17 def initialize(cli):
18 """
19 The entry point for EMR Containers high level commands.
20 """
21 cli.register('building-command-table.emr-containers', inject_commands)
22
23
24 def inject_commands(command_table, session, **kwargs):
25 """
26 Called when the EMR Containers command table is being built.
27 Used to inject new high level commands into the command list.
28 """
29 command_table['update-role-trust-policy'] = UpdateRoleTrustPolicyCommand(
30 session)
0 # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12
13
14 class Base36(object):
15 def str_to_int(self, request):
16 """Method to convert given string into decimal representation"""
17 result = 0
18 for char in request:
19 result = result * 256 + ord(char)
20
21 return result
22
23 def encode(self, request):
24 """Method to return base36 encoded form of the input string"""
25 decimal_number = self.str_to_int(str(request))
26 alphabet, base36 = ['0123456789abcdefghijklmnopqrstuvwxyz', '']
27
28 while decimal_number:
29 decimal_number, i = divmod(decimal_number, 36)
30 base36 = alphabet[i] + base36
31
32 return base36 or alphabet[0]
0 # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12
13 # Declare all the constants used by Lifecycle in this file
14
15 # Lifecycle role names
16 TRUST_POLICY_STATEMENT_FORMAT = '{ \
17 "Effect": "Allow", \
18 "Principal": { \
19 "Federated": "arn:aws:iam::%(AWS_ACCOUNT_ID)s:oidc-provider/' \
20 '%(OIDC_PROVIDER)s" \
21 }, \
22 "Action": "sts:AssumeRoleWithWebIdentity", \
23 "Condition": { \
24 "StringLike": { \
25 "%(OIDC_PROVIDER)s:sub": "system:serviceaccount:%(NAMESPACE)s' \
26 ':emr-containers-sa-*-*-%(AWS_ACCOUNT_ID)s-' \
27 '%(BASE36_ENCODED_ROLE_NAME)s" \
28 } \
29 } \
30 }'
31
32 TRUST_POLICY_STATEMENT_ALREADY_EXISTS = "Trust policy statement already " \
33 "exists for role %s. No changes " \
34 "were made!"
35
36 TRUST_POLICY_UPDATE_SUCCESSFUL = "Successfully updated trust policy of role %s"
0 # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12
13
14 class EKS(object):
15 def __init__(self, eks_client):
16 self.eks_client = eks_client
17 self.cluster_info = {}
18
19 def get_oidc_issuer_id(self, cluster_name):
20 """Method to get OIDC issuer id for the given EKS cluster"""
21 if cluster_name not in self.cluster_info:
22 self.cluster_info[cluster_name] = self.eks_client.describe_cluster(
23 name=cluster_name
24 )
25
26 oidc_issuer = self.cluster_info[cluster_name].get("cluster", {}).get(
27 "identity", {}).get("oidc", {}).get("issuer", "")
28
29 return oidc_issuer.split('https://')[1]
30
31 def get_account_id(self, cluster_name):
32 """Method to get account id for the given EKS cluster"""
33 if cluster_name not in self.cluster_info:
34 self.cluster_info[cluster_name] = self.eks_client.describe_cluster(
35 name=cluster_name
36 )
37
38 cluster_arn = self.cluster_info[cluster_name].get("cluster", {}).get(
39 "arn", "")
40
41 return cluster_arn.split(':')[4]
0 # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12
13 import json
14
15
16 class IAM(object):
17 def __init__(self, iam_client):
18 self.iam_client = iam_client
19
20 def get_assume_role_policy(self, role_name):
21 """Method to retrieve trust policy of given role name"""
22 role = self.iam_client.get_role(RoleName=role_name)
23 return role.get("Role").get("AssumeRolePolicyDocument")
24
25 def update_assume_role_policy(self, role_name, assume_role_policy):
26 """Method to update trust policy of given role name"""
27 return self.iam_client.update_assume_role_policy(
28 RoleName=role_name,
29 PolicyDocument=json.dumps(assume_role_policy)
30 )
0 # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1 #
2 # Licensed under the Apache License, Version 2.0 (the "License"). You
3 # may not use this file except in compliance with the License. A copy of
4 # the License is located at
5 #
6 # http://aws.amazon.com/apache2.0/
7 #
8 # or in the "license" file accompanying this file. This file is
9 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
10 # ANY KIND, either express or implied. See the License for the specific
11 # language governing permissions and limitations under the License.
12
13 import json
14 import logging
15
16 from awscli.customizations.commands import BasicCommand
17 from awscli.customizations.emrcontainers.constants \
18 import TRUST_POLICY_STATEMENT_FORMAT, \
19 TRUST_POLICY_STATEMENT_ALREADY_EXISTS, \
20 TRUST_POLICY_UPDATE_SUCCESSFUL
21 from awscli.customizations.emrcontainers.base36 import Base36
22 from awscli.customizations.emrcontainers.eks import EKS
23 from awscli.customizations.emrcontainers.iam import IAM
24 from awscli.customizations.utils import uni_print
25
26 LOG = logging.getLogger(__name__)
27
28
29 # Method to parse the arguments to get the region value
30 def get_region(session, parsed_globals):
31 region = parsed_globals.region
32
33 if region is None:
34 region = session.get_config_variable('region')
35
36 return region
37
38
39 def check_if_statement_exists(expected_statement, actual_assume_role_document):
40 if actual_assume_role_document is None:
41 return False
42
43 existing_statements = actual_assume_role_document.get("Statement", [])
44 for existing_statement in existing_statements:
45 matches = check_if_dict_matches(expected_statement, existing_statement)
46 if matches:
47 return True
48
49 return False
50
51
52 def check_if_dict_matches(expected_dict, actual_dict):
53 if len(expected_dict) != len(actual_dict):
54 return False
55
56 for key in expected_dict:
57 key_str = str(key)
58 val = expected_dict[key_str]
59 if isinstance(val, dict):
60 if not check_if_dict_matches(val, actual_dict.get(key_str, {})):
61 return False
62 else:
63 if key_str not in actual_dict or actual_dict[key_str] != str(val):
64 return False
65
66 return True
67
68
69 class UpdateRoleTrustPolicyCommand(BasicCommand):
70 NAME = 'update-role-trust-policy'
71
72 DESCRIPTION = BasicCommand.FROM_FILE(
73 'emr-containers',
74 'update-role-trust-policy',
75 '_description.rst'
76 )
77
78 ARG_TABLE = [
79 {
80 'name': 'cluster-name',
81 'help_text': ("Specify the name of the Amazon EKS cluster with "
82 "which the IAM Role would be used."),
83 'required': True
84 },
85 {
86 'name': 'namespace',
87 'help_text': ("Specify the namespace from the Amazon EKS cluster "
88 "with which the IAM Role would be used."),
89 'required': True
90 },
91 {
92 'name': 'role-name',
93 'help_text': ("Specify the IAM Role name that you want to use"
94 "with Amazon EMR on EKS."),
95 'required': True
96 },
97 {
98 'name': 'iam-endpoint',
99 'no_paramfile': True,
100 'help_text': ("The IAM endpoint to call for updating the role "
101 "trust policy. This is optional and should only be"
102 "specified when a custom endpoint should be called"
103 "for IAM operations."),
104 'required': False
105 },
106 {
107 'name': 'dry-run',
108 'action': 'store_true',
109 'default': False,
110 'help_text': ("Print the merged trust policy document to"
111 "stdout instead of updating the role trust"
112 "policy directly."),
113 'required': False
114 }
115 ]
116
117 def _run_main(self, parsed_args, parsed_globals):
118 """Call to run the commands"""
119
120 self._cluster_name = parsed_args.cluster_name
121 self._namespace = parsed_args.namespace
122 self._role_name = parsed_args.role_name
123 self._region = get_region(self._session, parsed_globals)
124 self._endpoint_url = parsed_args.iam_endpoint
125 self._dry_run = parsed_args.dry_run
126
127 result = self._update_role_trust_policy(parsed_globals)
128 uni_print(result)
129 uni_print("\n")
130
131 return 0
132
133 def _update_role_trust_policy(self, parsed_globals):
134 """Method to update trust policy if not done already"""
135
136 base36 = Base36()
137
138 eks_client = EKS(self._session.create_client(
139 'eks',
140 region_name=self._region,
141 verify=parsed_globals.verify_ssl
142 ))
143
144 account_id = eks_client.get_account_id(self._cluster_name)
145 oidc_provider = eks_client.get_oidc_issuer_id(self._cluster_name)
146
147 base36_encoded_role_name = base36.encode(self._role_name)
148 LOG.debug('Base36 encoded role name: %s', base36_encoded_role_name)
149 trust_policy_statement = json.loads(TRUST_POLICY_STATEMENT_FORMAT %
150 {
151 "AWS_ACCOUNT_ID": account_id,
152 "OIDC_PROVIDER": oidc_provider,
153 "NAMESPACE": self._namespace,
154 "BASE36_ENCODED_ROLE_NAME": base36_encoded_role_name
155 }
156 )
157
158 LOG.debug('Computed Trust Policy Statement:\n%s', json.dumps(
159 trust_policy_statement, indent=2))
160 iam_client = IAM(self._session.create_client(
161 'iam',
162 region_name=self._region,
163 endpoint_url=self._endpoint_url,
164 verify=parsed_globals.verify_ssl
165 ))
166
167 assume_role_document = iam_client.get_assume_role_policy(
168 self._role_name)
169 matches = check_if_statement_exists(trust_policy_statement,
170 assume_role_document)
171
172 if not matches:
173 LOG.debug('Role %s does not have the required trust policy ',
174 self._role_name)
175
176 existing_statements = assume_role_document.get("Statement")
177 if existing_statements is None:
178 assume_role_document["Statement"] = [trust_policy_statement]
179 else:
180 existing_statements.append(trust_policy_statement)
181
182 if self._dry_run:
183 return json.dumps(assume_role_document, indent=2)
184 else:
185 LOG.debug('Updating trust policy of role %s', self._role_name)
186 iam_client.update_assume_role_policy(self._role_name,
187 assume_role_document)
188 return TRUST_POLICY_UPDATE_SUCCESSFUL % self._role_name
189 else:
190 return TRUST_POLICY_STATEMENT_ALREADY_EXISTS % self._role_name
4141 'set-visible-to-all-users'])
4242 cmd_remover.remove(on_event='building-command-table.kinesis',
4343 remove_commands=['subscribe-to-shard'])
44
44 cmd_remover.remove(on_event='building-command-table.lexv2-runtime',
45 remove_commands=['start-conversation'])
4546
4647 class CommandRemover(object):
4748 def __init__(self, events):
4646 r'^(?P<bucket>arn:(aws).*:s3:[a-z\-0-9]+:[0-9]{12}:accesspoint[:/][^/]+)/?'
4747 r'(?P<key>.*)$'
4848 )
49 _S3_OUTPOST_TO_BUCKET_KEY_REGEX = re.compile(
50 r'^(?P<bucket>arn:(aws).*:s3-outposts:[a-z\-0-9]+:[0-9]{12}:outpost[/:]'
51 r'[a-zA-Z0-9\-]{1,63}[/:]accesspoint[/:][a-zA-Z0-9\-]{1,63})[/:]?(?P<key>.*)$'
52 )
4953
5054
5155 def human_readable_size(value):
185189 It will return the bucket and the key represented by the s3 path
186190 """
187191 match = _S3_ACCESSPOINT_TO_BUCKET_KEY_REGEX.match(s3_path)
192 if match:
193 return match.group('bucket'), match.group('key')
194 match = _S3_OUTPOST_TO_BUCKET_KEY_REGEX.match(s3_path)
188195 if match:
189196 return match.group('bucket'), match.group('key')
190197 s3_components = s3_path.split('/', 1)
33
44 aws acm list-tags-for-certificate --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
55
6 The preceding command produces ouput similar to the following::
6 The preceding command produces output similar to the following::
77
88 {
99 "Tags": [
0 **Example 1: To list all backup jobs**
1
2 The following ``list-backup-jobs`` example returns metadata about your backup jobs in your AWS account. ::
3
4 aws backup list-backup-jobs
5
6 Output::
7
8 {
9 "BackupJobs": [
10 {
11 "BackupJobId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
12 "BackupVaultName": "Default",
13 "BackupVaultArn": "arn:aws:backup:us-west-2:123456789012:backup-vault:Default",
14 "ResourceArn": "arn:aws:ec2:us-west-2:123456789012:instance/i-12345678901234567",
15 "CreationDate": 1600721892.929,
16 "State": "CREATED",
17 "PercentDone": "0.0",
18 "IamRoleArn": "arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole",
19 "StartBy": 1600725492.929,
20 "ResourceType": "EC2"
21 },
22 {
23 "BackupJobId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
24 "BackupVaultName": "Default",
25 "BackupVaultArn": "arn:aws:backup:us-west-2:123456789012:backup-vault:Default",
26 "RecoveryPointArn": "arn:aws:backup:us-west-2:123456789012:recovery-point:a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
27 "ResourceArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-12345678",
28 "CreationDate": 1600721724.77,
29 "CompletionDate": 1600721744.488,
30 "State": "COMPLETED",
31 "PercentDone": "100.0",
32 "BackupSizeInBytes": 71,
33 "IamRoleArn": "arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole",
34 "StartBy": 1600725324.77,
35 "ResourceType": "EFS"
36 }
37 ]
38 }
39
40 For more information, see `Creating a Backup <https://https://docs.aws.amazon.com/aws-backup/latest/devguide/creating-a-backup.html>`__ in the *AWS Backup Developer Guide*.
41
42 **Example 2: To list completed backup jobs**
43
44 The following ``list-backup-jobs`` example returns metadata about your completed backup jobs in your AWS account. ::
45
46 aws backup list-backup-jobs \
47 --by-state COMPLETED
48
49 Output::
50
51 {
52 "BackupJobs": [
53 {
54 "BackupJobId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
55 "BackupVaultName": "Default",
56 "BackupVaultArn": "arn:aws:backup:us-west-2:123456789012:backup-vault:Default",
57 "RecoveryPointArn": "arn:aws:backup:us-west-2:123456789012:recovery-point:a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
58 "ResourceArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-12345678",
59 "CreationDate": 1600721724.77,
60 "CompletionDate": 1600721744.488,
61 "State": "COMPLETED",
62 "PercentDone": "100.0",
63 "BackupSizeInBytes": 71,
64 "IamRoleArn": "arn:aws:iam::123456789012:role/service-role/AWSBackupDefaultServiceRole",
65 "StartBy": 1600725324.77,
66 "ResourceType": "EFS"
67 }
68 ]
69 }
70
71 For more information, see `Creating a Backup <https://https://docs.aws.amazon.com/aws-backup/latest/devguide/creating-a-backup.html>`__ in the *AWS Backup Developer Guide*.
2626 "DisableRollback": false
2727 }
2828 ]
29 }
2930
3031 For more information, see `Stacks`_ in the *AWS CloudFormation User Guide*.
3132
22 The following ``wait stack-create-complete`` example pauses and resumes only after it can confirm that CloudFormation has successfully created the specified stack. ::
33
44 aws cloudformation wait stack-create-complete \
5 --stack-name "arn:aws:cloudformation:uus-west-2:123456789012:stack/my-stack-1234/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
5 --stack-name "arn:aws:cloudformation:us-west-2:123456789012:stack/my-stack-1234/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
66
77 This command produces no output.
0 **To add an external connection to a repository**
1
2 The following ``associate-external-connection`` example adds an external connection to npmjs.com to a repository named test-repo. ::
3
4 aws codeartifact associate-external-connection \
5 --repository test-repo \
6 --domain test-domain \
7 --external-connection public:npmjs
8
9 Output::
10
11 {
12 "repository": {
13 "name": "test-repo",
14 "administratorAccount": "111122223333",
15 "domainName": "test-domain",
16 "domainOwner": "111122223333",
17 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo",
18 "upstreams": [],
19 "externalConnections": [
20 {
21 "externalConnectionName": "public:npmjs",
22 "packageFormat": "npm",
23 "status": "AVAILABLE"
24 }
25 ]
26 }
27 }
28
29 For more information, see `Add an external connection <https://docs.aws.amazon.com/codeartifact/latest/ug/external-connection.html>`__ in the *AWS CodeArtifact User Guide*.
0
1 **To copy package versions from one repository to another**
2
3 The following ``copy-package-versions`` moves versions 4.0.0 and 5.0.0 of a package named test-package from my-repo to test-repo. ::
4
5 aws codeartifact copy-package-versions \
6 --domain test-domain \
7 --source-repository my-repo \
8 --destination-repository test-repo \
9 --format npm \
10 --package test-package \
11 --versions '["4.0.0", "5.0.0"]'
12
13 Output::
14
15 {
16 "format": "npm",
17 "package": "test-package",
18 "versions": [
19 {
20 "version": "5.0.0",
21 "revision": "REVISION-1-SAMPLE-6C81EFF7DA55CC",
22 "status": "Published"
23 },
24 {
25 "version": "4.0.0",
26 "revision": "REVISION-2-SAMPLE-55C752BEE772FC",
27 "status": "Published"
28 }
29 ]
30 }
31
32 For more information, see `Copy packages between repositories <https://docs.aws.amazon.com/codeartifact/latest/ug/copy-package.html>`__ in the *AWS CodeArtifact User Guide*.
33
0 **To create a domain**
1
2 The following ``create-domain`` example creates a domain named test-domain. ::
3
4 aws codeartifact create-domain \
5 --domain test-domain
6
7 Output::
8
9 {
10 "domain": {
11 "name": "test-domain",
12 "owner": "111122223333",
13 "arn": "arn:aws:codeartifact:us-west-2:111122223333:domain/test-domain",
14 "status": "Active",
15 "createdTime": "2020-10-20T13:16:48.559000-04:00",
16 "encryptionKey": "arn:aws:kms:us-west-2:111122223333:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
17 "repositoryCount": 0,
18 "assetSizeBytes": 0
19 }
20 }
21
22 For more information, see `Create a domain <https://docs.aws.amazon.com/codeartifact/latest/ug/domain-create.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To create a repository**
1
2 The following ``create-repository`` example creates a repository named test-repo inside a domain named test-domain. ::
3
4 aws codeartifact create-repository \
5 --domain test-domain \
6 --domain-owner 111122223333 \
7 --repository test-repo \
8 --description "This is a test repository."
9
10 Output::
11
12 {
13 "repository": {
14 "name": "test-repo",
15 "administratorAccount": "111122223333",
16 "domainName": "test-domain",
17 "domainOwner": "111122223333",
18 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo",
19 "description": "This is a test repository.",
20 "upstreams": [],
21 "externalConnections": []
22 }
23 }
24
25 For more information, see `Create a domain <https://docs.aws.amazon.com/codeartifact/latest/ug/create-repo.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To delete the permissions policy document from a domain**
1
2 The following ``delete-domain-permissions-policy`` example deletes the permission policy from a domain named test-domain. ::
3
4 aws codeartifact delete-domain-permissions-policy \
5 --domain test-domain
6
7 Output::
8
9 {
10 "Version": "2012-10-17",
11 "Statement": [
12 {
13 "Sid": "BasicDomainPolicy",
14 "Action": [
15 "codeartifact:GetDomainPermissionsPolicy",
16 "codeartifact:ListRepositoriesInDomain",
17 "codeartifact:GetAuthorizationToken",
18 "codeartifact:CreateRepository"
19 ],
20 "Effect": "Allow",
21 "Resource": "*",
22 "Principal": {
23 "AWS": "arn:aws:iam::111122223333:root"
24 }
25 }
26 ]
27 }
28
29 For more information, see `Delete a domain policy <https://docs.aws.amazon.com/codeartifact/latest/ug/domain-policies.html#deleting-a-domain-policy>`__ in the *AWS CodeArtifact User Guide*.
0 **To delete a domain**
1
2 The following ``delete-domain`` example deletes a domain named ``test-domain``. ::
3
4 aws codeartifact delete-domain \
5 --domain test-domain
6
7 Output::
8
9 {
10 "domain": {
11 "name": "test-domain",
12 "owner": "417498243647",
13 "arn": "arn:aws:codeartifact:us-west-2:417498243647:domain/test-domain",
14 "status": "Deleted",
15 "createdTime": "2020-10-20T13:16:48.559000-04:00",
16 "encryptionKey": "arn:aws:kms:us-west-2:417498243647:key/c9fe2447-0795-4fda-afbe-8464574ae162",
17 "repositoryCount": 0,
18 "assetSizeBytes": 0
19 }
20 }
21
22 For more information, see `Delete a domain <https://docs.aws.amazon.com/codeartifact/latest/ug/delete-domain.html>`__ in the *AWS CodeArtifact User Guide*.
0
1 **To delete package versions**
2
3 The following ``delete-package-versions`` example deletes version 4.0.0 of a package named test-package. ::
4
5 aws codeartifact delete-package-versions \
6 --domain test-domain \
7 --repo test-repo \
8 --format npm \
9 --package test-package \
10 --versions 4.0.0
11
12 Output::
13
14 {
15 "successfulVersions": {
16 "4.0.0": {
17 "revision": "Ciqe5/9yicvkJT13b5/LdLpCyE6fqA7poa9qp+FilPs=",
18 "status": "Deleted"
19 }
20 },
21 "failedVersions": {}
22 }
23
24 For more information, see `Delete a package version <https://docs.aws.amazon.com/codeartifact/latest/ug/delete-package.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To delete a permissions policy from a repository**
1
2 The following ``delete-repository-permissions-policy`` example deletes the permission policy from a repository named test-repo. ::
3
4 aws codeartifact delete-repository-permissions-policy \
5 --domain test-domain \
6 --repository test-repo
7
8 Output::
9
10 {
11 "Version": "2012-10-17",
12 "Statement": [
13 {
14 "Effect": "Allow",
15 "Principal": {
16 "AWS": "arn:aws:iam::111122223333:root"
17 },
18 "Action": [
19 "codeartifact:DescribePackageVersion",
20 "codeartifact:DescribeRepository",
21 "codeartifact:GetPackageVersionReadme",
22 "codeartifact:GetRepositoryEndpoint",
23 "codeartifact:ListPackages",
24 "codeartifact:ListPackageVersions",
25 "codeartifact:ListPackageVersionAssets",
26 "codeartifact:ListPackageVersionDependencies",
27 "codeartifact:ReadFromRepository"
28 ],
29 "Resource": "*"
30 }
31 ]
32 }
33
34 For more information, see `Delete a policy <https://docs.aws.amazon.com/codeartifact/latest/ug/repo-policies.html#deleting-a-policy>`__ in the *AWS CodeArtifact User Guide*.
0 **To delete a repository**
1
2 The following ``delete-repository`` example deletes a repository named ``test-repo`` in a domain named ``test-domain``. ::
3
4 aws codeartifact delete-repository \
5 --domain test-domain \
6 --repository test-repo
7
8 Output::
9
10 {
11 "repository": {
12 "name": "test-repo",
13 "administratorAccount": "111122223333",
14 "domainName": "test-domain",
15 "domainOwner": "111122223333",
16 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo",
17 "description": "This is a test repository",
18 "upstreams": [],
19 "externalConnections": []
20 }
21 }
22
23 For more information, see `Delete a repository <https://docs.aws.amazon.com/codeartifact/latest/ug/delete-repo.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To get information about a domain**
1
2 The following ``describe-domain`` example returns a DomainDescription object for a domain named test-domain. ::
3
4 aws codeartifact create-domain \
5 --domain test-domain
6
7 Output::
8
9 {
10 "domain": {
11 "name": "test-domain",
12 "owner": "111122223333",
13 "arn": "arn:aws:codeartifact:us-west-2:111122223333:domain/test-domain",
14 "status": "Active",
15 "createdTime": "2020-10-20T13:16:48.559000-04:00",
16 "encryptionKey": "arn:aws:kms:us-west-2:111122223333:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
17 "repositoryCount": 2,
18 "assetSizeBytes": 0
19 }
20 }
21
22 For more information, see `Domain overview <https://docs.aws.amazon.com/codeartifact/latest/ug/domain-overview.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To get information about a repository**
1
2 The following ``describe-repository`` example returns a RepositoryDescription object for a repository named test-repo. ::
3
4 aws codeartifact describe-repository \
5 --domain test-domain \
6 --repository test-repo
7
8 Output::
9
10 {
11 "repository": {
12 "name": "test-repo",
13 "administratorAccount": "111122223333",
14 "domainName": "test-domain",
15 "domainOwner": "111122223333",
16 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo",
17 "description": "This is a test repository.",
18 "upstreams": [],
19 "externalConnections": []
20 }
21 }
22
23 For more information, see `Create a domain <https://docs.aws.amazon.com/codeartifact/latest/ug/create-repo.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To remove an external connection from a repository**
1
2 The following ``disassociate-external-connection`` example removes an external connection to npmjs.com from a repository named test-repo. ::
3
4 aws codeartifact disassociate-external-connection \
5 --repository test-repo \
6 --domain test-domain \
7 --external-connection public:npmjs
8
9 Output::
10
11 {
12 "repository": {
13 "name": "test-repo",
14 "administratorAccount": "111122223333",
15 "domainName": "test-domain",
16 "domainOwner": "111122223333",
17 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo",
18 "upstreams": [],
19 "externalConnections": []
20 }
21 }
22
23 For more information, see `Remove an external connection <https://docs.aws.amazon.com/codeartifact/latest/ug/external-connection.html#removing-an-external-connection>`__ in the *AWS CodeArtifact User Guide*.
0 **To delete a package version's assets and set its status to Disposed**
1
2 The following ``dispose-package-versions`` example deletes the assets of test-package version 4.0.0 and sets its status to Disposed. ::
3
4 aws codeartifact dispose-package-versions \
5 --domain test-domain \
6 --repo test-repo \
7 --format npm \
8 --package test-package \
9 --versions 4.0.0
10
11 Output::
12
13 {
14 "successfulVersions": {
15 "4.0.0": {
16 "revision": "Ciqe5/9yicvkJT13b5/LdLpCyE6fqA7poa9qp+FilPs=",
17 "status": "Disposed"
18 }
19 },
20 "failedVersions": {}
21 }
22
23 For more information, see `Working with packages in CodeArtifact <https://docs.aws.amazon.com/codeartifact/latest/ug/packages.html>`__ in the *AWS CodeArtifact User Guide*.
24
0 **To get an authorization token**
1
2 The following ``get-authorization-token`` example retrieves a CodeArtifact authorization token. ::
3
4 aws codeartifact get-authorization-token \
5 --domain test-domain \
6 --query authorizationToken \
7 --output text
8
9 Output::
10
11 This command will return the authorization token. You can store the output in an environment variable when calling the command.
12
13 For more information, see `Configure pip without the login command <https://docs.aws.amazon.com/codeartifact/latest/ug/python-configure-without-pip.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To get the permissions policy document for a domain**
1
2 The following ``get-domain-permissions-policy`` example gets the permission policy attached to a domain named test-domain. ::
3
4 aws codeartifact get-domain-permissions-policy \
5 --domain test-domain
6
7 Output::
8
9 {
10 "Version": "2012-10-17",
11 "Statement": [
12 {
13 "Sid": "BasicDomainPolicy",
14 "Action": [
15 "codeartifact:GetDomainPermissionsPolicy",
16 "codeartifact:ListRepositoriesInDomain",
17 "codeartifact:GetAuthorizationToken",
18 "codeartifact:CreateRepository"
19 ],
20 "Effect": "Allow",
21 "Resource": "*",
22 "Principal": {
23 "AWS": "arn:aws:iam::111122223333:root"
24 }
25 }
26 ]
27 }
28
29 For more information, see `Read a domain policy <https://docs.aws.amazon.com/codeartifact/latest/ug/domain-policies.html#reading-a-domain-policy>`__ in the *AWS CodeArtifact User Guide*.
0 **To get an asset from a package version**
1
2 The following ``get-package-version-asset`` example retrieves the package.tgz asset for version 4.0.0 of an npm package named test-package. ::
3
4 aws codeartifact get-package-version-asset \
5 --domain test-domain \
6 --repo test-repo \
7 --format npm \
8 --package test-package \
9 --package-version 4.0.0 \
10 outfileName
11
12 Output::
13
14 The output for this command will also store the raw asset in the file provided in place of outfileName.
15
16 {
17 "assetName": "package.tgz",
18 "packageVersion": "4.0.0",
19 "packageVersionRevision": "Ciqe5/9yicvkJT13b5/LdLpCyE6fqA7poa9qp+FilPs="
20 }
21
22 For more information, see `List package version assets <https://docs.aws.amazon.com/codeartifact/latest/ug/list-assets.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To get a package version's readme file**
1
2 The following ``get-package-version-readme`` example retrieves the readme file for version 4.0.0 of an npm package named test-package. ::
3
4 aws codeartifact get-package-version-readme \
5 --domain test-domain \
6 --repo test-repo \
7 --format npm \
8 --package test-package \
9 --package-version 4.0.0
10
11 Output::
12
13 {
14 "format": "npm",
15 "package": "test-package",
16 "version": "4.0.0",
17 "readme": "<div align=\"center\">\n <a href=\https://github.com/test-package/testpack\"> ... more content ... \n",
18 "versionRevision": "Ciqe5/9yicvkJT13b5/LdLpCyE6fqA7poa9qp+FilPs="
19 }
20
21 For more information, see `View package version readme file <https://docs.aws.amazon.com/codeartifact/latest/ug/describe-package-version.html#view-package-readme>`__ in the *AWS CodeArtifact User Guide*.
0 **To get a repository's URL endpoint**
1
2 The following ``get-repository-endpoint`` example returns the npm endpoint for the test-repo repository. ::
3
4 aws codeartifact get-repository-endpoint \
5 --domain test-domain \
6 --repository test-repo \
7 --format npm
8
9 Output::
10
11 {
12 "repositoryEndpoint": "https://test-domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/test-repo/"
13 }
14
15 For more information, see `Connect to a repository <https://docs.aws.amazon.com/codeartifact/latest/ug/connect-repo.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To get the permissions policy document for a repository**
1
2 The following ``get-repository-permissions-policy`` example gets the permission policy attached to a repository named test-repo. ::
3
4 aws codeartifact get-repository-permissions-policy \
5 --domain test-domain \
6 --repository test-repo
7
8 Output::
9
10 {
11 "Version": "2012-10-17",
12 "Statement": [
13 {
14 "Effect": "Allow",
15 "Principal": {
16 "AWS": "arn:aws:iam::111122223333:root"
17 },
18 "Action": [
19 "codeartifact:DescribePackageVersion",
20 "codeartifact:DescribeRepository",
21 "codeartifact:GetPackageVersionReadme",
22 "codeartifact:GetRepositoryEndpoint",
23 "codeartifact:ListPackages",
24 "codeartifact:ListPackageVersions",
25 "codeartifact:ListPackageVersionAssets",
26 "codeartifact:ListPackageVersionDependencies",
27 "codeartifact:ReadFromRepository"
28 ],
29 "Resource": "*"
30 }
31 ]
32 }
33
34 For more information, see `Read a policy <https://docs.aws.amazon.com/codeartifact/latest/ug/repo-policies.html#setting-a-policy>`__ in the *AWS CodeArtifact User Guide*.
0 **To list domains**
1
2 The following ``list-domains`` example returns a summary of all domains owned by the AWS account that makes the call. ::
3
4 aws codeartifact list-domains
5
6 Output::
7
8 {
9 "domains": [
10 {
11 "name": "my-domain",
12 "owner": "111122223333",
13 "status": "Active",
14 "encryptionKey": "arn:aws:kms:us-west-2:111122223333:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
15 },
16 {
17 "name": "test-domain",
18 "owner": "111122223333",
19 "status": "Active",
20 "encryptionKey": "arn:aws:kms:us-west-2:111122223333:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"
21 }
22 ]
23 }
24
25 For more information, see `Working with domains in CodeArtifact <https://docs.aws.amazon.com/codeartifact/latest/ug/domains.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To view a package version's assets**
1
2 The following ``list-package-version-assets`` example retrieves the assets for version 4.0.0 of an npm package named test-package. ::
3
4 aws codeartifact list-package-version-assets \
5 --domain test-domain \
6 --repo test-repo \
7 --format npm \
8 --package test-package \
9 --package-version 4.0.0
10
11 Output::
12
13 {
14 "format": "npm",
15 "package": "test-package",
16 "version": "4.0.0",
17 "versionRevision": "Ciqe5/9yicvkJT13b5/LdLpCyE6fqA7poa9qp+FilPs=",
18 "assets": [
19 {
20 "name": "package.tgz",
21 "size": 316680,
22 "hashes": {
23 "MD5": "60078ec6d9e76b89fb55c860832742b2",
24 "SHA-1": "b44a9b6297bcb698f1c51a3545a2b3b368d59c52",
25 "SHA-256": "d2aa8c6afc3c8591765785a37d1c5acae482a8eb3ab9729ed28922692454f2e2",
26 "SHA-512": "3e585d15c8a594e20d7de57b362ea81754c011acb2641a19f1b72c8531ea39825896bab344ae616a0a5a824cb9a381df0b3cddd534645cf305aba70a93dac698"
27 }
28 }
29 ]
30 }
31
32 For more information, see `List package version assets <https://docs.aws.amazon.com/codeartifact/latest/ug/list-assets.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To view a package version's dependencies**
1
2 The following ``list-package-version-dependencies`` example retrieves the dependencies for version 4.0.0 of an npm package named test-package. ::
3
4 aws codeartifact list-package-version-dependencies \
5 --domain test-domain \
6 --repo test-repo \
7 --format npm \
8 --package test-package \
9 --package-version 4.0.0
10
11 Output::
12
13 {
14 "format": "npm",
15 "package": "test-package",
16 "version": "4.0.0",
17 "versionRevision": "Ciqe5/9yicvkJT13b5/LdLpCyE6fqA7poa9qp+FilPs=",
18 "dependencies": [
19 {
20 "namespace": "testns",
21 "package": "testdep1",
22 "dependencyType": "regular",
23 "versionRequirement": "1.8.5"
24 },
25 {
26 "namespace": "testns",
27 "package": "testdep2",
28 "dependencyType": "regular",
29 "versionRequirement": "1.8.5"
30 }
31 ]
32 }
33
34 For more information, see `View and update package version details and dependencies <https://docs.aws.amazon.com/codeartifact/latest/ug/describe-package-version.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To list package versions for a package**
1
2 The following ``list-package-versions`` example returns a list of package versions for a package named ``kind-of``. ::
3
4 aws codeartifact list-package-versions \
5 --package kind-of \
6 --domain test-domain \
7 --repository test-repo \
8 --format npm
9
10 Output::
11
12 {
13 "defaultDisplayVersion": "1.0.1",
14 "format": "npm",
15 "package": "kind-of",
16 "versions": [
17 {
18 "version": "1.0.1",
19 "revision": "REVISION-SAMPLE-1-C7F4S5E9B772FC",
20 "status": "Published"
21 },
22 {
23 "version": "1.0.0",
24 "revision": "REVISION-SAMPLE-2-C752BEEF6D2CFC",
25 "status": "Published"
26 },
27 {
28 "version": "0.1.2",
29 "revision": "REVISION-SAMPLE-3-654S65A5C5E1FC",
30 "status": "Published"
31 },
32 {
33 "version": "0.1.1",
34 "revision": "REVISION-SAMPLE-1-C7F4S5E9B772FC"",
35 "status": "Published"
36 },
37 {
38 "version": "0.1.0",
39 "revision": "REVISION-SAMPLE-4-AF669139B772FC",
40 "status": "Published"
41 }
42 ]
43 }
44
45 For more information, see `List package versions <https://docs.aws.amazon.com/codeartifact/latest/ug/list-packages-versions.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To list packages in a repository**
1
2 The following ``list-packages`` example list packages in a repository named ``test-repo`` in a domain named ``test-domain``. ::
3
4 aws codeartifact list-packages \
5 --domain test-domain \
6 --repository test-repo
7
8 Output::
9
10 {
11 "packages": [
12 {
13 "format": "npm",
14 "package": "lodash"
15 }
16 {
17 "format": "python",
18 "package": "test-package"
19 }
20 ]
21 }
22
23 For more information, see `List package names <https://docs.aws.amazon.com/codeartifact/latest/ug/list-packages.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To list repositories in a domain**
1
2 The following ``list-repositories-in-domain`` example returns a summary of all repositories in the test-domain domain. ::
3
4 aws codeartifact list-repositories-in-domain \
5 --domain test-domain
6
7 Output::
8
9 {
10 "repositories": [
11 {
12 "name": "test-repo",
13 "administratorAccount": "111122223333",
14 "domainName": "test-domain",
15 "domainOwner": "111122223333",
16 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo",
17 "description": "This is a test repository."
18 },
19 {
20 "name": "test-repo2",
21 "administratorAccount": "111122223333",
22 "domainName": "test-domain",
23 "domainOwner": "111122223333",
24 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo2",
25 "description": "This is a test repository."
26 }
27 ]
28 }
29
30 For more information, see `List repositories <https://docs.aws.amazon.com/codeartifact/latest/ug/list-repos.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To list repositories**
1
2 The following ``list-repositories`` example returns a summary of all repositories in domain owned by the AWS account that makes the call. ::
3
4 aws codeartifact list-repositories
5
6 Output::
7
8 {
9 "repositories": [
10 {
11 "name": "npm-store",
12 "administratorAccount": "111122223333",
13 "domainName": "my-domain",
14 "domainOwner": "111122223333",
15 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/my-domain/npm-store",
16 "description": "Provides npm artifacts from npm, Inc."
17 },
18 {
19 "name": "target-repo",
20 "administratorAccount": "111122223333",
21 "domainName": "my-domain",
22 "domainOwner": "111122223333",
23 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/my-domain/target-repo",
24 "description": "test target repo"
25 },
26 {
27 "name": "test-repo2",
28 "administratorAccount": "111122223333",
29 "domainName": "test-domain",
30 "domainOwner": "111122223333",
31 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo2",
32 "description": "This is a test repository."
33 }
34 ]
35 }
36
37 For more information, see `List repositories <https://docs.aws.amazon.com/codeartifact/latest/ug/list-repos.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To configure authentication to your repository with the login command**
1
2 The following ``login`` example configures the npm package manager with a repository named test-repo in a domain named test-domain. ::
3
4 aws codeartifact login \
5 --domain test-domain \
6 --repository test-repo \
7 --tool npm
8
9 Output::
10
11 Successfully configured npm to use AWS CodeArtifact repository https://test-domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/test-repo/
12 Login expires in 12 hours at 2020-11-12 01:53:16-05:00
13
14 For more information, see `Getting started with the AWS CLI <https://docs.aws.amazon.com/codeartifact/latest/ug/getting-started-cli.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To attach a permissions policy to a domain**
1
2 The following ``put-domain-permissions-policy`` example attaches a permission policy that is defined in the policy.json file to a domain named test-domain. ::
3
4 aws codeartifact put-domain-permissions-policy \
5 --domain test-domain \
6 --policy-document file://PATH/TO/policy.json
7
8 Output::
9
10 {
11 "policy": {
12 "resourceArn": "arn:aws:codeartifact:region-id:111122223333:domain/test-domain",
13 "document": "{ ...policy document content...}",
14 "revision": "MQlyyTQRASRU3HB58gBtSDHXG7Q3hvxxxxxxx="
15 }
16 }
17
18 For more information, see `Set a domain policy <https://docs.aws.amazon.com/codeartifact/latest/ug/domain-policies.html#set-domain-policy>`__ in the *AWS CodeArtifact User Guide*.
0 **To attach a permissions policy to a repository**
1
2 The following ``put-repository-permissions-policy`` example attaches a permission policy that is defined in the policy.json file to a repository named test-repo. ::
3
4 aws codeartifact put-repository-permissions-policy \
5 --domain test-domain \
6 --repository test-repo \
7 --policy-document file://PATH/TO/policy.json
8
9 Output::
10
11 {
12 "policy": {
13 "resourceArn": "arn:aws:codeartifact:region-id:111122223333:repository/test-domain/test-repo",
14 "document": "{ ...policy document content...}",
15 "revision": "MQlyyTQRASRU3HB58gBtSDHXG7Q3hvxxxxxxx="
16 }
17 }
18
19 For more information, see `Set a policy <https://docs.aws.amazon.com/codeartifact/latest/ug/repo-policies.html#setting-a-policy>`__ in the *AWS CodeArtifact User Guide*.
0 **To update package version status**
1
2 The following ``update-package-versions-status`` example updates the status of version 4.0.0 of the test-package package to Archived. ::
3
4 aws codeartifact update-package-versions-status \
5 --domain test-domain \
6 --repo test-repo \
7 --format npm \
8 --package test-package \
9 --versions 4.0.0 \
10 --target-status Archived
11
12 Output::
13
14 {
15 "successfulVersions": {
16 "4.0.0": {
17 "revision": "Ciqe5/9yicvkJT13b5/LdLpCyE6fqA7poa9qp+FilPs=",
18 "status": "Archived"
19 }
20 },
21 "failedVersions": {}
22 }
23
24 For more information, see `Update package version status <https://docs.aws.amazon.com/codeartifact/latest/ug/describe-package-version.html#update-package-version-status>`__ in the *AWS CodeArtifact User Guide*.
0 **To update a repository**
1
2 The following ``update-repository`` example updates the description of a repo named test-repo in a domain named test-domain to "this is an updated description". ::
3
4 aws codeartifact update-repository \
5 --domain test-domain \
6 --repository test-repo \
7 --description "this is an updated description"
8
9 Output::
10
11 {
12 "repository": {
13 "name": "test-repo",
14 "administratorAccount": "111122223333",
15 "domainName": "test-domain",
16 "domainOwner": "111122223333",
17 "arn": "arn:aws:codeartifact:us-west-2:111122223333:repository/test-domain/test-repo",
18 "description": "this is an updated description",
19 "upstreams": [],
20 "externalConnections": []
21 }
22 }
23
24 For more information, see `View or modify a repository configuration <https://docs.aws.amazon.com/codeartifact/latest/ug/config-repos.html>`__ in the *AWS CodeArtifact User Guide*.
0 **To view details of builds in AWS CodeBuild.**
1
2 The following ``batch-get-build-batches`` example gets information about build batches in CodeBuild with the specified IDs. ::
3
4 aws codebuild batch-get-build-batches \
5 --ids codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE
6
7 Output::
8
9 {
10 "buildBatches": [
11 {
12 "id": "codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE",
13 "arn": "arn:aws:codebuild:us-west-2:123456789012:build-batch/codebuild-demo-project:e9c4f4df-3f43-41d2-ab3a-60fe2EXAMPLE",
14 "startTime": "2020-11-03T21:52:20.775000+00:00",
15 "endTime": "2020-11-03T21:56:59.784000+00:00",
16 "currentPhase": "SUCCEEDED",
17 "buildBatchStatus": "SUCCEEDED",
18 "resolvedSourceVersion": "0a6546f68309560d08a310daac92314c4d378f6b",
19 "projectName": "codebuild-demo-project",
20 "phases": [
21 {
22 "phaseType": "SUBMITTED",
23 "phaseStatus": "SUCCEEDED",
24 "startTime": "2020-11-03T21:52:20.775000+00:00",
25 "endTime": "2020-11-03T21:52:20.976000+00:00",
26 "durationInSeconds": 0
27 },
28 {
29 "phaseType": "DOWNLOAD_BATCHSPEC",
30 "phaseStatus": "SUCCEEDED",
31 "startTime": "2020-11-03T21:52:20.976000+00:00",
32 "endTime": "2020-11-03T21:52:57.401000+00:00",
33 "durationInSeconds": 36
34 },
35 {
36 "phaseType": "IN_PROGRESS",
37 "phaseStatus": "SUCCEEDED",
38 "startTime": "2020-11-03T21:52:57.401000+00:00",
39 "endTime": "2020-11-03T21:56:59.751000+00:00",
40 "durationInSeconds": 242
41 },
42 {
43 "phaseType": "COMBINE_ARTIFACTS",
44 "phaseStatus": "SUCCEEDED",
45 "startTime": "2020-11-03T21:56:59.751000+00:00",
46 "endTime": "2020-11-03T21:56:59.784000+00:00",
47 "durationInSeconds": 0
48 },
49 {
50 "phaseType": "SUCCEEDED",
51 "startTime": "2020-11-03T21:56:59.784000+00:00"
52 }
53 ],
54 "source": {
55 "type": "GITHUB",
56 "location": "https://github.com/my-repo/codebuild-demo-project.git",
57 "gitCloneDepth": 1,
58 "gitSubmodulesConfig": {
59 "fetchSubmodules": false
60 },
61 "reportBuildStatus": false,
62 "insecureSsl": false
63 },
64 "secondarySources": [],
65 "secondarySourceVersions": [],
66 "artifacts": {
67 "location": ""
68 },
69 "secondaryArtifacts": [],
70 "cache": {
71 "type": "NO_CACHE"
72 },
73 "environment": {
74 "type": "LINUX_CONTAINER",
75 "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
76 "computeType": "BUILD_GENERAL1_SMALL",
77 "environmentVariables": [],
78 "privilegedMode": false,
79 "imagePullCredentialsType": "CODEBUILD"
80 },
81 "logConfig": {
82 "cloudWatchLogs": {
83 "status": "ENABLED"
84 },
85 "s3Logs": {
86 "status": "DISABLED",
87 "encryptionDisabled": false
88 }
89 },
90 "buildTimeoutInMinutes": 60,
91 "queuedTimeoutInMinutes": 480,
92 "complete": true,
93 "initiator": "Strohm",
94 "encryptionKey": "arn:aws:kms:us-west-2:123456789012:alias/aws/s3",
95 "buildBatchNumber": 6,
96 "buildBatchConfig": {
97 "serviceRole": "arn:aws:iam::123456789012:role/service-role/codebuild-demo-project",
98 "restrictions": {
99 "maximumBuildsAllowed": 100
100 },
101 "timeoutInMins": 480
102 },
103 "buildGroups": [
104 {
105 "identifier": "DOWNLOAD_SOURCE",
106 "ignoreFailure": false,
107 "currentBuildSummary": {
108 "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:379737d8-bc35-48ec-97fd-776d27545315",
109 "requestedOn": "2020-11-03T21:52:21.394000+00:00",
110 "buildStatus": "SUCCEEDED",
111 "primaryArtifact": {
112 "type": "no_artifacts",
113 "identifier": "DOWNLOAD_SOURCE"
114 },
115 "secondaryArtifacts": []
116 }
117 },
118 {
119 "identifier": "linux_small",
120 "dependsOn": [],
121 "ignoreFailure": false,
122 "currentBuildSummary": {
123 "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:dd785171-ed84-4bb6-8ede-ceeb86e54bdb",
124 "requestedOn": "2020-11-03T21:52:57.604000+00:00",
125 "buildStatus": "SUCCEEDED",
126 "primaryArtifact": {
127 "type": "no_artifacts",
128 "identifier": "linux_small"
129 },
130 "secondaryArtifacts": []
131 }
132 },
133 {
134 "identifier": "linux_medium",
135 "dependsOn": [
136 "linux_small"
137 ],
138 "ignoreFailure": false,
139 "currentBuildSummary": {
140 "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:97cf7bd4-5313-4786-8243-4aef350a1267",
141 "requestedOn": "2020-11-03T21:54:18.474000+00:00",
142 "buildStatus": "SUCCEEDED",
143 "primaryArtifact": {
144 "type": "no_artifacts",
145 "identifier": "linux_medium"
146 },
147 "secondaryArtifacts": []
148 }
149 },
150 {
151 "identifier": "linux_large",
152 "dependsOn": [
153 "linux_medium"
154 ],
155 "ignoreFailure": false,
156 "currentBuildSummary": {
157 "arn": "arn:aws:codebuild:us-west-2:123456789012:build/codebuild-demo-project:60a194cd-0d03-4337-9db1-d41476a17d27",
158 "requestedOn": "2020-11-03T21:55:39.203000+00:00",
159 "buildStatus": "SUCCEEDED",
160 "primaryArtifact": {
161 "type": "no_artifacts",
162 "identifier": "linux_large"
163 },
164 "secondaryArtifacts": []
165 }
166 }
167 ]
168 }
169 ],
170 "buildBatchesNotFound": []
171 }
172
173 For more information, see `Batch builds in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html>`)__ in the *AWS CodeBuild User Guide*.
0 **To get information about one or more report groups in AWS CodeBuild.**
1
2 The following ``batch-get-report-groups`` example retrieves information about the report group with the specified ARN. ::
3
4 aws codebuild batch-get-report-groups \
5 --report-group-arns arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>
6
7 Output::
8
9 {
10 "reportGroups": [
11 {
12 "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>",
13 "name": "report-group-name",
14 "type": "TEST",
15 "exportConfig": {
16 "exportConfigType": "NO_EXPORT"
17 },
18 "created": "2020-10-01T18:04:08.466000+00:00",
19 "lastModified": "2020-10-01T18:04:08.466000+00:00",
20 "tags": []
21 }
22 ],
23 "reportGroupsNotFound": []
24 }
25
26 For more information, see `Working with report groups <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html>`__ in the *AWS CodeBuild User Guide*.
0 **To get information about one or more reports in AWS CodeBuild.**
1
2 The following ``batch-get-reports`` example retrieves information about the reports with the specified ARNs. ::
3
4 aws codebuild batch-get-reports \
5 --report-arns arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report 1 ID> arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report 2 ID>
6
7 Output::
8
9 {
10 "reports": [
11 {
12 "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report 1 ID>",
13 "type": "TEST",
14 "name": "<report-group-name>",
15 "reportGroupArn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>",
16 "executionId": "arn:aws:codebuild:<region-ID>:<user-ID>:build/test-reports:<ID>",
17 "status": "FAILED",
18 "created": "2020-10-01T11:25:22.531000-07:00",
19 "expired": "2020-10-31T11:25:22-07:00",
20 "exportConfig": {
21 "exportConfigType": "NO_EXPORT"
22 },
23 "truncated": false,
24 "testSummary": {
25 "total": 28,
26 "statusCounts": {
27 "ERROR": 5,
28 "FAILED": 1,
29 "SKIPPED": 4,
30 "SUCCEEDED": 18,
31 "UNKNOWN": 0
32 },
33 "durationInNanoSeconds": 94000000
34 }
35 },
36 {
37 "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report 2 ID>",
38 "type": "TEST",
39 "name": "<report-group-name>",
40 "reportGroupArn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>",
41 "executionId": "arn:aws:codebuild:<region-ID>:<user-ID>:build/test-reports:<ID>",
42 "status": "FAILED",
43 "created": "2020-10-01T11:13:05.816000-07:00",
44 "expired": "2020-10-31T11:13:05-07:00",
45 "exportConfig": {
46 "exportConfigType": "NO_EXPORT"
47 },
48 "truncated": false,
49 "testSummary": {
50 "total": 28,
51 "statusCounts": {
52 "ERROR": 5,
53 "FAILED": 1,
54 "SKIPPED": 4,
55 "SUCCEEDED": 18,
56 "UNKNOWN": 0
57 },
58 "durationInNanoSeconds": 94000000
59 }
60 }
61 ],
62 "reportsNotFound": []
63 }
64
65 For more information, see `Working with reports <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report.html>`__ in the *AWS CodeBuild User Guide*.
66
0 **To create a report group in AWS CodeBuild.**
1
2 The following ``create-report-group`` example creates a new report group. ::
3
4 aws codebuild create-report-group \
5 --cli-input-json file://create-report-group-source.json
6
7 Contents of create-report-group-source.json::
8
9 {
10 "name": "cli-created-report-group",
11 "type": "TEST",
12 "exportConfig": {
13 "exportConfigType": "S3",
14 "s3Destination": {
15 "bucket": "my-s3-bucket",
16 "path": "",
17 "packaging": "ZIP",
18 "encryptionDisabled": true
19 }
20 }
21 }
22
23 Output::
24
25 {
26 "reportGroup": {
27 "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/cli-created-report-group",
28 "name": "cli-created-report-group",
29 "type": "TEST",
30 "exportConfig": {
31 "exportConfigType": "S3",
32 "s3Destination": {
33 "bucket": "my-s3-bucket",
34 "path": "",
35 "packaging": "ZIP",
36 "encryptionDisabled": true
37 }
38 },
39 "created": 1602020026.775,
40 "lastModified": 1602020026.775
41 }
42 }
43
44 For more information, see `Working with report groups <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html>`__ in the *AWS CodeBuild User Guide*.
0 **To delete a batch build in AWS CodeBuild.**
1
2 The following ``delete-build-batch`` example deletes the specified batch build. ::
3
4 aws codebuild delete-build-batch \
5 --id <project-name>:<batch-ID>
6
7 Output::
8
9 {
10 "statusCode": "BATCH_DELETED",
11 "buildsDeleted": [
12 "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
13 "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
14 "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
15 "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>"
16 ],
17 "buildsNotDeleted": []
18 }
19
20 For more information, see `Batch builds in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html>`__ in the *AWS CodeBuild User Guide*.
21
0 **To delete a report groups in AWS CodeBuild.**
1
2 The following ``delete-report-group`` example deletes the report group with the specified ARN. ::
3
4 aws codebuild delete-report-group \
5 --arn arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>
6
7 This command produces no output.
8
9 For more information, see `Working with report groups <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html>`__ in the *AWS CodeBuild User Guide*.
0 **To delete a report in AWS CodeBuild.**
1
2 The following ``delete-report`` example deletes the specified report. ::
3
4 aws codebuild delete-report \
5 --arn arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>
6
7 This command produces no output.
8
9 For more information, see `Working with reports <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report.html>`__ in the *AWS CodeBuild User Guide*.
0 **To get detailed information about code coverage test results in AWS CodeBuild.**
1
2 The following ``describe-code-coverages`` example gets information about the code coverage test results in the specified report. ::
3
4 aws codebuild describe-code-coverages \
5 --report-arn arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>
6
7 Output::
8
9 {
10 "codeCoverages": [
11 {
12 "id": "20a0adcc-db13-4b66-804b-ecaf9f852855",
13 "reportARN": "arn:aws:codebuild:<region-ID>:972506530580:report/<report-group-name>:<report-ID>",
14 "filePath": "<source-file-1-path>",
15 "lineCoveragePercentage": 83.33,
16 "linesCovered": 5,
17 "linesMissed": 1,
18 "branchCoveragePercentage": 50.0,
19 "branchesCovered": 1,
20 "branchesMissed": 1,
21 "expired": "2020-11-20T21:22:45+00:00"
22 },
23 {
24 "id": "0887162d-bf57-4cf1-a164-e432373d1a83",
25 "reportARN": "arn:aws:codebuild:<region-ID>:972506530580:report/<report-group-name>:<report-ID>",
26 "filePath": "<source-file-2-path>",
27 "lineCoveragePercentage": 90.9,
28 "linesCovered": 10,
29 "linesMissed": 1,
30 "branchCoveragePercentage": 50.0,
31 "branchesCovered": 1,
32 "branchesMissed": 1,
33 "expired": "2020-11-20T21:22:45+00:00"
34 }
35 ]
36 }
37
38 For more information, see `Code coverage reports <https://docs.aws.amazon.com/codebuild/latest/userguide/code-coverage-report.html>`__ in the *AWS CodeBuild User Guide*.
0 **To get detailed information about test cases in AWS CodeBuild.**
1
2 The following ``describe-test-cases`` example gets information about the test cases in the specified report. ::
3
4 aws codebuild describe-test-cases \
5 --report-arn arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>
6
7 Output::
8
9 {
10 "testCases": [
11 {
12 "reportArn": "arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>",
13 "testRawDataPath": "<test-report-path>",
14 "prefix": "NUnit.Tests.Assemblies.MockTestFixture",
15 "name": "NUnit.Tests.Assemblies.MockTestFixture.NotRunnableTest",
16 "status": "ERROR",
17 "durationInNanoSeconds": 0,
18 "message": "No arguments were provided\n",
19 "expired": "2020-11-20T17:52:10+00:00"
20 },
21 {
22 "reportArn": "arn:aws:codebuild:<region-ID>:<account-ID>:report/<report-group-name>:<report-ID>",
23 "testRawDataPath": "<test-report-path>",
24 "prefix": "NUnit.Tests.Assemblies.MockTestFixture",
25 "name": "NUnit.Tests.Assemblies.MockTestFixture.TestWithException",
26 "status": "ERROR",
27 "durationInNanoSeconds": 0,
28 "message": "System.ApplicationException : Intentional Exception\nat NUnit.Tests.Assemblies.MockTestFixture.MethodThrowsException()\nat NUnit.Tests.Assemblies.MockTestFixture.TestWithException()\n\n",
29 "expired": "2020-11-20T17:52:10+00:00"
30 }
31 ]
32 }
33
34 For more information, see `Working with test reporting in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/test-reporting.html>`__ in the *AWS CodeBuild User Guide*.
0 **To list batch builds for a specific build project in AWS CodeBuild.**
1
2 The following ``list-build-batches-for-project`` example lists the CodeBuild batch builds for the specified project. ::
3
4 aws codebuild list-build-batches-for-project \
5 --project-name "<project-name>"
6
7 Output::
8
9 {
10 "ids": [
11 "<project-name>:<batch-ID>",
12 "<project-name>:<batch-ID>"
13 ]
14 }
15
16 For more information, see `Batch builds in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html>`__ in the *AWS CodeBuild User Guide*.
17
0 **To list batch builds in AWS CodeBuild.**
1
2 The following ``list-build-batches`` example lists the CodeBuild batch builds for the current account. ::
3
4 aws codebuild list-build-batches
5
6 Output::
7
8 {
9 "ids": [
10 "<project-name>:<batch-ID>",
11 "<project-name>:<batch-ID>"
12 ]
13 }
14
15 For more information, see `Batch builds in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html>`)__ in the *AWS CodeBuild User Guide*.
16
0 **To get a list of the report group ARNs in AWS CodeBuild.**
1
2 The following ``list-report-groups`` example retrieves the report group ARNs for the account in the region. ::
3
4 aws codebuild list-report-groups
5
6 Output::
7
8 {
9 "reportGroups": [
10 "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-1",
11 "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-2",
12 "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-3"
13 ]
14 }
15
16 For more information, see `Working with report groups <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html>`__ in the *AWS CodeBuild User Guide*.
0 **To get a list of the reports in a report group in AWS CodeBuild.**
1
2 The following ``list-report-for-report-groups`` example retrieves the reports in the specified report group for the account in the region. ::
3
4 aws codebuild list-reports-for-report-group \
5 --report-group-arn arn:aws:codebuild:<region-ID>:<user-ID>:report-group/<report-group-name>
6
7 Output::
8
9 {
10 "reports": [
11 "arn:aws:codebuild:<region-ID>:<user-ID>:report/report-1",
12 "arn:aws:codebuild:<region-ID>:<user-ID>:report/report-2",
13 "arn:aws:codebuild:<region-ID>:<user-ID>:report/report-3"
14 ]
15 }
16
17 For more information, see `Working with report groups <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html>`__ in the *AWS CodeBuild User Guide*.
0 **To get a list of the reports for the current account in AWS CodeBuild.**
1
2 The following ``list-reports`` example retrieves the ARNs of the reports for the current account. ::
3
4 aws codebuild list-reports
5
6 Output::
7
8 {
9 "reports": [
10 "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report ID>",
11 "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report ID>",
12 "arn:aws:codebuild:<region-ID>:<user-ID>:report/<report-group-name>:<report ID>"
13 ]
14 }
15
16 For more information, see `Working with reports <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report.html>`__ in the *AWS CodeBuild User Guide*.
0 **To list the shared project in AWS CodeBuild.**
1
2 The following ``list-shared-projects`` example lists the CodeBuild shared projects that are available to the current account. ::
3
4 aws codebuild list-shared-projects
5
6 Output::
7
8 {
9 "projects": [
10 "arn:aws:codebuild:<region-ID>:<account-ID>:project/<shared-project-name-1>",
11 "arn:aws:codebuild:<region-ID>:<account-ID>:project/<shared-project-name-2>"
12 ]
13 }
14
15 For more information, see `Working with shared projects <https://docs.aws.amazon.com/codebuild/latest/userguide/project-sharing.html>`__ in the *AWS CodeBuild User Guide*.
0 **To get a list of the shared report group ARNs in AWS CodeBuild.**
1
2 The following ``list-shared-report-groups`` example retrieves the report group ARNs for the account in the region. ::
3
4 aws codebuild list-shared-report-groups
5
6 Output::
7
8 {
9 "reportGroups": [
10 "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-1",
11 "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-2",
12 "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/report-group-3"
13 ]
14 }
15
16 For more information, see `Working with report groups <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html>`__ in the *AWS CodeBuild User Guide*.
0 **To retry a failed batch build in AWS CodeBuild.**
1
2 The following ``retry-build-batch`` example restarts the specified batch build. ::
3
4 aws codebuild retry-build-batch \
5 --id <project-name>:<batch-ID>
6
7 Output::
8
9 {
10 "buildBatch": {
11 "id": "<project-name>:<batch-ID>",
12 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build-batch/<project-name>:<batch-ID>",
13 "startTime": "2020-10-21T17:26:23.099000+00:00",
14 "currentPhase": "SUBMITTED",
15 "buildBatchStatus": "IN_PROGRESS",
16 "resolvedSourceVersion": "3a9e11cb419e8fff14b03883dc4e64f6155aaa7e",
17 "projectName": "<project-name>",
18 "phases": [
19 {
20 "phaseType": "SUBMITTED",
21 "phaseStatus": "SUCCEEDED",
22 "startTime": "2020-10-21T17:26:23.099000+00:00",
23 "endTime": "2020-10-21T17:26:23.457000+00:00",
24 "durationInSeconds": 0
25 },
26 {
27 "phaseType": "DOWNLOAD_BATCHSPEC",
28 "phaseStatus": "SUCCEEDED",
29 "startTime": "2020-10-21T17:26:23.457000+00:00",
30 "endTime": "2020-10-21T17:26:54.902000+00:00",
31 "durationInSeconds": 31
32 },
33 {
34 "phaseType": "IN_PROGRESS",
35 "phaseStatus": "CLIENT_ERROR",
36 "startTime": "2020-10-21T17:26:54.902000+00:00",
37 "endTime": "2020-10-21T17:28:16.060000+00:00",
38 "durationInSeconds": 81
39 },
40 {
41 "phaseType": "FAILED",
42 "phaseStatus": "RETRY",
43 "startTime": "2020-10-21T17:28:16.060000+00:00",
44 "endTime": "2020-10-21T17:29:39.709000+00:00",
45 "durationInSeconds": 83
46 },
47 {
48 "phaseType": "SUBMITTED",
49 "startTime": "2020-10-21T17:29:39.709000+00:00"
50 }
51 ],
52 "source": {
53 "type": "GITHUB",
54 "location": "https://github.com/strohm-a/<project-name>-graph.git",
55 "gitCloneDepth": 1,
56 "gitSubmodulesConfig": {
57 "fetchSubmodules": false
58 },
59 "reportBuildStatus": false,
60 "insecureSsl": false
61 },
62 "secondarySources": [],
63 "secondarySourceVersions": [],
64 "artifacts": {
65 "location": ""
66 },
67 "secondaryArtifacts": [],
68 "cache": {
69 "type": "NO_CACHE"
70 },
71 "environment": {
72 "type": "LINUX_CONTAINER",
73 "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
74 "computeType": "BUILD_GENERAL1_SMALL",
75 "environmentVariables": [],
76 "privilegedMode": false,
77 "imagePullCredentialsType": "CODEBUILD"
78 },
79 "logConfig": {
80 "cloudWatchLogs": {
81 "status": "ENABLED"
82 },
83 "s3Logs": {
84 "status": "DISABLED",
85 "encryptionDisabled": false
86 }
87 },
88 "buildTimeoutInMinutes": 60,
89 "queuedTimeoutInMinutes": 480,
90 "complete": false,
91 "initiator": "<username>",
92 "encryptionKey": "arn:aws:kms:<region-ID>:<account-ID>:alias/aws/s3",
93 "buildBatchNumber": 4,
94 "buildBatchConfig": {
95 "serviceRole": "arn:aws:iam::<account-ID>:role/service-role/<project-name>",
96 "restrictions": {
97 "maximumBuildsAllowed": 100
98 },
99 "timeoutInMins": 480
100 },
101 "buildGroups": [
102 {
103 "identifier": "DOWNLOAD_SOURCE",
104 "ignoreFailure": false,
105 "currentBuildSummary": {
106 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
107 "requestedOn": "2020-10-21T17:26:23.889000+00:00",
108 "buildStatus": "SUCCEEDED",
109 "primaryArtifact": {
110 "type": "no_artifacts",
111 "identifier": "DOWNLOAD_SOURCE"
112 },
113 "secondaryArtifacts": []
114 }
115 },
116 {
117 "identifier": "linux_small",
118 "dependsOn": [],
119 "ignoreFailure": false,
120 "currentBuildSummary": {
121 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
122 "requestedOn": "2020-10-21T17:26:55.115000+00:00",
123 "buildStatus": "FAILED",
124 "primaryArtifact": {
125 "type": "no_artifacts",
126 "identifier": "linux_small"
127 },
128 "secondaryArtifacts": []
129 }
130 },
131 {
132 "identifier": "linux_medium",
133 "dependsOn": [
134 "linux_small"
135 ],
136 "ignoreFailure": false,
137 "currentBuildSummary": {
138 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
139 "requestedOn": "2020-10-21T17:26:54.594000+00:00",
140 "buildStatus": "STOPPED"
141 }
142 },
143 {
144 "identifier": "linux_large",
145 "dependsOn": [
146 "linux_medium"
147 ],
148 "ignoreFailure": false,
149 "currentBuildSummary": {
150 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
151 "requestedOn": "2020-10-21T17:26:54.701000+00:00",
152 "buildStatus": "STOPPED"
153 }
154 }
155 ]
156 }
157 }
158
159 For more information, see `Batch builds in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html>`__ in the *AWS CodeBuild User Guide*.
160
0 **To retry a failed build in AWS CodeBuild.**
1
2 The following ``retry-build`` example restarts the specified build. ::
3
4 aws codebuild retry-build \
5 --id <project-name>:<build-ID>
6
7 Output::
8
9 {
10 "build": {
11 "id": "<project-name>:<build-ID>",
12 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
13 "buildNumber": 9,
14 "startTime": "2020-10-21T17:51:38.161000+00:00",
15 "currentPhase": "QUEUED",
16 "buildStatus": "IN_PROGRESS",
17 "projectName": "<project-name>",
18 "phases": [
19 {
20 "phaseType": "SUBMITTED",
21 "phaseStatus": "SUCCEEDED",
22 "startTime": "2020-10-21T17:51:38.161000+00:00",
23 "endTime": "2020-10-21T17:51:38.210000+00:00",
24 "durationInSeconds": 0
25 },
26 {
27 "phaseType": "QUEUED",
28 "startTime": "2020-10-21T17:51:38.210000+00:00"
29 }
30 ],
31 "source": {
32 "type": "GITHUB",
33 "location": "<GitHub-repo-URL>",
34 "gitCloneDepth": 1,
35 "gitSubmodulesConfig": {
36 "fetchSubmodules": false
37 },
38 "reportBuildStatus": false,
39 "insecureSsl": false
40 },
41 "secondarySources": [],
42 "secondarySourceVersions": [],
43 "artifacts": {
44 "location": ""
45 },
46 "secondaryArtifacts": [],
47 "cache": {
48 "type": "NO_CACHE"
49 },
50 "environment": {
51 "type": "LINUX_CONTAINER",
52 "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
53 "computeType": "BUILD_GENERAL1_SMALL",
54 "environmentVariables": [],
55 "privilegedMode": false,
56 "imagePullCredentialsType": "CODEBUILD"
57 },
58 "serviceRole": "arn:aws:iam::<account-ID>:role/service-role/<service-role-name>",
59 "logs": {
60 "deepLink": "https://console.aws.amazon.com/cloudwatch/home?region=<region-ID>#logEvent:group=null;stream=null",
61 "cloudWatchLogsArn": "arn:aws:logs:<region-ID>:<account-ID>:log-group:null:log-stream:null",
62 "cloudWatchLogs": {
63 "status": "ENABLED"
64 },
65 "s3Logs": {
66 "status": "DISABLED",
67 "encryptionDisabled": false
68 }
69 },
70 "timeoutInMinutes": 60,
71 "queuedTimeoutInMinutes": 480,
72 "buildComplete": false,
73 "initiator": "<username>",
74 "encryptionKey": "arn:aws:kms:<region-ID>:<account-ID>:alias/aws/s3"
75 }
76 }
77
78 For more information, see `Batch builds in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html>`__ in the *AWS CodeBuild User Guide*.
79
0 **To start a batch build in AWS CodeBuild.**
1
2 The following ``start-build-batch`` example starts a batch build of the specified project. ::
3
4 aws codebuild start-build-batch \
5 --project-name <project-name>
6
7 Output::
8
9 {
10 "buildBatch": {
11 "id": "<project-name>:<batch-ID>",
12 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build-batch/<project-name>:<batch-ID>",
13 "startTime": "2020-10-21T16:54:24.740000+00:00",
14 "currentPhase": "SUBMITTED",
15 "buildBatchStatus": "IN_PROGRESS",
16 "projectName": "<project-name>",
17 "source": {
18 "type": "GITHUB",
19 "location": "<GitHub-repo-URL>",
20 "gitCloneDepth": 1,
21 "gitSubmodulesConfig": {
22 "fetchSubmodules": false
23 },
24 "reportBuildStatus": false,
25 "insecureSsl": false
26 },
27 "secondarySources": [],
28 "secondarySourceVersions": [],
29 "artifacts": {
30 "location": ""
31 },
32 "secondaryArtifacts": [],
33 "cache": {
34 "type": "NO_CACHE"
35 },
36 "environment": {
37 "type": "LINUX_CONTAINER",
38 "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
39 "computeType": "BUILD_GENERAL1_SMALL",
40 "environmentVariables": [],
41 "privilegedMode": false,
42 "imagePullCredentialsType": "CODEBUILD"
43 },
44 "logConfig": {
45 "cloudWatchLogs": {
46 "status": "ENABLED"
47 },
48 "s3Logs": {
49 "status": "DISABLED",
50 "encryptionDisabled": false
51 }
52 },
53 "buildTimeoutInMinutes": 60,
54 "queuedTimeoutInMinutes": 480,
55 "complete": false,
56 "initiator": "<username>",
57 "encryptionKey": "arn:aws:kms:<region-ID>:<account-ID>:alias/aws/s3",
58 "buildBatchNumber": 3,
59 "buildBatchConfig": {
60 "serviceRole": "arn:aws:iam::<account-ID>:role/service-role/<service-role-name>",
61 "restrictions": {
62 "maximumBuildsAllowed": 100
63 },
64 "timeoutInMins": 480
65 }
66 }
67 }
68
69 For more information, see `Batch builds in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html>`__ in the *AWS CodeBuild User Guide*.
70
0 **To stop an in-progress batch build in AWS CodeBuild.**
1
2 The following ``stop-build-batch`` example stops the specified batch build. ::
3
4 aws codebuild stop-build-batch \
5 --id <project-name>:<batch-ID>
6
7 Output::
8
9 {
10 "buildBatch": {
11 "id": "<project-name>:<batch-ID>",
12 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build-batch/<project-name>:<batch-ID>",
13 "startTime": "2020-10-21T16:54:24.740000+00:00",
14 "endTime": "2020-10-21T16:56:05.152000+00:00",
15 "currentPhase": "STOPPED",
16 "buildBatchStatus": "STOPPED",
17 "resolvedSourceVersion": "aef7744ed069c51098e15c360f4102cd2cd1ad64",
18 "projectName": "<project-name>",
19 "phases": [
20 {
21 "phaseType": "SUBMITTED",
22 "phaseStatus": "SUCCEEDED",
23 "startTime": "2020-10-21T16:54:24.740000+00:00",
24 "endTime": "2020-10-21T16:54:25.039000+00:00",
25 "durationInSeconds": 0
26 },
27 {
28 "phaseType": "DOWNLOAD_BATCHSPEC",
29 "phaseStatus": "SUCCEEDED",
30 "startTime": "2020-10-21T16:54:25.039000+00:00",
31 "endTime": "2020-10-21T16:54:56.583000+00:00",
32 "durationInSeconds": 31
33 },
34 {
35 "phaseType": "IN_PROGRESS",
36 "phaseStatus": "STOPPED",
37 "startTime": "2020-10-21T16:54:56.583000+00:00",
38 "endTime": "2020-10-21T16:56:05.152000+00:00",
39 "durationInSeconds": 68
40 },
41 {
42 "phaseType": "STOPPED",
43 "startTime": "2020-10-21T16:56:05.152000+00:00"
44 }
45 ],
46 "source": {
47 "type": "GITHUB",
48 "location": "<GitHub-repo-URL>",
49 "gitCloneDepth": 1,
50 "gitSubmodulesConfig": {
51 "fetchSubmodules": false
52 },
53 "reportBuildStatus": false,
54 "insecureSsl": false
55 },
56 "secondarySources": [],
57 "secondarySourceVersions": [],
58 "artifacts": {
59 "location": ""
60 },
61 "secondaryArtifacts": [],
62 "cache": {
63 "type": "NO_CACHE"
64 },
65 "environment": {
66 "type": "LINUX_CONTAINER",
67 "image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
68 "computeType": "BUILD_GENERAL1_SMALL",
69 "environmentVariables": [],
70 "privilegedMode": false,
71 "imagePullCredentialsType": "CODEBUILD"
72 },
73 "logConfig": {
74 "cloudWatchLogs": {
75 "status": "ENABLED"
76 },
77 "s3Logs": {
78 "status": "DISABLED",
79 "encryptionDisabled": false
80 }
81 },
82 "buildTimeoutInMinutes": 60,
83 "queuedTimeoutInMinutes": 480,
84 "complete": true,
85 "initiator": "Strohm",
86 "encryptionKey": "arn:aws:kms:<region-ID>:<account-ID>:alias/aws/s3",
87 "buildBatchNumber": 3,
88 "buildBatchConfig": {
89 "serviceRole": "arn:aws:iam::<account-ID>:role/service-role/<project-name>",
90 "restrictions": {
91 "maximumBuildsAllowed": 100
92 },
93 "timeoutInMins": 480
94 },
95 "buildGroups": [
96 {
97 "identifier": "DOWNLOAD_SOURCE",
98 "ignoreFailure": false,
99 "currentBuildSummary": {
100 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
101 "requestedOn": "2020-10-21T16:54:25.468000+00:00",
102 "buildStatus": "SUCCEEDED",
103 "primaryArtifact": {
104 "type": "no_artifacts",
105 "identifier": "DOWNLOAD_SOURCE"
106 },
107 "secondaryArtifacts": []
108 }
109 },
110 {
111 "identifier": "linux_small",
112 "dependsOn": [],
113 "ignoreFailure": false,
114 "currentBuildSummary": {
115 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
116 "requestedOn": "2020-10-21T16:54:56.833000+00:00",
117 "buildStatus": "IN_PROGRESS"
118 }
119 },
120 {
121 "identifier": "linux_medium",
122 "dependsOn": [
123 "linux_small"
124 ],
125 "ignoreFailure": false,
126 "currentBuildSummary": {
127 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
128 "requestedOn": "2020-10-21T16:54:56.211000+00:00",
129 "buildStatus": "PENDING"
130 }
131 },
132 {
133 "identifier": "linux_large",
134 "dependsOn": [
135 "linux_medium"
136 ],
137 "ignoreFailure": false,
138 "currentBuildSummary": {
139 "arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
140 "requestedOn": "2020-10-21T16:54:56.330000+00:00",
141 "buildStatus": "PENDING"
142 }
143 }
144 ]
145 }
146 }
147
148 For more information, see `Batch builds in AWS CodeBuild <https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html>`__ in the *AWS CodeBuild User Guide*.
149
0 **To update a report group in AWS CodeBuild.**
1
2 The following ``update-report-group`` example changes the export type of the report group to "NO_EXPORT". ::
3
4 aws codebuild update-report-group \
5 --arn arn:aws:codebuild:<region-ID>:<user-ID>:report-group/cli-created-report-group \
6 --export-config="exportConfigType=NO_EXPORT"
7
8 Output::
9
10 {
11 "reportGroup": {
12 "arn": "arn:aws:codebuild:<region-ID>:<user-ID>:report-group/cli-created-report-group",
13 "name": "cli-created-report-group",
14 "type": "TEST",
15 "exportConfig": {
16 "exportConfigType": "NO_EXPORT"
17 },
18 "created": 1602020686.009,
19 "lastModified": 1602021033.454,
20 "tags": []
21 }
22 }
23
24 For more information, see `Working with report groups <https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group.html>`__ in the *AWS CodeBuild User Guide*.
0 **To view emoji reactions to a comment**
1
2 The following ``get-comment-reactions`` example lists all emoji reactions to a comment with the ID of ``abcd1234EXAMPLEb5678efgh``. If the font for your shell supports displaying Emoji Version 1.0, then in the output for ``emoji`` the emoji is displayed. ::
3
4 aws codecommit get-comment-reactions \
5 --comment-id abcd1234EXAMPLEb5678efgh
6
7 Output::
8
9 {
10 "reactionsForComment": {
11 [
12 {
13 "reaction": {
14 "emoji:"??",
15 "shortCode": "thumbsup",
16 "unicode": "U+1F44D"
17 },
18 "users": [
19 "arn:aws:iam::123456789012:user/Li_Juan",
20 "arn:aws:iam::123456789012:user/Mary_Major",
21 "arn:aws:iam::123456789012:user/Jorge_Souza"
22 ]
23 },
24 {
25 "reaction": {
26 "emoji": "??",
27 "shortCode": "thumbsdown",
28 "unicode": "U+1F44E"
29 },
30 "users": [
31 "arn:aws:iam::123456789012:user/Nikhil_Jayashankar"
32 ]
33 },
34 {
35 "reaction": {
36 "emoji": "??",
37 "shortCode": "confused",
38 "unicode": "U+1F615"
39 },
40 "users": [
41 "arn:aws:iam::123456789012:user/Saanvi_Sarkar"
42 ]
43 }
44 ]
45 }
46 }
47
48 For more information, see `Comment on a commit in AWS CodeCommit <https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#how-to-commit-comment-cli-commit-emoji-view>`__ in the *AWS CodeCommit User Guide*.
0 **To reply to a comment on a commit with an emoji**
1
2 The following ``put-comment-reaction`` example replies to a comment with the ID of ``abcd1234EXAMPLEb5678efgh`` with an emoji reaction value of ``:thumbsup:``. ::
3
4 aws codecommit put-comment-reaction \
5 --comment-id abcd1234EXAMPLEb5678efgh \
6 --reaction-value :thumbsup:
7
8 This command produces no output.
9
10 For more information, see `Comment on a commit in AWS CodeCommit <https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-commit-comment.html#how-to-commit-comment-cli-commit-reply-emoji>`__ in the *AWS CodeCommit User Guide*.
0 **To delete a webhook**
1
2 The following ``delete-webhook`` example deletes a webhook for a GitHub version 1 source action. You must use the ``deregister-webhook-with-third-party`` command to deregister the webhook before you delete it. ::
3
4 aws codepipeline delete-webhook \
5 --name my-webhook
6
7 This command produces no output.
8
9 For more information, see `Delete the webhook for your GitHub source <https://docs.aws.amazon.com/codepipeline/latest/userguide/appendix-github-oauth.html#pipelines-webhooks-delete>`__ in the *AWS CodePipeline User Guide*.
0 **To deregister a webhook**
1
2 The following ``deregister-webhook-with-third-party`` example deletes a webhook for a GitHub version 1 source action. You must deregister the webhook before you delete it. ::
3
4 aws codepipeline deregister-webhook-with-third-party \
5 --webhook-name my-webhook
6
7 This command produces no output.
8
9 For more information, see `Delete the webhook for your GitHub source <https://docs.aws.amazon.com/codepipeline/latest/userguide/appendix-github-oauth.html#pipelines-webhooks-delete>`__ in the *AWS CodePipeline User Guide*.
0 **To list action executions**
1
2 The following ``list-action-executions`` example views action execution details for a pipeline, such as action execution ID, input artifacts, output artifacts, execution result, and status. ::
3
4 aws codepipeline list-action-executions \
5 --pipeline-name myPipeline
6
7 Output::
8
9 {
10 "actionExecutionDetails": [
11 {
12 "pipelineExecutionId": "EXAMPLE0-adfc-488e-bf4c-1111111720d3",
13 "actionExecutionId": "EXAMPLE4-2ee8-4853-bd6a-111111158148",
14 "pipelineVersion": 12,
15 "stageName": "Deploy",
16 "actionName": "Deploy",
17 "startTime": 1598572628.6,
18 "lastUpdateTime": 1598572661.255,
19 "status": "Succeeded",
20 "input": {
21 "actionTypeId": {
22 "category": "Deploy",
23 "owner": "AWS",
24 "provider": "CodeDeploy",
25 "version": "1"
26 },
27 "configuration": {
28 "ApplicationName": "my-application",
29 "DeploymentGroupName": "my-deployment-group"
30 },
31 "resolvedConfiguration": {
32 "ApplicationName": "my-application",
33 "DeploymentGroupName": "my-deployment-group"
34 },
35 "region": "us-east-1",
36 "inputArtifacts": [
37 {
38 "name": "SourceArtifact",
39 "s3location": {
40 "bucket": "artifact-bucket",
41 "key": "myPipeline/SourceArti/key"
42 }
43 }
44 ],
45 "namespace": "DeployVariables"
46 },
47 "output": {
48 "outputArtifacts": [],
49 "executionResult": {
50 "externalExecutionId": "d-EXAMPLEE5",
51 "externalExecutionSummary": "Deployment Succeeded",
52 "externalExecutionUrl": "https://myaddress.com"
53 },
54 "outputVariables": {}
55 }
56 },
57 {
58 "pipelineExecutionId": "EXAMPLE0-adfc-488e-bf4c-1111111720d3",
59 "actionExecutionId": "EXAMPLE5-abb4-4192-9031-11111113a7b0",
60 "pipelineVersion": 12,
61 "stageName": "Source",
62 "actionName": "Source",
63 "startTime": 1598572624.387,
64 "lastUpdateTime": 1598572628.16,
65 "status": "Succeeded",
66 "input": {
67 "actionTypeId": {
68 "category": "Source",
69 "owner": "AWS",
70 "provider": "CodeCommit",
71 "version": "1"
72 },
73 "configuration": {
74 "BranchName": "production",
75 "PollForSourceChanges": "false",
76 "RepositoryName": "my-repo"
77 },
78 "resolvedConfiguration": {
79 "BranchName": "production",
80 "PollForSourceChanges": "false",
81 "RepositoryName": "my-repo"
82 },
83 "region": "us-east-1",
84 "inputArtifacts": [],
85 "namespace": "SourceVariables"
86 },
87 "output": {
88 "outputArtifacts": [
89 {
90 "name": "SourceArtifact",
91 "s3location": {
92 "bucket": "my-bucket",
93 "key": "myPipeline/SourceArti/key"
94 }
95 }
96 ],
97 "executionResult": {
98 "externalExecutionId": "1111111ad99dcd35914c00b7fbea13995EXAMPLE",
99 "externalExecutionSummary": "Edited template.yml",
100 "externalExecutionUrl": "https://myaddress.com"
101 },
102 "outputVariables": {
103 "AuthorDate": "2020-05-08T17:45:43Z",
104 "BranchName": "production",
105 "CommitId": "EXAMPLEad99dcd35914c00b7fbea139951111111",
106 "CommitMessage": "Edited template.yml",
107 "CommitterDate": "2020-05-08T17:45:43Z",
108 "RepositoryName": "my-repo"
109 }
110 }
111 },
112 . . . .
113
114 For more information, see `View action executions (CLI) <https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-view-cli.html#pipelines-action-executions-cli>`__ in the *AWS CodePipeline User Guide*.
0 **To list tags**
1
2 The following ``list-tags-for-resource`` example retrieves a list of all tags attached to the specified pipeline resource. ::
3
4 aws codepipeline list-tags-for-resource \
5 --resource-arn arn:aws:codepipeline:us-east-1:123456789012:MyPipeline
6
7 Output::
8
9 {
10 "tags": {
11 "Project": "ProjectA",
12 "IscontainerBased": "true"
13 }
14 }
15
16 For more information, see `View tags for a pipeline (CLI) <https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-tag.html#pipelines-tag-list-cli>`__ in the *AWS CodePipeline User Guide*.
0 **To view a list of webhooks**
1
2 The following ``list-webhooks`` example lists the available webhooks in your AWS account. ::
3
4 aws codepipeline list-webhooks \
5 --endpoint-url "https://codepipeline.eu-central-1.amazonaws.com" \
6 --region "eu-central-1"
7
8 Output::
9
10 {
11 "webhooks": [
12 {
13 "url": "https://webhooks.domain.com/trigger111111111EXAMPLE11111111111111111": {
14 "authenticationConfiguration": {
15 "SecretToken": "Secret"
16 },
17 "name": "my-webhook",
18 "authentication": "GITHUB_HMAC",
19 "targetPipeline": "my-Pipeline",
20 "targetAction": "Source",
21 "filters": [
22 {
23 "jsonPath": "$.ref",
24 "matchEquals": "refs/heads/{Branch}"
25 }
26 ]
27 },
28 "arn": "arn:aws:codepipeline:eu-central-1:ACCOUNT_ID:webhook:my-webhook"
29 }
30 ]
31 }
32
33 For more information, see `List webhooks in your account <https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-webhooks-view.html>`__ in the *AWS CodePipeline User Guide*.
0 **To list webhooks**
1
2 The following ``list-webhooks`` example retrieves a list of all tags attached to the specified pipeline resource. ::
3
4 aws codepipeline list-webhooks \
5 --endpoint-url "https://codepipeline.eu-central-1.amazonaws.com" \
6 --region "eu-central-1"
7
8 Output::
9
10 {
11 "webhooks": [
12 {
13 "url": "https://webhooks.domain.com/trigger111111111EXAMPLE11111111111111111": {
14 "authenticationConfiguration": {
15 "SecretToken": "Secret"
16 },
17 "name": "my-webhook",
18 "authentication": "GITHUB_HMAC",
19 "targetPipeline": "my-Pipeline",
20 "targetAction": "Source",
21 "filters": [
22 {
23 "jsonPath": "$.ref",
24 "matchEquals": "refs/heads/{Branch}"
25 }
26 ]
27 },
28 "arn": "arn:aws:codepipeline:eu-central-1:123456789012:webhook:my-webhook"
29 }
30 ]
31 }
32
33 For more information, see `List webhooks in your account <https://docs.aws.amazon.com/codepipeline/latest/userguide/appendix-github-oauth.html#pipelines-webhooks-view>`__ in the *AWS CodePipeline User Guide*.
0 **To create a webhook**
1
2 The following ``put-webhook`` example creates a webhook for a GitHub version 1 source action. After you create the webhook, you must use the register-webhook-with-third-party command to register it. ::
3
4 aws codepipeline put-webhook \
5 --cli-input-json file://webhook_json.json \
6 --region "eu-central-1"
7
8 Contents of ``webhook_json.json``::
9
10 {
11 "webhook": {
12 "name": "my-webhook",
13 "targetPipeline": "pipeline_name",
14 "targetAction": "source_action_name",
15 "filters": [
16 {
17 "jsonPath": "$.ref",
18 "matchEquals": "refs/heads/{Branch}"
19 }
20 ],
21 "authentication": "GITHUB_HMAC",
22 "authenticationConfiguration": {
23 "SecretToken": "secret"
24 }
25 }
26 }
27
28 Output::
29
30 {
31 "webhook": {
32 "url": "https://webhooks.domain.com/trigger111111111EXAMPLE11111111111111111",
33 "definition": {
34 "authenticationConfiguration": {
35 "SecretToken": "secret"
36 },
37 "name": "my-webhook",
38 "authentication": "GITHUB_HMAC",
39 "targetPipeline": "pipeline_name",
40 "targetAction": "Source",
41 "filters": [
42 {
43 "jsonPath": "$.ref",
44 "matchEquals": "refs/heads/{Branch}"
45 }
46 ]
47 },
48 "arn": "arn:aws:codepipeline:eu-central-1:123456789012:webhook:my-webhook"
49 },
50 "tags": [
51 {
52 "key": "Project",
53 "value": "ProjectA"
54 }
55 ]
56 }
57
58 For more information, see `Create a webhook for a GitHub source <https://docs.aws.amazon.com/codepipeline/latest/userguide/appendix-github-oauth.html#pipelines-webhooks-create>`__ in the *AWS CodePipeline User Guide*.
0 **To retry a failed action**
1
2 The following ``retry-stage-execution`` example retries a stage that has a failed action. ::
3
4 aws codepipeline retry-stage-execution \
5 --pipeline-name MyPipeline \
6 --stage-name Deploy \
7 --pipeline-execution-id b59babff-5f34-EXAMPLE \
8 --retry-mode FAILED_ACTIONS
9
10 Output::
11
12 {
13 "pipelineExecutionId": "b59babff-5f34-EXAMPLE"
14 }
15
16 For more information, see `Retry failed actions (CLI) <https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-retry.html#actions-retry-cli>`__ in the *AWS CodePipeline User Guide*.
0 **To stop a pipeline execution**
1
2 The following ``stop-pipeline-execution`` example defaults to waiting until in-progress actions finish, and then stops the pipeline. You cannot choose to stop and wait if the execution is already in a Stopping state. You can choose to stop and abandon an execution that is already in a Stopping state. ::
3
4 aws codepipeline stop-pipeline-execution \
5 --pipeline-name MyFirstPipeline \
6 --pipeline-execution-id d-EXAMPLE \
7 --reason "Stopping pipeline after the build action is done"
8
9 This command returns no output.
10
11 For more information, see `Stop a pipeline execution (CLI) <https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-stop.html#pipelines-stop-cli>`__ in the *AWS CodePipeline User Guide*.
0 **To tag a resource**
1
2 The following ``tag-resource`` example associates a set of provided tags with a pipeline. Use this command to add or edit tags. ::
3
4 aws codepipeline tag-resource \
5 --resource-arn arn:aws:codepipeline:us-east-1:123456789012:MyPipeline \
6 --tags key=Project,value=ProjectA key=IscontainerBased,value=true
7
8 This command produces no output.
9
10 For more information, see `Add tags to a pipeline (CLI) <https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-tag.html#pipelines-tag-add-cli>`__ in the *AWS CodePipeline User Guide*.
0 **To remove AWS tags from a connections resource**
1
2 The following ``untag-resource`` example removes a tag from the specified resource. ::
3
4 aws codepipeline untag-resource \
5 --resource-arn arn:aws:codepipeline:us-east-1:123456789012:MyPipeline \
6 --tag-keys Project IscontainerBased
7
8 This command produces no output.
9
10 For more information, see `Remove tags from a pipeline (CLI) <https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-tag.html#pipelines-tag-delete-cli>`__ in the *AWS CodePipeline User Guide*.
0 **To create a connection**
1
2 The following ``create-connection`` example shows how to create a connection to a third-party repository. This example creates a connection where the third-party provider is Bitbucket.
3
4 A connection created through the AWS CLI or AWS CloudFormation is in Pending status by default. After you create a connection with the CLI or AWS CloudFormation, use the console to edit the connection to make its status Available. ::
5
6 aws codestar-connections create-connection \
7 --provider-type Bitbucket \
8 --connection-name MyConnection
9
10 Output::
11
12 {
13 "ConnectionArn": "arn:aws:codestar-connections:us-east-1:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f"
14 }
15
16 For more information, see `Create a connection <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create.html>`__ in the *Developer Tools console User Guide*.
0 **To create a host**
1
2 The following ``create-host`` example shows how to create a host to represent the endpoint for the infrastructure where your third-party provider is installed. This example creates a host where the third-party installed provider is GitHub Enterprise Server.
3
4 A host created through the AWS CLI is in Pending status by default. After you create a host with the CLI, use the console or the CLI to set up the host to make its status Available. ::
5
6 aws codestar-connections create-host \
7 --name MyHost \
8 --provider-type GitHubEnterpriseServer \
9 --provider-endpoint "https://my-instance.dev"
10
11 Output::
12
13 {
14 "HostArn": "arn:aws:codestar-connections:us-east-1:123456789012:host/My-Host-28aef605"
15 }
16
17 For more information, see `Create a host (CLI) <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-host-create.html>`__ in the *Developer Tools console User Guide*.
0 **To delete a connection**
1
2 The following ``delete-connection`` example shows how to delete a connection. ::
3
4 aws codestar-connections delete-connection \
5 --connection-arn arn:aws:codestar-connections:us-west-2:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f
6
7 This command produces no output.
8
9 For more information, see `Delete a connection (CLI) <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-delete.html#connections-delete-cli>`__ in the *Developer Tools console User Guide*.
0 **To delete a host**
1
2 The following ``delete-host`` example shows how to delete a host. Before you can delete a host, you must delete all connections associated with the host. ::
3
4 aws codestar-connections delete-host \
5 --host-arn "arn:aws:codestar-connections:us-east-1 :123456789012:host/My-Host-28aef605"
6
7 This command produces no output.
8
9 For more information, see `Delete a host (CLI) <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-host-delete.html#connections-host-delete-cli>`__ in the *Developer Tools console User Guide*.
0 **To get information about a connection**
1
2 The following ``get-connection`` example shows details about a connection. ::
3
4 aws codestar-connections get-connection \
5 --connection-arn arn:aws:codestar-connections:us-east-1:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f
6
7 Output::
8
9 {
10 "Connection": {
11 "ConnectionName": "MyConnection",
12 "ConnectionArn": "arn:aws:codestar-connections:us-east-1:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f",
13 "ProviderType": "Bitbucket",
14 "OwnerAccountId": "123456789012",
15 "ConnectionStatus": "AVAILABLE"
16 }
17 }
18
19 For more information, see `View connection details <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-view-details.html>`__ in the *Developer Tools console User Guide*.
0 **To get information about a host**
1
2 The following ``get-host`` example shows details about a host::
3
4 aws codestar-connections get-host \
5 --host-arn arn:aws:codestar-connections:us-east-1:123456789012:host/MyHost-28aef605
6
7 Output::
8
9 {
10 "Name": "MyHost",
11 "Status": "AVAILABLE",
12 "ProviderType": "GitHubEnterpriseServer",
13 "ProviderEndpoint": "https://test-instance-1.dev/"
14 }
15
16 For more information, see `View host details (CLI) <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-host-view.html#connections-host-view-cli>`__ in the *Developer Tools console User Guide*.
0 **To list connections**
1
2 The following ``list-connections`` example retrieves a list of all connections in your account for the Bitbucket provider type.::
3
4 aws codestar-connections list-connections \
5 --provider-type Bitbucket \
6 --max-results 5 \
7 --next-token: next-token
8
9 Output::
10
11 {
12 "Connections": [
13 {
14 "ConnectionName": "my-connection",
15 "ProviderType": "Bitbucket",
16 "Status": "PENDING",
17 "ARN": "arn:aws:codestar-connections:us-east-1:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f",
18 "OwnerAccountId": "123456789012"
19 },
20 {
21 "ConnectionName": "my-other-connection",
22 "ProviderType": "Bitbucket",
23 "Status": "AVAILABLE",
24 "ARN": "arn:aws:codestar-connections:us-east-1:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f",
25 "OwnerAccountId": "123456789012"
26 },
27 ],
28 "NextToken": "next-token"
29 }
30
31 For more information, see `List connections (CLI) <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-list.html#connections-list-cli>`__ in the *Developer Tools console User Guide*.
0 **To list hosts**
1
2 The following ``list-hosts`` example retrieves a list of all hosts in your account. ::
3
4 aws codestar-connections list-hosts
5
6 Output::
7
8 {
9 "Hosts": [
10 {
11 "Name": "My-Host",
12 "HostArn": "arn:aws:codestar-connections:us-east-1:123456789012:host/My-Host-28aef605",
13 "ProviderType": "GitHubEnterpriseServer",
14 "ProviderEndpoint": "https://my-instance.test.dev",
15 "Status": "AVAILABLE"
16 }
17 ]
18 }
19
20 For more information, see `List hosts (CLI) <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-host-list.html>`__ in the *Developer Tools console User Guide*.
0 **To list tags**
1
2 The following ``list-tags-for-resource`` example retrieves a list of all tags attached to the specified connections resource. ::
3
4 aws codestar-connections list-tags-for-resource \
5 --resource-arn arn:aws:codestar-connections:us-east-1:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f
6
7 Output::
8
9 {
10 "Tags": [
11 {
12 "Key": "Project",
13 "Value": "ProjectA"
14 },
15 {
16 "Key": "ReadOnly",
17 "Value": "true"
18 }
19 ]
20 }
21
22 For more information, see `View tags for a connections resource <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-tag.html#connections-tag-view>`__ in the *Developer Tools console User Guide*.
0 **To tag a resource**
1
2 The following ``tag-resource`` example associates a set of provided tags with a connection. Use this command to add or edit tags. ::
3
4 aws codestar-connections tag-resource \
5 --resource-arn arn:aws:codestar-connections:us-east-1:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f \
6 --tags Key=Project,Value=ProjectA Key=IscontainerBased,Value=true
7
8 This command produces no output.
9
10 For more information, see `Add tags to a connections resource <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-tag.html#connections-tag-add>`__ in the *Developer Tools console User Guide*.
0 **To remove AWS tags from a connections resource**
1
2 The following ``untag-resource`` removes a tag from the specified resource. ::
3
4 aws codestar-connections untag-resource \
5 --resource-arn arn:aws:codestar-connections:us-east-1:123456789012:connection/aEXAMPLE-8aad-4d5d-8878-dfcab0bc441f \
6 --tag-keys Project ReadOnly
7
8 Output::
9
10 {
11 "Tags": []
12 }
13
14 For more information, see `Remove tags from a connections resource <https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-tag.html#connections-tag-delete>`__ in the *Developer Tools console User Guide*.
0 **To update a notification rule**
1
2 The following ``update-notification-rule`` example updates a notification rule named ``MyNotificationRule`` in the AWS account ``123456789012`` using a JSON file named ``update.json``. ::
3
4 aws codestar-notifications update-notification-rule \
5 --cli-input-json file://update.json
6
7
8 Contents of ``update.json``::
9
10 {
11 "Name": "MyUpdatedNotificationRule",
12 "EventTypeIds": [
13 "codecommit-repository-branches-and-tags-created"
14 ],
15 "Resource": "arn:aws:codecommit:us-east-1:123456789012:MyDemoRepo",
16 "Targets": [
17 {
18 "TargetType": "SNS",
19 "TargetAddress": "arn:aws:sns:us-east-1:123456789012:MyNotificationTopic"
20 }
21 ],
22 "Status": "ENABLED",
23 "DetailType": "FULL"
24 }
25
26 Output::
27
28 {
29 "Arn": "arn:aws:codestar-notifications:us-east-1:123456789012:notificationrule/dc82df7a-EXAMPLE"
30 }
31
32 For more information, see `Edit a notification rule <https://docs.aws.amazon.com/dtconsole/latest/userguide/notification-rule-edit.html>`__ in the *AWS Developer Tools Console User Guide*.
00 Configure AWS CLI options. If this command is run with no
11 arguments, you will be prompted for configuration values such as your AWS
2 Access Key Id and you AWS Secret Access Key. You can configure a named
2 Access Key Id and your AWS Secret Access Key. You can configure a named
33 profile using the ``--profile`` argument. If your config file does not exist
44 (the default location is ``~/.aws/config``), the AWS CLI will create it
55 for you. To keep an existing value, hit enter when prompted for the value.
3333
3434 For more information on configuration options, see `Configuring the AWS Command Line Interface`_ in the *AWS CLI User Guide*.
3535
36 .. _`Configuring the AWS Command Line Interface`: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
36 .. _`Configuring the AWS Command Line Interface`: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
0 **To list tags for a resource (application)**
1
2 The following ``list-tags-for-resource`` example lists the tags applied to an application named testApp in CodeDeploy. ::
3
4 aws deploy list-tags-for-resource \
5 --resource-arn arn:aws:codedeploy:us-west-2:111122223333:application:testApp
6
7 Output::
8
9 {
10 "Tags": [
11 {
12 "Key": "Type",
13 "Value": "testType"
14 },
15 {
16 "Key": "Name",
17 "Value": "testName"
18 }
19 ]
20 }
21
22 For more information, see `Tagging instances for deployment groups in CodeDeploy <https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html>`__ in the *AWS CodeDeploy User Guide*.
0 **To tag a resoure (application)**
1
2 The following ``tag-resource`` example adds two tags with keys Name and Type, and values testName and testType to an application named testApp in CodeDeploy.::
3
4 aws deploy tag-resource \
5 --resource-arn arn:aws:codedeploy:us-west-2:111122223333:application:testApp \
6 --tags Key=Name,Value=testName Key=Type,Value=testType
7
8 If successful, this command produces no output.
9
10 For more information, see `Tagging instances for deployment groups in CodeDeploy <https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html>`__ in the *AWS CodeDeploy User Guide*.
0 **To remove tags from a resource (application)**
1
2 The following ``untag-resource`` example removes two tags with keys Name and Type from an application named testApp in CodeDeploy. ::
3
4 aws deploy untag-resource \
5 --resource-arn arn:aws:codedeploy:us-west-2:111122223333:application:testApp \
6 --tag-keys Name Type
7
8 If successful, this command produces no output.
9
10 For more information, see `Tagging instances for deployment groups in CodeDeploy <https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-tagging.html>`__ in the *AWS CodeDeploy User Guide*.
0 **To attach a network interface to an instance**
1
2 This example attaches the specified network interface to the specified instance.
3
4 Command::
5
6 aws ec2 attach-network-interface --network-interface-id eni-e5aa89a3 --instance-id i-1234567890abcdef0 --device-index 1
7
8 Output::
9
10 {
11 "AttachmentId": "eni-attach-66c4350a"
12 }
0 **Example 1: To attach a network interface to an instance**
1
2 The following ``attach-network-interface`` example attaches the specified network interface to the specified instance. ::
3
4 aws ec2 attach-network-interface \
5 --network-interface-id eni-0dc56a8d4640ad10a \
6 --instance-id i-1234567890abcdef0 \
7 --device-index 1
8
9 Output::
10
11 {
12 "AttachmentId": "eni-attach-01a8fc87363f07cf9"
13 }
14
15 For more information, see `Elastic network interfaces <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html>`__ in the *Amazon EC2 User Guide*.
16
17 **Example 2: To attach a network interface to an instance with multiple network cards**
18
19 The following ``attach-network-interface`` example attaches the specified network interface to the specified instance and network card. ::
20
21 aws ec2 attach-network-interface \
22 --network-interface-id eni-07483b1897541ad83 \
23 --instance-id i-01234567890abcdef \
24 --network-card-index 1 \
25 --device-index 1
26
27 Output::
28
29 {
30 "AttachmentId": "eni-attach-0fbd7ee87a88cd06c"
31 }
32
33 For more information, see `Elastic network interfaces <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html>`__ in the *Amazon EC2 User Guide*.
0 **To create an AMI from an Amazon EBS-backed instance**
1
2 This example creates an AMI from the specified instance.
3
4 Command::
5
6 aws ec2 create-image --instance-id i-1234567890abcdef0 --name "My server" --description "An AMI for my server"
7
8 Output::
9
10 {
11 "ImageId": "ami-5731123e"
12 }
13
14 This example creates an AMI and sets the --no-reboot parameter, so that the instance is not rebooted before the image is created.
15
16 Command::
17
18 aws ec2 create-image --instance-id i-0b09a25c58929de26 --name "My server" --no-reboot
19
20 Output::
21
22 {
23 "ImageId": "ami-1a2b3c4d"
24 }
25
26 **To create an AMI using a block device mapping**
27
28 Add the following parameter to your ``create-image`` command to add an Amazon EBS volume with the device name ``/dev/sdh`` and a volume size of 100::
29
30 --block-device-mappings "[{\"DeviceName\": \"/dev/sdh\",\"Ebs\":{\"VolumeSize\":100}}]"
31
32 Add the following parameter to your ``create-image`` command to add ``ephemeral1`` as an instance store volume with the device name ``/dev/sdc``::
33
34 --block-device-mappings "[{\"DeviceName\": \"/dev/sdc\",\"VirtualName\":\"ephemeral1\"}]"
35
36 Add the following parameter to your ``create-image`` command to omit a device included on the instance (for example, ``/dev/sdf``)::
37
38 --block-device-mappings "[{\"DeviceName\": \"/dev/sdf\",\"NoDevice\":\"\"}]"
0 **Example 1: To create an AMI from an Amazon EBS-backed instance**
1
2 The following ``create-image`` example creates an AMI from the specified instance. ::
3
4 aws ec2 create-image \
5 --instance-id i-1234567890abcdef0 \
6 --name "My server" \
7 --description "An AMI for my server"
8
9 Output::
10
11 {
12 "ImageId": "ami-0eab20fe36f83e1a8"
13 }
14
15 For more information about specifying a block device mapping for your AMI, see `Specifying a block device mapping for an AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#create-ami-bdm>`__ in the *Amazon EC2 User Guide*.
16
17 **Example 2: To create an AMI from an Amazon EBS-backed instance without reboot**
18
19 The following ``create-image`` example creates an AMI and sets the --no-reboot parameter, so that the instance is not rebooted before the image is created. ::
20
21 aws ec2 create-image \
22 --instance-id i-0b09a25c58929de26 \
23 --name "My server" \
24 --no-reboot
25
26 Output::
27
28 {
29 "ImageId": "ami-01d7dcccb80665a0f"
30 }
31
32 For more information about specifying a block device mapping for your AMI, see `Specifying a block device mapping for an AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#create-ami-bdm>`__ in the *Amazon EC2 User Guide*.
0 **To create a Spot Instance datafeed**
1
2 This example command creates a Spot Instance data feed for the account.
3
4 Command::
5
6 aws ec2 create-spot-datafeed-subscription --bucket <s3-bucket-name> --prefix spotdata
7
8 Output::
9
10 {
11 "SpotDatafeedSubscription": {
12 "OwnerId": "<account-id>",
13 "Prefix": "spotdata",
14 "Bucket": "<s3-bucket-name>",
15 "State": "Active"
16 }
17 }
18
0 **To create a Spot Instance data feed**
1
2 The following ``create-spot-datafeed-subscription`` example creates a Spot Instance data feed. ::
3
4 aws ec2 create-spot-datafeed-subscription \
5 --bucket my-bucket \
6 --prefix spot-data-feed
7
8 Output::
9
10 {
11 "SpotDatafeedSubscription": {
12 "Bucket": "my-bucket",
13 "OwnerId": "123456789012",
14 "Prefix": "spot-data-feed",
15 "State": "Active"
16 }
17 }
18
19 The data feed is stored in the Amazon S3 bucket that you specified. The file names for this data feed have the following format. ::
20
21 my-bucket.s3.amazonaws.com/spot-data-feed/123456789012.YYYY-MM-DD-HH.n.abcd1234.gz
22
23 For more information, see `Spot Instance data feed <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To create a reference to a prefix list**
1
2 The following ``create-transit-gateway-prefix-list-reference`` example creates a reference to the specified prefix list in the specified transit gateway route table. ::
3
4 aws ec2 create-transit-gateway-prefix-list-reference \
5 --transit-gateway-route-table-id tgw-rtb-0123456789abcd123 \
6 --prefix-list-id pl-11111122222222333 \
7 --transit-gateway-attachment-id tgw-attach-aaaaaabbbbbb11111
8
9 Output::
10
11 {
12 "TransitGatewayPrefixListReference": {
13 "TransitGatewayRouteTableId": "tgw-rtb-0123456789abcd123",
14 "PrefixListId": "pl-11111122222222333",
15 "PrefixListOwnerId": "123456789012",
16 "State": "pending",
17 "Blackhole": false,
18 "TransitGatewayAttachment": {
19 "TransitGatewayAttachmentId": "tgw-attach-aaaaaabbbbbb11111",
20 "ResourceType": "vpc",
21 "ResourceId": "vpc-112233445566aabbc"
22 }
23 }
24 }
25
26 For more information, see `Prefix list references <https://docs.aws.amazon.com/vpc/latest/tgw/tgw-prefix-lists.html>`__ in the *Transit Gateways Guide*.
0 **To create an endpoint service configuration**
0 **Example 1: To create an endpoint service configuration for an interface endpoint**
11
2 This example creates a VPC endpoint service configuration using the load balancer ``nlb-vpce``. This example also specifies that requests to connect to the service through an interface endpoint must be accepted.
2 The following ``create-vpc-endpoint-service-configuration`` example creates a VPC endpoint service configuration using the Network Load Balancer ``nlb-vpce``. This example also specifies that requests to connect to the service through an interface endpoint must be accepted. ::
33
4 Command::
5
6 aws ec2 create-vpc-endpoint-service-configuration --network-load-balancer-arns arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/nlb-vpce/e94221227f1ba532 --acceptance-required
4 aws ec2 create-vpc-endpoint-service-configuration \
5 --network-load-balancer-arns arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/nlb-vpce/e94221227f1ba532 \
6 --acceptance-required
77
88 Output::
99
10 {
11 "ServiceConfiguration": {
12 "ServiceType": [
13 {
14 "ServiceType": "Interface"
15 }
16 ],
17 "NetworkLoadBalancerArns": [
18 "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/nlb-vpce/e94221227f1ba532"
19 ],
20 "ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-03d5ebb7d9579a2b3",
21 "ServiceState": "Available",
22 "ServiceId": "vpce-svc-03d5ebb7d9579a2b3",
23 "AcceptanceRequired": true,
24 "AvailabilityZones": [
25 "us-east-1d"
26 ],
27 "BaseEndpointDnsNames": [
28 "vpce-svc-03d5ebb7d9579a2b3.us-east-1.vpce.amazonaws.com"
29 ]
10 {
11 "ServiceConfiguration": {
12 "ServiceType": [
13 {
14 "ServiceType": "Interface"
15 }
16 ],
17 "NetworkLoadBalancerArns": [
18 "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/nlb-vpce/e94221227f1ba532"
19 ],
20 "ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-03d5ebb7d9579a2b3",
21 "ServiceState": "Available",
22 "ServiceId": "vpce-svc-03d5ebb7d9579a2b3",
23 "AcceptanceRequired": true,
24 "AvailabilityZones": [
25 "us-east-1d"
26 ],
27 "BaseEndpointDnsNames": [
28 "vpce-svc-03d5ebb7d9579a2b3.us-east-1.vpce.amazonaws.com"
29 ]
30 }
3031 }
31 }
32
33 **Example 2: To create an endpoint service configuration for a Gateway Load Balancer endpoint**
34
35 The following ``create-vpc-endpoint-service-configuration`` example creates a VPC endpoint service configuration using the Gateway Load Balancer ``GWLBService``. Requests to connect to the service through a Gateway Load Balancer endpoint are automatically accepted. ::
36
37 aws ec2 create-vpc-endpoint-service-configuration \
38 --gateway-load-balancer-arns arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/gwy/GWLBService/123123123123abcc \
39 --no-acceptance-required
40
41 Output::
42
43 {
44 "ServiceConfiguration": {
45 "ServiceType": [
46 {
47 "ServiceType": "GatewayLoadBalancer"
48 }
49 ],
50 "ServiceId": "vpce-svc-123123a1c43abc123",
51 "ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-123123a1c43abc123",
52 "ServiceState": "Available",
53 "AvailabilityZones": [
54 "us-east-1d"
55 ],
56 "AcceptanceRequired": false,
57 "ManagesVpcEndpoints": false,
58 "GatewayLoadBalancerArns": [
59 "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/gwy/GWLBService/123123123123abcc"
60 ]
61 }
62 }
63
64 For more information, see `VPC endpoint services <https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html>`__ in the *Amazon VPC User Guide*.
0 **To create a gateway endpoint**
0 **Example 1: To create a gateway endpoint**
11
22 The following ``create-vpc-endpoint`` example creates a gateway VPC endpoint between VPC ``vpc-1a2b3c4d`` and Amazon S3 in the ``us-east-1`` region, and associates route table ``rtb-11aa22bb`` with the endpoint. ::
33
44 aws ec2 create-vpc-endpoint \
5 --vpc-id vpc-1EXAMPLE \
5 --vpc-id vpc-1a2b3c4d \
66 --service-name com.amazonaws.us-east-1.s3 \
7 --route-table-ids rtb-1EXAMPLE
7 --route-table-ids rtb-11aa22bb
88
99 Output::
1010
1111 {
1212 "VpcEndpoint": {
1313 "PolicyDocument": "{\"Version\":\"2008-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":\"\*\",\"Action\":\"\*\",\"Resource\":\"\*\"}]}",
14 "VpcId": "vpc-1EXAMPLE",
14 "VpcId": "vpc-1a2b3c4d",
1515 "State": "available",
1616 "ServiceName": "com.amazonaws.us-east-1.s3",
1717 "RouteTableIds": [
18 "rtb-1EXAMPLE"
18 "rtb-11aa22bb"
1919 ],
20 "VpcEndpointId": "vpce-3EXAMPLE",
20 "VpcEndpointId": "vpc-1a2b3c4d",
2121 "CreationTimestamp": "2015-05-15T09:40:50Z"
2222 }
2323 }
2424
25 For more information, see `Creating a Gateway Endpoint <https://docs.aws.amazon.com/vpc/latest/userguide/vpce-gateway.html#create-gateway-endpoint>`__ in the *AWS VPC User Guide*.
25 For more information, see `Creating a gateway endpoint <https://docs.aws.amazon.com/vpc/latest/userguide/vpce-gateway.html#create-gateway-endpoint>`__ in the *Amazon VPC User Guide*.
2626
27 **To create an interface endpoint**
27 **Example 2: To create an interface endpoint**
2828
2929 The following ``create-vpc-endpoint`` example creates an interface VPC endpoint between VPC ``vpc-1a2b3c4d`` and Elastic Load Balancing in the ``us-east-1`` region. The command creates the endpoint in subnet ``subnet-7b16de0c`` and associates it with security group ``sg-1a2b3c4d``. ::
3030
3131 aws ec2 create-vpc-endpoint \
32 --vpc-id vpc-1EXAMPLE \
32 --vpc-id vpc-1a2b3c4d \
3333 --vpc-endpoint-type Interface \
3434 --service-name com.amazonaws.us-east-1.elasticloadbalancing \
35 --subnet-id subnet-7EXAMPLE \
36 --security-group-id sg-1EXAMPLE
35 --subnet-id subnet-7b16de0c \
36 --security-group-id sg-1a2b3c4d
3737
3838 Output::
3939
4040 {
4141 "VpcEndpoint": {
4242 "PolicyDocument": "{\n \"Statement\": [\n {\n \"Action\": \"\*\", \n \"Effect\": \"Allow\", \n \"Principal\": \"\*\", \n \"Resource\": \"\*\"\n }\n ]\n}",
43 "VpcId": "vpc-1EXAMPLE",
43 "VpcId": "vpc-1a2b3c4d",
4444 "NetworkInterfaceIds": [
4545 "eni-bf8aa46b"
4646 ],
4747 "SubnetIds": [
48 "subnet-7EXAMPLE"
48 "subnet-7b16de0c"
4949 ],
5050 "PrivateDnsEnabled": true,
5151 "State": "pending",
5454 "Groups": [
5555 {
5656 "GroupName": "default",
57 "GroupId": "sg-1EXAMPLE"
57 "GroupId": "sg-1a2b3c4d"
5858 }
5959 ],
6060 "VpcEndpointId": "vpce-088d25a4bbEXAMPLE",
7878 }
7979 }
8080
81 For more information, see `Creating an Interface Endpoint <https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#create-interface-endpoint>`__ in the *AWS VPC User Guide*.
81 For more information, see `Creating an interface endpoint <https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#create-interface-endpoint>`__ in the *Amazon VPC User Guide*.
82
83 **Example 3: To create a Gateway Load Balancer endpoint**
84
85 The following ``create-vpc-endpoint`` example creates a Gateway Load Balancer endpoint between VPC ``vpc-111122223333aabbc`` and and a service that is configured using a Gateway Load Balancer. ::
86
87 aws ec2 create-vpc-endpoint \
88 --service-name com.amazonaws.vpce.us-east-1.vpce-svc-123123a1c43abc123 \
89 --vpc-endpoint-type GatewayLoadBalancer \
90 --vpc-id vpc-111122223333aabbc \
91 --subnet-id subnet-0011aabbcc2233445
92
93 Output::
94
95 {
96 "VpcEndpoint": {
97 "VpcEndpointId": "vpce-aabbaabbaabbaabba",
98 "VpcEndpointType": "GatewayLoadBalancer",
99 "VpcId": "vpc-111122223333aabbc",
100 "ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-123123a1c43abc123",
101 "State": "pending",
102 "SubnetIds": [
103 "subnet-0011aabbcc2233445"
104 ],
105 "RequesterManaged": false,
106 "NetworkInterfaceIds": [
107 "eni-01010120203030405"
108 ],
109 "CreationTimestamp": "2020-11-11T08:06:03.522Z",
110 "OwnerId": "123456789012"
111 }
112 }
113
114 For more information, see `Gateway Load Balancer endpoints <https://docs.aws.amazon.com/vpc/latest/userguide/vpce-gateway-load-balancer.html>`__ in the *Amazon VPC User Guide*.
0 **To create a VPN connection with dynamic routing**
0 **Example 1: To create a VPN connection with dynamic routing**
11
2 This example creates a VPN connection between the specified virtual private gateway and the specified customer gateway. The output includes the configuration information that your network administrator needs, in XML format.
2 The following ``create-vpn-connection`` example creates a VPN connection between the specified virtual private gateway and the specified customer gateway, and applies tags to the VPN connection. The output includes the configuration information for your customer gateway device, in XML format. ::
33
4 Command::
5
6 aws ec2 create-vpn-connection --type ipsec.1 --customer-gateway-id cgw-0e11f167 --vpn-gateway-id vgw-9a4cacf3
4 aws ec2 create-vpn-connection \
5 --type ipsec.1 \
6 --customer-gateway-id cgw-001122334455aabbc \
7 --vpn-gateway-id vgw-1a1a1a1a1a1a2b2b2 \
8 --tag-specification 'ResourceType=vpn-connection,Tags=[{Key=Name,Value=BGP-VPN}]'
79
810 Output::
911
10 {
11 "VpnConnection": {
12 "VpnConnectionId": "vpn-1a2b3c4d"
13 "CustomerGatewayConfiguration": "...configuration information...",
14 "State": "available",
15 "VpnGatewayId": "vgw-9a4cacf3",
16 "CustomerGatewayId": "cgw-0e11f167"
17 }
18 }
19
20 **To create a VPN connection with static routing**
12 {
13 "VpnConnection": {
14 "CustomerGatewayConfiguration": "...configuration information...",
15 "CustomerGatewayId": "cgw-001122334455aabbc",
16 "Category": "VPN",
17 "State": "pending",
18 "VpnConnectionId": "vpn-123123123123abcab",
19 "VpnGatewayId": "vgw-1a1a1a1a1a1a2b2b2",
20 "Options": {
21 "EnableAcceleration": false,
22 "StaticRoutesOnly": false,
23 "LocalIpv4NetworkCidr": "0.0.0.0/0",
24 "RemoteIpv4NetworkCidr": "0.0.0.0/0",
25 "TunnelInsideIpVersion": "ipv4",
26 "TunnelOptions": [
27 {},
28 {}
29 ]
30 },
31 "Routes": [],
32 "Tags": [
33 {
34 "Key": "Name",
35 "Value": "BGP-VPN"
36 }
37 ]
38 }
39 }
2140
22 This example creates a VPN connection between the specified virtual private gateway and the specified customer gateway. The options specify static routing. The output includes the configuration information that your network administrator needs, in XML format.
41 For more information, see `How AWS Site-to-Site VPN works <https://docs.aws.amazon.com/vpn/latest/s2svpn/how_it_works.html>`__ in the *AWS Site-to-Site VPN User Guide*.
2342
24 Command::
43 **Example 2: To create a VPN connection with static routing**
2544
26 aws ec2 create-vpn-connection --type ipsec.1 --customer-gateway-id cgw-1a1a1a1a --vpn-gateway-id vgw-9a4cacf3 --options "{\"StaticRoutesOnly\":true}"
45 The following ``create-vpn-connection`` example creates a VPN connection between the specified virtual private gateway and the specified customer gateway. The options specify static routing. The output includes the configuration information for your customer gateway device, in XML format. ::
46
47 aws ec2 create-vpn-connection \
48 --type ipsec.1 \
49 --customer-gateway-id cgw-001122334455aabbc \
50 --vpn-gateway-id vgw-1a1a1a1a1a1a2b2b2 \
51 --options "{\"StaticRoutesOnly\":true}"
2752
2853 Output::
2954
30 {
31 "VpnConnection": {
32 "VpnConnectionId": "vpn-11aa33cc"
33 "CustomerGatewayConfiguration": "...configuration information...",
34 "State": "pending",
35 "VpnGatewayId": "vgw-9a4cacf3",
36 "CustomerGatewayId": "cgw-1a1a1a1a",
37 "Options": {
38 "StaticRoutesOnly": true
39 }
40 }
41 }
55 {
56 "VpnConnection": {
57 "CustomerGatewayConfiguration": "..configuration information...",
58 "CustomerGatewayId": "cgw-001122334455aabbc",
59 "Category": "VPN",
60 "State": "pending",
61 "VpnConnectionId": "vpn-123123123123abcab",
62 "VpnGatewayId": "vgw-1a1a1a1a1a1a2b2b2",
63 "Options": {
64 "EnableAcceleration": false,
65 "StaticRoutesOnly": true,
66 "LocalIpv4NetworkCidr": "0.0.0.0/0",
67 "RemoteIpv4NetworkCidr": "0.0.0.0/0",
68 "TunnelInsideIpVersion": "ipv4",
69 "TunnelOptions": [
70 {},
71 {}
72 ]
73 },
74 "Routes": [],
75 "Tags": []
76 }
77 }
4278
43 **To create a VPN connection and specify your own inside CIDR and pre-shared key**
79 For more information, see `How AWS Site-to-Site VPN works <https://docs.aws.amazon.com/vpn/latest/s2svpn/how_it_works.html>`__ in the *AWS Site-to-Site VPN User Guide*.
4480
45 This example creates a VPN connection and specifies the inside IP address CIDR block and a custom pre-shared key for each tunnel. The specified values are returned in the ``CustomerGatewayConfiguration`` information.
81 **Example 3: To create a VPN connection and specify your own inside CIDR and pre-shared key**
4682
47 Command::
83 The following ``create-vpn-connection`` example creates a VPN connection and specifies the inside IP address CIDR block and a custom pre-shared key for each tunnel. The specified values are returned in the ``CustomerGatewayConfiguration`` information. ::
4884
49 aws ec2 create-vpn-connection --type ipsec.1 --customer-gateway-id cgw-b4de3fdd --vpn-gateway-id vgw-f211f09b --options "{"StaticRoutesOnly":false,"TunnelOptions":[{"TunnelInsideCidr":"169.254.12.0/30","PreSharedKey":"ExamplePreSharedKey1"},{"TunnelInsideCidr":"169.254.13.0/30","PreSharedKey":"ExamplePreSharedKey2"}]}"
85 aws ec2 create-vpn-connection \
86 --type ipsec.1 \
87 --customer-gateway-id cgw-001122334455aabbc \
88 --vpn-gateway-id vgw-1a1a1a1a1a1a2b2b2 \
89 --options TunnelOptions='[{TunnelInsideCidr=169.254.12.0/30,PreSharedKey=ExamplePreSharedKey1},{TunnelInsideCidr=169.254.13.0/30,PreSharedKey=ExamplePreSharedKey2}]'
5090
5191 Output::
5292
53 {
54 "VpnConnection": {
55 "VpnConnectionId": "vpn-40f41529"
56 "CustomerGatewayConfiguration": "...configuration information...",
57 "State": "pending",
58 "VpnGatewayId": "vgw-f211f09b",
59 "CustomerGatewayId": "cgw-b4de3fdd"
60 }
61 }
93 {
94 "VpnConnection": {
95 "CustomerGatewayConfiguration": "..configuration information...",
96 "CustomerGatewayId": "cgw-001122334455aabbc",
97 "Category": "VPN",
98 "State": "pending",
99 "VpnConnectionId": "vpn-123123123123abcab",
100 "VpnGatewayId": "vgw-1a1a1a1a1a1a2b2b2",
101 "Options": {
102 "EnableAcceleration": false,
103 "StaticRoutesOnly": false,
104 "LocalIpv4NetworkCidr": "0.0.0.0/0",
105 "RemoteIpv4NetworkCidr": "0.0.0.0/0",
106 "TunnelInsideIpVersion": "ipv4",
107 "TunnelOptions": [
108 {
109 "OutsideIpAddress": "203.0.113.3",
110 "TunnelInsideCidr": "169.254.12.0/30",
111 "PreSharedKey": "ExamplePreSharedKey1"
112 },
113 {
114 "OutsideIpAddress": "203.0.113.5",
115 "TunnelInsideCidr": "169.254.13.0/30",
116 "PreSharedKey": "ExamplePreSharedKey2"
117 }
118 ]
119 },
120 "Routes": [],
121 "Tags": []
122 }
123 }
124
125 For more information, see `How AWS Site-to-Site VPN works <https://docs.aws.amazon.com/vpn/latest/s2svpn/how_it_works.html>`__ in the *AWS Site-to-Site VPN User Guide*.
126
127 **Example 4: To create a VPN connection that supports IPv6 traffic**
128
129 The following ``create-vpn-connection`` example creates a VPN connection that supports IPv6 traffic between the specified transit gateway and specified customer gateway. The tunnel options for both tunnels specify that AWS must initiate the IKE negotiation. ::
130
131 aws ec2 create-vpn-connection \
132 --type ipsec.1 \
133 --transit-gateway-id tgw-12312312312312312 \
134 --customer-gateway-id cgw-001122334455aabbc \
135 --options TunnelInsideIpVersion=ipv6,TunnelOptions=[{StartupAction=start},{StartupAction=start}]
136
137 Output::
138
139 {
140 "VpnConnection": {
141 "CustomerGatewayConfiguration": "..configuration information...",
142 "CustomerGatewayId": "cgw-001122334455aabbc",
143 "Category": "VPN",
144 "State": "pending",
145 "VpnConnectionId": "vpn-11111111122222222",
146 "TransitGatewayId": "tgw-12312312312312312",
147 "Options": {
148 "EnableAcceleration": false,
149 "StaticRoutesOnly": false,
150 "LocalIpv6NetworkCidr": "::/0",
151 "RemoteIpv6NetworkCidr": "::/0",
152 "TunnelInsideIpVersion": "ipv6",
153 "TunnelOptions": [
154 {
155 "OutsideIpAddress": "203.0.113.3",
156 "StartupAction": "start"
157 },
158 {
159 "OutsideIpAddress": "203.0.113.5",
160 "StartupAction": "start"
161 }
162 ]
163 },
164 "Routes": [],
165 "Tags": []
166 }
167 }
168
169 For more information, see `How AWS Site-to-Site VPN works <https://docs.aws.amazon.com/vpn/latest/s2svpn/how_it_works.html>`__ in the *AWS Site-to-Site VPN User Guide*.
0 **To delete an EC2 Fleet**
1
2 The following ``delete-fleets`` example deletes the specified EC2 Fleet and terminates the associated instances. ::
3
4 aws ec2 delete-fleets \
5 --fleet-ids fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE \
6 --terminate-instances
7
8 Output::
9
10 {
11 "SuccessfulFleetDeletions": [
12 {
13 "CurrentFleetState": "deleted_terminating",
14 "PreviousFleetState": "active",
15 "FleetId": "fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE"
16 }
17 ],
18 "UnsuccessfulFleetDeletions": []
19 }
20
21 For more information, see `Managing an EC2 Fleet <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To delete a prefix list reference**
1
2 The following ``delete-transit-gateway-prefix-list-reference`` example deletes the specified prefix list reference. ::
3
4 aws ec2 delete-transit-gateway-prefix-list-reference \
5 --transit-gateway-route-table-id tgw-rtb-0123456789abcd123 \
6 --prefix-list-id pl-11111122222222333
7
8 Output::
9
10 {
11 "TransitGatewayPrefixListReference": {
12 "TransitGatewayRouteTableId": "tgw-rtb-0123456789abcd123",
13 "PrefixListId": "pl-11111122222222333",
14 "PrefixListOwnerId": "123456789012",
15 "State": "deleting",
16 "Blackhole": false,
17 "TransitGatewayAttachment": {
18 "TransitGatewayAttachmentId": "tgw-attach-aabbccddaabbccaab",
19 "ResourceType": "vpc",
20 "ResourceId": "vpc-112233445566aabbc"
21 }
22 }
23 }
24
25 For more information, see `Prefix list references <https://docs.aws.amazon.com/vpc/latest/tgw/tgw-prefix-lists.html>`__ in the *Transit Gateways Guide*.
0 **Example 1: To remove all tags from event notifications**
1
2 The following ``deregister-instance-event-notification-attributes`` example removes ``IncludeAllTagsOfInstance=true``, which has the effect of setting ``IncludeAllTagsOfInstance`` to ``false``. ::
3
4 aws ec2 deregister-instance-event-notification-attributes \
5 --instance-tag-attribute IncludeAllTagsOfInstance=true
6
7 Output::
8
9 {
10 "InstanceTagAttribute": {
11 "InstanceTagKeys": [],
12 "IncludeAllTagsOfInstance": true
13 }
14 }
15
16 For more information, see `Scheduled events for your instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
17
18 **Example 2: To remove specific tags from event notifications**
19
20 The following ``deregister-instance-event-notification-attributes`` example removes the specified tag from the tags included in event notifications. To describe the remaining tags included in event notifications, use ``describe-instance-event-notification-attributes``. ::
21
22 aws ec2 deregister-instance-event-notification-attributes \
23 --instance-tag-attribute InstanceTagKeys="tag-key2"
24
25 Output::
26
27 {
28 "InstanceTagAttribute": {
29 "InstanceTagKeys": [
30 "tag-key2"
31 ],
32 "IncludeAllTagsOfInstance": false
33 }
34 }
35
36 For more information, see `Scheduled events for your instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
00 **To describe your Client VPN endpoints**
11
2 The following example displays details about all of your Client VPN endpoints. ::
2 The following ``describe-client-vpn-endpoints`` example displays details about all of your Client VPN endpoints. ::
33
44 aws ec2 describe-client-vpn-endpoints
55
99 "ClientVpnEndpoints": [
1010 {
1111 "ClientVpnEndpointId": "cvpn-endpoint-123456789123abcde",
12 "Description": "",
12 "Description": "Endpoint for Admin access",
1313 "Status": {
1414 "Code": "available"
1515 },
16 "CreationTime": "2019-07-08T11:37:27",
16 "CreationTime": "2020-11-13T11:37:27",
1717 "DnsName": "*.cvpn-endpoint-123456789123abcde.prod.clientvpn.ap-south-1.amazonaws.com",
1818 "ClientCidrBlock": "172.31.0.0/16",
1919 "DnsServers": [
2222 "SplitTunnel": false,
2323 "VpnProtocol": "openvpn",
2424 "TransportProtocol": "udp",
25 "VpnPort": 443,
2526 "ServerCertificateArn": "arn:aws:acm:ap-south-1:123456789012:certificate/a1b2c3d4-5678-90ab-cdef-11111EXAMPLE",
2627 "AuthenticationOptions": [
2728 {
3233 }
3334 ],
3435 "ConnectionLogOptions": {
35 "Enabled": false
36 "Enabled": true,
37 "CloudwatchLogGroup": "Client-vpn-connection-logs",
38 "CloudwatchLogStream": "cvpn-endpoint-123456789123abcde-ap-south-1-2020/11/13-FCD8HEMVaCcw"
3639 },
3740 "Tags": [
3841 {
3942 "Key": "Name",
4043 "Value": "Client VPN"
4144 }
42 ]
45 ],
46 "SecurityGroupIds": [
47 "sg-aabbcc11223344567"
48 ],
49 "VpcId": "vpc-a87f92c1",
50 "SelfServicePortalUrl": "https://self-service.clientvpn.amazonaws.com/endpoints/cvpn-endpoint-123456789123abcde",
51 "ClientConnectOptions": {
52 "Enabled": false
53 }
4354 }
4455 ]
4556 }
57
58 For more information, see `Client VPN Endpoints <https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-endpoints.html>`__ in the *AWS Client VPN Administrator Guide*.
0 **To describe EC2 Fleet history**
1
2 The following ``describe-fleet-history`` example returns the history for the specified EC2 Fleet starting at the specified time. The output is for an EC2 Fleet with two running instances. ::
3
4 aws ec2 describe-fleet-history \
5 --fleet-ids fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE \
6 --start-time 2020-09-01T00:00:00Z
7
8 Output::
9
10 {
11 "HistoryRecords": [
12 {
13 "EventInformation": {
14 "EventSubType": "submitted"
15 },
16 "EventType": "fleetRequestChange",
17 "Timestamp": "2020-09-01T18:26:05.000Z"
18 },
19 {
20 "EventInformation": {
21 "EventSubType": "active"
22 },
23 "EventType": "fleetRequestChange",
24 "Timestamp": "2020-09-01T18:26:15.000Z"
25 },
26 {
27 "EventInformation": {
28 "EventDescription": "t2.small, ami-07c8bc5c1ce9598c3, ...",
29 "EventSubType": "progress"
30 },
31 "EventType": "fleetRequestChange",
32 "Timestamp": "2020-09-01T18:26:17.000Z"
33 },
34 {
35 "EventInformation": {
36 "EventDescription": "{\"instanceType\":\"t2.small\", ...}",
37 "EventSubType": "launched",
38 "InstanceId": "i-083a1c446e66085d2"
39 },
40 "EventType": "instanceChange",
41 "Timestamp": "2020-09-01T18:26:17.000Z"
42 },
43 {
44 "EventInformation": {
45 "EventDescription": "{\"instanceType\":\"t2.small\", ...}",
46 "EventSubType": "launched",
47 "InstanceId": "i-090db02406cc3c2d6"
48 },
49 "EventType": "instanceChange",
50 "Timestamp": "2020-09-01T18:26:17.000Z"
51 }
52 ],
53 "LastEvaluatedTime": "2020-09-01T19:10:19.000Z",
54 "FleetId": "fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE",
55 "StartTime": "2020-08-31T23:53:20.000Z"
56 }
57
58 For more information, see `Managing an EC2 Fleet <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To describe the running instances for an EC2 Fleet**
1
2 The following ``describe-fleet-instances`` example describes the running instances for the specified EC2 Fleet. ::
3
4 aws ec2 describe-fleet-instances \
5 --fleet-id 12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE
6
7 Output::
8
9 {
10 "ActiveInstances": [
11 {
12 "InstanceId": "i-090db02406cc3c2d6",
13 "InstanceType": "t2.small",
14 "SpotInstanceRequestId": "sir-a43gtpfk",
15 "InstanceHealth": "healthy"
16 },
17 {
18 "InstanceId": "i-083a1c446e66085d2",
19 "InstanceType": "t2.small",
20 "SpotInstanceRequestId": "sir-iwcit2nj",
21 "InstanceHealth": "healthy"
22 }
23 ],
24 "FleetId": "fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE"
25 }
26
27 For more information, see `Managing an EC2 Fleet <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To describe an EC2 Fleet**
1
2 The following ``describe-fleets`` example describes the specified EC2 Fleet. ::
3
4 aws ec2 describe-fleets \
5 --fleet-ids fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE
6
7 Output::
8
9 {
10 "Fleets": [
11 {
12 "ActivityStatus": "pending_fulfillment",
13 "CreateTime": "2020-09-01T18:26:05.000Z",
14 "FleetId": "fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE",
15 "FleetState": "active",
16 "ExcessCapacityTerminationPolicy": "termination",
17 "FulfilledCapacity": 0.0,
18 "FulfilledOnDemandCapacity": 0.0,
19 "LaunchTemplateConfigs": [
20 {
21 "LaunchTemplateSpecification": {
22 "LaunchTemplateId": "lt-0e632f2855a979cd5",
23 "Version": "1"
24 }
25 }
26 ],
27 "TargetCapacitySpecification": {
28 "TotalTargetCapacity": 2,
29 "OnDemandTargetCapacity": 0,
30 "SpotTargetCapacity": 2,
31 "DefaultTargetCapacityType": "spot"
32 },
33 "TerminateInstancesWithExpiration": false,
34 "Type": "maintain",
35 "ReplaceUnhealthyInstances": false,
36 "SpotOptions": {
37 "AllocationStrategy": "lowestPrice",
38 "InstanceInterruptionBehavior": "terminate",
39 "InstancePoolsToUseCount": 1
40 },
41 "OnDemandOptions": {
42 "AllocationStrategy": "lowestPrice"
43 }
44 }
45 ]
46 }
47
48 For more information, see `Managing an EC2 Fleet <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To describe the tags for scheduled event notifications**
1
2 The following ``describe-instance-event-notification-attributes`` example describes the tags to appear in scheduled event notifications. ::
3
4 aws ec2 describe-instance-event-notification-attributes
5
6 Output::
7
8 {
9 "InstanceTagAttribute": {
10 "InstanceTagKeys": [],
11 "IncludeAllTagsOfInstance": true
12 }
13 }
14
15 For more information, see `Scheduled events for your instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **Example 1: To describe all of your enabled Regions**
1
2 The following ``describe-regions`` example describes all of the Regions that are enabled for your account. ::
3
4 aws ec2 describe-regions
5
6 Output::
7
8 {
9 "Regions": [
10 {
11 "Endpoint": "ec2.eu-north-1.amazonaws.com",
12 "RegionName": "eu-north-1",
13 "OptInStatus": "opt-in-not-required"
14 },
15 {
16 "Endpoint": "ec2.ap-south-1.amazonaws.com",
17 "RegionName": "ap-south-1",
18 "OptInStatus": "opt-in-not-required"
19 },
20 {
21 "Endpoint": "ec2.eu-west-3.amazonaws.com",
22 "RegionName": "eu-west-3",
23 "OptInStatus": "opt-in-not-required"
24 },
25 {
26 "Endpoint": "ec2.eu-west-2.amazonaws.com",
27 "RegionName": "eu-west-2",
28 "OptInStatus": "opt-in-not-required"
29 },
30 {
31 "Endpoint": "ec2.eu-west-1.amazonaws.com",
32 "RegionName": "eu-west-1",
33 "OptInStatus": "opt-in-not-required"
34 },
35 {
36 "Endpoint": "ec2.ap-northeast-3.amazonaws.com",
37 "RegionName": "ap-northeast-3",
38 "OptInStatus": "opt-in-not-required"
39 },
40 {
41 "Endpoint": "ec2.ap-northeast-2.amazonaws.com",
42 "RegionName": "ap-northeast-2",
43 "OptInStatus": "opt-in-not-required"
44 },
45 {
46 "Endpoint": "ec2.ap-northeast-1.amazonaws.com",
47 "RegionName": "ap-northeast-1",
48 "OptInStatus": "opt-in-not-required"
49 },
50 {
51 "Endpoint": "ec2.sa-east-1.amazonaws.com",
52 "RegionName": "sa-east-1",
53 "OptInStatus": "opt-in-not-required"
54 },
55 {
56 "Endpoint": "ec2.ca-central-1.amazonaws.com",
57 "RegionName": "ca-central-1",
58 "OptInStatus": "opt-in-not-required"
59 },
60 {
61 "Endpoint": "ec2.ap-southeast-1.amazonaws.com",
62 "RegionName": "ap-southeast-1",
63 "OptInStatus": "opt-in-not-required"
64 },
65 {
66 "Endpoint": "ec2.ap-southeast-2.amazonaws.com",
67 "RegionName": "ap-southeast-2",
68 "OptInStatus": "opt-in-not-required"
69 },
70 {
71 "Endpoint": "ec2.eu-central-1.amazonaws.com",
72 "RegionName": "eu-central-1",
73 "OptInStatus": "opt-in-not-required"
74 },
75 {
76 "Endpoint": "ec2.us-east-1.amazonaws.com",
77 "RegionName": "us-east-1",
78 "OptInStatus": "opt-in-not-required"
79 },
80 {
81 "Endpoint": "ec2.us-east-2.amazonaws.com",
82 "RegionName": "us-east-2",
83 "OptInStatus": "opt-in-not-required"
84 },
85 {
86 "Endpoint": "ec2.us-west-1.amazonaws.com",
87 "RegionName": "us-west-1",
88 "OptInStatus": "opt-in-not-required"
89 },
90 {
91 "Endpoint": "ec2.us-west-2.amazonaws.com",
92 "RegionName": "us-west-2",
93 "OptInStatus": "opt-in-not-required"
94 }
95 ]
96 }
97
98 **Example 2: To describe enabled Regions with an endpoint whose name contains a specific string**
99
100 The following ``describe-regions`` example describes all Regions that you have enabled that have the string "us" in the endpoint. ::
101
102 aws ec2 describe-regions --filters "Name=endpoint,Values=*us*"
103
104 Output::
105
106 {
107 "Regions": [
108 {
109 "Endpoint": "ec2.us-east-1.amazonaws.com",
110 "RegionName": "us-east-1"
111 },
112 {
113 "Endpoint": "ec2.us-east-2.amazonaws.com",
114 "RegionName": "us-east-2"
115 },
116 {
117 "Endpoint": "ec2.us-west-1.amazonaws.com",
118 "RegionName": "us-west-1"
119 },
120 {
121 "Endpoint": "ec2.us-west-2.amazonaws.com",
122 "RegionName": "us-west-2"
123 },
124 ]
125 }
126
127 **To describe all Regions**
128
129 The following ``describe-regions`` example describes all available Regions, including opt-in Regions like HKG and BAH. For a description of opt-in Regions, see `Available Regions <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions>`__ in the *Amazon EC2 User Guide*. ::
130
131 aws ec2 describe-regions \
132 --all-regions
133
134 Output::
135
136 {
137 "Regions": [
138 {
139 "Endpoint": "ec2.eu-north-1.amazonaws.com",
140 "RegionName": "eu-north-1",
141 "OptInStatus": "opt-in-not-required"
142 },
143 {
144 "Endpoint": "ec2.ap-south-1.amazonaws.com",
145 "RegionName": "ap-south-1",
146 "OptInStatus": "opt-in-not-required"
147 },
148 {
149 "Endpoint": "ec2.eu-west-3.amazonaws.com",
150 "RegionName": "eu-west-3",
151 "OptInStatus": "opt-in-not-required"
152 },
153 {
154 "Endpoint": "ec2.eu-west-2.amazonaws.com",
155 "RegionName": "eu-west-2",
156 "OptInStatus": "opt-in-not-required"
157 },
158 {
159 "Endpoint": "ec2.eu-west-1.amazonaws.com",
160 "RegionName": "eu-west-1",
161 "OptInStatus": "opt-in-not-required"
162 },
163 {
164 "Endpoint": "ec2.ap-northeast-3.amazonaws.com",
165 "RegionName": "ap-northeast-3",
166 "OptInStatus": "opt-in-not-required"
167 },
168 {
169 "Endpoint": "ec2.me-south-1.amazonaws.com",
170 "RegionName": "me-south-1",
171 "OptInStatus": "not-opted-in"
172 },
173 {
174 "Endpoint": "ec2.ap-northeast-2.amazonaws.com",
175 "RegionName": "ap-northeast-2",
176 "OptInStatus": "opt-in-not-required"
177 },
178 {
179 "Endpoint": "ec2.ap-northeast-1.amazonaws.com",
180 "RegionName": "ap-northeast-1",
181 "OptInStatus": "opt-in-not-required"
182 },
183 {
184 "Endpoint": "ec2.sa-east-1.amazonaws.com",
185 "RegionName": "sa-east-1",
186 "OptInStatus": "opt-in-not-required"
187 },
188 {
189 "Endpoint": "ec2.ca-central-1.amazonaws.com",
190 "RegionName": "ca-central-1",
191 "OptInStatus": "opt-in-not-required"
192 },
193 {
194 "Endpoint": "ec2.ap-east-1.amazonaws.com",
195 "RegionName": "ap-east-1",
196 "OptInStatus": "not-opted-in"
197 },
198 {
199 "Endpoint": "ec2.ap-southeast-1.amazonaws.com",
200 "RegionName": "ap-southeast-1",
201 "OptInStatus": "opt-in-not-required"
202 },
203 {
204 "Endpoint": "ec2.ap-southeast-2.amazonaws.com",
205 "RegionName": "ap-southeast-2",
206 "OptInStatus": "opt-in-not-required"
207 },
208 {
209 "Endpoint": "ec2.eu-central-1.amazonaws.com",
210 "RegionName": "eu-central-1",
211 "OptInStatus": "opt-in-not-required"
212 },
213 {
214 "Endpoint": "ec2.us-east-1.amazonaws.com",
215 "RegionName": "us-east-1",
216 "OptInStatus": "opt-in-not-required"
217 },
218 {
219 "Endpoint": "ec2.us-east-2.amazonaws.com",
220 "RegionName": "us-east-2",
221 "OptInStatus": "opt-in-not-required"
222 },
223 {
224 "Endpoint": "ec2.us-west-1.amazonaws.com",
225 "RegionName": "us-west-1",
226 "OptInStatus": "opt-in-not-required"
227 },
228 {
229 "Endpoint": "ec2.us-west-2.amazonaws.com",
230 "RegionName": "us-west-2",
231 "OptInStatus": "opt-in-not-required"
232 }
233 ]
234 }
235
236 **To list the Region names only**
237
238 The following ``describe-regions`` example uses the ``--query`` parameter to filter the output and return only the names of the Regions as text. ::
239
240 aws ec2 describe-regions \
241 --all-regions \
242 --query "Regions[].{Name:RegionName}" \
243 --output text
244
245 Output::
246
247 eu-north-1
248 ap-south-1
249 eu-west-3
250 eu-west-2
251 eu-west-1
252 ap-northeast-3
253 ap-northeast-2
254 me-south-1
255 ap-northeast-1
256 sa-east-1
257 ca-central-1
258 ap-east-1
259 ap-southeast-1
260 ap-southeast-2
261 eu-central-1
262 us-east-1
263 us-east-2
264 us-west-1
265 us-west-2
0 **Example 1: To describe all of your enabled Regions**
1
2 The following ``describe-regions`` example describes all of the Regions that are enabled for your account. ::
3
4 aws ec2 describe-regions
5
6 Output::
7
8 {
9 "Regions": [
10 {
11 "Endpoint": "ec2.eu-north-1.amazonaws.com",
12 "RegionName": "eu-north-1",
13 "OptInStatus": "opt-in-not-required"
14 },
15 {
16 "Endpoint": "ec2.ap-south-1.amazonaws.com",
17 "RegionName": "ap-south-1",
18 "OptInStatus": "opt-in-not-required"
19 },
20 {
21 "Endpoint": "ec2.eu-west-3.amazonaws.com",
22 "RegionName": "eu-west-3",
23 "OptInStatus": "opt-in-not-required"
24 },
25 {
26 "Endpoint": "ec2.eu-west-2.amazonaws.com",
27 "RegionName": "eu-west-2",
28 "OptInStatus": "opt-in-not-required"
29 },
30 {
31 "Endpoint": "ec2.eu-west-1.amazonaws.com",
32 "RegionName": "eu-west-1",
33 "OptInStatus": "opt-in-not-required"
34 },
35 {
36 "Endpoint": "ec2.ap-northeast-3.amazonaws.com",
37 "RegionName": "ap-northeast-3",
38 "OptInStatus": "opt-in-not-required"
39 },
40 {
41 "Endpoint": "ec2.ap-northeast-2.amazonaws.com",
42 "RegionName": "ap-northeast-2",
43 "OptInStatus": "opt-in-not-required"
44 },
45 {
46 "Endpoint": "ec2.ap-northeast-1.amazonaws.com",
47 "RegionName": "ap-northeast-1",
48 "OptInStatus": "opt-in-not-required"
49 },
50 {
51 "Endpoint": "ec2.sa-east-1.amazonaws.com",
52 "RegionName": "sa-east-1",
53 "OptInStatus": "opt-in-not-required"
54 },
55 {
56 "Endpoint": "ec2.ca-central-1.amazonaws.com",
57 "RegionName": "ca-central-1",
58 "OptInStatus": "opt-in-not-required"
59 },
60 {
61 "Endpoint": "ec2.ap-southeast-1.amazonaws.com",
62 "RegionName": "ap-southeast-1",
63 "OptInStatus": "opt-in-not-required"
64 },
65 {
66 "Endpoint": "ec2.ap-southeast-2.amazonaws.com",
67 "RegionName": "ap-southeast-2",
68 "OptInStatus": "opt-in-not-required"
69 },
70 {
71 "Endpoint": "ec2.eu-central-1.amazonaws.com",
72 "RegionName": "eu-central-1",
73 "OptInStatus": "opt-in-not-required"
74 },
75 {
76 "Endpoint": "ec2.us-east-1.amazonaws.com",
77 "RegionName": "us-east-1",
78 "OptInStatus": "opt-in-not-required"
79 },
80 {
81 "Endpoint": "ec2.us-east-2.amazonaws.com",
82 "RegionName": "us-east-2",
83 "OptInStatus": "opt-in-not-required"
84 },
85 {
86 "Endpoint": "ec2.us-west-1.amazonaws.com",
87 "RegionName": "us-west-1",
88 "OptInStatus": "opt-in-not-required"
89 },
90 {
91 "Endpoint": "ec2.us-west-2.amazonaws.com",
92 "RegionName": "us-west-2",
93 "OptInStatus": "opt-in-not-required"
94 }
95 ]
96 }
97
98 For more information, see `Regions and Zones <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`__ in the *Amazon EC2 User Guide*.
99
100 **Example 2: To describe enabled Regions with an endpoint whose name contains a specific string**
101
102 The following ``describe-regions`` example describes all Regions that you have enabled that have the string "us" in the endpoint. ::
103
104 aws ec2 describe-regions \
105 --filters "Name=endpoint,Values=*us*"
106
107 Output::
108
109 {
110 "Regions": [
111 {
112 "Endpoint": "ec2.us-east-1.amazonaws.com",
113 "RegionName": "us-east-1"
114 },
115 {
116 "Endpoint": "ec2.us-east-2.amazonaws.com",
117 "RegionName": "us-east-2"
118 },
119 {
120 "Endpoint": "ec2.us-west-1.amazonaws.com",
121 "RegionName": "us-west-1"
122 },
123 {
124 "Endpoint": "ec2.us-west-2.amazonaws.com",
125 "RegionName": "us-west-2"
126 },
127 ]
128 }
129
130 For more information, see `Regions and Zones <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`__ in the *Amazon EC2 User Guide*.
131
132 **Example 3: To describe all Regions**
133
134 The following ``describe-regions`` example describes all available Regions, including Regions that are disabled. ::
135
136 aws ec2 describe-regions \
137 --all-regions
138
139 Output::
140
141 {
142 "Regions": [
143 {
144 "Endpoint": "ec2.eu-north-1.amazonaws.com",
145 "RegionName": "eu-north-1",
146 "OptInStatus": "opt-in-not-required"
147 },
148 {
149 "Endpoint": "ec2.ap-south-1.amazonaws.com",
150 "RegionName": "ap-south-1",
151 "OptInStatus": "opt-in-not-required"
152 },
153 {
154 "Endpoint": "ec2.eu-west-3.amazonaws.com",
155 "RegionName": "eu-west-3",
156 "OptInStatus": "opt-in-not-required"
157 },
158 {
159 "Endpoint": "ec2.eu-west-2.amazonaws.com",
160 "RegionName": "eu-west-2",
161 "OptInStatus": "opt-in-not-required"
162 },
163 {
164 "Endpoint": "ec2.eu-west-1.amazonaws.com",
165 "RegionName": "eu-west-1",
166 "OptInStatus": "opt-in-not-required"
167 },
168 {
169 "Endpoint": "ec2.ap-northeast-3.amazonaws.com",
170 "RegionName": "ap-northeast-3",
171 "OptInStatus": "opt-in-not-required"
172 },
173 {
174 "Endpoint": "ec2.me-south-1.amazonaws.com",
175 "RegionName": "me-south-1",
176 "OptInStatus": "not-opted-in"
177 },
178 {
179 "Endpoint": "ec2.ap-northeast-2.amazonaws.com",
180 "RegionName": "ap-northeast-2",
181 "OptInStatus": "opt-in-not-required"
182 },
183 {
184 "Endpoint": "ec2.ap-northeast-1.amazonaws.com",
185 "RegionName": "ap-northeast-1",
186 "OptInStatus": "opt-in-not-required"
187 },
188 {
189 "Endpoint": "ec2.sa-east-1.amazonaws.com",
190 "RegionName": "sa-east-1",
191 "OptInStatus": "opt-in-not-required"
192 },
193 {
194 "Endpoint": "ec2.ca-central-1.amazonaws.com",
195 "RegionName": "ca-central-1",
196 "OptInStatus": "opt-in-not-required"
197 },
198 {
199 "Endpoint": "ec2.ap-east-1.amazonaws.com",
200 "RegionName": "ap-east-1",
201 "OptInStatus": "not-opted-in"
202 },
203 {
204 "Endpoint": "ec2.ap-southeast-1.amazonaws.com",
205 "RegionName": "ap-southeast-1",
206 "OptInStatus": "opt-in-not-required"
207 },
208 {
209 "Endpoint": "ec2.ap-southeast-2.amazonaws.com",
210 "RegionName": "ap-southeast-2",
211 "OptInStatus": "opt-in-not-required"
212 },
213 {
214 "Endpoint": "ec2.eu-central-1.amazonaws.com",
215 "RegionName": "eu-central-1",
216 "OptInStatus": "opt-in-not-required"
217 },
218 {
219 "Endpoint": "ec2.us-east-1.amazonaws.com",
220 "RegionName": "us-east-1",
221 "OptInStatus": "opt-in-not-required"
222 },
223 {
224 "Endpoint": "ec2.us-east-2.amazonaws.com",
225 "RegionName": "us-east-2",
226 "OptInStatus": "opt-in-not-required"
227 },
228 {
229 "Endpoint": "ec2.us-west-1.amazonaws.com",
230 "RegionName": "us-west-1",
231 "OptInStatus": "opt-in-not-required"
232 },
233 {
234 "Endpoint": "ec2.us-west-2.amazonaws.com",
235 "RegionName": "us-west-2",
236 "OptInStatus": "opt-in-not-required"
237 }
238 ]
239 }
240
241 For more information, see `Regions and Zones <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`__ in the *Amazon EC2 User Guide*.
242
243 **Example 4: To list the Region names only**
244
245 The following ``describe-regions`` example uses the ``--query`` parameter to filter the output and return only the names of the Regions as text. ::
246
247 aws ec2 describe-regions \
248 --all-regions \
249 --query "Regions[].{Name:RegionName}" \
250 --output text
251
252 Output::
253
254 eu-north-1
255 ap-south-1
256 eu-west-3
257 eu-west-2
258 eu-west-1
259 ap-northeast-3
260 ap-northeast-2
261 me-south-1
262 ap-northeast-1
263 sa-east-1
264 ca-central-1
265 ap-east-1
266 ap-southeast-1
267 ap-southeast-2
268 eu-central-1
269 us-east-1
270 us-east-2
271 us-west-1
272 us-west-2
273
274 For more information, see `Regions and Zones <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`__ in the *Amazon EC2 User Guide*.
8585
8686 aws ec2 describe-snapshots \
8787 --owner-ids 012345678910 \
88 --query "Snapshots[?(StartTime<=`2020-03-31`)].[SnapshotId]"
88 --query "Snapshots[?(StartTime<='2020-03-31')].[SnapshotId]"
89
90 For additional examples using filters, see `Listing and filtering your resources <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Filtering.html#Filtering_Resources_CLI>`__ in the *Amazon EC2 User Guide*.
00 **To describe endpoint service configurations**
11
2 This example describes your endpoint service configurations.
2 The following ``describe-vpc-endpoint-service-configurations`` example describes your endpoint service configurations. ::
33
4 Command::
5
6 aws ec2 describe-vpc-endpoint-service-configurations
4 aws ec2 describe-vpc-endpoint-service-configurations
75
86 Output::
97
10 {
11 "ServiceConfigurations": [
12 {
13 "ServiceType": [
14 {
15 "ServiceType": "Interface"
16 }
17 ],
18 "NetworkLoadBalancerArns": [
19 "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/NLBforService/8218753950b25648"
20 ],
21 "ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-0e7555fb6441987e1",
22 "ServiceState": "Available",
23 "ServiceId": "vpce-svc-0e7555fb6441987e1",
24 "AcceptanceRequired": true,
25 "AvailabilityZones": [
26 "us-east-1d"
27 ],
28 "BaseEndpointDnsNames": [
29 "vpce-svc-0e7555fb6441987e1.us-east-1.vpce.amazonaws.com"
30 ]
31 }
32 ]
33 }
8 {
9 "ServiceConfigurations": [
10 {
11 "ServiceType": [
12 {
13 "ServiceType": "GatewayLoadBalancer"
14 }
15 ],
16 "ServiceId": "vpce-svc-012d33a1c4321cabc",
17 "ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-012d33a1c4321cabc",
18 "ServiceState": "Available",
19 "AvailabilityZones": [
20 "us-east-1d"
21 ],
22 "AcceptanceRequired": false,
23 "ManagesVpcEndpoints": false,
24 "GatewayLoadBalancerArns": [
25 "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/gwy/GWLBService/123210844e429123"
26 ],
27 "Tags": []
28 },
29 {
30 "ServiceType": [
31 {
32 "ServiceType": "Interface"
33 }
34 ],
35 "ServiceId": "vpce-svc-123cabc125efa123",
36 "ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-123cabc125efa123",
37 "ServiceState": "Available",
38 "AvailabilityZones": [
39 "us-east-1a"
40 ],
41 "AcceptanceRequired": true,
42 "ManagesVpcEndpoints": false,
43 "NetworkLoadBalancerArns": [
44 "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/NLBforService/1238753950b25123"
45 ],
46 "BaseEndpointDnsNames": [
47 "vpce-svc-123cabc125efa123.us-east-1.vpce.amazonaws.com"
48 ],
49 "PrivateDnsName": "example.com",
50 "PrivateDnsNameConfiguration": {
51 "State": "failed",
52 "Type": "TXT",
53 "Value": "vpce:qUAth3FdeABCApUiXabc",
54 "Name": "_1d367jvbg34znqvyefrj"
55 },
56 "Tags": []
57 }
58 ]
59 }
60
61 For more information, see `VPC endpoint services <https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html>`__ in the *Amazon VPC User Guide*.
00 **To describe your VPC endpoints**
11
2 The following ``describe-vpc-endpoints`` example displays details for all of your endpoints. ::
2 The following ``describe-vpc-endpoints`` example displays details for all of your VPC endpoints. ::
33
44 aws ec2 describe-vpc-endpoints
55
6464 }
6565 ],
6666 "OwnerId": "123456789012"
67 },
68 {
69 "VpcEndpointId": "vpce-aabbaabbaabbaabba",
70 "VpcEndpointType": "GatewayLoadBalancer",
71 "VpcId": "vpc-111122223333aabbc",
72 "ServiceName": "com.amazonaws.vpce.us-east-1.vpce-svc-123123a1c43abc123",
73 "State": "available",
74 "SubnetIds": [
75 "subnet-0011aabbcc2233445"
76 ],
77 "RequesterManaged": false,
78 "NetworkInterfaceIds": [
79 "eni-01010120203030405"
80 ],
81 "CreationTimestamp": "2020-11-11T08:06:03.522Z",
82 "Tags": [],
83 "OwnerId": "123456789012"
6784 }
6885 ]
6986 }
7087
71 For more information, see `Modifying a Gateway Endpoint <https://docs.aws.amazon.com/vpc/latest/userguide/vpce-gateway.html#modify-gateway-endpoint>`__ in the *AWS VPC User Guide*.
88 For more information, see `VPC endpoints <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html>`__ in the *Amazon VPC User Guide*.
0 **To describe your VPN connections**
0 **Example 1: To describe your VPN connections**
11
2 This example describes your VPN connections.
2 The following ``describe-vpn-connections`` example describes all of your Site-to-Site VPN connections. ::
33
4 Command::
5
6 aws ec2 describe-vpn-connections
4 aws ec2 describe-vpn-connections
75
86 Output::
97
108 {
11 "VpnConnections": {
12 "VpnConnectionId": "vpn-40f41529",
13 "Tags": [
14 {
15 "Value": "MyBGPVPN",
16 "Key": "Name"
17 }
18 ],
19 "CustomerGatewayConfiguration": "...configuration information...",
20 "Routes": [],
21 "State": "available",
22 "VpnGatewayId": "vgw-9a4cacf3",
23 "CustomerGatewayId": "cgw-0e11f167",
24 "Type": "ipsec.1",
25 "Options": {
26 "StaticRoutesOnly": false
27 },
28 "Category": "VPN",
29 "VgwTelemetry": [
30 {
31 "Status": "DOWN",
32 "AcceptedRouteCount": 0,
33 "OutsideIpAddress": "72.21.209.192",
34 "LastStatusChange": "2013-02-04T20:19:34.000Z",
35 "StatusMessage": "IPSEC IS DOWN"
9 "VpnConnections": [
10 {
11 "CustomerGatewayConfiguration": "...configuration information...",
12 "CustomerGatewayId": "cgw-01234567abcde1234",
13 "Category": "VPN",
14 "State": "available",
15 "Type": "ipsec.1",
16 "VpnConnectionId": "vpn-1122334455aabbccd",
17 "TransitGatewayId": "tgw-00112233445566aab",
18 "Options": {
19 "EnableAcceleration": false,
20 "StaticRoutesOnly": true,
21 "LocalIpv4NetworkCidr": "0.0.0.0/0",
22 "RemoteIpv4NetworkCidr": "0.0.0.0/0",
23 "TunnelInsideIpVersion": "ipv4"
3624 },
37 {
38 "Status": "DOWN",
39 "AcceptedRouteCount": 0,
40 "OutsideIpAddress": "72.21.209.224",
41 "LastStatusChange": "2013-02-04T20:19:34.000Z",
42 "StatusMessage": "IPSEC IS DOWN"
43 }
44 ]
45 }
25 "Routes": [],
26 "Tags": [
27 {
28 "Key": "Name",
29 "Value": "CanadaVPN"
30 }
31 ],
32 "VgwTelemetry": [
33 {
34 "AcceptedRouteCount": 0,
35 "LastStatusChange": "2020-07-29T10:35:11.000Z",
36 "OutsideIpAddress": "203.0.113.3",
37 "Status": "DOWN",
38 "StatusMessage": ""
39 },
40 {
41 "AcceptedRouteCount": 0,
42 "LastStatusChange": "2020-09-02T09:09:33.000Z",
43 "OutsideIpAddress": "203.0.113.5",
44 "Status": "UP",
45 "StatusMessage": ""
46 }
47 ]
48 }
49 ]
4650 }
47
48 **To describe your available VPN connections**
4951
50 This example describes your VPN connections with a state of ``available``.
52 For more information, see `How AWS Site-to-Site VPN works <https://docs.aws.amazon.com/vpn/latest/s2svpn/how_it_works.html>`__ in the *AWS Site-to-Site VPN User Guide*.
5153
52 Command::
54 **Example 2: To describe your available VPN connections**
5355
54 aws ec2 describe-vpn-connections --filters "Name=state,Values=available"
56 The following ``describe-vpn-connections`` example describes your Site-to-Site VPN connections with a state of ``available``. ::
57
58 aws ec2 describe-vpn-connections \
59 --filters "Name=state,Values=available"
60
61 For more information, see `How AWS Site-to-Site VPN works <https://docs.aws.amazon.com/vpn/latest/s2svpn/how_it_works.html>`__ in the *AWS Site-to-Site VPN User Guide*.
0 **To list the resource groups with a Capacity Reservation**
1
2 The following ``get-groups-for-capacity-reservation`` example lists the resource groups to which the specified Capacity Reservation was added. ::
3
4 aws ec2 get-groups-for-capacity-reservation \
5 --capacity-reservation-id cr-1234abcd56EXAMPLE
6
7 Output::
8
9 {
10 "CapacityReservationsGroup": [
11 {
12 "GroupArn": "arn:aws:resource-groups:us-west-2:123456789012:group/my-resource-group",
13 "OwnerId": "123456789012"
14 }
15 ]
16 }
17
18 For more information, see `Working with Capacity Reservations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-using.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To get prefix list references in a transit gateway route table**
1
2 The following ``get-transit-gateway-prefix-list-references`` example gets the prefix list references for the specified transit gateway route table, and filters by the ID of a specific prefix list. ::
3
4 aws ec2 get-transit-gateway-prefix-list-references \
5 --transit-gateway-route-table-id tgw-rtb-0123456789abcd123 \
6 --filters Name=prefix-list-id,Values=pl-11111122222222333
7
8 Output::
9
10 {
11 "TransitGatewayPrefixListReferences": [
12 {
13 "TransitGatewayRouteTableId": "tgw-rtb-0123456789abcd123",
14 "PrefixListId": "pl-11111122222222333",
15 "PrefixListOwnerId": "123456789012",
16 "State": "available",
17 "Blackhole": false,
18 "TransitGatewayAttachment": {
19 "TransitGatewayAttachmentId": "tgw-attach-aabbccddaabbccaab",
20 "ResourceType": "vpc",
21 "ResourceId": "vpc-112233445566aabbc"
22 }
23 }
24 ]
25 }
26
27 For more information, see `Prefix list references <https://docs.aws.amazon.com/vpc/latest/tgw/tgw-prefix-lists.html>`__ in the *Transit Gateways Guide*.
0 **To enable a zone group**
1
2 The following ``modify-availability-zone-group`` example enables the specified zone group. ::
3
4 aws ec2 modify-availability-zone-group \
5 --group-name us-west-2-lax-1 \
6 --opt-in-status opted-in
7
8 Output::
9
10 {
11 "Return": true
12 }
13
14 For more information, see `Regions and Zones <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To scale an EC2 Fleet**
1
2 The following ``modify-fleet`` example modifies the target capacity of the specified EC2 Fleet. If the specified value is greater than the current capacity, the EC2 Fleet launches additional instances. If the specified value is less than the current capacity, the EC2 Fleet cancels any open requests and if the termination policy is ``terminate``, the EC2 fleet terminates any instances that exceed the new target capacity. ::
3
4 aws ec2 modify-fleet \
5 --fleet-ids fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE \
6 --target-capacity-specification TotalTargetCapacity=5
7
8 Output::
9
10 {
11 "Return": true
12 }
13
14 For more information, see `Managing an EC2 Fleet <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **Example 1: To enable IMDSv2**
1
2 The following ``modify-instance-metadata-options`` example configures the use of IMDSv2 on the specified instance. ::
3
4 aws ec2 modify-instance-metadata-options \
5 --instance-id i-1234567898abcdef0 \
6 --http-tokens required \
7 --http-endpoint enabled
8
9 Output::
10
11 {
12 "InstanceId": "i-1234567898abcdef0",
13 "InstanceMetadataOptions": {
14 "State": "pending",
15 "HttpTokens": "required",
16 "HttpPutResponseHopLimit": 1,
17 "HttpEndpoint": "enabled"
18 }
19 }
20
21 For more information, see `Instance metadata and user data <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
22
23 **Example 2: To disable instance metadata**
24
25 The following ``modify-instance-metadata-options`` example disables the use of all versions of instance metadata on the specified instance. ::
26
27 aws ec2 modify-instance-metadata-options \
28 --instance-id i-1234567898abcdef0 \
29 --http-endpoint disabled
30
31 Output::
32
33 {
34 "InstanceId": "i-1234567898abcdef0",
35 "InstanceMetadataOptions": {
36 "State": "pending",
37 "HttpTokens": "required",
38 "HttpPutResponseHopLimit": 1,
39 "HttpEndpoint": "disabled"
40 }
41 }
42
43 For more information, see `Instance metadata and user data <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To modify a reference to a prefix list**
1
2 The following ``modify-transit-gateway-prefix-list-reference`` example modifies the prefix list reference in the specified route table by changing the attachment to which traffic is routed. ::
3
4 aws ec2 modify-transit-gateway-prefix-list-reference \
5 --transit-gateway-route-table-id tgw-rtb-0123456789abcd123 \
6 --prefix-list-id pl-11111122222222333 \
7 --transit-gateway-attachment-id tgw-attach-aabbccddaabbccaab
8
9 Output::
10
11 {
12 "TransitGatewayPrefixListReference": {
13 "TransitGatewayRouteTableId": "tgw-rtb-0123456789abcd123",
14 "PrefixListId": "pl-11111122222222333",
15 "PrefixListOwnerId": "123456789012",
16 "State": "modifying",
17 "Blackhole": false,
18 "TransitGatewayAttachment": {
19 "TransitGatewayAttachmentId": "tgw-attach-aabbccddaabbccaab",
20 "ResourceType": "vpc",
21 "ResourceId": "vpc-112233445566aabbc"
22 }
23 }
24 }
25
26 For more information, see `Prefix list references <https://docs.aws.amazon.com/vpc/latest/tgw/tgw-prefix-lists.html>`__ in the *Transit Gateways Guide*.
0 **To modify a transit gateway**
1
2 The following ``modify-transit-gateway`` example modifies the specified transit gateway by enabling ECMP support for VPN attachments. ::
3
4 aws ec2 modify-transit-gateway \
5 --transit-gateway-id tgw-111111222222aaaaa \
6 --options VpnEcmpSupport=enable
7
8 Output::
9
10 {
11 "TransitGateway": {
12 "TransitGatewayId": "tgw-111111222222aaaaa",
13 "TransitGatewayArn": "64512",
14 "State": "modifying",
15 "OwnerId": "123456789012",
16 "CreationTime": "2020-04-30T08:41:37.000Z",
17 "Options": {
18 "AmazonSideAsn": 64512,
19 "AutoAcceptSharedAttachments": "disable",
20 "DefaultRouteTableAssociation": "enable",
21 "AssociationDefaultRouteTableId": "tgw-rtb-0123456789abcd123",
22 "DefaultRouteTablePropagation": "enable",
23 "PropagationDefaultRouteTableId": "tgw-rtb-0123456789abcd123",
24 "VpnEcmpSupport": "enable",
25 "DnsSupport": "enable"
26 }
27 }
28 }
29
30 For more information, see `Transit gateways <https://docs.aws.amazon.com/vpc/latest/tgw/tgw-transit-gateways.html>`__ in the *Transit Gateways Guide*.
0 **To modify your VPN connection options**
1
2 The following ``modify-vpn-connection-options`` example modifies the local IPv4 CIDR on the customer gateway side of the specified VPN connection. ::
3
4 aws ec2 modify-vpn-connection-options \
5 --vpn-connection-id vpn-1122334455aabbccd \
6 --local-ipv4-network-cidr 10.0.0.0/16
7
8 Output::
9
10 {
11 "VpnConnections": [
12 {
13 "CustomerGatewayConfiguration": "...configuration information...",
14 "CustomerGatewayId": "cgw-01234567abcde1234",
15 "Category": "VPN",
16 "State": "modifying",
17 "Type": "ipsec.1",
18 "VpnConnectionId": "vpn-1122334455aabbccd",
19 "TransitGatewayId": "tgw-00112233445566aab",
20 "Options": {
21 "EnableAcceleration": false,
22 "StaticRoutesOnly": true,
23 "LocalIpv4NetworkCidr": "10.0.0.0/16",
24 "RemoteIpv4NetworkCidr": "0.0.0.0/0",
25 "TunnelInsideIpVersion": "ipv4"
26 },
27 "Routes": [],
28 "Tags": [
29 {
30 "Key": "Name",
31 "Value": "CanadaVPN"
32 }
33 ],
34 "VgwTelemetry": [
35 {
36 "AcceptedRouteCount": 0,
37 "LastStatusChange": "2020-07-29T10:35:11.000Z",
38 "OutsideIpAddress": "203.0.113.3",
39 "Status": "DOWN",
40 "StatusMessage": ""
41 },
42 {
43 "AcceptedRouteCount": 0,
44 "LastStatusChange": "2020-09-02T09:09:33.000Z",
45 "OutsideIpAddress": "203.0.113.5",
46 "Status": "UP",
47 "StatusMessage": ""
48 }
49 ]
50 }
51 ]
52 }
53
54 For more information, see `Modifying Site-to-Site VPN connection options <https://docs.aws.amazon.com/vpn/latest/s2svpn/modify-vpn-connection-options.html>`__ in the *AWS Site-to-Site VPN User Guide*.
0 **Example 1: To include all tags in event notifications**
1
2 The following ``register-instance-event-notification-attributes`` example includes all tags in event notifications. ::
3
4 aws ec2 register-instance-event-notification-attributes \
5 --instance-tag-attribute IncludeAllTagsOfInstance=true
6
7 Output::
8
9 {
10 "InstanceTagAttribute": {
11 "InstanceTagKeys": [],
12 "IncludeAllTagsOfInstance": true
13 }
14 }
15
16 For more information, see `Scheduled events for your instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
17
18 **Example 2: To include specific tags in event notifications**
19
20 The following ``register-instance-event-notification-attributes`` example includes the specified tags in event notifications. You cannot specify tags if ``IncludeAllTagsOfInstance`` is ``true``. ::
21
22 aws ec2 register-instance-event-notification-attributes \
23 --instance-tag-attribute InstanceTagKeys="tag-key1","tag-key2"
24
25 Output::
26
27 {
28 "InstanceTagAttribute": {
29 "InstanceTagKeys": [
30 "tag-key1",
31 "tag-key2"
32 ],
33 "IncludeAllTagsOfInstance": false
34 }
35 }
36
37 For more information, see `Scheduled events for your instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
0 **To remove the rule that allows outbound traffic to a specific address range**
1
2 This example command removes the rule that grants access to the specified address ranges on TCP port 80.
3
4 Command::
5
6 aws ec2 revoke-security-group-egress --group-id sg-1a2b3c4d --ip-permissions '[{"IpProtocol": "tcp", "FromPort": 80, "ToPort": 80, "IpRanges": [{"CidrIp": "10.0.0.0/16"}]}]'
7
8 **To remove the rule that allows outbound traffic to a specific security group**
9
10 This example command removes the rule that grants access to the specified security group on TCP port 80.
11
12 Command::
13
14 aws ec2 revoke-security-group-egress --group-id sg-1a2b3c4d --ip-permissions '[{"IpProtocol": "tcp", "FromPort": 80, "ToPort": 80, "UserIdGroupPairs": [{"GroupId": "sg-4b51a32f"}]}]'
0 **Example 1: To remove the rule that allows outbound traffic to a specific address range**
1
2 The following ``revoke-security-group-ingress`` example command removes the rule that grants access to the specified address ranges on TCP port 80. ::
3
4 aws ec2 revoke-security-group-egress \
5 --group-id sg-026c12253ce15eff7 \
6 --ip-permissions [{IpProtocol=tcp,FromPort=80,ToPort=80,IpRanges=[{CidrIp=10.0.0.0/16}]
7
8 This command produces no output if it succeeds.
9
10 For more information, see `Security groups <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html>`__ in the *Amazon EC2 User Guide*.
11
12 **Example 2: To remove the rule that allows outbound traffic to a specific security group**
13
14 The following ``revoke-security-group-ingress`` example command removes the rule that grants access to the specified security group on TCP port 80. ::
15
16 aws ec2 revoke-security-group-egress \
17 --group-id sg-026c12253ce15eff7 \
18 --ip-permissions [{IpProtocol=tcp,FromPort=80,ToPort=80,UserIdGroupPairs=[{GroupId=sg-06df23a01ff2df86d}]
19
20 This command produces no output if it succeeds.
21
22 For more information, see `Security groups <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html>`__ in the *Amazon EC2 User Guide*.
0 **To remove a rule from a security group**
1
2 This example removes TCP port 22 access for the ``203.0.113.0/24`` address range from the security group named ``MySecurityGroup``. If the command succeeds, no output is returned.
3
4 Command::
5
6 aws ec2 revoke-security-group-ingress --group-name MySecurityGroup --protocol tcp --port 22 --cidr 203.0.113.0/24
7
8 **[EC2-VPC] To remove a rule using the IP permissions set**
9
10 This example uses the ``ip-permissions`` parameter to remove an inbound rule that allows the ICMP message ``Destination Unreachable: Fragmentation Needed and Don't Fragment was Set`` (Type 3, Code 4). If the command succeeds, no output is returned. For more information about quoting JSON-formatted parameters, see `Quoting Strings`_.
11
12 Command::
13
14 aws ec2 revoke-security-group-ingress --group-id sg-123abc12 --ip-permissions '[{"IpProtocol": "icmp", "FromPort": 3, "ToPort": 4, "IpRanges": [{"CidrIp": "0.0.0.0/0"}]}]'
15
16 .. _`Quoting Strings`: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#quoting-strings
0 **Example 1: To remove a rule from a security group**
1
2 The following ``revoke-security-group-ingress`` example removes TCP port 22 access for the ``203.0.113.0/24`` address range from the specified security group for a default VPC. ::
3
4 aws ec2 revoke-security-group-ingress \
5 --group-name mySecurityGroup
6 --protocol tcp \
7 --port 22 \
8 --cidr 203.0.113.0/24
9
10 This command produces no output if it succeeds.
11
12 For more information, see `Security groups <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html>`__ in the *Amazon EC2 User Guide*.
13
14 **Example 2: To remove a rule using the IP permissions set**
15
16 The following ``revoke-security-group-ingress`` example uses the ``ip-permissions`` parameter to remove an inbound rule that allows the ICMP message ``Destination Unreachable: Fragmentation Needed and Don't Fragment was Set`` (Type 3, Code 4). ::
17
18 aws ec2 revoke-security-group-ingress \
19 --group-id sg-026c12253ce15eff7 \
20 --ip-permissions IpProtocol=icmp,FromPort=3,ToPort=4,IpRanges=[{CidrIp=0.0.0.0/0}]
21
22 This command produces no output if it succeeds.
23
24 For more information, see `Security groups <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html>`__ in the *Amazon EC2 User Guide*.
0 **To update an outbound security group rule description**
1
2 This example updates the description for the security group rule that allows outbound access over port 80 to the ``203.0.113.0/24`` IPv4 address range. The description '``Outbound HTTP access to server 2``' replaces any existing description for the rule. If the command succeeds, no output is returned.
3
4 Command::
5
6 aws ec2 update-security-group-rule-descriptions-egress --group-id sg-123abc12 --ip-permissions '[{"IpProtocol": "tcp", "FromPort": 80, "ToPort": 80, "IpRanges": [{"CidrIp": "203.0.113.0/24", "Description": "Outbound HTTP access to server 2"}]}]'
0 **To update the description of an outbound security group rule**
1
2 The following ``update-security-group-rule-descriptions-egress`` example updates the description for the security group rule for the specified port and IPv4 address range. The description '``Outbound HTTP access to server 2``' replaces any existing description for the rule. ::
3
4 aws ec2 update-security-group-rule-descriptions-egress \
5 --group-id sg-02f0d35a850ba727f \
6 --ip-permissions IpProtocol=tcp,FromPort=80,ToPort=80,IpRanges=[{CidrIp=203.0.113.0/24,Description="Outbound HTTP access to server 2"}]
7
8 Output::
9
10 {
11 "Return": true
12 }
13
14 For more information, see `Security group rules <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#security-group-rules>`__ in the *Amazon EC2 User Guide*.
0 **To update an inbound security group rule description**
1
2 This example updates the description for the security group rule that allows inbound access over port 22 from the ``203.0.113.0/16`` IPv4 address range. The description '``SSH access from ABC office``' replaces any existing description for the rule. If the command succeeds, no output is returned.
3
4 Command::
5
6 aws ec2 update-security-group-rule-descriptions-ingress --group-id sg-123abc12 --ip-permissions '[{"IpProtocol": "tcp", "FromPort": 22, "ToPort": 22, "IpRanges": [{"CidrIp": "203.0.113.0/16", "Description": "SSH access from ABC office"}]}]'
0 **Example 1: To update the description of an inbound security group rule with a CIDR source**
1
2 The following ``update-security-group-rule-descriptions-ingress`` example updates the description for the security group rule for the specified port and IPv4 address range. The description '``SSH access from ABC office``' replaces any existing description for the rule. ::
3
4 aws ec2 update-security-group-rule-descriptions-ingress \
5 --group-id sg-02f0d35a850ba727f \
6 --ip-permissions IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges=[{CidrIp=203.0.113.0/16,Description="SSH access from corpnet"}]
7
8 Output::
9
10 {
11 "Return": true
12 }
13
14 For more information, see `Security group rules <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#security-group-rules>`__ in the *Amazon EC2 User Guide*.
15
16 **Example 2: To update the description of an inbound security group rule with a prefix list source**
17
18 The following ``update-security-group-rule-descriptions-ingress`` example updates the description for the security group rule for the specified port and prefix list. The description '``SSH access from ABC office``' replaces any existing description for the rule. ::
19
20 aws ec2 update-security-group-rule-descriptions-ingress \
21 --group-id sg-02f0d35a850ba727f \
22 --ip-permissions IpProtocol=tcp,FromPort=22,ToPort=22,PrefixListIds=[{PrefixListId=pl-12345678,Description="SSH access from corpnet"}]
23
24 Output::
25
26 {
27 "Return": true
28 }
29
30 For more information, see `Security group rules <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html#security-group-rules>`__ in the *Amazon EC2 User Guide*.
00 **To set the repository policy for a repository**
11
2 The following ``set-repository-polixy`` example attaches a repository policy contained in a file to the ``cluster-autoscaler`` repository. ::
2 The following ``set-repository-policy`` example attaches a repository policy contained in a file to the ``cluster-autoscaler`` repository. ::
33
44 aws ecr set-repository-policy \
55 --repository-name cluster-autoscaler \
0 **To log in to an Amazon ECR public registry**
1
2 Retrieves and displays an authentication token using the GetAuthorizationToken API that you can use to authenticate to an Amazon ECR public registry. You can pass the authorization token to the login command of the container client of your preference, such as the Docker CLI. After you have authenticated to an Amazon ECR public registry with this command, you can use the client to push and pull images from that registry as long as your IAM principal has access to do so until the token expires. The authorization token is valid for 12 hours. This command requires the 'ecr-public:GetAuthorizationToken' and 'sts:GetServiceBearerToken' permissions.
0 **To create an encrypted file system**
1
2 The following ``create-file-system`` example creates an encrypted file system using the default CMK. It also adds the tag ``Name=my-file-system``. ::
3
4 aws efs create-file-system \
5 --performance-mode generalPurpose \
6 --throughput-mode bursting \
7 --encrypted \
8 --tags Key=Name,Value=my-file-system
9
10 Output::
11
12 {
13 "OwnerId": "123456789012",
14 "CreationToken": "console-d7f56c5f-e433-41ca-8307-9d9c0example",
15 "FileSystemId": "fs-c7a0456e",
16 "FileSystemArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-48499b4d",
17 "CreationTime": 1595286880.0,
18 "LifeCycleState": "creating",
19 "Name": "my-file-system",
20 "NumberOfMountTargets": 0,
21 "SizeInBytes": {
22 "Value": 0,
23 "ValueInIA": 0,
24 "ValueInStandard": 0
25 },
26 "PerformanceMode": "generalPurpose",
27 "Encrypted": true,
28 "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/a59b3472-e62c-42e4-adcf-30d92example",
29 "ThroughputMode": "bursting",
30 "Tags": [
31 {
32 "Key": "Name",
33 "Value": "my-file-system"
34 }
35 ]
36 }
37
38 For more information, see `Creating Amazon EFS file systems <https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To create a mount target**
1
2 The following ``create-mount-target`` example creates a mount target for the specified file system. ::
3
4 aws efs create-mount-target \
5 --file-system-id fs-c7a0456e \
6 --subnet-id subnet-02bf4c428bexample \
7 --security-groups sg-068f739363example
8
9 Output::
10
11 {
12 "OwnerId": "123456789012",
13 "MountTargetId": "fsmt-f9a14450",
14 "FileSystemId": "fs-c7a0456e",
15 "SubnetId": "subnet-02bf4c428bexample",
16 "LifeCycleState": "creating",
17 "IpAddress": "10.0.1.24",
18 "NetworkInterfaceId": "eni-02d542216aexample",
19 "AvailabilityZoneId": "use2-az2",
20 "AvailabilityZoneName": "us-east-2b",
21 "VpcId": "vpc-0123456789abcdef0"
22 }
23
24 For more information, see `Creating mount targets <https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To delete a file system**
1
2 The following ``delete-file-system`` example deletes the specified file system. ::
3
4 aws efs delete-file-system \
5 --file-system-id fs-c7a0456e
6
7 This command produces no output.
8
9 For more information, see `Deleting an Amazon EFS file system <https://docs.aws.amazon.com/efs/latest/ug/delete-efs-fs.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To delete a mount target**
1
2 The following ``delete-mount-target`` example deletes the specified mount target. ::
3
4 aws efs delete-mount-target \
5 --mount-target-id fsmt-f9a14450
6
7 This command produces no output.
8
9 For more information, see `Creating mount targets <https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To describe a file system**
1
2 The following ``describe-file-systems`` example describes the specified file system. ::
3
4 aws efs describe-file-systems \
5 --file-system-id fs-c7a0456e
6
7 Output::
8
9 {
10 "FileSystems": [
11 {
12 "OwnerId": "123456789012",
13 "CreationToken": "console-d7f56c5f-e433-41ca-8307-9d9c0example",
14 "FileSystemId": "fs-c7a0456e",
15 "FileSystemArn": "arn:aws:elasticfilesystem:us-west-2:123456789012:file-system/fs-48499b4d",
16 "CreationTime": 1595286880.0,
17 "LifeCycleState": "available",
18 "Name": "my-file-system",
19 "NumberOfMountTargets": 3,
20 "SizeInBytes": {
21 "Value": 6144,
22 "Timestamp": 1600991437.0,
23 "ValueInIA": 0,
24 "ValueInStandard": 6144
25 },
26 "PerformanceMode": "generalPurpose",
27 "Encrypted": true,
28 "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/a59b3472-e62c-42e4-adcf-30d92example",
29 "ThroughputMode": "bursting",
30 "Tags": [
31 {
32 "Key": "Name",
33 "Value": "my-file-system"
34 }
35 ]
36 }
37 ]
38 }
39
40 For more information, see `Managing Amazon EFS file systems <https://docs.aws.amazon.com/efs/latest/ug/managing.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To describe a mount target**
1
2 The following ``describe-mount-targets`` example describes the specified mount target. ::
3
4 aws efs describe-mount-targets \
5 --mount-target-id fsmt-f9a14450
6
7 Output::
8
9 {
10 "MountTargets": [
11 {
12 "OwnerId": "123456789012",
13 "MountTargetId": "fsmt-f9a14450",
14 "FileSystemId": "fs-c7a0456e",
15 "SubnetId": "subnet-02bf4c428bexample",
16 "LifeCycleState": "creating",
17 "IpAddress": "10.0.1.24",
18 "NetworkInterfaceId": "eni-02d542216aexample",
19 "AvailabilityZoneId": "use2-az2",
20 "AvailabilityZoneName": "us-east-2b",
21 "VpcId": "vpc-0123456789abcdef0"
22 }
23 ]
24 }
25
26 For more information, see `Creating mount targets <https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To describe the tags for a file system**
1
2 The following ``describe-tags`` example describes the tags for the specified file system. ::
3
4 aws efs describe-tags \
5 --file-system-id fs-c7a0456e
6
7 Output::
8
9 {
10 "Tags": [
11 {
12 "Key": "Name",
13 "Value": "my-file-system"
14 },
15 {
16 "Key": "Department",
17 "Value": "Business Intelligence"
18 }
19 ]
20 }
21
22 For more information, see `Managing file system tags <https://docs.aws.amazon.com/efs/latest/ug/manage-fs-tags.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To retrieve the tags for a resource**
1
2 The following ``list-tags-for-resource`` example retrieves the tags associated with the specified file system. ::
3
4 aws efs list-tags-for-resource \
5 --resource-id fs-c7a0456e
6
7 Output::
8
9 {
10 "Tags": [
11 {
12 "Key": "Name",
13 "Value": "my-file-system"
14 },
15 {
16 "Key": "Department",
17 "Value": "Business Intelligence"
18 }
19 ]
20 }
21
22 For more information, see `Managing file system tags <https://docs.aws.amazon.com/efs/latest/ug/manage-fs-tags.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To tag a resource**
1
2 The following ``tag-resource`` example adds the tag ``Department=Business Intelligence`` to the specified file system. ::
3
4 aws efs tag-resource \
5 --resource-id fs-c7a0456e \
6 --tags Key=Department,Value="Business Intelligence"
7
8 This command produces no output.
9
10 For more information, see `Managing file system tags <https://docs.aws.amazon.com/efs/latest/ug/manage-fs-tags.html>`__ in the *Amazon Elastic File System User Guide*.
0 **To remove a tag from a resource**
1
2 The following ``untag-resource`` example removes the tag with the ``Department`` tag key from the specified file system. ::
3
4 aws efs untag-resource \
5 --resource-id fs-c7a0456e \
6 --tag-keys Department
7
8 This command produces no output.
9
10 For more information, see `Managing file system tags <https://docs.aws.amazon.com/efs/latest/ug/manage-fs-tags.html>`__ in the *Amazon Elastic File System User Guide*.
00 **To create a cache cluster**
11
2 The following ``create-cache-cluster`` example creates a cache cluster using the Redis engine. ::
2 The following ''create-cache-cluster'' example creates a cache cluster using the Redis engine. ::
33
44 aws elasticache create-cache-cluster \
55 -- cache-cluster-id "cluster-test" \
33
44 aws elasticache create-global-replication-group \
55 --global-replication-group-id-suffix my-global-replication-group \
6 --primary-replication-group-id my-primary-cluster
6 --primary-replication-group-id my-primary-cluster
77
88 Output::
99
1010 {
11 "CacheSubnetGroup": {
12 "CacheSubnetGroupName": "my-global-replication-group",
13 "CacheSubnetGroupDescription": "my subnet group",
14 "VpcId": "vpc-xxxxxcdb",
15 "Subnets": [
11 "GlobalReplicationGroup": {
12 "GlobalReplicationGroupId": "sgaui-my-global-replication-group",
13 "GlobalReplicationGroupDescription": " ",
14 "Status": "creating",
15 "CacheNodeType": "cache.r5.large",
16 "Engine": "redis",
17 "EngineVersion": "5.0.6",
18 "Members": [
1619 {
17 "SubnetIdentifier": "subnet-xxxxexxf",
18 "SubnetAvailabilityZone": {
19 "Name": "us-west-2d"
20 }
20 "ReplicationGroupId": "my-primary-cluster",
21 "ReplicationGroupRegion": "us-west-2",
22 "Role": "PRIMARY",
23 "AutomaticFailover": "enabled",
24 "Status": "associating"
2125 }
22 ]
26 ],
27 "ClusterEnabled": true,
28 "GlobalNodeGroups": [
29 {
30 "GlobalNodeGroupId": "sgaui-my-global-replication-group-0001",
31 "Slots": "0-16383"
32 }
33 ],
34 "AuthTokenEnabled": false,
35 "TransitEncryptionEnabled": false,
36 "AtRestEncryptionEnabled": false
2337 }
2438 }
2539
0 **To create a user group**
1
2 The following ``create-user-group`` example creates a new user group. ::
3
4 aws elasticache create-user-group \
5 --user-group-id myusergroup \
6 --engine redis \
7 --user-ids default
8
9 Output::
10
11 {
12 "UserGroupId": "myusergroup",
13 "Status": "creating",
14 "Engine": "redis",
15 "UserIds": [
16 "default"
17 ],
18 "ReplicationGroups": [],
19 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:usergroup:myusergroup"
20 }
21
22 For more information, see `Authenticating Users with Role-Based Access Control (RBAC) <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html>`__ in the *Elasticache User Guide*.
0 **To create a user**
1
2 The following ``create-user`` example creates a new user. ::
3
4 aws elasticache create-user \
5 --user-id user1 \
6 --user-name myUser \
7 --passwords mYnuUzrpAxXw2rdzx \
8 --engine redis \
9 --access-string "on ~app::* -@all +@read"
10
11 Output::
12
13 {
14 "UserId": "user2",
15 "UserName": "myUser",
16 "Status": "active",
17 "Engine": "redis",
18 "AccessString": "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
19 "UserGroupIds": [],
20 "Authentication": {
21 "Type": "password",
22 "PasswordCount": 1
23 },
24 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:user:user2"
25 }
26
27 For more information, see `Authenticating Users with Role-Based Access Control (RBAC) <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html>`__ in the *Elasticache User Guide*.
0 **To delete a user group**
1
2 The following ``delete-user-group`` example deletes a user group. ::
3
4 aws elasticache delete-user-group \
5 --user-id user2
6
7 Output::
8
9 {
10 "UserGroupId": "myusergroup",
11 "Status": "deleting",
12 "Engine": "redis",
13 "UserIds": [
14 "default"
15 ],
16 "ReplicationGroups": [],
17 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:usergroup:myusergroup"
18 }
19
20 For more information, see `Authenticating Users with Role-Based Access Control (RBAC) <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html>`__ in the *Elasticache User Guide*.
0 **To delete a user**
1
2 The following ``delete-user`` example deletes a user. ::
3
4 aws elasticache delete-user \
5 --user-id user2
6
7 Output::
8
9 {
10 "UserId": "user1",
11 "UserName": "myUser",
12 "Status": "deleting",
13 "Engine": "redis",
14 "AccessString": "on ~* +@all",
15 "UserGroupIds": [
16 "myusergroup"
17 ],
18 "Authentication": {
19 "Type": "password",
20 "PasswordCount": 1
21 },
22 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:user:user1"
23 }
24
25 For more information, see `Authenticating Users with Role-Based Access Control (RBAC) <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html>`__ in the *Elasticache User Guide*.
0 **To describe user-groups**
1
2 The following ``describe-user-groups`` example returns a list of user groups. ::
3
4 aws elasticache describe-user-groups
5
6 Output::
7
8 {
9 "UserGroups": [
10 {
11 "UserGroupId": "myusergroup",
12 "Status": "active",
13 "Engine": "redis",
14 "UserIds": [
15 "default"
16 ],
17 "ReplicationGroups": [],
18 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:usergroup:myusergroup"
19 }
20 ]
21 }
22
23 For more information, see `Authenticating Users with Role-Based Access Control (RBAC) <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html>`__ in the *Elasticache User Guide*.
0 **To describe users**
1
2 The following ``describe-users`` example returns a list of users. ::
3
4 aws elasticache describe-users
5
6 Output::
7
8 {
9 "Users": [
10 {
11 "UserId": "default",
12 "UserName": "default",
13 "Status": "active",
14 "Engine": "redis",
15 "AccessString": "on ~* +@all",
16 "UserGroupIds": [
17 "myusergroup"
18 ],
19 "Authentication": {
20 "Type": "no-password"
21 },
22 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:user:default"
23 },
24 {
25 "UserId": "user1",
26 "UserName": "myUser",
27 "Status": "active",
28 "Engine": "redis",
29 "AccessString": "on ~* +@all",
30 "UserGroupIds": [],
31 "Authentication": {
32 "Type": "password",
33 "PasswordCount": 1
34 },
35 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:user:user1"
36 },
37 {
38 "UserId": "user2",
39 "UserName": "myUser",
40 "Status": "active",
41 "Engine": "redis",
42 "AccessString": "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
43 "UserGroupIds": [],
44 "Authentication": {
45 "Type": "password",
46 "PasswordCount": 1
47 },
48 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:user:user2"
49 }
50 ]
51 }
52
53 For more information, see `Authenticating Users with Role-Based Access Control (RBAC) <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html>`__ in the *Elasticache User Guide*.
0 **To modify a user group**
1
2 The following ``modify-user-group`` example adds a user to the user group. ::
3
4 aws elasticache modify-user-group \
5 --user-group-id myusergroup \
6 --user-ids-to-add user1
7
8 Output::
9
10 {
11 "UserGroupId": "myusergroup",
12 "Status": "modifying",
13 "Engine": "redis",
14 "UserIds": [
15 "default"
16 ],
17 "PendingChanges": {
18 "UserIdsToAdd": [
19 "user1"
20 ]
21 },
22 "ReplicationGroups": [],
23 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:usergroup:myusergroup"
24 }
25
26 For more information, see `Authenticating Users with Role-Based Access Control (RBAC) <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html>`__ in the *Elasticache User Guide*.
0 **To modify a user**
1
2 The following ``modify-user`` example modifies a user's access string. ::
3
4 aws elasticache modify-user \
5 --user-id user2 \
6 --append-access-string "on ~* +@all"
7
8 Output::
9
10 {
11 "UserId": "user2",
12 "UserName": "myUser",
13 "Status": "modifying",
14 "Engine": "redis",
15 "AccessString": "on ~* +@all",
16 "UserGroupIds": [],
17 "Authentication": {
18 "Type": "password",
19 "PasswordCount": 1
20 },
21 "ARN": "arn:aws:elasticache:us-west-2:xxxxxxxxxx52:user:user2"
22 }
23
24 For more information, see `Authenticating Users with Role-Based Access Control (RBAC) <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html>`__ in the *Elasticache User Guide*.
201201 "InstanceProfile":"myRole",
202202 "EmrManagedMasterSecurityGroup": "sg-master1",
203203 "EmrManagedSlaveSecurityGroup": "sg-slave1",
204 "ServiceAccessSecurityGroup": "sg-service-access"
204 "ServiceAccessSecurityGroup": "sg-service-access",
205205 "AdditionalMasterSecurityGroups": ["sg-addMaster1","sg-addMaster2","sg-addMaster3","sg-addMaster4"],
206206 "AdditionalSlaveSecurityGroups": ["sg-addSlave1","sg-addSlave2","sg-addSlave3","sg-addSlave4"]
207207 }
547547 --log-uri s3://myBucket/myLog \
548548 --log-encryption-kms-key-id arn:aws:kms:us-east-1:110302272565:key/dd559181-283e-45d7-99d1-66da348c4d33 \
549549 --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m4.large InstanceGroupType=CORE,InstanceCount=2,InstanceType=m4.large
550
551 The following ``create-cluster`` example creates an Amazon EMR cluster that uses the "--placement-group-configs" configuration to place master nodes in a high-availability (HA) cluster within an EC2 placement group using ``SPREAD`` placement strategy.
552
553 Command::
554
555 aws emr create-cluster \
556 --release-label emr-5.30.0 \
557 --service-role EMR_DefaultRole \
558 --ec2-attributes InstanceProfile=EMR_EC2_DefaultRole \
559 --instance-groups InstanceGroupType=MASTER,InstanceCount=3,InstanceType=m4.largeInstanceGroupType=CORE,InstanceCount=1,InstanceType=m4.large \
560 --placement-group-configs InstanceRole=MASTER
2525 [--repo-upgrade-on-boot <value>]
2626 [--kerberos-attributes <value>]
2727 [--managed-scaling-policy <value>]
28 [--placement-group-configs <value>]
0 Updates the trust policy of given IAM role such that it can be used with Amazon EMR on EKS with the given namespace from the given EKS cluster.
1
2 Note:
3 To use the IAM Role with Amazon EMR on EKS, OIDC identity provider also needs to be created for the EKS cluster.
4 This can be done using ``eksctl utils associate-iam-oidc-provider --cluster <cluster_name> --approve`` command.
5 For information about installing or upgrading eksctl, see `Installing or upgrading eksctl <https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html#installing-eksctl>`__ in the *Amazon EKS User Guide*.
6
7 The command would merge the existing trust policy of the role with the below trust policy::
8
9 {
10 "Version": "2012-10-17",
11 "Statement": [
12 {
13 "Effect": "Allow",
14 "Principal": {
15 "Federated": "arn:aws:iam::<AWS_ACCOUNT_ID>:oidc-provider/<OIDC_PROVIDER>"
16 },
17 "Action": "sts:AssumeRoleWithWebIdentity",
18 "Condition": {
19 "StringLike": {
20 "<OIDC_PROVIDER>:sub": "system:serviceaccount:<NAMESPACE>:emr-containers-sa-*-*-<AWS_ACCOUNT_ID>-<BASE36_ENCODED_ROLE_NAME>"
21 }
22 }
23 }
24 ]
25 }
26
27 Here::
28
29 <AWS_ACCOUNT_ID> = AWS Account ID of the EKS cluster
30 <OIDC_PROVIDER> = OIDC Identity Provider for the EKS cluster
31 <NAMESPACE> = Namespace of the EKS cluster
32 <BASE36_ENCODED_ROLE_NAME> = Base36 encoded form of the IAM Role name
33
34 You can use the **--dry-run** option to print the merged trust policy document to stdout instead of updating the role trust policy directly.
0 **To update the trust policy of an IAM Role to be used with Amazon EMR on EKS**
1
2 This example command updates the trust policy of a role named **example_iam_role** such that it can be used with Amazon EMR on EKS with
3 **example_namespace** namespace from an EKS cluster named **example_cluster**.
4
5 * Command::
6
7 aws emr-containers update-role-trust-policy \
8 --cluster example_cluster \
9 --namespace example_namespace \
10 --role-name example_iam_role
11
12 * Output::
13
14 If the trust policy has already been updated, then the output will be:
15 Trust policy statement already exists for role example_iam_role. No
16 changes were made!
17
18 If the trust policy has not been updated yet, then the output will be:
19 Successfully updated trust policy of role example_iam_role.
0 **To stop job runs**
1
2 The following ``batch-stop-job-run`` example stops a job runs. ::
3
4 aws glue batch-stop-job-run \
5 --job-name "my-testing-job" \
6 --job-run-id jr_852f1de1f29fb62e0ba4166c33970803935d87f14f96cfdee5089d5274a61d3f
7
8 Output::
9
10 {
11 "SuccessfulSubmissions": [
12 {
13 "JobName": "my-testing-job",
14 "JobRunId": "jr_852f1de1f29fb62e0ba4166c33970803935d87f14f96cfdee5089d5274a61d3f"
15 }
16 ],
17 "Errors": [],
18 "ResponseMetadata": {
19 "RequestId": "66bd6b90-01db-44ab-95b9-6aeff0e73d88",
20 "HTTPStatusCode": 200,
21 "HTTPHeaders": {
22 "date": "Fri, 16 Oct 2020 20:54:51 GMT",
23 "content-type": "application/x-amz-json-1.1",
24 "content-length": "148",
25 "connection": "keep-alive",
26 "x-amzn-requestid": "66bd6b90-01db-44ab-95b9-6aeff0e73d88"
27 },
28 "RetryAttempts": 0
29 }
30 }
31
32 For more information, see `Job Runs <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html>`__ in the *AWS Glue Developer Guide*.
0 **To create a connection for AWS Glue data stores**
1
2 The following ``create-connection`` example creates a connection in the AWS Glue Data Catalog that provides connection information for a Kafka data store. ::
3
4 aws glue create-connection \
5 --connection-input '{ \
6 "Name":"conn-kafka-custom", \
7 "Description":"kafka connection with ssl to custom kafka", \
8 "ConnectionType":"KAFKA", \
9 "ConnectionProperties":{ \
10 "KAFKA_BOOTSTRAP_SERVERS":"<Kafka-broker-server-url>:<SSL-Port>", \
11 "KAFKA_SSL_ENABLED":"true", \
12 "KAFKA_CUSTOM_CERT": "s3://bucket/prefix/cert-file.pem" \
13 }, \
14 "PhysicalConnectionRequirements":{ \
15 "SubnetId":"subnet-1234", \
16 "SecurityGroupIdList":["sg-1234"], \
17 "AvailabilityZone":"us-east-1a"} \
18 }' \
19 --region us-east-1
20 --endpoint https://glue.us-east-1.amazonaws.com
21
22 This command produces no output.
23
24 For more information, see `Defining Connections in the AWS Glue Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/populate-add-connection.html>`__ in the *AWS Glue Developer Guide*.
0 **To create a database**
1
2 The following ``create-database`` example creates a database in the AWS Glue Data Catalog. ::
3
4 aws glue create-database \
5 --database-input "{\"Name\":\"tempdb\"}" \
6 --profile my_profile \
7 --endpoint https://glue.us-east-1.amazonaws.com
8
9 This command produces no output.
10
11 For more information, see `Defining a Database in Your Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/define-database.html>`__ in the *AWS Glue Developer Guide*.
0 **To create a job to transform data**
1
2 The following ``create-job`` example creates a streaming job that runs a script stored in S3. ::
3
4 aws glue create-job \
5 --name my-testing-job \
6 --role AWSGlueServiceRoleDefault \
7 --command '{ \
8 "Name": "gluestreaming", \
9 "ScriptLocation": "s3://DOC-EXAMPLE-BUCKET/folder/" \
10 }' \
11 --region us-east-1 \
12 --output json \
13 --default-arguments '{ \
14 "--job-language":"scala", \
15 "--class":"GlueApp" \
16 }' \
17 --profile my-profile \
18 --endpoint https://glue.us-east-1.amazonaws.com
19
20 Contents of ``test_script.scala``::
21
22 import com.amazonaws.services.glue.ChoiceOption
23 import com.amazonaws.services.glue.GlueContext
24 import com.amazonaws.services.glue.MappingSpec
25 import com.amazonaws.services.glue.ResolveSpec
26 import com.amazonaws.services.glue.errors.CallSite
27 import com.amazonaws.services.glue.util.GlueArgParser
28 import com.amazonaws.services.glue.util.Job
29 import com.amazonaws.services.glue.util.JsonOptions
30 import org.apache.spark.SparkContext
31 import scala.collection.JavaConverters._
32
33 object GlueApp {
34 def main(sysArgs: Array[String]) {
35 val spark: SparkContext = new SparkContext()
36 val glueContext: GlueContext = new GlueContext(spark)
37 // @params: [JOB_NAME]
38 val args = GlueArgParser.getResolvedOptions(sysArgs, Seq("JOB_NAME").toArray)
39 Job.init(args("JOB_NAME"), glueContext, args.asJava)
40 // @type: DataSource
41 // @args: [database = "tempdb", table_name = "s3-source", transformation_ctx = "datasource0"]
42 // @return: datasource0
43 // @inputs: []
44 val datasource0 = glueContext.getCatalogSource(database = "tempdb", tableName = "s3-source", redshiftTmpDir = "", transformationContext = "datasource0").getDynamicFrame()
45 // @type: ApplyMapping
46 // @args: [mapping = [("sensorid", "int", "sensorid", "int"), ("currenttemperature", "int", "currenttemperature", "int"), ("status", "string", "status", "string")], transformation_ctx = "applymapping1"]
47 // @return: applymapping1
48 // @inputs: [frame = datasource0]
49 val applymapping1 = datasource0.applyMapping(mappings = Seq(("sensorid", "int", "sensorid", "int"), ("currenttemperature", "int", "currenttemperature", "int"), ("status", "string", "status", "string")), caseSensitive = false, transformationContext = "applymapping1")
50 // @type: SelectFields
51 // @args: [paths = ["sensorid", "currenttemperature", "status"], transformation_ctx = "selectfields2"]
52 // @return: selectfields2
53 // @inputs: [frame = applymapping1]
54 val selectfields2 = applymapping1.selectFields(paths = Seq("sensorid", "currenttemperature", "status"), transformationContext = "selectfields2")
55 // @type: ResolveChoice
56 // @args: [choice = "MATCH_CATALOG", database = "tempdb", table_name = "my-s3-sink", transformation_ctx = "resolvechoice3"]
57 // @return: resolvechoice3
58 // @inputs: [frame = selectfields2]
59 val resolvechoice3 = selectfields2.resolveChoice(choiceOption = Some(ChoiceOption("MATCH_CATALOG")), database = Some("tempdb"), tableName = Some("my-s3-sink"), transformationContext = "resolvechoice3")
60 // @type: DataSink
61 // @args: [database = "tempdb", table_name = "my-s3-sink", transformation_ctx = "datasink4"]
62 // @return: datasink4
63 // @inputs: [frame = resolvechoice3]
64 val datasink4 = glueContext.getCatalogSink(database = "tempdb", tableName = "my-s3-sink", redshiftTmpDir = "", transformationContext = "datasink4").writeDynamicFrame(resolvechoice3)
65 Job.commit()
66 }
67 }
68
69 Output::
70
71 {
72 "Name": "my-testing-job"
73 }
74
75 For more information, see `Authoring Jobs in AWS Glue <https://docs.aws.amazon.com/glue/latest/dg/author-job.html>`__ in the *AWS Glue Developer Guide*.
0 **Example 1: To create a table for a Kinesis data stream**
1
2 The following ``create-table`` example creates a table in the AWS Glue Data Catalog that describes a Kinesis data stream. ::
3
4 aws glue create-table \
5 --database-name tempdb \
6 --table-input '{"Name":"test-kinesis-input", "StorageDescriptor":{ \
7 "Columns":[ \
8 {"Name":"sensorid", "Type":"int"}, \
9 {"Name":"currenttemperature", "Type":"int"}, \
10 {"Name":"status", "Type":"string"}
11 ], \
12 "Location":"my-testing-stream", \
13 "Parameters":{ \
14 "typeOfData":"kinesis","streamName":"my-testing-stream", \
15 "kinesisUrl":"https://kinesis.us-east-1.amazonaws.com" \
16 }, \
17 "SerdeInfo":{ \
18 "SerializationLibrary":"org.openx.data.jsonserde.JsonSerDe"} \
19 }, \
20 "Parameters":{ \
21 "classification":"json"} \
22 }' \
23 --profile my-profile \
24 --endpoint https://glue.us-east-1.amazonaws.com
25
26 This command produces no output.
27
28 **Example 2: To create a table for a Kafka data store**
29
30 The following ``create-table`` example creates a table in the AWS Glue Data Catalog that describes a Kafka data store. ::
31
32 aws glue create-table \
33 --database-name tempdb \
34 --table-input '{"Name":"test-kafka-input", "StorageDescriptor":{ \
35 "Columns":[ \
36 {"Name":"sensorid", "Type":"int"}, \
37 {"Name":"currenttemperature", "Type":"int"}, \
38 {"Name":"status", "Type":"string"}
39 ], \
40 "Location":"my-testing-stream", \
41 "Parameters":{ \
42 "typeOfData":"kinesis","streamName":"my-testing-stream", \
43 "kinesisUrl":"https://kinesis.us-east-1.amazonaws.com" \
44 }, \
45 "SerdeInfo":{ \
46 "SerializationLibrary":"org.openx.data.jsonserde.JsonSerDe"} \
47 }, \
48 "Parameters":{ \
49 "classification":"json"} \
50 }' \
51 --profile my-profile \
52 --endpoint https://glue.us-east-1.amazonaws.com
53
54 This command produces no output.
55
56 For more information, see `Defining Tables in the AWS Glue Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/tables-described.html>`__ in the *AWS Glue Developer Guide*.
57
58 **Example 3: To create a table for a AWS S3 data store**
59
60 The following ``create-table`` example creates a table in the AWS Glue Data Catalog that
61 describes a AWS Simple Storage Service (AWS S3) data store. ::
62
63 aws glue create-table \
64 --database-name tempdb \
65 --table-input '{"Name":"s3-output", "StorageDescriptor":{ \
66 "Columns":[ \
67 {"Name":"s1", "Type":"string"}, \
68 {"Name":"s2", "Type":"int"}, \
69 {"Name":"s3", "Type":"string"}
70 ], \
71 "Location":"s3://bucket-path/"}, \
72 "SerdeInfo":{ \
73 "SerializationLibrary":"org.openx.data.jsonserde.JsonSerDe"}, \
74 "Parameters":{ \
75 "classification":"json"} \
76 }' \
77 --profile my-profile \
78 --endpoint https://glue.us-east-1.amazonaws.com
79
80 This command produces no output.
81
82 For more information, see `Defining Tables in the AWS Glue Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/tables-described.html>`__ in the *AWS Glue Developer Guide*.
0 **To delete a job**
1
2 The following ``delete-job`` example deletes a job that is no longer needed. ::
3
4 aws glue delete-job \
5 --job-name my-testing-job
6
7 Output::
8
9 {
10 "JobName": "my-testing-job"
11 }
12
13 For more information, see `Working with Jobs on the AWS Glue Console <https://docs.aws.amazon.com/glue/latest/dg/console-jobs.html>`__ in the *AWS Glue Developer Guide*.
0 **To list the definitions of some or all of the databases in the AWS Glue Data Catalog**
1
2 The following ``get-databases`` example returns information about the databases in the Data Catalog. ::
3
4 aws glue get-databases
5
6 Output::
7
8 {
9 "DatabaseList": [
10 {
11 "Name": "default",
12 "Description": "Default Hive database",
13 "LocationUri": "file:/spark-warehouse",
14 "CreateTime": 1602084052.0,
15 "CreateTableDefaultPermissions": [
16 {
17 "Principal": {
18 "DataLakePrincipalIdentifier": "IAM_ALLOWED_PRINCIPALS"
19 },
20 "Permissions": [
21 "ALL"
22 ]
23 }
24 ],
25 "CatalogId": "111122223333"
26 },
27 {
28 "Name": "flights-db",
29 "CreateTime": 1587072847.0,
30 "CreateTableDefaultPermissions": [
31 {
32 "Principal": {
33 "DataLakePrincipalIdentifier": "IAM_ALLOWED_PRINCIPALS"
34 },
35 "Permissions": [
36 "ALL"
37 ]
38 }
39 ],
40 "CatalogId": "111122223333"
41 },
42 {
43 "Name": "legislators",
44 "CreateTime": 1601415625.0,
45 "CreateTableDefaultPermissions": [
46 {
47 "Principal": {
48 "DataLakePrincipalIdentifier": "IAM_ALLOWED_PRINCIPALS"
49 },
50 "Permissions": [
51 "ALL"
52 ]
53 }
54 ],
55 "CatalogId": "111122223333"
56 },
57 {
58 "Name": "tempdb",
59 "CreateTime": 1601498566.0,
60 "CreateTableDefaultPermissions": [
61 {
62 "Principal": {
63 "DataLakePrincipalIdentifier": "IAM_ALLOWED_PRINCIPALS"
64 },
65 "Permissions": [
66 "ALL"
67 ]
68 }
69 ],
70 "CatalogId": "111122223333"
71 }
72 ]
73 }
74
75 For more information, see `Defining a Database in Your Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/define-database.html>`__ in the *AWS Glue Developer Guide*.
0 **To get information about a job run**
1
2 The following ``get-job-run`` example retrieves information about a job run. ::
3
4 aws glue get-job-run \
5 --job-name "Combine legistators data" \
6 --run-id jr_012e176506505074d94d761755e5c62538ee1aad6f17d39f527e9140cf0c9a5e
7
8 Output::
9
10 {
11 "JobRun": {
12 "Id": "jr_012e176506505074d94d761755e5c62538ee1aad6f17d39f527e9140cf0c9a5e",
13 "Attempt": 0,
14 "JobName": "Combine legistators data",
15 "StartedOn": 1602873931.255,
16 "LastModifiedOn": 1602874075.985,
17 "CompletedOn": 1602874075.985,
18 "JobRunState": "SUCCEEDED",
19 "Arguments": {
20 "--enable-continuous-cloudwatch-log": "true",
21 "--enable-metrics": "",
22 "--enable-spark-ui": "true",
23 "--job-bookmark-option": "job-bookmark-enable",
24 "--spark-event-logs-path": "s3://aws-glue-assets-111122223333-us-east-1/sparkHistoryLogs/"
25 },
26 "PredecessorRuns": [],
27 "AllocatedCapacity": 10,
28 "ExecutionTime": 117,
29 "Timeout": 2880,
30 "MaxCapacity": 10.0,
31 "WorkerType": "G.1X",
32 "NumberOfWorkers": 10,
33 "LogGroupName": "/aws-glue/jobs",
34 "GlueVersion": "2.0"
35 }
36 }
37
38 For more information, see `Job Runs <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html>`__ in the *AWS Glue Developer Guide*.
0 **To get information about all job runs for a job**
1
2 The following ``get-job-runs`` example retrieves information about job runs for a job. ::
3
4 aws glue get-job-runs \
5 --job-name "my-testing-job"
6
7 Output::
8
9 {
10 "JobRuns": [
11 {
12 "Id": "jr_012e176506505074d94d761755e5c62538ee1aad6f17d39f527e9140cf0c9a5e",
13 "Attempt": 0,
14 "JobName": "my-testing-job",
15 "StartedOn": 1602873931.255,
16 "LastModifiedOn": 1602874075.985,
17 "CompletedOn": 1602874075.985,
18 "JobRunState": "SUCCEEDED",
19 "Arguments": {
20 "--enable-continuous-cloudwatch-log": "true",
21 "--enable-metrics": "",
22 "--enable-spark-ui": "true",
23 "--job-bookmark-option": "job-bookmark-enable",
24 "--spark-event-logs-path": "s3://aws-glue-assets-111122223333-us-east-1/sparkHistoryLogs/"
25 },
26 "PredecessorRuns": [],
27 "AllocatedCapacity": 10,
28 "ExecutionTime": 117,
29 "Timeout": 2880,
30 "MaxCapacity": 10.0,
31 "WorkerType": "G.1X",
32 "NumberOfWorkers": 10,
33 "LogGroupName": "/aws-glue/jobs",
34 "GlueVersion": "2.0"
35 },
36 {
37 "Id": "jr_03cc19ddab11c4e244d3f735567de74ff93b0b3ef468a713ffe73e53d1aec08f_attempt_2",
38 "Attempt": 2,
39 "PreviousRunId": "jr_03cc19ddab11c4e244d3f735567de74ff93b0b3ef468a713ffe73e53d1aec08f_attempt_1",
40 "JobName": "my-testing-job",
41 "StartedOn": 1602811168.496,
42 "LastModifiedOn": 1602811282.39,
43 "CompletedOn": 1602811282.39,
44 "JobRunState": "FAILED",
45 "ErrorMessage": "An error occurred while calling o122.pyWriteDynamicFrame.
46 Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied;
47 Request ID: 021AAB703DB20A2D;
48 S3 Extended Request ID: teZk24Y09TkXzBvMPG502L5VJBhe9DJuWA9/TXtuGOqfByajkfL/Tlqt5JBGdEGpigAqzdMDM/U=)",
49 "PredecessorRuns": [],
50 "AllocatedCapacity": 10,
51 "ExecutionTime": 110,
52 "Timeout": 2880,
53 "MaxCapacity": 10.0,
54 "WorkerType": "G.1X",
55 "NumberOfWorkers": 10,
56 "LogGroupName": "/aws-glue/jobs",
57 "GlueVersion": "2.0"
58 },
59 {
60 "Id": "jr_03cc19ddab11c4e244d3f735567de74ff93b0b3ef468a713ffe73e53d1aec08f_attempt_1",
61 "Attempt": 1,
62 "PreviousRunId": "jr_03cc19ddab11c4e244d3f735567de74ff93b0b3ef468a713ffe73e53d1aec08f",
63 "JobName": "my-testing-job",
64 "StartedOn": 1602811020.518,
65 "LastModifiedOn": 1602811138.364,
66 "CompletedOn": 1602811138.364,
67 "JobRunState": "FAILED",
68 "ErrorMessage": "An error occurred while calling o122.pyWriteDynamicFrame.
69 Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied;
70 Request ID: 2671D37856AE7ABB;
71 S3 Extended Request ID: RLJCJw20brV+PpC6GpORahyF2fp9flB5SSb2bTGPnUSPVizLXRl1PN3QZldb+v1o9qRVktNYbW8=)",
72 "PredecessorRuns": [],
73 "AllocatedCapacity": 10,
74 "ExecutionTime": 113,
75 "Timeout": 2880,
76 "MaxCapacity": 10.0,
77 "WorkerType": "G.1X",
78 "NumberOfWorkers": 10,
79 "LogGroupName": "/aws-glue/jobs",
80 "GlueVersion": "2.0"
81 }
82 ]
83 }
84
85
86 For more information, see `Job Runs <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-runs.html>`__ in the *AWS Glue Developer Guide*.
0 **To retrieve information about a job**
1
2 The following ``get-job`` example retrieves information about a job. ::
3
4 aws glue get-job \
5 --job-name my-testing-job
6
7 Output::
8
9 {
10 "Job": {
11 "Name": "my-testing-job",
12 "Role": "Glue_DefaultRole",
13 "CreatedOn": 1602805698.167,
14 "LastModifiedOn": 1602805698.167,
15 "ExecutionProperty": {
16 "MaxConcurrentRuns": 1
17 },
18 "Command": {
19 "Name": "gluestreaming",
20 "ScriptLocation": "s3://janetst-bucket-01/Scripts/test_script.scala",
21 "PythonVersion": "2"
22 },
23 "DefaultArguments": {
24 "--class": "GlueApp",
25 "--job-language": "scala"
26 },
27 "MaxRetries": 0,
28 "AllocatedCapacity": 10,
29 "MaxCapacity": 10.0,
30 "GlueVersion": "1.0"
31 }
32 }
33
34 For more information, see `Jobs <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-job.html>`__ in the *AWS Glue Developer Guide*.
0 **To get the generated code for mapping data from source tables to target tables**
1
2 The following ``get-plan`` retrieves the generated code for mapping columns from the data source to the data target. ::
3
4 aws glue get-plan --mapping '[ \
5 { \
6 "SourcePath":"sensorid", \
7 "SourceTable":"anything", \
8 "SourceType":"int", \
9 "TargetPath":"sensorid", \
10 "TargetTable":"anything", \
11 "TargetType":"int" \
12 }, \
13 { \
14 "SourcePath":"currenttemperature", \
15 "SourceTable":"anything", \
16 "SourceType":"int", \
17 "TargetPath":"currenttemperature", \
18 "TargetTable":"anything", \
19 "TargetType":"int" \
20 }, \
21 { \
22 "SourcePath":"status", \
23 "SourceTable":"anything", \
24 "SourceType":"string", \
25 "TargetPath":"status", \
26 "TargetTable":"anything", \
27 "TargetType":"string" \
28 }]' \
29 --source '{ \
30 "DatabaseName":"tempdb", \
31 "TableName":"s3-source" \
32 }' \
33 --sinks '[ \
34 { \
35 "DatabaseName":"tempdb", \
36 "TableName":"my-s3-sink" \
37 }]'
38 --language "scala"
39 --endpoint https://glue.us-east-1.amazonaws.com
40 --output "text"
41
42 Output::
43
44 import com.amazonaws.services.glue.ChoiceOption
45 import com.amazonaws.services.glue.GlueContext
46 import com.amazonaws.services.glue.MappingSpec
47 import com.amazonaws.services.glue.ResolveSpec
48 import com.amazonaws.services.glue.errors.CallSite
49 import com.amazonaws.services.glue.util.GlueArgParser
50 import com.amazonaws.services.glue.util.Job
51 import com.amazonaws.services.glue.util.JsonOptions
52 import org.apache.spark.SparkContext
53 import scala.collection.JavaConverters._
54
55 object GlueApp {
56 def main(sysArgs: Array[String]) {
57 val spark: SparkContext = new SparkContext()
58 val glueContext: GlueContext = new GlueContext(spark)
59 // @params: [JOB_NAME]
60 val args = GlueArgParser.getResolvedOptions(sysArgs, Seq("JOB_NAME").toArray)
61 Job.init(args("JOB_NAME"), glueContext, args.asJava)
62 // @type: DataSource
63 // @args: [database = "tempdb", table_name = "s3-source", transformation_ctx = "datasource0"]
64 // @return: datasource0
65 // @inputs: []
66 val datasource0 = glueContext.getCatalogSource(database = "tempdb", tableName = "s3-source", redshiftTmpDir = "", transformationContext = "datasource0").getDynamicFrame()
67 // @type: ApplyMapping
68 // @args: [mapping = [("sensorid", "int", "sensorid", "int"), ("currenttemperature", "int", "currenttemperature", "int"), ("status", "string", "status", "string")], transformation_ctx = "applymapping1"]
69 // @return: applymapping1
70 // @inputs: [frame = datasource0]
71 val applymapping1 = datasource0.applyMapping(mappings = Seq(("sensorid", "int", "sensorid", "int"), ("currenttemperature", "int", "currenttemperature", "int"), ("status", "string", "status", "string")), caseSensitive = false, transformationContext = "applymapping1")
72 // @type: SelectFields
73 // @args: [paths = ["sensorid", "currenttemperature", "status"], transformation_ctx = "selectfields2"]
74 // @return: selectfields2
75 // @inputs: [frame = applymapping1]
76 val selectfields2 = applymapping1.selectFields(paths = Seq("sensorid", "currenttemperature", "status"), transformationContext = "selectfields2")
77 // @type: ResolveChoice
78 // @args: [choice = "MATCH_CATALOG", database = "tempdb", table_name = "my-s3-sink", transformation_ctx = "resolvechoice3"]
79 // @return: resolvechoice3
80 // @inputs: [frame = selectfields2]
81 val resolvechoice3 = selectfields2.resolveChoice(choiceOption = Some(ChoiceOption("MATCH_CATALOG")), database = Some("tempdb"), tableName = Some("my-s3-sink"), transformationContext = "resolvechoice3")
82 // @type: DataSink
83 // @args: [database = "tempdb", table_name = "my-s3-sink", transformation_ctx = "datasink4"]
84 // @return: datasink4
85 // @inputs: [frame = resolvechoice3]
86 val datasink4 = glueContext.getCatalogSink(database = "tempdb", tableName = "my-s3-sink", redshiftTmpDir = "", transformationContext = "datasink4").writeDynamicFrame(resolvechoice3)
87 Job.commit()
88 }
89 }
90
91 For more information, see `Editing Scripts in AWS Glue <https://docs.aws.amazon.com/glue/latest/dg/edit-script.html>`__ in the *AWS Glue Developer Guide*.
0 **To list the definitions of some or all of the tables in the specified database**
1
2 The following ``get-tables`` example returns information about the tables in the specified database. ::
3
4 aws glue get-tables --database-name 'tempdb'
5
6 Output::
7
8 {
9 "TableList": [
10 {
11 "Name": "my-s3-sink",
12 "DatabaseName": "tempdb",
13 "CreateTime": 1602730539.0,
14 "UpdateTime": 1602730539.0,
15 "Retention": 0,
16 "StorageDescriptor": {
17 "Columns": [
18 {
19 "Name": "sensorid",
20 "Type": "int"
21 },
22 {
23 "Name": "currenttemperature",
24 "Type": "int"
25 },
26 {
27 "Name": "status",
28 "Type": "string"
29 }
30 ],
31 "Location": "s3://janetst-bucket-01/test-s3-output/",
32 "Compressed": false,
33 "NumberOfBuckets": 0,
34 "SerdeInfo": {
35 "SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe"
36 },
37 "SortColumns": [],
38 "StoredAsSubDirectories": false
39 },
40 "Parameters": {
41 "classification": "json"
42 },
43 "CreatedBy": "arn:aws:iam::007436865787:user/JRSTERN",
44 "IsRegisteredWithLakeFormation": false,
45 "CatalogId": "007436865787"
46 },
47 {
48 "Name": "s3-source",
49 "DatabaseName": "tempdb",
50 "CreateTime": 1602730658.0,
51 "UpdateTime": 1602730658.0,
52 "Retention": 0,
53 "StorageDescriptor": {
54 "Columns": [
55 {
56 "Name": "sensorid",
57 "Type": "int"
58 },
59 {
60 "Name": "currenttemperature",
61 "Type": "int"
62 },
63 {
64 "Name": "status",
65 "Type": "string"
66 }
67 ],
68 "Location": "s3://janetst-bucket-01/",
69 "Compressed": false,
70 "NumberOfBuckets": 0,
71 "SortColumns": [],
72 "StoredAsSubDirectories": false
73 },
74 "Parameters": {
75 "classification": "json"
76 },
77 "CreatedBy": "arn:aws:iam::007436865787:user/JRSTERN",
78 "IsRegisteredWithLakeFormation": false,
79 "CatalogId": "007436865787"
80 },
81 {
82 "Name": "test-kinesis-input",
83 "DatabaseName": "tempdb",
84 "CreateTime": 1601507001.0,
85 "UpdateTime": 1601507001.0,
86 "Retention": 0,
87 "StorageDescriptor": {
88 "Columns": [
89 {
90 "Name": "sensorid",
91 "Type": "int"
92 },
93 {
94 "Name": "currenttemperature",
95 "Type": "int"
96 },
97 {
98 "Name": "status",
99 "Type": "string"
100 }
101 ],
102 "Location": "my-testing-stream",
103 "Compressed": false,
104 "NumberOfBuckets": 0,
105 "SerdeInfo": {
106 "SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe"
107 },
108 "SortColumns": [],
109 "Parameters": {
110 "kinesisUrl": "https://kinesis.us-east-1.amazonaws.com",
111 "streamName": "my-testing-stream",
112 "typeOfData": "kinesis"
113 },
114 "StoredAsSubDirectories": false
115 },
116 "Parameters": {
117 "classification": "json"
118 },
119 "CreatedBy": "arn:aws:iam::007436865787:user/JRSTERN",
120 "IsRegisteredWithLakeFormation": false,
121 "CatalogId": "007436865787"
122 }
123 ]
124 }
125
126 For more information, see `Defining Tables in the AWS Glue Data Catalog <https://docs.aws.amazon.com/glue/latest/dg/tables-described.html>`__ in the *AWS Glue Developer Guide*.
0 **To retrieve the runtime configuration of a Greengrass core**
1
2 The following ``get-thing-runtime-configuration`` example retrieves the runtime configuration of a Greengrass core. Before you can retrieve the runtime configuration, you must use the ``update-thing-runtime-configuration`` command to create a runtime configuration for the core. ::
3
4 aws greengrass get-thing-runtime-configuration \
5 --thing-name SampleGreengrassCore
6
7 Output::
8
9 {
10 "RuntimeConfiguration": {
11 "TelemetryConfiguration": {
12 "ConfigurationSyncStatus": "OutOfSync",
13 "Telemetry": "On"
14 }
15 }
16 }
17
18 For more information, see `Configuring telemetry settings <https://docs.aws.amazon.com/greengrass/latest/developerguide/telemetry.html#configure-telemetry-settings>`__ in the *AWS IoT Greengrass Developer Guide*.
00 **To update the group name**
11
2 The following ``update-group`` example updates the name of the specified Greengrass group. If you want to update the details for the group, use the ``create-group-definition-version`` command to create a new version. ::
2 The following ``update-group`` example updates the name of the specified Greengrass group. If you want to update the details for the group, use the ``create-group-version`` command to create a new version. ::
33
44 aws greengrass update-group \
55 --group-id "1402daf9-71cf-4cfe-8be0-d5e80526d0d8" \
66 --name TestGroup4of6
77
8
9
10 For more information, see `Configure AWS IoT Greengrass on AWS IoT <https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-config.html>`__ in the *AWS IoT Greengrass Developer Guide*.
8 For more information, see `Configure AWS IoT Greengrass on AWS IoT <https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-config.html>`__ in the *AWS IoT Greengrass Developer Guide*.
0 **To turn on telemetry in the runtime configuration of a Greengrass core**
1
2 The following ``update-thing-runtime-configuration`` example updates the runtime configuration of a Greengrass core to turn on telemetry. ::
3
4 aws greengrass update-thing-runtime-configuration \
5 --thing-name SampleGreengrassCore \
6 --telemetry-configuration {\"Telemetry\":\"On\"}
7
8 This command produces no output.
9
10 For more information, see `Configuring telemetry settings <https://docs.aws.amazon.com/greengrass/latest/developerguide/telemetry.html#configure-telemetry-settings>`__ in the *AWS IoT Greengrass Developer Guide*.
00 **To get component policy details**
11
2 The following ``get-component-policy`` example displays the details of a component policy by specifying its ARN. ::
2 The following ``get-component-policy`` example lists the details of a component policy by specifying its ARN. ::
33
4 aws imagebuilder get-component-policy --image-arn arn:aws:imagebuilder:us-west-2:123456789012:component/my-example-component/2019.12.03/1
4 aws imagebuilder get-component-policy \
5 --component-arn arn:aws:imagebuilder:us-west-2:123456789012:component/my-example-component/2019.12.03/1
56
67 Output::
78
910 "Policy": "{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": [ "123456789012" ] }, "Action": [ "imagebuilder:GetComponent", "imagebuilder:ListComponents" ], "Resource": [ "arn:aws:imagebuilder:us-west-2:123456789012:component/my-example-component/2019.12.03/1" ] } ] }"
1011 }
1112
12 For more information, see `Setting Up and Managing an EC2 Image Builder Image Pipeline Using the AWS CLI <https://docs.aws.amazon.com/imagebuilder/latest/userguide/managing-image-builder-cli.html>`__ in the *EC2 Image Builder Users Guide*.
13 For more information, see `Setting Up and Managing an EC2 Image Builder Image Pipeline Using the AWS CLI` <https://docs.aws.amazon.com/imagebuilder/latest/userguide/managing-image-builder-cli.html>`__ in the *EC2 Image Builder Users Guide*.
0 **To create an audit finding suppression**
1
2 The following ``create-audit-suppression`` example creates an audit finding suppression for a policy named "virtualMachinePolicy" that has been flagged for being overly permissive. ::
3
4 aws iot create-audit-suppression \
5 --check-name IOT_POLICY_OVERLY_PERMISSIVE_CHECK \
6 --resource-identifier policyVersionIdentifier={"policyName"="virtualMachinePolicy","policyVersionId"="1"} \
7 --no-suppress-indefinitely \
8 --expiration-date 2020-10-20
9
10 This command produces no output.
11
12 For more information, see `Audit finding suppressions <https://docs.aws.amazon.com/iot/latest/developerguide/audit-finding-suppressions.html>`__ in the *AWS IoT Developers Guide*.
0 **To delete an audit finding suppression**
1
2 The following ``delete-audit-suppression`` example deletes an audit finding suppression for DEVICE_CERTIFICATE_EXPIRING_CHECK. ::
3
4 aws iot delete-audit-suppression \
5 --check-name DEVICE_CERTIFICATE_EXPIRING_CHECK \
6 --resource-identifier deviceCertificateId="c7691e<shortened>"
7
8 This command produces no output.
9
10 For more information, see `Audit finding suppressions <https://docs.aws.amazon.com/iot/latest/developerguide/audit-finding-suppressions.html>`__ in the *AWS IoT Developers Guide*.
0 **To delete a thing group**
1
2 The following ``delete-thing-group`` example deletes the specified thing group. You cannot delete a thing group if it contains things. ::
3
4 aws iot delete-thing-group \
5 --thing-group-name DefectiveBulbs
6
7 This command produces no output.
8
9 For more information, see `Thing Groups <https://docs.aws.amazon.com/iot/latest/developerguide/thing-groups.html>`__ in the *AWS IoT Developers Guide*.
0 **To delete a thing group**
1
2 The following ``delete-thing-group`` example deletes the specified thing group. You cannot delete a thing group if it contains child thing groups. ::
3
4 aws iot delete-thing-group \
5 --thing-group-name DefectiveBulbs
6
7 This command produces no output.
8
9 For more information, see `Thing Groups <https://docs.aws.amazon.com/iot/latest/developerguide/thing-groups.html>`__ in the *AWS IoT Developers Guide*.
0 **To get details about an audit finding suppression**
1
2 The following ``describe-audit-suppression`` example lists details about an audit finding suppression. ::
3
4 aws iot describe-audit-task \
5 --task-id "787ed873b69cb4d6cdbae6ddd06996c5"
6
7 Output::
8
9 {
10 "taskStatus": "COMPLETED",
11 "taskType": "SCHEDULED_AUDIT_TASK",
12 "taskStartTime": 1596168096.157,
13 "taskStatistics": {
14 "totalChecks": 1,
15 "inProgressChecks": 0,
16 "waitingForDataCollectionChecks": 0,
17 "compliantChecks": 0,
18 "nonCompliantChecks": 1,
19 "failedChecks": 0,
20 "canceledChecks": 0
21 },
22 "scheduledAuditName": "AWSIoTDeviceDefenderDailyAudit",
23 "auditDetails": {
24 "DEVICE_CERTIFICATE_EXPIRING_CHECK": {
25 "checkRunStatus": "COMPLETED_NON_COMPLIANT",
26 "checkCompliant": false,
27 "totalResourcesCount": 195,
28 "nonCompliantResourcesCount": 2
29 }
30 }
31 }
32
33 For more information, see `Audit finding suppressions <https://docs.aws.amazon.com/iot/latest/developerguide/audit-finding-suppressions.html>`__ in the *AWS IoT Developers Guide*.
66
77 Output::
88
9 {
10 "domainConfigurationName": "additionalDataDomain",
11 "domainConfigurationArn": "arn:aws:iot:us-west-2:123456789012:domainconfiguration/additionalDataDomain/dikMh",
12 "domainName": "d01645582h24k4we2vblw-ats.iot.us-west-2.amazonaws.com",
13 "serverCertificates": [],
14 "domainConfigurationStatus": "ENABLED",
15 "serviceType": "DATA",
16 "domainType": "AWS_MANAGED"
9 {
10 "domainConfigurationName": "additionalDataDomain",
11 "domainConfigurationArn": "arn:aws:iot:us-east-1:758EXAMPLE143:domainconfiguration/additionalDataDomain/norpw",
12 "domainName": "d055exampleed74y71zfd-ats.beta.us-east-1.iot.amazonaws.com",
13 "serverCertificates": [],
14 "domainConfigurationStatus": "ENABLED",
15 "serviceType": "DATA",
16 "domainType": "AWS_MANAGED",
17 "lastStatusChangeDate": 1601923783.774
1718 }
1819
1920 For more information, see `Configurable Endpoints <https://docs.aws.amazon.com/iot/latest/developerguide/iot-custom-endpoints-configurable-aws.html>`__ in the *AWS IoT Developer Guide*.
0 **To list all audit finding suppressions**
1
2 The following ``list-audit-suppressions`` example lists all active audit finding suppressions. ::
3
4 aws iot list-audit-suppressions
5
6 Output::
7
8 {
9 "suppressions": [
10 {
11 "checkName": "DEVICE_CERTIFICATE_EXPIRING_CHECK",
12 "resourceIdentifier": {
13 "deviceCertificateId": "c7691e<shortened>"
14 },
15 "expirationDate": 1597881600.0,
16 "suppressIndefinitely": false
17 }
18 ]
19 }
20
21 For more information, see `Audit finding suppressions <https://docs.aws.amazon.com/iot/latest/developerguide/audit-finding-suppressions.html>`__ in the *AWS IoT Developers Guide*.
0 **To update an audit finding suppression**
1
2 The following ``update-audit-suppression`` example updates an audit finding suppression's expiration date to 2020-09-21. ::
3
4 aws iot update-audit-suppression \
5 --check-name DEVICE_CERTIFICATE_EXPIRING_CHECK \
6 --resource-identifier deviceCertificateId=c7691e<shortened> \
7 --no-suppress-indefinitely \
8 --expiration-date 2020-09-21
9
10 This command produces no output.
11
12 For more information, see `Audit finding suppressions <https://docs.aws.amazon.com/iot/latest/developerguide/audit-finding-suppressions.html>`__ in the *AWS IoT Developers Guide*.
3939 This command produces no output.
4040
4141 For more information about using asymmetric CMKs in AWS KMS, see `Using Symmetric and Asymmetric Keys <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service API Reference*.
42
43 **Example 3: To download the public key of an asymmetric CMK**
44
45 The following ``get-public-key`` example downloads the public key of an asymmetric CMK.
46
47 In addition to returning the public key, the output includes information that you need to use the public key safely outside of AWS KMS, including the key usage and supported encryption algorithms.
48
49 Before running this command, replace the example key ID with a valid key ID from your AWS account. ::
50
51 aws kms get-public-key \
52 --key-id 1234abcd-12ab-34cd-56ef-1234567890ab
53
54 Output::
55
56 {
57 "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
58 "PublicKey": "jANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAl5epvg1/QtJhxSi2g9SDEVg8QV/...",
59 "CustomerMasterKeySpec": "RSA_4096",
60 "KeyUsage": "ENCRYPT_DECRYPT",
61 "EncryptionAlgorithms": [
62 "RSAES_OAEP_SHA_1",
63 "RSAES_OAEP_SHA_256"
64 ]
65 }
66
67 For more information about using asymmetric CMKs in AWS KMS, see `Using Symmetric and Asymmetric Keys <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service API Reference*.
68
69 **Example 4: To convert a public key to DER format (Linux and macOS)**
70
71 The following ``get-public-key`` example downloads the public key of an asymmetric CMK and saves it in a DER file.
72
73 When you use the ``get-public-key`` command in the AWS CLI, it returns a DER-encoded X.509 public key that is Base64-encoded. This example gets the value of the PublicKey property as text. It Base64-decodes the ``PublicKey`` and saves it in the ``public_key.der`` file. The ``output`` parameter returns the output as text, instead of JSON. The ``--query`` parameter gets only the ``PublicKey`` property, not the properties that you need to use the public key safely outside of AWS KMS.
74
75 Before running this command, replace the example key ID with a valid key ID from your AWS account. ::
76
77 aws kms get-public-key \
78 --key-id 1234abcd-12ab-34cd-56ef-1234567890ab \
79 --output text \
80 --query PublicKey | base64 --decode > public_key.der
81
82 This command produces no output.
83
84 For more information about using asymmetric CMKs in AWS KMS, see `Using Symmetric and Asymmetric Keys <https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html>`__ in the *AWS Key Management Service API Reference*.
1919 All the parameters that apply to this example channel but that aren't specified in this file will either take the default value, be set to null, or take a unique value generated by MediaLive. ::
2020
2121 aws medialive create-channel \
22 --cli-input-jason file://channel-in-hls-out-hls-akamai.json
22 --cli-input-json file://channel-in-hls-out-hls-akamai.json
2323
2424 Contents of ``channel-in-hls-out-hls-akamai.json``::
2525
22 The following ``create-input`` example creates an ``HLS PULL`` input by passing in a JSON file that contains the parameters that apply to this type of input. The JSON for this example input specifies two sources (addresses) to the input, in order to support redundancy in the ingest. These addresses require passwords. ::
33
44 aws medialive create-input \
5 --cli-input-jason file://input-hls-pull-news.json
5 --cli-input-json file://input-hls-pull-news.json
66
77 Contents of ``input-hls-pull-news.json``::
88
0 **To start maintenance**
1
2 The following ``start-maintenance`` example manually starts maintenance on the specified Chef Automate server in your default region. This command can be useful if an earlier, automated maintenance attempt failed, and the underlying cause of maintenance failure has been resolved. ::
3
4 aws opsworks-cm start-maintenance --server-name 'automate-06'
5
6 The output shows you information similar to the following about the maintenance request. ::
7
8 {
9 "Server": {
10 "BackupRetentionCount": 8,
11 "CreatedAt": 2016-07-29T13:38:47.520Z,
12 "DisableAutomatedBackup": TRUE,
13 "Endpoint": "https://opsworks-cm.us-east-1.amazonaws.com",
14 "Engine": "Chef",
15 "EngineAttributes": [
16 {
17 "Name": "CHEF_DELIVERY_ADMIN_PASSWORD",
18 "Value": "1Password1"
19 }
20 ],
21 "EngineModel": "Single",
22 "EngineVersion": "12",
23 "InstanceProfileArn": "arn:aws:iam::1019881987024:instance-profile/automate-06-1010V4UU2WRM2",
24 "InstanceType": "m4.large",
25 "KeyPair": "",
26 "MaintenanceStatus": "SUCCESS",
27 "PreferredBackupWindow": "",
28 "PreferredMaintenanceWindow": "",
29 "SecurityGroupIds": [ "sg-1a24c270" ],
30 "ServerArn": "arn:aws:iam::1019881987024:instance/automate-06-1010V4UU2WRM2",
31 "ServerName": "automate-06",
32 "ServiceRoleArn": "arn:aws:iam::1019881987024:role/aws-opsworks-cm-service-role.1114810729735",
33 "Status": "HEALTHY",
34 "StatusReason": "",
35 "SubnetIds": [ "subnet-49436a18" ]
36 }
37 }
38
39 For more information, see `StartMaintenance <http://docs.aws.amazon.com/opsworks-cm/latest/APIReference/API_StartMaintenance.html>`_ in the *AWS OpsWorks for Chef Automate API Reference*.
0 **To start maintenance**
1
2 The following ``start-maintenance`` example manually starts maintenance on the specified Chef Automate or Puppet Enterprise server in your default region. This command is useful if an earlier, automated maintenance attempt failed, and the underlying cause of maintenance failure has been resolved. ::
3
4 aws opsworks-cm start-maintenance \
5 --server-name 'automate-06'
6
7 Output::
8
9 {
10 "Server": {
11 "AssociatePublicIpAddress": true,
12 "BackupRetentionCount": 10,
13 "ServerName": "automate-06",
14 "CreatedAt": 1569229584.842,
15 "CloudFormationStackArn": "arn:aws:cloudformation:us-west-2:123456789012:stack/aws-opsworks-cm-instance-automate-06-1606611794746/EXAMPLE0-31de-11eb-bdb0-0a5b0a1353b8",
16 "DisableAutomatedBackup": false,
17 "Endpoint": "automate-06-EXAMPLEvr8gjfk5f.us-west-2.opsworks-cm.io",
18 "Engine": "ChefAutomate",
19 "EngineModel": "Single",
20 "EngineAttributes": [],
21 "EngineVersion": "2020-07",
22 "InstanceProfileArn": "arn:aws:iam::123456789012:instance-profile/aws-opsworks-cm-ec2-role",
23 "InstanceType": "m5.large",
24 "PreferredMaintenanceWindow": "Sun:01:00",
25 "PreferredBackupWindow": "Sun:15:00",
26 "SecurityGroupIds": [
27 "sg-EXAMPLE"
28 ],
29 "ServiceRoleArn": "arn:aws:iam::123456789012:role/service-role/aws-opsworks-cm-service-role",
30 "Status": "UNDER_MAINTENANCE",
31 "SubnetIds": [
32 "subnet-EXAMPLE"
33 ],
34 "ServerArn": "arn:aws:opsworks-cm:us-west-2:123456789012:server/automate-06/0148382d-66b0-4196-8274-d1a2b6dff8d1"
35 }
36 }
37
38 For more information, see `System Maintenance (Puppet Enterprise servers) <https://docs.aws.amazon.com/opsworks/latest/userguide/opspup-maintenance.html>`_ or `System Maintenance (Chef Automate servers) <https://docs.aws.amazon.com/opsworks/latest/userguide/opscm-maintenance.html>`_ in the *AWS OpsWorks User Guide*.
0 **To delete a lexicon**
1
2 The following ``delete-lexicon`` example deletes the specified lexicon. ::
3
4 aws polly delete-lexicon \
5 --name w3c
6
7 This command produces no output.
8
9 For more information, see `Using the DeleteLexicon operation <https://docs.aws.amazon.com/polly/latest/dg/gs-delete-lexicon.html>`__ in the *Amazon Polly Developer Guide*.
0 **To retrieve the content of a lexicon**
1
2 The following ``get-lexicon`` example retrieves the content of the specified pronunciation lexicon. ::
3
4 aws polly get-lexicon \
5 --name w3c
6
7 Output::
8
9 {
10 "Lexicon": {
11 "Content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<lexicon version=\"1.0\" \n xmlns= \"http://www.w3.org/2005/01/pronunciation-lexicon\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n xsi:schemaLocation=\"http://www.w3.org/2005/01/pronunciation-lexicon \n http://www.w3.org/TR/2007/CR-pronunciation- lexicon-20071212/pls.xsd\"\n alphabet=\"ipa\" \n xml:lang=\"en-US\">\n <lexeme>\n <grapheme>W3C</grapheme>\n <alias>World Wide Web Consortium</alias>\n </lexeme>\n</lexicon>\n",
12 "Name": "w3c"
13 },
14 "LexiconAttributes": {
15 "Alphabet": "ipa",
16 "LanguageCode": "en-US",
17 "LastModified": 1603908910.99,
18 "LexiconArn": "arn:aws:polly:us-west-2:880185128111:lexicon/w3c",
19 "LexemesCount": 1,
20 "Size": 492
21 }
22 }
23
24 For more information, see `Using the GetLexicon operation <https://docs.aws.amazon.com/polly/latest/dg/gs-get-lexicon.html>`__ in the *Amazon Polly Developer Guide*.
0 **To get information about a speech synthesis task**
1
2 The following ``get-speech-synthesis-task`` example retrieves information about the specified speech synthesis task. ::
3
4 aws polly get-speech-synthesis-task \
5 --task-id 70b61c0f-57ce-4715-a247-cae8729dcce9
6
7 Output::
8
9 {
10 "SynthesisTask": {
11 "TaskId": "70b61c0f-57ce-4715-a247-cae8729dcce9",
12 "TaskStatus": "completed",
13 "OutputUri": "https://s3.us-west-2.amazonaws.com/my-s3-bucket/70b61c0f-57ce-4715-a247-cae8729dcce9.mp3",
14 "CreationTime": 1603911042.689,
15 "RequestCharacters": 1311,
16 "OutputFormat": "mp3",
17 "TextType": "text",
18 "VoiceId": "Joanna"
19 }
20 }
21
22 For more information, see `Creating long audio files <https://docs.aws.amazon.com/polly/latest/dg/longer-cli.html>`__ in the *Amazon Polly Developer Guide*.
0 **To list your lexicons**
1
2 The following ``list-lexicons`` example lists your pronunciation lexicons. ::
3
4 aws polly list-lexicons
5
6 Output::
7
8 {
9 "Lexicons": [
10 {
11 "Name": "w3c",
12 "Attributes": {
13 "Alphabet": "ipa",
14 "LanguageCode": "en-US",
15 "LastModified": 1603908910.99,
16 "LexiconArn": "arn:aws:polly:us-east-2:123456789012:lexicon/w3c",
17 "LexemesCount": 1,
18 "Size": 492
19 }
20 }
21 ]
22 }
23
24 For more information, see `Using the ListLexicons operation <https://docs.aws.amazon.com/polly/latest/dg/gs-list-lexicons.html>`__ in the *Amazon Polly Developer Guide*.
0 **To list your speech synthesis tasks**
1
2 The following ``list-speech-synthesis-tasks`` example lists your speech synthesis tasks. ::
3
4 aws polly list-speech-synthesis-tasks
5
6 Output::
7
8 {
9 "SynthesisTasks": [
10 {
11 "TaskId": "70b61c0f-57ce-4715-a247-cae8729dcce9",
12 "TaskStatus": "completed",
13 "OutputUri": "https://s3.us-west-2.amazonaws.com/my-s3-bucket/70b61c0f-57ce-4715-a247-cae8729dcce9.mp3",
14 "CreationTime": 1603911042.689,
15 "RequestCharacters": 1311,
16 "OutputFormat": "mp3",
17 "TextType": "text",
18 "VoiceId": "Joanna"
19 }
20 ]
21 }
22
23 For more information, see `Creating long audio files <https://docs.aws.amazon.com/polly/latest/dg/longer-cli.html>`__ in the *Amazon Polly Developer Guide*.
24
0 **To store a lexicon**
1
2 The following ``put-lexicon`` example stores the specified pronunciation lexicon. The ``example.pls`` file specifies a W3C PLS-compliant lexicon. ::
3
4 aws polly put-lexicon \
5 --name w3c \
6 --content file://example.pls
7
8 Contents of ``example.pls`` ::
9
10 {
11 <?xml version="1.0" encoding="UTF-8"?>
12 <lexicon version="1.0"
13 xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
14 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15 xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon
16 http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
17 alphabet="ipa"
18 xml:lang="en-US">
19 <lexeme>
20 <grapheme>W3C</grapheme>
21 <alias>World Wide Web Consortium</alias>
22 </lexeme>
23 </lexicon>
24 }
25
26 This command produces no output.
27
28 For more information, see `Using the PutLexicon operation <https://docs.aws.amazon.com/polly/latest/dg/gs-put-lexicon.html>`__ in the *Amazon Polly Developer Guide*.
0 **To synthesize text**
1
2 The following ``start-speech-synthesis-task`` example synthesizes the text in ``text_file.txt`` and stores the resulting MP3 file in the specified bucket. ::
3
4 aws polly start-speech-synthesis-task \
5 --output-format mp3 \
6 --output-s3-bucket-name my-s3-bucket \
7 --text file://text_file.txt \
8 --voice-id Joanna
9
10 Output::
11
12 {
13 "SynthesisTask": {
14 "TaskId": "70b61c0f-57ce-4715-a247-cae8729dcce9",
15 "TaskStatus": "scheduled",
16 "OutputUri": "https://s3.us-east-2.amazonaws.com/my-s3-bucket/70b61c0f-57ce-4715-a247-cae8729dcce9.mp3",
17 "CreationTime": 1603911042.689,
18 "RequestCharacters": 1311,
19 "OutputFormat": "mp3",
20 "TextType": "text",
21 "VoiceId": "Joanna"
22 }
23 }
24
25 For more information, see `Creating long audio files <https://docs.aws.amazon.com/polly/latest/dg/longer-cli.html>`__ in the *Amazon Polly Developer Guide*.
26
0 **To create a custom Availability Zone**
1
2 The following ``create-custom-availability-zone`` example creates a custom Availability Zone. ::
3
4 aws rds create-custom-availability-zone \
5 --custom-availability-zone-name test-custom-availability-zone \
6 --new-vpn-tunnel-name test-vpn-tunnel \
7 --vpn-tunnel-originator-ip 192.0.2.0
8
9 Output::
10
11 {
12 "CustomAvailabilityZone": {
13 "CustomAvailabilityZoneId": "rds-caz-EXAMPLE",
14 "CustomAvailabilityZoneName": "test-custom-availability-zone",
15 "CustomAvailabilityZoneStatus": "CREATING"
16 }
17 }
18
19 For more information, see `Creating additional custom AZs in an AWS Region <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/creating-a-custom-az.html>`__ in the *Amazon RDS on VMware User Guide*.
0 **To create a global DB cluster**
1
2 The following ``create-global-cluster`` example creates a new Aurora MySQL-compatible global DB cluster. ::
3
4 aws rds create-global-cluster \
5 --global-cluster-identifier myglobalcluster \
6 --engine aurora-mysql
7
8 Output::
9
10 {
11 "GlobalCluster": {
12 "GlobalClusterIdentifier": "myglobalcluster",
13 "GlobalClusterResourceId": "cluster-f0e523bfe07aabb",
14 "GlobalClusterArn": "arn:aws:rds::123456789012:global-cluster:myglobalcluster",
15 "Status": "available",
16 "Engine": "aurora-mysql",
17 "EngineVersion": "5.7.mysql_aurora.2.07.2",
18 "StorageEncrypted": false,
19 "DeletionProtection": false,
20 "GlobalClusterMembers": []
21 }
22 }
23
24 For more information, see `Creating an Aurora global database <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-getting-started.html#aurora-global-database-creating>`__ in the *Amazon Aurora User Guide*.
0 **To delete a custom Availability Zone**
1
2 The following ``delete-custom-availability-zone`` example deletes a custom Availability Zone. ::
3
4 aws rds delete-custom-availability-zone \
5 --custom-availability-zone-id rds-caz-EXAMPLE
6
7 Output::
8
9 {
10 "CustomAvailabilityZone": {
11 "CustomAvailabilityZoneId": "rds-caz-EXAMPLE",
12 "CustomAvailabilityZoneName": "test-custom-availability-zone",
13 "CustomAvailabilityZoneStatus": "DELETING"
14 }
15 }
16
17 For more information, see `What is Amazon RDS on VMware? <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html>`__ in the *Amazon RDS on VMware User Guide*.
0 **To delete a replicated automated backup from a Region**
1
2 The following ``delete-db-instance-automated-backup`` example deletes the automated backup with the specified Amazon Resource Name (ARN). ::
3
4 aws rds delete-db-instance-automated-backup \
5 --db-instance-automated-backups-arn "arn:aws:rds:us-west-2:123456789012:auto-backup:ab-jkib2gfq5rv7replzadausbrktni2bn4example"
6
7 Output::
8
9 {
10 "DBInstanceAutomatedBackup": {
11 "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:new-orcl-db",
12 "DbiResourceId": "db-JKIB2GFQ5RV7REPLZA4EXAMPLE",
13 "Region": "us-east-1",
14 "DBInstanceIdentifier": "new-orcl-db",
15 "RestoreWindow": {},
16 "AllocatedStorage": 20,
17 "Status": "deleting",
18 "Port": 1521,
19 "AvailabilityZone": "us-east-1b",
20 "VpcId": "vpc-########",
21 "InstanceCreateTime": "2020-12-04T15:28:31Z",
22 "MasterUsername": "admin",
23 "Engine": "oracle-se2",
24 "EngineVersion": "12.1.0.2.v21",
25 "LicenseModel": "bring-your-own-license",
26 "OptionGroupName": "default:oracle-se2-12-1",
27 "Encrypted": false,
28 "StorageType": "gp2",
29 "IAMDatabaseAuthenticationEnabled": false,
30 "BackupRetentionPeriod": 7,
31 "DBInstanceAutomatedBackupsArn": "arn:aws:rds:us-west-2:123456789012:auto-backup:ab-jkib2gfq5rv7replzadausbrktni2bn4example"
32 }
33 }
34
35 For more information, see `Deleting replicated backups <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html#AutomatedBackups.Delete>`__ in the *Amazon RDS User Guide*.
00 **To delete a DB security group**
11
2 The following ``delete-db-security-group`` example deletes the DB security group named ``mysecgroup``. ::
2 The following ``delete-db-security-group`` example deletes a DB security group named ``mysecuritygroup``. ::
33
44 aws rds delete-db-security-group \
5 --db-security-group-name mysecgroup
5 --db-security-group-name mysecuritygroup
66
77 This command produces no output.
88
9 For more information, see `Deleting DB VPC Security Groups <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html#Overview.RDSSecurityGroups.DeleteDBVPCGroups>`__ in the *Amazon RDS User Guide*.
9 For more information, see `Working with DB security groups (EC2-Classic platform) <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithSecurityGroups.html>`__ in the *Amazon RDS User Guide*.
0 **To delete a global DB cluster**
1
2 The following ``delete-global-cluster`` example deletes an Aurora MySQL-compatible global DB cluster. The output shows the cluster that you're deleting, but subsequent ``describe-global-clusters`` commands don't list that DB cluster. ::
3
4 aws rds delete-global-cluster \
5 --global-cluster-identifier myglobalcluster
6
7 Output::
8
9 {
10 "GlobalCluster": {
11 "GlobalClusterIdentifier": "myglobalcluster",
12 "GlobalClusterResourceId": "cluster-f0e523bfe07aabb",
13 "GlobalClusterArn": "arn:aws:rds::123456789012:global-cluster:myglobalcluster",
14 "Status": "available",
15 "Engine": "aurora-mysql",
16 "EngineVersion": "5.7.mysql_aurora.2.07.2",
17 "StorageEncrypted": false,
18 "DeletionProtection": false,
19 "GlobalClusterMembers": []
20 }
21 }
22
23 For more information, see `Deleting an Aurora global database <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-managing.html#aurora-global-database-deleting>`__ in the *Amazon Aurora User Guide*.
0 **To delete installation media**
1
2 The following ``delete-installation-media`` example deletes installation media. ::
3
4 aws rds delete-installation-media \
5 --installation-media-id NcNrEXAMPLE
6
7 Output::
8
9 {
10 "InstallationMediaId": "NcNrEXAMPLE",
11 "CustomAvailabilityZoneId": "rds-caz-EXAMPLE",
12 "Engine": "sqlserver-ee",
13 "EngineVersion": "13.00.5292.0.v1",
14 "EngineInstallationMediaPath": "SQLServerISO/en_sql_server_2016_enterprise_x64_dvd_8701793.iso",
15 "OSInstallationMediaPath": "WindowsISO/en_windows_server_2016_x64_dvd_9327751.iso",
16 "Status": "Deleting",
17 "FailureCause": {}
18 }
19
20 For more information, see `What is Amazon RDS on VMware? <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html>`__ in the *Amazon RDS on VMware User Guide*.
0 **To describe the custom Availability Zones**
1
2 The following ``describe-custom-availability-zones`` example retrieves the details of the custom Availability Zones in the AWS Region. ::
3
4 aws rds describe-custom-availability-zones
5
6 Output::
7
8 {
9 "CustomAvailabilityZones": [
10 {
11 "CustomAvailabilityZoneId": "rds-caz-EXAMPLE1",
12 "CustomAvailabilityZoneName": "custom-az-1",
13 "CustomAvailabilityZoneStatus": "CREATING",
14 "VpnDetails": {
15 "VpnId": "3604EXAMPLE-7bdEXAMPLE",
16 "VpnTunnelOriginatorIP": "198.51.100.0",
17 "VpnGatewayIp": "192.0.2.0",
18 "VpnPSK": "388cEXAMPLE8",
19 "VpnName": "vpn-EXAMPLE1",
20 "VpnState": "AVAILABLE"
21 }
22 },
23 {
24 "CustomAvailabilityZoneId": "rds-caz-EXAMPLE2",
25 "CustomAvailabilityZoneName": "custom-az-2",
26 "CustomAvailabilityZoneStatus": "CREATING",
27 "VpnDetails": {
28 "VpnId": "360EXAMPLE-82EXAMPLE",
29 "VpnTunnelOriginatorIP": "203.0.113.0",
30 "VpnGatewayIp": "198.51.100.0",
31 "VpnPSK": "c95cEXAMPLE",
32 "VpnName": "vpn-EXAMPLE2",
33 "VpnState": "AVAILABLE"
34 }
35 }
36 ]
37 }
38
39 For more information, see `What is Amazon RDS on VMware? <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html>`__ in the *Amazon RDS on VMware User Guide*.
00 **To describe the automated backups for a DB instance**
11
2 The following ``describe-db-instance-automated-backups`` example displays details about the automated backups for the specified DB instance. ::
2 The following ``describe-db-instance-automated-backups`` example displays details about the automated backups for the specified DB instance. The details include replicated automated backups in other AWS Regions. ::
33
44 aws rds describe-db-instance-automated-backups \
5 --db-instance-identifier database-mysql
5 --db-instance-identifier new-orcl-db
66
77 Output::
88
99 {
1010 "DBInstanceAutomatedBackups": [
1111 {
12 "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:database-mysql",
13 "DbiResourceId": "db-AKIAIOSFODNN7EXAMPLE",
12 "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:new-orcl-db",
13 "DbiResourceId": "db-JKIB2GFQ5RV7REPLZA4EXAMPLE",
1414 "Region": "us-east-1",
15 "DBInstanceIdentifier": "database-mysql",
15 "DBInstanceIdentifier": "new-orcl-db",
1616 "RestoreWindow": {
17 "EarliestTime": "2019-06-13T08:39:38.359Z",
18 "LatestTime": "2019-06-20T23:00:00Z"
17 "EarliestTime": "2020-12-07T21:05:20.939Z",
18 "LatestTime": "2020-12-07T21:05:20.939Z"
1919 },
20 "AllocatedStorage": 100,
21 "Status": "active",
22 "Port": 3306,
23 "AvailabilityZone": "us-east-1b",
24 "VpcId": "vpc-6594f31c",
25 "InstanceCreateTime": "2019-04-30T15:45:53Z",
20 "AllocatedStorage": 20,
21 "Status": "replicating",
22 "Port": 1521,
23 "InstanceCreateTime": "2020-12-04T15:28:31Z",
2624 "MasterUsername": "admin",
27 "Engine": "mysql",
28 "EngineVersion": "5.6.40",
29 "LicenseModel": "general-public-license",
30 "Iops": 1000,
31 "OptionGroupName": "default:mysql-5-6",
32 "Encrypted": true,
33 "StorageType": "io1",
34 "KmsKeyId": "arn:aws:kms:us-east-1:814387698303:key/AKIAIOSFODNN7EXAMPLE",
35 "IAMDatabaseAuthenticationEnabled": false
25 "Engine": "oracle-se2",
26 "EngineVersion": "12.1.0.2.v21",
27 "LicenseModel": "bring-your-own-license",
28 "OptionGroupName": "default:oracle-se2-12-1",
29 "Encrypted": false,
30 "StorageType": "gp2",
31 "IAMDatabaseAuthenticationEnabled": false,
32 "BackupRetentionPeriod": 14,
33 "DBInstanceAutomatedBackupsArn": "arn:aws:rds:us-west-2:123456789012:auto-backup:ab-jkib2gfq5rv7replzadausbrktni2bn4example"
3634 }
3735 ]
3836 }
3937
40 For more information, see `Working With Backups <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html>`__ in the *Amazon RDS User Guide*.
38 For more information, see `Finding information about replicated backups <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html#AutomatedBackups.Replicating.Describe>`__ in the *Amazon RDS User Guide*.
0 **To describe global DB clusters**
1
2 The following ``describe-global-clusters`` example lists Aurora global DB clusters in the current AWS Region. ::
3
4 aws rds describe-global-clusters
5
6 Output::
7
8 {
9 "GlobalClusters": [
10 {
11 "GlobalClusterIdentifier": "myglobalcluster",
12 "GlobalClusterResourceId": "cluster-f5982077e3b5aabb",
13 "GlobalClusterArn": "arn:aws:rds::123456789012:global-cluster:myglobalcluster",
14 "Status": "available",
15 "Engine": "aurora-mysql",
16 "EngineVersion": "5.7.mysql_aurora.2.07.2",
17 "StorageEncrypted": false,
18 "DeletionProtection": false,
19 "GlobalClusterMembers": []
20 }
21 ]
22 }
23
24 For more information, see `Managing an Aurora global database <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-managing.html>`__ in the *Amazon Aurora User Guide*.
0 **To describe the installation media**
1
2 The following ``describe-installation-media`` example describes the installation media in the AWS Region. ::
3
4 aws rds describe-installation-media
5
6 Output::
7
8 {
9 "InstallationMedia": [
10 {
11 "InstallationMediaId": "ahIOEXAMPLE",
12 "CustomAvailabilityZoneId": "rds-caz-EXAMPLE1",
13 "Engine": "sqlserver-ee",
14 "EngineVersion": "13.00.5292.0.v1",
15 "EngineInstallationMediaPath": "SQLServerISO/en_sql_server_2016_enterprise_x64_dvd_8701793.iso",
16 "OSInstallationMediaPath": "WindowsISO/en_windows_server_2016_x64_dvd_9327751.iso",
17 "Status": "Available",
18 "FailureCause": {}
19 },
20 {
21 "InstallationMediaId": "AzHmpfEXample",
22 "CustomAvailabilityZoneId": "rds-caz-EXAMPLE2",
23 "Engine": "sqlserver-ee",
24 "EngineVersion": "13.00.5292.0.v1",
25 "EngineInstallationMediaPath": "SQLServerISO/en_sql_server_2016_enterprise_x64_dvd_8701793.iso",
26 "OSInstallationMediaPath": "WindowsISO/en_windows_server_2016_x64_dvd_9327751.iso",
27 "Status": "Importing",
28 "FailureCause": {}
29 }
30 ]
31 }
32
33 For more information, see `What is Amazon RDS on VMware? <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html>`__ in the *Amazon RDS on VMware User Guide*.
0 **To describe source regions**
0 **To describe source Regions**
11
2 The following ``describe-source-regions`` example retrieves details about all of the source regions. ::
2 The following ``describe-source-regions`` example retrieves details about all of the source AWS Regions. It also shows that automated backups can be replicated only from US West (Oregon) to the destination AWS Region, US East (N. Virginia). ::
33
4 aws rds describe-source-regions
4 aws rds describe-source-regions \
5 --region us-east-1
56
67 Output::
78
89 {
910 "SourceRegions": [
1011 {
12 "RegionName": "ap-east-1",
13 "Endpoint": "https://rds.ap-east-1.amazonaws.com",
14 "Status": "available",
15 "SupportsDBInstanceAutomatedBackupsReplication": false
16 },
17 {
1118 "RegionName": "ap-northeast-1",
1219 "Endpoint": "https://rds.ap-northeast-1.amazonaws.com",
13 "Status": "available"
20 "Status": "available",
21 "SupportsDBInstanceAutomatedBackupsReplication": false
1422 },
1523 {
1624 "RegionName": "ap-northeast-2",
1725 "Endpoint": "https://rds.ap-northeast-2.amazonaws.com",
18 "Status": "available"
26 "Status": "available",
27 "SupportsDBInstanceAutomatedBackupsReplication": false
28 },
29 {
30 "RegionName": "ap-northeast-3",
31 "Endpoint": "https://rds.ap-northeast-3.amazonaws.com",
32 "Status": "available",
33 "SupportsDBInstanceAutomatedBackupsReplication": false
1934 },
2035 {
2136 "RegionName": "ap-south-1",
2237 "Endpoint": "https://rds.ap-south-1.amazonaws.com",
23 "Status": "available"
38 "Status": "available",
39 "SupportsDBInstanceAutomatedBackupsReplication": false
2440 },
2541 {
2642 "RegionName": "ap-southeast-1",
2743 "Endpoint": "https://rds.ap-southeast-1.amazonaws.com",
28 "Status": "available"
44 "Status": "available",
45 "SupportsDBInstanceAutomatedBackupsReplication": false
2946 },
3047 {
3148 "RegionName": "ap-southeast-2",
3249 "Endpoint": "https://rds.ap-southeast-2.amazonaws.com",
33 "Status": "available"
50 "Status": "available",
51 "SupportsDBInstanceAutomatedBackupsReplication": false
52 },
53 {
54 "RegionName": "ca-central-1",
55 "Endpoint": "https://rds.ca-central-1.amazonaws.com",
56 "Status": "available",
57 "SupportsDBInstanceAutomatedBackupsReplication": false
3458 },
3559 {
3660 "RegionName": "eu-central-1",
3761 "Endpoint": "https://rds.eu-central-1.amazonaws.com",
38 "Status": "available"
62 "Status": "available",
63 "SupportsDBInstanceAutomatedBackupsReplication": false
64 },
65 {
66 "RegionName": "eu-north-1",
67 "Endpoint": "https://rds.eu-north-1.amazonaws.com",
68 "Status": "available",
69 "SupportsDBInstanceAutomatedBackupsReplication": false
3970 },
4071 {
4172 "RegionName": "eu-west-1",
4273 "Endpoint": "https://rds.eu-west-1.amazonaws.com",
43 "Status": "available"
74 "Status": "available",
75 "SupportsDBInstanceAutomatedBackupsReplication": false
4476 },
4577 {
4678 "RegionName": "eu-west-2",
4779 "Endpoint": "https://rds.eu-west-2.amazonaws.com",
48 "Status": "available"
80 "Status": "available",
81 "SupportsDBInstanceAutomatedBackupsReplication": false
82 },
83 {
84 "RegionName": "eu-west-3",
85 "Endpoint": "https://rds.eu-west-3.amazonaws.com",
86 "Status": "available",
87 "SupportsDBInstanceAutomatedBackupsReplication": false
88 },
89 {
90 "RegionName": "me-south-1",
91 "Endpoint": "https://rds.me-south-1.amazonaws.com",
92 "Status": "available",
93 "SupportsDBInstanceAutomatedBackupsReplication": false
4994 },
5095 {
5196 "RegionName": "sa-east-1",
5297 "Endpoint": "https://rds.sa-east-1.amazonaws.com",
53 "Status": "available"
98 "Status": "available",
99 "SupportsDBInstanceAutomatedBackupsReplication": false
54100 },
55101 {
56 "RegionName": "us-east-1",
57 "Endpoint": "https://rds.amazonaws.com",
58 "Status": "available"
102 "RegionName": "us-east-2",
103 "Endpoint": "https://rds.us-east-2.amazonaws.com",
104 "Status": "available",
105 "SupportsDBInstanceAutomatedBackupsReplication": false
59106 },
60107 {
61108 "RegionName": "us-west-1",
62109 "Endpoint": "https://rds.us-west-1.amazonaws.com",
63 "Status": "available"
110 "Status": "available",
111 "SupportsDBInstanceAutomatedBackupsReplication": false
112 },
113 {
114 "RegionName": "us-west-2",
115 "Endpoint": "https://rds.us-west-2.amazonaws.com",
116 "Status": "available",
117 "SupportsDBInstanceAutomatedBackupsReplication": true
64118 }
65119 ]
66120 }
121
122 For more information, see `Finding information about replicated backups <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html#AutomatedBackups.Replicating.Describe>`__ in the *Amazon RDS User Guide*.
0 **To import installation media**
1
2 The following ``import-installation-media`` imports installation media. ::
3
4 aws rds import-installation-media \
5 --custom-availability-zone-id rds-caz-EXAMPLE \
6 --engine sqlserver-ee --engine-version 13.00.5292.0.v1 \
7 --engine-installation-media-path SQLServerISO/en_sql_server_2016_enterprise_x64_dvd_8701793.iso \
8 --os-installation-media-path WindowsISO/en_windows_server_2016_x64_dvd_9327751.iso
9
10 Output::
11
12 {
13 "InstallationMediaId": "b1zcEXAMPLE",
14 "CustomAvailabilityZoneId": "rds-caz-EXAMPLE",
15 "Engine": "sqlserver-ee",
16 "EngineVersion": "13.00.5292.0.v1",
17 "EngineInstallationMediaPath": "SQLServerISO/en_sql_server_2016_enterprise_x64_dvd_8701793.iso",
18 "OSInstallationMediaPath": "WindowsISO/en_windows_server_2016_x64_dvd_9327751.iso",
19 "Status": "Importing",
20 "FailureCause": {}
21 }
22
23 For more information, see `What is Amazon RDS on VMware? <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html>`__ in the *Amazon RDS on VMware User Guide*.
0 **To modify a DB snapshot attribute**
0 **Example 1: To enable two AWS accounts to restore a DB snapshot**
11
2 The following ``modify-db-snapshot-attribute`` example enables two AWS account identifiers, ``111122223333`` and ``444455556666``, to restore the DB snapshot named ``mydbsnapshot``. ::
2 The following ``modify-db-snapshot-attribute`` example grants permission to two AWS accounts, with the identifiers ``111122223333`` and ``444455556666``, to restore the DB snapshot named ``mydbsnapshot``. ::
33
44 aws rds modify-db-snapshot-attribute \
55 --db-snapshot-identifier mydbsnapshot \
2424 }
2525
2626 For more information, see `Sharing a Snapshot <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ShareSnapshot.html#USER_ShareSnapshot.Sharing>`__ in the *Amazon RDS User Guide*.
27
28 **Example 2: To prevent an AWS account from restoring a DB snapshot**
29
30 The following ``modify-db-snapshot-attribute`` example removes permission from a particular AWS account to restore the DB snapshot named ``mydbsnapshot``. When specifying a single account, the account identifier can't be surrounded by quotations marks or braces. ::
31
32 aws rds modify-db-snapshot-attribute \
33 --db-snapshot-identifier mydbsnapshot \
34 --attribute-name restore \
35 --values-to-remove 444455556666
36
37 Output::
38
39 {
40 "DBSnapshotAttributesResult": {
41 "DBSnapshotIdentifier": "mydbsnapshot",
42 "DBSnapshotAttributes": [
43 {
44 "AttributeName": "restore",
45 "AttributeValues": [
46 "111122223333"
47 ]
48 }
49 ]
50 }
51 }
52
53 For more information, see `Sharing a Snapshot <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ShareSnapshot.html#USER_ShareSnapshot.Sharing>`__ in the *Amazon RDS User Guide*.
0 **To modify a global DB cluster**
1
2 The following ``modify-global-cluster`` example enables deletion protection for an Aurora MySQL-compatible global DB cluster. ::
3
4 aws rds modify-global-cluster \
5 --global-cluster-identifier myglobalcluster \
6 --deletion-protection
7
8 Output::
9
10 {
11 "GlobalCluster": {
12 "GlobalClusterIdentifier": "myglobalcluster",
13 "GlobalClusterResourceId": "cluster-f0e523bfe07aabb",
14 "GlobalClusterArn": "arn:aws:rds::123456789012:global-cluster:myglobalcluster",
15 "Status": "available",
16 "Engine": "aurora-mysql",
17 "EngineVersion": "5.7.mysql_aurora.2.07.2",
18 "StorageEncrypted": false,
19 "DeletionProtection": true,
20 "GlobalClusterMembers": []
21 }
22 }
23
24 For more information, see `Managing an Aurora global database <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-managing.html>`__ in the *Amazon Aurora User Guide*.
0 **To restore a DB instance to a point in time**
0 **Example 1: To restore a DB instance to a point in time**
11
2 The following ``restore-db-instance-to-point-in-time`` example restores ``test-instance`` to a new DB instance named ``restored-test-instance``, as of the specified time. ::
2 The following ``restore-db-instance-to-point-in-time`` example restores ``test-instance`` to a new DB instance named ``restored-test-instance``, as of the specified time. ::
33
44 aws rds restore-db-instance-to-point-in-time \
55 --source-db-instance-identifier test-instance \
1414 "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:restored-test-instance",
1515 "DBInstanceStatus": "creating",
1616 "DBInstanceIdentifier": "restored-test-instance",
17 ...some output truncated...
17 ...some output omitted...
1818 }
1919 }
20
21 For more information, see `Restoring a DB instance to a specified time <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIT.html>`__ in the *Amazon RDS User Guide*.
22
23 **Example 2: To restore a DB instance to a specified time from a replicated backup**
24
25 The following ``restore-db-instance-to-point-in-time`` example restores an Oracle DB instance to the specified time from a replicated automated backup. ::
26
27 aws rds restore-db-instance-to-point-in-time \
28 --source-db-instance-automated-backups-arn "arn:aws:rds:us-west-2:123456789012:auto-backup:ab-jkib2gfq5rv7replzadausbrktni2bn4example" \
29 --target-db-instance-identifier myorclinstance-from-replicated-backup \
30 --restore-time 2020-12-08T18:45:00.000Z
31
32 Output::
33
34 {
35 "DBInstance": {
36 "DBInstanceIdentifier": "myorclinstance-from-replicated-backup",
37 "DBInstanceClass": "db.t3.micro",
38 "Engine": "oracle-se2",
39 "DBInstanceStatus": "creating",
40 "MasterUsername": "admin",
41 "DBName": "ORCL",
42 "AllocatedStorage": 20,
43 "PreferredBackupWindow": "07:45-08:15",
44 "BackupRetentionPeriod": 14,
45 ... some output omitted ...
46 "DbiResourceId": "db-KGLXG75BGVIWKQT7NQ4EXAMPLE",
47 "CACertificateIdentifier": "rds-ca-2019",
48 "DomainMemberships": [],
49 "CopyTagsToSnapshot": false,
50 "MonitoringInterval": 0,
51 "DBInstanceArn": "arn:aws:rds:us-west-2:123456789012:db:myorclinstance-from-replicated-backup",
52 "IAMDatabaseAuthenticationEnabled": false,
53 "PerformanceInsightsEnabled": false,
54 "DeletionProtection": false,
55 "AssociatedRoles": [],
56 "TagList": []
57 }
58 }
59
60 For more information, see `Restoring to a specified time from a replicated backup <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html#AutomatedBackups.PiTR>`__ in the *Amazon RDS User Guide*.
0 **To enable cross-Region automated backups**
1
2 The following ``start-db-instance-automated-backups-replication`` example replicates automated backups from a DB instance in the US East (N. Virginia) Region to US West (Oregon). The backup retention period is 14 days. ::
3
4 aws rds start-db-instance-automated-backups-replication \
5 --region us-west-2 \
6 --source-db-instance-arn "arn:aws:rds:us-east-1:123456789012:db:new-orcl-db" \
7 --backup-retention-period 14
8
9 Output::
10
11 {
12 "DBInstanceAutomatedBackup": {
13 "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:new-orcl-db",
14 "DbiResourceId": "db-JKIB2GFQ5RV7REPLZA4EXAMPLE",
15 "Region": "us-east-1",
16 "DBInstanceIdentifier": "new-orcl-db",
17 "RestoreWindow": {},
18 "AllocatedStorage": 20,
19 "Status": "pending",
20 "Port": 1521,
21 "InstanceCreateTime": "2020-12-04T15:28:31Z",
22 "MasterUsername": "admin",
23 "Engine": "oracle-se2",
24 "EngineVersion": "12.1.0.2.v21",
25 "LicenseModel": "bring-your-own-license",
26 "OptionGroupName": "default:oracle-se2-12-1",
27 "Encrypted": false,
28 "StorageType": "gp2",
29 "IAMDatabaseAuthenticationEnabled": false,
30 "BackupRetentionPeriod": 14,
31 "DBInstanceAutomatedBackupsArn": "arn:aws:rds:us-west-2:123456789012:auto-backup:ab-jkib2gfq5rv7replzadausbrktni2bn4example"
32 }
33 }
34
35 For more information, see `Enabling cross-Region automated backups <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html#AutomatedBackups.Replicating.Enable>`__ in the *Amazon RDS User Guide*.
0 **To stop replicating automated backups**
1
2 The following ``stop-db-instance-automated-backups-replication`` ends replication of automated backups to the US West (Oregon) Region. Replicated backups are retained according to the set backup retention period. ::
3
4 aws rds stop-db-instance-automated-backups-replication \
5 --region us-west-2 \
6 --source-db-instance-arn "arn:aws:rds:us-east-1:123456789012:db:new-orcl-db"
7
8 Output::
9
10 {
11 "DBInstanceAutomatedBackup": {
12 "DBInstanceArn": "arn:aws:rds:us-east-1:123456789012:db:new-orcl-db",
13 "DbiResourceId": "db-JKIB2GFQ5RV7REPLZA4EXAMPLE",
14 "Region": "us-east-1",
15 "DBInstanceIdentifier": "new-orcl-db",
16 "RestoreWindow": {
17 "EarliestTime": "2020-12-04T23:13:21.030Z",
18 "LatestTime": "2020-12-07T19:59:57Z"
19 },
20 "AllocatedStorage": 20,
21 "Status": "replicating",
22 "Port": 1521,
23 "InstanceCreateTime": "2020-12-04T15:28:31Z",
24 "MasterUsername": "admin",
25 "Engine": "oracle-se2",
26 "EngineVersion": "12.1.0.2.v21",
27 "LicenseModel": "bring-your-own-license",
28 "OptionGroupName": "default:oracle-se2-12-1",
29 "Encrypted": false,
30 "StorageType": "gp2",
31 "IAMDatabaseAuthenticationEnabled": false,
32 "BackupRetentionPeriod": 7,
33 "DBInstanceAutomatedBackupsArn": "arn:aws:rds:us-west-2:123456789012:auto-backup:ab-jkib2gfq5rv7replzadausbrktni2bn4example"
34 }
35 }
36
37 For more information, see `Stopping automated backup replication <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html#AutomatedBackups.StopReplicating>`__ in the *Amazon RDS User Guide*.
0 **To list query logging configurations**
1
2 The following ``list-query-logging-configs`` example lists information about the first 100 query logging configurations in your AWS account, for the hosted zone ``Z1OX3WQEXAMPLE``. ::
3
4 aws route53 list-query-logging-configs \
5 --hosted-zone-id Z1OX3WQEXAMPLE
6
7 Output::
8
9 {
10 "QueryLoggingConfigs": [
11 {
12 "Id": "964ff34e-ae03-4f06-80a2-9683cexample",
13 "HostedZoneId": "Z1OX3WQEXAMPLE",
14 "CloudWatchLogsLogGroupArn": "arn:aws:logs:us-east-1:111122223333:log-group:/aws/route53/example.com:*"
15 }
16 ]
17 }
18
19 For more information, see
20 `Logging DNS queries <https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html>`__ in the *Amazon Route 53 Developer Guide*.
1818 ``mybucket``, the ``S3Uri`` would be ``s3://mybucket/myprefix/myobject``.
1919
2020 ``S3Uri`` also supports S3 access points. To specify an access point, this
21 value must be of the form ``s3://<access-point-arn>/<key>``. For for example if
21 value must be of the form ``s3://<access-point-arn>/<key>``. For example if
2222 the access point ``myaccesspoint`` to be used has the ARN:
2323 ``arn:aws:s3:us-west-2:123456789012:accesspoint/myaccesspoint`` and the object
2424 being accessed has the key ``mykey``, then the ``S3URI`` used must be:
0 The following ``ls`` command lists all of the bucket owned by the user. In this example, the user owns the buckets
1 ``mybucket`` and ``mybucket2``. The timestamp is the date the bucket was created, shown in your machine's time
2 zone. Note if ``s3://`` is used for the path argument ``<S3Uri>``, it will list all of the buckets as well::
0 **Example 1: Listing all user owned buckets**
1
2 The following ``ls`` command lists all of the bucket owned by the user. In this example, the user owns the buckets ``mybucket`` and ``mybucket2``. The timestamp is the date the bucket was created, shown in your machine's time zone. This date can change when making changes to your bucket, such as editing its bucket policy. Note if ``s3://`` is used for the path argument ``<S3Uri>``, it will list all of the buckets as well::
33
44 aws s3 ls
55
77
88 2013-07-11 17:08:50 mybucket
99 2013-07-24 14:55:44 mybucket2
10
11 **Example 2: Listing all prefixes and objects in a bucket**
1012
11 The following ``ls`` command lists objects and common prefixes under a specified bucket and prefix. In this example, the
12 user owns the bucket ``mybucket`` with the objects ``test.txt`` and ``somePrefix/test.txt``. The ``LastWriteTime`` and
13 ``Length`` are arbitrary. Note that since the ``ls`` command has no interaction with the local filesystem, the ``s3://``
14 URI scheme is not required to resolve ambiguity and may be omitted::
13 The following ``ls`` command lists objects and common prefixes under a specified bucket and prefix. In this example, the user owns the bucket ``mybucket`` with the objects ``test.txt`` and ``somePrefix/test.txt``. The ``LastWriteTime`` and ``Length`` are arbitrary. Note that since the ``ls`` command has no interaction with the local filesystem, the ``s3://`` URI scheme is not required to resolve ambiguity and may be omitted::
1514
1615 aws s3 ls s3://mybucket
1716
2019 PRE somePrefix/
2120 2013-07-25 17:06:27 88 test.txt
2221
22 **Example 3: Listing all prefixes and objects in a specific bucket and prefix**
2323
24 The following ``ls`` command lists objects and common prefixes under a specified bucket and prefix. However, there are
25 no objects nor common prefixes under the specified bucket and prefix::
24 The following ``ls`` command lists objects and common prefixes under a specified bucket and prefix. However, there are no objects nor common prefixes under the specified bucket and prefix::
2625
2726 aws s3 ls s3://mybucket/noExistPrefix
2827
2928 Output::
3029
3130 None
31
32 **Example 4: Recursively listing all prefixes and objects in a bucket**
3233
33 The following ``ls`` command will recursively list objects in a bucket. Rather than showing ``PRE dirname/`` in the
34 output, all the content in a bucket will be listed in order::
34 The following ``ls`` command will recursively list objects in a bucket. Rather than showing ``PRE dirname/`` in the output, all the content in a bucket will be listed in order::
3535
3636 aws s3 ls s3://mybucket --recursive
3737
4848 2013-09-02 21:32:57 189 foo/bar/.baz/hooks/foo
4949 2013-09-02 21:32:57 398 z.txt
5050
51 The following ``ls`` command demonstrates the same command using the --human-readable
52 and --summarize options. --human-readable displays file size in
53 Bytes/MiB/KiB/GiB/TiB/PiB/EiB. --summarize displays the total number of objects
54 and total size at the end of the result listing::
51 **Example 5: Summarizing all prefixes and objects in a bucket**
52
53 The following ``ls`` command demonstrates the same command using the --human-readable and --summarize options. --human-readable displays file size in Bytes/MiB/KiB/GiB/TiB/PiB/EiB. --summarize displays the total number of objects and total size at the end of the result listing::
5554
5655 aws s3 ls s3://mybucket --recursive --human-readable --summarize
5756
7170 Total Objects: 10
7271 Total Size: 2.9 MiB
7372
74 **Listing from an S3 access point**
73 **Example 6: Listing from an S3 access point**
7574
7675 The following ``ls`` command list objects from access point (``myaccesspoint``)::
7776
22 The following ``put-bucket-replication`` example applies a replication configuration to the specified S3 bucket. ::
33
44 aws s3api put-bucket-replication \
5 --bucket my-bucket \
5 --bucket AWSDOC-EXAMPLE-BUCKET1 \
66 --replication-configuration file://replication.json
77
88 Contents of ``replication.json``::
1616 "DeleteMarkerReplication": { "Status": "Disabled" },
1717 "Filter" : { "Prefix": ""},
1818 "Destination": {
19 "Bucket": "arn:aws:s3:::my-bucket-backup"
19 "Bucket": "arn:aws:s3:::AWSDOC-EXAMPLE-BUCKET2"
2020 }
2121 }
2222 ]
2323 }
2424
25 The destination bucket must be in a different region and have versioning enabled. The specified role must have permission to write to the destination bucket and have a trust relationship that allows Amazon S3 to assume the role.
25 The destination bucket must have versioning enabled. The specified role must have permission to write to the destination bucket and have a trust relationship that allows Amazon S3 to assume the role.
2626
2727 Example role permission policy::
2828
3131 "Statement": [
3232 {
3333 "Effect": "Allow",
34 "Action": "s3:*",
35 "Resource": "*"
34 "Action": [
35 "s3:GetReplicationConfiguration",
36 "s3:ListBucket"
37 ],
38 "Resource": [
39 "arn:aws:s3:::AWSDOC-EXAMPLE-BUCKET1"
40 ]
41 },
42 {
43 "Effect": "Allow",
44 "Action": [
45 "s3:GetObjectVersion",
46 "s3:GetObjectVersionAcl",
47 "s3:GetObjectVersionTagging"
48 ],
49 "Resource": [
50 "arn:aws:s3:::AWSDOC-EXAMPLE-BUCKET1/*"
51 ]
52 },
53 {
54 "Effect": "Allow",
55 "Action": [
56 "s3:ReplicateObject",
57 "s3:ReplicateDelete",
58 "s3:ReplicateTags"
59 ],
60 "Resource": "arn:aws:s3:::AWSDOC-EXAMPLE-BUCKET2/*"
3661 }
3762 ]
3863 }
5176 }
5277 ]
5378 }
79
80 This command produces no output.
81
82 For more information, see `This is the topic title <https://docs.aws.amazon.com/AmazonS3/latest/user-guide/enable-replication.html>`__ in the *Amazon Simple Storage Service Console User Guide*.
0 **To view information about an integration with AWS Organizations**
1
2 The following ``describe-organization-configuration`` example returns information about the integration with Organizations. ::
3
4 aws securityhub describe-organization-configuration
5
6 Output::
7
8 {
9 "autoEnable": true,
10 "memberAccountLimitReached": false
11 }
12
13 For more information, see `Managing accounts <https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-accounts.html>`__ in the *AWS Security Hub User Guide*.
0 **To remove a Security Hub administrator account**
1
2 The following ``disable-organization-admin-account`` example revokes the specified account's assignment as a Security Hub administrator account for AWS Organizations. ::
3
4 aws securityhub disable-organization-admin-account \
5 --admin-account-id 777788889999
6
7 This command produces no output.
8
9 For more information, see `Designating a Security Hub administrator account <https://docs.aws.amazon.com/securityhub/latest/userguide/designate-orgs-admin-account.html>`__ in the *AWS Security Hub User Guide*.
0 **To designate an organization account as a Security Hub administrator account**
1
2 The following ``enable-organization-admin-account`` example designates the specified account as a Security Hub administrator account. ::
3
4 aws securityhub enable-organization-admin-account \
5 --admin-account-id 777788889999
6
7 This command produces no output.
8
9 For more information, see `Designating a Security Hub administrator account <https://docs.aws.amazon.com/securityhub/latest/userguide/designate-orgs-admin-account.html>`__ in the *AWS Security Hub User Guide*.
0 **To list the designated Security Hub administrator accounts**
1
2 The following ``list-organization-admin-accounts`` example lists the Security Hub administrator accounts for an organization. ::
3
4 aws securityhub list-organization-admin-accounts
5
6 Output::
7
8 {
9 AdminAccounts": [
10 { "AccountId": "777788889999" },
11 { "Status": "ENABLED" }
12 ]
13 }
14
15 For more information, see `Designating a Security Hub administrator account <https://docs.aws.amazon.com/securityhub/latest/userguide/designate-orgs-admin-account.html>`__ in the *AWS Security Hub User Guide*.
0 **To configure Security Hub to automatically enable new organization accounts**
1
2 The following ``update-organization-configuration`` example configures Security Hub to automatically enable new accounts in an organization. ::
3
4 aws securityhub update-organization-configuration \
5 --auto-enable
6
7 This command produces no output.
8
9 For more information, see `Automatically enabling new organization accounts <https://docs.aws.amazon.com/securityhub/latest/userguide/accounts-orgs-auto-enable.html>`__ in the *AWS Security Hub User Guide*.
0 **To create a private DNS namespace**
1
2 The following ``create-private-dns-namespace`` example creates a private DNS namespace. ::
3
4 aws servicediscovery create-private-dns-namespace \
5 --name example.com \
6 --vpc vpc-1c56417b
7
8 Output::
9
10 {
11 "OperationId": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd"
12 }
13
14 To confirm that the operation succeeded, you can run ``get-operation``. For more information, see `get-operation <https://docs.aws.amazon.com/cli/latest/reference/servicediscovery/get-operation.html>`__ .
15
16 For more information, see `Creating namespaces <https://docs.aws.amazon.com/cloud-map/latest/dg/creating-namespaces.html>`__ in the *AWS Cloud Map Developer Guide*.
17
0 **To create a service**
1
2 The following ``create-service`` example creates a service. ::
3
4 aws servicediscovery create-service \
5 --name myservice \
6 --namespace-id ns-ylexjili4cdxy3xm \
7 --dns-config "NamespaceId=ns-ylexjili4cdxy3xm,RoutingPolicy=MULTIVALUE,DnsRecords=[{Type=A,TTL=60}]"
8
9 Output::
10
11 {
12 "Service": {
13 "Id": "srv-p5zdwlg5uvvzjita",
14 "Arn": "arn:aws:servicediscovery:us-west-2:803642222207:service/srv-p5zdwlg5uvvzjita",
15 "Name": "myservice",
16 "NamespaceId": "ns-ylexjili4cdxy3xm",
17 "DnsConfig": {
18 "NamespaceId": "ns-ylexjili4cdxy3xm",
19 "RoutingPolicy": "MULTIVALUE",
20 "DnsRecords": [
21 {
22 "Type": "A",
23 "TTL": 60
24 }
25 ]
26 },
27 "CreateDate": 1587081768.334,
28 "CreatorRequestId": "567c1193-6b00-4308-bd57-ad38a8822d25"
29 }
30 }
31
32 For more information, see `Creating services <https://docs.aws.amazon.com/cloud-map/latest/dg/creating-services.html>`__ in the *AWS Cloud Map Developer Guide*.
33
0 **To delete a namespace**
1
2 The following ``delete-namespace`` example deletes a namespace. ::
3
4 aws servicediscovery delete-namespace \
5 --id ns-ylexjili4cdxy3xm
6
7 Output::
8
9 {
10 "OperationId": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k98y6drk"
11 }
12
13 To confirm that the operation succeeded, you can run ``get-operation``. For more information, see `get-operation <https://docs.aws.amazon.com/cli/latest/reference/servicediscovery/get-operation.html>`__ .
14
15 For more information, see `Deleting namespaces <https://docs.aws.amazon.com/cloud-map/latest/dg/deleting-namespaces.html>`__ in the *AWS Cloud Map Developer Guide*.
16
0 **To delete a service**
1
2 The following ``delete-service`` example deletes a service. ::
3
4 aws servicediscovery delete-service \
5 --id srv-p5zdwlg5uvvzjita
6
7 This command produces no output.
8
9 For more information, see `Deleting services <https://docs.aws.amazon.com/cloud-map/latest/dg/deleting-services.html>`__ in the *AWS Cloud Map Developer Guide*.
10
0 **To deregister a service instance**
1
2 The following ``deregister-instance`` example deregisters a service instance. ::
3
4 aws servicediscovery deregister-instance \
5 --service-id srv-p5zdwlg5uvvzjita \
6 --instance-id myservice-53
7
8 Output::
9
10 {
11 "OperationId": "4yejorelbukcjzpnr6tlmrghsjwpngf4-k98rnaiq"
12 }
13
14 To confirm that the operation succeeded, you can run ``get-operation``. For more information, see `get-operation <https://docs.aws.amazon.com/cli/latest/reference/servicediscovery/get-operation.html>`__ .
15
16 For more information, see `Deregistering service instances <https://docs.aws.amazon.com/cloud-map/latest/dg/deregistering-instances.html>`__ in the *AWS Cloud Map Developer Guide*.
17
0 **To discover registered instances**
1
2 The following ``discover-instances`` example discovers registered instances. ::
3
4 aws servicediscovery discover-instances \
5 --namespace-name example.com \
6 --service-name myservice \
7 --max-results 10 \
8 --health-status ALL
9
10 Output::
11
12 {
13 "Instances": [
14 {
15 "InstanceId": "myservice-53",
16 "NamespaceName": "example.com",
17 "ServiceName": "myservice",
18 "HealthStatus": "UNKNOWN",
19 "Attributes": {
20 "AWS_INSTANCE_IPV4": "172.2.1.3",
21 "AWS_INSTANCE_PORT": "808"
22 }
23 }
24 ]
25 }
26
0 **To get the result of an operation**
1
2 The following ``get-operation`` example gets the result of an operation. ::
3
4 aws servicediscovery get-operation \
5 --operation-id gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd
6
7 Output::
8
9 {
10 "Operation": {
11 "Id": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd",
12 "Type": "CREATE_NAMESPACE",
13 "Status": "SUCCESS",
14 "CreateDate": 1587055860.121,
15 "UpdateDate": 1587055900.469,
16 "Targets": {
17 "NAMESPACE": "ns-ylexjili4cdxy3xm"
18 }
19 }
20 }
21
0 **To list service instances**
1
2 The following ``list-instances`` example lists service instances. ::
3
4 aws servicediscovery list-instances \
5 --service-id srv-qzpwvt2tfqcegapy
6
7 Output::
8
9 {
10 "Instances": [
11 {
12 "Id": "i-06bdabbae60f65a4e",
13 "Attributes": {
14 "AWS_INSTANCE_IPV4": "172.2.1.3",
15 "AWS_INSTANCE_PORT": "808"
16 }
17 }
18 ]
19 }
20
21 For more information, see `Viewing a list of service instances <https://docs.aws.amazon.com/cloud-map/latest/dg/listing-instances.html>`__ in the *AWS Cloud Map Developer Guide*.
22
0 **To deregister a service instance**
1
2 The following ``deregister-instance`` example deregisters a service instance. ::
3
4 aws servicediscovery deregister-instance \
5 --service-id srv-p5zdwlg5uvvzjita \
6 --instance-id myservice-53
7
8 Output::
9
10 {
11 "OperationId": "4yejorelbukcjzpnr6tlmrghsjwpngf4-k98rnaiq"
12 }
13
14 To confirm that the operation succeeded, you can run ``get-operation``. For more information, see `get-operation <https://docs.aws.amazon.com/cli/latest/reference/servicediscovery/get-operation.html>`__ .
15
16 For more information, see `Deregistering service instances <https://docs.aws.amazon.com/cloud-map/latest/dg/deregistering-instances.html>`__ in the *AWS Cloud Map Developer Guide*.
17
0 **To list services**
1
2 The following ``list-services`` example lists services. ::
3
4 aws servicediscovery list-services
5
6 Output::
7
8 {
9 "Services": [
10 {
11 "Id": "srv-p5zdwlg5uvvzjita",
12 "Arn": "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita",
13 "Name": "myservice",
14 "DnsConfig": {
15 "RoutingPolicy": "MULTIVALUE",
16 "DnsRecords": [
17 {
18 "Type": "A",
19 "TTL": 60
20 }
21 ]
22 },
23 "CreateDate": 1587081768.334
24 }
25 ]
26 }
27
28 For more information, see `Viewing a list of services <https://docs.aws.amazon.com/cloud-map/latest/dg/listing-services.html>`__ in the *AWS Cloud Map Developer Guide*.
29
0 **To register a service instance**
1
2 The following ``register-instance`` example registers a service instance. ::
3
4 aws servicediscovery register-instance \
5 --service-id srv-p5zdwlg5uvvzjita \
6 --instance-id myservice-53 \
7 --attributes=AWS_INSTANCE_IPV4=172.2.1.3,AWS_INSTANCE_PORT=808
8
9 Output::
10
11 {
12 "OperationId": "4yejorelbukcjzpnr6tlmrghsjwpngf4-k95yg2u7"
13 }
14
15 To confirm that the operation succeeded, you can run ``get-operation``. For more information, see `get-operation <https://docs.aws.amazon.com/cli/latest/reference/servicediscovery/get-operation.html>`__ .
16
17 For more information, see `Registering instances <https://docs.aws.amazon.com/cloud-map/latest/dg/registering-instances.html>`__ in the *AWS Cloud Map Developer Guide*.
18
0 **To associate a document using instance IDs**
0 **Example 1: To associate a document using instance IDs**
11
2 This example associates a configuration document with an instance, using instance IDs.
2 This example associates a configuration document with an instance, using instance IDs. ::
33
4 Command::
5
6 aws ssm create-association --instance-id "i-0cb2b964d3e14fd9f" --name "AWS-UpdateSSMAgent"
4 aws ssm create-association \
5 --instance-id "i-0cb2b964d3e14fd9f" \
6 --name "AWS-UpdateSSMAgent"
77
88 Output::
99
10 {
11 "AssociationDescription": {
12 "Status": {
10 {
11 "AssociationDescription": {
12 "Status": {
13 "Date": 1487875500.33,
14 "Message": "Associated with AWS-UpdateSSMAgent",
15 "Name": "Associated"
16 },
17 "Name": "AWS-UpdateSSMAgent",
18 "InstanceId": "i-0cb2b964d3e14fd9f",
19 "Overview": {
20 "Status": "Pending",
21 "DetailedStatus": "Creating"
22 },
23 "AssociationId": "b7c3266e-a544-44db-877e-b20d3a108189",
24 "DocumentVersion": "$DEFAULT",
25 "LastUpdateAssociationDate": 1487875500.33,
1326 "Date": 1487875500.33,
14 "Message": "Associated with AWS-UpdateSSMAgent",
15 "Name": "Associated"
16 },
17 "Name": "AWS-UpdateSSMAgent",
18 "InstanceId": "i-0cb2b964d3e14fd9f",
19 "Overview": {
20 "Status": "Pending",
21 "DetailedStatus": "Creating"
22 },
23 "AssociationId": "b7c3266e-a544-44db-877e-b20d3a108189",
24 "DocumentVersion": "$DEFAULT",
25 "LastUpdateAssociationDate": 1487875500.33,
26 "Date": 1487875500.33,
27 "Targets": [
28 {
29 "Values": [
30 "i-0cb2b964d3e14fd9f"
31 ],
32 "Key": "InstanceIds"
33 }
34 ]
27 "Targets": [
28 {
29 "Values": [
30 "i-0cb2b964d3e14fd9f"
31 ],
32 "Key": "InstanceIds"
33 }
34 ]
35 }
3536 }
36 }
3737
38 **To associate a document using targets**
38 For more information, see `CreateAssociation <https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html>`__ in the *AWS Systems Manager API Reference*.
3939
40 This example associates a configuration document with an instance, using targets.
40 **Example 2: To associate a document using targets**
4141
42 Command::
42 This example associates a configuration document with an instance, using targets. ::
4343
44 aws ssm create-association --name "AWS-UpdateSSMAgent" --targets "Key=instanceids,Values=i-0cb2b964d3e14fd9f"
45
44 aws ssm create-association \
45 --name "AWS-UpdateSSMAgent" \
46 --targets "Key=instanceids,Values=i-0cb2b964d3e14fd9f"
47
48 Output::
49
50 {
51 "AssociationDescription": {
52 "Status": {
53 "Date": 1487875500.33,
54 "Message": "Associated with AWS-UpdateSSMAgent",
55 "Name": "Associated"
56 },
57 "Name": "AWS-UpdateSSMAgent",
58 "InstanceId": "i-0cb2b964d3e14fd9f",
59 "Overview": {
60 "Status": "Pending",
61 "DetailedStatus": "Creating"
62 },
63 "AssociationId": "b7c3266e-a544-44db-877e-b20d3a108189",
64 "DocumentVersion": "$DEFAULT",
65 "LastUpdateAssociationDate": 1487875500.33,
66 "Date": 1487875500.33,
67 "Targets": [
68 {
69 "Values": [
70 "i-0cb2b964d3e14fd9f"
71 ],
72 "Key": "InstanceIds"
73 }
74 ]
75 }
76 }
77
78 For more information, see `CreateAssociation <https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html>`__ in the *AWS Systems Manager API Reference*.
79
80 **Example 3: To create an association that runs only once**
81
82 This example creates a new association that only runs once on the specified date and time. Associations created with a date in the past or present (by the time it is processed the date is in the past) run immediately. ::
83
84 aws ssm create-association \
85 --name "AWS-UpdateSSMAgent" \
86 --targets "Key=instanceids,Values=i-0cb2b964d3e14fd9f" \
87 --schedule-expression "at(2020-05-14T15:55:00)" \
88 --apply-only-at-cron-interval
89
90 Output::
91
92 {
93 "AssociationDescription": {
94 "Status": {
95 "Date": 1487875500.33,
96 "Message": "Associated with AWS-UpdateSSMAgent",
97 "Name": "Associated"
98 },
99 "Name": "AWS-UpdateSSMAgent",
100 "InstanceId": "i-0cb2b964d3e14fd9f",
101 "Overview": {
102 "Status": "Pending",
103 "DetailedStatus": "Creating"
104 },
105 "AssociationId": "b7c3266e-a544-44db-877e-b20d3a108189",
106 "DocumentVersion": "$DEFAULT",
107 "LastUpdateAssociationDate": 1487875500.33,
108 "Date": 1487875500.33,
109 "Targets": [
110 {
111 "Values": [
112 "i-0cb2b964d3e14fd9f"
113 ],
114 "Key": "InstanceIds"
115 }
116 ]
117 }
118 }
119
120 For more information, see `CreateAssociation <https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html>`__ in the *AWS Systems Manager API Reference* or `Reference: Cron and rate expressions for Systems Manager <https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html>`__ in the *AWS Systems Manager User Guide*.
00 **To delete a parameter**
11
2 This ``delete-parameter`` example deletes the specified single parameter. ::
2 The following ``delete-parameter`` example deletes the specified single parameter. ::
33
44 aws ssm delete-parameter \
55 --name "MyParameter"
66
77 This command produces no output.
88
9 For more information, see `Working with Parameters <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html>`_ in the *AWS Systems Manager User Guide*.
9 For more information, see `Working with Parameter Store <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-working-with.html>`__ in the *AWS Systems Manager User Guide*.
1616 ]
1717 }
1818
19 For more information, see `Working with Parameters <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html>`_ in the *AWS Systems Manager User Guide*.
19 For more information, see `Working with Parameter Store <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-working-with.html>`__ in the *AWS Systems Manager User Guide*.
4747 ]
4848 }
4949
50 For more information, see `Working with Parameter Versions <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-versions.html>`_ in the *AWS Systems Manager User Guide*.
50 For more information, see `Working with parameter versions <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-versions.html>`__ in the *AWS Systems Manager User Guide*.
1616 "ARN": "arn:aws:ssm:us-east-2:111222333444:parameter/MyStringParameter"
1717 }
1818 }
19
20 For more information, see `Working with Parameter Store <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-working-with.html>`__ in the *AWS Systems Manager User Guide*.
1921
2022 **Example 2: To decrypt the value of a SecureString parameter**
2123
3840 }
3941 }
4042
41 For more information, see `Working with Parameters <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html>`_ in the *AWS Systems Manager User Guide*.
43 For more information, see `Working with Parameter Store <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-working-with.html>`__ in the *AWS Systems Manager User Guide*.
2828 ]
2929 }
3030
31 For more information, see `Organizing Parameters into Hierarchies <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-organize.html>`_ in the *AWS Systems Manager User Guide*.
31 For more information, see `Working with parameter hierarchies <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-hierarchies.html>`__ in the *AWS Systems Manager User Guide*.
3030 ]
3131 }
3232
33 For more information, see `Working with Parameter Store <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-working-with.html>`__ in the *AWS Systems Manager User Guide*.
34
3335 **Example 2: To list names and values of multiple parameters using the ``--query`` option**
3436
3537 The following ``get-parameters`` example lists the names and values for the specified parameters. ::
5153 }
5254 ]
5355
54 For more information, see `Working with Parameters <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-working.html>`_ in the *AWS Systems Manager User Guide*.
56 For more information, see `Working with Parameter Store <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-working-with.html>`__ in the *AWS Systems Manager User Guide*.
00 **Example 1: To add a label to latest version of a parameter**
11
2 This ``label-parameter-version`` example adds a label to the latest version of the specified parameter. ::
2 The following ``label-parameter-version`` example adds a label to the latest version of the specified parameter. ::
33
44 aws ssm label-parameter-version \
55 --name "MyStringParameter" \
1212 "ParameterVersion": 3
1313 }
1414
15 For more information, see `Working with parameter labels <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html>`__ in the *AWS Systems Manager User Guide*.
16
1517 **Example 2: To add a label to a specific version of a parameter**
1618
17 This ``label-parameter-version`` example adds a label to the specified version of a parameter. ::
19 The following ``label-parameter-version`` example adds a label to the specified version of a parameter. ::
1820
1921 aws ssm label-parameter-version \
2022 --name "MyStringParameter" \
2123 --labels "ProductionReady" \
2224 --parameter-version "2" --labels "DevelopmentReady"
2325
24 For more information, see `Labeling Parameters <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html>`_ in the *AWS Systems Manager User Guide*.
26 For more information, see `Working with parameter labels <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html>`__ in the *AWS Systems Manager User Guide*.
0 **To list your associations for a specific instance**
0 **Example 1: To list your associations for a specific instance**
11
2 This example lists all the associations for an instance.
2 The following `list-associations` example lists all associations with the AssociationName, UpdateSSMAgent. ::
33
4 Command::
5
6 aws ssm list-associations --association-filter-list "key=InstanceId,value=i-1234567890abcdef0"
4 aws ssm list-associations /
5 --association-filter-list "key=AssociationName,value=UpdateSSMAgent"
76
87 Output::
98
10 {
11 "Associations": [
12 {
13 "Name": "AWS-UpdateSSMAgent",
14 "InstanceId": "i-1234567890abcdef0",
15 "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab",
16 "AssociationVersion": "1",
17 "Targets": [
18 {
19 "Key": "InstanceIds",
20 "Values": [
21 "i-016648b75dd622dab"
22 ]
23 }
24 ],
25 "Overview": {
26 "Status": "Pending",
27 "DetailedStatus": "Associated",
28 "AssociationStatusAggregatedCount": {
29 "Pending": 1
30 }
31 },
32 "ScheduleExpression": "cron(0 00 12 ? * SUN *)",
33 "AssociationName": "UpdateSSMAgent"
34 }
35 ]
36 }
9 {
10 "Associations": [
11 {
12 "Name": "AWS-UpdateSSMAgent",
13 "InstanceId": "i-1234567890abcdef0",
14 "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab",
15 "AssociationVersion": "1",
16 "Targets": [
17 {
18 "Key": "InstanceIds",
19 "Values": [
20 "i-016648b75dd622dab"
21 ]
22 }
23 ],
24 "Overview": {
25 "Status": "Pending",
26 "DetailedStatus": "Associated",
27 "AssociationStatusAggregatedCount": {
28 "Pending": 1
29 }
30 },
31 "ScheduleExpression": "cron(0 00 12 ? * SUN *)",
32 "AssociationName": "UpdateSSMAgent"
33 }
34 ]
35 }
3736
38 **To list your associations for a specific document**
37 For more information, see `Working with associations in Systems Manager <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-associations.html>`__ in the *Systems Manager User Guide*.
3938
40 This example lists all associations for the specified document.
39 **Example 2: To list your associations for a specific document**
4140
42 Command::
41 The following `list-associations` example lists all associations for the specified document. ::
4342
44 aws ssm list-associations --association-filter-list "key=Name,value=AWS-UpdateSSMAgent"
43 aws ssm list-associations /
44 --association-filter-list "key=Name,value=AWS-UpdateSSMAgent"
4545
4646 Output::
4747
48 {
49 "Associations": [
48 {
49 "Associations": [
50 {
51 "Name": "AWS-UpdateSSMAgent",
52 "InstanceId": "i-1234567890abcdef0",
53 "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab",
54 "AssociationVersion": "1",
55 "Targets": [
56 {
57 "Key": "InstanceIds",
58 "Values": [
59 "i-1234567890abcdef0"
60 ]
61 }
62 ],
63 "LastExecutionDate": 1550505828.548,
64 "Overview": {
65 "Status": "Success",
66 "DetailedStatus": "Success",
67 "AssociationStatusAggregatedCount": {
68 "Success": 1
69 }
70 },
71 "ScheduleExpression": "cron(0 00 12 ? * SUN *)",
72 "AssociationName": "UpdateSSMAgent"
73 },
5074 {
51 "Name": "AWS-UpdateSSMAgent",
52 "InstanceId": "i-1234567890abcdef0",
53 "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab",
54 "AssociationVersion": "1",
55 "Targets": [
56 {
57 "Key": "InstanceIds",
58 "Values": [
59 "i-1234567890abcdef0"
60 ]
61 }
62 ],
63 "LastExecutionDate": 1550505828.548,
64 "Overview": {
65 "Status": "Success",
66 "DetailedStatus": "Success",
67 "AssociationStatusAggregatedCount": {
68 "Success": 1
69 }
70 },
71 "ScheduleExpression": "cron(0 00 12 ? * SUN *)",
72 "AssociationName": "UpdateSSMAgent"
73 },
74 {
75 "Name": "AWS-UpdateSSMAgent",
76 "InstanceId": "i-9876543210abcdef0",
77 "AssociationId": "fbc07ef7-b985-4684-b82b-0123456789ab",
78 "AssociationVersion": "1",
79 "Targets": [
80 {
81 "Key": "InstanceIds",
82 "Values": [
83 "i-9876543210abcdef0"
84 ]
85 }
86 ],
87 "LastExecutionDate": 1550507531.0,
88 "Overview": {
89 "Status": "Success",
90 "AssociationStatusAggregatedCount": {
91 "Success": 1
75 "Name": "AWS-UpdateSSMAgent",
76 "InstanceId": "i-9876543210abcdef0",
77 "AssociationId": "fbc07ef7-b985-4684-b82b-0123456789ab",
78 "AssociationVersion": "1",
79 "Targets": [
80 {
81 "Key": "InstanceIds",
82 "Values": [
83 "i-9876543210abcdef0"
84 ]
85 }
86 ],
87 "LastExecutionDate": 1550507531.0,
88 "Overview": {
89 "Status": "Success",
90 "AssociationStatusAggregatedCount": {
91 "Success": 1
92 }
9293 }
9394 }
94 }
95 ]
96 }
95 ]
96 }
97
98 For more information, see `Working with associations in Systems Manager <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-associations.html>`__ in the *Systems Manager User Guide*.
1313 "Version": 2,
1414 "Tier": "Standard"
1515 }
16
17 For more information, see `Create a Systems Manager parameter (AWS CLI) <https://docs.aws.amazon.com/systems-manager/latest/userguide/param-create-cli.html>`__, 'Managing parameter tiers <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html>`__, and `Working with parameter policies <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html>`__ in the *AWS Systems Manager User Guide*.
1618
1719 **Example 2: To create an advanced parameter**
1820
3234 "Tier": "Advanced"
3335 }
3436
37 For more information, see `Create a Systems Manager parameter (AWS CLI) <https://docs.aws.amazon.com/systems-manager/latest/userguide/param-create-cli.html>`__, 'Managing parameter tiers <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html>`__, and `Working with parameter policies <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html>`__ in the *AWS Systems Manager User Guide*.
38
3539 **Example 3: To convert a standard parameter to an advanced parameter**
3640
3741 The following ``put-parameter`` example converts a existing standard parameter into an advanced parameter. ::
5054 "Tier": "Advanced"
5155 }
5256
57 For more information, see `Create a Systems Manager parameter (AWS CLI) <https://docs.aws.amazon.com/systems-manager/latest/userguide/param-create-cli.html>`__, 'Managing parameter tiers <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html>`__, and `Working with parameter policies <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html>`__ in the *AWS Systems Manager User Guide*.
58
5359 **Example 4: To create a parameter with a policy attached**
5460
5561 The following ``put-parameter`` example creates an advanced parameter with a parameter policy attached. ::
6773 "Version": 1,
6874 "Tier": "Advanced"
6975 }
76
77 For more information, see `Create a Systems Manager parameter (AWS CLI) <https://docs.aws.amazon.com/systems-manager/latest/userguide/param-create-cli.html>`__, 'Managing parameter tiers <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html>`__, and `Working with parameter policies <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html>`__ in the *AWS Systems Manager User Guide*.
7078
7179 **Example 5: To add a policy to an existing parameter**
7280
8795 "Tier": "Advanced"
8896 }
8997
90 For more information, see `About Parameters <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-about-examples.html>`__, About Advanced Parameters <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html>`__, and `Working with Parameter Policies <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html>`__ in the *AWS Systems Manager User Guide*.
98 For more information, see `Create a Systems Manager parameter (AWS CLI) <https://docs.aws.amazon.com/systems-manager/latest/userguide/param-create-cli.html>`__, 'Managing parameter tiers <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html>`__, and `Working with parameter policies <https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html>`__ in the *AWS Systems Manager User Guide*.
136136 See example 1 for sample output.
137137
138138 For more information, see `Running Commands Using Systems Manager Run Command <https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html>`__ in the *AWS Systems Manager User Guide*.
139
140 **Example 8: To run a command that uses a shared document**
141
142 The following ``send-command`` example runs a shared document on a target instance. ::
143
144 aws ssm send-command \
145 --document-name "arn:aws:ssm:us-east-1:123456789012:document/ExampleDocument" \
146 --targets "Key=instanceids,Values=i-1234567890abcdef0"
147
148 See example 1 for sample output.
149
150 For more information, see `Using shared SSM documents <https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-using-shared.html>`__ in the *AWS Systems Manager User Guide*.
0 **To execute an automation document**
0 **Example 1: To execute an automation document**
11
22 The following ``start-automation-execution`` example runs an Automation document. ::
33
1212 }
1313
1414 For more information, see `Running an Automation Workflow Manually <https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-working-executing-manually.html>`__ in the *AWS Systems Manager User Guide*.
15
16 **Example 2: To run a shared automation document**
17
18 The following ``start-automation-execution`` example runs a shared Automation document. ::
19
20 aws ssm start-automation-execution \
21 --document-name "arn:aws:ssm:us-east-1:123456789012:document/ExampleDocument"
22
23 Output::
24
25 {
26 "AutomationExecutionId": "4105a4fc-f944-11e6-9d32-0a1b2EXAMPLE"
27 }
28
29 For more information, see `Using shared SSM documents <https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-using-shared.html>`__ in the *AWS Systems Manager User Guide*.
22 The following ``get-session-token`` example retrieves a set of short-term credentials for the IAM identity making the call. The resulting credentials can be used for requests where multi-factor authentication (MFA) is required by policy. The credentials expire 15 minutes after they are generated. ::
33
44 aws sts get-session-token \
5 --session-duration 900 \
5 --duration-seconds 900 \
66 --serial-number "YourMFADeviceSerialNumber" \
77 --token-code 123456
88
0 **Example 1: To create a custom language model using both training and tuning data.**
1
2 The following ``create-language-model`` example creates a custom language model. You can use a custom language model to improve transcription performance for domains such as legal, hospitality, finance, and insurance. For language-code, enter a valid language code. For base-model-name, specify a base model that is best suited for the sample rate of the audio that you want to transcribe with your custom language model. For model-name, specify the name that you want to call the custom language model. ::
3
4 aws transcribe create-language-model \
5 --language-code language-code \
6 --base-model-name base-model-name \
7 --model-name cli-clm-example \
8 --input-data-config S3Uri="s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix-for-training-data",TuningDataS3Uri="s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix-for-tuning-data",DataAccessRoleArn="arn:aws:iam::AWS-account-number:role/IAM-role-with-permissions-to-create-a-custom-language-model"
9
10 Output::
11
12 {
13 "LanguageCode": "language-code",
14 "BaseModelName": "base-model-name",
15 "ModelName": "cli-clm-example",
16 "InputDataConfig": {
17 "S3Uri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix/",
18 "TuningDataS3Uri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix/",
19 "DataAccessRoleArn": "arn:aws:iam::AWS-account-number:role/IAM-role-with-permissions-create-a-custom-language-model"
20 },
21 "ModelStatus": "IN_PROGRESS"
22 }
23
24 For more information, see `Improving Domain-Specific Transcription Accuracy with Custom Language Models <https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html>`__ in the *Amazon Transcribe Developer Guide*.
25
26 **Example 2: To create a custom language model using only training data.**
27
28 The following ``create-language-model`` example transcribes your audio file. You can use a custom language model to improve transcription performance for domains such as legal, hospitality, finance, and insurance. For language-code, enter a valid language code. For base-model-name, specify a base model that is best suited for the sample rate of the audio that you want to transcribe with your custom language model. For model-name, specify the name that you want to call the custom language model. ::
29
30 aws transcribe create-language-model \
31 --language-code en-US \
32 --base-model-name base-model-name \
33 --model-name cli-clm-example \
34 --input-data-config S3Uri="s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix-For-Training-Data",DataAccessRoleArn="arn:aws:iam::AWS-account-number:role/IAM-role-with-permissions-to-create-a-custom-language-model"
35
36 Output::
37
38 {
39 "LanguageCode": "en-US",
40 "BaseModelName": "base-model-name",
41 "ModelName": "cli-clm-example",
42 "InputDataConfig": {
43 "S3Uri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix-For-Training-Data/",
44 "DataAccessRoleArn": "arn:aws:iam::your-AWS-account-number:role/IAM-role-with-permissions-to-create-a-custom-language-model"
45 },
46 "ModelStatus": "IN_PROGRESS"
47 }
48
49 For more information, see `Improving Domain-Specific Transcription Accuracy with Custom Language Models <https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To create a medical custom vocabulary**
1
2 The following ``create-medical-vocabulary`` example creates a custom vocabulary. To create a custom vocabulary, you must have created a text file with all the terms that you want to transcribe more accurately. For vocabulary-file-uri, specify the Amazon Simple Storage Service (Amazon S3) URI of that text file. For language-code, specify a language code corresponding to the language of your custom vocabulary. For vocabulary-name, specify what you want to call your custom vocabulary. ::
3
4 aws transcribe create-medical-vocabulary \
5 --vocabulary-name cli-medical-vocab-example \
6 --language-code language-code \
7 --vocabulary-file-uri https://DOC-EXAMPLE-BUCKET.AWS-Region.amazonaws.com/the-text-file-for-the-medical-custom-vocabulary.txt
8
9 Output::
10
11 {
12 "VocabularyName": "cli-medical-vocab-example",
13 "LanguageCode": "language-code",
14 "VocabularyState": "PENDING"
15 }
16
17 For more information, see `Medical Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary-med.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To create a vocabulary filter**
1
2 The following ``create-vocabulary-filter`` example creates a vocabulary filter that uses a text file that contains a list of words that you wouldn't want to appear in a transcription. For language-code, specify the language code corresponding to the language of your vocabulary filter. For vocabulary-filter-file-uri, specify the Amazon Simple Storage Service (Amazon S3) URI of the text file. For vocabulary-filter-name, specify the name of your vocabulary filter. ::
3
4 aws transcribe create-vocabulary-filter \
5 --language-code language-code \
6 --vocabulary-filter-file-uri s3://DOC-EXAMPLE-BUCKET/vocabulary-filter.txt \
7 --vocabulary-filter-name cli-vocabulary-filter-example
8
9 Output::
10
11 {
12 "VocabularyFilterName": "cli-vocabulary-filter-example",
13 "LanguageCode": "language-code"
14 }
15
16 For more information, see `Filtering Unwanted Words <https://docs.aws.amazon.com/transcribe/latest/dg/filter-unwanted-words.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To create a custom vocabulary**
1
2 The following ``create-vocabulary`` example creates a custom vocabulary. To create a custom vocabulary, you must have created a text file with all the terms that you want to transcribe more accurately. For vocabulary-file-uri, specify the Amazon Simple Storage Service (Amazon S3) URI of that text file. For language-code, specify a language code corresponding to the language of your custom vocabulary. For vocabulary-name, specify what you want to call your custom vocabulary. ::
3
4 aws transcribe create-vocabulary \
5 --language-code language-code \
6 --vocabulary-name cli-vocab-example \
7 --vocabulary-file-uri s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/the-text-file-for-the-custom-vocabulary.txt
8
9 Output::
10
11 {
12 "VocabularyName": "cli-vocab-example",
13 "LanguageCode": "language-code",
14 "VocabularyState": "PENDING"
15 }
16
17 For more information, see `Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To delete a custom language model**
1
2 The following ``delete-language-model`` example deletes a custom language model. ::
3
4 aws transcribe delete-language-model \
5 --model-name model-name
6
7 This command produces no output.
8
9 For more information, see `Improving Domain-Specific Transcription Accuracy with Custom Language Models <https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To delete a medical transcription job**
1
2 The following ``delete-medical-transcription-job`` example deletes a medical transcription job. ::
3
4 aws transcribe delete-medical-transcription-job \
5 --medical-transcription-job-name medical-transcription-job-name
6
7 This command produces no output.
8
9 For more information, see `DeleteMedicalTranscriptionJob <https://docs.aws.amazon.com/transcribe/latest/dg/API_DeleteMedicalTranscriptionJob.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To delete a medical custom vocabulary**
1
2 The following ``delete-medical-vocabulary`` example deletes a medical custom vocabulary. For vocabulary-name, specify the name of the medical custom vocabulary. ::
3
4 aws transcribe delete-vocabulary \
5 --vocabulary-name medical-custom-vocabulary-name
6
7 This command produces no output.
8
9 For more information, see `Medical Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary-med.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To delete one of your transcription jobs**
1
2 The following ``delete-transcription-job`` example deletes one of your transcription jobs. ::
3
4 aws transcribe delete-transcription-job \
5 --transcription-job-name your-transcription-job
6
7 This command produces no output.
8
9 For more information, see `DeleteTranscriptionJob <https://docs.aws.amazon.com/transcribe/latest/dg/API_DeleteTranscriptionJob.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To delete a vocabulary filter**
1
2 The following ``delete-vocabulary-filter`` example deletes a vocabulary filter. ::
3
4 aws transcribe delete-vocabulary-filter \
5 --vocabulary-filter-name vocabulary-filter-name
6
7 This command produces no output.
8
9 For more information, see `Filtering Unwanted Words <https://docs.aws.amazon.com/transcribe/latest/dg/filter-unwanted-words.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To delete a custom vocabulary**
1
2 The following ``delete-vocabulary`` example deletes a custom vocabulary. ::
3
4 aws transcribe delete-vocabulary \
5 --vocabulary-name vocabulary-name
6
7 This command produces no output.
8
9 For more information, see `Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To get information about a specific custom language model**
1
2 The following ``describe-language-model`` example gets information about a specific custom language model. For example, under BaseModelName you can see whether your model is trained using a NarrowBand or WideBand model. Custom language models with a NarrowBand base model can transcribe audio with a sample rate less than 16 kHz. Language models using a WideBand base model can transcribe audio with a sample rate greater than 16 kHz. The S3Uri parameter indicates the Amazon S3 prefix you've used to access the training data to create the custom language model. ::
3
4 aws transcribe describe-language-model \
5 --model-name cli-clm-example
6
7 Output::
8
9 {
10 "LanguageModel": {
11 "ModelName": "cli-clm-example",
12 "CreateTime": "2020-09-25T17:57:38.504000+00:00",
13 "LastModifiedTime": "2020-09-25T17:57:48.585000+00:00",
14 "LanguageCode": "language-code",
15 "BaseModelName": "base-model-name",
16 "ModelStatus": "IN_PROGRESS",
17 "UpgradeAvailability": false,
18 "InputDataConfig": {
19 "S3Uri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix/",
20 "TuningDataS3Uri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix/",
21 "DataAccessRoleArn": "arn:aws:iam::AWS-account-number:role/IAM-role-with-permissions-to-create-a-custom-language-model"
22 }
23 }
24 }
25
26 For more information, see `Improving Domain-Specific Transcription Accuracy with Custom Language Models <https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To get information about a specific medical transcription job**
1
2 The following ``get-medical-transcription-job`` example gets information about a specific medical transcription job. To access the transcription results, use the TranscriptFileUri parameter. If you've enabled additional features for the transcription job, you can see them in the Settings object. The Specialty parameter shows the medical specialty of the provider. The Type parameter indicates whether the speech in the transcription job is of a medical conversation, or a medical dictation. ::
3
4 aws transcribe get-medical-transcription-job \
5 --medical-transcription-job-name vocabulary-dictation-medical-transcription-job
6
7 Output::
8
9 {
10 "MedicalTranscriptionJob": {
11 "MedicalTranscriptionJobName": "vocabulary-dictation-medical-transcription-job",
12 "TranscriptionJobStatus": "COMPLETED",
13 "LanguageCode": "en-US",
14 "MediaSampleRateHertz": 48000,
15 "MediaFormat": "mp4",
16 "Media": {
17 "MediaFileUri": "s3://Amazon-S3-Prefix/your-audio-file.file-extension"
18 },
19 "Transcript": {
20 "TranscriptFileUri": "https://s3.Region.amazonaws.com/Amazon-S3-Prefix/vocabulary-dictation-medical-transcription-job.json"
21 },
22 "StartTime": "2020-09-21T21:17:27.045000+00:00",
23 "CreationTime": "2020-09-21T21:17:27.016000+00:00",
24 "CompletionTime": "2020-09-21T21:17:59.561000+00:00",
25 "Settings": {
26 "ChannelIdentification": false,
27 "ShowAlternatives": false,
28 "VocabularyName": "cli-medical-vocab-example"
29 },
30 "Specialty": "PRIMARYCARE",
31 "Type": "DICTATION"
32 }
33 }
34
35 For more information, see `Batch Transcription <https://docs.aws.amazon.com/transcribe/latest/dg/batch-med-transcription.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To get information about a medical custom vocabulary**
1
2 The following ``get-medical-vocabulary`` example gets information on a medical custom vocabulary. You can use the VocabularyState parameter to see the processing state of the vocabulary. If it's READY, you can use it in the StartMedicalTranscriptionJob operation.::
3
4 aws transcribe get-medical-vocabulary \
5 --vocabulary-name medical-vocab-example
6
7 Output::
8
9 {
10 "VocabularyName": "medical-vocab-example",
11 "LanguageCode": "en-US",
12 "VocabularyState": "READY",
13 "LastModifiedTime": "2020-09-19T23:59:04.349000+00:00",
14 "DownloadUri": "https://link-to-download-the-text-file-used-to-create-your-medical-custom-vocabulary"
15 }
16
17 For more information, see `Medical Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To get information about a specific transcription job**
1
2 The following ``get-transcription-job`` example gets information about a specific transcription job. To access the transcription results, use the TranscriptFileUri parameter. Use the MediaFileUri parameter to see which audio file you transcribed with this job. You can use the Settings object to see the optional features you've enabled in the transcription job. ::
3
4 aws transcribe get-transcription-job \
5 --transcription-job-name your-transcription-job
6
7 Output::
8
9 {
10 "TranscriptionJob": {
11 "TranscriptionJobName": "your-transcription-job",
12 "TranscriptionJobStatus": "COMPLETED",
13 "LanguageCode": "en-US",
14 "MediaSampleRateHertz": 48000,
15 "MediaFormat": "mp4",
16 "Media": {
17 "MediaFileUri": "s3://transcribe-learning-1/your-audio-file.file-extension"
18 },
19 "Transcript": {
20 "TranscriptFileUri": "https://Amazon-S3-file-location-of-transcription-output"
21 },
22 "StartTime": "2020-09-18T22:27:23.970000+00:00",
23 "CreationTime": "2020-09-18T22:27:23.948000+00:00",
24 "CompletionTime": "2020-09-18T22:28:21.197000+00:00",
25 "Settings": {
26 "ChannelIdentification": false,
27 "ShowAlternatives": false
28 },
29 "IdentifyLanguage": true,
30 "IdentifiedLanguageScore": 0.8672199249267578
31 }
32 }
33
34 For more information, see `Getting Started (AWS Command Line Interface) <https://docs.aws.amazon.com/transcribe/latest/dg/getting-started-cli.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To get information about a vocabulary filter**
1
2 The following ``get-vocabulary-filter`` example gets information about a vocabulary filter. You can use the DownloadUri parameter to get the list of words you used to create the vocabulary filter. ::
3
4 aws transcribe get-vocabulary-filter \
5 --vocabulary-filter-name testFilter
6
7 Output::
8
9 {
10 "VocabularyFilterName": "testFilter",
11 "LanguageCode": "en-US",
12 "LastModifiedTime": "2020-05-07T22:39:32.147000+00:00",
13 "DownloadUri": "https://Amazon-S3-location-to-download-your-vocabulary-filter"
14 }
15
16 For more information, see `Filter Unwanted Words <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To get information about a custom vocabulary**
1
2 The following ``get-vocabulary`` example gets information on a previously created custom vocabulary. ::
3
4 aws transcribe get-vocabulary \
5 --vocabulary-name cli-vocab-1
6
7 Output::
8
9 {
10 "VocabularyName": "cli-vocab-1",
11 "LanguageCode": "en-US",
12 "VocabularyState": "READY",
13 "LastModifiedTime": "2020-09-19T23:22:32.836000+00:00",
14 "DownloadUri": "https://link-to-download-the-text-file-used-to-create-your-custom-vocabulary"
15 }
16
17 For more information, see `Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To list your custom language models**
1
2 The following ``list-language-models`` example lists the custom language models associated with your AWS account and Region. You can use the ``S3Uri`` and ``TuningDataS3Uri`` parameters to find the Amazon S3 prefixes you've used as your training data, or your tuning data. The BaseModelName tells you whether you've used a NarrowBand, or WideBand model to create a custom language model. You can transcribe audio with a sample rate of less than 16 kHz with a custom language model using a NarrowBand base model. You can transcribe audio 16 kHz or greater with a custom language model using a WideBand base model. The ``ModelStatus`` parameter shows whether you can use the custom language model in a transcription job. If the value is COMPLETED, you can use it in a transcription job. ::
3
4 aws transcribe list-language-models
5
6 Output::
7
8 {
9 "Models": [
10 {
11 "ModelName": "cli-clm-2",
12 "CreateTime": "2020-09-25T17:57:38.504000+00:00",
13 "LastModifiedTime": "2020-09-25T17:57:48.585000+00:00",
14 "LanguageCode": "language-code",
15 "BaseModelName": "WideBand",
16 "ModelStatus": "IN_PROGRESS",
17 "UpgradeAvailability": false,
18 "InputDataConfig": {
19 "S3Uri": "s3://DOC-EXAMPLE-BUCKET/clm-training-data/",
20 "TuningDataS3Uri": "s3://DOC-EXAMPLE-BUCKET/clm-tuning/",
21 "DataAccessRoleArn": "arn:aws:iam::AWS-account-number:role/IAM-role-used-to-create-the-custom-language-model"
22 }
23 },
24 {
25 "ModelName": "cli-clm-1",
26 "CreateTime": "2020-09-25T17:16:01.835000+00:00",
27 "LastModifiedTime": "2020-09-25T17:16:15.555000+00:00",
28 "LanguageCode": "language-code",
29 "BaseModelName": "WideBand",
30 "ModelStatus": "IN_PROGRESS",
31 "UpgradeAvailability": false,
32 "InputDataConfig": {
33 "S3Uri": "s3://DOC-EXAMPLE-BUCKET/clm-training-data/",
34 "DataAccessRoleArn": "arn:aws:iam::AWS-account-number:role/IAM-role-used-to-create-the-custom-language-model"
35 }
36 },
37 {
38 "ModelName": "clm-console-1",
39 "CreateTime": "2020-09-24T19:26:28.076000+00:00",
40 "LastModifiedTime": "2020-09-25T04:25:22.271000+00:00",
41 "LanguageCode": "language-code",
42 "BaseModelName": "NarrowBand",
43 "ModelStatus": "COMPLETED",
44 "UpgradeAvailability": false,
45 "InputDataConfig": {
46 "S3Uri": "s3://DOC-EXAMPLE-BUCKET/clm-training-data/",
47 "DataAccessRoleArn": "arn:aws:iam::AWS-account-number:role/IAM-role-used-to-create-the-custom-language-model"
48 }
49 }
50 ]
51 }
52
53 For more information, see `Improving Domain-Specific Transcription Accuracy with Custom Language Models <https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To list your medical transcription jobs**
1
2 The following ``list-medical-transcription-jobs`` example lists the medical transcription jobs associated with your AWS account and Region. To get more information about a particular transcription job, copy the value of a MedicalTranscriptionJobName parameter in the transcription output, and specify that value for the ``MedicalTranscriptionJobName`` option of the ``get-medical-transcription-job`` command. To see more of your transcription jobs, copy the value of the NextToken parameter, run the ``list-medical-transcription-jobs`` command again, and specify that value in the ``--next-token`` option. ::
3
4 aws transcribe list-medical-transcription-jobs
5
6
7 Output::
8
9 {
10 "NextToken": "3/PblzkiGhzjER3KHuQt2fmbPLF7cDYafjFMEoGn44ON/gsuUSTIkGyanvRE6WMXFd/ZTEc2EZj+P9eii/z1O2FDYli6RLI0WoRX4RwMisVrh9G0Kie0Y8ikBCdtqlZB10Wa9McC+ebOl+LaDtZPC4u6ttoHLRlEfzqstHXSgapXg3tEBtm9piIaPB6MOM5BB6t86+qtmocTR/qrteHZBBudhTfbCwhsxaqujHiiUvFdm3BQbKKWIW06yV9b+4f38oD2lVIan+vfUs3gBYAl5VTDmXXzQPBQOHPjtwmFI+IWX15nSUjWuN3TUylHgPWzDaYT8qBtu0Z+3UG4V6b+K2CC0XszXg5rBq9hYgNzy4XoFh/6s5DoSnzq49Q9xHgHdT2yBADFmvFK7myZBsj75+2vQZOSVpWUPy3WT/32zFAcoELHR4unuWhXPwjbKU+mFYfUjtTZ8n/jq7aQEjQ42A+X/7K6JgOcdVPtEg8PlDr5kgYYG3q3OmYXX37U3FZuJmnTI63VtIXsNnOU5eGoYObtpk00Nq9UkzgSJxqj84ZD5n+S0EGy9ZUYBJRRcGeYUM3Q4DbSJfUwSAqcFdLIWZdp8qIREMQIBWy7BLwSdyqsQo2vRrd53hm5aWM7SVf6pPq6X/IXR5+1eUOOD8/coaTT4ES2DerbV6RkV4o0VT1d0SdVX/MmtkNG8nYj8PqU07w7988quh1ZP6D80veJS1q73tUUR9MjnGernW2tAnvnLNhdefBcD+sZVfYq3iBMFY7wTy1P1G6NqW9GrYDYoX3tTPWlD7phpbVSyKrh/PdYrps5UxnsGoA1b7L/FfAXDfUoGrGUB4N3JsPYXX9D++g+6gV1qBBs/WfF934aKqfD6UTggm/zV3GAOWiBpfvAZRvEb924i6yGHyMC7y54O1ZAwSBupmI+FFd13CaPO4kN1vJlth6aM5vUPXg4BpyUhtbRhwD/KxCvf9K0tLJGyL1A==",
11 "MedicalTranscriptionJobSummaries": [
12 {
13 "MedicalTranscriptionJobName": "vocabulary-dictation-medical-transcription-job",
14 "CreationTime": "2020-09-21T21:17:27.016000+00:00",
15 "StartTime": "2020-09-21T21:17:27.045000+00:00",
16 "CompletionTime": "2020-09-21T21:17:59.561000+00:00",
17 "LanguageCode": "en-US",
18 "TranscriptionJobStatus": "COMPLETED",
19 "OutputLocationType": "CUSTOMER_BUCKET",
20 "Specialty": "PRIMARYCARE",
21 "Type": "DICTATION"
22 },
23 {
24 "MedicalTranscriptionJobName": "alternatives-dictation-medical-transcription-job",
25 "CreationTime": "2020-09-21T21:01:14.569000+00:00",
26 "StartTime": "2020-09-21T21:01:14.592000+00:00",
27 "CompletionTime": "2020-09-21T21:01:43.606000+00:00",
28 "LanguageCode": "en-US",
29 "TranscriptionJobStatus": "COMPLETED",
30 "OutputLocationType": "CUSTOMER_BUCKET",
31 "Specialty": "PRIMARYCARE",
32 "Type": "DICTATION"
33 },
34 {
35 "MedicalTranscriptionJobName": "alternatives-conversation-medical-transcription-job",
36 "CreationTime": "2020-09-21T19:09:18.171000+00:00",
37 "StartTime": "2020-09-21T19:09:18.199000+00:00",
38 "CompletionTime": "2020-09-21T19:10:22.516000+00:00",
39 "LanguageCode": "en-US",
40 "TranscriptionJobStatus": "COMPLETED",
41 "OutputLocationType": "CUSTOMER_BUCKET",
42 "Specialty": "PRIMARYCARE",
43 "Type": "CONVERSATION"
44 },
45 {
46 "MedicalTranscriptionJobName": "speaker-id-conversation-medical-transcription-job",
47 "CreationTime": "2020-09-21T18:43:37.157000+00:00",
48 "StartTime": "2020-09-21T18:43:37.265000+00:00",
49 "CompletionTime": "2020-09-21T18:44:21.192000+00:00",
50 "LanguageCode": "en-US",
51 "TranscriptionJobStatus": "COMPLETED",
52 "OutputLocationType": "CUSTOMER_BUCKET",
53 "Specialty": "PRIMARYCARE",
54 "Type": "CONVERSATION"
55 },
56 {
57 "MedicalTranscriptionJobName": "multichannel-conversation-medical-transcription-job",
58 "CreationTime": "2020-09-20T23:46:44.053000+00:00",
59 "StartTime": "2020-09-20T23:46:44.081000+00:00",
60 "CompletionTime": "2020-09-20T23:47:35.851000+00:00",
61 "LanguageCode": "en-US",
62 "TranscriptionJobStatus": "COMPLETED",
63 "OutputLocationType": "CUSTOMER_BUCKET",
64 "Specialty": "PRIMARYCARE",
65 "Type": "CONVERSATION"
66 }
67 ]
68 }
69
70 For more information, see `https://docs.aws.amazon.com/transcribe/latest/dg/batch-med-transcription.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To list your medical custom vocabularies**
1
2 The following ``list-medical-vocabularies`` example lists the medical custom vocabularies associated with your AWS account and Region. To get more information about a particular transcription job, copy the value of a ``MedicalTranscriptionJobName`` parameter in the transcription output, and specify that value for the ``MedicalTranscriptionJobName`` option of the ``get-medical-transcription-job`` command. To see more of your transcription jobs, copy the value of the ``NextToken`` parameter, run the ``list-medical-transcription-jobs`` command again, and specify that value in the ``--next-token`` option. ::
3
4 aws transcribe list-medical-vocabularies
5
6 Output::
7
8 {
9 "Vocabularies": [
10 {
11 "VocabularyName": "cli-medical-vocab-2",
12 "LanguageCode": "en-US",
13 "LastModifiedTime": "2020-09-21T21:44:59.521000+00:00",
14 "VocabularyState": "READY"
15 },
16 {
17 "VocabularyName": "cli-medical-vocab-1",
18 "LanguageCode": "en-US",
19 "LastModifiedTime": "2020-09-19T23:59:04.349000+00:00",
20 "VocabularyState": "READY"
21 }
22 ]
23 }
24
25 For more information, see `Medical Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary-med.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To list your transcription jobs**
1
2 The following ``list-transcription-jobs`` example lists the transcription jobs associated with your AWS account and Region. ::
3
4 aws transcribe list-transcription-jobs
5
6 Output::
7
8 {
9 "NextToken": "3/Q22yZ4n/FldYqPp93OxJf+3XU2rPiLLq65acAo3UGeSn9C1j6ZnHqRrN5HC8FWQ8OToBM443mN2ZcSO+h7XSO1mMPKFipI7QZ9wY0qkFKLSlfqofUl6BShbz7b/T7oZZTG+MtFdhNTnIiLRLtAQRDM4owpJt7ao4UXbQ9Zi4zMx0c9b+hPZZI1lmcIPHS66Spye7bwd5/IO9DCDFww+xE/LXoVlzGtXBvDRJfbG+K0P52yc73Z4WEle3f4CuwSmPutAWTKdLzPpuf8mOoKdjY9MW+KAvm6kpjeIN5JgTY7EJO3FPi+ezHrSgEFrfSglwK8FEX2AawwG/iPFSxvn9+fdSAPaWfW0yxDo8Z4VJd2GS9A4vsyzms1UXiRqkyVFMbrsmL7OjL3PlRZnT/MhqsgtpIZDU9Keb+9enaWsaLwovaHJc62Q7P9MwhqGgLjwRZuQS/BT2IQ7LkQioxVPS2Z3YYP1rMHYUtorfFcZF9ZCdca9IJ3Z+Rrvu7bVAOxmepJGDWKpDCNOigWCYAC1MWL2sHy57rNRHstZMz36+fgXxa7T25Wg5OX1hcm3Uk/bpIsHCHVMMLyjJxJtuknKtCtsLokBVQisNBWdlerjXcOttUxKVYIxJ4Tf7rOSp7JYOwASm7WPoNWJsNywPKjjTCftBYC6+BuFZ2kusnDwIsrYpM6/QMH2WnO77ka8fOAd7bSLdBpnFv+NtUz7+3uEYiLuuLf6nBk+sK0evfBOf1LCfscyluobaOevz/+WAsjEJ64fV8wcVTD+1fIGOXnG0rVwBZpQdAOy9k8IHubV2sSax+0sqR05gv7IYiYM9YjMerRy4CjMZidwtwmKElzPczq2qscYcXdjx/CFXi7/y0MXG1iA=",
10 "TranscriptionJobSummaries": [
11 {
12 "TranscriptionJobName": "speak-id-job-1",
13 "CreationTime": "2020-08-17T21:06:15.391000+00:00",
14 "StartTime": "2020-08-17T21:06:15.416000+00:00",
15 "CompletionTime": "2020-08-17T21:07:05.098000+00:00",
16 "LanguageCode": "en-US",
17 "TranscriptionJobStatus": "COMPLETED",
18 "OutputLocationType": "SERVICE_BUCKET"
19 },
20 {
21 "TranscriptionJobName": "job-1",
22 "CreationTime": "2020-08-17T20:50:24.207000+00:00",
23 "StartTime": "2020-08-17T20:50:24.230000+00:00",
24 "CompletionTime": "2020-08-17T20:52:18.737000+00:00",
25 "LanguageCode": "en-US",
26 "TranscriptionJobStatus": "COMPLETED",
27 "OutputLocationType": "SERVICE_BUCKET"
28 },
29 {
30 "TranscriptionJobName": "sdk-test-job-4",
31 "CreationTime": "2020-08-17T20:32:27.917000+00:00",
32 "StartTime": "2020-08-17T20:32:27.956000+00:00",
33 "CompletionTime": "2020-08-17T20:33:15.126000+00:00",
34 "LanguageCode": "en-US",
35 "TranscriptionJobStatus": "COMPLETED",
36 "OutputLocationType": "SERVICE_BUCKET"
37 },
38 {
39 "TranscriptionJobName": "Diarization-speak-id",
40 "CreationTime": "2020-08-10T22:10:09.066000+00:00",
41 "StartTime": "2020-08-10T22:10:09.116000+00:00",
42 "CompletionTime": "2020-08-10T22:26:48.172000+00:00",
43 "LanguageCode": "en-US",
44 "TranscriptionJobStatus": "COMPLETED",
45 "OutputLocationType": "SERVICE_BUCKET"
46 },
47 {
48 "TranscriptionJobName": "your-transcription-job-name",
49 "CreationTime": "2020-07-29T17:45:09.791000+00:00",
50 "StartTime": "2020-07-29T17:45:09.826000+00:00",
51 "CompletionTime": "2020-07-29T17:46:20.831000+00:00",
52 "LanguageCode": "en-US",
53 "TranscriptionJobStatus": "COMPLETED",
54 "OutputLocationType": "SERVICE_BUCKET"
55 }
56 ]
57 }
58
59 For more information, see `Getting Started (AWS Command Line Interface) <https://docs.aws.amazon.com/transcribe/latest/dg/getting-started-cli.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To list your custom vocabularies**
1
2 The following ``list-vocabularies`` example lists the custom vocabularies associated with your AWS account and Region. ::
3
4 aws transcribe list-vocabularies
5
6 Output::
7
8 {
9 "NextToken": "NextToken",
10 "Vocabularies": [
11 {
12 "VocabularyName": "ards-test-1",
13 "LanguageCode": "en-US",
14 "LastModifiedTime": "2020-04-27T22:00:27.330000+00:00",
15 "VocabularyState": "READY"
16 },
17 {
18 "VocabularyName": "sample-test",
19 "LanguageCode": "en-US",
20 "LastModifiedTime": "2020-04-24T23:04:11.044000+00:00",
21 "VocabularyState": "READY"
22 },
23 {
24 "VocabularyName": "CRLF-to-LF-test-3-1",
25 "LanguageCode": "en-US",
26 "LastModifiedTime": "2020-04-24T22:12:22.277000+00:00",
27 "VocabularyState": "READY"
28 },
29 {
30 "VocabularyName": "CRLF-to-LF-test-2",
31 "LanguageCode": "en-US",
32 "LastModifiedTime": "2020-04-24T21:53:50.455000+00:00",
33 "VocabularyState": "READY"
34 },
35 {
36 "VocabularyName": "CRLF-to-LF-1-1",
37 "LanguageCode": "en-US",
38 "LastModifiedTime": "2020-04-24T21:39:33.356000+00:00",
39 "VocabularyState": "READY"
40 }
41 ]
42 }
43
44 For more information, see `Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To list your vocabulary filters**
1
2 The following ``list-vocabulary-filters`` example lists the vocabulary filters associated with your AWS account and Region. ::
3
4 aws transcribe list-vocabulary-filters
5
6 Output::
7
8 {
9 "NextToken": "3/PblzkiGhzjER3KHuQt2fmbPLF7cDYafjFMEoGn44ON/gsuUSTIkGyanvRE6WMXFd/ZTEc2EZj+P9eii/z1O2FDYli6RLI0WoRX4RwMisVrh9G0Kie0Y8ikBCdtqlZB10Wa9McC+ebOl+LaDtZPC4u1fkmh8CxJgHjDlWqBB8cTO1Sk+V6cYZDyqUkdUI6NJGmhhz74PEDlywYgZisdj9QdsNIz0G6D2xE3YDke4KXbq6fmlP8DUDixk7uJPctVm0T3qNMtpJEH/tXz6xa1PTzTTnFD7E1nSqDLXXlU4mWIt58Wd2Rg/CIwAYZxgXxbg3Vbn5YDZR2pdgHTjIKEeFU1F4WAIwLKRJWuJj9/6pxynBnp0bVZlM3UNQcxL1+ZzOELOUbooHv1HIiSvCz8imgFQ8dxT+tnFCoFloGJgEKmX00xxaWSpGU9OUVtQm0rrntY/y78HHmjT8aY8gdfFmpbsQlGy64rEF1jHrEwnIvQ8P0cphsWd6l3gYhI0Ieb/jMs6A+66Q1VhgmIJD9sX8L25wjPgwz2pJ/u44fuis/HecqExWIENl8Zaiegkx5Cpa4tf4+OzN9VUVuipPNzt0jGP1szyA313b77C76/jtrNE=",
10 "VocabularyFilters": [
11 {
12 "VocabularyFilterName": "testFilter",
13 "LanguageCode": "en-US",
14 "LastModifiedTime": "2020-05-07T22:39:32.147000+00:00"
15 },
16 {
17 "VocabularyFilterName": "monkey-filter",
18 "LanguageCode": "en-US",
19 "LastModifiedTime": "2020-05-21T23:29:35.174000+00:00"
20 },
21 {
22 "VocabularyFilterName": "filter2",
23 "LanguageCode": "en-US",
24 "LastModifiedTime": "2020-05-08T20:18:26.426000+00:00"
25 },
26 {
27 "VocabularyFilterName": "filter-review",
28 "LanguageCode": "en-US",
29 "LastModifiedTime": "2020-06-03T18:52:30.448000+00:00"
30 },
31 {
32 "VocabularyFilterName": "crlf-filt",
33 "LanguageCode": "en-US",
34 "LastModifiedTime": "2020-05-22T19:42:42.737000+00:00"
35 }
36 ]
37 }
38
39 For more information, see `Filtering Unwanted Words <https://docs.aws.amazon.com/transcribe/latest/dg/filter-unwanted-words.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **Example 1: To transcribe a medical dictation stored as an audio file**
1
2 The following ``start-medical-transcription-job`` example transcribes an audio file. You specify the location of the transcription output in the ``OutputBucketName`` parameter. ::
3
4 aws transcribe start-medical-transcription-job \
5 --cli-input-json file://myfile.json
6
7 Contents of ``myfile.json``::
8
9 {
10 "MedicalTranscriptionJobName": "simple-dictation-medical-transcription-job",
11 "LanguageCode": "language-code",
12 "Specialty": "PRIMARYCARE",
13 "Type": "DICTATION",
14 "OutputBucketName":"DOC-EXAMPLE-BUCKET",
15 "Media": {
16 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
17 }
18 }
19
20 Output::
21
22 {
23 "MedicalTranscriptionJob": {
24 "MedicalTranscriptionJobName": "simple-dictation-medical-transcription-job",
25 "TranscriptionJobStatus": "IN_PROGRESS",
26 "LanguageCode": "language-code",
27 "Media": {
28 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
29 },
30 "StartTime": "2020-09-20T00:35:22.256000+00:00",
31 "CreationTime": "2020-09-20T00:35:22.218000+00:00",
32 "Specialty": "PRIMARYCARE",
33 "Type": "DICTATION"
34 }
35 }
36
37 For more information, see `Batch Transcription Overview <https://docs.aws.amazon.com/transcribe/latest/dg/batch-med-transcription.html>`__ in the *Amazon Transcribe Developer Guide*.
38
39 **Example 2: To transcribe a clinician-patient dialogue stored as an audio file**
40
41 The following ``start-medical-transcription-job`` example transcribes an audio file containing a clinician-patient dialogue. You specify the location of the transcription output in the OutputBucketName parameter. ::
42
43 aws transcribe start-medical-transcription-job \
44 --cli-input-json file://mysecondfile.json
45
46 Contents of ``mysecondfile.json``::
47
48 {
49 "MedicalTranscriptionJobName": "simple-dictation-medical-transcription-job",
50 "LanguageCode": "language-code",
51 "Specialty": "PRIMARYCARE",
52 "Type": "CONVERSATION",
53 "OutputBucketName":"DOC-EXAMPLE-BUCKET",
54 "Media": {
55 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
56 }
57 }
58
59 Output::
60
61 {
62 "MedicalTranscriptionJob": {
63 "MedicalTranscriptionJobName": "simple-conversation-medical-transcription-job",
64 "TranscriptionJobStatus": "IN_PROGRESS",
65 "LanguageCode": "language-code",
66 "Media": {
67 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
68 },
69 "StartTime": "2020-09-20T23:19:49.965000+00:00",
70 "CreationTime": "2020-09-20T23:19:49.941000+00:00",
71 "Specialty": "PRIMARYCARE",
72 "Type": "CONVERSATION"
73 }
74 }
75
76 For more information, see `Batch Transcription Overview <https://docs.aws.amazon.com/transcribe/latest/dg/batch-med-transcription.html>`__ in the *Amazon Transcribe Developer Guide*.
77
78 **Example 3: To transcribe a multichannel audio file of a clinician-patient dialogue**
79
80 The following ``start-medical-transcription-job`` example transcribes the audio from each channel in the audio file and merges the separate transcriptions from each channel into a single transcription output. You specify the location of the transcription output in the ``OutputBucketName`` parameter. ::
81
82 aws transcribe start-medical-transcription-job \
83 --cli-input-json file://mythirdfile.json
84
85 Contents of ``mythirdfile.json``::
86
87 {
88 "MedicalTranscriptionJobName": "multichannel-conversation-medical-transcription-job",
89 "LanguageCode": "language-code",
90 "Specialty": "PRIMARYCARE",
91 "Type": "CONVERSATION",
92 "OutputBucketName":"DOC-EXAMPLE-BUCKET",
93 "Media": {
94 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
95 },
96 "Settings":{
97 "ChannelIdentification": true
98 }
99 }
100
101 Output::
102
103 {
104 "MedicalTranscriptionJob": {
105 "MedicalTranscriptionJobName": "multichannel-conversation-medical-transcription-job",
106 "TranscriptionJobStatus": "IN_PROGRESS",
107 "LanguageCode": "language-code",
108 "Media": {
109 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
110 },
111 "StartTime": "2020-09-20T23:46:44.081000+00:00",
112 "CreationTime": "2020-09-20T23:46:44.053000+00:00",
113 "Settings": {
114 "ChannelIdentification": true
115 },
116 "Specialty": "PRIMARYCARE",
117 "Type": "CONVERSATION"
118 }
119 }
120
121 For more information, see `Channel Identification <https://docs.aws.amazon.com/transcribe/latest/dg/how-channel-id-med.html>`__ in the *Amazon Transcribe Developer Guide*.
122
123 **Example 4: To transcribe an audio file of a clinician-patient dialogue and identify the speakers in the transcription output**
124
125 The following ``start-medical-transcription-job`` example transcribes an audio file and labels the speech of each speaker in the transcription output. You specify the location of the transcription output in the ``OutputBucketName`` parameter. ::
126
127 aws transcribe start-medical-transcription-job \
128 --cli-input-json file://myfourthfile.json
129
130 Contents of ``myfourthfile.json``::
131
132 {
133 "MedicalTranscriptionJobName": "speaker-id-conversation-medical-transcription-job",
134 "LanguageCode": "language-code",
135 "Specialty": "PRIMARYCARE",
136 "Type": "CONVERSATION",
137 "OutputBucketName":"DOC-EXAMPLE-BUCKET",
138 "Media": {
139 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
140 },
141 "Settings":{
142 "ShowSpeakerLabels": true,
143 "MaxSpeakerLabels": 2
144 }
145 }
146
147 Output::
148
149 {
150 "MedicalTranscriptionJob": {
151 "MedicalTranscriptionJobName": "speaker-id-conversation-medical-transcription-job",
152 "TranscriptionJobStatus": "IN_PROGRESS",
153 "LanguageCode": "language-code",
154 "Media": {
155 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
156 },
157 "StartTime": "2020-09-21T18:43:37.265000+00:00",
158 "CreationTime": "2020-09-21T18:43:37.157000+00:00",
159 "Settings": {
160 "ShowSpeakerLabels": true,
161 "MaxSpeakerLabels": 2
162 },
163 "Specialty": "PRIMARYCARE",
164 "Type": "CONVERSATION"
165 }
166 }
167
168 For more information, see `Identifying Speakers <https://docs.aws.amazon.com/transcribe/latest/dg/diarization-med.html>`__ in the *Amazon Transcribe Developer Guide*.
169
170 **Example 5: To transcribe a medical conversation stored as an audio file with up to two transcription alternatives**
171
172 The following ``start-medical-transcription-job`` example creates up to two alternative transcriptions from a single audio file. Every transcriptions has a level of confidence associated with it. By default, Amazon Transcribe returns the transcription with the highest confidence level. You can specify that Amazon Transcribe return additional transcriptions with lower confidence levels. You specify the location of the transcription output in the ``OutputBucketName`` parameter. ::
173
174 aws transcribe start-medical-transcription-job \
175 --cli-input-json file://myfifthfile.json
176
177 Contents of ``myfifthfile.json``::
178
179 {
180 "MedicalTranscriptionJobName": "alternatives-conversation-medical-transcription-job",
181 "LanguageCode": "language-code",
182 "Specialty": "PRIMARYCARE",
183 "Type": "CONVERSATION",
184 "OutputBucketName":"DOC-EXAMPLE-BUCKET",
185 "Media": {
186 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
187 },
188 "Settings":{
189 "ShowAlternatives": true,
190 "MaxAlternatives": 2
191 }
192 }
193
194 Output::
195
196 {
197 "MedicalTranscriptionJob": {
198 "MedicalTranscriptionJobName": "alternatives-conversation-medical-transcription-job",
199 "TranscriptionJobStatus": "IN_PROGRESS",
200 "LanguageCode": "language-code",
201 "Media": {
202 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
203 },
204 "StartTime": "2020-09-21T19:09:18.199000+00:00",
205 "CreationTime": "2020-09-21T19:09:18.171000+00:00",
206 "Settings": {
207 "ShowAlternatives": true,
208 "MaxAlternatives": 2
209 },
210 "Specialty": "PRIMARYCARE",
211 "Type": "CONVERSATION"
212 }
213 }
214
215 For more information, see `Alternative Transcriptions <https://docs.aws.amazon.com/transcribe/latest/dg/how-alternatives-med.html>`__ in the *Amazon Transcribe Developer Guide*.
216
217 **Example 6: To transcribe an audio file of a medical dictation with up to two alternative transcriptions**
218
219 The following ``start-medical-transcription-job`` example transcribes an audio file and uses a vocabulary filter to mask any unwanted words. You specify the location of the transcription output in the OutputBucketName parameter. ::
220
221 aws transcribe start-medical-transcription-job \
222 --cli-input-json file://mysixthfile.json
223
224 Contents of ``mysixthfile.json``::
225
226 {
227 "MedicalTranscriptionJobName": "alternatives-conversation-medical-transcription-job",
228 "LanguageCode": "language-code",
229 "Specialty": "PRIMARYCARE",
230 "Type": "DICTATION",
231 "OutputBucketName":"DOC-EXAMPLE-BUCKET",
232 "Media": {
233 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
234 },
235 "Settings":{
236 "ShowAlternatives": true,
237 "MaxAlternatives": 2
238 }
239 }
240
241 Output::
242
243 {
244 "MedicalTranscriptionJob": {
245 "MedicalTranscriptionJobName": "alternatives-dictation-medical-transcription-job",
246 "TranscriptionJobStatus": "IN_PROGRESS",
247 "LanguageCode": "language-code",
248 "Media": {
249 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
250 },
251 "StartTime": "2020-09-21T21:01:14.592000+00:00",
252 "CreationTime": "2020-09-21T21:01:14.569000+00:00",
253 "Settings": {
254 "ShowAlternatives": true,
255 "MaxAlternatives": 2
256 },
257 "Specialty": "PRIMARYCARE",
258 "Type": "DICTATION"
259 }
260 }
261
262 For more information, see `Alternative Transcriptions <https://docs.aws.amazon.com/transcribe/latest/dg/how-alternatives-med.html>`__ in the *Amazon Transcribe Developer Guide*.
263
264 **Example 7: To transcribe an audio file of a medical dictation with increased accuracy by using a custom vocabulary**
265
266 The following ``start-medical-transcription-job`` example transcribes an audio file and uses a medical custom vocabulary you've previously created to increase the transcription accuracy. You specify the location of the transcription output in the ``OutputBucketName`` parameter. ::
267
268 aws transcribe start-transcription-job \
269 --cli-input-json file://myseventhfile.json
270
271 Contents of ``mysixthfile.json``::
272
273 {
274 "MedicalTranscriptionJobName": "vocabulary-dictation-medical-transcription-job",
275 "LanguageCode": "language-code",
276 "Specialty": "PRIMARYCARE",
277 "Type": "DICTATION",
278 "OutputBucketName":"DOC-EXAMPLE-BUCKET",
279 "Media": {
280 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
281 },
282 "Settings":{
283 "VocabularyName": "cli-medical-vocab-1"
284 }
285 }
286
287 Output::
288
289 {
290 "MedicalTranscriptionJob": {
291 "MedicalTranscriptionJobName": "vocabulary-dictation-medical-transcription-job",
292 "TranscriptionJobStatus": "IN_PROGRESS",
293 "LanguageCode": "language-code",
294 "Media": {
295 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/your-audio-file.extension"
296 },
297 "StartTime": "2020-09-21T21:17:27.045000+00:00",
298 "CreationTime": "2020-09-21T21:17:27.016000+00:00",
299 "Settings": {
300 "VocabularyName": "cli-medical-vocab-1"
301 },
302 "Specialty": "PRIMARYCARE",
303 "Type": "DICTATION"
304 }
305 }
306
307 For more information, see `Medical Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary-med.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **Example 1: To transcribe an audio file**
1
2 The following ``start-transcription-job`` example transcribes your audio file. ::
3
4 aws transcribe start-transcription-job \
5 --cli-input-json file://myfile.json
6
7 Contents of ``myfile.json``::
8
9 {
10 "TranscriptionJobName": "cli-simple-transcription-job",
11 "LanguageCode": "the-language-of-your-transcription-job",
12 "Media": {
13 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
14 }
15 }
16
17 For more information, see `Getting Started (AWS Command Line Interface) <https://docs.aws.amazon.com/transcribe/latest/dg/getting-started-cli.html>`__ in the *Amazon Transcribe Developer Guide*.
18
19 **Example 2: To transcribe a multi-channel audio file**
20
21 The following ``start-transcription-job`` example transcribes your multi-channel audio file. ::
22
23 aws transcribe start-transcription-job \
24 --cli-input-json file://mysecondfile.json
25
26 Contents of ``mysecondfile.json``::
27
28 {
29 "TranscriptionJobName": "cli-channelid-job",
30 "LanguageCode": "the-language-of-your-transcription-job",
31 "Media": {
32 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
33 },
34 "Settings":{
35 "ChannelIdentification":true
36 }
37 }
38
39 Output::
40
41 {
42 "TranscriptionJob": {
43 "TranscriptionJobName": "cli-channelid-job",
44 "TranscriptionJobStatus": "IN_PROGRESS",
45 "LanguageCode": "the-language-of-your-transcription-job",
46 "Media": {
47 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
48 },
49 "StartTime": "2020-09-17T16:07:56.817000+00:00",
50 "CreationTime": "2020-09-17T16:07:56.784000+00:00",
51 "Settings": {
52 "ChannelIdentification": true
53 }
54 }
55 }
56
57 For more information, see `Transcribing Multi-Channel Audio <https://docs.aws.amazon.com/transcribe/latest/dg/channel-id.html>`__ in the *Amazon Transcribe Developer Guide*.
58
59 **Example 3: To transcribe an audio file and identify the different speakers**
60
61 The following ``start-transcription-job`` example transcribes your audio file and identifies the speakers in the transcription output. ::
62
63 aws transcribe start-transcription-job \
64 --cli-input-json file://mythirdfile.json
65
66 Contents of ``mythirdfile.json``::
67
68 {
69 "TranscriptionJobName": "cli-speakerid-job",
70 "LanguageCode": "the-language-of-your-transcription-job",
71 "Media": {
72 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
73 },
74 "Settings":{
75 "ShowSpeakerLabels": true,
76 "MaxSpeakerLabels": 2
77 }
78 }
79
80 Output::
81
82 {
83 "TranscriptionJob": {
84 "TranscriptionJobName": "cli-speakerid-job",
85 "TranscriptionJobStatus": "IN_PROGRESS",
86 "LanguageCode": "the-language-of-your-transcription-job",
87 "Media": {
88 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
89 },
90 "StartTime": "2020-09-17T16:22:59.696000+00:00",
91 "CreationTime": "2020-09-17T16:22:59.676000+00:00",
92 "Settings": {
93 "ShowSpeakerLabels": true,
94 "MaxSpeakerLabels": 2
95 }
96 }
97 }
98
99 For more information, see `Identifying Speakers <https://docs.aws.amazon.com/transcribe/latest/dg/diarization.html>`__ in the *Amazon Transcribe Developer Guide*.
100
101 **Example 4: To transcribe an audio file and mask any unwanted words in the transcription output**
102
103 The following ``start-transcription-job`` example transcribes your audio file and uses a vocabulary filter you've previously created to mask any unwanted words. ::
104
105 aws transcribe start-transcription-job \
106 --cli-input-json file://myfourthfile.json
107
108 Contents of ``myfourthfile.json``::
109
110 {
111 "TranscriptionJobName": "cli-filter-mask-job",
112 "LanguageCode": "the-language-of-your-transcription-job",
113 "Media": {
114 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
115 },
116 "Settings":{
117 "VocabularyFilterName": "your-vocabulary-filter",
118 "VocabularyFilterMethod": "mask"
119 }
120 }
121
122 Output::
123
124 {
125 "TranscriptionJob": {
126 "TranscriptionJobName": "cli-filter-mask-job",
127 "TranscriptionJobStatus": "IN_PROGRESS",
128 "LanguageCode": "the-language-of-your-transcription-job",
129 "Media": {
130 "MediaFileUri": "s3://Amazon-S3-Prefix/your-media-file.file-extension"
131 },
132 "StartTime": "2020-09-18T16:36:18.568000+00:00",
133 "CreationTime": "2020-09-18T16:36:18.547000+00:00",
134 "Settings": {
135 "VocabularyFilterName": "your-vocabulary-filter",
136 "VocabularyFilterMethod": "mask"
137 }
138 }
139 }
140
141 For more information, see `Filtering Transcriptions <https://docs.aws.amazon.com/transcribe/latest/dg/filter-transcriptions.html>`__ in the *Amazon Transcribe Developer Guide*.
142
143 **Example 5: To transcribe an audio file and remove any unwanted words in the transcription output**
144
145 The following ``start-transcription-job`` example transcribes your audio file and uses a vocabulary filter you've previously created to mask any unwanted words. ::
146
147 aws transcribe start-transcription-job \
148 --cli-input-json file://myfifthfile.json
149
150 Contents of ``myfifthfile.json``::
151
152 {
153 "TranscriptionJobName": "cli-filter-remove-job",
154 "LanguageCode": "the-language-of-your-transcription-job",
155 "Media": {
156 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
157 },
158 "Settings":{
159 "VocabularyFilterName": "your-vocabulary-filter",
160 "VocabularyFilterMethod": "remove"
161 }
162 }
163
164 Output::
165
166 {
167 "TranscriptionJob": {
168 "TranscriptionJobName": "cli-filter-remove-job",
169 "TranscriptionJobStatus": "IN_PROGRESS",
170 "LanguageCode": "the-language-of-your-transcription-job",
171 "Media": {
172 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
173 },
174 "StartTime": "2020-09-18T16:36:18.568000+00:00",
175 "CreationTime": "2020-09-18T16:36:18.547000+00:00",
176 "Settings": {
177 "VocabularyFilterName": "your-vocabulary-filter",
178 "VocabularyFilterMethod": "remove"
179 }
180 }
181 }
182
183 For more information, see `Filtering Transcriptions <https://docs.aws.amazon.com/transcribe/latest/dg/filter-transcriptions.html>`__ in the *Amazon Transcribe Developer Guide*.
184
185 **Example 6: To transcribe an audio file with increased accuracy using a custom vocabulary**
186
187 The following ``start-transcription-job`` example transcribes your audio file and uses a vocabulary filter you've previously created to mask any unwanted words. ::
188
189 aws transcribe start-transcription-job \
190 --cli-input-json file://mysixthfile.json
191
192 Contents of ``mysixthfile.json``::
193
194 {
195 "TranscriptionJobName": "cli-vocab-job",
196 "LanguageCode": "the-language-of-your-transcription-job",
197 "Media": {
198 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
199 },
200 "Settings":{
201 "VocabularyName": "your-vocabulary"
202 }
203 }
204
205 Output::
206
207 {
208 "TranscriptionJob": {
209 "TranscriptionJobName": "cli-vocab-job",
210 "TranscriptionJobStatus": "IN_PROGRESS",
211 "LanguageCode": "the-language-of-your-transcription-job",
212 "Media": {
213 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
214 },
215 "StartTime": "2020-09-18T16:36:18.568000+00:00",
216 "CreationTime": "2020-09-18T16:36:18.547000+00:00",
217 "Settings": {
218 "VocabularyName": "your-vocabulary"
219 }
220 }
221 }
222
223 For more information, see `Filtering Transcriptions <https://docs.aws.amazon.com/transcribe/latest/dg/filter-transcriptions.html>`__ in the *Amazon Transcribe Developer Guide*.
224
225 **Example 7: To identify the language of an audio file and transcribe it**
226
227 The following ``start-transcription-job`` example transcribes your audio file and uses a vocabulary filter you've previously created to mask any unwanted words. ::
228
229 aws transcribe start-transcription-job \
230 --cli-input-json file://myseventhfile.json
231
232 Contents of ``myseventhfile.json``::
233
234 {
235 "TranscriptionJobName": "cli-identify-language-transcription-job",
236 "IdentifyLanguage": true,
237 "Media": {
238 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
239 }
240 }
241
242 Output::
243
244 {
245 "TranscriptionJob": {
246 "TranscriptionJobName": "cli-identify-language-transcription-job",
247 "TranscriptionJobStatus": "IN_PROGRESS",
248 "Media": {
249 "MediaFileUri": "s3://DOC-EXAMPLE-BUCKET/Amazon-S3-prefix/your-media-file-name.file-extension"
250 },
251 "StartTime": "2020-09-18T22:27:23.970000+00:00",
252 "CreationTime": "2020-09-18T22:27:23.948000+00:00",
253 "IdentifyLanguage": true
254 }
255 }
256
257 For more information, see `Identifying the Language <https://docs.aws.amazon.com/transcribe/latest/dg/auto-lang-id.html>`__ in the *Amazon Transcribe Developer Guide*.
258
259 **Example 8: To transcribe an audio file with personally identifiable information redacted**
260
261 The following ``start-transcription-job`` example transcribes your audio file and redacts any personally identifiable information in the transcription output. ::
262
263 aws transcribe start-transcription-job \
264 --cli-input-json file://myeighthfile.json
265
266 Contents of ``myeigthfile.json``::
267
268 {
269 "TranscriptionJobName": "cli-redaction-job",
270 "LanguageCode": "language-code",
271 "Media": {
272 "MediaFileUri": "s3://Amazon-S3-Prefix/your-media-file.file-extension"
273 },
274 "ContentRedaction": {
275 "RedactionOutput":"redacted",
276 "RedactionType":"PII"
277 }
278 }
279
280 Output::
281
282 {
283 "TranscriptionJob": {
284 "TranscriptionJobName": "cli-redaction-job",
285 "TranscriptionJobStatus": "IN_PROGRESS",
286 "LanguageCode": "language-code",
287 "Media": {
288 "MediaFileUri": "s3://Amazon-S3-Prefix/your-media-file.file-extension"
289 },
290 "StartTime": "2020-09-25T23:49:13.195000+00:00",
291 "CreationTime": "2020-09-25T23:49:13.176000+00:00",
292 "ContentRedaction": {
293 "RedactionType": "PII",
294 "RedactionOutput": "redacted"
295 }
296 }
297 }
298
299 For more information, see `Automatic Content Redaction <https://docs.aws.amazon.com/transcribe/latest/dg/content-redaction.html>`__ in the *Amazon Transcribe Developer Guide*.
300
301 **Example 9: To generate a transcript with personally identifiable information (PII) redacted and an unredacted transcript**
302
303 The following ``start-transcription-job`` example generates two transcrptions of your audio file, one with the personally identifiable information redacted, and the other without any redactions. ::
304
305 aws transcribe start-transcription-job \
306 --cli-input-json file://myninthfile.json
307
308 Contents of ``myninthfile.json``::
309
310 {
311 "TranscriptionJobName": "cli-redaction-job-with-unredacted-transcript",
312 "LanguageCode": "language-code",
313 "Media": {
314 "MediaFileUri": "s3://Amazon-S3-Prefix/your-media-file.file-extension"
315 },
316 "ContentRedaction": {
317 "RedactionOutput":"redacted_and_unredacted",
318 "RedactionType":"PII"
319 }
320 }
321
322 Output::
323
324 {
325 "TranscriptionJob": {
326 "TranscriptionJobName": "cli-redaction-job-with-unredacted-transcript",
327 "TranscriptionJobStatus": "IN_PROGRESS",
328 "LanguageCode": "language-code",
329 "Media": {
330 "MediaFileUri": "s3://Amazon-S3-Prefix/your-media-file.file-extension"
331 },
332 "StartTime": "2020-09-25T23:59:47.677000+00:00",
333 "CreationTime": "2020-09-25T23:59:47.653000+00:00",
334 "ContentRedaction": {
335 "RedactionType": "PII",
336 "RedactionOutput": "redacted_and_unredacted"
337 }
338 }
339 }
340
341 For more information, see `Automatic Content Redaction <https://docs.aws.amazon.com/transcribe/latest/dg/content-redaction.html>`__ in the *Amazon Transcribe Developer Guide*.
342
343 **Example 10: To use a custom language model you've previously created to transcribe an audio file.**
344
345 The following ``start-transcription-job`` example transcribes your audio file with a custom language model you've previously created. ::
346
347 aws transcribe start-transcription-job \
348 --cli-input-json file://mytenthfile.json
349
350 Contents of ``mytenthfile.json``::
351
352 {
353 "TranscriptionJobName": "cli-clm-2-job-1",
354 "LanguageCode": "language-code",
355 "Media": {
356 "MediaFileUri": "s3://transcribe-learning-1/nov-26-2017.mp3"
357 },
358 "ModelSettings": {
359 "LanguageModelName":"cli-clm-2"
360 }
361 }
362
363 Output::
364
365 {
366 "TranscriptionJob": {
367 "TranscriptionJobName": "cli-clm-2-job-1",
368 "TranscriptionJobStatus": "IN_PROGRESS",
369 "LanguageCode": "language-code",
370 "Media": {
371 "MediaFileUri": "s3://transcribe-learning-1/nov-26-2017.mp3"
372 },
373 "StartTime": "2020-09-28T17:56:01.835000+00:00",
374 "CreationTime": "2020-09-28T17:56:01.801000+00:00",
375 "ModelSettings": {
376 "LanguageModelName": "cli-clm-2"
377 }
378 }
379 }
380
381 For more information, see `Improving Domain-Specific Transcription Accuracy with Custom Language Models <https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To update a medical custom vocabulary with new terms.**
1
2 The following ``update-medical-vocabulary`` example replaces the terms used in a medical custom vocabulary with the new ones. Prerequisite: to replace the terms in a medical custom vocabulary, you need a file with new terms. ::
3
4 aws transcribe update-medical-vocabulary \
5 --vocabulary-file-uri s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix/medical-custom-vocabulary.txt \
6 --vocabulary-name medical-custom-vocabulary \
7 --language-code language
8
9 Output::
10
11 {
12 "VocabularyName": "medical-custom-vocabulary",
13 "LanguageCode": "en-US",
14 "VocabularyState": "PENDING"
15 }
16
17 For more information, see `Medical Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To replace the words in a vocabulary filter**
1
2 The following ``update-vocabulary-filter`` example replaces the words in a vocabulary filter with new ones. Prerequisite: To update a vocabulary filter with the new words, you must have those words saved as a text file. ::
3
4 aws transcribe update-vocabulary-filter \
5 --vocabulary-filter-file-uri s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix/your-text-file-to-update-your-vocabulary-filter.txt \
6 --vocabulary-filter-name vocabulary-filter-name
7
8 Output::
9
10 {
11 "VocabularyFilterName": "vocabulary-filter-name",
12 "LanguageCode": "language-code",
13 "LastModifiedTime": "2020-09-23T18:40:35.139000+00:00"
14 }
15
16 For more information, see `Filtering Unwanted Words <https://docs.aws.amazon.com/transcribe/latest/dg/filter-unwanted-words.html>`__ in the *Amazon Transcribe Developer Guide*.
0 **To update a custom vocabulary with new terms.**
1
2 The following ``update-vocabulary`` example overwrites the terms used to create a custom vocabulary with the new ones that you provide. Prerequisite: to replace the terms in a custom vocabulary, you need a file with new terms. ::
3
4 aws transcribe update-vocabulary \
5 --vocabulary-file-uri s3://DOC-EXAMPLE-BUCKET/Amazon-S3-Prefix/custom-vocabulary.txt \
6 --vocabulary-name custom-vocabulary \
7 --language-code language-code
8
9 Output::
10
11 {
12 "VocabularyName": "custom-vocabulary",
13 "LanguageCode": "language",
14 "VocabularyState": "PENDING"
15 }
16
17 For more information, see `Custom Vocabularies <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html>`__ in the *Amazon Transcribe Developer Guide*.
4949 from awscli.customizations.ec2.secgroupsimplify import register_secgroup
5050 from awscli.customizations.ec2.paginate import register_ec2_page_size_injector
5151 from awscli.customizations.ecr import register_ecr_commands
52 from awscli.customizations.ecr_public import register_ecr_public_commands
5253 from awscli.customizations.emr.emr import emr_initialize
54 from awscli.customizations.emrcontainers import \
55 initialize as emrcontainers_initialize
5356 from awscli.customizations.eks import initialize as eks_initialize
5457 from awscli.customizations.ecs import initialize as ecs_initialize
5558 from awscli.customizations.gamelift import register_gamelift_commands
131134 register_configure_cmd(event_handlers)
132135 cloudtrail_init(event_handlers)
133136 register_ecr_commands(event_handlers)
137 register_ecr_public_commands(event_handlers)
134138 register_bool_params(event_handlers)
135139 register_protocol_args(event_handlers)
136140 datapipeline.register_customizations(event_handlers)
137141 cloudsearch_init(event_handlers)
138142 emr_initialize(event_handlers)
143 emrcontainers_initialize(event_handlers)
139144 eks_initialize(event_handlers)
140145 ecs_initialize(event_handlers)
141146 register_cloudsearchdomain(event_handlers)
1919 from docutils.core import publish_string
2020 from docutils.writers import manpage
2121
22 from botocore.docs.bcdoc import docevents
23 from botocore.docs.bcdoc.restdoc import ReSTDocument
24 from botocore.docs.bcdoc.textwriter import TextWriter
25
2622 from awscli.clidocs import ProviderDocumentEventHandler
2723 from awscli.clidocs import ServiceDocumentEventHandler
2824 from awscli.clidocs import OperationDocumentEventHandler
2925 from awscli.clidocs import TopicListerDocumentEventHandler
3026 from awscli.clidocs import TopicDocumentEventHandler
27 from awscli.bcdoc import docevents
28 from awscli.bcdoc.restdoc import ReSTDocument
29 from awscli.bcdoc.textwriter import TextWriter
3130 from awscli.argprocess import ParamShorthandParser
3231 from awscli.argparser import ArgTableArgParser
3332 from awscli.topictags import TopicTagDB
106106 'service-catalog.create-product.support-url',
107107 'service-catalog.update-product.support-url',
108108
109 'ses.put-account-details.website-url',
110
109111 'sqs.add-permission.queue-url',
110112 'sqs.change-message-visibility.queue-url',
111113 'sqs.change-message-visibility-batch.queue-url',
8888 return unittest.skipIf(
8989 platform.system() not in ['Darwin', 'Linux'], reason)(func)
9090 return decorator
91
92
93 def set_invalid_utime(path):
94 """Helper function to set an invalid last modified time"""
95 try:
96 os.utime(path, (-1, -100000000000))
97 except (OSError, OverflowError):
98 # Some OS's such as Windows throws an error for trying to set a
99 # last modified time of that size. So if an error is thrown, set it
100 # to just a negative time which will trigger the warning as well for
101 # Windows.
102 os.utime(path, (-1, -1))
10391
10492
10593 def create_clidriver():
00 Metadata-Version: 1.1
11 Name: awscli
2 Version: 1.18.135
2 Version: 1.18.219
33 Summary: Universal Command Line Environment for AWS.
44 Home-page: http://aws.amazon.com/cli/
55 Author: Amazon Web Services
66 Author-email: UNKNOWN
77 License: Apache License 2.0
8 Description: # aws-cli
9
10 [![Build Status](https://travis-ci.org/aws/aws-cli.svg?branch=develop)](https://travis-ci.org/aws/aws-cli)
11
12 [![Gitter](https://badges.gitter.im/aws/aws-cli.svg)](https://gitter.im/aws/aws-cli)
13
14 This package provides a unified command line interface to Amazon Web Services.
8 Description: aws-cli
9 =======
10
11
12 .. image:: https://travis-ci.org/aws/aws-cli.svg?branch=develop
13 :target: https://travis-ci.org/aws/aws-cli
14 :alt: Build Status
15
16 .. image:: https://badges.gitter.im/aws/aws-cli.svg
17 :target: https://gitter.im/aws/aws-cli
18 :alt: Gitter
19
20
21 This package provides a unified command line interface to Amazon Web
22 Services.
1523
1624 Jump to:
1725
18 - [Getting Started](#getting-started)
19 - [Getting Help](#getting-help)
20 - [More Resources](#more-resources)
21
22 ## Getting Started
23
24 This README is for the AWS CLI version 1. If you are looking for information about the AWS CLI version 2, please visit the [v2 branch](https://github.com/aws/aws-cli/tree/v2).
25
26 ### Requirements
26 - `Getting Started <#getting-started>`__
27 - `Getting Help <#getting-help>`__
28 - `More Resources <#more-resources>`__
29
30 Getting Started
31 ---------------
32
33 This README is for the AWS CLI version 1. If you are looking for
34 information about the AWS CLI version 2, please visit the `v2
35 branch <https://github.com/aws/aws-cli/tree/v2>`__.
36
37 Requirements
38 ~~~~~~~~~~~~
2739
2840 The aws-cli package works on Python versions:
2941
30 - 2.7.x and greater
31 - 3.4.x and greater
32 - 3.5.x and greater
33 - 3.6.x and greater
34 - 3.7.x and greater
35 - 3.8.x and greater
36
37 On 10/09/2019 support for Python 2.6 and Python 3.3 was deprecated and support was dropped on 01/10/2020. To avoid disruption, customers using the AWS CLI on Python 2.6 or 3.3 will need to upgrade their version of Python or pin the version of the AWS CLI in use prior to 01/10/2020. For more information, see this [blog post](https://aws.amazon.com/blogs/developer/deprecation-of-python-2-6-and-python-3-3-in-botocore-boto3-and-the-aws-cli/).
42 - 2.7.x and greater
43 - 3.4.x and greater
44 - 3.5.x and greater
45 - 3.6.x and greater
46 - 3.7.x and greater
47 - 3.8.x and greater
48
49 On 10/09/2019 support for Python 2.6 and Python 3.3 was deprecated and
50 support was dropped on 01/10/2020. To avoid disruption, customers using
51 the AWS CLI on Python 2.6 or 3.3 will need to upgrade their version of
52 Python or pin the version of the AWS CLI in use prior to 01/10/2020. For
53 more information, see this `blog
54 post <https://aws.amazon.com/blogs/developer/deprecation-of-python-2-6-and-python-3-3-in-botocore-boto3-and-the-aws-cli/>`__.
3855
3956 *Attention!*
4057
41 *We recommend that all customers regularly monitor the [Amazon Web Services Security Bulletins website](https://aws.amazon.com/security/security-bulletins) for any important security bulletins related to aws-cli.*
42
43 ### Installation
44
45 The safest way to install the AWS CLI is to use [pip](https://pip.pypa.io/en/stable/) in a `virtualenv`:
46
47 $ python -m pip install awscli
48
49 or, if you are not installing in a `virtualenv`, to install globally:
50
51 $ sudo python -m pip install awscli
58 *We recommend that all customers regularly monitor the* `Amazon Web
59 Services Security Bulletins
60 website <https://aws.amazon.com/security/security-bulletins>`__ *for
61 any important security bulletins related to aws-cli.*
62
63 Maintenance and Support for CLI Major Versions
64 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
66 The AWS CLI version 1 was made generally available on 09/02/2013 and is currently in the full support phase of the availability life cycle.
67
68 For information about maintenance and support for SDK major versions and their underlying dependencies, see the `Maintenance Policy <https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html>`__ section in the *AWS SDKs and Tools Shared Configuration and Credentials Reference Guide*.
69
70 Installation
71 ~~~~~~~~~~~~
72
73 The safest way to install the AWS CLI is to use
74 `pip <https://pip.pypa.io/en/stable/>`__ in a ``virtualenv``:
75
76 ::
77
78 $ python -m pip install awscli
79
80 or, if you are not installing in a ``virtualenv``, to install globally:
81
82 ::
83
84 $ sudo python -m pip install awscli
5285
5386 or for your user:
5487
55 $ python -m pip install --user awscli
56
57 If you have the aws-cli package installed and want to upgrade to the latest version you can run:
58
59 $ python -m pip install --upgrade awscli
88 ::
89
90 $ python -m pip install --user awscli
91
92 If you have the aws-cli package installed and want to upgrade to the
93 latest version you can run:
94
95 ::
96
97 $ python -m pip install --upgrade awscli
6098
6199 This will install the aws-cli package as well as all dependencies.
62100
63 *Note*
64
65 *On macOS, if you see an error regarding the version of `six` that came with `distutils` in El Capitan, use the `--ignore-installed` option:*
66
67 $ sudo python -m pip install awscli --ignore-installed six
68
69 On Linux and Mac OS, the AWS CLI can be installed using a [bundled installer](https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled). The AWS CLI can also be installed on Windows via an [MSI Installer](https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#msi-on-windows).
70
71 If you want to run the `develop` branch of the AWS CLI, see the [Development Version](CONTRIBUTING.md#development-version) section of the contributing guide.
72
73 See the [installation](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html) section of the AWS CLI User Guide for more information.
74
75 ### Configuration
76
77 Before using the AWS CLI, you need to configure your AWS credentials. You can do this in several ways:
78
79 - Configuration command
80 - Environment variables
81 - Shared credentials file
82 - Config file
83 - IAM Role
84
85 The quickest way to get started is to run the `aws configure` command:
86
87 $ aws configure
88 AWS Access Key ID: MYACCESSKEY
89 AWS Secret Access Key: MYSECRETKEY
90 Default region name [us-west-2]: us-west-2
91 Default output format [None]: json
101 .. note::
102 On macOS, if you see an error regarding the version of ``six`` that
103 came with ``distutils`` in El Capitan, use the ``--ignore-installed``
104 option:
105
106 ::
107
108 $ sudo python -m pip install awscli --ignore-installed six
109
110 On Linux and Mac OS, the AWS CLI can be installed using a `bundled
111 installer <https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled>`__.
112 The AWS CLI can also be installed on Windows via an `MSI
113 Installer <https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#msi-on-windows>`__.
114
115 If you want to run the ``develop`` branch of the AWS CLI, see the
116 `Development Version <CONTRIBUTING.md#cli-development-version>`__ section of
117 the contributing guide.
118
119 See the
120 `installation <https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html>`__
121 section of the AWS CLI User Guide for more information.
122
123 Configuration
124 ~~~~~~~~~~~~~
125
126 Before using the AWS CLI, you need to configure your AWS credentials.
127 You can do this in several ways:
128
129 - Configuration command
130 - Environment variables
131 - Shared credentials file
132 - Config file
133 - IAM Role
134
135 The quickest way to get started is to run the ``aws configure`` command:
136
137 ::
138
139 $ aws configure
140 AWS Access Key ID: MYACCESSKEY
141 AWS Secret Access Key: MYSECRETKEY
142 Default region name [us-west-2]: us-west-2
143 Default output format [None]: json
92144
93145 To use environment variables, do the following:
94146
95 $ export AWS_ACCESS_KEY_ID=<access_key>
96 $ export AWS_SECRET_ACCESS_KEY=<secret_key>
97
98 To use the shared credentials file, create an INI formatted file like this:
99
100 [default]
101 aws_access_key_id=MYACCESSKEY
102 aws_secret_access_key=MYSECRETKEY
103
104 [testing]
105 aws_access_key_id=MYACCESKEY
106 aws_secret_access_key=MYSECRETKEY
107
108 and place it in `~/.aws/credentials` (or in `%UserProfile%\.aws/credentials` on Windows). If you wish to place the shared credentials file in a different location than the one specified above, you need to tell aws-cli where to find it. Do this by setting the appropriate environment variable:
109
110 $ export AWS_SHARED_CREDENTIALS_FILE=/path/to/shared_credentials_file
147 ::
148
149 $ export AWS_ACCESS_KEY_ID=<access_key>
150 $ export AWS_SECRET_ACCESS_KEY=<secret_key>
151
152 To use the shared credentials file, create an INI formatted file like
153 this:
154
155 ::
156
157 [default]
158 aws_access_key_id=MYACCESSKEY
159 aws_secret_access_key=MYSECRETKEY
160
161 [testing]
162 aws_access_key_id=MYACCESKEY
163 aws_secret_access_key=MYSECRETKEY
164
165 and place it in ``~/.aws/credentials`` (or in
166 ``%UserProfile%\.aws/credentials`` on Windows). If you wish to place the
167 shared credentials file in a different location than the one specified
168 above, you need to tell aws-cli where to find it. Do this by setting the
169 appropriate environment variable:
170
171 ::
172
173 $ export AWS_SHARED_CREDENTIALS_FILE=/path/to/shared_credentials_file
111174
112175 To use a config file, create an INI formatted file like this:
113176
114 [default]
115 aws_access_key_id=<default access key>
116 aws_secret_access_key=<default secret key>
117 # Optional, to define default region for this profile.
118 region=us-west-1
119
120 [profile testing]
121 aws_access_key_id=<testing access key>
122 aws_secret_access_key=<testing secret key>
123 region=us-west-2
124
125 and place it in `~/.aws/config` (or in `%UserProfile%\.aws\config` on Windows). If you wish to place the config file in a different location than the one specified above, you need to tell the AWS CLI where to find it. Do this by setting the appropriate environment variable:
126
127 $ export AWS_CONFIG_FILE=/path/to/config_file
128
129 As you can see, you can have multiple `profiles` defined in both the shared credentials file and the configuration file. You can then specify which profile to use by using the `--profile` option. If no profile is specified the `default` profile is used.
130
131 In the config file, except for the default profile, you **must** prefix each config section of a profile group with `profile`. For example, if you have a profile named \"testing\" the section header would be `[profile testing]`.
132
133 The final option for credentials is highly recommended if you are using the AWS CLI on an EC2 instance. [IAM Roles](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html) are a great way to have credentials installed automatically on your instance. If you are using IAM Roles, the AWS CLI will find and use them automatically.
134
135 In addition to credentials, a number of other variables can be configured either with environment variables, configuration file entries, or both. See the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/overview.html) for more information.
136
137 For more information about configuration options, please refer to the [AWS
138 CLI Configuration Variables topic](http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#cli-aws-help-config-vars). You can access this topic from the AWS CLI as well by running `aws help config-vars`.
139
140 ### Basic Commands
177 ::
178
179 [default]
180 aws_access_key_id=<default access key>
181 aws_secret_access_key=<default secret key>
182 # Optional, to define default region for this profile.
183 region=us-west-1
184
185 [profile testing]
186 aws_access_key_id=<testing access key>
187 aws_secret_access_key=<testing secret key>
188 region=us-west-2
189
190 and place it in ``~/.aws/config`` (or in ``%UserProfile%\.aws\config``
191 on Windows). If you wish to place the config file in a different
192 location than the one specified above, you need to tell the AWS CLI
193 where to find it. Do this by setting the appropriate environment
194 variable:
195
196 ::
197
198 $ export AWS_CONFIG_FILE=/path/to/config_file
199
200 As you can see, you can have multiple ``profiles`` defined in both the
201 shared credentials file and the configuration file. You can then specify
202 which profile to use by using the ``--profile`` option. If no profile is
203 specified the ``default`` profile is used.
204
205 In the config file, except for the default profile, you **must** prefix
206 each config section of a profile group with ``profile``. For example, if
207 you have a profile named "testing" the section header would be
208 ``[profile testing]``.
209
210 The final option for credentials is highly recommended if you are using
211 the AWS CLI on an EC2 instance. `IAM
212 Roles <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html>`__
213 are a great way to have credentials installed automatically on your
214 instance. If you are using IAM Roles, the AWS CLI will find and use them
215 automatically.
216
217 In addition to credentials, a number of other variables can be
218 configured either with environment variables, configuration file
219 entries, or both. See the `AWS Tools and SDKs Shared Configuration and
220 Credentials Reference
221 Guide <https://docs.aws.amazon.com/credref/latest/refdocs/overview.html>`__
222 for more information.
223
224 For more information about configuration options, please refer to the
225 `AWS CLI Configuration Variables
226 topic <http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#cli-aws-help-config-vars>`__.
227 You can access this topic from the AWS CLI as well by running
228 ``aws help config-vars``.
229
230 Basic Commands
231 ~~~~~~~~~~~~~~
141232
142233 An AWS CLI command has the following structure:
143234
144 $ aws <command> <subcommand> [options and parameters]
235 ::
236
237 $ aws <command> <subcommand> [options and parameters]
145238
146239 For example, to list S3 buckets, the command would be:
147240
148 $ aws s3 ls
241 ::
242
243 $ aws s3 ls
149244
150245 To view help documentation, use one of the following:
151246
152 $ aws help
153 $ aws <command> help
154 $ aws <command> <subcommand> help
247 ::
248
249 $ aws help
250 $ aws <command> help
251 $ aws <command> <subcommand> help
155252
156253 To get the version of the AWS CLI:
157254
158 $ aws --version
255 ::
256
257 $ aws --version
159258
160259 To turn on debugging output:
161260
162 $ aws --debug <command> <subcommand>
163
164 You can read more information on the [Using the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-using.html) chapter of the AWS CLI User Guide.
165
166 ### Command Completion
167
168 The aws-cli package includes a command completion feature for Unix-like systems. This feature is not automatically installed so you need to configure it manually. To learn more, read the [AWS CLI Command completion topic](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html).
169
170 ## Getting Help
171
172 The best way to interact with our team is through GitHub. You can [open an issue](https://github.com/aws/aws-cli/issues/new/choose) and choose from one of our templates for guidance, bug reports, or feature requests.
173
174 You may find help from the community on [Stack Overflow](https://stackoverflow.com/) with the tag [aws-cli](https://stackoverflow.com/questions/tagged/aws-cli) or on the [AWS Discussion Forum for CLI](https://forums.aws.amazon.com/forum.jspa?forumID=150). If you have a support plan with [AWS Premium Support](https://aws.amazon.com/premiumsupport), you can also create a new support case.
175
176 Please check for open similar [issues](https://github.com/aws/aws-cli/issues/) before opening another one.
177
178 The AWS CLI implements AWS service APIs. For general issues regarding the services or their limitations, you may find the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/) helpful.
179
180 ## More Resources
181
182 - [Changelog](https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst)
183 - [AWS CLI Documentation](https://docs.aws.amazon.com/cli/index.html)
184 - [AWS CLI User Guide](https://docs.aws.amazon.com/cli/latest/userguide/)
185 - [AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/reference/)
186 - [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/)
187 - [AWS Support](https://console.aws.amazon.com/support/home#/)
261 ::
262
263 $ aws --debug <command> <subcommand>
264
265 You can read more information on the `Using the AWS
266 CLI <https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-using.html>`__
267 chapter of the AWS CLI User Guide.
268
269 Command Completion
270 ~~~~~~~~~~~~~~~~~~
271
272 The aws-cli package includes a command completion feature for Unix-like
273 systems. This feature is not automatically installed so you need to
274 configure it manually. To learn more, read the `AWS CLI Command
275 completion
276 topic <https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html>`__.
277
278 Getting Help
279 ------------
280
281 The best way to interact with our team is through GitHub. You can `open
282 an issue <https://github.com/aws/aws-cli/issues/new/choose>`__ and
283 choose from one of our templates for guidance, bug reports, or feature
284 requests.
285
286 You may find help from the community on `Stack
287 Overflow <https://stackoverflow.com/>`__ with the tag
288 `aws-cli <https://stackoverflow.com/questions/tagged/aws-cli>`__ or on
289 the `AWS Discussion Forum for
290 CLI <https://forums.aws.amazon.com/forum.jspa?forumID=150>`__. If you
291 have a support plan with `AWS Premium
292 Support <https://aws.amazon.com/premiumsupport>`__, you can also create
293 a new support case.
294
295 Please check for open similar
296 `issues <https://github.com/aws/aws-cli/issues/>`__ before opening
297 another one.
298
299 The AWS CLI implements AWS service APIs. For general issues regarding
300 the services or their limitations, you may find the `Amazon Web Services
301 Discussion Forums <https://forums.aws.amazon.com/>`__ helpful.
302
303 More Resources
304 --------------
305
306 - `Changelog <https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst>`__
307 - `AWS CLI
308 Documentation <https://docs.aws.amazon.com/cli/index.html>`__
309 - `AWS CLI User
310 Guide <https://docs.aws.amazon.com/cli/latest/userguide/>`__
311 - `AWS CLI Command
312 Reference <https://docs.aws.amazon.com/cli/latest/reference/>`__
313 - `Amazon Web Services Discussion
314 Forums <https://forums.aws.amazon.com/>`__
315 - `AWS Support <https://console.aws.amazon.com/support/home#/>`__
316
317 .. |Build Status| image:: https://travis-ci.org/aws/aws-cli.svg?branch=develop
318 :target: https://travis-ci.org/aws/aws-cli
319 .. |Gitter| image:: https://badges.gitter.im/aws/aws-cli.svg
320 :target: https://gitter.im/aws/aws-cli
188321
189322 Platform: UNKNOWN
190323 Classifier: Development Status :: 5 - Production/Stable
00 LICENSE.txt
11 MANIFEST.in
2 README.md
2 README.rst
3 UPGRADE_PY3.md
34 requirements.txt
45 setup.cfg
56 setup.py
3233 awscli.egg-info/dependency_links.txt
3334 awscli.egg-info/requires.txt
3435 awscli.egg-info/top_level.txt
36 awscli/bcdoc/__init__.py
37 awscli/bcdoc/docevents.py
38 awscli/bcdoc/docstringparser.py
39 awscli/bcdoc/restdoc.py
40 awscli/bcdoc/style.py
41 awscli/bcdoc/textwriter.py
3542 awscli/customizations/__init__.py
3643 awscli/customizations/addexamples.py
3744 awscli/customizations/argrename.py
4653 awscli/customizations/commands.py
4754 awscli/customizations/dynamodb.py
4855 awscli/customizations/ecr.py
56 awscli/customizations/ecr_public.py
4957 awscli/customizations/flatten.py
5058 awscli/customizations/generatecliskeleton.py
5159 awscli/customizations/globalargs.py
168176 awscli/customizations/emr/sshutils.py
169177 awscli/customizations/emr/steputils.py
170178 awscli/customizations/emr/terminateclusters.py
179 awscli/customizations/emrcontainers/__init__.py
180 awscli/customizations/emrcontainers/base36.py
181 awscli/customizations/emrcontainers/constants.py
182 awscli/customizations/emrcontainers/eks.py
183 awscli/customizations/emrcontainers/iam.py
184 awscli/customizations/emrcontainers/update_role_trust_policy.py
171185 awscli/customizations/gamelift/__init__.py
172186 awscli/customizations/gamelift/getlog.py
173187 awscli/customizations/gamelift/uploadbuild.py
517531 awscli/examples/backup/create-backup-vault.rst
518532 awscli/examples/backup/get-backup-plan-from-template.rst
519533 awscli/examples/backup/get-backup-plan.rst
534 awscli/examples/backup/list-backup-jobs.rst
520535 awscli/examples/batch/cancel-job.rst
521536 awscli/examples/batch/create-compute-environment.rst
522537 awscli/examples/batch/create-job-queue.rst
784799 awscli/examples/cloudwatch/put-metric-alarm.rst
785800 awscli/examples/cloudwatch/put-metric-data.rst
786801 awscli/examples/cloudwatch/set-alarm-state.rst
802 awscli/examples/codeartifact/associate-external-connection.rst
803 awscli/examples/codeartifact/copy-package-versions.rst
804 awscli/examples/codeartifact/create-domain.rst
805 awscli/examples/codeartifact/create-repository.rst
806 awscli/examples/codeartifact/delete-domain-permissions-policy.rst
807 awscli/examples/codeartifact/delete-domain.rst
808 awscli/examples/codeartifact/delete-package-versions.rst
809 awscli/examples/codeartifact/delete-repository-permissions-policy.rst
810 awscli/examples/codeartifact/delete-repository.rst
811 awscli/examples/codeartifact/describe-domain.rst
812 awscli/examples/codeartifact/describe-repository.rst
813 awscli/examples/codeartifact/disassociate-external-connection.rst
814 awscli/examples/codeartifact/dispose-package-versions.rst
815 awscli/examples/codeartifact/get-authorization-token.rst
816 awscli/examples/codeartifact/get-domain-permissions-policy.rst
817 awscli/examples/codeartifact/get-package-version-asset.rst
818 awscli/examples/codeartifact/get-package-version-readme.rst
819 awscli/examples/codeartifact/get-repository-endpoint.rst
820 awscli/examples/codeartifact/get-repository-permissions-policy.rst
821 awscli/examples/codeartifact/list-domains.rst
822 awscli/examples/codeartifact/list-package-version-assets.rst
823 awscli/examples/codeartifact/list-package-version-dependencies.rst
824 awscli/examples/codeartifact/list-package-versions.rst
825 awscli/examples/codeartifact/list-packages.rst
826 awscli/examples/codeartifact/list-repositories-in-domain.rst
827 awscli/examples/codeartifact/list-repositories.rst
828 awscli/examples/codeartifact/login.rst
829 awscli/examples/codeartifact/put-domain-permissions-policy.rst
830 awscli/examples/codeartifact/put-repository-permissions-policy.rst
831 awscli/examples/codeartifact/update-package-versions-status.rst
832 awscli/examples/codeartifact/update-repository.rst
787833 awscli/examples/codebuild/batch-delete-builds.rst
834 awscli/examples/codebuild/batch-get-build-batches.rst
788835 awscli/examples/codebuild/batch-get-builds.rst
789836 awscli/examples/codebuild/batch-get-projects.rst
837 awscli/examples/codebuild/batch-get-report-groups.rst
838 awscli/examples/codebuild/batch-get-reports.rst
790839 awscli/examples/codebuild/create-project.rst
840 awscli/examples/codebuild/create-report-group.rst
791841 awscli/examples/codebuild/create-webhook.rst
842 awscli/examples/codebuild/delete-build-batch.rst
792843 awscli/examples/codebuild/delete-project.rst
844 awscli/examples/codebuild/delete-report-group.rst
845 awscli/examples/codebuild/delete-report.rst
793846 awscli/examples/codebuild/delete-source-credentials.rst
794847 awscli/examples/codebuild/delete-webhook.rst
848 awscli/examples/codebuild/describe-code-coverages.rst
849 awscli/examples/codebuild/describe-test-cases.rst
795850 awscli/examples/codebuild/import-source-credentials.rst
796851 awscli/examples/codebuild/invalidate-project-cache.rst
852 awscli/examples/codebuild/list-build-batches-for-project.rst
853 awscli/examples/codebuild/list-build-batches.rst
797854 awscli/examples/codebuild/list-builds-for-project.rst
798855 awscli/examples/codebuild/list-builds.rst
799856 awscli/examples/codebuild/list-curated-environment-images.rst
800857 awscli/examples/codebuild/list-projects.rst
858 awscli/examples/codebuild/list-report-groups.rst
859 awscli/examples/codebuild/list-reports-for-report-group.rst
860 awscli/examples/codebuild/list-reports.rst
861 awscli/examples/codebuild/list-shared-projects.rst
862 awscli/examples/codebuild/list-shared-report-groups.rst
801863 awscli/examples/codebuild/list-source-credentials.rst
864 awscli/examples/codebuild/retry-build-batch.rst
865 awscli/examples/codebuild/retry-build.rst
866 awscli/examples/codebuild/start-build-batch.rst
802867 awscli/examples/codebuild/start-build.rst
868 awscli/examples/codebuild/stop-build-batch.rst
803869 awscli/examples/codebuild/stop-build.rst
804870 awscli/examples/codebuild/update-project.rst
871 awscli/examples/codebuild/update-report-group.rst
805872 awscli/examples/codebuild/update-webhook.rst
806873 awscli/examples/codecommit/associate-approval-rule-template-with-repository.rst
807874 awscli/examples/codecommit/batch-associate-approval-rule-template-with-repositories.rst
830897 awscli/examples/codecommit/get-approval-rule-template.rst
831898 awscli/examples/codecommit/get-blob.rst
832899 awscli/examples/codecommit/get-branch.rst
900 awscli/examples/codecommit/get-comment-reactions.rst
833901 awscli/examples/codecommit/get-comment.rst
834902 awscli/examples/codecommit/get-comments-for-compared-commit.rst
835903 awscli/examples/codecommit/get-comments-for-pull-request.rst
862930 awscli/examples/codecommit/post-comment-for-compared-commit.rst
863931 awscli/examples/codecommit/post-comment-for-pull-request.rst
864932 awscli/examples/codecommit/post-comment-reply.rst
933 awscli/examples/codecommit/put-comment-reaction.rst
865934 awscli/examples/codecommit/put-file.rst
866935 awscli/examples/codecommit/put-repository-triggers.rst
867936 awscli/examples/codecommit/tag-resource.rst
884953 awscli/examples/codepipeline/create-pipeline.rst
885954 awscli/examples/codepipeline/delete-custom-action-type.rst
886955 awscli/examples/codepipeline/delete-pipeline.rst
956 awscli/examples/codepipeline/delete-webhook.rst
957 awscli/examples/codepipeline/deregister-webhook-with-third-party.rst
887958 awscli/examples/codepipeline/disable-stage-transition.rst
888959 awscli/examples/codepipeline/enable-stage-transition.rst
889960 awscli/examples/codepipeline/get-job-details.rst
890961 awscli/examples/codepipeline/get-pipeline-state.rst
891962 awscli/examples/codepipeline/get-pipeline.rst
963 awscli/examples/codepipeline/list-action-executions.rst
892964 awscli/examples/codepipeline/list-action-types.rst
893965 awscli/examples/codepipeline/list-pipeline-executions.rst
894966 awscli/examples/codepipeline/list-pipelines.rst
967 awscli/examples/codepipeline/list-tags-for-resource.rst
895968 awscli/examples/codepipeline/list-webhooks.rst
896969 awscli/examples/codepipeline/poll-for-jobs.rst
970 awscli/examples/codepipeline/put-webhook.rst
971 awscli/examples/codepipeline/retry-stage-execution.rst
897972 awscli/examples/codepipeline/start-pipeline-execution.rst
973 awscli/examples/codepipeline/stop-pipeline-execution.rst
974 awscli/examples/codepipeline/tag-resource.rst
975 awscli/examples/codepipeline/untag-resource.rst
898976 awscli/examples/codepipeline/update-pipeline.rst
899977 awscli/examples/codestar/associate-team-member.rst
900978 awscli/examples/codestar/create-project.rst
914992 awscli/examples/codestar/update-project.rst
915993 awscli/examples/codestar/update-team-member.rst
916994 awscli/examples/codestar/update-user-profile.rst
995 awscli/examples/codestar-connections/create-connection.rst
996 awscli/examples/codestar-connections/create-host.rst
997 awscli/examples/codestar-connections/delete-connection.rst
998 awscli/examples/codestar-connections/delete-host.rst
999 awscli/examples/codestar-connections/get-connection.rst
1000 awscli/examples/codestar-connections/get-host.rst
1001 awscli/examples/codestar-connections/list-connections.rst
1002 awscli/examples/codestar-connections/list-hosts.rst
1003 awscli/examples/codestar-connections/list-tags-for-resource.rst
1004 awscli/examples/codestar-connections/tag-resource.rst
1005 awscli/examples/codestar-connections/untag-resource.rst
9171006 awscli/examples/codestar-notifications/create-notification-rule.rst
9181007 awscli/examples/codestar-notifications/delete-notification-rule.rst
9191008 awscli/examples/codestar-notifications/delete-target.rst
9261015 awscli/examples/codestar-notifications/tag-resource.rst
9271016 awscli/examples/codestar-notifications/unsubscribe.rst
9281017 awscli/examples/codestar-notifications/untag-resource.rst
1018 awscli/examples/codestar-notifications/update-notification-rule.rst
9291019 awscli/examples/cognito-identity/create-identity-pool.rst
9301020 awscli/examples/cognito-identity/delete-identities.rst
9311021 awscli/examples/cognito-identity/delete-identity-pool.rst
11441234 awscli/examples/deploy/list-deployments.rst
11451235 awscli/examples/deploy/list-git-hub-account-token-names.rst
11461236 awscli/examples/deploy/list-on-premises-instances.rst
1237 awscli/examples/deploy/list-tags-for-resource.rst
11471238 awscli/examples/deploy/push.rst
11481239 awscli/examples/deploy/register-application-revision.rst
11491240 awscli/examples/deploy/register-on-premises-instance.rst
11501241 awscli/examples/deploy/register.rst
11511242 awscli/examples/deploy/remove-tags-from-on-premises-instances.rst
11521243 awscli/examples/deploy/stop-deployment.rst
1244 awscli/examples/deploy/tag-resource.rst
11531245 awscli/examples/deploy/uninstall.rst
1246 awscli/examples/deploy/untag-resource.rst
11541247 awscli/examples/deploy/update-application.rst
11551248 awscli/examples/deploy/update-deployment-group.rst
11561249 awscli/examples/deploy/wait/deployment-successful.rst
14441537 awscli/examples/ec2/create-traffic-mirror-session.rst
14451538 awscli/examples/ec2/create-traffic-mirror-target.rst
14461539 awscli/examples/ec2/create-transit-gateway-peering-attachment.rst
1540 awscli/examples/ec2/create-transit-gateway-prefix-list-reference.rst
14471541 awscli/examples/ec2/create-transit-gateway-route-table.rst
14481542 awscli/examples/ec2/create-transit-gateway-route.rst
14491543 awscli/examples/ec2/create-transit-gateway-vpc-attachment.rst
14621556 awscli/examples/ec2/delete-customer-gateway.rst
14631557 awscli/examples/ec2/delete-dhcp-options.rst
14641558 awscli/examples/ec2/delete-egress-only-internet-gateway.rst
1559 awscli/examples/ec2/delete-fleets.rst
14651560 awscli/examples/ec2/delete-flow-logs.rst
14661561 awscli/examples/ec2/delete-fpga-image.rst
14671562 awscli/examples/ec2/delete-internet-gateway.rst
14901585 awscli/examples/ec2/delete-traffic-mirror-target.rst
14911586 awscli/examples/ec2/delete-transit-gateway-multicast-domain.rst
14921587 awscli/examples/ec2/delete-transit-gateway-peering-attachment.rst
1588 awscli/examples/ec2/delete-transit-gateway-prefix-list-reference.rst
14931589 awscli/examples/ec2/delete-transit-gateway-route-table.rst
14941590 awscli/examples/ec2/delete-transit-gateway-route.rst
14951591 awscli/examples/ec2/delete-transit-gateway-vpc-attachment.rst
15051601 awscli/examples/ec2/delete-vpn-gateway.rst
15061602 awscli/examples/ec2/deprovision-byoip-cidr.rst
15071603 awscli/examples/ec2/deregister-image.rst
1604 awscli/examples/ec2/deregister-instance-event-notification-attributes.rst
15081605 awscli/examples/ec2/deregister-transit-gateway-multicast-group-members.rst
15091606 awscli/examples/ec2/deregister-transit-gateway-multicast-group-source.rst
15101607 awscli/examples/ec2/describe-account-attributes.rst
15281625 awscli/examples/ec2/describe-export-image-tasks.rst
15291626 awscli/examples/ec2/describe-export-tasks.rst
15301627 awscli/examples/ec2/describe-fast-snapshot-restores.rst
1628 awscli/examples/ec2/describe-fleet-history.rst
1629 awscli/examples/ec2/describe-fleet-instances.rst
1630 awscli/examples/ec2/describe-fleets.rst
15311631 awscli/examples/ec2/describe-flow-logs.rst
15321632 awscli/examples/ec2/describe-fpga-image-attribute.rst
15331633 awscli/examples/ec2/describe-fpga-images.rst
15431643 awscli/examples/ec2/describe-import-snapshot-tasks.rst
15441644 awscli/examples/ec2/describe-instance-attribute.rst
15451645 awscli/examples/ec2/describe-instance-credit-specifications.rst
1646 awscli/examples/ec2/describe-instance-event-notification-attributes.rst
15461647 awscli/examples/ec2/describe-instance-status.rst
15471648 awscli/examples/ec2/describe-instance-type-offerings.rst
15481649 awscli/examples/ec2/describe-instance-types.rst
16481749 awscli/examples/ec2/get-default-credit-specification.rst
16491750 awscli/examples/ec2/get-ebs-default-kms-key-id.rst
16501751 awscli/examples/ec2/get-ebs-encryption-by-default.rst
1752 awscli/examples/ec2/get-groups-for-capacity-reservation.rst
16511753 awscli/examples/ec2/get-host-reservation-purchase-preview.rst
16521754 awscli/examples/ec2/get-launch-template-data.rst
16531755 awscli/examples/ec2/get-managed-prefix-list-associations.rst
16561758 awscli/examples/ec2/get-reserved-instances-exchange-quote.rst
16571759 awscli/examples/ec2/get-transit-gateway-attachment-propagations.rst
16581760 awscli/examples/ec2/get-transit-gateway-multicast-domain-associations.rst
1761 awscli/examples/ec2/get-transit-gateway-prefix-list-references.rst
16591762 awscli/examples/ec2/get-transit-gateway-route-table-associations.rst
16601763 awscli/examples/ec2/get-transit-gateway-route-table-propagations.rst
16611764 awscli/examples/ec2/import-client-vpn-client-certificate-revocation-list.rst
16621765 awscli/examples/ec2/import-image.rst
16631766 awscli/examples/ec2/import-key-pair.rst
16641767 awscli/examples/ec2/import-snapshot.rst
1768 awscli/examples/ec2/modify-availability-zone-group.rst
16651769 awscli/examples/ec2/modify-capacity-reservation.rst
16661770 awscli/examples/ec2/modify-client-vpn-endpoint.rst
16671771 awscli/examples/ec2/modify-default-credit-specification.rst
16681772 awscli/examples/ec2/modify-ebs-default-kms-key-id.rst
1773 awscli/examples/ec2/modify-fleet.rst
16691774 awscli/examples/ec2/modify-fpga-image-attribute.rst
16701775 awscli/examples/ec2/modify-hosts.rst
16711776 awscli/examples/ec2/modify-id-format.rst
16751780 awscli/examples/ec2/modify-instance-capacity-reservation-attributes.rst
16761781 awscli/examples/ec2/modify-instance-credit-specification.rst
16771782 awscli/examples/ec2/modify-instance-event-start-time.rst
1783 awscli/examples/ec2/modify-instance-metadata-options.rst
16781784 awscli/examples/ec2/modify-instance-placement.rst
16791785 awscli/examples/ec2/modify-launch-template.rst
16801786 awscli/examples/ec2/modify-managed-prefix-list.rst
16861792 awscli/examples/ec2/modify-traffic-mirror-filter-network-services.rst
16871793 awscli/examples/ec2/modify-traffic-mirror-filter-rule.rst
16881794 awscli/examples/ec2/modify-traffic-mirror-session.rst
1795 awscli/examples/ec2/modify-transit-gateway-prefix-list-reference.rst
16891796 awscli/examples/ec2/modify-transit-gateway-vpc-attachment.rst
1797 awscli/examples/ec2/modify-transit-gateway.rst
16901798 awscli/examples/ec2/modify-volume-attribute.rst
16911799 awscli/examples/ec2/modify-volume.rst
16921800 awscli/examples/ec2/modify-vpc-attribute.rst
16961804 awscli/examples/ec2/modify-vpc-endpoint.rst
16971805 awscli/examples/ec2/modify-vpc-peering-connection-options.rst
16981806 awscli/examples/ec2/modify-vpc-tenancy.rst
1807 awscli/examples/ec2/modify-vpn-connection-options.rst
16991808 awscli/examples/ec2/modify-vpn-connection.rst
17001809 awscli/examples/ec2/modify-vpn-tunnel-certificate.rst
17011810 awscli/examples/ec2/modify-vpn-tunnel-options.rst
17081817 awscli/examples/ec2/purchase-scheduled-instances.rst
17091818 awscli/examples/ec2/reboot-instances.rst
17101819 awscli/examples/ec2/register-image.rst
1820 awscli/examples/ec2/register-instance-event-notification-attributes.rst
17111821 awscli/examples/ec2/register-transit-gateway-multicast-group-members.rst
17121822 awscli/examples/ec2/register-transit-gateway-multicast-group-source.rst
17131823 awscli/examples/ec2/reject-transit-gateway-peering-attachment.rst
18181928 awscli/examples/ecr/tag-resource.rst
18191929 awscli/examples/ecr/untag-resource.rst
18201930 awscli/examples/ecr/upload-layer-part.rst
1931 awscli/examples/ecr-public/get-login-password_description.rst
18211932 awscli/examples/ecs/create-capacity-provider.rst
18221933 awscli/examples/ecs/create-cluster.rst
18231934 awscli/examples/ecs/create-service.rst
18641975 awscli/examples/ecs/update-service.rst
18651976 awscli/examples/ecs/update-task-set.rst
18661977 awscli/examples/ecs/wait/services-stable.rst
1978 awscli/examples/efs/create-file-system.rst
1979 awscli/examples/efs/create-mount-target.rst
1980 awscli/examples/efs/delete-file-system.rst
1981 awscli/examples/efs/delete-mount-target.rst
1982 awscli/examples/efs/describe-file-systems.rst
1983 awscli/examples/efs/describe-mount-targets.rst
1984 awscli/examples/efs/describe-tags.rst
1985 awscli/examples/efs/list-tags-for-resource.rst
1986 awscli/examples/efs/tag-resource.rst
1987 awscli/examples/efs/untag-resource.rst
18671988 awscli/examples/eks/create-cluster.rst
18681989 awscli/examples/eks/delete-cluster.rst
18691990 awscli/examples/eks/describe-cluster.rst
18872008 awscli/examples/elasticache/create-global-replication-group.rst
18882009 awscli/examples/elasticache/create-replication-group.rst
18892010 awscli/examples/elasticache/create-snapshot.rst
2011 awscli/examples/elasticache/create-user-group.rst
2012 awscli/examples/elasticache/create-user.rst
18902013 awscli/examples/elasticache/decrease-node-groups-in-global-replication-group.rst
18912014 awscli/examples/elasticache/decrease-replica-count.rst
18922015 awscli/examples/elasticache/delete-cache-cluster.rst
18952018 awscli/examples/elasticache/delete-global-replication-group.rst
18962019 awscli/examples/elasticache/delete-replication-group.rst
18972020 awscli/examples/elasticache/delete-snapshot.rst
2021 awscli/examples/elasticache/delete-user-group.rst
2022 awscli/examples/elasticache/delete-user.rst
18982023 awscli/examples/elasticache/describe-cache-clusters.rst
18992024 awscli/examples/elasticache/describe-cache-engine-versions.rst
19002025 awscli/examples/elasticache/describe-cache-parameter-groups.rst
19092034 awscli/examples/elasticache/describe-service-updates.rst
19102035 awscli/examples/elasticache/describe-snapshots.rst
19112036 awscli/examples/elasticache/describe-update-actions.rst
2037 awscli/examples/elasticache/describe-user-groups.rst
2038 awscli/examples/elasticache/describe-users.rst
19122039 awscli/examples/elasticache/disassociate-global-replication-group.rst
19132040 awscli/examples/elasticache/increase-node-groups-in-global-replication-group.rst
19142041 awscli/examples/elasticache/increase-replica-count.rst
19202047 awscli/examples/elasticache/modify-global-replication-group.rst
19212048 awscli/examples/elasticache/modify-replication-group-shard-configuration.rst
19222049 awscli/examples/elasticache/modify-replication-group.rst
2050 awscli/examples/elasticache/modify-user-group.rst
2051 awscli/examples/elasticache/modify-user.rst
19232052 awscli/examples/elasticache/purchase-reserved-cache-nodes-offering.rst
19242053 awscli/examples/elasticache/reboot-cache-cluster.rst
19252054 awscli/examples/elasticache/reset-cache-parameter-group.rst
20682197 awscli/examples/emr/socks.rst
20692198 awscli/examples/emr/ssh.rst
20702199 awscli/examples/emr/wait.rst
2200 awscli/examples/emr-containers/update-role-trust-policy.rst
2201 awscli/examples/emr-containers/update-role-trust-policy/_description.rst
20712202 awscli/examples/es/create-elasticsearch-domain.rst
20722203 awscli/examples/es/describe-elasticsearch-domain-config.rst
20732204 awscli/examples/es/describe-elasticsearch-domain.rst
21822313 awscli/examples/globalaccelerator/update-endpoint-group.rst
21832314 awscli/examples/globalaccelerator/update-listener.rst
21842315 awscli/examples/globalaccelerator/withdraw-byoip-cidr.rst
2316 awscli/examples/glue/batch-stop-job-run.rst
2317 awscli/examples/glue/create-connection.rst
2318 awscli/examples/glue/create-database.rst
2319 awscli/examples/glue/create-job.rst
2320 awscli/examples/glue/create-table.rst
2321 awscli/examples/glue/delete-job.rst
2322 awscli/examples/glue/get-databases.rst
2323 awscli/examples/glue/get-job-run.rst
2324 awscli/examples/glue/get-job-runs.rst
2325 awscli/examples/glue/get-job.rst
2326 awscli/examples/glue/get-plan.rst
2327 awscli/examples/glue/get-tables.rst
21852328 awscli/examples/glue/start-crawler.rst
21862329 awscli/examples/glue/start-job-run.rst
21872330 awscli/examples/greengrass/associate-role-to-group.rst
22382381 awscli/examples/greengrass/get-service-role-for-account.rst
22392382 awscli/examples/greengrass/get-subscription-definition-version.rst
22402383 awscli/examples/greengrass/get-subscription-definition.rst
2384 awscli/examples/greengrass/get-thing-runtime-configuration.rst
22412385 awscli/examples/greengrass/list-bulk-deployment-detailed-reports.rst
22422386 awscli/examples/greengrass/list-bulk-deployments.rst
22432387 awscli/examples/greengrass/list-connector-definition-versions.rst
22742418 awscli/examples/greengrass/update-logger-definition.rst
22752419 awscli/examples/greengrass/update-resource-definition.rst
22762420 awscli/examples/greengrass/update-subscription-definition.rst
2421 awscli/examples/greengrass/update-thing-runtime-configuration.rst
22772422 awscli/examples/guardduty/accept-invitation.rst
22782423 awscli/examples/guardduty/archive-findings.rst
22792424 awscli/examples/guardduty/create-detector.rst
25372682 awscli/examples/iot/cancel-job.rst
25382683 awscli/examples/iot/clear-default-authorizer.rst
25392684 awscli/examples/iot/confirm-topic-rule-destination.rst
2685 awscli/examples/iot/create-audit-suppression.rst
25402686 awscli/examples/iot/create-authorizer.rst
25412687 awscli/examples/iot/create-billing-group.rst
25422688 awscli/examples/iot/create-certificate-from-csr.rst
25622708 awscli/examples/iot/create-topic-rule-destination.rst
25632709 awscli/examples/iot/create-topic-rule.rst
25642710 awscli/examples/iot/delete-account-audit-configuration.rst
2711 awscli/examples/iot/delete-audit-suppression.rst
25652712 awscli/examples/iot/delete-authorizer.rst
25662713 awscli/examples/iot/delete-billing-group.rst
25672714 awscli/examples/iot/delete-ca-certificate.rst
25922739 awscli/examples/iot/describe-account-audit-configuration.rst
25932740 awscli/examples/iot/describe-audit-finding.rst
25942741 awscli/examples/iot/describe-audit-mitigation-actions-task.rst
2742 awscli/examples/iot/describe-audit-suppression.rst
25952743 awscli/examples/iot/describe-audit-task.rst
25962744 awscli/examples/iot/describe-authorizer.rst
25972745 awscli/examples/iot/describe-billing-group.rst
26392787 awscli/examples/iot/list-audit-findings.rst
26402788 awscli/examples/iot/list-audit-mitigation-actions-executions.rst
26412789 awscli/examples/iot/list-audit-mitigation-actions-tasks.rst
2790 awscli/examples/iot/list-audit-suppressions.rst
26422791 awscli/examples/iot/list-audit-tasks.rst
26432792 awscli/examples/iot/list-authorizers.rst
26442793 awscli/examples/iot/list-billing-groups.rst
26982847 awscli/examples/iot/transfer-certificate.rst
26992848 awscli/examples/iot/untag-resource.rst
27002849 awscli/examples/iot/update-account-audit-configuration.rst
2850 awscli/examples/iot/update-audit-suppression.rst
27012851 awscli/examples/iot/update-authorizer.rst
27022852 awscli/examples/iot/update-billing-group.rst
27032853 awscli/examples/iot/update-ca-certificate.rst
34423592 awscli/examples/pinpoint/list-tags-for-resource.rst
34433593 awscli/examples/pinpoint/tag-resource.rst
34443594 awscli/examples/pinpoint/untag-resource.rst
3595 awscli/examples/polly/delete-lexicon.rst
3596 awscli/examples/polly/get-lexicon.rst
3597 awscli/examples/polly/get-speech-synthesis-task.rst
3598 awscli/examples/polly/list-lexicons.rst
3599 awscli/examples/polly/list-speech-synthesis-tasks.rst
3600 awscli/examples/polly/put-lexicon.rst
3601 awscli/examples/polly/start-speech-synthesis-task.rst
34453602 awscli/examples/pricing/describe-services.rst
34463603 awscli/examples/pricing/get-attribute-values.rst
34473604 awscli/examples/pricing/get-products.rst
34913648 awscli/examples/rds/copy-db-parameter-group.rst
34923649 awscli/examples/rds/copy-db-snapshot.rst
34933650 awscli/examples/rds/copy-option-group.rst
3651 awscli/examples/rds/create-custom-availability-zone.rst
34943652 awscli/examples/rds/create-db-cluster-endpoint.rst
34953653 awscli/examples/rds/create-db-cluster-parameter-group.rst
34963654 awscli/examples/rds/create-db-cluster-snapshot.rst
35023660 awscli/examples/rds/create-db-snapshot.rst
35033661 awscli/examples/rds/create-db-subnet-group.rst
35043662 awscli/examples/rds/create-event-subscription.rst
3663 awscli/examples/rds/create-global-cluster.rst
35053664 awscli/examples/rds/create-option-group.rst
3665 awscli/examples/rds/delete-custom-availability-zone.rst
35063666 awscli/examples/rds/delete-db-cluster-endpoint.rst
35073667 awscli/examples/rds/delete-db-cluster-parameter-group.rst
35083668 awscli/examples/rds/delete-db-cluster-snapshot.rst
35093669 awscli/examples/rds/delete-db-cluster.rst
3670 awscli/examples/rds/delete-db-instance-automated-backup.rst
35103671 awscli/examples/rds/delete-db-instance.rst
35113672 awscli/examples/rds/delete-db-parameter-group.rst
35123673 awscli/examples/rds/delete-db-security-group.rst
35133674 awscli/examples/rds/delete-db-snapshot.rst
35143675 awscli/examples/rds/delete-db-subnet-group.rst
35153676 awscli/examples/rds/delete-event-subscription.rst
3677 awscli/examples/rds/delete-global-cluster.rst
3678 awscli/examples/rds/delete-installation-media.rst
35163679 awscli/examples/rds/delete-option-group.rst
35173680 awscli/examples/rds/describe-account-attributes.rst
35183681 awscli/examples/rds/describe-certificates.rst
3682 awscli/examples/rds/describe-custom-availability-zones.rst
35193683 awscli/examples/rds/describe-db-cluster-endpoints.rst
35203684 awscli/examples/rds/describe-db-cluster-parameter-groups.rst
35213685 awscli/examples/rds/describe-db-cluster-parameters.rst
35383702 awscli/examples/rds/describe-event-subscriptions.rst
35393703 awscli/examples/rds/describe-events.rst
35403704 awscli/examples/rds/describe-export-tasks.rst
3705 awscli/examples/rds/describe-global-clusters.rst
3706 awscli/examples/rds/describe-installation-media.rst
35413707 awscli/examples/rds/describe-option-group-options.rst
35423708 awscli/examples/rds/describe-option-groups.rst
35433709 awscli/examples/rds/describe-orderable-db-instance-options.rst
35483714 awscli/examples/rds/describe-valid-db-instance-modifications.rst
35493715 awscli/examples/rds/download-db-log-file-portion.rst
35503716 awscli/examples/rds/generate-auth-token.rst
3717 awscli/examples/rds/import-installation-media.rst
35513718 awscli/examples/rds/list-tags-for-resource.rst
35523719 awscli/examples/rds/modify-db-cluster-endpoint.rst
35533720 awscli/examples/rds/modify-db-cluster-snapshot-attribute.rst
35593726 awscli/examples/rds/modify-db-snapshot.rst
35603727 awscli/examples/rds/modify-db-subnet-group.rst
35613728 awscli/examples/rds/modify-event-subscription.rst
3729 awscli/examples/rds/modify-global-cluster.rst
35623730 awscli/examples/rds/promote-read-replica.rst
35633731 awscli/examples/rds/purchase-reserved-db-instance.rst
35643732 awscli/examples/rds/purchase-reserved-db-instances-offerings.rst
35723740 awscli/examples/rds/restore-db-instance-from-db-snapshot.rst
35733741 awscli/examples/rds/restore-db-instance-from-s3.rst
35743742 awscli/examples/rds/restore-db-instance-to-point-in-time.rst
3743 awscli/examples/rds/start-db-instance-automated-backups-replication.rst
35753744 awscli/examples/rds/start-db-instance.rst
35763745 awscli/examples/rds/start-export-task.rst
35773746 awscli/examples/rds/stop-db-cluster.rst
3747 awscli/examples/rds/stop-db-instance-automated-backups-replication.rst
35783748 awscli/examples/rds/stop-db-instance.rst
35793749 awscli/examples/rds-data/batch-execute-statement.rst
35803750 awscli/examples/rds-data/begin-transaction.rst
37653935 awscli/examples/route53/list-health-checks.rst
37663936 awscli/examples/route53/list-hosted-zones-by-name.rst
37673937 awscli/examples/route53/list-hosted-zones.rst
3938 awscli/examples/route53/list-query-logging-configs.rst
37683939 awscli/examples/route53/list-resource-record-sets.rst
37693940 awscli/examples/route53domains/check-domain-availability.rst
37703941 awscli/examples/route53domains/check-domain-transferability.rst
39624133 awscli/examples/securityhub/delete-members.rst
39634134 awscli/examples/securityhub/describe-action-targets.rst
39644135 awscli/examples/securityhub/describe-hub.rst
4136 awscli/examples/securityhub/describe-organization-configuration.rst
39654137 awscli/examples/securityhub/describe-products.rst
39664138 awscli/examples/securityhub/describe-standards-controls.rst
39674139 awscli/examples/securityhub/describe-standards.rst
39684140 awscli/examples/securityhub/disable-import-findings-for-product.rst
4141 awscli/examples/securityhub/disable-organization-admin-account.rst
39694142 awscli/examples/securityhub/disable-security-hub.rst
39704143 awscli/examples/securityhub/disassociate-from-master-account.rst
39714144 awscli/examples/securityhub/disassociate-members.rst
39724145 awscli/examples/securityhub/enable-import-findings-for-product.rst
4146 awscli/examples/securityhub/enable-organization-admin-account.rst
39734147 awscli/examples/securityhub/enable-security-hub.rst
39744148 awscli/examples/securityhub/get-enabled-standards.rst
39754149 awscli/examples/securityhub/get-findings.rst
39824156 awscli/examples/securityhub/list-enabled-products-for-import.rst
39834157 awscli/examples/securityhub/list-invitations.rst
39844158 awscli/examples/securityhub/list-members.rst
4159 awscli/examples/securityhub/list-organization-admin-accounts.rst
39854160 awscli/examples/securityhub/list-tags-for-resource.rst
39864161 awscli/examples/securityhub/tag-resource.rst
39874162 awscli/examples/securityhub/untag-resource.rst
39884163 awscli/examples/securityhub/update-action-target.rst
39894164 awscli/examples/securityhub/update-insight.rst
4165 awscli/examples/securityhub/update-organization-configuration.rst
39904166 awscli/examples/securityhub/update-security-hub-configuration.rst
39914167 awscli/examples/securityhub/update-standards-control.rst
39924168 awscli/examples/serverlessrepo/put-application-policy.rst
40404216 awscli/examples/servicecatalog/update-product.rst
40414217 awscli/examples/servicecatalog/update-provisioning-artifact.rst
40424218 awscli/examples/servicecatalog/update-tag-option.rst
4219 awscli/examples/servicediscovery/create-private-dns-namespace.rst
4220 awscli/examples/servicediscovery/create-service.rst
4221 awscli/examples/servicediscovery/delete-namespace.rst
4222 awscli/examples/servicediscovery/delete-service.rst
4223 awscli/examples/servicediscovery/deregister-instance.rst
4224 awscli/examples/servicediscovery/discover-instances.rst
4225 awscli/examples/servicediscovery/get-operation.rst
4226 awscli/examples/servicediscovery/list-instances.rst
4227 awscli/examples/servicediscovery/list-namespaces.rst
4228 awscli/examples/servicediscovery/list-services.rst
4229 awscli/examples/servicediscovery/register-instance.rst
40434230 awscli/examples/ses/delete-identity.rst
40444231 awscli/examples/ses/get-identity-dkim-attributes.rst
40454232 awscli/examples/ses/get-identity-notification-attributes.rst
42974484 awscli/examples/textract/get-document-text-detection.rst
42984485 awscli/examples/textract/start-document-analysis.rst
42994486 awscli/examples/textract/start-document-text-detection.rst
4487 awscli/examples/transcribe/create-language-model.rst
4488 awscli/examples/transcribe/create-medical-vocabulary.rst
4489 awscli/examples/transcribe/create-vocabulary-filter.rst
4490 awscli/examples/transcribe/create-vocabulary.rst
4491 awscli/examples/transcribe/delete-language-model.rst
4492 awscli/examples/transcribe/delete-medical-transcription-job.rst
4493 awscli/examples/transcribe/delete-medical-vocabulary.rst
4494 awscli/examples/transcribe/delete-transcription-job.rst
4495 awscli/examples/transcribe/delete-vocabulary-filter.rst
4496 awscli/examples/transcribe/delete-vocabulary.rst
4497 awscli/examples/transcribe/describe-language-model.rst
4498 awscli/examples/transcribe/get-medical-transcription-job.rst
4499 awscli/examples/transcribe/get-medical-vocabulary.rst
4500 awscli/examples/transcribe/get-transcription-job.rst
4501 awscli/examples/transcribe/get-vocabulary-filter.rst
4502 awscli/examples/transcribe/get-vocabulary.rst
4503 awscli/examples/transcribe/list-language-models.rst
4504 awscli/examples/transcribe/list-medical-transcription-jobs.rst
4505 awscli/examples/transcribe/list-medical-vocabularies.rst
4506 awscli/examples/transcribe/list-transcription-jobs.rst
4507 awscli/examples/transcribe/list-vocabularies.rst
4508 awscli/examples/transcribe/list-vocabulary-filters.rst
4509 awscli/examples/transcribe/start-medical-transcription-job.rst
4510 awscli/examples/transcribe/start-transcription-job.rst
4511 awscli/examples/transcribe/update-medical-vocabulary.rst
4512 awscli/examples/transcribe/update-vocabulary-filter.rst
4513 awscli/examples/transcribe/update-vocabulary.rst
43004514 awscli/examples/translate/import-terminology.rst
43014515 awscli/examples/waf/put-logging-configuration.rst
43024516 awscli/examples/waf/update-byte-match-set.rst
0 botocore==1.17.58
0 botocore==1.19.59
11 docutils<0.16,>=0.10
22 s3transfer<0.4.0,>=0.3.0
33 PyYAML<5.4,>=3.10
22
33 [metadata]
44 requires-dist =
5 botocore==1.17.58
5 botocore==1.19.59
66 docutils>=0.10,<0.16
77 s3transfer>=0.3.0,<0.4.0
88 PyYAML>=3.10,<5.3; python_version=='3.4'
2323
2424
2525 install_requires = [
26 'botocore==1.17.58',
26 'botocore==1.19.59',
2727 'docutils>=0.10,<0.16',
2828 's3transfer>=0.3.0,<0.4.0',
2929 ]
4343 name='awscli',
4444 version=find_version("awscli", "__init__.py"),
4545 description='Universal Command Line Environment for AWS.',
46 long_description=read('README.md'),
46 long_description=read('README.rst'),
4747 author='Amazon Web Services',
4848 url='http://aws.amazon.com/cli/',
4949 scripts=['bin/aws', 'bin/aws.cmd',