hc99 commited on
Commit
5eac392
·
verified ·
1 Parent(s): 21e6198

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. testbed/biopragmatics__bioregistry/.gitignore +324 -0
  2. testbed/biopragmatics__bioregistry/MANIFEST.in +24 -0
  3. testbed/biopragmatics__bioregistry/setup.cfg +38 -0
  4. testbed/biopragmatics__bioregistry/tests/test_ols.py +20 -0
  5. testbed/biopragmatics__bioregistry/tests/test_utils.py +67 -0
  6. testbed/boto__boto3/boto3/__init__.py +96 -0
  7. testbed/boto__boto3/boto3/data/resources/cloudformation-2010-05-15.resources.json +194 -0
  8. testbed/boto__boto3/boto3/data/resources/dynamodb-2012-08-10.resources.json +136 -0
  9. testbed/boto__boto3/boto3/data/resources/ec2-2014-10-01.resources.json +2289 -0
  10. testbed/boto__boto3/boto3/data/resources/glacier-2012-06-01.resources.json +558 -0
  11. testbed/boto__boto3/boto3/data/resources/opsworks-2013-02-18.resources.json +173 -0
  12. testbed/boto__boto3/boto3/data/resources/sns-2010-03-31.resources.json +327 -0
  13. testbed/boto__boto3/boto3/data/resources/sqs-2012-11-05.resources.json +232 -0
  14. testbed/boto__boto3/boto3/exceptions.py +33 -0
  15. testbed/boto__boto3/boto3/resources/action.py +196 -0
  16. testbed/boto__boto3/boto3/s3/inject.py +35 -0
  17. testbed/boto__boto3/boto3/s3/transfer.py +684 -0
  18. testbed/boto__boto3/boto3/session.py +318 -0
  19. testbed/boto__boto3/docs/source/guide/collections.rst +143 -0
  20. testbed/boto__boto3/docs/source/guide/configuration.rst +117 -0
  21. testbed/boto__boto3/docs/source/guide/migration.rst +64 -0
  22. testbed/boto__boto3/docs/source/guide/migrationec2.rst +125 -0
  23. testbed/boto__boto3/docs/source/guide/migrations3.rst +163 -0
  24. testbed/boto__boto3/docs/source/guide/resources.rst +204 -0
  25. testbed/boto__boto3/docs/source/reference/customizations/s3.rst +20 -0
  26. testbed/boto__botocore/.changes/1.10.33.json +27 -0
  27. testbed/boto__botocore/.changes/1.10.41.json +7 -0
  28. testbed/boto__botocore/.changes/1.10.47.json +27 -0
  29. testbed/boto__botocore/.changes/1.10.49.json +7 -0
  30. testbed/boto__botocore/.changes/1.10.50.json +17 -0
  31. testbed/boto__botocore/.changes/1.10.51.json +12 -0
  32. testbed/boto__botocore/.changes/1.10.55.json +27 -0
  33. testbed/boto__botocore/.changes/1.10.56.json +22 -0
  34. testbed/boto__botocore/.changes/1.10.57.json +32 -0
  35. testbed/boto__botocore/.changes/1.10.58.json +17 -0
  36. testbed/boto__botocore/.changes/1.10.59.json +22 -0
  37. testbed/boto__botocore/.changes/1.10.6.json +12 -0
  38. testbed/boto__botocore/.changes/1.10.60.json +7 -0
  39. testbed/boto__botocore/.changes/1.10.61.json +7 -0
  40. testbed/boto__botocore/.changes/1.10.62.json +12 -0
  41. testbed/boto__botocore/.changes/1.10.65.json +32 -0
  42. testbed/boto__botocore/.changes/1.10.66.json +42 -0
  43. testbed/boto__botocore/.changes/1.10.67.json +27 -0
  44. testbed/boto__botocore/.changes/1.10.68.json +12 -0
  45. testbed/boto__botocore/.changes/1.10.69.json +22 -0
  46. testbed/boto__botocore/.changes/1.10.7.json +17 -0
  47. testbed/boto__botocore/.changes/1.10.70.json +7 -0
  48. testbed/boto__botocore/.changes/1.10.71.json +12 -0
  49. testbed/boto__botocore/.changes/1.10.72.json +27 -0
  50. testbed/boto__botocore/.changes/1.10.73.json +12 -0
testbed/biopragmatics__bioregistry/.gitignore ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Created by https://www.toptal.com/developers/gitignore/api/python,macos,linux,pycharm
3
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python,macos,linux,pycharm
4
+
5
+ ### Linux ###
6
+ *~
7
+
8
+ # temporary files which can be created if a process still has a handle open of a deleted file
9
+ .fuse_hidden*
10
+
11
+ # KDE directory preferences
12
+ .directory
13
+
14
+ # Linux trash folder which might appear on any partition or disk
15
+ .Trash-*
16
+
17
+ # .nfs files are created when an open file is removed but is still being accessed
18
+ .nfs*
19
+
20
+ ### macOS ###
21
+ # General
22
+ .DS_Store
23
+ .AppleDouble
24
+ .LSOverride
25
+
26
+ # Icon must end with two \r
27
+ Icon
28
+
29
+
30
+ # Thumbnails
31
+ ._*
32
+
33
+ # Files that might appear in the root of a volume
34
+ .DocumentRevisions-V100
35
+ .fseventsd
36
+ .Spotlight-V100
37
+ .TemporaryItems
38
+ .Trashes
39
+ .VolumeIcon.icns
40
+ .com.apple.timemachine.donotpresent
41
+
42
+ # Directories potentially created on remote AFP share
43
+ .AppleDB
44
+ .AppleDesktop
45
+ Network Trash Folder
46
+ Temporary Items
47
+ .apdisk
48
+
49
+ ### PyCharm ###
50
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
51
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
52
+
53
+ # User-specific stuff
54
+ .idea/**/workspace.xml
55
+ .idea/**/tasks.xml
56
+ .idea/**/usage.statistics.xml
57
+ .idea/**/dictionaries
58
+ .idea/**/shelf
59
+
60
+ # Generated files
61
+ .idea/**/contentModel.xml
62
+
63
+ # Sensitive or high-churn files
64
+ .idea/**/dataSources/
65
+ .idea/**/dataSources.ids
66
+ .idea/**/dataSources.local.xml
67
+ .idea/**/sqlDataSources.xml
68
+ .idea/**/dynamic.xml
69
+ .idea/**/uiDesigner.xml
70
+ .idea/**/dbnavigator.xml
71
+
72
+ # Gradle
73
+ .idea/**/gradle.xml
74
+ .idea/**/libraries
75
+
76
+ # Gradle and Maven with auto-import
77
+ # When using Gradle or Maven with auto-import, you should exclude module files,
78
+ # since they will be recreated, and may cause churn. Uncomment if using
79
+ # auto-import.
80
+ # .idea/artifacts
81
+ # .idea/compiler.xml
82
+ # .idea/jarRepositories.xml
83
+ # .idea/modules.xml
84
+ # .idea/*.iml
85
+ # .idea/modules
86
+ # *.iml
87
+ # *.ipr
88
+
89
+ # CMake
90
+ cmake-build-*/
91
+
92
+ # Mongo Explorer plugin
93
+ .idea/**/mongoSettings.xml
94
+
95
+ # File-based project format
96
+ *.iws
97
+
98
+ # IntelliJ
99
+ out/
100
+
101
+ # mpeltonen/sbt-idea plugin
102
+ .idea_modules/
103
+
104
+ # JIRA plugin
105
+ atlassian-ide-plugin.xml
106
+
107
+ # Cursive Clojure plugin
108
+ .idea/replstate.xml
109
+
110
+ # Crashlytics plugin (for Android Studio and IntelliJ)
111
+ com_crashlytics_export_strings.xml
112
+ crashlytics.properties
113
+ crashlytics-build.properties
114
+ fabric.properties
115
+
116
+ # Editor-based Rest Client
117
+ .idea/httpRequests
118
+
119
+ # Android studio 3.1+ serialized cache file
120
+ .idea/caches/build_file_checksums.ser
121
+
122
+ ### PyCharm Patch ###
123
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
124
+
125
+ # *.iml
126
+ # modules.xml
127
+ # .idea/misc.xml
128
+ # *.ipr
129
+
130
+ # Sonarlint plugin
131
+ # https://plugins.jetbrains.com/plugin/7973-sonarlint
132
+ .idea/**/sonarlint/
133
+
134
+ # SonarQube Plugin
135
+ # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
136
+ .idea/**/sonarIssues.xml
137
+
138
+ # Markdown Navigator plugin
139
+ # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
140
+ .idea/**/markdown-navigator.xml
141
+ .idea/**/markdown-navigator-enh.xml
142
+ .idea/**/markdown-navigator/
143
+
144
+ # Cache file creation bug
145
+ # See https://youtrack.jetbrains.com/issue/JBR-2257
146
+ .idea/$CACHE_FILE$
147
+
148
+ # CodeStream plugin
149
+ # https://plugins.jetbrains.com/plugin/12206-codestream
150
+ .idea/codestream.xml
151
+
152
+ ### Python ###
153
+ # Byte-compiled / optimized / DLL files
154
+ __pycache__/
155
+ *.py[cod]
156
+ *$py.class
157
+
158
+ # C extensions
159
+ *.so
160
+
161
+ # Distribution / packaging
162
+ .Python
163
+ build/
164
+ develop-eggs/
165
+ dist/
166
+ downloads/
167
+ eggs/
168
+ .eggs/
169
+ lib/
170
+ lib64/
171
+ parts/
172
+ sdist/
173
+ var/
174
+ wheels/
175
+ pip-wheel-metadata/
176
+ share/python-wheels/
177
+ *.egg-info/
178
+ .installed.cfg
179
+ *.egg
180
+ MANIFEST
181
+
182
+ # PyInstaller
183
+ # Usually these files are written by a python script from a template
184
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
185
+ *.manifest
186
+ *.spec
187
+
188
+ # Installer logs
189
+ pip-log.txt
190
+ pip-delete-this-directory.txt
191
+
192
+ # Unit test / coverage reports
193
+ htmlcov/
194
+ .tox/
195
+ .nox/
196
+ .coverage
197
+ .coverage.*
198
+ .cache
199
+ nosetests.xml
200
+ coverage.xml
201
+ *.cover
202
+ *.py,cover
203
+ .hypothesis/
204
+ .pytest_cache/
205
+ pytestdebug.log
206
+
207
+ # Translations
208
+ *.mo
209
+ *.pot
210
+
211
+ # Django stuff:
212
+ *.log
213
+ local_settings.py
214
+ db.sqlite3
215
+ db.sqlite3-journal
216
+
217
+ # Flask stuff:
218
+ instance/
219
+ .webassets-cache
220
+
221
+ # Scrapy stuff:
222
+ .scrapy
223
+
224
+ # Sphinx documentation
225
+ docs/_build/
226
+ doc/_build/
227
+
228
+ # PyBuilder
229
+ target/
230
+
231
+ # Jupyter Notebook
232
+ .ipynb_checkpoints
233
+
234
+ # IPython
235
+ profile_default/
236
+ ipython_config.py
237
+
238
+ # pyenv
239
+ .python-version
240
+
241
+ # pipenv
242
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
243
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
244
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
245
+ # install all needed dependencies.
246
+ #Pipfile.lock
247
+
248
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
249
+ __pypackages__/
250
+
251
+ # Celery stuff
252
+ celerybeat-schedule
253
+ celerybeat.pid
254
+
255
+ # SageMath parsed files
256
+ *.sage.py
257
+
258
+ # Environments
259
+ .env
260
+ .venv
261
+ env/
262
+ venv/
263
+ ENV/
264
+ env.bak/
265
+ venv.bak/
266
+ pythonenv*
267
+
268
+ # Spyder project settings
269
+ .spyderproject
270
+ .spyproject
271
+
272
+ # Rope project settings
273
+ .ropeproject
274
+
275
+ # mkdocs documentation
276
+ /site
277
+
278
+ # mypy
279
+ .mypy_cache/
280
+ .dmypy.json
281
+ dmypy.json
282
+
283
+ # Pyre type checker
284
+ .pyre/
285
+
286
+ # pytype static type analyzer
287
+ .pytype/
288
+
289
+ # profiling data
290
+ .prof
291
+
292
+ # End of https://www.toptal.com/developers/gitignore/api/python,macos,linux,pycharm
293
+
294
+ # Created by https://www.toptal.com/developers/gitignore/api/vim
295
+ # Edit at https://www.toptal.com/developers/gitignore?templates=vim
296
+
297
+ ### Vim ###
298
+ # Swap
299
+ [._]*.s[a-v][a-z]
300
+ !*.svg # comment out if you don't need vector files
301
+ [._]*.sw[a-p]
302
+ [._]s[a-rt-v][a-z]
303
+ [._]ss[a-gi-z]
304
+ [._]sw[a-p]
305
+
306
+ # Session
307
+ Session.vim
308
+ Sessionx.vim
309
+
310
+ # Temporary
311
+ .netrwhist
312
+ # Auto-generated tag files
313
+ tags
314
+ # Persistent undo
315
+ [._]*.un~
316
+
317
+ # End of https://www.toptal.com/developers/gitignore/api/vim
318
+
319
+ scratch/
320
+ docs/img/*.png
321
+ docs/img/*.eps
322
+ docs/source/api/
323
+ docs/_site/
324
+ docs/.jekyll-cache/
testbed/biopragmatics__bioregistry/MANIFEST.in ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ graft src
2
+ graft tests
3
+
4
+ recursive-include docs *.py
5
+ recursive-include docs *.rst
6
+ recursive-include docs *.tsv
7
+ recursive-include docs Makefile
8
+ recursive-include docs *.png
9
+ recursive-include docs *.svg
10
+ recursive-exclude docs/img *.png
11
+ global-exclude *.py[cod] __pycache__ *.so *.dylib .DS_Store *.gpickle
12
+
13
+ prune docs/build
14
+ prune docs/_data
15
+ prune docs/source/api
16
+ prune exports
17
+ prune notebooks
18
+ prune tests/.pytest_cache
19
+ exclude docs/*.md
20
+ exclude docs/guides/*.md
21
+ exclude docs/_config.yml
22
+
23
+ exclude .appveyor.yml .bumpversion.cfg .coveragerc .flake8 .travis.yml .readthedocs.yml tox.ini .pre-commit-config.yaml Dockerfile CITATION.cff
24
+ include LICENSE *.md *.rst
testbed/biopragmatics__bioregistry/setup.cfg ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##########################
2
+ # Darglint Configuration #
3
+ ##########################
4
+ [darglint]
5
+ docstring_style = sphinx
6
+ strictness = short
7
+
8
+ #########################
9
+ # Flake8 Configuration #
10
+ # (.flake8) #
11
+ #########################
12
+ [flake8]
13
+ ignore =
14
+ E203
15
+ W503
16
+ # no quotes in strings
17
+ B028
18
+ exclude =
19
+ .tox,
20
+ .git,
21
+ __pycache__,
22
+ docs/source/conf.py,
23
+ build,
24
+ dist,
25
+ tests/fixtures/*,
26
+ *.pyc,
27
+ *.egg-info,
28
+ .cache,
29
+ .eggs,
30
+ data
31
+ per-file-ignores =
32
+ src/bioregistry/app/api.py:B008
33
+ max-line-length = 120
34
+ max-complexity = 20
35
+ import-order-style = pycharm
36
+ application-import-names =
37
+ bioregistry
38
+ tests
testbed/biopragmatics__bioregistry/tests/test_ols.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """Tests for the OLS."""
4
+
5
+ import json
6
+ import unittest
7
+
8
+ from bioregistry.external.ols import OLS_PROCESSING, VersionType
9
+
10
+
11
+ class TestOLS(unittest.TestCase):
12
+ """Tests for the OLS."""
13
+
14
+ def test_version_types(self):
15
+ """Test all processing configurations have valid version types."""
16
+ data = json.loads(OLS_PROCESSING.read_text())
17
+ for entry in data["configurations"]:
18
+ prefix = entry["prefix"]
19
+ with self.subTest(prefix=prefix):
20
+ self.assertIsNotNone(getattr(VersionType, entry["version_type"]))
testbed/biopragmatics__bioregistry/tests/test_utils.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Test utilities."""
2
+
3
+ import unittest
4
+
5
+ from bioregistry.utils import backfill, deduplicate
6
+
7
+
8
+ class TestDeduplicate(unittest.TestCase):
9
+ """Test deduplication workflow."""
10
+
11
+ def test_backfill(self):
12
+ """Test record backfill."""
13
+ records = [
14
+ {"pubmed": "pmid_1"},
15
+ {"arxiv": "arxiv_1", "doi": "doi_1"},
16
+ {"doi": "doi_1", "pubmed": "pmid_1", "title": "yup"},
17
+ {"pubmed": "pmid_1"},
18
+ ]
19
+ res = backfill(records, keys=["pubmed", "doi", "pmc", "arxiv"])
20
+ self.assertEqual(
21
+ [
22
+ {
23
+ "arxiv": "arxiv_1",
24
+ "doi": "doi_1",
25
+ "pubmed": "pmid_1",
26
+ },
27
+ {
28
+ "arxiv": "arxiv_1",
29
+ "doi": "doi_1",
30
+ "pubmed": "pmid_1",
31
+ },
32
+ {
33
+ "arxiv": "arxiv_1",
34
+ "doi": "doi_1",
35
+ "pubmed": "pmid_1",
36
+ "title": "yup",
37
+ },
38
+ {
39
+ "arxiv": "arxiv_1",
40
+ "doi": "doi_1",
41
+ "pubmed": "pmid_1",
42
+ },
43
+ ],
44
+ res,
45
+ )
46
+
47
+ def test_deduplicate(self):
48
+ """Test record deduplication."""
49
+ records = [
50
+ {"arxiv": "arxiv_1", "doi": "doi_1"},
51
+ {"doi": "doi_1", "pubmed": "pmid_1", "title": "yup"},
52
+ {"pubmed": "pmid_1", "pmc": "pmc_1"},
53
+ {"pubmed": "pmid_1"},
54
+ ]
55
+ res = deduplicate(records, keys=["pubmed", "doi", "pmc", "arxiv"])
56
+ self.assertEqual(
57
+ [
58
+ {
59
+ "arxiv": "arxiv_1",
60
+ "doi": "doi_1",
61
+ "pubmed": "pmid_1",
62
+ "title": "yup",
63
+ "pmc": "pmc_1",
64
+ },
65
+ ],
66
+ res,
67
+ )
testbed/boto__boto3/boto3/__init__.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+
14
+ import logging
15
+
16
+ from boto3.session import Session
17
+
18
+
19
+ __author__ = 'Amazon Web Services'
20
+ __version__ = '0.0.16'
21
+
22
+
23
+ # The default Boto3 session; autoloaded when needed.
24
+ DEFAULT_SESSION = None
25
+
26
+ def setup_default_session(**kwargs):
27
+ """
28
+ Set up a default session, passing through any parameters to the session
29
+ constructor. There is no need to call this unless you wish to pass custom
30
+ parameters, because a default session will be created for you.
31
+ """
32
+ global DEFAULT_SESSION
33
+ DEFAULT_SESSION = Session(**kwargs)
34
+
35
+ def set_stream_logger(name='boto3', level=logging.DEBUG, format_string=None):
36
+ """
37
+ Add a stream handler for the given name and level to the logging module.
38
+ By default, this logs all boto3 messages to ``stdout``.
39
+
40
+ >>> import boto3
41
+ >>> boto3.set_stream_logger('boto3.resources', logging.INFO)
42
+
43
+ :type name: string
44
+ :param name: Log name
45
+ :type level: int
46
+ :param level: Logging level, e.g. ``logging.INFO``
47
+ :type format_string: str
48
+ :param format_string: Log message format
49
+ """
50
+ if format_string is None:
51
+ format_string = "%(asctime)s %(name)s [%(levelname)s] %(message)s"
52
+
53
+ logger = logging.getLogger(name)
54
+ logger.setLevel(level)
55
+ handler = logging.StreamHandler()
56
+ handler.setLevel(level)
57
+ formatter = logging.Formatter(format_string)
58
+ handler.setFormatter(formatter)
59
+ logger.addHandler(handler)
60
+
61
+ def _get_default_session():
62
+ """
63
+ Get the default session, creating one if needed.
64
+
65
+ :rtype: :py:class:`~boto3.session.Sesssion`
66
+ :return: The default session
67
+ """
68
+ if DEFAULT_SESSION is None:
69
+ setup_default_session()
70
+
71
+ return DEFAULT_SESSION
72
+
73
+ def client(*args, **kwargs):
74
+ """
75
+ Create a low-level service client by name using the default session.
76
+
77
+ See :py:meth:`boto3.session.Session.client`.
78
+ """
79
+ return _get_default_session().client(*args, **kwargs)
80
+
81
+ def resource(*args, **kwargs):
82
+ """
83
+ Create a resource service client by name using the default session.
84
+
85
+ See :py:meth:`boto3.session.Session.resource`.
86
+ """
87
+ return _get_default_session().resource(*args, **kwargs)
88
+
89
+ # Set up logging to ``/dev/null`` like a library is supposed to.
90
+ # http://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library
91
+ class NullHandler(logging.Handler):
92
+ def emit(self, record):
93
+ pass
94
+
95
+
96
+ logging.getLogger('boto3').addHandler(NullHandler())
testbed/boto__boto3/boto3/data/resources/cloudformation-2010-05-15.resources.json ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "service": {
3
+ "actions": {
4
+ "CreateStack": {
5
+ "request": { "operation": "CreateStack" },
6
+ "resource": {
7
+ "type": "Stack",
8
+ "identifiers": [
9
+ { "target": "Name", "source": "requestParameter", "path": "StackName" }
10
+ ]
11
+ }
12
+ }
13
+ },
14
+ "has": {
15
+ "Event": {
16
+ "resource": {
17
+ "type": "Event",
18
+ "identifiers": [
19
+ { "target": "Id", "source": "input" }
20
+ ]
21
+ }
22
+ },
23
+ "Stack": {
24
+ "resource": {
25
+ "type": "Stack",
26
+ "identifiers": [
27
+ { "target": "Name", "source": "input" }
28
+ ]
29
+ }
30
+ }
31
+ },
32
+ "hasMany": {
33
+ "Stacks": {
34
+ "request": { "operation": "DescribeStacks" },
35
+ "resource": {
36
+ "type": "Stack",
37
+ "identifiers": [
38
+ { "target": "Name", "source": "response", "path": "Stacks[].StackName" }
39
+ ]
40
+ }
41
+ }
42
+ }
43
+ },
44
+ "resources": {
45
+ "Event": {
46
+ "identifiers": [
47
+ {
48
+ "name": "Id",
49
+ "memberName": "EventId"
50
+ }
51
+ ],
52
+ "shape": "StackEvent"
53
+ },
54
+ "Stack": {
55
+ "identifiers": [
56
+ {
57
+ "name": "Name",
58
+ "memberName": "StackName"
59
+ }
60
+ ],
61
+ "shape": "Stack",
62
+ "load": {
63
+ "request": {
64
+ "operation": "DescribeStacks",
65
+ "params": [
66
+ { "target": "StackName", "source": "identifier", "name": "Name" }
67
+ ]
68
+ },
69
+ "path": "Stacks[0]"
70
+ },
71
+ "actions": {
72
+ "CancelUpdate": {
73
+ "request": {
74
+ "operation": "CancelUpdateStack",
75
+ "params": [
76
+ { "target": "StackName", "source": "identifier", "name": "Name" }
77
+ ]
78
+ }
79
+ },
80
+ "Delete": {
81
+ "request": {
82
+ "operation": "DeleteStack",
83
+ "params": [
84
+ { "target": "StackName", "source": "identifier", "name": "Name" }
85
+ ]
86
+ }
87
+ },
88
+ "Update": {
89
+ "request": {
90
+ "operation": "UpdateStack",
91
+ "params": [
92
+ { "target": "StackName", "source": "identifier", "name": "Name" }
93
+ ]
94
+ }
95
+ }
96
+ },
97
+ "has": {
98
+ "Resource": {
99
+ "resource": {
100
+ "type": "StackResource",
101
+ "identifiers": [
102
+ { "target": "StackName", "source": "identifier", "name": "Name" },
103
+ { "target": "LogicalId", "source": "input" }
104
+ ]
105
+ }
106
+ }
107
+ },
108
+ "hasMany": {
109
+ "Events": {
110
+ "request": {
111
+ "operation": "DescribeStackEvents",
112
+ "params": [
113
+ { "target": "StackName", "source": "identifier", "name": "Name" }
114
+ ]
115
+ },
116
+ "resource": {
117
+ "type": "Event",
118
+ "identifiers": [
119
+ { "target": "Id", "source": "response", "path": "StackEvents[].EventId" }
120
+ ],
121
+ "path": "StackEvents[]"
122
+ }
123
+ },
124
+ "ResourceSummaries": {
125
+ "request": {
126
+ "operation": "ListStackResources",
127
+ "params": [
128
+ { "target": "StackName", "source": "identifier", "name": "Name" }
129
+ ]
130
+ },
131
+ "resource": {
132
+ "type": "StackResourceSummary",
133
+ "identifiers": [
134
+ { "target": "LogicalId", "source": "response", "path": "StackResourceSummaries[].LogicalResourceId" },
135
+ { "target": "StackName", "source": "requestParameter", "path": "StackName" }
136
+ ],
137
+ "path": "StackResourceSummaries[]"
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "StackResource": {
143
+ "identifiers": [
144
+ { "name": "StackName" },
145
+ {
146
+ "name": "LogicalId",
147
+ "memberName": "LogicalResourceId"
148
+ }
149
+ ],
150
+ "shape": "StackResourceDetail",
151
+ "load": {
152
+ "request": {
153
+ "operation": "DescribeStackResource",
154
+ "params": [
155
+ { "target": "LogicalResourceId", "source": "identifier", "name": "LogicalId" },
156
+ { "target": "StackName", "source": "identifier", "name": "StackName" }
157
+ ]
158
+ },
159
+ "path": "StackResourceDetail"
160
+ },
161
+ "has": {
162
+ "Stack": {
163
+ "resource": {
164
+ "type": "Stack",
165
+ "identifiers": [
166
+ { "target": "Name", "source": "identifier", "name": "StackName" }
167
+ ]
168
+ }
169
+ }
170
+ }
171
+ },
172
+ "StackResourceSummary": {
173
+ "identifiers": [
174
+ { "name": "StackName" },
175
+ {
176
+ "name": "LogicalId",
177
+ "memberName": "LogicalResourceId"
178
+ }
179
+ ],
180
+ "shape": "StackResourceSummary",
181
+ "has": {
182
+ "Resource": {
183
+ "resource": {
184
+ "type": "StackResource",
185
+ "identifiers": [
186
+ { "target": "LogicalId", "source": "identifier", "name": "LogicalId" },
187
+ { "target": "StackName", "source": "identifier", "name": "StackName" }
188
+ ]
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
testbed/boto__boto3/boto3/data/resources/dynamodb-2012-08-10.resources.json ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "service": {
3
+ "actions": {
4
+ "BatchGetItem": {
5
+ "request": { "operation": "BatchGetItem" }
6
+ },
7
+ "BatchWriteItem": {
8
+ "request": { "operation": "BatchWriteItem" }
9
+ },
10
+ "CreateTable": {
11
+ "request": { "operation": "CreateTable" },
12
+ "resource": {
13
+ "type": "Table",
14
+ "identifiers": [
15
+ { "target": "Name", "source": "response", "path": "TableDescription.TableName" }
16
+ ],
17
+ "path": "TableDescription"
18
+ }
19
+ }
20
+ },
21
+ "has": {
22
+ "Table": {
23
+ "resource": {
24
+ "type": "Table",
25
+ "identifiers": [
26
+ { "target": "Name", "source": "input" }
27
+ ]
28
+ }
29
+ }
30
+ },
31
+ "hasMany": {
32
+ "Tables": {
33
+ "request": { "operation": "ListTables" },
34
+ "resource": {
35
+ "type": "Table",
36
+ "identifiers": [
37
+ { "target": "Name", "source": "response", "path": "TableNames[]" }
38
+ ]
39
+ }
40
+ }
41
+ }
42
+ },
43
+ "resources": {
44
+ "Table": {
45
+ "identifiers": [
46
+ {
47
+ "name": "Name",
48
+ "memberName": "TableName"
49
+ }
50
+ ],
51
+ "shape": "TableDescription",
52
+ "load": {
53
+ "request": {
54
+ "operation": "DescribeTable",
55
+ "params": [
56
+ { "target": "TableName", "source": "identifier", "name": "Name" }
57
+ ]
58
+ },
59
+ "path": "Table"
60
+ },
61
+ "actions": {
62
+ "Delete": {
63
+ "request": {
64
+ "operation": "DeleteTable",
65
+ "params": [
66
+ { "target": "TableName", "source": "identifier", "name": "Name" }
67
+ ]
68
+ }
69
+ },
70
+ "DeleteItem": {
71
+ "request": {
72
+ "operation": "DeleteItem",
73
+ "params": [
74
+ { "target": "TableName", "source": "identifier", "name": "Name" }
75
+ ]
76
+ }
77
+ },
78
+ "GetItem": {
79
+ "request": {
80
+ "operation": "GetItem",
81
+ "params": [
82
+ { "target": "TableName", "source": "identifier", "name": "Name" }
83
+ ]
84
+ }
85
+ },
86
+ "PutItem": {
87
+ "request": {
88
+ "operation": "PutItem",
89
+ "params": [
90
+ { "target": "TableName", "source": "identifier", "name": "Name" }
91
+ ]
92
+ }
93
+ },
94
+ "Query": {
95
+ "request": {
96
+ "operation": "Query",
97
+ "params": [
98
+ { "target": "TableName", "source": "identifier", "name": "Name" }
99
+ ]
100
+ }
101
+ },
102
+ "Scan": {
103
+ "request": {
104
+ "operation": "Scan",
105
+ "params": [
106
+ { "target": "TableName", "source": "identifier", "name": "Name" }
107
+ ]
108
+ }
109
+ },
110
+ "Update": {
111
+ "request": {
112
+ "operation": "UpdateTable",
113
+ "params": [
114
+ { "target": "TableName", "source": "identifier", "name": "Name" }
115
+ ]
116
+ },
117
+ "resource": {
118
+ "type": "Table",
119
+ "identifiers": [
120
+ { "target": "Name", "source": "identifier", "name": "Name" }
121
+ ],
122
+ "path": "TableDescription"
123
+ }
124
+ },
125
+ "UpdateItem": {
126
+ "request": {
127
+ "operation": "UpdateItem",
128
+ "params": [
129
+ { "target": "TableName", "source": "identifier", "name": "Name" }
130
+ ]
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
testbed/boto__boto3/boto3/data/resources/ec2-2014-10-01.resources.json ADDED
@@ -0,0 +1,2289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "service": {
3
+ "actions": {
4
+ "CreateDhcpOptions": {
5
+ "request": { "operation": "CreateDhcpOptions" },
6
+ "resource": {
7
+ "type": "DhcpOptions",
8
+ "identifiers": [
9
+ { "target": "Id", "source": "response", "path": "DhcpOptions.DhcpOptionsId" }
10
+ ],
11
+ "path": "DhcpOptions"
12
+ }
13
+ },
14
+ "CreateInstances": {
15
+ "request": { "operation": "RunInstances" },
16
+ "resource": {
17
+ "type": "Instance",
18
+ "identifiers": [
19
+ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" }
20
+ ],
21
+ "path": "Instances[]"
22
+ }
23
+ },
24
+ "CreateInternetGateway": {
25
+ "request": { "operation": "CreateInternetGateway" },
26
+ "resource": {
27
+ "type": "InternetGateway",
28
+ "identifiers": [
29
+ { "target": "Id", "source": "response", "path": "InternetGateway.InternetGatewayId" }
30
+ ],
31
+ "path": "InternetGateway"
32
+ }
33
+ },
34
+ "CreateKeyPair": {
35
+ "request": { "operation": "CreateKeyPair" },
36
+ "resource": {
37
+ "type": "KeyPair",
38
+ "identifiers": [
39
+ { "target": "Name", "source": "response", "path": "KeyName" }
40
+ ]
41
+ }
42
+ },
43
+ "CreateNetworkAcl": {
44
+ "request": { "operation": "CreateNetworkAcl" },
45
+ "resource": {
46
+ "type": "NetworkAcl",
47
+ "identifiers": [
48
+ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" }
49
+ ],
50
+ "path": "NetworkAcl"
51
+ }
52
+ },
53
+ "CreateNetworkInterface": {
54
+ "request": { "operation": "CreateNetworkInterface" },
55
+ "resource": {
56
+ "type": "NetworkInterface",
57
+ "identifiers": [
58
+ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" }
59
+ ],
60
+ "path": "NetworkInterface"
61
+ }
62
+ },
63
+ "CreatePlacementGroup": {
64
+ "request": { "operation": "CreatePlacementGroup" },
65
+ "resource": {
66
+ "type": "PlacementGroup",
67
+ "identifiers": [
68
+ { "target": "Name", "source": "requestParameter", "path": "GroupName" }
69
+ ]
70
+ }
71
+ },
72
+ "CreateRouteTable": {
73
+ "request": { "operation": "CreateRouteTable" },
74
+ "resource": {
75
+ "type": "RouteTable",
76
+ "identifiers": [
77
+ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" }
78
+ ],
79
+ "path": "RouteTable"
80
+ }
81
+ },
82
+ "CreateSecurityGroup": {
83
+ "request": { "operation": "CreateSecurityGroup" },
84
+ "resource": {
85
+ "type": "SecurityGroup",
86
+ "identifiers": [
87
+ { "target": "Id", "source": "response", "path": "GroupId" }
88
+ ]
89
+ }
90
+ },
91
+ "CreateSnapshot": {
92
+ "request": { "operation": "CreateSnapshot" },
93
+ "resource": {
94
+ "type": "Snapshot",
95
+ "identifiers": [
96
+ { "target": "Id", "source": "response", "path": "SnapshotId" }
97
+ ],
98
+ "path": "@"
99
+ }
100
+ },
101
+ "CreateSubnet": {
102
+ "request": { "operation": "CreateSubnet" },
103
+ "resource": {
104
+ "type": "Subnet",
105
+ "identifiers": [
106
+ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" }
107
+ ],
108
+ "path": "Subnet"
109
+ }
110
+ },
111
+ "CreateTags": {
112
+ "request": { "operation": "CreateTags" },
113
+ "resource": {
114
+ "type": "Tag",
115
+ "identifiers": [
116
+ { "target": "ResourceId", "source": "requestParameter", "path": "Resources[]" },
117
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
118
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
119
+ ]
120
+ }
121
+ },
122
+ "CreateVolume": {
123
+ "request": { "operation": "CreateVolume" },
124
+ "resource": {
125
+ "type": "Volume",
126
+ "identifiers": [
127
+ { "target": "Id", "source": "response", "path": "VolumeId" }
128
+ ],
129
+ "path": "@"
130
+ }
131
+ },
132
+ "CreateVpc": {
133
+ "request": { "operation": "CreateVpc" },
134
+ "resource": {
135
+ "type": "Vpc",
136
+ "identifiers": [
137
+ { "target": "Id", "source": "response", "path": "Vpc.VpcId" }
138
+ ],
139
+ "path": "Vpc"
140
+ }
141
+ },
142
+ "CreateVpcPeeringConnection": {
143
+ "request": { "operation": "CreateVpcPeeringConnection" },
144
+ "resource": {
145
+ "type": "VpcPeeringConnection",
146
+ "identifiers": [
147
+ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" }
148
+ ],
149
+ "path": "VpcPeeringConnection"
150
+ }
151
+ },
152
+ "DisassociateRouteTable": {
153
+ "request": { "operation": "DisassociateRouteTable" }
154
+ },
155
+ "ImportKeyPair": {
156
+ "request": { "operation": "ImportKeyPair" },
157
+ "resource": {
158
+ "type": "KeyPair",
159
+ "identifiers": [
160
+ { "target": "Name", "source": "response", "path": "KeyName" }
161
+ ]
162
+ }
163
+ },
164
+ "RegisterImage": {
165
+ "request": { "operation": "RegisterImage" },
166
+ "resource": {
167
+ "type": "Image",
168
+ "identifiers": [
169
+ { "target": "Id", "source": "response", "path": "ImageId" }
170
+ ]
171
+ }
172
+ }
173
+ },
174
+ "has": {
175
+ "DhcpOptions": {
176
+ "resource": {
177
+ "type": "DhcpOptions",
178
+ "identifiers": [
179
+ { "target": "Id", "source": "input" }
180
+ ]
181
+ }
182
+ },
183
+ "Image": {
184
+ "resource": {
185
+ "type": "Image",
186
+ "identifiers": [
187
+ { "target": "Id", "source": "input" }
188
+ ]
189
+ }
190
+ },
191
+ "Instance": {
192
+ "resource": {
193
+ "type": "Instance",
194
+ "identifiers": [
195
+ { "target": "Id", "source": "input" }
196
+ ]
197
+ }
198
+ },
199
+ "InternetGateway": {
200
+ "resource": {
201
+ "type": "InternetGateway",
202
+ "identifiers": [
203
+ { "target": "Id", "source": "input" }
204
+ ]
205
+ }
206
+ },
207
+ "KeyPair": {
208
+ "resource": {
209
+ "type": "KeyPair",
210
+ "identifiers": [
211
+ { "target": "Name", "source": "input" }
212
+ ]
213
+ }
214
+ },
215
+ "NetworkAcl": {
216
+ "resource": {
217
+ "type": "NetworkAcl",
218
+ "identifiers": [
219
+ { "target": "Id", "source": "input" }
220
+ ]
221
+ }
222
+ },
223
+ "NetworkInterface": {
224
+ "resource": {
225
+ "type": "NetworkInterface",
226
+ "identifiers": [
227
+ { "target": "Id", "source": "input" }
228
+ ]
229
+ }
230
+ },
231
+ "PlacementGroup": {
232
+ "resource": {
233
+ "type": "PlacementGroup",
234
+ "identifiers": [
235
+ { "target": "Name", "source": "input" }
236
+ ]
237
+ }
238
+ },
239
+ "RouteTable": {
240
+ "resource": {
241
+ "type": "RouteTable",
242
+ "identifiers": [
243
+ { "target": "Id", "source": "input" }
244
+ ]
245
+ }
246
+ },
247
+ "RouteTableAssociation": {
248
+ "resource": {
249
+ "type": "RouteTableAssociation",
250
+ "identifiers": [
251
+ { "target": "Id", "source": "input" }
252
+ ]
253
+ }
254
+ },
255
+ "SecurityGroup": {
256
+ "resource": {
257
+ "type": "SecurityGroup",
258
+ "identifiers": [
259
+ { "target": "Id", "source": "input" }
260
+ ]
261
+ }
262
+ },
263
+ "Snapshot": {
264
+ "resource": {
265
+ "type": "Snapshot",
266
+ "identifiers": [
267
+ { "target": "Id", "source": "input" }
268
+ ]
269
+ }
270
+ },
271
+ "Subnet": {
272
+ "resource": {
273
+ "type": "Subnet",
274
+ "identifiers": [
275
+ { "target": "Id", "source": "input" }
276
+ ]
277
+ }
278
+ },
279
+ "Volume": {
280
+ "resource": {
281
+ "type": "Volume",
282
+ "identifiers": [
283
+ { "target": "Id", "source": "input" }
284
+ ]
285
+ }
286
+ },
287
+ "Vpc": {
288
+ "resource": {
289
+ "type": "Vpc",
290
+ "identifiers": [
291
+ { "target": "Id", "source": "input" }
292
+ ]
293
+ }
294
+ },
295
+ "VpcPeeringConnection": {
296
+ "resource": {
297
+ "type": "VpcPeeringConnection",
298
+ "identifiers": [
299
+ { "target": "Id", "source": "input" }
300
+ ]
301
+ }
302
+ }
303
+ },
304
+ "hasMany": {
305
+ "DhcpOptionsSets": {
306
+ "request": { "operation": "DescribeDhcpOptions" },
307
+ "resource": {
308
+ "type": "DhcpOptions",
309
+ "identifiers": [
310
+ { "target": "Id", "source": "response", "path": "DhcpOptions[].DhcpOptionsId" }
311
+ ],
312
+ "path": "DhcpOptions[]"
313
+ }
314
+ },
315
+ "Images": {
316
+ "request": { "operation": "DescribeImages" },
317
+ "resource": {
318
+ "type": "Image",
319
+ "identifiers": [
320
+ { "target": "Id", "source": "response", "path": "Images[].ImageId" }
321
+ ],
322
+ "path": "Images[]"
323
+ }
324
+ },
325
+ "Instances": {
326
+ "request": { "operation": "DescribeInstances" },
327
+ "resource": {
328
+ "type": "Instance",
329
+ "identifiers": [
330
+ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" }
331
+ ],
332
+ "path": "Reservations[].Instances[]"
333
+ }
334
+ },
335
+ "InternetGateways": {
336
+ "request": { "operation": "DescribeInternetGateways" },
337
+ "resource": {
338
+ "type": "InternetGateway",
339
+ "identifiers": [
340
+ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" }
341
+ ],
342
+ "path": "InternetGateways[]"
343
+ }
344
+ },
345
+ "KeyPairs": {
346
+ "request": { "operation": "DescribeKeyPairs" },
347
+ "resource": {
348
+ "type": "KeyPair",
349
+ "identifiers": [
350
+ { "target": "Name", "source": "response", "path": "KeyPairs[].KeyName" }
351
+ ],
352
+ "path": "KeyPairs[]"
353
+ }
354
+ },
355
+ "NetworkAcls": {
356
+ "request": { "operation": "DescribeNetworkAcls" },
357
+ "resource": {
358
+ "type": "NetworkAcl",
359
+ "identifiers": [
360
+ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" }
361
+ ],
362
+ "path": "NetworkAcls[]"
363
+ }
364
+ },
365
+ "NetworkInterfaces": {
366
+ "request": { "operation": "DescribeNetworkInterfaces" },
367
+ "resource": {
368
+ "type": "NetworkInterface",
369
+ "identifiers": [
370
+ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" }
371
+ ],
372
+ "path": "NetworkInterfaces[]"
373
+ }
374
+ },
375
+ "PlacementGroups": {
376
+ "request": { "operation": "DescribePlacementGroups" },
377
+ "resource": {
378
+ "type": "PlacementGroup",
379
+ "identifiers": [
380
+ { "target": "Name", "source": "response", "path": "PlacementGroups[].GroupName" }
381
+ ],
382
+ "path": "PlacementGroups[]"
383
+ }
384
+ },
385
+ "RouteTables": {
386
+ "request": { "operation": "DescribeRouteTables" },
387
+ "resource": {
388
+ "type": "RouteTable",
389
+ "identifiers": [
390
+ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" }
391
+ ],
392
+ "path": "RouteTables[]"
393
+ }
394
+ },
395
+ "SecurityGroups": {
396
+ "request": { "operation": "DescribeSecurityGroups" },
397
+ "resource": {
398
+ "type": "SecurityGroup",
399
+ "identifiers": [
400
+ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" }
401
+ ],
402
+ "path": "SecurityGroups[]"
403
+ }
404
+ },
405
+ "Snapshots": {
406
+ "request": { "operation": "DescribeSnapshots" },
407
+ "resource": {
408
+ "type": "Snapshot",
409
+ "identifiers": [
410
+ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" }
411
+ ],
412
+ "path": "Snapshots[]"
413
+ }
414
+ },
415
+ "Subnets": {
416
+ "request": { "operation": "DescribeSubnets" },
417
+ "resource": {
418
+ "type": "Subnet",
419
+ "identifiers": [
420
+ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" }
421
+ ],
422
+ "path": "Subnets[]"
423
+ }
424
+ },
425
+ "Volumes": {
426
+ "request": { "operation": "DescribeVolumes" },
427
+ "resource": {
428
+ "type": "Volume",
429
+ "identifiers": [
430
+ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" }
431
+ ],
432
+ "path": "Volumes[]"
433
+ }
434
+ },
435
+ "VpcPeeringConnections": {
436
+ "request": { "operation": "DescribeVpcPeeringConnections" },
437
+ "resource": {
438
+ "type": "VpcPeeringConnection",
439
+ "identifiers": [
440
+ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" }
441
+ ],
442
+ "path": "VpcPeeringConnections[]"
443
+ }
444
+ },
445
+ "Vpcs": {
446
+ "request": { "operation": "DescribeVpcs" },
447
+ "resource": {
448
+ "type": "Vpc",
449
+ "identifiers": [
450
+ { "target": "Id", "source": "response", "path": "Vpcs[].VpcId" }
451
+ ],
452
+ "path": "Vpcs[]"
453
+ }
454
+ }
455
+ }
456
+ },
457
+ "resources": {
458
+ "DhcpOptions": {
459
+ "identifiers": [
460
+ {
461
+ "name": "Id",
462
+ "memberName": "DhcpOptionsId"
463
+ }
464
+ ],
465
+ "shape": "DhcpOptions",
466
+ "load": {
467
+ "request": {
468
+ "operation": "DescribeDhcpOptions",
469
+ "params": [
470
+ { "target": "DhcpOptionsIds[0]", "source": "identifier", "name": "Id" }
471
+ ]
472
+ },
473
+ "path": "DhcpOptions[0]"
474
+ },
475
+ "actions": {
476
+ "AssociateWithVpc": {
477
+ "request": {
478
+ "operation": "AssociateDhcpOptions",
479
+ "params": [
480
+ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" }
481
+ ]
482
+ }
483
+ },
484
+ "CreateTags": {
485
+ "request": {
486
+ "operation": "CreateTags",
487
+ "params": [
488
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
489
+ ]
490
+ },
491
+ "resource": {
492
+ "type": "Tag",
493
+ "identifiers": [
494
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
495
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
496
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
497
+ ]
498
+ }
499
+ },
500
+ "Delete": {
501
+ "request": {
502
+ "operation": "DeleteDhcpOptions",
503
+ "params": [
504
+ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" }
505
+ ]
506
+ }
507
+ }
508
+ }
509
+ },
510
+ "Image": {
511
+ "identifiers": [
512
+ {
513
+ "name": "Id",
514
+ "memberName": "ImageId"
515
+ }
516
+ ],
517
+ "shape": "Image",
518
+ "load": {
519
+ "request": {
520
+ "operation": "DescribeImages",
521
+ "params": [
522
+ { "target": "ImageIds[0]", "source": "identifier", "name": "Id" }
523
+ ]
524
+ },
525
+ "path": "Images[0]"
526
+ },
527
+ "actions": {
528
+ "CreateTags": {
529
+ "request": {
530
+ "operation": "CreateTags",
531
+ "params": [
532
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
533
+ ]
534
+ },
535
+ "resource": {
536
+ "type": "Tag",
537
+ "identifiers": [
538
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
539
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
540
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
541
+ ]
542
+ }
543
+ },
544
+ "Deregister": {
545
+ "request": {
546
+ "operation": "DeregisterImage",
547
+ "params": [
548
+ { "target": "ImageId", "source": "identifier", "name": "Id" }
549
+ ]
550
+ }
551
+ },
552
+ "DescribeAttribute": {
553
+ "request": {
554
+ "operation": "DescribeImageAttribute",
555
+ "params": [
556
+ { "target": "ImageId", "source": "identifier", "name": "Id" }
557
+ ]
558
+ }
559
+ },
560
+ "ModifyAttribute": {
561
+ "request": {
562
+ "operation": "ModifyImageAttribute",
563
+ "params": [
564
+ { "target": "ImageId", "source": "identifier", "name": "Id" }
565
+ ]
566
+ }
567
+ },
568
+ "ResetAttribute": {
569
+ "request": {
570
+ "operation": "ResetImageAttribute",
571
+ "params": [
572
+ { "target": "ImageId", "source": "identifier", "name": "Id" }
573
+ ]
574
+ }
575
+ }
576
+ }
577
+ },
578
+ "Instance": {
579
+ "identifiers": [
580
+ {
581
+ "name": "Id",
582
+ "memberName": "InstanceId"
583
+ }
584
+ ],
585
+ "shape": "Instance",
586
+ "load": {
587
+ "request": {
588
+ "operation": "DescribeInstances",
589
+ "params": [
590
+ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" }
591
+ ]
592
+ },
593
+ "path": "Reservations[0].Instances[0]"
594
+ },
595
+ "actions": {
596
+ "AttachClassicLinkVpc": {
597
+ "request": {
598
+ "operation": "AttachClassicLinkVpc",
599
+ "params": [
600
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
601
+ ]
602
+ }
603
+ },
604
+ "AttachVolume": {
605
+ "request": {
606
+ "operation": "AttachVolume",
607
+ "params": [
608
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
609
+ ]
610
+ }
611
+ },
612
+ "ConsoleOutput": {
613
+ "request": {
614
+ "operation": "GetConsoleOutput",
615
+ "params": [
616
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
617
+ ]
618
+ }
619
+ },
620
+ "CreateImage": {
621
+ "request": {
622
+ "operation": "CreateImage",
623
+ "params": [
624
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
625
+ ]
626
+ },
627
+ "resource": {
628
+ "type": "Image",
629
+ "identifiers": [
630
+ { "target": "Id", "source": "response", "path": "ImageId" }
631
+ ]
632
+ }
633
+ },
634
+ "CreateTags": {
635
+ "request": {
636
+ "operation": "CreateTags",
637
+ "params": [
638
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
639
+ ]
640
+ },
641
+ "resource": {
642
+ "type": "Tag",
643
+ "identifiers": [
644
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
645
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
646
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
647
+ ]
648
+ }
649
+ },
650
+ "DescribeAttribute": {
651
+ "request": {
652
+ "operation": "DescribeInstanceAttribute",
653
+ "params": [
654
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
655
+ ]
656
+ }
657
+ },
658
+ "DetachClassicLinkVpc": {
659
+ "request": {
660
+ "operation": "DetachClassicLinkVpc",
661
+ "params": [
662
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
663
+ ]
664
+ }
665
+ },
666
+ "DetachVolume": {
667
+ "request": {
668
+ "operation": "DetachVolume",
669
+ "params": [
670
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
671
+ ]
672
+ }
673
+ },
674
+ "ModifyAttribute": {
675
+ "request": {
676
+ "operation": "ModifyInstanceAttribute",
677
+ "params": [
678
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
679
+ ]
680
+ }
681
+ },
682
+ "Monitor": {
683
+ "request": {
684
+ "operation": "MonitorInstances",
685
+ "params": [
686
+ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" }
687
+ ]
688
+ }
689
+ },
690
+ "PasswordData": {
691
+ "request": {
692
+ "operation": "GetPasswordData",
693
+ "params": [
694
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
695
+ ]
696
+ }
697
+ },
698
+ "Reboot": {
699
+ "request": {
700
+ "operation": "RebootInstances",
701
+ "params": [
702
+ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" }
703
+ ]
704
+ }
705
+ },
706
+ "ReportStatus": {
707
+ "request": {
708
+ "operation": "ReportInstanceStatus",
709
+ "params": [
710
+ { "target": "Instances[0]", "source": "identifier", "name": "Id" }
711
+ ]
712
+ }
713
+ },
714
+ "ResetAttribute": {
715
+ "request": {
716
+ "operation": "ResetInstanceAttribute",
717
+ "params": [
718
+ { "target": "InstanceId", "source": "identifier", "name": "Id" }
719
+ ]
720
+ }
721
+ },
722
+ "ResetKernel": {
723
+ "request": {
724
+ "operation": "ResetInstanceAttribute",
725
+ "params": [
726
+ { "target": "InstanceId", "source": "identifier", "name": "Id" },
727
+ { "target": "Attribute", "source": "string", "value": "kernel" }
728
+ ]
729
+ }
730
+ },
731
+ "ResetRamdisk": {
732
+ "request": {
733
+ "operation": "ResetInstanceAttribute",
734
+ "params": [
735
+ { "target": "InstanceId", "source": "identifier", "name": "Id" },
736
+ { "target": "Attribute", "source": "string", "value": "ramdisk" }
737
+ ]
738
+ }
739
+ },
740
+ "ResetSourceDestCheck": {
741
+ "request": {
742
+ "operation": "ResetInstanceAttribute",
743
+ "params": [
744
+ { "target": "InstanceId", "source": "identifier", "name": "Id" },
745
+ { "target": "Attribute", "source": "string", "value": "sourceDestCheck" }
746
+ ]
747
+ }
748
+ },
749
+ "Start": {
750
+ "request": {
751
+ "operation": "StartInstances",
752
+ "params": [
753
+ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" }
754
+ ]
755
+ }
756
+ },
757
+ "Stop": {
758
+ "request": {
759
+ "operation": "StopInstances",
760
+ "params": [
761
+ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" }
762
+ ]
763
+ }
764
+ },
765
+ "Terminate": {
766
+ "request": {
767
+ "operation": "TerminateInstances",
768
+ "params": [
769
+ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" }
770
+ ]
771
+ }
772
+ },
773
+ "Unmonitor": {
774
+ "request": {
775
+ "operation": "UnmonitorInstances",
776
+ "params": [
777
+ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" }
778
+ ]
779
+ }
780
+ }
781
+ },
782
+ "batchActions": {
783
+ "CreateTags": {
784
+ "request": {
785
+ "operation": "CreateTags",
786
+ "params": [
787
+ { "target": "Resources[]", "source": "identifier", "name": "Id" }
788
+ ]
789
+ }
790
+ },
791
+ "Monitor": {
792
+ "request": {
793
+ "operation": "MonitorInstances",
794
+ "params": [
795
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
796
+ ]
797
+ }
798
+ },
799
+ "Reboot": {
800
+ "request": {
801
+ "operation": "RebootInstances",
802
+ "params": [
803
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
804
+ ]
805
+ }
806
+ },
807
+ "Start": {
808
+ "request": {
809
+ "operation": "StartInstances",
810
+ "params": [
811
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
812
+ ]
813
+ }
814
+ },
815
+ "Stop": {
816
+ "request": {
817
+ "operation": "StopInstances",
818
+ "params": [
819
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
820
+ ]
821
+ }
822
+ },
823
+ "Terminate": {
824
+ "request": {
825
+ "operation": "TerminateInstances",
826
+ "params": [
827
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
828
+ ]
829
+ }
830
+ },
831
+ "Unmonitor": {
832
+ "request": {
833
+ "operation": "UnmonitorInstances",
834
+ "params": [
835
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
836
+ ]
837
+ }
838
+ }
839
+ },
840
+ "waiters": {
841
+ "Exists": {
842
+ "waiterName": "InstanceExists",
843
+ "params": [
844
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
845
+ ],
846
+ "path": "Reservations[0].Instances[0]"
847
+ },
848
+ "Running": {
849
+ "waiterName": "InstanceRunning",
850
+ "params": [
851
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
852
+ ],
853
+ "path": "Reservations[0].Instances[0]"
854
+ },
855
+ "Stopped": {
856
+ "waiterName": "InstanceStopped",
857
+ "params": [
858
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
859
+ ],
860
+ "path": "Reservations[0].Instances[0]"
861
+ },
862
+ "Terminated": {
863
+ "waiterName": "InstanceTerminated",
864
+ "params": [
865
+ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" }
866
+ ],
867
+ "path": "Reservations[0].Instances[0]"
868
+ }
869
+ },
870
+ "has": {
871
+ "Image": {
872
+ "resource": {
873
+ "type": "Image",
874
+ "identifiers": [
875
+ { "target": "Id", "source": "data", "path": "ImageId" }
876
+ ]
877
+ }
878
+ },
879
+ "KeyPair": {
880
+ "resource": {
881
+ "type": "KeyPair",
882
+ "identifiers": [
883
+ { "target": "Name", "source": "data", "path": "KeyName" }
884
+ ]
885
+ }
886
+ },
887
+ "PlacementGroup": {
888
+ "resource": {
889
+ "type": "PlacementGroup",
890
+ "identifiers": [
891
+ { "target": "Name", "source": "data", "path": "Placement.GroupName" }
892
+ ]
893
+ }
894
+ },
895
+ "Subnet": {
896
+ "resource": {
897
+ "type": "Subnet",
898
+ "identifiers": [
899
+ { "target": "Id", "source": "data", "path": "SubnetId" }
900
+ ]
901
+ }
902
+ },
903
+ "Vpc": {
904
+ "resource": {
905
+ "type": "Vpc",
906
+ "identifiers": [
907
+ { "target": "Id", "source": "data", "path": "VpcId" }
908
+ ]
909
+ }
910
+ }
911
+ },
912
+ "hasMany": {
913
+ "Volumes": {
914
+ "request": {
915
+ "operation": "DescribeVolumes",
916
+ "params": [
917
+ { "target": "Filters[0].Name", "source": "string", "value": "attachment.instance-id" },
918
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
919
+ ]
920
+ },
921
+ "resource": {
922
+ "type": "Volume",
923
+ "identifiers": [
924
+ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" }
925
+ ],
926
+ "path": "Volumes[]"
927
+ }
928
+ }
929
+ }
930
+ },
931
+ "InternetGateway": {
932
+ "identifiers": [
933
+ {
934
+ "name": "Id",
935
+ "memberName": "InternetGatewayId"
936
+ }
937
+ ],
938
+ "shape": "InternetGateway",
939
+ "load": {
940
+ "request": {
941
+ "operation": "DescribeInternetGateways",
942
+ "params": [
943
+ { "target": "InternetGatewayIds[0]", "source": "identifier", "name": "Id" }
944
+ ]
945
+ },
946
+ "path": "InternetGateways[0]"
947
+ },
948
+ "actions": {
949
+ "AttachToVpc": {
950
+ "request": {
951
+ "operation": "AttachInternetGateway",
952
+ "params": [
953
+ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" }
954
+ ]
955
+ }
956
+ },
957
+ "CreateTags": {
958
+ "request": {
959
+ "operation": "CreateTags",
960
+ "params": [
961
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
962
+ ]
963
+ },
964
+ "resource": {
965
+ "type": "Tag",
966
+ "identifiers": [
967
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
968
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
969
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
970
+ ]
971
+ }
972
+ },
973
+ "Delete": {
974
+ "request": {
975
+ "operation": "DeleteInternetGateway",
976
+ "params": [
977
+ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" }
978
+ ]
979
+ }
980
+ },
981
+ "DetachFromVpc": {
982
+ "request": {
983
+ "operation": "DetachInternetGateway",
984
+ "params": [
985
+ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" }
986
+ ]
987
+ }
988
+ }
989
+ }
990
+ },
991
+ "KeyPair": {
992
+ "identifiers": [
993
+ {
994
+ "name": "Name",
995
+ "memberName": "KeyName"
996
+ }
997
+ ],
998
+ "shape": "KeyPairInfo",
999
+ "load": {
1000
+ "request": {
1001
+ "operation": "DescribeKeyPairs",
1002
+ "params": [
1003
+ { "target": "KeyNames[0]", "source": "identifier", "name": "Name" }
1004
+ ]
1005
+ },
1006
+ "path": "KeyPairs[0]"
1007
+ },
1008
+ "actions": {
1009
+ "Delete": {
1010
+ "request": {
1011
+ "operation": "DeleteKeyPair",
1012
+ "params": [
1013
+ { "target": "KeyName", "source": "identifier", "name": "Name" }
1014
+ ]
1015
+ }
1016
+ }
1017
+ }
1018
+ },
1019
+ "NetworkAcl": {
1020
+ "identifiers": [
1021
+ {
1022
+ "name": "Id",
1023
+ "memberName": "NetworkAclId"
1024
+ }
1025
+ ],
1026
+ "shape": "NetworkAcl",
1027
+ "load": {
1028
+ "request": {
1029
+ "operation": "DescribeNetworkAcls",
1030
+ "params": [
1031
+ { "target": "NetworkAclIds[0]", "source": "identifier", "name": "Id" }
1032
+ ]
1033
+ },
1034
+ "path": "NetworkAcls[0]"
1035
+ },
1036
+ "actions": {
1037
+ "CreateEntry": {
1038
+ "request": {
1039
+ "operation": "CreateNetworkAclEntry",
1040
+ "params": [
1041
+ { "target": "NetworkAclId", "source": "identifier", "name": "Id" }
1042
+ ]
1043
+ }
1044
+ },
1045
+ "CreateTags": {
1046
+ "request": {
1047
+ "operation": "CreateTags",
1048
+ "params": [
1049
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
1050
+ ]
1051
+ },
1052
+ "resource": {
1053
+ "type": "Tag",
1054
+ "identifiers": [
1055
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
1056
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
1057
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
1058
+ ]
1059
+ }
1060
+ },
1061
+ "Delete": {
1062
+ "request": {
1063
+ "operation": "DeleteNetworkAcl",
1064
+ "params": [
1065
+ { "target": "NetworkAclId", "source": "identifier", "name": "Id" }
1066
+ ]
1067
+ }
1068
+ },
1069
+ "DeleteEntry": {
1070
+ "request": {
1071
+ "operation": "DeleteNetworkAclEntry",
1072
+ "params": [
1073
+ { "target": "NetworkAclId", "source": "identifier", "name": "Id" }
1074
+ ]
1075
+ }
1076
+ },
1077
+ "ReplaceAssociation": {
1078
+ "request": {
1079
+ "operation": "ReplaceNetworkAclAssociation",
1080
+ "params": [
1081
+ { "target": "NetworkAclId", "source": "identifier", "name": "Id" }
1082
+ ]
1083
+ }
1084
+ },
1085
+ "ReplaceEntry": {
1086
+ "request": {
1087
+ "operation": "ReplaceNetworkAclEntry",
1088
+ "params": [
1089
+ { "target": "NetworkAclId", "source": "identifier", "name": "Id" }
1090
+ ]
1091
+ }
1092
+ }
1093
+ },
1094
+ "has": {
1095
+ "Vpc": {
1096
+ "resource": {
1097
+ "type": "Vpc",
1098
+ "identifiers": [
1099
+ { "target": "Id", "source": "data", "path": "VpcId" }
1100
+ ]
1101
+ }
1102
+ }
1103
+ }
1104
+ },
1105
+ "NetworkInterface": {
1106
+ "identifiers": [
1107
+ {
1108
+ "name": "Id",
1109
+ "memberName": "NetworkInterfaceId"
1110
+ }
1111
+ ],
1112
+ "shape": "NetworkInterface",
1113
+ "load": {
1114
+ "request": {
1115
+ "operation": "DescribeNetworkInterfaces",
1116
+ "params": [
1117
+ { "target": "NetworkInterfaceIds[0]", "source": "identifier", "name": "Id" }
1118
+ ]
1119
+ },
1120
+ "path": "NetworkInterfaces[0]"
1121
+ },
1122
+ "actions": {
1123
+ "AssignPrivateIpAddresses": {
1124
+ "request": {
1125
+ "operation": "AssignPrivateIpAddresses",
1126
+ "params": [
1127
+ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" }
1128
+ ]
1129
+ }
1130
+ },
1131
+ "Attach": {
1132
+ "request": {
1133
+ "operation": "AttachNetworkInterface",
1134
+ "params": [
1135
+ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" }
1136
+ ]
1137
+ }
1138
+ },
1139
+ "CreateTags": {
1140
+ "request": {
1141
+ "operation": "CreateTags",
1142
+ "params": [
1143
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
1144
+ ]
1145
+ },
1146
+ "resource": {
1147
+ "type": "Tag",
1148
+ "identifiers": [
1149
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
1150
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
1151
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
1152
+ ]
1153
+ }
1154
+ },
1155
+ "Delete": {
1156
+ "request": {
1157
+ "operation": "DeleteNetworkInterface",
1158
+ "params": [
1159
+ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" }
1160
+ ]
1161
+ }
1162
+ },
1163
+ "DescribeAttribute": {
1164
+ "request": {
1165
+ "operation": "DescribeNetworkInterfaceAttribute",
1166
+ "params": [
1167
+ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" }
1168
+ ]
1169
+ }
1170
+ },
1171
+ "Detach": {
1172
+ "request": {
1173
+ "operation": "DetachNetworkInterface",
1174
+ "params": [
1175
+ { "target": "AttachmentId", "source": "data", "path": "Attachment.AttachmentId" }
1176
+ ]
1177
+ }
1178
+ },
1179
+ "ModifyAttribute": {
1180
+ "request": {
1181
+ "operation": "ModifyNetworkInterfaceAttribute",
1182
+ "params": [
1183
+ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" }
1184
+ ]
1185
+ }
1186
+ },
1187
+ "ResetAttribute": {
1188
+ "request": {
1189
+ "operation": "ResetNetworkInterfaceAttribute",
1190
+ "params": [
1191
+ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" }
1192
+ ]
1193
+ }
1194
+ },
1195
+ "UnassignPrivateIpAddresses": {
1196
+ "request": {
1197
+ "operation": "UnassignPrivateIpAddresses",
1198
+ "params": [
1199
+ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" }
1200
+ ]
1201
+ }
1202
+ }
1203
+ },
1204
+ "has": {
1205
+ "Subnet": {
1206
+ "resource": {
1207
+ "type": "Subnet",
1208
+ "identifiers": [
1209
+ { "target": "Id", "source": "data", "path": "SubnetId" }
1210
+ ]
1211
+ }
1212
+ },
1213
+ "Vpc": {
1214
+ "resource": {
1215
+ "type": "Vpc",
1216
+ "identifiers": [
1217
+ { "target": "Id", "source": "data", "path": "VpcId" }
1218
+ ]
1219
+ }
1220
+ }
1221
+ }
1222
+ },
1223
+ "PlacementGroup": {
1224
+ "identifiers": [
1225
+ {
1226
+ "name": "Name",
1227
+ "memberName": "GroupName"
1228
+ }
1229
+ ],
1230
+ "shape": "PlacementGroup",
1231
+ "load": {
1232
+ "request": {
1233
+ "operation": "DescribePlacementGroups",
1234
+ "params": [
1235
+ { "target": "GroupNames[0]", "source": "identifier", "name": "Name" }
1236
+ ]
1237
+ },
1238
+ "path": "PlacementGroups[0]"
1239
+ },
1240
+ "actions": {
1241
+ "Delete": {
1242
+ "request": {
1243
+ "operation": "DeletePlacementGroup",
1244
+ "params": [
1245
+ { "target": "GroupName", "source": "identifier", "name": "Name" }
1246
+ ]
1247
+ }
1248
+ }
1249
+ },
1250
+ "hasMany": {
1251
+ "Instances": {
1252
+ "request": {
1253
+ "operation": "DescribeInstances",
1254
+ "params": [
1255
+ { "target": "Filters[0].Name", "source": "string", "value": "placement-group-name" },
1256
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Name" }
1257
+ ]
1258
+ },
1259
+ "resource": {
1260
+ "type": "Instance",
1261
+ "identifiers": [
1262
+ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" }
1263
+ ],
1264
+ "path": "Reservations[].Instances[]"
1265
+ }
1266
+ }
1267
+ }
1268
+ },
1269
+ "RouteTable": {
1270
+ "identifiers": [
1271
+ {
1272
+ "name": "Id",
1273
+ "memberName": "RouteTableId"
1274
+ }
1275
+ ],
1276
+ "shape": "RouteTable",
1277
+ "load": {
1278
+ "request": {
1279
+ "operation": "DescribeRouteTables",
1280
+ "params": [
1281
+ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" }
1282
+ ]
1283
+ },
1284
+ "path": "RouteTables[0]"
1285
+ },
1286
+ "actions": {
1287
+ "AssociateWithSubnet": {
1288
+ "request": {
1289
+ "operation": "AssociateRouteTable",
1290
+ "params": [
1291
+ { "target": "RouteTableId", "source": "identifier", "name": "Id" }
1292
+ ]
1293
+ },
1294
+ "resource": {
1295
+ "type": "RouteTableAssociation",
1296
+ "identifiers": [
1297
+ { "target": "Id", "source": "response", "path": "AssociationId" }
1298
+ ]
1299
+ }
1300
+ },
1301
+ "CreateRoute": {
1302
+ "request": {
1303
+ "operation": "CreateRoute",
1304
+ "params": [
1305
+ { "target": "RouteTableId", "source": "identifier", "name": "Id" }
1306
+ ]
1307
+ }
1308
+ },
1309
+ "CreateTags": {
1310
+ "request": {
1311
+ "operation": "CreateTags",
1312
+ "params": [
1313
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
1314
+ ]
1315
+ },
1316
+ "resource": {
1317
+ "type": "Tag",
1318
+ "identifiers": [
1319
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
1320
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
1321
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
1322
+ ]
1323
+ }
1324
+ },
1325
+ "Delete": {
1326
+ "request": {
1327
+ "operation": "DeleteRouteTable",
1328
+ "params": [
1329
+ { "target": "RouteTableId", "source": "identifier", "name": "Id" }
1330
+ ]
1331
+ }
1332
+ }
1333
+ },
1334
+ "has": {
1335
+ "Vpc": {
1336
+ "resource": {
1337
+ "type": "Vpc",
1338
+ "identifiers": [
1339
+ { "target": "Id", "source": "data", "path": "VpcId" }
1340
+ ]
1341
+ }
1342
+ }
1343
+ },
1344
+ "hasMany": {
1345
+ "Associations": {
1346
+ "request": {
1347
+ "operation": "DescribeRouteTables",
1348
+ "params": [
1349
+ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" }
1350
+ ]
1351
+ },
1352
+ "resource": {
1353
+ "type": "RouteTableAssociation",
1354
+ "identifiers": [
1355
+ { "target": "Id", "source": "response", "path": "RouteTables[0].Associations[].RouteTableAssociationId" }
1356
+ ],
1357
+ "path": "RouteTables[0].Associations[]"
1358
+ }
1359
+ }
1360
+ }
1361
+ },
1362
+ "RouteTableAssociation": {
1363
+ "identifiers": [
1364
+ {
1365
+ "name": "Id",
1366
+ "memberName": "RouteTableAssociationId"
1367
+ }
1368
+ ],
1369
+ "shape": "RouteTableAssociation",
1370
+ "actions": {
1371
+ "Delete": {
1372
+ "request": {
1373
+ "operation": "DisassociateRouteTable",
1374
+ "params": [
1375
+ { "target": "AssociationId", "source": "identifier", "name": "Id" }
1376
+ ]
1377
+ }
1378
+ },
1379
+ "ReplaceSubnet": {
1380
+ "request": {
1381
+ "operation": "ReplaceRouteTableAssociation",
1382
+ "params": [
1383
+ { "target": "AssociationId", "source": "identifier", "name": "Id" }
1384
+ ]
1385
+ },
1386
+ "resource": {
1387
+ "type": "RouteTableAssociation",
1388
+ "identifiers": [
1389
+ { "target": "Id", "source": "response", "path": "NewAssociationId" }
1390
+ ]
1391
+ }
1392
+ }
1393
+ },
1394
+ "has": {
1395
+ "RouteTable": {
1396
+ "resource": {
1397
+ "type": "RouteTable",
1398
+ "identifiers": [
1399
+ { "target": "Id", "source": "data", "path": "RouteTableId" }
1400
+ ]
1401
+ }
1402
+ },
1403
+ "Subnet": {
1404
+ "resource": {
1405
+ "type": "Subnet",
1406
+ "identifiers": [
1407
+ { "target": "Id", "source": "data", "path": "SubnetId" }
1408
+ ]
1409
+ }
1410
+ }
1411
+ }
1412
+ },
1413
+ "SecurityGroup": {
1414
+ "identifiers": [
1415
+ {
1416
+ "name": "Id",
1417
+ "memberName": "GroupId"
1418
+ }
1419
+ ],
1420
+ "shape": "SecurityGroup",
1421
+ "load": {
1422
+ "request": {
1423
+ "operation": "DescribeSecurityGroups",
1424
+ "params": [
1425
+ { "target": "GroupIds[0]", "source": "identifier", "name": "Id" }
1426
+ ]
1427
+ },
1428
+ "path": "SecurityGroups[0]"
1429
+ },
1430
+ "actions": {
1431
+ "AuthorizeEgress": {
1432
+ "request": {
1433
+ "operation": "AuthorizeSecurityGroupEgress",
1434
+ "params": [
1435
+ { "target": "GroupId", "source": "identifier", "name": "Id" }
1436
+ ]
1437
+ }
1438
+ },
1439
+ "AuthorizeIngress": {
1440
+ "request": {
1441
+ "operation": "AuthorizeSecurityGroupIngress",
1442
+ "params": [
1443
+ { "target": "GroupId", "source": "identifier", "name": "Id" }
1444
+ ]
1445
+ }
1446
+ },
1447
+ "CreateTags": {
1448
+ "request": {
1449
+ "operation": "CreateTags",
1450
+ "params": [
1451
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
1452
+ ]
1453
+ },
1454
+ "resource": {
1455
+ "type": "Tag",
1456
+ "identifiers": [
1457
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
1458
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
1459
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
1460
+ ]
1461
+ }
1462
+ },
1463
+ "Delete": {
1464
+ "request": {
1465
+ "operation": "DeleteSecurityGroup",
1466
+ "params": [
1467
+ { "target": "GroupId", "source": "identifier", "name": "Id" }
1468
+ ]
1469
+ }
1470
+ },
1471
+ "RevokeEgress": {
1472
+ "request": {
1473
+ "operation": "RevokeSecurityGroupEgress",
1474
+ "params": [
1475
+ { "target": "GroupId", "source": "identifier", "name": "Id" }
1476
+ ]
1477
+ }
1478
+ },
1479
+ "RevokeIngress": {
1480
+ "request": {
1481
+ "operation": "RevokeSecurityGroupIngress",
1482
+ "params": [
1483
+ { "target": "GroupId", "source": "identifier", "name": "Id" }
1484
+ ]
1485
+ }
1486
+ }
1487
+ }
1488
+ },
1489
+ "Snapshot": {
1490
+ "identifiers": [
1491
+ {
1492
+ "name": "Id",
1493
+ "memberName": "SnapshotId"
1494
+ }
1495
+ ],
1496
+ "shape": "Snapshot",
1497
+ "load": {
1498
+ "request": {
1499
+ "operation": "DescribeSnapshots",
1500
+ "params": [
1501
+ { "target": "SnapshotIds[0]", "source": "identifier", "name": "Id" }
1502
+ ]
1503
+ },
1504
+ "path": "Snapshots[0]"
1505
+ },
1506
+ "actions": {
1507
+ "Copy": {
1508
+ "request": {
1509
+ "operation": "CopySnapshot",
1510
+ "params": [
1511
+ { "target": "SourceSnapshotId", "source": "identifier", "name": "Id" }
1512
+ ]
1513
+ }
1514
+ },
1515
+ "CreateTags": {
1516
+ "request": {
1517
+ "operation": "CreateTags",
1518
+ "params": [
1519
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
1520
+ ]
1521
+ },
1522
+ "resource": {
1523
+ "type": "Tag",
1524
+ "identifiers": [
1525
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
1526
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
1527
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
1528
+ ]
1529
+ }
1530
+ },
1531
+ "Delete": {
1532
+ "request": {
1533
+ "operation": "DeleteSnapshot",
1534
+ "params": [
1535
+ { "target": "SnapshotId", "source": "identifier", "name": "Id" }
1536
+ ]
1537
+ }
1538
+ },
1539
+ "DescribeAttribute": {
1540
+ "request": {
1541
+ "operation": "DescribeSnapshotAttribute",
1542
+ "params": [
1543
+ { "target": "SnapshotId", "source": "identifier", "name": "Id" }
1544
+ ]
1545
+ }
1546
+ },
1547
+ "ModifyAttribute": {
1548
+ "request": {
1549
+ "operation": "ModifySnapshotAttribute",
1550
+ "params": [
1551
+ { "target": "SnapshotId", "source": "identifier", "name": "Id" }
1552
+ ]
1553
+ }
1554
+ },
1555
+ "ResetAttribute": {
1556
+ "request": {
1557
+ "operation": "ResetSnapshotAttribute",
1558
+ "params": [
1559
+ { "target": "SnapshotId", "source": "identifier", "name": "Id" }
1560
+ ]
1561
+ }
1562
+ }
1563
+ },
1564
+ "waiters": {
1565
+ "Completed": {
1566
+ "waiterName": "SnapshotCompleted",
1567
+ "params": [
1568
+ { "target": "SnapshotIds[]", "source": "identifier", "name": "Id" }
1569
+ ],
1570
+ "path": "Snapshots[]"
1571
+ }
1572
+ },
1573
+ "has": {
1574
+ "Volume": {
1575
+ "resource": {
1576
+ "type": "Volume",
1577
+ "identifiers": [
1578
+ { "target": "Id", "source": "data", "path": "VolumeId" }
1579
+ ]
1580
+ }
1581
+ }
1582
+ }
1583
+ },
1584
+ "Subnet": {
1585
+ "identifiers": [
1586
+ {
1587
+ "name": "Id",
1588
+ "memberName": "SubnetId"
1589
+ }
1590
+ ],
1591
+ "shape": "Subnet",
1592
+ "load": {
1593
+ "request": {
1594
+ "operation": "DescribeSubnets",
1595
+ "params": [
1596
+ { "target": "SubnetIds[0]", "source": "identifier", "name": "Id" }
1597
+ ]
1598
+ },
1599
+ "path": "Subnets[0]"
1600
+ },
1601
+ "actions": {
1602
+ "CreateInstances": {
1603
+ "request": {
1604
+ "operation": "RunInstances",
1605
+ "params": [
1606
+ { "target": "SubnetId", "source": "identifier", "name": "Id" }
1607
+ ]
1608
+ },
1609
+ "resource": {
1610
+ "type": "Instance",
1611
+ "identifiers": [
1612
+ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" }
1613
+ ],
1614
+ "path": "Instances[]"
1615
+ }
1616
+ },
1617
+ "CreateNetworkInterface": {
1618
+ "request": {
1619
+ "operation": "CreateNetworkInterface",
1620
+ "params": [
1621
+ { "target": "SubnetId", "source": "identifier", "name": "Id" }
1622
+ ]
1623
+ },
1624
+ "resource": {
1625
+ "type": "NetworkInterface",
1626
+ "identifiers": [
1627
+ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" }
1628
+ ],
1629
+ "path": "NetworkInterface"
1630
+ }
1631
+ },
1632
+ "CreateTags": {
1633
+ "request": {
1634
+ "operation": "CreateTags",
1635
+ "params": [
1636
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
1637
+ ]
1638
+ },
1639
+ "resource": {
1640
+ "type": "Tag",
1641
+ "identifiers": [
1642
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
1643
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
1644
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
1645
+ ]
1646
+ }
1647
+ },
1648
+ "Delete": {
1649
+ "request": {
1650
+ "operation": "DeleteSubnet",
1651
+ "params": [
1652
+ { "target": "SubnetId", "source": "identifier", "name": "Id" }
1653
+ ]
1654
+ }
1655
+ }
1656
+ },
1657
+ "has": {
1658
+ "Vpc": {
1659
+ "resource": {
1660
+ "type": "Vpc",
1661
+ "identifiers": [
1662
+ { "target": "Id", "source": "data", "path": "VpcId" }
1663
+ ]
1664
+ }
1665
+ }
1666
+ },
1667
+ "hasMany": {
1668
+ "Instances": {
1669
+ "request": {
1670
+ "operation": "DescribeInstances",
1671
+ "params": [
1672
+ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" },
1673
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
1674
+ ]
1675
+ },
1676
+ "resource": {
1677
+ "type": "Instance",
1678
+ "identifiers": [
1679
+ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" }
1680
+ ],
1681
+ "path": "Reservations[].Instances[]"
1682
+ }
1683
+ },
1684
+ "NetworkInterfaces": {
1685
+ "request": {
1686
+ "operation": "DescribeNetworkInterfaces",
1687
+ "params": [
1688
+ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" },
1689
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
1690
+ ]
1691
+ },
1692
+ "resource": {
1693
+ "type": "NetworkInterface",
1694
+ "identifiers": [
1695
+ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" }
1696
+ ],
1697
+ "path": "NetworkInterfaces[]"
1698
+ }
1699
+ }
1700
+ }
1701
+ },
1702
+ "Tag": {
1703
+ "identifiers": [
1704
+ {
1705
+ "name": "ResourceId",
1706
+ "memberName": "ResourceId"
1707
+ },
1708
+ {
1709
+ "name": "Key",
1710
+ "memberName": "Key"
1711
+ },
1712
+ {
1713
+ "name": "Value",
1714
+ "memberName": "Value"
1715
+ }
1716
+ ],
1717
+ "shape": "TagDescription",
1718
+ "load": {
1719
+ "request": {
1720
+ "operation": "DescribeTags",
1721
+ "params": [
1722
+ { "target": "Filters[0].Name", "source": "string", "value": "key" },
1723
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Key" },
1724
+ { "target": "Filters[1].Name", "source": "string", "value": "value" },
1725
+ { "target": "Filters[1].Values[0]", "source": "identifier", "name": "Value" }
1726
+ ]
1727
+ },
1728
+ "path": "Tags[0]"
1729
+ },
1730
+ "actions": {
1731
+ "Delete": {
1732
+ "request": {
1733
+ "operation": "DeleteTags",
1734
+ "params": [
1735
+ { "target": "Resources[0]", "source": "identifier", "name": "ResourceId" },
1736
+ { "target": "Tags[0].Key", "source": "identifier", "name": "Key" },
1737
+ { "target": "Tags[0].Value", "source": "identifier", "name": "Value" }
1738
+ ]
1739
+ }
1740
+ }
1741
+ },
1742
+ "batchActions": {
1743
+ "Delete": {
1744
+ "request": {
1745
+ "operation": "DeleteTags",
1746
+ "params": [
1747
+ { "target": "Resources[]", "source": "identifier", "name": "ResourceId" },
1748
+ { "target": "Tags[*].Key", "source": "identifier", "name": "Key" },
1749
+ { "target": "Tags[*].Value", "source": "identifier", "name": "Value" }
1750
+ ]
1751
+ }
1752
+ }
1753
+ }
1754
+ },
1755
+ "Volume": {
1756
+ "identifiers": [
1757
+ {
1758
+ "name": "Id",
1759
+ "memberName": "VolumeId"
1760
+ }
1761
+ ],
1762
+ "shape": "Volume",
1763
+ "load": {
1764
+ "request": {
1765
+ "operation": "DescribeVolumes",
1766
+ "params": [
1767
+ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" }
1768
+ ]
1769
+ },
1770
+ "path": "Volumes[0]"
1771
+ },
1772
+ "actions": {
1773
+ "AttachToInstance": {
1774
+ "request": {
1775
+ "operation": "AttachVolume",
1776
+ "params": [
1777
+ { "target": "VolumeId", "source": "identifier", "name": "Id" }
1778
+ ]
1779
+ }
1780
+ },
1781
+ "CreateSnapshot": {
1782
+ "request": {
1783
+ "operation": "CreateSnapshot",
1784
+ "params": [
1785
+ { "target": "VolumeId", "source": "identifier", "name": "Id" }
1786
+ ]
1787
+ },
1788
+ "resource": {
1789
+ "type": "Snapshot",
1790
+ "identifiers": [
1791
+ { "target": "Id", "source": "response", "path": "SnapshotId" }
1792
+ ],
1793
+ "path": "@"
1794
+ }
1795
+ },
1796
+ "CreateTags": {
1797
+ "request": {
1798
+ "operation": "CreateTags",
1799
+ "params": [
1800
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
1801
+ ]
1802
+ },
1803
+ "resource": {
1804
+ "type": "Tag",
1805
+ "identifiers": [
1806
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
1807
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
1808
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
1809
+ ]
1810
+ }
1811
+ },
1812
+ "Delete": {
1813
+ "request": {
1814
+ "operation": "DeleteVolume",
1815
+ "params": [
1816
+ { "target": "VolumeId", "source": "identifier", "name": "Id" }
1817
+ ]
1818
+ }
1819
+ },
1820
+ "DescribeAttribute": {
1821
+ "request": {
1822
+ "operation": "DescribeVolumeAttribute",
1823
+ "params": [
1824
+ { "target": "VolumeId", "source": "identifier", "name": "Id" }
1825
+ ]
1826
+ }
1827
+ },
1828
+ "DescribeStatus": {
1829
+ "request": {
1830
+ "operation": "DescribeVolumeStatus",
1831
+ "params": [
1832
+ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" }
1833
+ ]
1834
+ }
1835
+ },
1836
+ "DetachFromInstance": {
1837
+ "request": {
1838
+ "operation": "DetachVolume",
1839
+ "params": [
1840
+ { "target": "VolumeId", "source": "identifier", "name": "Id" }
1841
+ ]
1842
+ }
1843
+ },
1844
+ "EnableIo": {
1845
+ "request": {
1846
+ "operation": "EnableVolumeIO",
1847
+ "params": [
1848
+ { "target": "VolumeId", "source": "identifier", "name": "Id" }
1849
+ ]
1850
+ }
1851
+ },
1852
+ "ModifyAttribute": {
1853
+ "request": {
1854
+ "operation": "ModifyVolumeAttribute",
1855
+ "params": [
1856
+ { "target": "VolumeId", "source": "identifier", "name": "Id" }
1857
+ ]
1858
+ }
1859
+ }
1860
+ },
1861
+ "hasMany": {
1862
+ "Snapshots": {
1863
+ "request": {
1864
+ "operation": "DescribeSnapshots",
1865
+ "params": [
1866
+ { "target": "Filters[0].Name", "source": "string", "value": "volume-id" },
1867
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
1868
+ ]
1869
+ },
1870
+ "resource": {
1871
+ "type": "Snapshot",
1872
+ "identifiers": [
1873
+ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" }
1874
+ ],
1875
+ "path": "Snapshots[]"
1876
+ }
1877
+ }
1878
+ }
1879
+ },
1880
+ "Vpc": {
1881
+ "identifiers": [
1882
+ {
1883
+ "name": "Id",
1884
+ "memberName": "VpcId"
1885
+ }
1886
+ ],
1887
+ "shape": "Vpc",
1888
+ "load": {
1889
+ "request": {
1890
+ "operation": "DescribeVpcs",
1891
+ "params": [
1892
+ { "target": "VpcIds[0]", "source": "identifier", "name": "Id" }
1893
+ ]
1894
+ },
1895
+ "path": "Vpcs[0]"
1896
+ },
1897
+ "actions": {
1898
+ "AssociateDhcpOptions": {
1899
+ "request": {
1900
+ "operation": "AssociateDhcpOptions",
1901
+ "params": [
1902
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
1903
+ ]
1904
+ }
1905
+ },
1906
+ "AttachClassicLinkInstance": {
1907
+ "request": {
1908
+ "operation": "AttachClassicLinkVpc",
1909
+ "params": [
1910
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
1911
+ ]
1912
+ }
1913
+ },
1914
+ "AttachInternetGateway": {
1915
+ "request": {
1916
+ "operation": "AttachInternetGateway",
1917
+ "params": [
1918
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
1919
+ ]
1920
+ }
1921
+ },
1922
+ "CreateNetworkAcl": {
1923
+ "request": {
1924
+ "operation": "CreateNetworkAcl",
1925
+ "params": [
1926
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
1927
+ ]
1928
+ },
1929
+ "resource": {
1930
+ "type": "NetworkAcl",
1931
+ "identifiers": [
1932
+ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" }
1933
+ ],
1934
+ "path": "NetworkAcl"
1935
+ }
1936
+ },
1937
+ "CreateRouteTable": {
1938
+ "request": {
1939
+ "operation": "CreateRouteTable",
1940
+ "params": [
1941
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
1942
+ ]
1943
+ },
1944
+ "resource": {
1945
+ "type": "RouteTable",
1946
+ "identifiers": [
1947
+ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" }
1948
+ ],
1949
+ "path": "RouteTable"
1950
+ }
1951
+ },
1952
+ "CreateSecurityGroup": {
1953
+ "request": {
1954
+ "operation": "CreateSecurityGroup",
1955
+ "params": [
1956
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
1957
+ ]
1958
+ },
1959
+ "resource": {
1960
+ "type": "SecurityGroup",
1961
+ "identifiers": [
1962
+ { "target": "Id", "source": "response", "path": "GroupId" }
1963
+ ]
1964
+ }
1965
+ },
1966
+ "CreateSubnet": {
1967
+ "request": {
1968
+ "operation": "CreateSubnet",
1969
+ "params": [
1970
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
1971
+ ]
1972
+ },
1973
+ "resource": {
1974
+ "type": "Subnet",
1975
+ "identifiers": [
1976
+ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" }
1977
+ ],
1978
+ "path": "Subnet"
1979
+ }
1980
+ },
1981
+ "CreateTags": {
1982
+ "request": {
1983
+ "operation": "CreateTags",
1984
+ "params": [
1985
+ { "target": "Resources[0]", "source": "identifier", "name": "Id" }
1986
+ ]
1987
+ },
1988
+ "resource": {
1989
+ "type": "Tag",
1990
+ "identifiers": [
1991
+ { "target": "ResourceId", "source": "identifier", "name": "Id" },
1992
+ { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" },
1993
+ { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" }
1994
+ ]
1995
+ }
1996
+ },
1997
+ "Delete": {
1998
+ "request": {
1999
+ "operation": "DeleteVpc",
2000
+ "params": [
2001
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
2002
+ ]
2003
+ }
2004
+ },
2005
+ "DescribeAttribute": {
2006
+ "request": {
2007
+ "operation": "DescribeVpcAttribute",
2008
+ "params": [
2009
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
2010
+ ]
2011
+ }
2012
+ },
2013
+ "DetachClassicLinkInstance": {
2014
+ "request": {
2015
+ "operation": "DetachClassicLinkVpc",
2016
+ "params": [
2017
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
2018
+ ]
2019
+ }
2020
+ },
2021
+ "DetachInternetGateway": {
2022
+ "request": {
2023
+ "operation": "DetachInternetGateway",
2024
+ "params": [
2025
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
2026
+ ]
2027
+ }
2028
+ },
2029
+ "DisableClassicLink": {
2030
+ "request": {
2031
+ "operation": "DisableVpcClassicLink",
2032
+ "params": [
2033
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
2034
+ ]
2035
+ }
2036
+ },
2037
+ "EnableClassicLink": {
2038
+ "request": {
2039
+ "operation": "EnableVpcClassicLink",
2040
+ "params": [
2041
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
2042
+ ]
2043
+ }
2044
+ },
2045
+ "ModifyAttribute": {
2046
+ "request": {
2047
+ "operation": "ModifyVpcAttribute",
2048
+ "params": [
2049
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
2050
+ ]
2051
+ }
2052
+ },
2053
+ "RequestVpcPeeringConnection": {
2054
+ "request": {
2055
+ "operation": "CreateVpcPeeringConnection",
2056
+ "params": [
2057
+ { "target": "VpcId", "source": "identifier", "name": "Id" }
2058
+ ]
2059
+ },
2060
+ "resource": {
2061
+ "type": "VpcPeeringConnection",
2062
+ "identifiers": [
2063
+ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" }
2064
+ ],
2065
+ "path": "VpcPeeringConnection"
2066
+ }
2067
+ }
2068
+ },
2069
+ "has": {
2070
+ "DhcpOptions": {
2071
+ "resource": {
2072
+ "type": "DhcpOptions",
2073
+ "identifiers": [
2074
+ { "target": "Id", "source": "data", "path": "DhcpOptionsId" }
2075
+ ]
2076
+ }
2077
+ }
2078
+ },
2079
+ "hasMany": {
2080
+ "AcceptedVpcPeeringConnections": {
2081
+ "request": {
2082
+ "operation": "DescribeVpcPeeringConnections",
2083
+ "params": [
2084
+ { "target": "Filters[0].Name", "source": "string", "value": "accepter-vpc-info.vpc-id" },
2085
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2086
+ ]
2087
+ },
2088
+ "resource": {
2089
+ "type": "VpcPeeringConnection",
2090
+ "identifiers": [
2091
+ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" }
2092
+ ],
2093
+ "path": "VpcPeeringConnections[]"
2094
+ }
2095
+ },
2096
+ "Instances": {
2097
+ "request": {
2098
+ "operation": "DescribeInstances",
2099
+ "params": [
2100
+ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" },
2101
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2102
+ ]
2103
+ },
2104
+ "resource": {
2105
+ "type": "Instance",
2106
+ "identifiers": [
2107
+ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" }
2108
+ ],
2109
+ "path": "Reservations[].Instances[]"
2110
+ }
2111
+ },
2112
+ "InternetGateways": {
2113
+ "request": {
2114
+ "operation": "DescribeInternetGateways",
2115
+ "params": [
2116
+ { "target": "Filters[0].Name", "source": "string", "value": "attachment.vpc-id" },
2117
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2118
+ ]
2119
+ },
2120
+ "resource": {
2121
+ "type": "InternetGateway",
2122
+ "identifiers": [
2123
+ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" }
2124
+ ],
2125
+ "path": "InternetGateways[]"
2126
+ }
2127
+ },
2128
+ "NetworkAcls": {
2129
+ "request": {
2130
+ "operation": "DescribeNetworkAcls",
2131
+ "params": [
2132
+ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" },
2133
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2134
+ ]
2135
+ },
2136
+ "resource": {
2137
+ "type": "NetworkAcl",
2138
+ "identifiers": [
2139
+ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" }
2140
+ ],
2141
+ "path": "NetworkAcls[]"
2142
+ }
2143
+ },
2144
+ "NetworkInterfaces": {
2145
+ "request": {
2146
+ "operation": "DescribeNetworkInterfaces",
2147
+ "params": [
2148
+ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" },
2149
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2150
+ ]
2151
+ },
2152
+ "resource": {
2153
+ "type": "NetworkInterface",
2154
+ "identifiers": [
2155
+ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" }
2156
+ ],
2157
+ "path": "NetworkInterfaces[]"
2158
+ }
2159
+ },
2160
+ "RequestedVpcPeeringConnections": {
2161
+ "request": {
2162
+ "operation": "DescribeVpcPeeringConnections",
2163
+ "params": [
2164
+ { "target": "Filters[0].Name", "source": "string", "value": "requester-vpc-info.vpc-id" },
2165
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2166
+ ]
2167
+ },
2168
+ "resource": {
2169
+ "type": "VpcPeeringConnection",
2170
+ "identifiers": [
2171
+ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" }
2172
+ ],
2173
+ "path": "VpcPeeringConnections[]"
2174
+ }
2175
+ },
2176
+ "RouteTables": {
2177
+ "request": {
2178
+ "operation": "DescribeRouteTables",
2179
+ "params": [
2180
+ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" },
2181
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2182
+ ]
2183
+ },
2184
+ "resource": {
2185
+ "type": "RouteTable",
2186
+ "identifiers": [
2187
+ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" }
2188
+ ],
2189
+ "path": "RouteTables[]"
2190
+ }
2191
+ },
2192
+ "SecurityGroups": {
2193
+ "request": {
2194
+ "operation": "DescribeSecurityGroups",
2195
+ "params": [
2196
+ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" },
2197
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2198
+ ]
2199
+ },
2200
+ "resource": {
2201
+ "type": "SecurityGroup",
2202
+ "identifiers": [
2203
+ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" }
2204
+ ],
2205
+ "path": "SecurityGroups[]"
2206
+ }
2207
+ },
2208
+ "Subnets": {
2209
+ "request": {
2210
+ "operation": "DescribeSubnets",
2211
+ "params": [
2212
+ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" },
2213
+ { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" }
2214
+ ]
2215
+ },
2216
+ "resource": {
2217
+ "type": "Subnet",
2218
+ "identifiers": [
2219
+ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" }
2220
+ ],
2221
+ "path": "Subnets[]"
2222
+ }
2223
+ }
2224
+ }
2225
+ },
2226
+ "VpcPeeringConnection": {
2227
+ "identifiers": [
2228
+ {
2229
+ "name": "Id",
2230
+ "memberName": "VpcPeeringConnectionId"
2231
+ }
2232
+ ],
2233
+ "shape": "VpcPeeringConnection",
2234
+ "load": {
2235
+ "request": {
2236
+ "operation": "DescribeVpcPeeringConnections",
2237
+ "params": [
2238
+ { "target": "VpcPeeringConnectionIds[0]", "source": "identifier", "name": "Id" }
2239
+ ]
2240
+ },
2241
+ "path": "VpcPeeringConnections[0]"
2242
+ },
2243
+ "actions": {
2244
+ "Accept": {
2245
+ "request": {
2246
+ "operation": "AcceptVpcPeeringConnection",
2247
+ "params": [
2248
+ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" }
2249
+ ]
2250
+ }
2251
+ },
2252
+ "Delete": {
2253
+ "request": {
2254
+ "operation": "DeleteVpcPeeringConnection",
2255
+ "params": [
2256
+ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" }
2257
+ ]
2258
+ }
2259
+ },
2260
+ "Reject": {
2261
+ "request": {
2262
+ "operation": "RejectVpcPeeringConnection",
2263
+ "params": [
2264
+ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" }
2265
+ ]
2266
+ }
2267
+ }
2268
+ },
2269
+ "has": {
2270
+ "AccepterVpc": {
2271
+ "resource": {
2272
+ "type": "Vpc",
2273
+ "identifiers": [
2274
+ { "target": "Id", "source": "data", "path": "AccepterVpcInfo.VpcId" }
2275
+ ]
2276
+ }
2277
+ },
2278
+ "RequesterVpc": {
2279
+ "resource": {
2280
+ "type": "Vpc",
2281
+ "identifiers": [
2282
+ { "target": "Id", "source": "data", "path": "RequesterVpcInfo.VpcId" }
2283
+ ]
2284
+ }
2285
+ }
2286
+ }
2287
+ }
2288
+ }
2289
+ }
testbed/boto__boto3/boto3/data/resources/glacier-2012-06-01.resources.json ADDED
@@ -0,0 +1,558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "service": {
3
+ "actions": {
4
+ "CreateVault": {
5
+ "request": {
6
+ "operation": "CreateVault",
7
+ "params": [
8
+ { "target": "accountId", "source": "string", "value": "-" }
9
+ ]
10
+ },
11
+ "resource": {
12
+ "type": "Vault",
13
+ "identifiers": [
14
+ { "target": "AccountId", "source": "requestParameter", "path": "accountId" },
15
+ { "target": "Name", "source": "requestParameter", "path": "vaultName" }
16
+ ]
17
+ }
18
+ }
19
+ },
20
+ "has": {
21
+ "Account": {
22
+ "resource": {
23
+ "type": "Account",
24
+ "identifiers": [
25
+ { "target": "Id", "source": "input" }
26
+ ]
27
+ }
28
+ }
29
+ },
30
+ "hasMany": {
31
+ "Vaults": {
32
+ "request": {
33
+ "operation": "ListVaults",
34
+ "params": [
35
+ { "target": "accountId", "source": "string", "value": "-" }
36
+ ]
37
+ },
38
+ "resource": {
39
+ "type": "Vault",
40
+ "identifiers": [
41
+ { "target": "AccountId", "source": "requestParameter", "path": "accountId" },
42
+ { "target": "Name", "source": "response", "path": "VaultList[].VaultName" }
43
+ ],
44
+ "path": "VaultList[]"
45
+ }
46
+ }
47
+ }
48
+ },
49
+ "resources": {
50
+ "Account": {
51
+ "identifiers": [
52
+ { "name": "Id" }
53
+ ],
54
+ "actions": {
55
+ "CreateVault": {
56
+ "request": {
57
+ "operation": "CreateVault",
58
+ "params": [
59
+ { "target": "accountId", "source": "identifier", "name": "Id" }
60
+ ]
61
+ },
62
+ "resource": {
63
+ "type": "Vault",
64
+ "identifiers": [
65
+ { "target": "AccountId", "source": "identifier", "name": "Id" },
66
+ { "target": "Name", "source": "requestParameter", "path": "vaultName" }
67
+ ]
68
+ }
69
+ }
70
+ },
71
+ "has": {
72
+ "Vault": {
73
+ "resource": {
74
+ "type": "Vault",
75
+ "identifiers": [
76
+ { "target": "AccountId", "source": "identifier", "name": "Id" },
77
+ { "target": "Name", "source": "input" }
78
+ ]
79
+ }
80
+ }
81
+ },
82
+ "hasMany": {
83
+ "Vaults": {
84
+ "request": { "operation": "ListVaults" },
85
+ "resource": {
86
+ "type": "Vault",
87
+ "identifiers": [
88
+ { "target": "AccountId", "source": "requestParameter", "path": "accountId" },
89
+ { "target": "Name", "source": "response", "path": "VaultList[].VaultName" }
90
+ ],
91
+ "path": "VaultList[]"
92
+ }
93
+ }
94
+ }
95
+ },
96
+ "Archive": {
97
+ "identifiers": [
98
+ { "name": "AccountId" },
99
+ { "name": "VaultName" },
100
+ { "name": "Id" }
101
+ ],
102
+ "actions": {
103
+ "Delete": {
104
+ "request": {
105
+ "operation": "DeleteArchive",
106
+ "params": [
107
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
108
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" },
109
+ { "target": "archiveId", "source": "identifier", "name": "Id" }
110
+ ]
111
+ }
112
+ },
113
+ "InitiateArchiveRetrieval": {
114
+ "request": {
115
+ "operation": "InitiateJob",
116
+ "params": [
117
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" },
118
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
119
+ { "target": "jobParameters.Type", "source": "string", "value": "archive-retrieval" },
120
+ { "target": "jobParameters.ArchiveId", "source": "identifier", "name": "Id" }
121
+ ]
122
+ },
123
+ "resource": {
124
+ "type": "Job",
125
+ "identifiers": [
126
+ { "target": "Id", "source": "response", "path": "jobId" },
127
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
128
+ { "target": "VaultName", "source": "identifier", "name": "VaultName" }
129
+ ]
130
+ }
131
+ }
132
+ },
133
+ "has": {
134
+ "Vault": {
135
+ "resource": {
136
+ "type": "Vault",
137
+ "identifiers": [
138
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
139
+ { "target": "Name", "source": "identifier", "name": "VaultName" }
140
+ ]
141
+ }
142
+ }
143
+ }
144
+ },
145
+ "Job": {
146
+ "identifiers": [
147
+ { "name": "AccountId" },
148
+ { "name": "VaultName" },
149
+ {
150
+ "name": "Id",
151
+ "memberName": "JobId"
152
+ }
153
+ ],
154
+ "shape": "GlacierJobDescription",
155
+ "load": {
156
+ "request": {
157
+ "operation": "DescribeJob",
158
+ "params": [
159
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
160
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" },
161
+ { "target": "jobId", "source": "identifier", "name": "Id" }
162
+ ]
163
+ },
164
+ "path": "@"
165
+ },
166
+ "actions": {
167
+ "GetOutput": {
168
+ "request": {
169
+ "operation": "GetJobOutput",
170
+ "params": [
171
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
172
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" },
173
+ { "target": "jobId", "source": "identifier", "name": "Id" }
174
+ ]
175
+ }
176
+ }
177
+ },
178
+ "has": {
179
+ "Vault": {
180
+ "resource": {
181
+ "type": "Vault",
182
+ "identifiers": [
183
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
184
+ { "target": "Name", "source": "identifier", "name": "VaultName" }
185
+ ]
186
+ }
187
+ }
188
+ }
189
+ },
190
+ "MultipartUpload": {
191
+ "identifiers": [
192
+ { "name": "AccountId" },
193
+ { "name": "VaultName" },
194
+ {
195
+ "name": "Id",
196
+ "memberName": "MultipartUploadId"
197
+ }
198
+ ],
199
+ "shape": "UploadListElement",
200
+ "actions": {
201
+ "Abort": {
202
+ "request": {
203
+ "operation": "AbortMultipartUpload",
204
+ "params": [
205
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
206
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" },
207
+ { "target": "uploadId", "source": "identifier", "name": "Id" }
208
+ ]
209
+ }
210
+ },
211
+ "Complete": {
212
+ "request": {
213
+ "operation": "CompleteMultipartUpload",
214
+ "params": [
215
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
216
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" },
217
+ { "target": "uploadId", "source": "identifier", "name": "Id" }
218
+ ]
219
+ }
220
+ },
221
+ "Parts": {
222
+ "request": {
223
+ "operation": "ListParts",
224
+ "params": [
225
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
226
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" },
227
+ { "target": "uploadId", "source": "identifier", "name": "Id" }
228
+ ]
229
+ }
230
+ },
231
+ "UploadPart": {
232
+ "request": {
233
+ "operation": "UploadMultipartPart",
234
+ "params": [
235
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
236
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" },
237
+ { "target": "uploadId", "source": "identifier", "name": "Id" }
238
+ ]
239
+ }
240
+ }
241
+ },
242
+ "has": {
243
+ "Vault": {
244
+ "resource": {
245
+ "type": "Vault",
246
+ "identifiers": [
247
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
248
+ { "target": "Name", "source": "identifier", "name": "VaultName" }
249
+ ]
250
+ }
251
+ }
252
+ }
253
+ },
254
+ "Notification": {
255
+ "identifiers": [
256
+ { "name": "AccountId" },
257
+ { "name": "VaultName" }
258
+ ],
259
+ "shape": "VaultNotificationConfig",
260
+ "load": {
261
+ "request": {
262
+ "operation": "GetVaultNotifications",
263
+ "params": [
264
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
265
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" }
266
+ ]
267
+ },
268
+ "path": "vaultNotificationConfig"
269
+ },
270
+ "actions": {
271
+ "Delete": {
272
+ "request": {
273
+ "operation": "DeleteVaultNotifications",
274
+ "params": [
275
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
276
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" }
277
+ ]
278
+ }
279
+ },
280
+ "Set": {
281
+ "request": {
282
+ "operation": "SetVaultNotifications",
283
+ "params": [
284
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
285
+ { "target": "vaultName", "source": "identifier", "name": "VaultName" }
286
+ ]
287
+ }
288
+ }
289
+ },
290
+ "has": {
291
+ "Vault": {
292
+ "resource": {
293
+ "type": "Vault",
294
+ "identifiers": [
295
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
296
+ { "target": "Name", "source": "identifier", "name": "VaultName" }
297
+ ]
298
+ }
299
+ }
300
+ }
301
+ },
302
+ "Vault": {
303
+ "identifiers": [
304
+ { "name": "AccountId" },
305
+ {
306
+ "name": "Name",
307
+ "memberName": "VaultName"
308
+ }
309
+ ],
310
+ "shape": "DescribeVaultOutput",
311
+ "load": {
312
+ "request": {
313
+ "operation": "DescribeVault",
314
+ "params": [
315
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
316
+ { "target": "accountId", "source": "identifier", "name": "AccountId" }
317
+ ]
318
+ },
319
+ "path": "@"
320
+ },
321
+ "actions": {
322
+ "Create": {
323
+ "request": {
324
+ "operation": "CreateVault",
325
+ "params": [
326
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
327
+ { "target": "accountId", "source": "identifier", "name": "AccountId" }
328
+ ]
329
+ }
330
+ },
331
+ "Delete": {
332
+ "request": {
333
+ "operation": "DeleteVault",
334
+ "params": [
335
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
336
+ { "target": "accountId", "source": "identifier", "name": "AccountId" }
337
+ ]
338
+ }
339
+ },
340
+ "InitiateInventoryRetrieval": {
341
+ "request": {
342
+ "operation": "InitiateJob",
343
+ "params": [
344
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
345
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
346
+ { "target": "jobParameters.Type", "source": "string", "value": "inventory-retrieval" }
347
+ ]
348
+ },
349
+ "resource": {
350
+ "type": "Job",
351
+ "identifiers": [
352
+ { "target": "Id", "source": "response", "path": "jobId" },
353
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
354
+ { "target": "VaultName", "source": "identifier", "name": "Name" }
355
+ ]
356
+ }
357
+ },
358
+ "InitiateMultipartUpload": {
359
+ "request": {
360
+ "operation": "InitiateMultipartUpload",
361
+ "params": [
362
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
363
+ { "target": "accountId", "source": "identifier", "name": "AccountId" }
364
+ ]
365
+ },
366
+ "resource": {
367
+ "type": "MultipartUpload",
368
+ "identifiers": [
369
+ { "target": "Id", "source": "response", "path": "uploadId" },
370
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
371
+ { "target": "VaultName", "source": "identifier", "name": "Name" }
372
+ ]
373
+ }
374
+ },
375
+ "UploadArchive": {
376
+ "request": {
377
+ "operation": "UploadArchive",
378
+ "params": [
379
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
380
+ { "target": "accountId", "source": "identifier", "name": "AccountId" }
381
+ ]
382
+ },
383
+ "resource": {
384
+ "type": "Archive",
385
+ "identifiers": [
386
+ { "target": "Id", "source": "response", "path": "archiveId" },
387
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
388
+ { "target": "VaultName", "source": "identifier", "name": "Name" }
389
+ ]
390
+ }
391
+ }
392
+ },
393
+ "has": {
394
+ "Account": {
395
+ "resource": {
396
+ "type": "Account",
397
+ "identifiers": [
398
+ { "target": "Id", "source": "identifier", "name": "AccountId" }
399
+ ]
400
+ }
401
+ },
402
+ "Archive": {
403
+ "resource": {
404
+ "type": "Archive",
405
+ "identifiers": [
406
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
407
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
408
+ { "target": "Id", "source": "input" }
409
+ ]
410
+ }
411
+ },
412
+ "Job": {
413
+ "resource": {
414
+ "type": "Job",
415
+ "identifiers": [
416
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
417
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
418
+ { "target": "Id", "source": "input" }
419
+ ]
420
+ }
421
+ },
422
+ "MultipartUpload": {
423
+ "resource": {
424
+ "type": "MultipartUpload",
425
+ "identifiers": [
426
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
427
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
428
+ { "target": "Id", "source": "input" }
429
+ ]
430
+ }
431
+ },
432
+ "Notification": {
433
+ "resource": {
434
+ "type": "Notification",
435
+ "identifiers": [
436
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
437
+ { "target": "VaultName", "source": "identifier", "name": "Name" }
438
+ ]
439
+ }
440
+ }
441
+ },
442
+ "hasMany": {
443
+ "CompletedJobs": {
444
+ "request": {
445
+ "operation": "ListJobs",
446
+ "params": [
447
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
448
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
449
+ { "target": "completed", "source": "string", "value": "true" }
450
+ ]
451
+ },
452
+ "resource": {
453
+ "type": "Job",
454
+ "identifiers": [
455
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
456
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
457
+ { "target": "Id", "source": "response", "path": "JobList[].JobId" }
458
+ ],
459
+ "path": "JobList[]"
460
+ }
461
+ },
462
+ "FailedJobs": {
463
+ "request": {
464
+ "operation": "ListJobs",
465
+ "params": [
466
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
467
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
468
+ { "target": "statuscode", "source": "string", "value": "Failed" }
469
+ ]
470
+ },
471
+ "resource": {
472
+ "type": "Job",
473
+ "identifiers": [
474
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
475
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
476
+ { "target": "Id", "source": "response", "path": "JobList[].JobId" }
477
+ ],
478
+ "path": "JobList[]"
479
+ }
480
+ },
481
+ "Jobs": {
482
+ "request": {
483
+ "operation": "ListJobs",
484
+ "params": [
485
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
486
+ { "target": "vaultName", "source": "identifier", "name": "Name" }
487
+ ]
488
+ },
489
+ "resource": {
490
+ "type": "Job",
491
+ "identifiers": [
492
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
493
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
494
+ { "target": "Id", "source": "response", "path": "JobList[].JobId" }
495
+ ],
496
+ "path": "JobList[]"
497
+ }
498
+ },
499
+ "JobsInProgress": {
500
+ "request": {
501
+ "operation": "ListJobs",
502
+ "params": [
503
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
504
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
505
+ { "target": "statuscode", "source": "string", "value": "InProgress" }
506
+ ]
507
+ },
508
+ "resource": {
509
+ "type": "Job",
510
+ "identifiers": [
511
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
512
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
513
+ { "target": "Id", "source": "response", "path": "JobList[].JobId" }
514
+ ],
515
+ "path": "JobList[]"
516
+ }
517
+ },
518
+ "MultipartUplaods": {
519
+ "request": {
520
+ "operation": "ListMultipartUploads",
521
+ "params": [
522
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
523
+ { "target": "accountId", "source": "identifier", "name": "AccountId" }
524
+ ]
525
+ },
526
+ "resource": {
527
+ "type": "MultipartUpload",
528
+ "identifiers": [
529
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
530
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
531
+ { "target": "Id", "source": "response", "path": "UploadsList[].MultipartUploadId" }
532
+ ],
533
+ "path": "UploadsList[]"
534
+ }
535
+ },
536
+ "SucceededJobs": {
537
+ "request": {
538
+ "operation": "ListJobs",
539
+ "params": [
540
+ { "target": "accountId", "source": "identifier", "name": "AccountId" },
541
+ { "target": "vaultName", "source": "identifier", "name": "Name" },
542
+ { "target": "statuscode", "source": "string", "value": "Succeeded" }
543
+ ]
544
+ },
545
+ "resource": {
546
+ "type": "Job",
547
+ "identifiers": [
548
+ { "target": "AccountId", "source": "identifier", "name": "AccountId" },
549
+ { "target": "VaultName", "source": "identifier", "name": "Name" },
550
+ { "target": "Id", "source": "response", "path": "JobList[].JobId" }
551
+ ],
552
+ "path": "JobList[]"
553
+ }
554
+ }
555
+ }
556
+ }
557
+ }
558
+ }
testbed/boto__boto3/boto3/data/resources/opsworks-2013-02-18.resources.json ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "service": {
3
+ "actions": {
4
+ "CreateStack": {
5
+ "request": { "operation": "CreateStack" },
6
+ "resource": {
7
+ "type": "Stack",
8
+ "identifiers": [
9
+ { "target": "Id", "source": "response", "path": "StackId" }
10
+ ]
11
+ }
12
+ }
13
+ },
14
+ "has": {
15
+ "Layer": {
16
+ "resource": {
17
+ "type": "Layer",
18
+ "identifiers": [
19
+ { "target": "Id", "source": "input" }
20
+ ]
21
+ }
22
+ },
23
+ "Stack": {
24
+ "resource": {
25
+ "type": "Stack",
26
+ "identifiers": [
27
+ { "target": "Id", "source": "input" }
28
+ ]
29
+ }
30
+ }
31
+ },
32
+ "hasMany": {
33
+ "Stacks": {
34
+ "request": { "operation": "DescribeStacks" },
35
+ "resource": {
36
+ "type": "Stack",
37
+ "identifiers": [
38
+ { "target": "Id", "source": "response", "path": "Stacks[].StackId" }
39
+ ],
40
+ "path": "Stacks[]"
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "resources": {
46
+ "Layer": {
47
+ "identifiers": [
48
+ { "name": "Id" }
49
+ ],
50
+ "shape": "Layer",
51
+ "load": {
52
+ "request": {
53
+ "operation": "DescribeLayers",
54
+ "params": [
55
+ { "target": "LayerIds[]", "source": "identifier", "name": "Id" }
56
+ ]
57
+ },
58
+ "path": "Layers[0]"
59
+ },
60
+ "actions": {
61
+ "Delete": {
62
+ "request": {
63
+ "operation": "DeleteLayer",
64
+ "params": [
65
+ { "target": "LayerId", "source": "identifier", "name": "Id" }
66
+ ]
67
+ }
68
+ }
69
+ },
70
+ "has": {
71
+ "Stack": {
72
+ "resource": {
73
+ "type": "Stack",
74
+ "identifiers": [
75
+ { "target": "Id", "source": "data", "path": "StackId" }
76
+ ]
77
+ }
78
+ }
79
+ }
80
+ },
81
+ "Stack": {
82
+ "identifiers": [
83
+ { "name": "Id" }
84
+ ],
85
+ "shape": "Stack",
86
+ "load": {
87
+ "request": {
88
+ "operation": "DescribeStacks",
89
+ "params": [
90
+ { "target": "StackIds[]", "source": "identifier", "name": "Id" }
91
+ ]
92
+ },
93
+ "path": "Stacks[0]"
94
+ },
95
+ "actions": {
96
+ "CreateLayer": {
97
+ "request": {
98
+ "operation": "CreateLayer",
99
+ "params": [
100
+ { "target": "StackId", "source": "identifier", "name": "Id" }
101
+ ]
102
+ },
103
+ "resource": {
104
+ "type": "Layer",
105
+ "identifiers": [
106
+ { "target": "Id", "source": "response", "path": "LayerId" }
107
+ ]
108
+ }
109
+ },
110
+ "Delete": {
111
+ "request": {
112
+ "operation": "DeleteStack",
113
+ "params": [
114
+ { "target": "StackId", "source": "identifier", "name": "Id" }
115
+ ]
116
+ }
117
+ }
118
+ },
119
+ "has": {
120
+ "Summary": {
121
+ "resource": {
122
+ "type": "StackSummary",
123
+ "identifiers": [
124
+ { "target": "StackId", "source": "identifier", "name": "Id" }
125
+ ]
126
+ }
127
+ }
128
+ },
129
+ "hasMany": {
130
+ "Layers": {
131
+ "request": {
132
+ "operation": "DescribeLayers",
133
+ "params": [
134
+ { "target": "StackId", "source": "identifier", "name": "Id" }
135
+ ]
136
+ },
137
+ "resource": {
138
+ "type": "Layer",
139
+ "identifiers": [
140
+ { "target": "Id", "source": "response", "path": "Layers[].LayerId" }
141
+ ],
142
+ "path": "Layers[]"
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "StackSummary": {
148
+ "identifiers": [
149
+ { "name": "StackId" }
150
+ ],
151
+ "shape": "StackSummary",
152
+ "load": {
153
+ "request": {
154
+ "operation": "DescribeStackSummary",
155
+ "params": [
156
+ { "target": "StackId", "source": "identifier", "name": "StackId" }
157
+ ]
158
+ },
159
+ "path": "StackSummary"
160
+ },
161
+ "has": {
162
+ "Stack": {
163
+ "resource": {
164
+ "type": "Stack",
165
+ "identifiers": [
166
+ { "target": "Id", "source": "identifier", "name": "StackId" }
167
+ ]
168
+ }
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
testbed/boto__boto3/boto3/data/resources/sns-2010-03-31.resources.json ADDED
@@ -0,0 +1,327 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "service": {
3
+ "actions": {
4
+ "CreatePlatformApplication": {
5
+ "request": { "operation": "CreatePlatformApplication" },
6
+ "resource": {
7
+ "type": "PlatformApplication",
8
+ "identifiers": [
9
+ { "target": "Arn", "source": "response", "path": "PlatformApplicationArn" }
10
+ ]
11
+ }
12
+ },
13
+ "CreateTopic": {
14
+ "request": { "operation": "CreateTopic" },
15
+ "resource": {
16
+ "type": "Topic",
17
+ "identifiers": [
18
+ { "target": "Arn", "source": "response", "path": "TopicArn" }
19
+ ]
20
+ }
21
+ }
22
+ },
23
+ "has": {
24
+ "PlatformApplication": {
25
+ "resource": {
26
+ "type": "PlatformApplication",
27
+ "identifiers": [
28
+ { "target": "Arn", "source": "input" }
29
+ ]
30
+ }
31
+ },
32
+ "PlatformEndpoint": {
33
+ "resource": {
34
+ "type": "PlatformEndpoint",
35
+ "identifiers": [
36
+ { "target": "Arn", "source": "input" }
37
+ ]
38
+ }
39
+ },
40
+ "Subscription": {
41
+ "resource": {
42
+ "type": "Subscription",
43
+ "identifiers": [
44
+ { "target": "Arn", "source": "input" }
45
+ ]
46
+ }
47
+ },
48
+ "Topic": {
49
+ "resource": {
50
+ "type": "Topic",
51
+ "identifiers": [
52
+ { "target": "Arn", "source": "input" }
53
+ ]
54
+ }
55
+ }
56
+ },
57
+ "hasMany": {
58
+ "PlatformApplications": {
59
+ "request": { "operation": "ListPlatformApplications" },
60
+ "resource": {
61
+ "type": "PlatformApplication",
62
+ "identifiers": [
63
+ { "target": "Arn", "source": "response", "path": "PlatformApplications[].PlatformApplicationArn" }
64
+ ]
65
+ }
66
+ },
67
+ "Subscriptions": {
68
+ "request": { "operation": "ListSubscriptions" },
69
+ "resource": {
70
+ "type": "Subscription",
71
+ "identifiers": [
72
+ { "target": "Arn", "source": "response", "path": "Subscriptions[].SubscriptionArn" }
73
+ ]
74
+ }
75
+ },
76
+ "Topics": {
77
+ "request": { "operation": "ListTopics" },
78
+ "resource": {
79
+ "type": "Topic",
80
+ "identifiers": [
81
+ { "target": "Arn", "source": "response", "path": "Topics[].TopicArn" }
82
+ ]
83
+ }
84
+ }
85
+ }
86
+ },
87
+ "resources": {
88
+ "PlatformApplication": {
89
+ "identifiers": [
90
+ { "name": "Arn" }
91
+ ],
92
+ "shape": "GetPlatformApplicationAttributesResponse",
93
+ "load": {
94
+ "request": {
95
+ "operation": "GetPlatformApplicationAttributes",
96
+ "params": [
97
+ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" }
98
+ ]
99
+ },
100
+ "path": "@"
101
+ },
102
+ "actions": {
103
+ "CreatePlatformEndpoint": {
104
+ "request": {
105
+ "operation": "CreatePlatformEndpoint",
106
+ "params": [
107
+ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" }
108
+ ]
109
+ },
110
+ "resource": {
111
+ "type": "PlatformEndpoint",
112
+ "identifiers": [
113
+ { "target": "Arn", "source": "response", "path": "EndpointArn" }
114
+ ]
115
+ }
116
+ },
117
+ "Delete": {
118
+ "request": {
119
+ "operation": "DeletePlatformApplication",
120
+ "params": [
121
+ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" }
122
+ ]
123
+ }
124
+ },
125
+ "SetAttributes": {
126
+ "request": {
127
+ "operation": "SetPlatformApplicationAttributes",
128
+ "params": [
129
+ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" }
130
+ ]
131
+ }
132
+ }
133
+ },
134
+ "hasMany": {
135
+ "Endpoints": {
136
+ "request": {
137
+ "operation": "ListEndpointsByPlatformApplication",
138
+ "params": [
139
+ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" }
140
+ ]
141
+ },
142
+ "resource": {
143
+ "type": "PlatformEndpoint",
144
+ "identifiers": [
145
+ { "target": "Arn", "source": "response", "path": "Endpoints[].EndpointArn" }
146
+ ]
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "PlatformEndpoint": {
152
+ "identifiers": [
153
+ { "name": "Arn" }
154
+ ],
155
+ "shape": "GetEndpointAttributesResponse",
156
+ "load": {
157
+ "request": {
158
+ "operation": "GetEndpointAttributes",
159
+ "params": [
160
+ { "target": "EndpointArn", "source": "identifier", "name": "Arn" }
161
+ ]
162
+ },
163
+ "path": "@"
164
+ },
165
+ "actions": {
166
+ "Delete": {
167
+ "request": {
168
+ "operation": "DeleteEndpoint",
169
+ "params": [
170
+ { "target": "EndpointArn", "source": "identifier", "name": "Arn" }
171
+ ]
172
+ }
173
+ },
174
+ "Publish": {
175
+ "request": {
176
+ "operation": "Publish",
177
+ "params": [
178
+ { "target": "TargetArn", "source": "identifier", "name": "Arn" }
179
+ ]
180
+ }
181
+ },
182
+ "SetAttributes": {
183
+ "request": {
184
+ "operation": "SetEndpointAttributes",
185
+ "params": [
186
+ { "target": "EndpointArn", "source": "identifier", "name": "Arn" }
187
+ ]
188
+ }
189
+ }
190
+ }
191
+ },
192
+ "Subscription": {
193
+ "identifiers": [
194
+ { "name": "Arn" }
195
+ ],
196
+ "shape": "GetSubscriptionAttributesResponse",
197
+ "load": {
198
+ "request": {
199
+ "operation": "GetSubscriptionAttributes",
200
+ "params": [
201
+ { "target": "SubscriptionArn", "source": "identifier", "name": "Arn" }
202
+ ]
203
+ },
204
+ "path": "@"
205
+ },
206
+ "actions": {
207
+ "Delete": {
208
+ "request": {
209
+ "operation": "Unsubscribe",
210
+ "params": [
211
+ { "target": "SubscriptionArn", "source": "identifier", "name": "Arn" }
212
+ ]
213
+ }
214
+ },
215
+ "SetAttributes": {
216
+ "request": {
217
+ "operation": "SetSubscriptionAttributes",
218
+ "params": [
219
+ { "target": "SubscriptionArn", "source": "identifier", "name": "Arn" }
220
+ ]
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "Topic": {
226
+ "identifiers": [
227
+ { "name": "Arn" }
228
+ ],
229
+ "shape": "GetTopicAttributesResponse",
230
+ "load": {
231
+ "request": {
232
+ "operation": "GetTopicAttributes",
233
+ "params": [
234
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
235
+ ]
236
+ },
237
+ "path": "@"
238
+ },
239
+ "actions": {
240
+ "AddPermission": {
241
+ "request": {
242
+ "operation": "AddPermission",
243
+ "params": [
244
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
245
+ ]
246
+ }
247
+ },
248
+ "ConfirmSubscription": {
249
+ "request": {
250
+ "operation": "ConfirmSubscription",
251
+ "params": [
252
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
253
+ ]
254
+ },
255
+ "resource": {
256
+ "type": "Subscription",
257
+ "identifiers": [
258
+ { "target": "Arn", "source": "response", "path": "SubscriptionArn" }
259
+ ]
260
+ }
261
+ },
262
+ "Delete": {
263
+ "request": {
264
+ "operation": "DeleteTopic",
265
+ "params": [
266
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
267
+ ]
268
+ }
269
+ },
270
+ "Publish": {
271
+ "request": {
272
+ "operation": "Publish",
273
+ "params": [
274
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
275
+ ]
276
+ }
277
+ },
278
+ "RemovePermission": {
279
+ "request": {
280
+ "operation": "RemovePermission",
281
+ "params": [
282
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
283
+ ]
284
+ }
285
+ },
286
+ "SetAttributes": {
287
+ "request": {
288
+ "operation": "SetTopicAttributes",
289
+ "params": [
290
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
291
+ ]
292
+ }
293
+ },
294
+ "Subscribe": {
295
+ "request": {
296
+ "operation": "Subscribe",
297
+ "params": [
298
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
299
+ ]
300
+ },
301
+ "resource": {
302
+ "type": "Subscription",
303
+ "identifiers": [
304
+ { "target": "Arn", "source": "response", "path": "SubscriptionArn" }
305
+ ]
306
+ }
307
+ }
308
+ },
309
+ "hasMany": {
310
+ "Subscriptions": {
311
+ "request": {
312
+ "operation": "ListSubscriptionsByTopic",
313
+ "params": [
314
+ { "target": "TopicArn", "source": "identifier", "name": "Arn" }
315
+ ]
316
+ },
317
+ "resource": {
318
+ "type": "Subscription",
319
+ "identifiers": [
320
+ { "target": "Arn", "source": "response", "path": "Subscriptions[].SubscriptionArn" }
321
+ ]
322
+ }
323
+ }
324
+ }
325
+ }
326
+ }
327
+ }
testbed/boto__boto3/boto3/data/resources/sqs-2012-11-05.resources.json ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "service": {
3
+ "actions": {
4
+ "CreateQueue": {
5
+ "request": { "operation": "CreateQueue" },
6
+ "resource": {
7
+ "type": "Queue",
8
+ "identifiers": [
9
+ { "target": "Url", "source": "response", "path": "QueueUrl" }
10
+ ]
11
+ }
12
+ },
13
+ "GetQueueByName": {
14
+ "request": { "operation": "GetQueueUrl" },
15
+ "resource": {
16
+ "type": "Queue",
17
+ "identifiers": [
18
+ { "target": "Url", "source": "response", "path": "QueueUrl" }
19
+ ]
20
+ }
21
+ }
22
+ },
23
+ "has": {
24
+ "Queue": {
25
+ "resource": {
26
+ "type": "Queue",
27
+ "identifiers": [
28
+ { "target": "Url", "source": "input" }
29
+ ]
30
+ }
31
+ }
32
+ },
33
+ "hasMany": {
34
+ "Queues": {
35
+ "request": { "operation": "ListQueues" },
36
+ "resource": {
37
+ "type": "Queue",
38
+ "identifiers": [
39
+ { "target": "Url", "source": "response", "path": "QueueUrls[]" }
40
+ ]
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "resources": {
46
+ "Message": {
47
+ "identifiers": [
48
+ { "name": "QueueUrl" },
49
+ {
50
+ "name": "ReceiptHandle",
51
+ "memberName": "ReceiptHandle"
52
+ }
53
+ ],
54
+ "shape": "Message",
55
+ "actions": {
56
+ "ChangeVisibility": {
57
+ "request": {
58
+ "operation": "ChangeMessageVisibility",
59
+ "params": [
60
+ { "target": "QueueUrl", "source": "identifier", "name": "QueueUrl" },
61
+ { "target": "ReceiptHandle", "source": "identifier", "name": "ReceiptHandle" }
62
+ ]
63
+ }
64
+ },
65
+ "Delete": {
66
+ "request": {
67
+ "operation": "DeleteMessage",
68
+ "params": [
69
+ { "target": "QueueUrl", "source": "identifier", "name": "QueueUrl" },
70
+ { "target": "ReceiptHandle", "source": "identifier", "name": "ReceiptHandle" }
71
+ ]
72
+ }
73
+ }
74
+ },
75
+ "batchActions": {
76
+ "Delete": {
77
+ "request": {
78
+ "operation": "DeleteMessageBatch",
79
+ "params": [
80
+ { "target": "QueueUrl", "source": "identifier", "name": "QueueUrl" },
81
+ { "target": "Entries[*].Id", "source": "data", "path": "MessageId" },
82
+ { "target": "Entries[*].ReceiptHandle", "source": "identifier", "name": "ReceiptHandle" }
83
+ ]
84
+ }
85
+ }
86
+ },
87
+ "has": {
88
+ "Queue": {
89
+ "resource": {
90
+ "type": "Queue",
91
+ "identifiers": [
92
+ { "target": "Url", "source": "identifier", "name": "QueueUrl" }
93
+ ]
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "Queue": {
99
+ "identifiers": [
100
+ { "name": "Url" }
101
+ ],
102
+ "shape": "GetQueueAttributesResult",
103
+ "load": {
104
+ "request": {
105
+ "operation": "GetQueueAttributes",
106
+ "params": [
107
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" },
108
+ { "target": "AttributeNames[]", "source": "string", "value": "All" }
109
+ ]
110
+ },
111
+ "path": "@"
112
+ },
113
+ "actions": {
114
+ "AddPermission": {
115
+ "request": {
116
+ "operation": "AddPermission",
117
+ "params": [
118
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
119
+ ]
120
+ }
121
+ },
122
+ "ChangeMessageVisibilityBatch": {
123
+ "request": {
124
+ "operation": "ChangeMessageVisibilityBatch",
125
+ "params": [
126
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
127
+ ]
128
+ }
129
+ },
130
+ "Delete": {
131
+ "request": {
132
+ "operation": "DeleteQueue",
133
+ "params": [
134
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
135
+ ]
136
+ }
137
+ },
138
+ "DeleteMessages": {
139
+ "request": {
140
+ "operation": "DeleteMessageBatch",
141
+ "params": [
142
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
143
+ ]
144
+ }
145
+ },
146
+ "Purge": {
147
+ "request": {
148
+ "operation": "PurgeQueue",
149
+ "params": [
150
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
151
+ ]
152
+ }
153
+ },
154
+ "ReceiveMessages": {
155
+ "request": {
156
+ "operation": "ReceiveMessage",
157
+ "params": [
158
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
159
+ ]
160
+ },
161
+ "resource": {
162
+ "type": "Message",
163
+ "identifiers": [
164
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" },
165
+ { "target": "ReceiptHandle", "source": "response", "path": "Messages[].ReceiptHandle" }
166
+ ],
167
+ "path": "Messages[]"
168
+ }
169
+ },
170
+ "RemovePermission": {
171
+ "request": {
172
+ "operation": "RemovePermission",
173
+ "params": [
174
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
175
+ ]
176
+ }
177
+ },
178
+ "SendMessage": {
179
+ "request": {
180
+ "operation": "SendMessage",
181
+ "params": [
182
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
183
+ ]
184
+ }
185
+ },
186
+ "SendMessages": {
187
+ "request": {
188
+ "operation": "SendMessageBatch",
189
+ "params": [
190
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
191
+ ]
192
+ }
193
+ },
194
+ "SetAttributes": {
195
+ "request": {
196
+ "operation": "SetQueueAttributes",
197
+ "params": [
198
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
199
+ ]
200
+ }
201
+ }
202
+ },
203
+ "has": {
204
+ "Message": {
205
+ "resource": {
206
+ "type": "Message",
207
+ "identifiers": [
208
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" },
209
+ { "target": "ReceiptHandle", "source": "input" }
210
+ ]
211
+ }
212
+ }
213
+ },
214
+ "hasMany": {
215
+ "DeadLetterSourceQueues": {
216
+ "request": {
217
+ "operation": "ListDeadLetterSourceQueues",
218
+ "params": [
219
+ { "target": "QueueUrl", "source": "identifier", "name": "Url" }
220
+ ]
221
+ },
222
+ "resource": {
223
+ "type": "Queue",
224
+ "identifiers": [
225
+ { "target": "Url", "source": "response", "path": "QueueUrls[]" }
226
+ ]
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
232
+ }
testbed/boto__boto3/boto3/exceptions.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+
14
+ class ResourceLoadException(Exception):
15
+ pass
16
+
17
+
18
+ class NoVersionFound(Exception):
19
+ pass
20
+
21
+
22
+ class RetriesExceededError(Exception):
23
+ def __init__(self, last_exception, msg='Max Retries Exceeded'):
24
+ super(RetriesExceededError, self).__init__(msg)
25
+ self.last_exception = last_exception
26
+
27
+
28
+ class S3TransferFailedError(Exception):
29
+ pass
30
+
31
+
32
+ class S3UploadFailedError(Exception):
33
+ pass
testbed/boto__boto3/boto3/resources/action.py ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+
14
+ import logging
15
+
16
+ from botocore import xform_name
17
+
18
+ from .params import create_request_parameters
19
+ from .response import RawHandler, ResourceHandler
20
+
21
+
22
+ logger = logging.getLogger(__name__)
23
+
24
+
25
+ class ServiceAction(object):
26
+ """
27
+ A class representing a callable action on a resource, for example
28
+ ``sqs.get_queue_by_name(...)`` or ``s3.Bucket('foo').delete()``.
29
+ The action may construct parameters from existing resource identifiers
30
+ and may return either a raw response or a new resource instance.
31
+
32
+ :type action_model: :py:class`~boto3.resources.model.Action`
33
+ :param action_model: The action model.
34
+ :type factory: ResourceFactory
35
+ :param factory: The factory that created the resource class to which
36
+ this action is attached.
37
+ :type resource_defs: dict
38
+ :param resource_defs: Service resource definitions.
39
+ :type service_model: :ref:`botocore.model.ServiceModel`
40
+ :param service_model: The Botocore service model
41
+ """
42
+ def __init__(self, action_model, factory=None, resource_defs=None,
43
+ service_model=None):
44
+ self._action_model = action_model
45
+
46
+ # In the simplest case we just return the response, but if a
47
+ # resource is defined, then we must create these before returning.
48
+ resource = action_model.resource
49
+ if resource:
50
+ self._response_handler = ResourceHandler(resource.path,
51
+ factory, resource_defs, service_model, resource,
52
+ action_model.request.operation)
53
+ else:
54
+ self._response_handler = RawHandler(action_model.path)
55
+
56
+ def __call__(self, parent, *args, **kwargs):
57
+ """
58
+ Perform the action's request operation after building operation
59
+ parameters and build any defined resources from the response.
60
+
61
+ :type parent: :py:class:`~boto3.resources.base.ServiceResource`
62
+ :param parent: The resource instance to which this action is attached.
63
+ :rtype: dict or ServiceResource or list(ServiceResource)
64
+ :return: The response, either as a raw dict or resource instance(s).
65
+ """
66
+ operation_name = xform_name(self._action_model.request.operation)
67
+
68
+ # First, build predefined params and then update with the
69
+ # user-supplied kwargs, which allows overriding the pre-built
70
+ # params if needed.
71
+ params = create_request_parameters(parent, self._action_model.request)
72
+ params.update(kwargs)
73
+
74
+ logger.info('Calling %s:%s with %r', parent.meta.service_name,
75
+ operation_name, params)
76
+
77
+ response = getattr(parent.meta.client, operation_name)(**params)
78
+
79
+ logger.debug('Response: %r', response)
80
+
81
+ return self._response_handler(parent, params, response)
82
+
83
+
84
+ class BatchAction(ServiceAction):
85
+ """
86
+ An action which operates on a batch of items in a collection, typically
87
+ a single page of results from the collection's underlying service
88
+ operation call. For example, this allows you to delete up to 999
89
+ S3 objects in a single operation rather than calling ``.delete()`` on
90
+ each one individually.
91
+
92
+ :type action_model: :py:class:`~boto3.resources.model.Action`
93
+ :param action_model: The action model.
94
+ :type factory: ResourceFactory
95
+ :param factory: The factory that created the resource class to which
96
+ this action is attached.
97
+ :type resource_defs: dict
98
+ :param resource_defs: Service resource definitions.
99
+ :type service_model: :ref:`botocore.model.ServiceModel`
100
+ :param service_model: The Botocore service model
101
+ """
102
+ def __call__(self, parent, *args, **kwargs):
103
+ """
104
+ Perform the batch action's operation on every page of results
105
+ from the collection.
106
+
107
+ :type parent: :py:class:`~boto3.resources.collection.ResourceCollection`
108
+ :param parent: The collection iterator to which this action
109
+ is attached.
110
+ :rtype: list(dict)
111
+ :return: A list of low-level response dicts from each call.
112
+ """
113
+ service_name = None
114
+ client = None
115
+ responses = []
116
+ operation_name = xform_name(self._action_model.request.operation)
117
+
118
+ # Unlike the simple action above, a batch action must operate
119
+ # on batches (or pages) of items. So we get each page, construct
120
+ # the necessary parameters and call the batch operation.
121
+ for page in parent.pages():
122
+ params = {}
123
+ for resource in page:
124
+ # There is no public interface to get a service name
125
+ # or low-level client from a collection, so we get
126
+ # these from the first resource in the collection.
127
+ if service_name is None:
128
+ service_name = resource.meta.service_name
129
+ if client is None:
130
+ client = resource.meta.client
131
+
132
+ create_request_parameters(
133
+ resource, self._action_model.request, params=params)
134
+
135
+ if not params:
136
+ # There are no items, no need to make a call.
137
+ break
138
+
139
+ params.update(kwargs)
140
+
141
+ logger.info('Calling %s:%s with %r',
142
+ service_name, operation_name, params)
143
+
144
+ response = getattr(client, operation_name)(**params)
145
+
146
+ logger.debug('Response: %r', response)
147
+
148
+ responses.append(
149
+ self._response_handler(parent, params, response))
150
+
151
+ return responses
152
+
153
+
154
+ class WaiterAction(object):
155
+ """
156
+ A class representing a callable waiter action on a resource, for example
157
+ ``s3.Bucket('foo').wait_until_bucket_exists()``.
158
+ The waiter action may construct parameters from existing resource
159
+ identifiers.
160
+
161
+ :type waiter_model: :py:class`~boto3.resources.model.Waiter`
162
+ :param waiter_model: The action waiter.
163
+ :type waiter_resource_name: string
164
+ :param waiter_resource_name: The name of the waiter action for the
165
+ resource. It usually begins with a
166
+ ``wait_until_``
167
+ """
168
+ def __init__(self, waiter_model, waiter_resource_name):
169
+ self._waiter_model = waiter_model
170
+ self._waiter_resource_name = waiter_resource_name
171
+
172
+ def __call__(self, parent, *args, **kwargs):
173
+ """
174
+ Perform the wait operation after building operation
175
+ parameters.
176
+
177
+ :type parent: :py:class:`~boto3.resources.base.ServiceResource`
178
+ :param parent: The resource instance to which this action is attached.
179
+ """
180
+ client_waiter_name = xform_name(self._waiter_model.waiter_name)
181
+
182
+ # First, build predefined params and then update with the
183
+ # user-supplied kwargs, which allows overriding the pre-built
184
+ # params if needed.
185
+ params = create_request_parameters(parent, self._waiter_model)
186
+ params.update(kwargs)
187
+
188
+ logger.info('Calling %s:%s with %r',
189
+ parent.meta.service_name,
190
+ self._waiter_resource_name, params)
191
+
192
+ client = parent.meta.client
193
+ waiter = client.get_waiter(client_waiter_name)
194
+ response = waiter.wait(**params)
195
+
196
+ logger.debug('Response: %r', response)
testbed/boto__boto3/boto3/s3/inject.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+ from boto3.s3.transfer import S3Transfer
14
+ from boto3 import utils
15
+
16
+
17
+ def inject_s3_transfer_methods(class_attributes, **kwargs):
18
+ utils.inject_attribute(class_attributes, 'upload_file', upload_file)
19
+ utils.inject_attribute(class_attributes, 'download_file', download_file)
20
+
21
+
22
+ def upload_file(self, Filename, Bucket, Key, ExtraArgs=None,
23
+ Callback=None, Config=None):
24
+ transfer = S3Transfer(self, Config)
25
+ return transfer.upload_file(
26
+ filename=Filename, bucket=Bucket, key=Key,
27
+ extra_args=ExtraArgs, callback=Callback)
28
+
29
+
30
+ def download_file(self, Bucket, Key, Filename, ExtraArgs=None,
31
+ Callback=None, Config=None):
32
+ transfer = S3Transfer(self, Config)
33
+ return transfer.download_file(
34
+ bucket=Bucket, key=Key, filename=Filename,
35
+ extra_args=ExtraArgs, callback=Callback)
testbed/boto__boto3/boto3/s3/transfer.py ADDED
@@ -0,0 +1,684 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+ """Abstractions over S3's upload/download operations.
14
+
15
+ This module provides high level abstractions for efficient
16
+ uploads/downloads. It handles several things for the user:
17
+
18
+ * Automatically switching to multipart transfers when
19
+ a file is over a specific size threshold
20
+ * Uploading/downloading a file in parallel
21
+ * Throttling based on max bandwidth
22
+ * Progress callbacks to monitor transfers
23
+ * Retries. While botocore handles retries for streaming uploads,
24
+ it is not possible for it to handle retries for streaming
25
+ downloads. This module handles retries for both cases so
26
+ you don't need to implement any retry logic yourself.
27
+
28
+ This module has a reasonable set of defaults. It also allows you
29
+ to configure many aspects of the transfer process including:
30
+
31
+ * Multipart threshold size
32
+ * Max parallel downloads
33
+ * Max bandwidth
34
+ * Socket timeouts
35
+ * Retry amounts
36
+
37
+ There is no support for s3->s3 multipart copies at this
38
+ time.
39
+
40
+
41
+ Usage
42
+ =====
43
+
44
+ The simplest way to use this module is:
45
+
46
+ .. code-block:: python
47
+
48
+ client = boto3.client('s3', 'us-west-2')
49
+ transfer = S3Transfer(client)
50
+ # Upload /tmp/myfile to s3://bucket/key
51
+ transfer.upload_file('/tmp/myfile', 'bucket', 'key')
52
+
53
+ # Download s3://bucket/key to /tmp/myfile
54
+ transfer.download_file('bucket', 'key', '/tmp/myfile')
55
+
56
+ The ``upload_file`` and ``download_file`` methods also accept
57
+ ``**kwargs``, which will be forwarded through to the corresponding
58
+ client operation. Here are a few examples using ``upload_file``::
59
+
60
+ # Making the object public
61
+ transfer.upload_file('/tmp/myfile', 'bucket', 'key',
62
+ extra_args={'ACL': 'public-read'})
63
+
64
+ # Setting metadata
65
+ transfer.upload_file('/tmp/myfile', 'bucket', 'key',
66
+ extra_args={'Metadata': {'a': 'b', 'c': 'd'}})
67
+
68
+ # Setting content type
69
+ transfer.upload_file('/tmp/myfile.json', 'bucket', 'key',
70
+ extra_args={'ContentType': "application/json"})
71
+
72
+
73
+ The ``S3Transfer`` clas also supports progress callbacks so you can
74
+ provide transfer progress to users. Both the ``upload_file`` and
75
+ ``download_file`` methods take an optional ``callback`` parameter.
76
+ Here's an example of how to print a simple progress percentage
77
+ to the user:
78
+
79
+ .. code-block:: python
80
+
81
+ class ProgressPercentage(object):
82
+ def __init__(self, filename):
83
+ self._filename = filename
84
+ self._size = float(os.path.getsize(filename))
85
+ self._seen_so_far = 0
86
+ self._lock = threading.Lock()
87
+
88
+ def __call__(self, filename, bytes_amount):
89
+ # To simplify we'll assume this is hooked up
90
+ # to a single filename.
91
+ with self._lock:
92
+ self._seen_so_far += bytes_amount
93
+ percentage = (self._seen_so_far / self._size) * 100
94
+ sys.stdout.write(
95
+ "\r%s %s / %s (%.2f%%)" % (filename, self._seen_so_far,
96
+ self._size, percentage))
97
+ sys.stdout.flush()
98
+
99
+
100
+ transfer = S3Transfer(boto3.client('s3', 'us-west-2'))
101
+ # Upload /tmp/myfile to s3://bucket/key and print upload progress.
102
+ transfer.upload_file('/tmp/myfile', 'bucket', 'key',
103
+ callback=ProgressPercentage('/tmp/myfile'))
104
+
105
+
106
+
107
+ You can also provide a TransferConfig object to the S3Transfer
108
+ object that gives you more fine grained control over the
109
+ transfer. For example:
110
+
111
+ .. code-block:: python
112
+
113
+ client = boto3.client('s3', 'us-west-2')
114
+ config = TransferConfig(
115
+ multipart_threshold=8 * 1024 * 1024,
116
+ max_concurrency=10,
117
+ num_download_attempts=10,
118
+ )
119
+ transfer = S3Transfer(client, config)
120
+ transfer.upload_file('/tmp/foo', 'bucket', 'key')
121
+
122
+
123
+ """
124
+ import os
125
+ import math
126
+ import functools
127
+ import logging
128
+ import socket
129
+ import threading
130
+ import random
131
+ import string
132
+ import boto3
133
+ from concurrent import futures
134
+
135
+ from botocore.compat import six
136
+ from botocore.vendored.requests.packages.urllib3.exceptions import \
137
+ ReadTimeoutError
138
+ from botocore.exceptions import IncompleteReadError
139
+
140
+ import boto3.compat
141
+ from boto3.exceptions import RetriesExceededError, S3UploadFailedError
142
+
143
+
144
+ logger = logging.getLogger(__name__)
145
+ queue = six.moves.queue
146
+
147
+ MB = 1024 * 1024
148
+ SHUTDOWN_SENTINEL = object()
149
+
150
+
151
+ def random_file_extension(num_digits=8):
152
+ return ''.join(random.choice(string.hexdigits) for _ in range(num_digits))
153
+
154
+
155
+ class QueueShutdownError(Exception):
156
+ pass
157
+
158
+
159
+ class ReadFileChunk(object):
160
+ def __init__(self, fileobj, start_byte, chunk_size, full_file_size,
161
+ callback=None):
162
+ """
163
+
164
+ Given a file object shown below:
165
+
166
+ |___________________________________________________|
167
+ 0 | | full_file_size
168
+ |----chunk_size---|
169
+ start_byte
170
+
171
+ :type fileobj: file
172
+ :param fileobj: File like object
173
+
174
+ :type start_byte: int
175
+ :param start_byte: The first byte from which to start reading.
176
+
177
+ :type chunk_size: int
178
+ :param chunk_size: The max chunk size to read. Trying to read
179
+ pass the end of the chunk size will behave like you've
180
+ reached the end of the file.
181
+
182
+ :type full_file_size: int
183
+ :param full_file_size: The entire content length associated
184
+ with ``fileobj``.
185
+
186
+ :type callback: function(amount_read)
187
+ :param callback: Called whenever data is read from this object.
188
+
189
+ """
190
+ self._fileobj = fileobj
191
+ self._start_byte = start_byte
192
+ self._size = self._calculate_file_size(
193
+ self._fileobj, requested_size=chunk_size,
194
+ start_byte=start_byte, actual_file_size=full_file_size)
195
+ self._fileobj.seek(self._start_byte)
196
+ self._amount_read = 0
197
+ self._callback = callback
198
+
199
+ @classmethod
200
+ def from_filename(cls, filename, start_byte, chunk_size, callback=None):
201
+ """Convenience factory function to create from a filename.
202
+
203
+ :type start_byte: int
204
+ :param start_byte: The first byte from which to start reading.
205
+
206
+ :type chunk_size: int
207
+ :param chunk_size: The max chunk size to read. Trying to read
208
+ pass the end of the chunk size will behave like you've
209
+ reached the end of the file.
210
+
211
+ :type full_file_size: int
212
+ :param full_file_size: The entire content length associated
213
+ with ``fileobj``.
214
+
215
+ :type callback: function(amount_read)
216
+ :param callback: Called whenever data is read from this object.
217
+
218
+ :rtype: ``ReadFileChunk``
219
+ :return: A new instance of ``ReadFileChunk``
220
+
221
+ """
222
+ f = open(filename, 'rb')
223
+ file_size = os.fstat(f.fileno()).st_size
224
+ return cls(f, start_byte, chunk_size, file_size, callback)
225
+
226
+ def _calculate_file_size(self, fileobj, requested_size, start_byte,
227
+ actual_file_size):
228
+ max_chunk_size = actual_file_size - start_byte
229
+ return min(max_chunk_size, requested_size)
230
+
231
+ def read(self, amount=None):
232
+ if amount is None:
233
+ amount_to_read = self._size - self._amount_read
234
+ else:
235
+ amount_to_read = min(self._size - self._amount_read, amount)
236
+ data = self._fileobj.read(amount_to_read)
237
+ self._amount_read += len(data)
238
+ if self._callback is not None:
239
+ self._callback(len(data))
240
+ return data
241
+
242
+ def seek(self, where):
243
+ self._fileobj.seek(self._start_byte + where)
244
+ self._amount_read = where
245
+
246
+ def close(self):
247
+ self._fileobj.close()
248
+
249
+ def tell(self):
250
+ return self._amount_read
251
+
252
+ def __len__(self):
253
+ # __len__ is defined because requests will try to determine the length
254
+ # of the stream to set a content length. In the normal case
255
+ # of the file it will just stat the file, but we need to change that
256
+ # behavior. By providing a __len__, requests will use that instead
257
+ # of stat'ing the file.
258
+ return self._size
259
+
260
+ def __enter__(self):
261
+ return self
262
+
263
+ def __exit__(self, *args, **kwargs):
264
+ self.close()
265
+
266
+ def __iter__(self):
267
+ # This is a workaround for http://bugs.python.org/issue17575
268
+ # Basically httplib will try to iterate over the contents, even
269
+ # if its a file like object. This wasn't noticed because we've
270
+ # already exhausted the stream so iterating over the file immediately
271
+ # stops, which is what we're simulating here.
272
+ return iter([])
273
+
274
+
275
+ class StreamReaderProgress(object):
276
+ """Wrapper for a read only stream that adds progress callbacks."""
277
+ def __init__(self, stream, callback=None):
278
+ self._stream = stream
279
+ self._callback = callback
280
+
281
+ def read(self, *args, **kwargs):
282
+ value = self._stream.read(*args, **kwargs)
283
+ if self._callback is not None:
284
+ self._callback(len(value))
285
+ return value
286
+
287
+
288
+ class OSUtils(object):
289
+ def get_file_size(self, filename):
290
+ return os.path.getsize(filename)
291
+
292
+ def open_file_chunk_reader(self, filename, start_byte, size, callback):
293
+ return ReadFileChunk.from_filename(filename, start_byte,
294
+ size, callback)
295
+
296
+ def open(self, filename, mode):
297
+ return open(filename, mode)
298
+
299
+ def remove_file(self, filename):
300
+ """Remove a file, noop if file does not exist."""
301
+ # Unlike os.remove, if the file does not exist,
302
+ # then this method does nothing.
303
+ try:
304
+ os.remove(filename)
305
+ except OSError:
306
+ pass
307
+
308
+ def rename_file(self, current_filename, new_filename):
309
+ boto3.compat.rename_file(current_filename, new_filename)
310
+
311
+
312
+ class MultipartUploader(object):
313
+ # These are the extra_args that need to be forwarded onto
314
+ # subsequent upload_parts.
315
+ UPLOAD_PART_ARGS = [
316
+ 'SSECustomerKey',
317
+ 'SSECustomerAlgorithm',
318
+ 'SSECustomerKeyMD5',
319
+ 'RequestPayer',
320
+ ]
321
+
322
+ def __init__(self, client, config, osutil,
323
+ executor_cls=futures.ThreadPoolExecutor):
324
+ self._client = client
325
+ self._config = config
326
+ self._os = osutil
327
+ self._executor_cls = executor_cls
328
+
329
+ def _extra_upload_part_args(self, extra_args):
330
+ # Only the args in UPLOAD_PART_ARGS actually need to be passed
331
+ # onto the upload_part calls.
332
+ upload_parts_args = {}
333
+ for key, value in extra_args.items():
334
+ if key in self.UPLOAD_PART_ARGS:
335
+ upload_parts_args[key] = value
336
+ return upload_parts_args
337
+
338
+ def upload_file(self, filename, bucket, key, callback, extra_args):
339
+ response = self._client.create_multipart_upload(Bucket=bucket,
340
+ Key=key, **extra_args)
341
+ upload_id = response['UploadId']
342
+ try:
343
+ parts = self._upload_parts(upload_id, filename, bucket, key,
344
+ callback, extra_args)
345
+ except Exception as e:
346
+ logger.debug("Exception raised while uploading parts, "
347
+ "aborting multipart upload.", exc_info=True)
348
+ self._client.abort_multipart_upload(
349
+ Bucket=bucket, Key=key, UploadId=upload_id)
350
+ raise S3UploadFailedError(
351
+ "Failed to upload %s to %s: %s" % (
352
+ filename, '/'.join([bucket, key]), e))
353
+ self._client.complete_multipart_upload(
354
+ Bucket=bucket, Key=key, UploadId=upload_id,
355
+ MultipartUpload={'Parts': parts})
356
+
357
+ def _upload_parts(self, upload_id, filename, bucket, key, callback,
358
+ extra_args):
359
+ upload_parts_extra_args = self._extra_upload_part_args(extra_args)
360
+ parts = []
361
+ part_size = self._config.multipart_chunksize
362
+ num_parts = int(
363
+ math.ceil(self._os.get_file_size(filename) / float(part_size)))
364
+ max_workers = self._config.max_concurrency
365
+ with self._executor_cls(max_workers=max_workers) as executor:
366
+ upload_partial = functools.partial(
367
+ self._upload_one_part, filename, bucket, key, upload_id,
368
+ part_size, upload_parts_extra_args, callback)
369
+ for part in executor.map(upload_partial, range(1, num_parts + 1)):
370
+ parts.append(part)
371
+ return parts
372
+
373
+ def _upload_one_part(self, filename, bucket, key,
374
+ upload_id, part_size, extra_args,
375
+ callback, part_number):
376
+ open_chunk_reader = self._os.open_file_chunk_reader
377
+ with open_chunk_reader(filename, part_size * (part_number - 1),
378
+ part_size, callback) as body:
379
+ response = self._client.upload_part(
380
+ Bucket=bucket, Key=key,
381
+ UploadId=upload_id, PartNumber=part_number, Body=body,
382
+ **extra_args)
383
+ etag = response['ETag']
384
+ return {'ETag': etag, 'PartNumber': part_number}
385
+
386
+
387
+ class ShutdownQueue(queue.Queue):
388
+ """A queue implementation that can be shutdown.
389
+
390
+ Shutting down a queue means that this class adds a
391
+ trigger_shutdown method that will trigger all subsequent
392
+ calls to put() to fail with a ``QueueShutdownError``.
393
+
394
+ It purposefully deviates from queue.Queue, and is *not* meant
395
+ to be a drop in replacement for ``queue.Queue``.
396
+
397
+ """
398
+ def _init(self, maxsize):
399
+ self._shutdown = False
400
+ self._shutdown_lock = threading.Lock()
401
+ # queue.Queue is an old style class so we don't use super().
402
+ return queue.Queue._init(self, maxsize)
403
+
404
+ def trigger_shutdown(self):
405
+ with self._shutdown_lock:
406
+ self._shutdown = True
407
+ logger.debug("The IO queue is now shutdown.")
408
+
409
+ def put(self, item):
410
+ # Note: this is not sufficient, it's still possible to deadlock!
411
+ # Need to hook into the condition vars used by this class.
412
+ with self._shutdown_lock:
413
+ if self._shutdown:
414
+ raise QueueShutdownError("Cannot put item to queue when "
415
+ "queue has been shutdown.")
416
+ return queue.Queue.put(self, item)
417
+
418
+
419
+ class MultipartDownloader(object):
420
+ def __init__(self, client, config, osutil,
421
+ executor_cls=futures.ThreadPoolExecutor):
422
+ self._client = client
423
+ self._config = config
424
+ self._os = osutil
425
+ self._executor_cls = executor_cls
426
+ self._ioqueue = ShutdownQueue(self._config.max_io_queue)
427
+
428
+ def download_file(self, bucket, key, filename, object_size,
429
+ extra_args, callback=None):
430
+ with self._executor_cls(max_workers=2) as controller:
431
+ # 1 thread for the future that manages the uploading of files
432
+ # 1 thread for the future that manages IO writes.
433
+ download_parts_handler = functools.partial(
434
+ self._download_file_as_future,
435
+ bucket, key, filename, object_size, callback)
436
+ parts_future = controller.submit(download_parts_handler)
437
+
438
+ io_writes_handler = functools.partial(
439
+ self._perform_io_writes, filename)
440
+ io_future = controller.submit(io_writes_handler)
441
+ results = futures.wait([parts_future, io_future],
442
+ return_when=futures.FIRST_EXCEPTION)
443
+ self._process_future_results(results)
444
+
445
+ def _process_future_results(self, futures):
446
+ finished, unfinished = futures
447
+ for future in finished:
448
+ future.result()
449
+
450
+ def _download_file_as_future(self, bucket, key, filename, object_size,
451
+ callback):
452
+ part_size = self._config.multipart_chunksize
453
+ num_parts = int(math.ceil(object_size / float(part_size)))
454
+ max_workers = self._config.max_concurrency
455
+ download_partial = functools.partial(
456
+ self._download_range, bucket, key, filename,
457
+ part_size, num_parts, callback)
458
+ try:
459
+ with self._executor_cls(max_workers=max_workers) as executor:
460
+ list(executor.map(download_partial, range(num_parts)))
461
+ finally:
462
+ self._ioqueue.put(SHUTDOWN_SENTINEL)
463
+
464
+ def _calculate_range_param(self, part_size, part_index, num_parts):
465
+ start_range = part_index * part_size
466
+ if part_index == num_parts - 1:
467
+ end_range = ''
468
+ else:
469
+ end_range = start_range + part_size - 1
470
+ range_param = 'bytes=%s-%s' % (start_range, end_range)
471
+ return range_param
472
+
473
+ def _download_range(self, bucket, key, filename,
474
+ part_size, num_parts, callback, part_index):
475
+ try:
476
+ range_param = self._calculate_range_param(
477
+ part_size, part_index, num_parts)
478
+
479
+ max_attempts = self._config.num_download_attempts
480
+ last_exception = None
481
+ for i in range(max_attempts):
482
+ try:
483
+ logger.debug("Making get_object call.")
484
+ response = self._client.get_object(
485
+ Bucket=bucket, Key=key, Range=range_param)
486
+ streaming_body = StreamReaderProgress(
487
+ response['Body'], callback)
488
+ buffer_size = 1024 * 16
489
+ current_index = part_size * part_index
490
+ for chunk in iter(lambda: streaming_body.read(buffer_size),
491
+ b''):
492
+ self._ioqueue.put((current_index, chunk))
493
+ current_index += len(chunk)
494
+ return
495
+ except (socket.timeout, socket.error,
496
+ ReadTimeoutError, IncompleteReadError) as e:
497
+ logger.debug("Retrying exception caught (%s), "
498
+ "retrying request, (attempt %s / %s)", e, i,
499
+ max_attempts, exc_info=True)
500
+ last_exception = e
501
+ continue
502
+ raise RetriesExceededError(last_exception)
503
+ finally:
504
+ logger.debug("EXITING _download_range for part: %s", part_index)
505
+
506
+ def _perform_io_writes(self, filename):
507
+ with self._os.open(filename, 'wb') as f:
508
+ while True:
509
+ task = self._ioqueue.get()
510
+ if task is SHUTDOWN_SENTINEL:
511
+ logger.debug("Shutdown sentinel received in IO handler, "
512
+ "shutting down IO handler.")
513
+ return
514
+ else:
515
+ try:
516
+ offset, data = task
517
+ f.seek(offset)
518
+ f.write(data)
519
+ except Exception as e:
520
+ logger.debug("Caught exception in IO thread: %s",
521
+ e, exc_info=True)
522
+ self._ioqueue.trigger_shutdown()
523
+ raise
524
+
525
+
526
+ class TransferConfig(object):
527
+ def __init__(self,
528
+ multipart_threshold=8 * MB,
529
+ max_concurrency=10,
530
+ multipart_chunksize=8 * MB,
531
+ num_download_attempts=5,
532
+ max_io_queue=100):
533
+ self.multipart_threshold = multipart_threshold
534
+ self.max_concurrency = max_concurrency
535
+ self.multipart_chunksize = multipart_chunksize
536
+ self.num_download_attempts = num_download_attempts
537
+ self.max_io_queue = max_io_queue
538
+
539
+
540
+ class S3Transfer(object):
541
+
542
+ ALLOWED_DOWNLOAD_ARGS = [
543
+ 'VersionId',
544
+ 'SSECustomerAlgorithm',
545
+ 'SSECustomerKey',
546
+ 'SSECustomerKeyMD5',
547
+ 'RequestPayer',
548
+ ]
549
+
550
+ ALLOWED_UPLOAD_ARGS = [
551
+ 'ACL',
552
+ 'CacheControl',
553
+ 'ContentDisposition',
554
+ 'ContentEncoding',
555
+ 'ContentLanguage',
556
+ 'ContentType',
557
+ 'Expires',
558
+ 'GrantFullControl',
559
+ 'GrantRead',
560
+ 'GrantReadACP',
561
+ 'GrantWriteACL',
562
+ 'Metadata',
563
+ 'RequestPayer',
564
+ 'ServerSideEncryption',
565
+ 'StorageClass',
566
+ 'SSECustomerAlgorithm',
567
+ 'SSECustomerKey',
568
+ 'SSECustomerKeyMD5',
569
+ 'SSEKMSKeyId',
570
+ ]
571
+
572
+ def __init__(self, client, config=None, osutil=None):
573
+ self._client = client
574
+ if config is None:
575
+ config = TransferConfig()
576
+ self._config = config
577
+ if osutil is None:
578
+ osutil = OSUtils()
579
+ self._osutil = osutil
580
+
581
+ def upload_file(self, filename, bucket, key,
582
+ callback=None, extra_args=None):
583
+ if extra_args is None:
584
+ extra_args = {}
585
+ self._validate_all_known_args(extra_args, self.ALLOWED_UPLOAD_ARGS)
586
+ if self._osutil.get_file_size(filename) >= \
587
+ self._config.multipart_threshold:
588
+ self._multipart_upload(filename, bucket, key, callback, extra_args)
589
+ else:
590
+ self._put_object(filename, bucket, key, callback, extra_args)
591
+
592
+ def _put_object(self, filename, bucket, key, callback, extra_args):
593
+ # We're using open_file_chunk_reader so we can take advantage of the
594
+ # progress callback functionality.
595
+ open_chunk_reader = self._osutil.open_file_chunk_reader
596
+ with open_chunk_reader(filename, 0,
597
+ self._osutil.get_file_size(filename),
598
+ callback=callback) as body:
599
+ self._client.put_object(Bucket=bucket, Key=key, Body=body,
600
+ **extra_args)
601
+
602
+ def download_file(self, bucket, key, filename, extra_args=None,
603
+ callback=None):
604
+ """Download an S3 object to a file.
605
+
606
+ This method will issue a ``head_object`` request to determine
607
+ the size of the S3 object. This is used to determine if the
608
+ object is downloaded in parallel.
609
+
610
+ """
611
+ if extra_args is None:
612
+ extra_args = {}
613
+ self._validate_all_known_args(extra_args, self.ALLOWED_DOWNLOAD_ARGS)
614
+ object_size = self._object_size(bucket, key, extra_args)
615
+ temp_filename = filename + os.extsep + random_file_extension()
616
+ try:
617
+ self._download_file(bucket, key, temp_filename, object_size,
618
+ extra_args, callback)
619
+ except Exception:
620
+ logger.debug("Exception caught in download_file, removing partial "
621
+ "file: %s", temp_filename, exc_info=True)
622
+ self._osutil.remove_file(temp_filename)
623
+ raise
624
+ else:
625
+ self._osutil.rename_file(temp_filename, filename)
626
+
627
+ def _download_file(self, bucket, key, filename, object_size,
628
+ extra_args, callback):
629
+ if object_size >= self._config.multipart_threshold:
630
+ self._ranged_download(bucket, key, filename, object_size,
631
+ extra_args, callback)
632
+ else:
633
+ self._get_object(bucket, key, filename, extra_args, callback)
634
+
635
+ def _validate_all_known_args(self, actual, allowed):
636
+ for kwarg in actual:
637
+ if kwarg not in allowed:
638
+ raise ValueError(
639
+ "Invalid extra_args key '%s', "
640
+ "must be one of: %s" % (
641
+ kwarg, ', '.join(allowed)))
642
+
643
+ def _ranged_download(self, bucket, key, filename, object_size,
644
+ extra_args, callback):
645
+ downloader = MultipartDownloader(self._client, self._config,
646
+ self._osutil)
647
+ downloader.download_file(bucket, key, filename, object_size,
648
+ extra_args, callback)
649
+
650
+ def _get_object(self, bucket, key, filename, extra_args, callback):
651
+ # precondition: num_download_attempts > 0
652
+ max_attempts = self._config.num_download_attempts
653
+ last_exception = None
654
+ for i in range(max_attempts):
655
+ try:
656
+ return self._do_get_object(bucket, key, filename,
657
+ extra_args, callback)
658
+ except (socket.timeout, socket.error,
659
+ ReadTimeoutError, IncompleteReadError) as e:
660
+ # TODO: we need a way to reset the callback if the
661
+ # download failed.
662
+ logger.debug("Retrying exception caught (%s), "
663
+ "retrying request, (attempt %s / %s)", e, i,
664
+ max_attempts, exc_info=True)
665
+ last_exception = e
666
+ continue
667
+ raise RetriesExceededError(last_exception)
668
+
669
+ def _do_get_object(self, bucket, key, filename, extra_args, callback):
670
+ response = self._client.get_object(Bucket=bucket, Key=key,
671
+ **extra_args)
672
+ streaming_body = StreamReaderProgress(
673
+ response['Body'], callback)
674
+ with self._osutil.open(filename, 'wb') as f:
675
+ for chunk in iter(lambda: streaming_body.read(8192), b''):
676
+ f.write(chunk)
677
+
678
+ def _object_size(self, bucket, key, extra_args):
679
+ return self._client.head_object(
680
+ Bucket=bucket, Key=key, **extra_args)['ContentLength']
681
+
682
+ def _multipart_upload(self, filename, bucket, key, callback, extra_args):
683
+ uploader = MultipartUploader(self._client, self._config, self._osutil)
684
+ uploader.upload_file(filename, bucket, key, callback, extra_args)
testbed/boto__boto3/boto3/session.py ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+
14
+ import os
15
+
16
+ import botocore.session
17
+
18
+ import boto3
19
+ import boto3.utils
20
+
21
+ from .exceptions import NoVersionFound
22
+ from .resources.factory import ResourceFactory
23
+
24
+
25
+ class Session(object):
26
+ """
27
+ A session stores configuration state and allows you to create service
28
+ clients and resources.
29
+
30
+ :type aws_access_key_id: string
31
+ :param aws_access_key_id: AWS access key ID
32
+ :type aws_secret_access_key: string
33
+ :param aws_secret_access_key: AWS secret access key
34
+ :type aws_session_token: string
35
+ :param aws_session_token: AWS temporary session token
36
+ :type region_name: string
37
+ :param region_name: Default region when creating new connections
38
+ :type botocore_session: botocore.session.Session
39
+ :param botocore_session: Use this Botocore session instead of creating
40
+ a new default one.
41
+ :type profile_name: string
42
+ :param profile_name: The name of a profile to use. If not given, then
43
+ the default profile is used.
44
+ """
45
+ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
46
+ aws_session_token=None, region_name=None,
47
+ botocore_session=None, profile_name=None):
48
+ if botocore_session is not None:
49
+ self._session = botocore_session
50
+ else:
51
+ # Create a new default session
52
+ self._session = botocore.session.Session()
53
+
54
+ # Setup custom user-agent string if it isn't already customized
55
+ if self._session.user_agent_name == 'Botocore':
56
+ botocore_info = 'Botocore/{0}'.format(
57
+ self._session.user_agent_version)
58
+ if self._session.user_agent_extra:
59
+ self._session.user_agent_extra += ' ' + botocore_info
60
+ else:
61
+ self._session.user_agent_extra = botocore_info
62
+ self._session.user_agent_name = 'Boto3'
63
+ self._session.user_agent_version = boto3.__version__
64
+
65
+ if profile_name is not None:
66
+ self._session.profile = profile_name
67
+
68
+ if aws_access_key_id or aws_secret_access_key or aws_session_token:
69
+ self._session.set_credentials(aws_access_key_id,
70
+ aws_secret_access_key, aws_session_token)
71
+
72
+ if region_name is not None:
73
+ self._session.set_config_variable('region', region_name)
74
+
75
+ self.resource_factory = ResourceFactory()
76
+ self._setup_loader()
77
+ self._register_default_handlers()
78
+
79
+ def __repr__(self):
80
+ return 'Session(region={0})'.format(
81
+ repr(self._session.get_config_variable('region')))
82
+
83
+ @property
84
+ def profile_name(self):
85
+ """
86
+ The **read-only** profile name.
87
+ """
88
+ return self._session.profile or 'default'
89
+
90
+ def _setup_loader(self):
91
+ """
92
+ Setup loader paths so that we can load resources.
93
+ """
94
+ self._loader = self._session.get_component('data_loader')
95
+ self._loader.data_path = ':'.join(
96
+ [self._loader.data_path,
97
+ os.path.join(os.path.dirname(__file__), 'data',
98
+ 'resources')]).strip(':')
99
+
100
+ def _get_resource_files(self):
101
+ """
102
+ This generator yields paths to resource files in the loader's
103
+ search paths. Specifically, it looks for files that end with
104
+ ``.resources.json`` in any of the search paths, but does not
105
+ recursively search the paths.
106
+ """
107
+ for path in self._loader.get_search_paths():
108
+ if not os.path.isdir(path) or not os.path.exists(path):
109
+ continue
110
+
111
+ items = os.listdir(path)
112
+ for entry in [i for i in items if i.endswith('.resources.json')]:
113
+ yield entry
114
+
115
+ def _find_latest_version(self, service_name):
116
+ """
117
+ Find the latest resource version of a given service if it exists,
118
+ otherwise raises an exception.
119
+
120
+ TODO: Merge this logic upstream into Botocore if possible. Botocore
121
+ depends on a different directory layout at the moment.
122
+
123
+ :rtype: string
124
+ :return: Version string like 'YYYY-MM-DD'
125
+ :raises: NoVersionFound
126
+ """
127
+ filtered = []
128
+ for path in self._get_resource_files():
129
+ if path.startswith(service_name + '-'):
130
+ filtered.append(path)
131
+
132
+ try:
133
+ # ['s3-2006-03-01.resources.json', ...] => '2006-03-01'
134
+ # Hard coded offsets below pull out just the date string
135
+ start = len(service_name)
136
+ return max([i[start + 1:start + 11] for i in filtered])
137
+ except ValueError:
138
+ raise NoVersionFound(service_name)
139
+
140
+ def get_available_services(self):
141
+ """
142
+ Get a list of available services that can be loaded as low-level
143
+ clients via :py:meth:`Session.client`.
144
+
145
+ :rtype: list
146
+ :return: List of service names
147
+ """
148
+ return self._session.get_available_services()
149
+
150
+ def get_available_resources(self):
151
+ """
152
+ Get a list of available services that can be loaded as resource
153
+ clients via :py:meth:`Session.resource`.
154
+
155
+ :rtype: list
156
+ :return: List of service names
157
+ """
158
+ service_names = set()
159
+
160
+ for path in self._get_resource_files():
161
+ # 'foo-bar-2006-03-01' => 'foo-bar'
162
+ service_names.add('-'.join(path.split('-')[:-3]))
163
+
164
+ return list(service_names)
165
+
166
+ def client(self, service_name, region_name=None, api_version=None,
167
+ use_ssl=True, verify=None, endpoint_url=None,
168
+ aws_access_key_id=None, aws_secret_access_key=None,
169
+ aws_session_token=None):
170
+ """
171
+ Create a low-level service client by name.
172
+
173
+ :type service_name: string
174
+ :param service_name: The name of a service, e.g. 's3' or 'ec2'. You
175
+ can get a list of available services via
176
+ :py:meth:`get_available_services`.
177
+
178
+ :type region_name: string
179
+ :param region_name: The name of the region associated with the client.
180
+ A client is associated with a single region.
181
+
182
+ :type api_version: string
183
+ :param api_version: The API version to use. By default, botocore will
184
+ use the latest API version when creating a client. You only need
185
+ to specify this parameter if you want to use a previous API version
186
+ of the client.
187
+
188
+ :type use_ssl: boolean
189
+ :param use_ssl: Whether or not to use SSL. By default, SSL is used. Note that
190
+ not all services support non-ssl connections.
191
+
192
+ :type verify: boolean/string
193
+ :param verify: Whether or not to verify SSL certificates. By default SSL certificates
194
+ are verified. You can provide the following values:
195
+
196
+ * False - do not validate SSL certificates. SSL will still be
197
+ used (unless use_ssl is False), but SSL certificates
198
+ will not be verified.
199
+ * path/to/cert/bundle.pem - A filename of the CA cert bundle to
200
+ uses. You can specify this argument if you want to use a different
201
+ CA cert bundle than the one used by botocore.
202
+
203
+ :type endpoint_url: string
204
+ :param endpoint_url: The complete URL to use for the constructed client.
205
+ Normally, botocore will automatically construct the appropriate URL
206
+ to use when communicating with a service. You can specify a
207
+ complete URL (including the "http/https" scheme) to override this
208
+ behavior. If this value is provided, then ``use_ssl`` is ignored.
209
+
210
+ :type aws_access_key_id: string
211
+ :param aws_access_key_id: The access key to use when creating
212
+ the client. This is entirely optional, and if not provided,
213
+ the credentials configured for the session will automatically
214
+ be used. You only need to provide this argument if you want
215
+ to override the credentials used for this specific client.
216
+
217
+ :type aws_secret_access_key: string
218
+ :param aws_secret_access_key: The secret key to use when creating
219
+ the client. Same semantics as aws_access_key_id above.
220
+
221
+ :type aws_session_token: string
222
+ :param aws_session_token: The session token to use when creating
223
+ the client. Same semantics as aws_access_key_id above.
224
+
225
+ :return: Service client instance
226
+ """
227
+ return self._session.create_client(
228
+ service_name, region_name=region_name, api_version=api_version,
229
+ use_ssl=use_ssl, verify=verify, endpoint_url=endpoint_url,
230
+ aws_access_key_id=aws_access_key_id,
231
+ aws_secret_access_key=aws_secret_access_key,
232
+ aws_session_token=aws_session_token)
233
+
234
+ def resource(self, service_name, region_name=None, api_version=None,
235
+ use_ssl=True, verify=None, endpoint_url=None,
236
+ aws_access_key_id=None, aws_secret_access_key=None,
237
+ aws_session_token=None):
238
+ """
239
+ Create a resource service client by name.
240
+
241
+ :type service_name: string
242
+ :param service_name: The name of a service, e.g. 's3' or 'ec2'. You
243
+ can get a list of available services via
244
+ :py:meth:`get_available_resources`.
245
+
246
+ :type region_name: string
247
+ :param region_name: The name of the region associated with the client.
248
+ A client is associated with a single region.
249
+
250
+ :type api_version: string
251
+ :param api_version: The API version to use. By default, botocore will
252
+ use the latest API version when creating a client. You only need
253
+ to specify this parameter if you want to use a previous API version
254
+ of the client.
255
+
256
+ :type use_ssl: boolean
257
+ :param use_ssl: Whether or not to use SSL. By default, SSL is used. Note that
258
+ not all services support non-ssl connections.
259
+
260
+ :type verify: boolean/string
261
+ :param verify: Whether or not to verify SSL certificates. By default SSL certificates
262
+ are verified. You can provide the following values:
263
+
264
+ * False - do not validate SSL certificates. SSL will still be
265
+ used (unless use_ssl is False), but SSL certificates
266
+ will not be verified.
267
+ * path/to/cert/bundle.pem - A filename of the CA cert bundle to
268
+ uses. You can specify this argument if you want to use a different
269
+ CA cert bundle than the one used by botocore.
270
+
271
+ :type endpoint_url: string
272
+ :param endpoint_url: The complete URL to use for the constructed client.
273
+ Normally, botocore will automatically construct the appropriate URL
274
+ to use when communicating with a service. You can specify a
275
+ complete URL (including the "http/https" scheme) to override this
276
+ behavior. If this value is provided, then ``use_ssl`` is ignored.
277
+
278
+ :type aws_access_key_id: string
279
+ :param aws_access_key_id: The access key to use when creating
280
+ the client. This is entirely optional, and if not provided,
281
+ the credentials configured for the session will automatically
282
+ be used. You only need to provide this argument if you want
283
+ to override the credentials used for this specific client.
284
+
285
+ :type aws_secret_access_key: string
286
+ :param aws_secret_access_key: The secret key to use when creating
287
+ the client. Same semantics as aws_access_key_id above.
288
+
289
+ :type aws_session_token: string
290
+ :param aws_session_token: The session token to use when creating
291
+ the client. Same semantics as aws_access_key_id above.
292
+
293
+ :return: Subclass of :py:class:`~boto3.resources.base.ServiceResource`
294
+ """
295
+ # Creating a new resource instance requires the low-level client
296
+ # and service model, the resource version and resource JSON data.
297
+ # We pass these to the factory and get back a class, which is
298
+ # instantiated on top of the low-level client.
299
+ client = self.client(
300
+ service_name, region_name=region_name, api_version=api_version,
301
+ use_ssl=use_ssl, verify=verify, endpoint_url=endpoint_url,
302
+ aws_access_key_id=aws_access_key_id,
303
+ aws_secret_access_key=aws_secret_access_key,
304
+ aws_session_token=aws_session_token)
305
+ service_model = self._session.get_service_model(service_name)
306
+ version = self._find_latest_version(service_name)
307
+ model = self._loader.load_data(
308
+ '{0}-{1}.resources'.format(service_name, version))
309
+ cls = self.resource_factory.load_from_definition(
310
+ service_name, service_name, model['service'], model['resources'],
311
+ service_model)
312
+ return cls(client=client)
313
+
314
+ def _register_default_handlers(self):
315
+ self._session.register(
316
+ 'creating-client-class.s3',
317
+ boto3.utils.lazy_call(
318
+ 'boto3.s3.inject.inject_s3_transfer_methods'))
testbed/boto__boto3/docs/source/guide/collections.rst ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _guide_collections:
2
+
3
+ Collections
4
+ ===========
5
+
6
+ Overview
7
+ --------
8
+ A collection provides an iterable interface to a group of resources.
9
+ Collections behave similarly to
10
+ `Django QuerySets <https://docs.djangoproject.com/en/1.7/ref/models/querysets/>`_
11
+ and expose a similar API. A collection seamlessly handles pagination for
12
+ you, making it possible to easily iterate over all items from all pages of
13
+ data. Example of a collection::
14
+
15
+ # SQS list all queues
16
+ sqs = boto3.resource('sqs')
17
+ for queue in sqs.queues.all():
18
+ print(queue.url)
19
+
20
+ When Collections Make Requests
21
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22
+ Collections can be created and manipulated without any request being made
23
+ to the underlying service. A collection makes a remote service request under
24
+ the following conditions:
25
+
26
+ * **Iteration**::
27
+
28
+ for bucket in s3.buckets.all():
29
+ print(bucket.name)
30
+
31
+ * **Conversion to list()**::
32
+
33
+ buckets = list(s3.buckets.all())
34
+
35
+ * **Batch actions (see below)**::
36
+
37
+ s3.Bucket('my-bucket').objects.delete()
38
+
39
+ Filtering
40
+ ---------
41
+ Some collections support extra arguments to filter the returned data set,
42
+ which are passed into the underlying service operation. Use the
43
+ :py:meth:`~boto3.resources.collection.Collection.filter` method to filter
44
+ the results::
45
+
46
+ # S3 list all keys with the prefix '/photos'
47
+ s3 = boto3.resource('s3')
48
+ for bucket in s3.buckets.all():
49
+ for obj in bucket.objects.filter(Prefix='/photos'):
50
+ print('{0}:{1}'.format(bucket.name, obj.key))
51
+
52
+ .. warning::
53
+
54
+ Behind the scenes, the above example will call ``ListBuckets``,
55
+ ``ListObjects``, and ``HeadObject`` many times. If you have a large
56
+ number of S3 objects then this could incur a significant cost.
57
+
58
+ Chainability
59
+ ------------
60
+ Collection methods are chainable. They return copies of the collection
61
+ rather than modifying the collection, including a deep copy of any
62
+ associated operation parameters. For example, this allows you
63
+ to build up multiple collections from a base which they all have
64
+ in common::
65
+
66
+ # EC2 find instances
67
+ ec2 = boto3.resource('ec2')
68
+ base = ec2.instances.filter(InstanceIds=['id1', 'id2', 'id3'])
69
+
70
+ filters = [{
71
+ 'name': 'tenancy',
72
+ 'value': 'dedicated'
73
+ }]
74
+ filtered1 = base.filter(Filters=filters)
75
+
76
+ # Note, this does NOT modify the filters in ``filtered1``!
77
+ filters.append({'name': 'instance-type', 'value': 't1.micro'})
78
+ filtered2 = base.filter(Filters=filters)
79
+
80
+ print('All instances:')
81
+ for instance in base:
82
+ print(instance.id)
83
+
84
+ print('Dedicated instances:')
85
+ for instance in filtered1:
86
+ print(instance.id)
87
+
88
+ print('Dedicated micro instances:')
89
+ for instance in filtered2:
90
+ print(instance.id)
91
+
92
+ Limiting Results
93
+ ----------------
94
+ It is possible to limit the number of items returned from a collection
95
+ by using either the
96
+ :py:meth:`~boto3.resources.collection.ResourceCollection.limit` method or
97
+ keyword argument::
98
+
99
+ # S3 iterate over first ten buckets
100
+ for bucket in s3.buckets.limit(10):
101
+ print(bucket.name)
102
+
103
+ # Keyword argument example
104
+ for bucket in s3.buckets.filter(limit=10):
105
+ print(bucket.name)
106
+
107
+ In both cases, up to 10 items total will be returned. If you do not
108
+ have 10 buckets, then all of your buckets will be returned.
109
+
110
+ Controlling Page Size
111
+ ---------------------
112
+ Collections automatically handle paging through results, but you may want
113
+ to control the number of items returned from a single service operation
114
+ call. You can do so using the
115
+ :py:meth:`~boto3.resources.collection.ResourceCollection.page_size` method
116
+ or keyword argument::
117
+
118
+ # S3 iterate over all objects 100 at a time
119
+ for obj in bucket.objects.page_size(100):
120
+ print(obj.key)
121
+
122
+ # Keyword argument example
123
+ for obj in bucket.objects.all(page_size=100):
124
+ print(obj.key)
125
+
126
+ By default, S3 will return 1000 objects at a time, so the above code
127
+ would let you process the items in smaller batches, which could be
128
+ beneficial for slow or unreliable internet connections.
129
+
130
+ Batch Actions
131
+ -------------
132
+ Some collections support batch actions, which are actions that operate
133
+ on an entire page of results at a time. They will automatically handle
134
+ pagination::
135
+
136
+ # S3 delete everything in `my-bucket`
137
+ s3 = boto3.resource('s3')
138
+ s3.buckets('my-bucket').objects.delete()
139
+
140
+ .. danger::
141
+
142
+ The above example will **completely erase all data** in the ``my-bucket``
143
+ bucket! Please be careful with batch actions.
testbed/boto__boto3/docs/source/guide/configuration.rst ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _guide_configuration:
2
+
3
+ Configuration
4
+ =============
5
+ Boto can be configured in multiple ways. Regardless of the source or sources
6
+ that you choose, you **must** have AWS credentials and a region set in
7
+ order to make requests.
8
+
9
+ Interactive Configuration
10
+ -------------------------
11
+ If you have the `AWS CLI <http://aws.amazon.com/cli/>`_, then you can use
12
+ its interactive ``configure`` command to set up your credentials and
13
+ default region::
14
+
15
+ aws configure
16
+
17
+ Follow the prompts and it will generate configuration files in the
18
+ correct locations for you.
19
+
20
+ Configuration Sources
21
+ ---------------------
22
+ There are multiple sources from which configuration data can be loaded.
23
+ The general order in which they are checked is as follows:
24
+
25
+ 1. Method parameters
26
+ 2. Environment variables
27
+ 3. Configuration files
28
+ 4. EC2 Instance metadata
29
+
30
+ If a configuration value is set in multiple places, then the first
31
+ will be used according the the order above. For example, if I have
32
+ set a default region in both my environment variables and configuration
33
+ file, then the environment variable is used.
34
+
35
+ Available Options
36
+ -----------------
37
+ The available options for various configuration sources are listed below.
38
+
39
+ Method Parameters
40
+ ~~~~~~~~~~~~~~~~~
41
+ When creating a session, client, or resource you can pass in credential
42
+ and configuration options::
43
+
44
+ from boto3.session import Session
45
+
46
+ session = Session(aws_access_key_id='<YOUR ACCESS KEY ID>',
47
+ aws_secret_access_key='<YOUR SECRET KEY>',
48
+ region_name='<REGION NAME>')
49
+
50
+ ec2 = session.resource('ec2')
51
+ ec2_us_west_2 = session.resource('ec2', region_name='us-west-2')
52
+
53
+ # List all of my EC2 instances in my default region.
54
+ print('Default region:')
55
+ for instance in ec2.instances.all():
56
+ print(instance.id)
57
+
58
+ # List all of my EC2 instances in us-west-2.
59
+ print('US West 2 region:')
60
+ for instance in ec2_us_west_2.instances.all():
61
+ print(instance.id)
62
+
63
+ For a list of all options, look at the :py:class:`~boto3.session.Session`
64
+ documentation.
65
+
66
+ Environment Variables
67
+ ~~~~~~~~~~~~~~~~~~~~~
68
+
69
+ ``AWS_ACCESS_KEY_ID``
70
+ The access key for your AWS account.
71
+
72
+ ``AWS_SECRET_ACCESS_KEY``
73
+ The secret key for your AWS account.
74
+
75
+ ``AWS_DEFAULT_REGION``
76
+ The default region to use, e.g. `us-east-1`.
77
+
78
+ ``AWS_PROFILE``
79
+ The default credential and configuration profile to use, if any.
80
+
81
+
82
+ Configuration Files
83
+ ~~~~~~~~~~~~~~~~~~~
84
+ There are two configuration files that Boto checks. The first is the
85
+ shared credential file, which holds only credentials and is shared between
86
+ various SDKs and tools like Boto and the AWS CLI. By default, this
87
+ file is located at ``~/.aws/credentials``::
88
+
89
+ [default]
90
+ # The access key for your AWS account
91
+ aws_access_key_id=<YOUR ACCESS KEY ID>
92
+
93
+ # The secret key for your AWS account
94
+ aws_secret_access_key=<YOUR SECRET KEY>
95
+
96
+ Credentials can also be set for individual profiles::
97
+
98
+ [dev-profile]
99
+ # The access key for your dev-profile account
100
+ aws_access_key_id=<YOUR ACCESS KEY ID>
101
+
102
+ # The secret key for your dev-profile account
103
+ aws_secret_access_key=<YOUR SECRET KEY>
104
+
105
+ The second configuration file stores all settings which are not
106
+ credentials. Its default location is ``~/.aws/config``::
107
+
108
+ [default]
109
+ # The default region when making requests
110
+ region=<REGION NAME>
111
+
112
+ It also supports profiles, but these are prefixed with the word
113
+ ``profile`` because this file supports sections other than profiles::
114
+
115
+ [profile dev-profile]
116
+ # The default region when using the dev-profile account
117
+ region=<REGION NAME>
testbed/boto__boto3/docs/source/guide/migration.rst ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _guide_migration:
2
+
3
+ Migrating from Boto 2.x
4
+ =======================
5
+ Current Boto users can begin using Boto 3 right away. The two modules can
6
+ live side-by-side in the same project, which means that a piecemeal
7
+ approach can be used. New features can be written in Boto 3, or existing
8
+ code can be migrated over as needed, piece by piece.
9
+
10
+ High Level Concepts
11
+ -------------------
12
+ Boto 2.x modules are typically split into two categories, those which include a high-level object-oriented interface and those which include only a low-level interface which matches the underlying Amazon Web Services API. Some modules are completely high-level (like Amazon S3 or EC2), some include high-level code on top of a low-level connection (like Amazon DynamoDB), and others are 100% low-level (like Amazon Elastic Transcoder).
13
+
14
+ In Boto 3 this general low-level and high-level concept hasn't changed much, but there are two important points to understand.
15
+
16
+ Data Driven
17
+ ~~~~~~~~~~~
18
+ First, in Boto 3 classes are created at runtime from JSON data files that describe AWS APIs and organizational structures built atop of them. These data files are loaded at runtime and can be modified and updated without the need of installing an entirely new SDK release.
19
+
20
+ A side effect of having all the services generated from JSON files is that there is now consistency between all AWS service modules. One important change is that *all* API call parameters must now be passed as **keyword arguments**, and these keyword arguments take the form defined by the upstream service. Though there are exceptions, this typically means ``UpperCamelCasing`` parameter names. You will see this in the service-specific migration guides linked to below.
21
+
22
+ Resource Objects
23
+ ~~~~~~~~~~~~~~~~
24
+ Second, while every service now uses the runtime-generated low-level client, some services additionally have high-level generated objects that we refer to as ``Resources``. The lower-level is comparable to Boto 2.x layer 1 connection objects in that they provide a one to one mapping of API operations and return low-level responses. The higher level is comparable to the high-level customizations from Boto 2.x: an S3 ``Key``, an EC2 ``Instance``, and a DynamoDB ``Table`` are all considered resources in Boto 3. Just like a Boto 2.x ``S3Connection``'s ``list_buckets`` will return ``Bucket`` objects, the Boto 3 resource interface provides actions and collections that return resources. Some services may also have hand-written customizations built on top of the runtime-generated high-level resources (such as utilities for working with S3 multipart uploads).
25
+
26
+ ::
27
+
28
+ import boto, boto3
29
+
30
+ # Low-level connections
31
+ conn = boto.connect_elastictranscoder()
32
+ client = boto3.client('elastictranscoder')
33
+
34
+ # High-level connections & resource objects
35
+ from boto.s3.bucket import Bucket
36
+ s3_conn = boto.connect_s3()
37
+ boto2_bucket = Bucket('mybucket')
38
+
39
+ s3 = boto3.resource('s3')
40
+ boto3_bucket = s3.Bucket('mybucket')
41
+
42
+ Installation & Configuration
43
+ ----------------------------
44
+ The :ref:`guide_quickstart` guide provides instructions for installing Boto 3. You can also follow the instructions there to set up new credential files, or you can continue to use your existing Boto 2.x credentials. Please note that Boto 3, the AWS CLI, and several other SDKs all use the shared credentials file (usually at ``~/.aws/credentials``).
45
+
46
+ Once configured, you may begin using Boto 3::
47
+
48
+ import boto3
49
+
50
+ for bucket in boto3.resource('s3').buckets.all():
51
+ print(bucket.name)
52
+
53
+ See the :ref:`guide_tutorial` and `Boto 3 Documentation <http://boto3.readthedocs.org/>`__ for more information.
54
+
55
+ The rest of this document will describe specific common usage scenarios of Boto 2 code and how to accomplish the same tasks with Boto 3.
56
+
57
+ Services
58
+ --------
59
+
60
+ .. toctree::
61
+ :maxdepth: 2
62
+
63
+ migrations3
64
+ migrationec2
testbed/boto__boto3/docs/source/guide/migrationec2.rst ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _guide_migration_ec2:
2
+
3
+ Amazon EC2
4
+ ==========
5
+ Boto 2.x contains a number of customizations to make working with Amazon EC2 instances, storage and networks easy. Boto 3 exposes these same objects through its resources interface in a unified and consistent way.
6
+
7
+ Creating the Connection
8
+ -----------------------
9
+ Boto 3 has both low-level clients and higher-level resources. For Amazon EC2, the higher-level resources are the most similar to Boto 2.x's ``ec2`` and ``vpc`` modules::
10
+
11
+ # Boto 2.x
12
+ import boto
13
+ ec2_connection = boto.connect_ec2()
14
+ vpc_connection = boto.connect_vpc()
15
+
16
+ # Boto 3
17
+ import boto3
18
+ ec2 = boto3.resource('ec2')
19
+
20
+ Launching New Instances
21
+ -----------------------
22
+ Launching new instances requires an image ID and the number of instances to launch. It can also take several optional parameters, such as the instance type and security group::
23
+
24
+ # Boto 2.x
25
+ ec2_connection.run_instances('<ami-image-id>')
26
+
27
+ # Boto 3
28
+ ec2.create_instances(ImageId='<ami-image-id>', MinCount=1, MaxCount=5)
29
+
30
+ Stopping & Terminating Instances
31
+ --------------------------------
32
+ Stopping and terminating multiple instances given a list of instance IDs uses Boto 3 collection filtering::
33
+
34
+ ids = ['instance-id-1', 'instance-id-2', ...]
35
+
36
+ # Boto 2.x
37
+ ec2_connection.stop_instances(instance_ids=ids)
38
+ ec2_connection.terminate_instances(instance_ids=ids)
39
+
40
+ # Boto 3
41
+ ec2.instances.filter(InstanceIds=ids).stop()
42
+ ec2.instances.filter(InstanceIds=ids).terminate()
43
+
44
+ Checking What Instances Are Running
45
+ -----------------------------------
46
+ Boto 3 collections come in handy when listing all your running instances as well. Every collection exposes a ``filter`` method that allows you to pass additional parameters to the underlying service API operation. The EC2 instances collection takes a parameter called ``Filters`` which is a list of names and values, for example::
47
+
48
+ # Boto 2.x
49
+ reservations = ec2_connection.get_all_reservations(
50
+ filters={'instance-state-name': 'running'})
51
+ for reservation in reservations:
52
+ for instance in reservation.instances:
53
+ print(instance.instance_id, instance.instance_type)
54
+
55
+ # Boto 3
56
+ # Use the filter() method of the instances collection to retrieve
57
+ # all running EC2 instances.
58
+ instances = ec2.instances.filter(
59
+ Filters=[{'Name': 'instance-state-name', 'Values': ['running']}])
60
+ for instance in instances:
61
+ print(instance.id, instance.instance_type)
62
+
63
+ Checking Health Status Of Instances
64
+ -----------------------------------
65
+ It is possible to get scheduled maintenance information for your running instances. At the time of this writing Boto 3 does not have a status resource, so you must drop down to the low-level client via ``ec2.meta.client``::
66
+
67
+ # Boto 2.x
68
+ for status in ec2_connection.get_all_instance_statuses():
69
+ print(status)
70
+
71
+ # Boto 3
72
+ for status in ec2.meta.client.describe_instance_status()['InstanceStatuses']:
73
+ print(status)
74
+
75
+ Working with EBS Snapshots
76
+ --------------------------
77
+ Snapshots provide a way to create a copy of an EBS volume, as well as make new volumes from the snapshot which can be attached to an instance::
78
+
79
+ # Boto 2.x
80
+ snapshot = ec2_connection.create_snapshot('volume-id', 'Description')
81
+ volume = snapshot.create_volume('us-west-2')
82
+ ec2_connection.attach_volume(volume.id, 'instance-id', '/dev/sdy')
83
+ ec2_connection.delete_snapshot(snapshot.id)
84
+
85
+ # Boto 3
86
+ snapshot = ec2.create_snapshot(VolumeId='volume-id', Description='description')
87
+ volume = ec2.create_volume(SnapshotId=snapshot.id, AvailabilityZone='us-west-2a')
88
+ ec2.Instance('instance-id').attach_volume(VolumeId=volume.id, Device='/dev/sdy')
89
+ snapshot.delete()
90
+
91
+ Creating a VPC, Subnet, and Gateway
92
+ -----------------------------------
93
+ Creating VPC resources in Boto 3 is very similar to Boto 2.x::
94
+
95
+ # Boto 2.x
96
+ vpc = vpc_connection.create_vpc('10.0.0.0/24')
97
+ subnet = vpc_connection.create_subnet(vpc.id, '10.0.0.0/25')
98
+ gateway = vpc_connection.create_internet_gateway()
99
+
100
+ # Boto 3
101
+ vpc = ec2.create_vpc(CidrBlock='10.0.0.0/24')
102
+ subnet = vpc.create_subnet(CidrBlock='10.0.0.0/25')
103
+ gateway = ec2.create_internet_gateway()
104
+
105
+ Attaching and Detaching an Elastic IP and Gateway
106
+ -------------------------------------------------
107
+ Elastic IPs and gateways provide a way for instances inside of a VPC to communicate with the outside world::
108
+
109
+ # Boto 2.x
110
+ ec2_connection.attach_internet_gateway(gateway.id, vpc.id)
111
+ ec2_connection.detach_internet_gateway(gateway.id, vpc.id)
112
+
113
+ from boto.ec2.address import Address
114
+ address = Address()
115
+ address.allocation_id = 'eipalloc-35cf685d'
116
+ address.associate('i-71b2f60b')
117
+ address.disassociate()
118
+
119
+ # Boto 3
120
+ gateway.attach_to_vpc(VpcId=vpc.id)
121
+ gateway.detach_from_vpc(VpcId=vpc.id)
122
+
123
+ address = ec2.VpcAddress('eipalloc-35cf685d')
124
+ address.associate('i-71b2f60b')
125
+ address.association.delete()
testbed/boto__boto3/docs/source/guide/migrations3.rst ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _guide_migration_s3:
2
+
3
+ Amazon S3
4
+ =========
5
+ Boto 2.x contains a number of customizations to make working with Amazon S3 buckets and keys easy. Boto 3 exposes these same objects through its resources interface in a unified and consistent way.
6
+
7
+ Creating the Connection
8
+ -----------------------
9
+ Boto 3 has both low-level clients and higher-level resources. For Amazon S3, the higher-level resources are the most similar to Boto 2.x's ``s3`` module::
10
+
11
+ # Boto 2.x
12
+ import boto
13
+ s3_connection = boto.connect_s3()
14
+
15
+ # Boto 3
16
+ import boto3
17
+ s3 = boto3.resource('s3')
18
+
19
+ Creating a Bucket
20
+ -----------------
21
+ Creating a bucket in Boto 2 and Boto 3 is very similar, except that in Boto 3 all action parameters must be passed via keyword arguments and a bucket configuration must be specified manually::
22
+
23
+ # Boto 2.x
24
+ s3_connection.create_bucket('mybucket')
25
+ s3_connection.create_bucket('mybucket', location=Location.USWest)
26
+
27
+ # Boto 3
28
+ s3.create_bucket(Bucket='mybucket')
29
+ s3.create_bucket(Bucket='mybucket', CreateBucketConfiguration={
30
+ 'LocationConstraint': 'us-west-1'})
31
+
32
+ Storing Data
33
+ ------------
34
+ Storing data from a file, stream, or string is easy::
35
+
36
+ # Boto 2.x
37
+ from boto.s3.key import Key
38
+ key = Key('hello.txt')
39
+ key.set_contents_from_file('/tmp/hello.txt')
40
+
41
+ # Boto 3
42
+ s3.Key('mybucket', 'hello.txt').put(Body=open('/tmp/hello.txt'))
43
+
44
+
45
+ Accessing a Bucket
46
+ ------------------
47
+ Getting a bucket is easy with Boto 3's resources, however these do not automatically validate whether a bucket exists::
48
+
49
+ # Boto 2.x
50
+ bucket = s3_connection.get_bucket('mybucket', validate=False)
51
+ exists = s3_connection.lookup('mybucket')
52
+
53
+ # Boto 3
54
+ bucket = s3.Bucket('mybucket')
55
+ exists = True
56
+ try:
57
+ s3.meta.client.head_bucket(Bucket='mybucket')
58
+ except ClientError as e:
59
+ # If a client error is thrown, then check that it was a 404 error.
60
+ # If it was a 404 error, then the bucket does not exist.
61
+ error_code = int(e.response['Error']['Code'])
62
+ if error_code == 404:
63
+ exists = False
64
+
65
+ Deleting a Bucket
66
+ -----------------
67
+ All of the keys in a bucket must be deleted before the bucket itself can be deleted::
68
+
69
+ # Boto 2.x
70
+ for key in bucket:
71
+ key.delete()
72
+ bucket.delete()
73
+
74
+ # Boto 3
75
+ for key in bucket.objects.all():
76
+ key.delete()
77
+ bucket.delete()
78
+
79
+ Iteration of Buckets and Keys
80
+ -----------------------------
81
+ Bucket and key objects are no longer iterable, but now provide collection attributes which can be iterated::
82
+
83
+ # Boto 2.x
84
+ for bucket in s3_connection:
85
+ for key in bucket:
86
+ print(key.name)
87
+
88
+ # Boto 3
89
+ for bucket in s3.buckets.all():
90
+ for key in bucket.objects.all():
91
+ print(key.name)
92
+
93
+ Access Controls
94
+ ---------------
95
+ Getting and setting canned access control values in Boto 3 operates on an ``ACL`` resource object::
96
+
97
+ # Boto 2.x
98
+ bucket.set_acl('public-read')
99
+ key.set_acl('public-read')
100
+
101
+ # Boto 3
102
+ bucket.Acl().put(ACL='public-read')
103
+ obj.put(ACL='public-read')
104
+
105
+ It's also possible to retrieve the policy grant information::
106
+
107
+ # Boto 2.x
108
+ acp = bucket.get_acl()
109
+ for grant in acp.acl.grants:
110
+ print(grant.display_name, grant.permission)
111
+
112
+ # Boto 3
113
+ acl = bucket.Acl()
114
+ for grant in acl.grants:
115
+ print(grant['DisplayName'], grant['Permission'])
116
+
117
+ Boto 3 lacks the grant shortcut methods present in Boto 2.x, but it is still fairly simple to add grantees::
118
+
119
+ # Boto 2.x
120
+ bucket.add_email_grant('READ', 'user@domain.tld')
121
+
122
+ # Boto 3
123
+ bucket.Acl.put(GrantRead='emailAddress=user@domain.tld')
124
+
125
+ Key Metadata
126
+ ------------
127
+ It's possible to set arbitrary metadata on keys::
128
+
129
+ # Boto 2.x
130
+ key.set_metadata('meta1', 'This is my metadata value')
131
+ print(key.get_metadata('meta1'))
132
+
133
+ # Boto 3
134
+ key.put(Metadata={'meta1': 'This is my metadata value'})
135
+ print(key.metadata['meta1'])
136
+
137
+ Managing CORS Configuration
138
+ ---------------------------
139
+ Allows you to manage the cross-origin resource sharing configuration for S3 buckets::
140
+
141
+ # Boto 2.x
142
+ cors = bucket.get_cors()
143
+
144
+ config = CORSConfiguration()
145
+ config.add_rule('GET', '*')
146
+ bucket.set_cors(config)
147
+
148
+ bucket.delete_cors()
149
+
150
+ # Boto 3
151
+ cors = bucket.Cors()
152
+
153
+ config = {
154
+ 'CORSRules': [
155
+ {
156
+ 'AllowedMethods': ['GET'],
157
+ 'AllowedOrigins': ['*']
158
+ }
159
+ ]
160
+ }
161
+ cors.put(CORSConfiguration=config)
162
+
163
+ cors.delete()
testbed/boto__boto3/docs/source/guide/resources.rst ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _guide_resources:
2
+
3
+ Resources
4
+ =========
5
+
6
+ Overview
7
+ --------
8
+ Resources represent an object-oriented interface to Amazon Web Services (AWS).
9
+ They provide a higher-level abstraction than the raw, low-level calls made by
10
+ service clients. To use resources, you invoke the
11
+ :py:meth:`~boto3.session.Session.resource` method of a
12
+ :py:class:`~boto3.session.Session` and pass in a service name::
13
+
14
+ # Get resources from the default session
15
+ sqs = boto3.resource('sqs')
16
+ s3 = boto3.resource('s3')
17
+
18
+ Every resource instance has a number of attributes and methods. These can
19
+ conceptually be split up into identifiers, attributes, actions, references,
20
+ sub-resources, and collections. Each of these is described in further detail
21
+ below and in the following section.
22
+
23
+ Resources themselves can also be conceptually split into service resources
24
+ (like ``sqs``, ``s3``, ``ec2``, etc) and individual resources (like
25
+ ``sqs.Queue`` or ``s3.Bucket``). Service resources *do not* have
26
+ identifiers or attributes. The two share the same components otherwise.
27
+
28
+ Identifiers & Attributes
29
+ ------------------------
30
+ An identifier is a unique value that is used to call actions on the resource.
31
+ Resources **must** have at least one identifier, except for the top-level
32
+ service resources (e.g. ``sqs`` or ``s3``). An identifier is set at instance
33
+ creation-time, and failing to provide all necessary identifiers during
34
+ instantiation will result in an exception. Examples of identifiers::
35
+
36
+ # SQS Queue (url is an identifier)
37
+ queue = sqs.Queue(url='http://...')
38
+ print(queue.url)
39
+
40
+ # S3 Object (bucket_name and key are identifiers)
41
+ obj = s3.Object(bucket_name='boto3', key='test.py')
42
+ print(obj.bucket_name)
43
+ print(obj.key)
44
+
45
+ # Raises exception, missing identifier: key!
46
+ obj = s3.Object(bucket_name='boto3')
47
+
48
+ Identifiers may also be passed as positional arguments::
49
+
50
+ # SQS Queue
51
+ queue = sqs.Queue('http://...')
52
+
53
+ # S3 Object
54
+ obj = s3.Object('boto3', 'test.py')
55
+
56
+ # Raises exception, missing key!
57
+ obj = s3.Object('boto3')
58
+
59
+ Identifiers also play a role in resource instance equality. For two
60
+ instances of a resource to be considered equal, their identifiers must
61
+ be equal::
62
+
63
+ >>> bucket1 = s3.Bucket('boto3')
64
+ >>> bucket2 = s3.Bucket('boto3')
65
+ >>> bucket3 = s3.Bucket('some-other-bucket')
66
+
67
+ >>> bucket1 == bucket2
68
+ True
69
+ >>> bucket1 == bucket3
70
+ False
71
+
72
+ .. note::
73
+
74
+ Only identifiers are taken into account for instance equality. Region,
75
+ account ID and other data members are not considered. When using temporary
76
+ credentials or multiple regions in your code please keep this in mind.
77
+
78
+ Resources may also have attributes, which are *lazy-loaded* properties on the
79
+ instance. They may be set at creation time from the response of an action on
80
+ another resource, or they may be set when accessed or via an explicit call to
81
+ the ``load`` or ``reload`` action. Examples of attributes::
82
+
83
+ # SQS Message
84
+ message.body
85
+
86
+ # S3 Object
87
+ obj.last_modified
88
+ obj.md5
89
+
90
+ .. warning::
91
+
92
+ Attributes may incur a load action when first accessed. If latency is
93
+ a concern, then manually calling ``load`` will allow you to control
94
+ exactly when the load action (and thus latency) is invoked. The
95
+ documentation for each resource explicitly lists its attributes.
96
+
97
+ Additionally, attributes may be reloaded after an action has been
98
+ performed on the resource. For example, if the ``last_modified``
99
+ attribute of an S3 object is loaded and then a ``put`` action is
100
+ called, then the next time you access ``last_modified`` it will
101
+ reload the object's metadata.
102
+
103
+ Actions
104
+ -------
105
+ An action is a method which makes a call to the service. Actions may return a
106
+ low-level response, a new resource instance or a list of new resource
107
+ instances. Actions automatically set the resource identifiers as parameters,
108
+ but allow you to pass additional parameters via keyword arguments. Examples
109
+ of actions::
110
+
111
+ # SQS Queue
112
+ messages = queue.receive_messages()
113
+
114
+ # SQS Message
115
+ for message in messages:
116
+ message.delete()
117
+
118
+ # S3 Object
119
+ obj = s3.Object(bucket_name='boto3', key='test.py')
120
+ response = obj.get()
121
+ data = response['Body'].read()
122
+
123
+ Examples of sending additional parameters::
124
+
125
+ # SQS Service
126
+ queue = sqs.get_queue_by_name(QueueName='test')
127
+
128
+ # SQS Queue
129
+ queue.send_message(MessageBody='hello')
130
+
131
+ .. note::
132
+
133
+ Parameters **must** be passed as keyword arguments. They will not work
134
+ as positional arguments.
135
+
136
+ References
137
+ ----------
138
+ A reference is an attribute which may be ``None`` or a related resource
139
+ instance. The resource instance does not share identifiers with its
140
+ reference resource, that is, it is not a strict parent to child relationship.
141
+ In relational terms, these can be considered many-to-one or one-to-one.
142
+ Examples of references::
143
+
144
+ # EC2 Instance
145
+ instance.subnet
146
+ instance.vpc
147
+
148
+ In the above example, an EC2 instance may have exactly one associated
149
+ subnet, and may have exactly one associated VPC. The subnet does not
150
+ require the instance ID to exist, hence it is not a parent to child
151
+ relationship.
152
+
153
+ Sub-resources
154
+ -------------
155
+ A sub-resource is similar to a reference, but is a related class rather than
156
+ an instance. Sub-resources, when instantiated, share identifiers with their
157
+ parent. It is a strict parent-child relationship. In relational terms, these
158
+ can be considered one-to-many. Examples of sub-resources::
159
+
160
+ # SQS
161
+ queue = sqs.Queue(url='...')
162
+ message = queue.Message(receipt_handle='...')
163
+ print(queue.url == message.queue_url)
164
+ print(message.receipt_handle)
165
+
166
+ # S3
167
+ obj = bucket.Object(key='new_file.txt')
168
+ print(obj.bucket_name)
169
+ print(obj.key)
170
+
171
+ Because an SQS message cannot exist without a queue, and an S3 object cannot
172
+ exist without a bucket, these are parent to child relationships.
173
+
174
+ Waiters
175
+ -------
176
+ A waiter is similiar to an action. A waiter will poll the status of a
177
+ resource and suspend execution until the resource reaches the state that is
178
+ being polling for or a failure occurs while polling.
179
+ Waiters automatically set the resource
180
+ identifiers as parameters, but allow you to pass additional parameters via
181
+ keyword arguments. Examples of waiters include::
182
+
183
+ # S3: Wait for a bucket to exist.
184
+ bucket.wait_until_exists()
185
+
186
+ # EC2: Wait for an instance to reach the running state.
187
+ instance.wait_until_running()
188
+
189
+
190
+ Multithreading
191
+ --------------
192
+ It is recommended to create a resource instance for each thread in a multithreaded application rather than sharing a single instance among the threads. For example::
193
+
194
+ import boto3
195
+ import boto3.session
196
+ import threading
197
+
198
+ class MyTask(threading.Thread):
199
+ def run(self):
200
+ session = boto3.session.Session()
201
+ s3 = session.resource('s3')
202
+ # ... do some work with S3 ...
203
+
204
+ In the example above, each thread would have its own Boto 3 session and its own instance of the S3 resource. This is a good idea because resources contain shared data when loaded and calling actions, accessing properties, or manually loading or reloading the resource can modify this data.
testbed/boto__boto3/docs/source/reference/customizations/s3.rst ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _ref_custom_s3:
2
+
3
+ ==========================
4
+ S3 Customization Reference
5
+ ==========================
6
+
7
+ S3 Command Injection
8
+ --------------------
9
+
10
+ .. automodule:: boto3.s3.inject
11
+ :members:
12
+ :undoc-members:
13
+ :inherited-members:
14
+
15
+ S3 Transfers
16
+ ------------
17
+
18
+ .. automodule:: boto3.s3.transfer
19
+ :members:
20
+ :undoc-members:
testbed/boto__botocore/.changes/1.10.33.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``polly``",
4
+ "description": "Update polly client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``ce``",
9
+ "description": "Update ce client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``secretsmanager``",
14
+ "description": "Update secretsmanager client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``shield``",
19
+ "description": "Update shield client to latest version",
20
+ "type": "api-change"
21
+ },
22
+ {
23
+ "category": "``rds``",
24
+ "description": "Update rds client to latest version",
25
+ "type": "api-change"
26
+ }
27
+ ]
testbed/boto__botocore/.changes/1.10.41.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``rekognition``",
4
+ "description": "Update rekognition client to latest version",
5
+ "type": "api-change"
6
+ }
7
+ ]
testbed/boto__botocore/.changes/1.10.47.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``cloudfront``",
4
+ "description": "Update cloudfront client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``comprehend``",
9
+ "description": "Update comprehend client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``codepipeline``",
14
+ "description": "Update codepipeline client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``secretsmanager``",
19
+ "description": "Update secretsmanager client to latest version",
20
+ "type": "api-change"
21
+ },
22
+ {
23
+ "category": "StreamingResponses",
24
+ "description": "Add ``iter_lines()`` and ``iter_chunks()`` to streaming responses (`#1195 <https://github.com/boto/botocore/issues/1195>`__)",
25
+ "type": "enhancement"
26
+ }
27
+ ]
testbed/boto__botocore/.changes/1.10.49.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``ssm``",
4
+ "description": "Update ssm client to latest version",
5
+ "type": "api-change"
6
+ }
7
+ ]
testbed/boto__botocore/.changes/1.10.50.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``ec2``",
4
+ "description": "Update ec2 client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``redshift``",
9
+ "description": "Update redshift client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``acm``",
14
+ "description": "Update acm client to latest version",
15
+ "type": "api-change"
16
+ }
17
+ ]
testbed/boto__botocore/.changes/1.10.51.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``sagemaker``",
4
+ "description": "Update sagemaker client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``pinpoint``",
9
+ "description": "Update pinpoint client to latest version",
10
+ "type": "api-change"
11
+ }
12
+ ]
testbed/boto__botocore/.changes/1.10.55.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``ec2``",
4
+ "description": "Update ec2 client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``codebuild``",
9
+ "description": "Update codebuild client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``glue``",
14
+ "description": "Update glue client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``opsworks``",
19
+ "description": "Update opsworks client to latest version",
20
+ "type": "api-change"
21
+ },
22
+ {
23
+ "category": "``appstream``",
24
+ "description": "Update appstream client to latest version",
25
+ "type": "api-change"
26
+ }
27
+ ]
testbed/boto__botocore/.changes/1.10.56.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``ssm``",
4
+ "description": "Update ssm client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``s3``",
9
+ "description": "Update s3 client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``apigateway``",
14
+ "description": "Update apigateway client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``ce``",
19
+ "description": "Update ce client to latest version",
20
+ "type": "api-change"
21
+ }
22
+ ]
testbed/boto__botocore/.changes/1.10.57.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``iam``",
4
+ "description": "Update iam client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``dlm``",
9
+ "description": "Update dlm client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``appsync``",
14
+ "description": "Update appsync client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``efs``",
19
+ "description": "Update efs client to latest version",
20
+ "type": "api-change"
21
+ },
22
+ {
23
+ "category": "``codebuild``",
24
+ "description": "Update codebuild client to latest version",
25
+ "type": "api-change"
26
+ },
27
+ {
28
+ "category": "``emr``",
29
+ "description": "Update emr client to latest version",
30
+ "type": "api-change"
31
+ }
32
+ ]
testbed/boto__botocore/.changes/1.10.58.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``kinesisvideo``",
4
+ "description": "Update kinesisvideo client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``appstream``",
9
+ "description": "Update appstream client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``kinesis-video-archived-media``",
14
+ "description": "Update kinesis-video-archived-media client to latest version",
15
+ "type": "api-change"
16
+ }
17
+ ]
testbed/boto__botocore/.changes/1.10.59.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``sagemaker``",
4
+ "description": "Update sagemaker client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``polly``",
9
+ "description": "Update polly client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``comprehend``",
14
+ "description": "Update comprehend client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``snowball``",
19
+ "description": "Update snowball client to latest version",
20
+ "type": "api-change"
21
+ }
22
+ ]
testbed/boto__botocore/.changes/1.10.6.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``medialive``",
4
+ "description": "Update medialive client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``firehose``",
9
+ "description": "Update firehose client to latest version",
10
+ "type": "api-change"
11
+ }
12
+ ]
testbed/boto__botocore/.changes/1.10.60.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``iotanalytics``",
4
+ "description": "Update iotanalytics client to latest version",
5
+ "type": "api-change"
6
+ }
7
+ ]
testbed/boto__botocore/.changes/1.10.61.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``mediapackage``",
4
+ "description": "Update mediapackage client to latest version",
5
+ "type": "api-change"
6
+ }
7
+ ]
testbed/boto__botocore/.changes/1.10.62.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``config``",
4
+ "description": "Update config client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``dlm``",
9
+ "description": "Update dlm client to latest version",
10
+ "type": "api-change"
11
+ }
12
+ ]
testbed/boto__botocore/.changes/1.10.65.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``ssm``",
4
+ "description": "Update ssm client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``ec2``",
9
+ "description": "Update ec2 client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``greengrass``",
14
+ "description": "Update greengrass client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``inspector``",
19
+ "description": "Update inspector client to latest version",
20
+ "type": "api-change"
21
+ },
22
+ {
23
+ "category": "``codebuild``",
24
+ "description": "Update codebuild client to latest version",
25
+ "type": "api-change"
26
+ },
27
+ {
28
+ "category": "``redshift``",
29
+ "description": "Update redshift client to latest version",
30
+ "type": "api-change"
31
+ }
32
+ ]
testbed/boto__botocore/.changes/1.10.66.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``directconnect``",
4
+ "description": "Update directconnect client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``glue``",
9
+ "description": "Update glue client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``iot``",
14
+ "description": "Update iot client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``cloudhsmv2``",
19
+ "description": "Update cloudhsmv2 client to latest version",
20
+ "type": "api-change"
21
+ },
22
+ {
23
+ "category": "``sagemaker``",
24
+ "description": "Update sagemaker client to latest version",
25
+ "type": "api-change"
26
+ },
27
+ {
28
+ "category": "``mq``",
29
+ "description": "Update mq client to latest version",
30
+ "type": "api-change"
31
+ },
32
+ {
33
+ "category": "Timestamp Serialization",
34
+ "description": "Support explicit timestamp serialization per timestamp shape.",
35
+ "type": "enhancment"
36
+ },
37
+ {
38
+ "category": "``glacier``",
39
+ "description": "Update glacier client to latest version",
40
+ "type": "api-change"
41
+ }
42
+ ]
testbed/boto__botocore/.changes/1.10.67.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``kms``",
4
+ "description": "Update kms client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``mediaconvert``",
9
+ "description": "Update mediaconvert client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``es``",
14
+ "description": "Update es client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``iot``",
19
+ "description": "Update iot client to latest version",
20
+ "type": "api-change"
21
+ },
22
+ {
23
+ "category": "``connect``",
24
+ "description": "Update connect client to latest version",
25
+ "type": "api-change"
26
+ }
27
+ ]
testbed/boto__botocore/.changes/1.10.68.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``storagegateway``",
4
+ "description": "Update storagegateway client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``transcribe``",
9
+ "description": "Update transcribe client to latest version",
10
+ "type": "api-change"
11
+ }
12
+ ]
testbed/boto__botocore/.changes/1.10.69.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``polly``",
4
+ "description": "Update polly client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``ssm``",
9
+ "description": "Update ssm client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``kinesis``",
14
+ "description": "Update kinesis client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``resource-groups``",
19
+ "description": "Update resource-groups client to latest version",
20
+ "type": "api-change"
21
+ }
22
+ ]
testbed/boto__botocore/.changes/1.10.7.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``iotanalytics``",
4
+ "description": "Update iotanalytics client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``iot``",
9
+ "description": "Update iot client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``autoscaling-plans``",
14
+ "description": "Update autoscaling-plans client to latest version",
15
+ "type": "api-change"
16
+ }
17
+ ]
testbed/boto__botocore/.changes/1.10.70.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``alexaforbusiness``",
4
+ "description": "Update alexaforbusiness client to latest version",
5
+ "type": "api-change"
6
+ }
7
+ ]
testbed/boto__botocore/.changes/1.10.71.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``health``",
4
+ "description": "Update health client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``dynamodb``",
9
+ "description": "Update dynamodb client to latest version",
10
+ "type": "api-change"
11
+ }
12
+ ]
testbed/boto__botocore/.changes/1.10.72.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``logs``",
4
+ "description": "Update logs client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``codebuild``",
9
+ "description": "Update codebuild client to latest version",
10
+ "type": "api-change"
11
+ },
12
+ {
13
+ "category": "``ssm``",
14
+ "description": "Update ssm client to latest version",
15
+ "type": "api-change"
16
+ },
17
+ {
18
+ "category": "``ec2``",
19
+ "description": "Update ec2 client to latest version",
20
+ "type": "api-change"
21
+ },
22
+ {
23
+ "category": "``pinpoint``",
24
+ "description": "Update pinpoint client to latest version",
25
+ "type": "api-change"
26
+ }
27
+ ]
testbed/boto__botocore/.changes/1.10.73.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "category": "``secretsmanager``",
4
+ "description": "Update secretsmanager client to latest version",
5
+ "type": "api-change"
6
+ },
7
+ {
8
+ "category": "``ssm``",
9
+ "description": "Update ssm client to latest version",
10
+ "type": "api-change"
11
+ }
12
+ ]