diff --git a/.editorconfig b/.editorconfig
index 831bb8696cc..3701d80b453 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -2,7 +2,7 @@
root = true
[*.go]
-indent_style = tabs
+indent_style = tab
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
diff --git a/.floo b/.floo
new file mode 100644
index 00000000000..1c2038f98cc
--- /dev/null
+++ b/.floo
@@ -0,0 +1,3 @@
+{
+ "url": "https://floobits.com/raintank/grafana"
+}
diff --git a/.flooignore b/.flooignore
new file mode 100644
index 00000000000..43cddf93bdf
--- /dev/null
+++ b/.flooignore
@@ -0,0 +1,12 @@
+#*
+*.o
+*.pyc
+*.pyo
+*~
+extern/
+node_modules/
+tmp/
+data/
+vendor/
+public_gen/
+dist/
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index e79741bbe6c..fe0a1d6c548 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -12,11 +12,11 @@ grunt karma:dev
### Run tests for backend assets before commit
```
-test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
+test -z "$(gofmt -s -l . | grep -v -E 'vendor/(github.com|golang.org|gopkg.in)' | tee /dev/stderr)"
```
### Run tests for frontend assets before commit
```
-grunt test
-godep go test -v ./pkg/...
+npm test
+go test -v ./pkg/...
```
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 61f039fe615..98f6b6fe928 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,12 +1,18 @@
-Thank you! For helping us make Grafana even better.
+Please prefix your title with [Bug] or [Feature request]
+For question please check [Support Options](http://grafana.org/support/). **Do not** open a github issue
-To help us respond to your issues faster, please make sure to add as much information as possible.
+Please include this information:
+- What Grafana version are you using?
+- What datasource are you using?
+- What OS are you running grafana on?
+- What did you do?
+- What was the expected result?
+- What happened instead?
-If this issue is about a plugin, please open the issue in that repository.
+**IMPORTANT**
+If it relates to *metric data viz*:
+- An image or text representation of your metric query
+- The raw query and response for the network request (check this in chrome dev tools network tab, here you can see metric requests and other request, please include the request body and request response)
-Start your issues title with [Feature Request] / [Bug] / [Question] or no tag if your unsure.
-
-Ex
-* What grafana version are you using?
-* What datasource are you using?
-* What OS are you running grafana on?
+If it relates to *alerting*
+- An image of the test execution data fully expanded.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 9eacff7c5de..4b4588eab21 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,2 +1,4 @@
* Link the PR to an issue for new features
-* Rebase your PR if it gets out of sync with master
\ No newline at end of file
+* Rebase your PR if it gets out of sync with master
+
+**REMOVE THE TEXT ABOVE BEFORE CREATING THE PULL REQUEST**
diff --git a/.gitignore b/.gitignore
index 515c19e7e0b..721a2a71ad4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@ public/css/*.min.css
*.swp
.idea/
*.iml
+.vscode/
/data/*
/bin/*
@@ -37,4 +38,4 @@ profile.cov
.notouch
/pkg/cmd/grafana-cli/grafana-cli
/pkg/cmd/grafana-server/grafana-server
-/examples/*/dist
\ No newline at end of file
+/examples/*/dist
diff --git a/.hooks/pre-commit b/.hooks/pre-commit
index 2519d4c44f4..0d7c6c9ee5f 100755
--- a/.hooks/pre-commit
+++ b/.hooks/pre-commit
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
+test -z "$(gofmt -s -l . | grep -v vendor/src/ | tee /dev/stderr)"
if [ $? -gt 0 ]; then
echo "Some files aren't formatted, please run 'go fmt ./pkg/...' to format your source code before committing"
exit 1
diff --git a/.jscs.json b/.jscs.json
index dcf694dcc63..8fdad332de5 100644
--- a/.jscs.json
+++ b/.jscs.json
@@ -10,4 +10,4 @@
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"validateIndentation": 2
-}
\ No newline at end of file
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9959767c087..1e9e7849c01 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,307 @@
-# 3.0.0 (unrelased master branch)
+# 4.2.0 (unreleased)
+
+## Enhancements
+* **Alerting**: Added Telegram alert notifier [#7098](https://github.com/grafana/grafana/pull/7098), thx [@leonoff](https://github.com/leonoff)
+
+# 4.1.0 (unreleased)
+
+### Bugfixes
+* **Server side PNG rendering**: Fixed issue with y-axis label rotation in phantomjs rendered images [#6924](https://github.com/grafana/grafana/issues/6924)
+* **Graph**: Fixed centering of y-axis label [#7099](https://github.com/grafana/grafana/issues/7099)
+* **Graph**: Fixed graph legend table mode and always visible scrollbar [#6828](https://github.com/grafana/grafana/issues/6828)
+* **Templating**: Fixed template variable value groups/tags feature [#6752](https://github.com/grafana/grafana/issues/6752)
+
+## Enhancements
+* **Elasticsearch**: Added support for all moving average options [#7154](https://github.com/grafana/grafana/pull/7154), thx [@vaibhavinbayarea](https://github.com/vaibhavinbayarea)
+
+# 4.1-beta1 (2016-12-21)
+
+### Enhancements
+* **Postgres**: Add support for Certs for Postgres database [#6655](https://github.com/grafana/grafana/issues/6655)
+* **Victorops**: Add VictorOps notification integration [#6411](https://github.com/grafana/grafana/issues/6411), thx [@ichekrygin](https://github.com/ichekrygin)
+* **Opsgenie**: Add OpsGenie notification integratiion [#6687](https://github.com/grafana/grafana/issues/6687), thx [@kylemcc](https://github.com/kylemcc)
+* **Singlestat**: New aggregation on singlestat panel [#6740](https://github.com/grafana/grafana/pull/6740), thx [@dirk-leroux](https://github.com/dirk-leroux)
+* **Cloudwatch**: Make it possible to specify access and secret key on the data source config page [#6697](https://github.com/grafana/grafana/issues/6697)
+* **Table**: Added Hidden Column Style for Table Panel [#5677](https://github.com/grafana/grafana/pull/5677), thx [@bmundt](https://github.com/bmundt)
+* **Graph**: Shared crosshair option renamed to shared tooltip, shows tooltip on all graphs as you hover over one graph. [#1578](https://github.com/grafana/grafana/pull/1578), [#6274](https://github.com/grafana/grafana/pull/6274)
+* **Elasticsearch**: Added support for Missing option (bucket) for terms aggregation [#4244](https://github.com/grafana/grafana/pull/4244), thx [@shanielh](https://github.com/shanielh)
+* **Elasticsearch**: Added support for Elasticsearch 5.x [#5740](https://github.com/grafana/grafana/issues/5740), thx [@lpic10](https://github.com/lpic10)
+* **CLI**: Make it possible to reset the admin password using the grafana-cli. [#5479](https://github.com/grafana/grafana/issues/5479)
+* **Influxdb**: Support multiple tags in InfluxDB annotations. [#4550](https://github.com/grafana/grafana/pull/4550), thx [@adrianlzt](https://github.com/adrianlzt)
+* **LDAP**: Basic Auth now supports LDAP username and password, [#6940](https://github.com/grafana/grafana/pull/6940), thx [@utkarshcmu](https://github.com/utkarshcmu)
+* **LDAP**: Now works with Auth Proxy, role and organisation mapping & sync will regularly be performed. [#6895](https://github.com/grafana/grafana/pull/6895), thx [@Seuf](https://github.com/seuf)
+* **Alerting**: Adds OK as no data option. [#6866](https://github.com/grafana/grafana/issues/6866)
+* **Alert list**: Order alerts based on state. [#6676](https://github.com/grafana/grafana/issues/6676)
+* **Alerting**: Add api endpoint for pausing all alerts. [#6589](https://github.com/grafana/grafana/issues/6589)
+* **Panel**: Added help text for panels. [#4079](https://github.com/grafana/grafana/issues/4079), thx [@utkarshcmu](https://github.com/utkarshcmu)
+
+### Bugfixes
+* **API**: HTTP API for deleting org returning incorrect message for a non-existing org [#6679](https://github.com/grafana/grafana/issues/6679)
+* **Dashboard**: Posting empty dashboard result in corrupted dashboard [#5443](https://github.com/grafana/grafana/issues/5443)
+* **Logging**: Fixed logging level confing issue [#6978](https://github.com/grafana/grafana/issues/6978)
+* **Notifications**: Remove html escaping the email subject. [#6905](https://github.com/grafana/grafana/issues/6905)
+* **Influxdb**: Fixes broken field dropdown when using template vars as measurement. [#6473](https://github.com/grafana/grafana/issues/6473)
+
+# 4.0.3 (unreleased)
+
+### Bugfixes
+* **Influxdb**: Handles time(auto) the same way as time($interval) [#6997](https://github.com/grafana/grafana/issues/6997)
+
+# 4.0.2 (2016-12-08)
+
+### Enhancements
+* **Playlist**: Add support for kiosk mode [#6727](https://github.com/grafana/grafana/issues/6727)
+
+### Bugfixes
+* **Alerting**: Add alert message to webhook notifications [#6807](https://github.com/grafana/grafana/issues/6807)
+* **Alerting**: Fixes a bug where avg() reducer treated null as zero. [#6879](https://github.com/grafana/grafana/issues/6879)
+* **PNG Rendering**: Fix for server side rendering when using non default http addr bind and domain setting [#6813](https://github.com/grafana/grafana/issues/6813)
+* **PNG Rendering**: Fix for server side rendering when setting enforce_domain to true [#6769](https://github.com/grafana/grafana/issues/6769)
+* **Webhooks**: Add content type json to outgoing webhooks [#6822](https://github.com/grafana/grafana/issues/6822)
+* **Keyboard shortcut**: Fixed zoom out shortcut [#6837](https://github.com/grafana/grafana/issues/6837)
+* **Webdav**: Adds basic auth headers to webdav uploader [#6779](https://github.com/grafana/grafana/issues/6779)
+
+# 4.0.1 (2016-12-02)
+
+> **Notice**
+4.0.0 had serious connection pooling issue when using a data source in proxy access. This bug caused lots of resource issues
+due to too many connections/file handles on the data source backend. This problem is fixed in this release.
+
+### Bugfixes
+* **Metrics**: Fixes nil pointer dereference on my arm build [#6749](https://github.com/grafana/grafana/issues/6749)
+* **Data proxy**: Fixes a tcp pooling issue in the datasource reverse proxy [#6759](https://github.com/grafana/grafana/issues/6759)
+
+# 4.0-stable (2016-11-29)
+
+### Bugfixes
+* **Server-side rendering**: Fixed address used when rendering panel via phantomjs and using non default http_addr config [#6660](https://github.com/grafana/grafana/issues/6660)
+* **Graph panel**: Fixed graph panel tooltip sort order issue [#6648](https://github.com/grafana/grafana/issues/6648)
+* **Unsaved changes**: You now navigate to the intended page after saving in the unsaved changes dialog [#6675](https://github.com/grafana/grafana/issues/6675)
+* **TLS Client Auth**: Support for TLS client authentication for datasource proxies [#2316](https://github.com/grafana/grafana/issues/2316)
+* **Alerts out of sync**: Saving dashboards with broken alerts causes sync problem[#6576](https://github.com/grafana/grafana/issues/6576)
+* **Alerting**: Saving an alert with condition "HAS NO DATA" throws an error[#6701](https://github.com/grafana/grafana/issues/6701)
+* **Config**: Improve error message when parsing broken config file [#6731](https://github.com/grafana/grafana/issues/6731)
+* **Table**: Render empty dates as - instead of current date [#6728](https://github.com/grafana/grafana/issues/6728)
+
+# 4.0-beta2 (2016-11-21)
+
+### Bugfixes
+* **Graph Panel**: Log base scale on right Y-axis had no effect, max value calc was not applied, [#6534](https://github.com/grafana/grafana/issues/6534)
+* **Graph Panel**: Bar width if bars was only used in series override, [#6528](https://github.com/grafana/grafana/issues/6528)
+* **UI/Browser**: Fixed issue with page/view header gradient border not showing in Safari, [#6530](https://github.com/grafana/grafana/issues/6530)
+* **Cloudwatch**: Fixed cloudwatch datasource requesting to many datapoints, [#6544](https://github.com/grafana/grafana/issues/6544)
+* **UX**: Panel Drop zone visible after duplicating panel, and when entering fullscreen/edit view, [#6598](https://github.com/grafana/grafana/issues/6598)
+* **Templating**: Newly added variable was not visible directly only after dashboard reload, [#6622](https://github.com/grafana/grafana/issues/6622)
+
+### Enhancements
+* **Singlestat**: Support repeated template variables in prefix/postfix [#6595](https://github.com/grafana/grafana/issues/6595)
+* **Templating**: Don't persist variable options with refresh option [#6586](https://github.com/grafana/grafana/issues/6586)
+* **Alerting**: Add ability to have OR conditions (and mixing AND & OR) [#6579](https://github.com/grafana/grafana/issues/6579)
+* **InfluxDB**: Fix for Ad-Hoc Filters variable & changing dashboards [#6821](https://github.com/grafana/grafana/issues/6821)
+
+# 4.0-beta1 (2016-11-09)
+
+### Enhancements
+* **Login**: Adds option to disable username/password logins, closes [#4674](https://github.com/grafana/grafana/issues/4674)
+* **SingleStat**: Add seriename as option in singlestat panel, closes [#4740](https://github.com/grafana/grafana/issues/4740)
+* **Localization**: Week start day now dependant on browser locale setting, closes [#3003](https://github.com/grafana/grafana/issues/3003)
+* **Templating**: Update panel repeats for variables that change on time refresh, closes [#5021](https://github.com/grafana/grafana/issues/5021)
+* **Templating**: Add support for numeric and alphabetical sorting of variable values, closes [#2839](https://github.com/grafana/grafana/issues/2839)
+* **Elasticsearch**: Support to set Precision Threshold for Unique Count metric, closes [#4689](https://github.com/grafana/grafana/issues/4689)
+* **Navigation**: Add search to org swithcer, closes [#2609](https://github.com/grafana/grafana/issues/2609)
+* **Database**: Allow database config using one propertie, closes [#5456](https://github.com/grafana/grafana/pull/5456)
+* **Graphite**: Add support for groupByNodes, closes [#5613](https://github.com/grafana/grafana/pull/5613)
+* **Influxdb**: Add support for elapsed(), closes [#5827](https://github.com/grafana/grafana/pull/5827)
+* **OpenTSDB**: Add support for explicitTags for OpenTSDB>=2.3, closes [#6360](https://github.com/grafana/grafana/pull/6361)
+* **OAuth**: Add support for generic oauth, closes [#4718](https://github.com/grafana/grafana/pull/4718)
+* **Cloudwatch**: Add support to expand multi select template variable, closes [#5003](https://github.com/grafana/grafana/pull/5003)
+* **Background Tasks**: Now support automatic purging of old snapshots, closes [#4087](https://github.com/grafana/grafana/issues/4087)
+* **Background Tasks**: Now support automatic purging of old rendered images, closes [#2172](https://github.com/grafana/grafana/issues/2172)
+* **Dashboard**: After inactivity hide nav/row actions, fade to nice clean view, can be toggled with `d v`, also added kiosk mode, toggled via `d k` [#6476](https://github.com/grafana/grafana/issues/6476)
+* **Dashboard**: Improved dashboard row menu & add panel UX [#6442](https://github.com/grafana/grafana/issues/6442)
+* **Graph Panel**: Support for stacking null values [#2912](https://github.com/grafana/grafana/issues/2912), [#6287](https://github.com/grafana/grafana/issues/6287), thanks @benrubson!
+
+### Breaking changes
+* **SystemD**: Change systemd description, closes [#5971](https://github.com/grafana/grafana/pull/5971)
+* **lodash upgrade**: Upgraded lodash from 2.4.2 to 4.15.0, this contains a number of breaking changes that could effect plugins. closes [#6021](https://github.com/grafana/grafana/pull/6021)
+
+### Bug fixes
+* **Table Panel**: Fixed problem when switching to Mixed datasource in metrics tab, fixes [#5999](https://github.com/grafana/grafana/pull/5999)
+* **Playlist**: Fixed problem with play order not matching order defined in playlist, fixes [#5467](https://github.com/grafana/grafana/pull/5467)
+* **Graph panel**: Fixed problem with auto decimals on y axis when datamin=datamax, fixes [#6070](https://github.com/grafana/grafana/pull/6070)
+* **Snapshot**: Can view embedded panels/png rendered panels in snapshots without login, fixes [#3769](https://github.com/grafana/grafana/pull/3769)
+* **Elasticsearch**: Fix for query template variable when looking up terms without query, no longer relies on elasticsearch default field, fixes [#3887](https://github.com/grafana/grafana/pull/3887)
+* **Elasticsearch**: Fix for displaying IP address used in terms aggregations, fixes [#4393](https://github.com/grafana/grafana/pull/4393)
+* **PNG Rendering**: Fix for server side rendering when using auth proxy, fixes [#5906](https://github.com/grafana/grafana/pull/5906)
+* **OpenTSDB**: Fixed multi-value nested templating for opentsdb, fixes [#6455](https://github.com/grafana/grafana/pull/6455)
+* **Playlist**: Remove playlist items when dashboard is removed, fixes [#6292](https://github.com/grafana/grafana/issues/6292)
+
+# 3.1.2 (unreleased)
+* **Templating**: Fixed issue when combining row & panel repeats, fixes [#5790](https://github.com/grafana/grafana/issues/5790)
+* **Drag&Drop**: Fixed issue with drag and drop in latest Chrome(51+), fixes [#5767](https://github.com/grafana/grafana/issues/5767)
+* **Internal Metrics**: Fixed issue with dots in instance_name when sending internal metrics to Graphite, fixes [#5739](https://github.com/grafana/grafana/issues/5739)
+* **Grafana-CLI**: Add default plugin path for MAC OS, fixes [#5806](https://github.com/grafana/grafana/issues/5806)
+* **Grafana-CLI**: Improve error message for upgrade-all command, fixes [#5885](https://github.com/grafana/grafana/issues/5885)
+
+# 3.1.1 (2016-08-01)
+* **IFrame embedding**: Fixed issue of using full iframe height, fixes [#5605](https://github.com/grafana/grafana/issues/5606)
+* **Panel PNG rendering**: Fixed issue detecting render completion, fixes [#5605](https://github.com/grafana/grafana/issues/5606)
+* **Elasticsearch**: Fixed issue with templating query and json parse error, fixes [#5615](https://github.com/grafana/grafana/issues/5615)
+* **Tech**: Upgraded JQuery to 2.2.4 to fix Security vulnerabilitie in 2.1.4, fixes [#5627](https://github.com/grafana/grafana/issues/5627)
+* **Graphite**: Fixed issue with mixed data sources and Graphite, fixes [#5617](https://github.com/grafana/grafana/issues/5617)
+* **Templating**: Fixed issue with template variable query was issued multiple times during dashboard load, fixes [#5637](https://github.com/grafana/grafana/issues/5637)
+* **Zoom**: Fixed issues with zoom in and out on embedded (iframed) panel, fixes [#4489](https://github.com/grafana/grafana/issues/4489), [#5666](https://github.com/grafana/grafana/issues/5666)
+
+# 3.1.0 stable (2016-07-12)
+
+### Bugfixes & Enhancements,
+* **User Alert Notices**: Backend error alert popups did not show properly, fixes [#5435](https://github.com/grafana/grafana/issues/5435)
+* **Table**: Added sanitize HTML option to allow links in table cells, fixes [#4596](https://github.com/grafana/grafana/issues/4596)
+* **Apps**: App dashboards are automatically synced to DB at startup after plugin update, fixes [#5529](https://github.com/grafana/grafana/issues/5529)
+
+# 3.1.0-beta1 (2016-06-23)
+
+### Enhancements
+* **Dashboard Export/Import**: Dashboard export now templetize data sources and constant variables, users pick these on import, closes [#5084](https://github.com/grafana/grafana/issues/5084)
+* **Dashboard Url**: Time range changes updates url, closes [#458](https://github.com/grafana/grafana/issues/458)
+* **Dashboard Url**: Template variable change updates url, closes [#5002](https://github.com/grafana/grafana/issues/5002)
+* **Singlestat**: Add support for range to text mappings, closes [#1319](https://github.com/grafana/grafana/issues/1319)
+* **Graph**: Adds sort order options for graph tooltip, closes [#1189](https://github.com/grafana/grafana/issues/1189)
+* **Theme**: Add default theme to config file [#5011](https://github.com/grafana/grafana/pull/5011)
+* **Page Footer**: Added page footer with links to docs, shows Grafana version and info if new version is available, closes [#4889](https://github.com/grafana/grafana/pull/4889)
+* **InfluxDB**: Add spread function, closes [#5211](https://github.com/grafana/grafana/issues/5211)
+* **Scripts**: Use restart instead of start for deb package script, closes [#5282](https://github.com/grafana/grafana/pull/5282)
+* **Logging**: Moved to structured logging lib, and moved to component specific level filters via config file, closes [#4590](https://github.com/grafana/grafana/issues/4590)
+* **OpenTSDB**: Support nested template variables in tag_values function, closes [#4398](https://github.com/grafana/grafana/issues/4398)
+* **Datasource**: Pending data source requests are cancelled before new ones are issues (Graphite & Prometheus), closes [#5321](https://github.com/grafana/grafana/issues/5321)
+
+### Breaking changes
+* **Logging** : Changed default logging output format (now structured into message, and key value pairs, with logger key acting as component). You can also no change in config to json log ouput.
+* **Graphite** : The Graph panel no longer have a Graphite PNG option. closes [#5367](https://github.com/grafana/grafana/issues/5367)
+
+### Bug fixes
+* **PNG rendering**: Fixed phantomjs rendering and y-axis label rotation. fixes [#5220](https://github.com/grafana/grafana/issues/5220)
+* **CLI**: The cli tool now supports reading plugin.json from dist/plugin.json. fixes [#5410](https://github.com/grafana/grafana/issues/5410)
+
+# 3.0.4 Patch release (2016-05-25)
+* **Panel**: Fixed blank dashboard issue when switching to other dashboard while in fullscreen edit mode, fixes [#5163](https://github.com/grafana/grafana/pull/5163)
+* **Templating**: Fixed issue with nested multi select variables and cascading and updating child variable selection state, fixes [#4861](https://github.com/grafana/grafana/pull/4861)
+* **Templating**: Fixed issue with using templated data source in another template variable query, fixes [#5165](https://github.com/grafana/grafana/pull/5165)
+* **Singlestat gauge**: Fixed issue with gauge render position, fixes [#5143](https://github.com/grafana/grafana/pull/5143)
+* **Home dashboard**: Fixes broken home dashboard api, fixes [#5167](https://github.com/grafana/grafana/issues/5167)
+
+# 3.0.3 Patch release (2016-05-23)
+* **Annotations**: Annotations can now use a template variable as data source, closes [#5054](https://github.com/grafana/grafana/issues/5054)
+* **Time picker**: Fixed issue timepicker and UTC when reading time from URL, fixes [#5078](https://github.com/grafana/grafana/issues/5078)
+* **CloudWatch**: Support for Multiple Account by AssumeRole, closes [#3522](https://github.com/grafana/grafana/issues/3522)
+* **Singlestat**: Fixed alignment and minium height issue, fixes [#5113](https://github.com/grafana/grafana/issues/5113), fixes [#4679](https://github.com/grafana/grafana/issues/4679)
+* **Share modal**: Fixed link when using grafana under dashboard sub url, fixes [#5109](https://github.com/grafana/grafana/issues/5109)
+* **Prometheus**: Fixed bug in query editor that caused it not to load when reloading page, fixes [#5107](https://github.com/grafana/grafana/issues/5107)
+* **Elasticsearch**: Fixed bug when template variable query returns numeric values, fixes [#5097](https://github.com/grafana/grafana/issues/5097), fixes [#5088](https://github.com/grafana/grafana/issues/5088)
+* **Logging**: Fixed issue with reading logging level value, fixes [#5079](https://github.com/grafana/grafana/issues/5079)
+* **Timepicker**: Fixed issue with timepicker and UTC when reading time from URL, fixes [#5078](https://github.com/grafana/grafana/issues/5078)
+* **Docs**: Added docs for org & user preferences HTTP API, closes [#5069](https://github.com/grafana/grafana/issues/5069)
+* **Plugin list panel**: Now shows correct enable state for apps when not enabled, fixes [#5068](https://github.com/grafana/grafana/issues/5068)
+* **Elasticsearch**: Templating & Annotation queries that use template variables are now formatted correctly, fixes [#5135](https://github.com/grafana/grafana/issues/5135)
+
+# 3.0.2 Patch release (2016-05-16)
+
+* **Templating**: Fixed issue mixing row repeat and panel repeats, fixes [#4988](https://github.com/grafana/grafana/issues/4988)
+* **Templating**: Fixed issue detecting dependencies in nested variables, fixes [#4987](https://github.com/grafana/grafana/issues/4987), fixes [#4986](https://github.com/grafana/grafana/issues/4986)
+* **Graph**: Fixed broken PNG rendering in graph panel, fixes [#5025](https://github.com/grafana/grafana/issues/5025)
+* **Graph**: Fixed broken xaxis on graph panel, fixes [#5024](https://github.com/grafana/grafana/issues/5024)
+
+* **Influxdb**: Fixes crash when hiding middle serie, fixes [#5005](https://github.com/grafana/grafana/issues/5005)
+
+# 3.0.1 Stable (2016-05-11)
+
+### Bug fixes
+* **Templating**: Fixed issue with new data source variable not persisting current selected value, fixes [#4934](https://github.com/grafana/grafana/issues/4934)
+
+# 3.0.0-beta7 (2016-05-02)
+
+### Bug fixes
+* **Dashboard title**: Fixed max dashboard title width (media query) for large screens, fixes [#4859](https://github.com/grafana/grafana/issues/4859)
+* **Annotations**: Fixed issue with entering annotation edit view, fixes [#4857](https://github.com/grafana/grafana/issues/4857)
+* **Remove query**: Fixed issue with removing query for data sources without collapsable query editors, fixes [#4856](https://github.com/grafana/grafana/issues/4856)
+* **Graphite PNG**: Fixed issue graphite png rendering option, fixes [#4864](https://github.com/grafana/grafana/issues/4864)
+* **InfluxDB**: Fixed issue missing plus group by iconn, fixes [#4862](https://github.com/grafana/grafana/issues/4862)
+* **Graph**: Fixes missing line mode for thresholds, fixes [#4902](https://github.com/grafana/grafana/pull/4902)
+
+### Enhancements
+* **InfluxDB**: Added new functions moving_average and difference to query editor, closes [#4698](https://github.com/grafana/grafana/issues/4698)
+
+# 3.0.0-beta6 (2016-04-29)
+
+### Enhancements
+* **Singlestat**: Support for gauges in singlestat panel. closes [#3688](https://github.com/grafana/grafana/pull/3688)
+* **Templating**: Support for data source as variable, closes [#816](https://github.com/grafana/grafana/pull/816)
+
+### Bug fixes
+* **InfluxDB 0.12**: Fixed issue templating and `show tag values` query only returning tags for first measurement, fixes [#4726](https://github.com/grafana/grafana/issues/4726)
+* **Templating**: Fixed issue with regex formating when matching multiple values, fixes [#4755](https://github.com/grafana/grafana/issues/4755)
+* **Templating**: Fixed issue with custom all value and escaping, fixes [#4736](https://github.com/grafana/grafana/issues/4736)
+* **Dashlist**: Fixed issue dashboard list panel and caching tags, fixes [#4768](https://github.com/grafana/grafana/issues/4768)
+* **Graph**: Fixed issue with unneeded scrollbar in legend for Firefox, fixes [#4760](https://github.com/grafana/grafana/issues/4760)
+* **Table panel**: Fixed issue table panel formating string array properties, fixes [#4791](https://github.com/grafana/grafana/issues/4791)
+* **grafana-cli**: Improve error message when failing to install plugins due to corrupt response, fixes [#4651](https://github.com/grafana/grafana/issues/4651)
+* **Singlestat**: Fixes prefix an postfix for gauges, fixes [#4812](https://github.com/grafana/grafana/issues/4812)
+* **Singlestat**: Fixes auto-refresh on change for some options, fixes [#4809](https://github.com/grafana/grafana/issues/4809)
+
+### Breaking changes
+**Data Source Query Editors**: Issue [#3900](https://github.com/grafana/grafana/issues/3900)
+
+Query editors have been updated to use the new form styles. External data source plugins needs to be
+updated to work. Sorry to introduce breaking change this late in beta phase. We wanted to get this change
+in before 3.0 stable is released so we don't have to break data sources in next release (3.1). If you are
+a data source plugin author and want help for how the new form styles work please ask for help in
+slack channel (link to slack channel in readme).
+
+# 3.0.0-beta5 (2016-04-15)
+
+### Bug fixes
+* **grafana-cli**: Fixed issue grafana-cli tool, did not detect the right plugin dir, fixes [#4723](https://github.com/grafana/grafana/issues/4723)
+* **Graph**: Fixed issue with light theme text color issue in tooltip, fixes [#4702](https://github.com/grafana/grafana/issues/4702)
+* **Snapshot**: Fixed issue with empty snapshots, fixes [#4706](https://github.com/grafana/grafana/issues/4706)
+
+# 3.0.0-beta4 (2016-04-13)
+
+### Bug fixes
+* **Home dashboard**: Fixed issue with permission denied error on home dashboard, fixes [#4686](https://github.com/grafana/grafana/issues/4686)
+* **Templating**: Fixed issue templating variables that use regex extraction, fixes [#4672](https://github.com/grafana/grafana/issues/4672)
+
+# 3.0.0-beta3 (2016-04-12)
+
+### Enhancements
+* **InfluxDB**: Changed multi query encoding to work with InfluxDB 0.11 & 0.12, closes [#4533](https://github.com/grafana/grafana/issues/4533)
+* **Timepicker**: Add arrows and shortcuts for moving back and forth in current dashboard, closes [#119](https://github.com/grafana/grafana/issues/119)
+
+### Bug fixes
+* **Postgres**: Fixed page render crash when using postgres, fixes [#4558](https://github.com/grafana/grafana/issues/4558)
+* **Table panel**: Fixed table panel bug when trying to show annotations in table panel, fixes [#4563](https://github.com/grafana/grafana/issues/4563)
+* **App Config**: Fixed app config issue showing content of other app config, fixes [#4575](https://github.com/grafana/grafana/issues/4575)
+* **Graph Panel**: Fixed legend option max not updating, fixes [#4601](https://github.com/grafana/grafana/issues/4601)
+* **Graph Panel**: Fixed issue where newly added graph panels shared same axes config, fixes [#4582](https://github.com/grafana/grafana/issues/4582)
+* **Graph Panel**: Fixed issue with axis labels overlapping Y-axis, fixes [#4626](https://github.com/grafana/grafana/issues/4626)
+* **InfluxDB**: Fixed issue with templating query containing template variable, fixes [#4602](https://github.com/grafana/grafana/issues/4602)
+* **Graph Panel**: Fixed issue with hiding series and stacking, fixes [#4557](https://github.com/grafana/grafana/issues/4557)
+* **Graph Panel**: Fixed issue with legend height in table mode with few series, affected iframe embedding as well, fixes [#4640](https://github.com/grafana/grafana/issues/4640)
+
+# 3.0.0-beta2 (2016-04-04)
+
+### New Features (introduces since 3.0-beta1)
+* **Preferences**: Set home dashboard on user and org level, closes [#1678](https://github.com/grafana/grafana/issues/1678)
+* **Preferences**: Set timezone on user and org level, closes [#3214](https://github.com/grafana/grafana/issues/3214), [#1200](https://github.com/grafana/grafana/issues/1200)
+* **Preferences**: Set theme on user and org level, closes [#3214](https://github.com/grafana/grafana/issues/3214), [#1917](https://github.com/grafana/grafana/issues/1917)
+
+### Bug fixes
+* **Dashboard**: Fixed dashboard panel layout for mobile devices, fixes [#4529](https://github.com/grafana/grafana/issues/4529)
+* **Table Panel**: Fixed issue with table panel sort, fixes [#4532](https://github.com/grafana/grafana/issues/4532)
+* **Page Load Crash**: A Datasource with null jsonData would make Grafana fail to load page, fixes [#4536](https://github.com/grafana/grafana/issues/4536)
+* **Metrics tab**: Fix for missing datasource name in datasource selector, fixes [#4541](https://github.com/grafana/grafana/issues/4540)
+* **Graph**: Fix legend in table mode with series on right-y axis, fixes [#4551](https://github.com/grafana/grafana/issues/4551), [#1145](https://github.com/grafana/grafana/issues/1145)
+
+# 3.0.0-beta1 (2016-03-31)
### New Features
* **Playlists**: Playlists can now be persisted and started from urls, closes [#3655](https://github.com/grafana/grafana/issues/3655)
diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
deleted file mode 100644
index 76a9bbf0d18..00000000000
--- a/Godeps/Godeps.json
+++ /dev/null
@@ -1,351 +0,0 @@
-{
- "ImportPath": "github.com/grafana/grafana",
- "GoVersion": "go1.5.1",
- "GodepVersion": "v60",
- "Packages": [
- "./pkg/..."
- ],
- "Deps": [
- {
- "ImportPath": "github.com/BurntSushi/toml",
- "Comment": "v0.1.0-21-g056c9bc",
- "Rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4"
- },
- {
- "ImportPath": "github.com/Unknwon/com",
- "Rev": "d9bcf409c8a368d06c9b347705c381e7c12d54df"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/awserr",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/awsutil",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/client",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/client/metadata",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/corehandlers",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/defaults",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/ec2metadata",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/request",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/aws/session",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/private/waiter",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/cloudwatch",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
- "Comment": "v1.0.0",
- "Rev": "abb928e07c4108683d6b4d0b6ca08fe6bc0eee5f"
- },
- {
- "ImportPath": "github.com/bmizerany/assert",
- "Comment": "release.r60-6-ge17e998",
- "Rev": "e17e99893cb6509f428e1728281c2ad60a6b31e3"
- },
- {
- "ImportPath": "github.com/bradfitz/gomemcache/memcache",
- "Comment": "release.r60-40-g72a6864",
- "Rev": "72a68649ba712ee7c4b5b4a943a626bcd7d90eb8"
- },
- {
- "ImportPath": "github.com/codegangsta/cli",
- "Comment": "1.2.0-187-gc31a797",
- "Rev": "c31a7975863e7810c92e2e288a9ab074f9a88f29"
- },
- {
- "ImportPath": "github.com/davecgh/go-spew/spew",
- "Rev": "2df174808ee097f90d259e432cc04442cf60be21"
- },
- {
- "ImportPath": "github.com/fatih/color",
- "Comment": "v0.1-16-g4f7bcef",
- "Rev": "4f7bcef27eec7925456d0c30c5e7b0408b3339be"
- },
- {
- "ImportPath": "github.com/franela/goreq",
- "Rev": "3ddeded65be21dacb5a2e2d0b95af9ff6862a2b5"
- },
- {
- "ImportPath": "github.com/go-ini/ini",
- "Comment": "v0-48-g060d7da",
- "Rev": "060d7da055ba6ec5ea7a31f116332fe5efa04ce0"
- },
- {
- "ImportPath": "github.com/go-ldap/ldap",
- "Comment": "v2.2.1",
- "Rev": "07a7330929b9ee80495c88a4439657d89c7dbd87"
- },
- {
- "ImportPath": "github.com/go-macaron/binding",
- "Rev": "2502aaf4bce3a4e6451b4610847bfb8dffdb6266"
- },
- {
- "ImportPath": "github.com/go-macaron/gzip",
- "Rev": "4938e9be6b279d8426cb1c89a6bcf7af70b0c21d"
- },
- {
- "ImportPath": "github.com/go-macaron/inject",
- "Rev": "c5ab7bf3a307593cd44cb272d1a5beea473dd072"
- },
- {
- "ImportPath": "github.com/go-macaron/session",
- "Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
- },
- {
- "ImportPath": "github.com/go-macaron/session/memcache",
- "Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
- },
- {
- "ImportPath": "github.com/go-macaron/session/mysql",
- "Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
- },
- {
- "ImportPath": "github.com/go-macaron/session/postgres",
- "Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
- },
- {
- "ImportPath": "github.com/go-macaron/session/redis",
- "Rev": "66031fcb37a0fff002a1f028eb0b3a815c78306b"
- },
- {
- "ImportPath": "github.com/go-sql-driver/mysql",
- "Comment": "v1.2-171-g267b128",
- "Rev": "267b128680c46286b9ca13475c3cca5de8f79bd7"
- },
- {
- "ImportPath": "github.com/go-xorm/core",
- "Comment": "v0.4.4-7-g9e608f7",
- "Rev": "9e608f7330b9d16fe2818cfe731128b3f156cb9a"
- },
- {
- "ImportPath": "github.com/go-xorm/xorm",
- "Comment": "v0.4.4-44-gf561133",
- "Rev": "f56113384f2c63dfe4cd8e768e349f1c35122b58"
- },
- {
- "ImportPath": "github.com/gorilla/websocket",
- "Rev": "c45a635370221f34fea2d5163fd156fcb4e38e8a"
- },
- {
- "ImportPath": "github.com/gosimple/slug",
- "Rev": "8d258463b4459f161f51d6a357edacd3eef9d663"
- },
- {
- "ImportPath": "github.com/hashicorp/go-version",
- "Rev": "7e3c02b30806fa5779d3bdfc152ce4c6f40e7b38"
- },
- {
- "ImportPath": "github.com/jmespath/go-jmespath",
- "Comment": "0.2.2",
- "Rev": "3433f3ea46d9f8019119e7dd41274e112a2359a9"
- },
- {
- "ImportPath": "github.com/jtolds/gls",
- "Rev": "f1ac7f4f24f50328e6bc838ca4437d1612a0243c"
- },
- {
- "ImportPath": "github.com/klauspost/compress/flate",
- "Rev": "7b02889a2005228347aef0e76beeaee564d82f8c"
- },
- {
- "ImportPath": "github.com/klauspost/compress/gzip",
- "Rev": "7b02889a2005228347aef0e76beeaee564d82f8c"
- },
- {
- "ImportPath": "github.com/klauspost/cpuid",
- "Rev": "349c675778172472f5e8f3a3e0fe187e302e5a10"
- },
- {
- "ImportPath": "github.com/klauspost/crc32",
- "Rev": "6834731faf32e62a2dd809d99fb24d1e4ae5a92d"
- },
- {
- "ImportPath": "github.com/kr/pretty",
- "Comment": "go.weekly.2011-12-22-27-ge6ac2fc",
- "Rev": "e6ac2fc51e89a3249e82157fa0bb7a18ef9dd5bb"
- },
- {
- "ImportPath": "github.com/kr/text",
- "Rev": "bb797dc4fb8320488f47bf11de07a733d7233e1f"
- },
- {
- "ImportPath": "github.com/lib/pq",
- "Comment": "go1.0-cutoff-13-g19eeca3",
- "Rev": "19eeca3e30d2577b1761db471ec130810e67f532"
- },
- {
- "ImportPath": "github.com/lib/pq/oid",
- "Comment": "go1.0-cutoff-13-g19eeca3",
- "Rev": "19eeca3e30d2577b1761db471ec130810e67f532"
- },
- {
- "ImportPath": "github.com/mattn/go-colorable",
- "Rev": "9cbef7c35391cca05f15f8181dc0b18bc9736dbb"
- },
- {
- "ImportPath": "github.com/mattn/go-isatty",
- "Rev": "56b76bdf51f7708750eac80fa38b952bb9f32639"
- },
- {
- "ImportPath": "github.com/mattn/go-sqlite3",
- "Rev": "e28cd440fabdd39b9520344bc26829f61db40ece"
- },
- {
- "ImportPath": "github.com/rainycape/unidecode",
- "Rev": "836ef0a715aedf08a12d595ed73ec8ed5b288cac"
- },
- {
- "ImportPath": "github.com/smartystreets/goconvey/convey",
- "Comment": "1.5.0-356-gfbc0a1c",
- "Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
- },
- {
- "ImportPath": "github.com/smartystreets/goconvey/convey/assertions",
- "Comment": "1.5.0-356-gfbc0a1c",
- "Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
- },
- {
- "ImportPath": "github.com/smartystreets/goconvey/convey/assertions/oglematchers",
- "Comment": "1.5.0-356-gfbc0a1c",
- "Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
- },
- {
- "ImportPath": "github.com/smartystreets/goconvey/convey/gotest",
- "Comment": "1.5.0-356-gfbc0a1c",
- "Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
- },
- {
- "ImportPath": "github.com/smartystreets/goconvey/convey/reporting",
- "Comment": "1.5.0-356-gfbc0a1c",
- "Rev": "fbc0a1c888f9f96263f9a559d1769905245f1123"
- },
- {
- "ImportPath": "github.com/streadway/amqp",
- "Rev": "150b7f24d6ad507e6026c13d85ce1f1391ac7400"
- },
- {
- "ImportPath": "golang.org/x/net/context",
- "Rev": "972f0c5fbe4ae29e666c3f78c3ed42ae7a448b0a"
- },
- {
- "ImportPath": "golang.org/x/oauth2",
- "Rev": "c58fcf0ffc1c772aa2e1ee4894bc19f2649263b2"
- },
- {
- "ImportPath": "golang.org/x/sys/unix",
- "Rev": "7a56174f0086b32866ebd746a794417edbc678a1"
- },
- {
- "ImportPath": "gopkg.in/asn1-ber.v1",
- "Comment": "v1",
- "Rev": "9eae18c3681ae3d3c677ac2b80a8fe57de45fc09"
- },
- {
- "ImportPath": "gopkg.in/bufio.v1",
- "Comment": "v1",
- "Rev": "567b2bfa514e796916c4747494d6ff5132a1dfce"
- },
- {
- "ImportPath": "gopkg.in/ini.v1",
- "Comment": "v0-16-g1772191",
- "Rev": "177219109c97e7920c933e21c9b25f874357b237"
- },
- {
- "ImportPath": "gopkg.in/macaron.v1",
- "Rev": "1c6dd87797ae9319b4658cbd48d1d0420b279fd5"
- },
- {
- "ImportPath": "gopkg.in/redis.v2",
- "Comment": "v2.3.2",
- "Rev": "e6179049628164864e6e84e973cfb56335748dea"
- }
- ]
-}
diff --git a/Godeps/Readme b/Godeps/Readme
deleted file mode 100644
index 4cdaa53d56d..00000000000
--- a/Godeps/Readme
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory tree is generated automatically by godep.
-
-Please do not edit.
-
-See https://github.com/tools/godep for more information.
diff --git a/Godeps/_workspace/.gitignore b/Godeps/_workspace/.gitignore
deleted file mode 100644
index f037d684ef2..00000000000
--- a/Godeps/_workspace/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/pkg
-/bin
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go
deleted file mode 100644
index 84b7e3f34aa..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go
+++ /dev/null
@@ -1,233 +0,0 @@
-package awsutil_test
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "testing"
-
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/stretchr/testify/assert"
-)
-
-func ExampleCopy() {
- type Foo struct {
- A int
- B []*string
- }
-
- // Create the initial value
- str1 := "hello"
- str2 := "bye bye"
- f1 := &Foo{A: 1, B: []*string{&str1, &str2}}
-
- // Do the copy
- var f2 Foo
- awsutil.Copy(&f2, f1)
-
- // Print the result
- fmt.Println(awsutil.Prettify(f2))
-
- // Output:
- // {
- // A: 1,
- // B: ["hello","bye bye"]
- // }
-}
-
-func TestCopy(t *testing.T) {
- type Foo struct {
- A int
- B []*string
- C map[string]*int
- }
-
- // Create the initial value
- str1 := "hello"
- str2 := "bye bye"
- int1 := 1
- int2 := 2
- f1 := &Foo{
- A: 1,
- B: []*string{&str1, &str2},
- C: map[string]*int{
- "A": &int1,
- "B": &int2,
- },
- }
-
- // Do the copy
- var f2 Foo
- awsutil.Copy(&f2, f1)
-
- // Values are equal
- assert.Equal(t, f2.A, f1.A)
- assert.Equal(t, f2.B, f1.B)
- assert.Equal(t, f2.C, f1.C)
-
- // But pointers are not!
- str3 := "nothello"
- int3 := 57
- f2.A = 100
- f2.B[0] = &str3
- f2.C["B"] = &int3
- assert.NotEqual(t, f2.A, f1.A)
- assert.NotEqual(t, f2.B, f1.B)
- assert.NotEqual(t, f2.C, f1.C)
-}
-
-func TestCopyNestedWithUnexported(t *testing.T) {
- type Bar struct {
- a int
- B int
- }
- type Foo struct {
- A string
- B Bar
- }
-
- f1 := &Foo{A: "string", B: Bar{a: 1, B: 2}}
-
- var f2 Foo
- awsutil.Copy(&f2, f1)
-
- // Values match
- assert.Equal(t, f2.A, f1.A)
- assert.NotEqual(t, f2.B, f1.B)
- assert.NotEqual(t, f2.B.a, f1.B.a)
- assert.Equal(t, f2.B.B, f2.B.B)
-}
-
-func TestCopyIgnoreNilMembers(t *testing.T) {
- type Foo struct {
- A *string
- B []string
- C map[string]string
- }
-
- f := &Foo{}
- assert.Nil(t, f.A)
- assert.Nil(t, f.B)
- assert.Nil(t, f.C)
-
- var f2 Foo
- awsutil.Copy(&f2, f)
- assert.Nil(t, f2.A)
- assert.Nil(t, f2.B)
- assert.Nil(t, f2.C)
-
- fcopy := awsutil.CopyOf(f)
- f3 := fcopy.(*Foo)
- assert.Nil(t, f3.A)
- assert.Nil(t, f3.B)
- assert.Nil(t, f3.C)
-}
-
-func TestCopyPrimitive(t *testing.T) {
- str := "hello"
- var s string
- awsutil.Copy(&s, &str)
- assert.Equal(t, "hello", s)
-}
-
-func TestCopyNil(t *testing.T) {
- var s string
- awsutil.Copy(&s, nil)
- assert.Equal(t, "", s)
-}
-
-func TestCopyReader(t *testing.T) {
- var buf io.Reader = bytes.NewReader([]byte("hello world"))
- var r io.Reader
- awsutil.Copy(&r, buf)
- b, err := ioutil.ReadAll(r)
- assert.NoError(t, err)
- assert.Equal(t, []byte("hello world"), b)
-
- // empty bytes because this is not a deep copy
- b, err = ioutil.ReadAll(buf)
- assert.NoError(t, err)
- assert.Equal(t, []byte(""), b)
-}
-
-func TestCopyDifferentStructs(t *testing.T) {
- type SrcFoo struct {
- A int
- B []*string
- C map[string]*int
- SrcUnique string
- SameNameDiffType int
- unexportedPtr *int
- ExportedPtr *int
- }
- type DstFoo struct {
- A int
- B []*string
- C map[string]*int
- DstUnique int
- SameNameDiffType string
- unexportedPtr *int
- ExportedPtr *int
- }
-
- // Create the initial value
- str1 := "hello"
- str2 := "bye bye"
- int1 := 1
- int2 := 2
- f1 := &SrcFoo{
- A: 1,
- B: []*string{&str1, &str2},
- C: map[string]*int{
- "A": &int1,
- "B": &int2,
- },
- SrcUnique: "unique",
- SameNameDiffType: 1,
- unexportedPtr: &int1,
- ExportedPtr: &int2,
- }
-
- // Do the copy
- var f2 DstFoo
- awsutil.Copy(&f2, f1)
-
- // Values are equal
- assert.Equal(t, f2.A, f1.A)
- assert.Equal(t, f2.B, f1.B)
- assert.Equal(t, f2.C, f1.C)
- assert.Equal(t, "unique", f1.SrcUnique)
- assert.Equal(t, 1, f1.SameNameDiffType)
- assert.Equal(t, 0, f2.DstUnique)
- assert.Equal(t, "", f2.SameNameDiffType)
- assert.Equal(t, int1, *f1.unexportedPtr)
- assert.Nil(t, f2.unexportedPtr)
- assert.Equal(t, int2, *f1.ExportedPtr)
- assert.Equal(t, int2, *f2.ExportedPtr)
-}
-
-func ExampleCopyOf() {
- type Foo struct {
- A int
- B []*string
- }
-
- // Create the initial value
- str1 := "hello"
- str2 := "bye bye"
- f1 := &Foo{A: 1, B: []*string{&str1, &str2}}
-
- // Do the copy
- v := awsutil.CopyOf(f1)
- var f2 *Foo = v.(*Foo)
-
- // Print the result
- fmt.Println(awsutil.Prettify(f2))
-
- // Output:
- // {
- // A: 1,
- // B: ["hello","bye bye"]
- // }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go
deleted file mode 100644
index 7a5db6e49bc..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package awsutil_test
-
-import (
- "testing"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/stretchr/testify/assert"
-)
-
-func TestDeepEqual(t *testing.T) {
- cases := []struct {
- a, b interface{}
- equal bool
- }{
- {"a", "a", true},
- {"a", "b", false},
- {"a", aws.String(""), false},
- {"a", nil, false},
- {"a", aws.String("a"), true},
- {(*bool)(nil), (*bool)(nil), true},
- {(*bool)(nil), (*string)(nil), false},
- {nil, nil, true},
- }
-
- for i, c := range cases {
- assert.Equal(t, c.equal, awsutil.DeepEqual(c.a, c.b), "%d, a:%v b:%v, %t", i, c.a, c.b, c.equal)
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go
deleted file mode 100644
index b2225566fa3..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go
+++ /dev/null
@@ -1,142 +0,0 @@
-package awsutil_test
-
-import (
- "testing"
-
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/stretchr/testify/assert"
-)
-
-type Struct struct {
- A []Struct
- z []Struct
- B *Struct
- D *Struct
- C string
- E map[string]string
-}
-
-var data = Struct{
- A: []Struct{{C: "value1"}, {C: "value2"}, {C: "value3"}},
- z: []Struct{{C: "value1"}, {C: "value2"}, {C: "value3"}},
- B: &Struct{B: &Struct{C: "terminal"}, D: &Struct{C: "terminal2"}},
- C: "initial",
-}
-var data2 = Struct{A: []Struct{
- {A: []Struct{{C: "1"}, {C: "1"}, {C: "1"}, {C: "1"}, {C: "1"}}},
- {A: []Struct{{C: "2"}, {C: "2"}, {C: "2"}, {C: "2"}, {C: "2"}}},
-}}
-
-func TestValueAtPathSuccess(t *testing.T) {
- var testCases = []struct {
- expect []interface{}
- data interface{}
- path string
- }{
- {[]interface{}{"initial"}, data, "C"},
- {[]interface{}{"value1"}, data, "A[0].C"},
- {[]interface{}{"value2"}, data, "A[1].C"},
- {[]interface{}{"value3"}, data, "A[2].C"},
- {[]interface{}{"value3"}, data, "a[2].c"},
- {[]interface{}{"value3"}, data, "A[-1].C"},
- {[]interface{}{"value1", "value2", "value3"}, data, "A[].C"},
- {[]interface{}{"terminal"}, data, "B . B . C"},
- {[]interface{}{"initial"}, data, "A.D.X || C"},
- {[]interface{}{"initial"}, data, "A[0].B || C"},
- {[]interface{}{
- Struct{A: []Struct{{C: "1"}, {C: "1"}, {C: "1"}, {C: "1"}, {C: "1"}}},
- Struct{A: []Struct{{C: "2"}, {C: "2"}, {C: "2"}, {C: "2"}, {C: "2"}}},
- }, data2, "A"},
- }
- for i, c := range testCases {
- v, err := awsutil.ValuesAtPath(c.data, c.path)
- assert.NoError(t, err, "case %d, expected no error, %s", i, c.path)
- assert.Equal(t, c.expect, v, "case %d, %s", i, c.path)
- }
-}
-
-func TestValueAtPathFailure(t *testing.T) {
- var testCases = []struct {
- expect []interface{}
- errContains string
- data interface{}
- path string
- }{
- {nil, "", data, "C.x"},
- {nil, "SyntaxError: Invalid token: tDot", data, ".x"},
- {nil, "", data, "X.Y.Z"},
- {nil, "", data, "A[100].C"},
- {nil, "", data, "A[3].C"},
- {nil, "", data, "B.B.C.Z"},
- {nil, "", data, "z[-1].C"},
- {nil, "", nil, "A.B.C"},
- {[]interface{}{}, "", Struct{}, "A"},
- {nil, "", data, "A[0].B.C"},
- {nil, "", data, "D"},
- }
-
- for i, c := range testCases {
- v, err := awsutil.ValuesAtPath(c.data, c.path)
- if c.errContains != "" {
- assert.Contains(t, err.Error(), c.errContains, "case %d, expected error, %s", i, c.path)
- continue
- } else {
- assert.NoError(t, err, "case %d, expected no error, %s", i, c.path)
- }
- assert.Equal(t, c.expect, v, "case %d, %s", i, c.path)
- }
-}
-
-func TestSetValueAtPathSuccess(t *testing.T) {
- var s Struct
- awsutil.SetValueAtPath(&s, "C", "test1")
- awsutil.SetValueAtPath(&s, "B.B.C", "test2")
- awsutil.SetValueAtPath(&s, "B.D.C", "test3")
- assert.Equal(t, "test1", s.C)
- assert.Equal(t, "test2", s.B.B.C)
- assert.Equal(t, "test3", s.B.D.C)
-
- awsutil.SetValueAtPath(&s, "B.*.C", "test0")
- assert.Equal(t, "test0", s.B.B.C)
- assert.Equal(t, "test0", s.B.D.C)
-
- var s2 Struct
- awsutil.SetValueAtPath(&s2, "b.b.c", "test0")
- assert.Equal(t, "test0", s2.B.B.C)
- awsutil.SetValueAtPath(&s2, "A", []Struct{{}})
- assert.Equal(t, []Struct{{}}, s2.A)
-
- str := "foo"
-
- s3 := Struct{}
- awsutil.SetValueAtPath(&s3, "b.b.c", str)
- assert.Equal(t, "foo", s3.B.B.C)
-
- s3 = Struct{B: &Struct{B: &Struct{C: str}}}
- awsutil.SetValueAtPath(&s3, "b.b.c", nil)
- assert.Equal(t, "", s3.B.B.C)
-
- s3 = Struct{}
- awsutil.SetValueAtPath(&s3, "b.b.c", nil)
- assert.Equal(t, "", s3.B.B.C)
-
- s3 = Struct{}
- awsutil.SetValueAtPath(&s3, "b.b.c", &str)
- assert.Equal(t, "foo", s3.B.B.C)
-
- var s4 struct{ Name *string }
- awsutil.SetValueAtPath(&s4, "Name", str)
- assert.Equal(t, str, *s4.Name)
-
- s4 = struct{ Name *string }{}
- awsutil.SetValueAtPath(&s4, "Name", nil)
- assert.Equal(t, (*string)(nil), s4.Name)
-
- s4 = struct{ Name *string }{Name: &str}
- awsutil.SetValueAtPath(&s4, "Name", nil)
- assert.Equal(t, (*string)(nil), s4.Name)
-
- s4 = struct{ Name *string }{}
- awsutil.SetValueAtPath(&s4, "Name", &str)
- assert.Equal(t, str, *s4.Name)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
deleted file mode 100644
index 24d39ce5641..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package client
-
-import (
- "math"
- "math/rand"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// DefaultRetryer implements basic retry logic using exponential backoff for
-// most services. If you want to implement custom retry logic, implement the
-// request.Retryer interface or create a structure type that composes this
-// struct and override the specific methods. For example, to override only
-// the MaxRetries method:
-//
-// type retryer struct {
-// service.DefaultRetryer
-// }
-//
-// // This implementation always has 100 max retries
-// func (d retryer) MaxRetries() uint { return 100 }
-type DefaultRetryer struct {
- NumMaxRetries int
-}
-
-// MaxRetries returns the number of maximum returns the service will use to make
-// an individual API request.
-func (d DefaultRetryer) MaxRetries() int {
- return d.NumMaxRetries
-}
-
-// RetryRules returns the delay duration before retrying this request again
-func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
- delay := int(math.Pow(2, float64(r.RetryCount))) * (rand.Intn(30) + 30)
- return time.Duration(delay) * time.Millisecond
-}
-
-// ShouldRetry returns if the request should be retried.
-func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
- if r.HTTPResponse.StatusCode >= 500 {
- return true
- }
- return r.IsErrorRetryable()
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config_test.go
deleted file mode 100644
index fe97a31fc76..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config_test.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package aws
-
-import (
- "net/http"
- "reflect"
- "testing"
-
- "github.com/aws/aws-sdk-go/aws/credentials"
-)
-
-var testCredentials = credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")
-
-var copyTestConfig = Config{
- Credentials: testCredentials,
- Endpoint: String("CopyTestEndpoint"),
- Region: String("COPY_TEST_AWS_REGION"),
- DisableSSL: Bool(true),
- HTTPClient: http.DefaultClient,
- LogLevel: LogLevel(LogDebug),
- Logger: NewDefaultLogger(),
- MaxRetries: Int(3),
- DisableParamValidation: Bool(true),
- DisableComputeChecksums: Bool(true),
- S3ForcePathStyle: Bool(true),
-}
-
-func TestCopy(t *testing.T) {
- want := copyTestConfig
- got := copyTestConfig.Copy()
- if !reflect.DeepEqual(*got, want) {
- t.Errorf("Copy() = %+v", got)
- t.Errorf(" want %+v", want)
- }
-
- got.Region = String("other")
- if got.Region == want.Region {
- t.Errorf("Expect setting copy values not not reflect in source")
- }
-}
-
-func TestCopyReturnsNewInstance(t *testing.T) {
- want := copyTestConfig
- got := copyTestConfig.Copy()
- if got == &want {
- t.Errorf("Copy() = %p; want different instance as source %p", got, &want)
- }
-}
-
-var mergeTestZeroValueConfig = Config{}
-
-var mergeTestConfig = Config{
- Credentials: testCredentials,
- Endpoint: String("MergeTestEndpoint"),
- Region: String("MERGE_TEST_AWS_REGION"),
- DisableSSL: Bool(true),
- HTTPClient: http.DefaultClient,
- LogLevel: LogLevel(LogDebug),
- Logger: NewDefaultLogger(),
- MaxRetries: Int(10),
- DisableParamValidation: Bool(true),
- DisableComputeChecksums: Bool(true),
- S3ForcePathStyle: Bool(true),
-}
-
-var mergeTests = []struct {
- cfg *Config
- in *Config
- want *Config
-}{
- {&Config{}, nil, &Config{}},
- {&Config{}, &mergeTestZeroValueConfig, &Config{}},
- {&Config{}, &mergeTestConfig, &mergeTestConfig},
-}
-
-func TestMerge(t *testing.T) {
- for i, tt := range mergeTests {
- got := tt.cfg.Copy()
- got.MergeIn(tt.in)
- if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("Config %d %+v", i, tt.cfg)
- t.Errorf(" Merge(%+v)", tt.in)
- t.Errorf(" got %+v", got)
- t.Errorf(" want %+v", tt.want)
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types_test.go
deleted file mode 100644
index df7a3e5d2de..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types_test.go
+++ /dev/null
@@ -1,437 +0,0 @@
-package aws
-
-import (
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-)
-
-var testCasesStringSlice = [][]string{
- {"a", "b", "c", "d", "e"},
- {"a", "b", "", "", "e"},
-}
-
-func TestStringSlice(t *testing.T) {
- for idx, in := range testCasesStringSlice {
- if in == nil {
- continue
- }
- out := StringSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := StringValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesStringValueSlice = [][]*string{
- {String("a"), String("b"), nil, String("c")},
-}
-
-func TestStringValueSlice(t *testing.T) {
- for idx, in := range testCasesStringValueSlice {
- if in == nil {
- continue
- }
- out := StringValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
- }
- }
-
- out2 := StringSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- for i := range out2 {
- if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
- }
- }
- }
-}
-
-var testCasesStringMap = []map[string]string{
- {"a": "1", "b": "2", "c": "3"},
-}
-
-func TestStringMap(t *testing.T) {
- for idx, in := range testCasesStringMap {
- if in == nil {
- continue
- }
- out := StringMap(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := StringValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesBoolSlice = [][]bool{
- {true, true, false, false},
-}
-
-func TestBoolSlice(t *testing.T) {
- for idx, in := range testCasesBoolSlice {
- if in == nil {
- continue
- }
- out := BoolSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := BoolValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesBoolValueSlice = [][]*bool{}
-
-func TestBoolValueSlice(t *testing.T) {
- for idx, in := range testCasesBoolValueSlice {
- if in == nil {
- continue
- }
- out := BoolValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
- }
- }
-
- out2 := BoolSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- for i := range out2 {
- if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
- }
- }
- }
-}
-
-var testCasesBoolMap = []map[string]bool{
- {"a": true, "b": false, "c": true},
-}
-
-func TestBoolMap(t *testing.T) {
- for idx, in := range testCasesBoolMap {
- if in == nil {
- continue
- }
- out := BoolMap(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := BoolValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesIntSlice = [][]int{
- {1, 2, 3, 4},
-}
-
-func TestIntSlice(t *testing.T) {
- for idx, in := range testCasesIntSlice {
- if in == nil {
- continue
- }
- out := IntSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := IntValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesIntValueSlice = [][]*int{}
-
-func TestIntValueSlice(t *testing.T) {
- for idx, in := range testCasesIntValueSlice {
- if in == nil {
- continue
- }
- out := IntValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
- }
- }
-
- out2 := IntSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- for i := range out2 {
- if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
- }
- }
- }
-}
-
-var testCasesIntMap = []map[string]int{
- {"a": 3, "b": 2, "c": 1},
-}
-
-func TestIntMap(t *testing.T) {
- for idx, in := range testCasesIntMap {
- if in == nil {
- continue
- }
- out := IntMap(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := IntValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesInt64Slice = [][]int64{
- {1, 2, 3, 4},
-}
-
-func TestInt64Slice(t *testing.T) {
- for idx, in := range testCasesInt64Slice {
- if in == nil {
- continue
- }
- out := Int64Slice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := Int64ValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesInt64ValueSlice = [][]*int64{}
-
-func TestInt64ValueSlice(t *testing.T) {
- for idx, in := range testCasesInt64ValueSlice {
- if in == nil {
- continue
- }
- out := Int64ValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
- }
- }
-
- out2 := Int64Slice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- for i := range out2 {
- if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
- }
- }
- }
-}
-
-var testCasesInt64Map = []map[string]int64{
- {"a": 3, "b": 2, "c": 1},
-}
-
-func TestInt64Map(t *testing.T) {
- for idx, in := range testCasesInt64Map {
- if in == nil {
- continue
- }
- out := Int64Map(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := Int64ValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesFloat64Slice = [][]float64{
- {1, 2, 3, 4},
-}
-
-func TestFloat64Slice(t *testing.T) {
- for idx, in := range testCasesFloat64Slice {
- if in == nil {
- continue
- }
- out := Float64Slice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := Float64ValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesFloat64ValueSlice = [][]*float64{}
-
-func TestFloat64ValueSlice(t *testing.T) {
- for idx, in := range testCasesFloat64ValueSlice {
- if in == nil {
- continue
- }
- out := Float64ValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
- }
- }
-
- out2 := Float64Slice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- for i := range out2 {
- if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
- }
- }
- }
-}
-
-var testCasesFloat64Map = []map[string]float64{
- {"a": 3, "b": 2, "c": 1},
-}
-
-func TestFloat64Map(t *testing.T) {
- for idx, in := range testCasesFloat64Map {
- if in == nil {
- continue
- }
- out := Float64Map(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := Float64ValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesTimeSlice = [][]time.Time{
- {time.Now(), time.Now().AddDate(100, 0, 0)},
-}
-
-func TestTimeSlice(t *testing.T) {
- for idx, in := range testCasesTimeSlice {
- if in == nil {
- continue
- }
- out := TimeSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := TimeValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
-
-var testCasesTimeValueSlice = [][]*time.Time{}
-
-func TestTimeValueSlice(t *testing.T) {
- for idx, in := range testCasesTimeValueSlice {
- if in == nil {
- continue
- }
- out := TimeValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
- }
- }
-
- out2 := TimeSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- for i := range out2 {
- if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
- } else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
- }
- }
- }
-}
-
-var testCasesTimeMap = []map[string]time.Time{
- {"a": time.Now().AddDate(-100, 0, 0), "b": time.Now()},
-}
-
-func TestTimeMap(t *testing.T) {
- for idx, in := range testCasesTimeMap {
- if in == nil {
- continue
- }
- out := TimeMap(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
- for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
- }
-
- out2 := TimeValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go
deleted file mode 100644
index 632ea8d4ea1..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go
+++ /dev/null
@@ -1,113 +0,0 @@
-package corehandlers_test
-
-import (
- "fmt"
- "net/http"
- "os"
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/awstesting"
-)
-
-func TestValidateEndpointHandler(t *testing.T) {
- os.Clearenv()
-
- svc := awstesting.NewClient(aws.NewConfig().WithRegion("us-west-2"))
- svc.Handlers.Clear()
- svc.Handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
-
- req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
- err := req.Build()
-
- assert.NoError(t, err)
-}
-
-func TestValidateEndpointHandlerErrorRegion(t *testing.T) {
- os.Clearenv()
-
- svc := awstesting.NewClient()
- svc.Handlers.Clear()
- svc.Handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
-
- req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
- err := req.Build()
-
- assert.Error(t, err)
- assert.Equal(t, aws.ErrMissingRegion, err)
-}
-
-type mockCredsProvider struct {
- expired bool
- retrieveCalled bool
-}
-
-func (m *mockCredsProvider) Retrieve() (credentials.Value, error) {
- m.retrieveCalled = true
- return credentials.Value{}, nil
-}
-
-func (m *mockCredsProvider) IsExpired() bool {
- return m.expired
-}
-
-func TestAfterRetryRefreshCreds(t *testing.T) {
- os.Clearenv()
- credProvider := &mockCredsProvider{}
-
- svc := awstesting.NewClient(&aws.Config{
- Credentials: credentials.NewCredentials(credProvider),
- MaxRetries: aws.Int(1),
- })
-
- svc.Handlers.Clear()
- svc.Handlers.ValidateResponse.PushBack(func(r *request.Request) {
- r.Error = awserr.New("UnknownError", "", nil)
- r.HTTPResponse = &http.Response{StatusCode: 400}
- })
- svc.Handlers.UnmarshalError.PushBack(func(r *request.Request) {
- r.Error = awserr.New("ExpiredTokenException", "", nil)
- })
- svc.Handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler)
-
- assert.True(t, svc.Config.Credentials.IsExpired(), "Expect to start out expired")
- assert.False(t, credProvider.retrieveCalled)
-
- req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
- req.Send()
-
- assert.True(t, svc.Config.Credentials.IsExpired())
- assert.False(t, credProvider.retrieveCalled)
-
- _, err := svc.Config.Credentials.Get()
- assert.NoError(t, err)
- assert.True(t, credProvider.retrieveCalled)
-}
-
-type testSendHandlerTransport struct{}
-
-func (t *testSendHandlerTransport) RoundTrip(r *http.Request) (*http.Response, error) {
- return nil, fmt.Errorf("mock error")
-}
-
-func TestSendHandlerError(t *testing.T) {
- svc := awstesting.NewClient(&aws.Config{
- HTTPClient: &http.Client{
- Transport: &testSendHandlerTransport{},
- },
- })
- svc.Handlers.Clear()
- svc.Handlers.Send.PushBackNamed(corehandlers.SendHandler)
- r := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
-
- r.Send()
-
- assert.Error(t, r.Error)
- assert.NotNil(t, r.HTTPResponse)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go
deleted file mode 100644
index 3b53f5e026a..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go
+++ /dev/null
@@ -1,144 +0,0 @@
-package corehandlers
-
-import (
- "fmt"
- "reflect"
- "strconv"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// ValidateParametersHandler is a request handler to validate the input parameters.
-// Validating parameters only has meaning if done prior to the request being sent.
-var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) {
- if r.ParamsFilled() {
- v := validator{errors: []string{}}
- v.validateAny(reflect.ValueOf(r.Params), "")
-
- if count := len(v.errors); count > 0 {
- format := "%d validation errors:\n- %s"
- msg := fmt.Sprintf(format, count, strings.Join(v.errors, "\n- "))
- r.Error = awserr.New("InvalidParameter", msg, nil)
- }
- }
-}}
-
-// A validator validates values. Collects validations errors which occurs.
-type validator struct {
- errors []string
-}
-
-// validateAny will validate any struct, slice or map type. All validations
-// are also performed recursively for nested types.
-func (v *validator) validateAny(value reflect.Value, path string) {
- value = reflect.Indirect(value)
- if !value.IsValid() {
- return
- }
-
- switch value.Kind() {
- case reflect.Struct:
- v.validateStruct(value, path)
- case reflect.Slice:
- for i := 0; i < value.Len(); i++ {
- v.validateAny(value.Index(i), path+fmt.Sprintf("[%d]", i))
- }
- case reflect.Map:
- for _, n := range value.MapKeys() {
- v.validateAny(value.MapIndex(n), path+fmt.Sprintf("[%q]", n.String()))
- }
- }
-}
-
-// validateStruct will validate the struct value's fields. If the structure has
-// nested types those types will be validated also.
-func (v *validator) validateStruct(value reflect.Value, path string) {
- prefix := "."
- if path == "" {
- prefix = ""
- }
-
- for i := 0; i < value.Type().NumField(); i++ {
- f := value.Type().Field(i)
- if strings.ToLower(f.Name[0:1]) == f.Name[0:1] {
- continue
- }
- fvalue := value.FieldByName(f.Name)
-
- err := validateField(f, fvalue, validateFieldRequired, validateFieldMin)
- if err != nil {
- v.errors = append(v.errors, fmt.Sprintf("%s: %s", err.Error(), path+prefix+f.Name))
- continue
- }
-
- v.validateAny(fvalue, path+prefix+f.Name)
- }
-}
-
-type validatorFunc func(f reflect.StructField, fvalue reflect.Value) error
-
-func validateField(f reflect.StructField, fvalue reflect.Value, funcs ...validatorFunc) error {
- for _, fn := range funcs {
- if err := fn(f, fvalue); err != nil {
- return err
- }
- }
- return nil
-}
-
-// Validates that a field has a valid value provided for required fields.
-func validateFieldRequired(f reflect.StructField, fvalue reflect.Value) error {
- if f.Tag.Get("required") == "" {
- return nil
- }
-
- switch fvalue.Kind() {
- case reflect.Ptr, reflect.Slice, reflect.Map:
- if fvalue.IsNil() {
- return fmt.Errorf("missing required parameter")
- }
- default:
- if !fvalue.IsValid() {
- return fmt.Errorf("missing required parameter")
- }
- }
- return nil
-}
-
-// Validates that if a value is provided for a field, that value must be at
-// least a minimum length.
-func validateFieldMin(f reflect.StructField, fvalue reflect.Value) error {
- minStr := f.Tag.Get("min")
- if minStr == "" {
- return nil
- }
- min, _ := strconv.ParseInt(minStr, 10, 64)
-
- kind := fvalue.Kind()
- if kind == reflect.Ptr {
- if fvalue.IsNil() {
- return nil
- }
- fvalue = fvalue.Elem()
- }
-
- switch fvalue.Kind() {
- case reflect.String:
- if int64(fvalue.Len()) < min {
- return fmt.Errorf("field too short, minimum length %d", min)
- }
- case reflect.Slice, reflect.Map:
- if fvalue.IsNil() {
- return nil
- }
- if int64(fvalue.Len()) < min {
- return fmt.Errorf("field too short, minimum length %d", min)
- }
-
- // TODO min can also apply to number minimum value.
-
- }
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go
deleted file mode 100644
index 96bfc0e6720..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package corehandlers_test
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/stretchr/testify/require"
-)
-
-var testSvc = func() *client.Client {
- s := &client.Client{
- Config: aws.Config{},
- ClientInfo: metadata.ClientInfo{
- ServiceName: "mock-service",
- APIVersion: "2015-01-01",
- },
- }
- return s
-}()
-
-type StructShape struct {
- RequiredList []*ConditionalStructShape `required:"true"`
- RequiredMap map[string]*ConditionalStructShape `required:"true"`
- RequiredBool *bool `required:"true"`
- OptionalStruct *ConditionalStructShape
-
- hiddenParameter *string
-
- metadataStructureShape
-}
-
-type metadataStructureShape struct {
- SDKShapeTraits bool
-}
-
-type ConditionalStructShape struct {
- Name *string `required:"true"`
- SDKShapeTraits bool
-}
-
-func TestNoErrors(t *testing.T) {
- input := &StructShape{
- RequiredList: []*ConditionalStructShape{},
- RequiredMap: map[string]*ConditionalStructShape{
- "key1": {Name: aws.String("Name")},
- "key2": {Name: aws.String("Name")},
- },
- RequiredBool: aws.Bool(true),
- OptionalStruct: &ConditionalStructShape{Name: aws.String("Name")},
- }
-
- req := testSvc.NewRequest(&request.Operation{}, input, nil)
- corehandlers.ValidateParametersHandler.Fn(req)
- require.NoError(t, req.Error)
-}
-
-func TestMissingRequiredParameters(t *testing.T) {
- input := &StructShape{}
- req := testSvc.NewRequest(&request.Operation{}, input, nil)
- corehandlers.ValidateParametersHandler.Fn(req)
-
- require.Error(t, req.Error)
- assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code())
- assert.Equal(t, "3 validation errors:\n- missing required parameter: RequiredList\n- missing required parameter: RequiredMap\n- missing required parameter: RequiredBool", req.Error.(awserr.Error).Message())
-}
-
-func TestNestedMissingRequiredParameters(t *testing.T) {
- input := &StructShape{
- RequiredList: []*ConditionalStructShape{{}},
- RequiredMap: map[string]*ConditionalStructShape{
- "key1": {Name: aws.String("Name")},
- "key2": {},
- },
- RequiredBool: aws.Bool(true),
- OptionalStruct: &ConditionalStructShape{},
- }
-
- req := testSvc.NewRequest(&request.Operation{}, input, nil)
- corehandlers.ValidateParametersHandler.Fn(req)
-
- require.Error(t, req.Error)
- assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code())
- assert.Equal(t, "3 validation errors:\n- missing required parameter: RequiredList[0].Name\n- missing required parameter: RequiredMap[\"key2\"].Name\n- missing required parameter: OptionalStruct.Name", req.Error.(awserr.Error).Message())
-}
-
-type testInput struct {
- StringField string `min:"5"`
- PtrStrField *string `min:"2"`
- ListField []string `min:"3"`
- MapField map[string]string `min:"4"`
-}
-
-var testsFieldMin = []struct {
- err awserr.Error
- in testInput
-}{
- {
- err: awserr.New("InvalidParameter", "1 validation errors:\n- field too short, minimum length 5: StringField", nil),
- in: testInput{StringField: "abcd"},
- },
- {
- err: awserr.New("InvalidParameter", "2 validation errors:\n- field too short, minimum length 5: StringField\n- field too short, minimum length 3: ListField", nil),
- in: testInput{StringField: "abcd", ListField: []string{"a", "b"}},
- },
- {
- err: awserr.New("InvalidParameter", "3 validation errors:\n- field too short, minimum length 5: StringField\n- field too short, minimum length 3: ListField\n- field too short, minimum length 4: MapField", nil),
- in: testInput{StringField: "abcd", ListField: []string{"a", "b"}, MapField: map[string]string{"a": "a", "b": "b"}},
- },
- {
- err: awserr.New("InvalidParameter", "1 validation errors:\n- field too short, minimum length 2: PtrStrField", nil),
- in: testInput{StringField: "abcde", PtrStrField: aws.String("v")},
- },
- {
- err: nil,
- in: testInput{StringField: "abcde", PtrStrField: aws.String("value"),
- ListField: []string{"a", "b", "c"}, MapField: map[string]string{"a": "a", "b": "b", "c": "c", "d": "d"}},
- },
-}
-
-func TestValidateFieldMinParameter(t *testing.T) {
- for i, c := range testsFieldMin {
- req := testSvc.NewRequest(&request.Operation{}, &c.in, nil)
- corehandlers.ValidateParametersHandler.Fn(req)
-
- require.Equal(t, c.err, req.Error, "%d case failed", i)
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go
deleted file mode 100644
index 4fba22f29f4..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package credentials
-
-import (
- "testing"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/stretchr/testify/assert"
-)
-
-func TestChainProviderGet(t *testing.T) {
- p := &ChainProvider{
- Providers: []Provider{
- &stubProvider{err: awserr.New("FirstError", "first provider error", nil)},
- &stubProvider{err: awserr.New("SecondError", "second provider error", nil)},
- &stubProvider{
- creds: Value{
- AccessKeyID: "AKID",
- SecretAccessKey: "SECRET",
- SessionToken: "",
- },
- },
- },
- }
-
- creds, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error")
- assert.Equal(t, "AKID", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "SECRET", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Empty(t, creds.SessionToken, "Expect session token to be empty")
-}
-
-func TestChainProviderIsExpired(t *testing.T) {
- stubProvider := &stubProvider{expired: true}
- p := &ChainProvider{
- Providers: []Provider{
- stubProvider,
- },
- }
-
- assert.True(t, p.IsExpired(), "Expect expired to be true before any Retrieve")
- _, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error")
- assert.False(t, p.IsExpired(), "Expect not expired after retrieve")
-
- stubProvider.expired = true
- assert.True(t, p.IsExpired(), "Expect return of expired provider")
-
- _, err = p.Retrieve()
- assert.False(t, p.IsExpired(), "Expect not expired after retrieve")
-}
-
-func TestChainProviderWithNoProvider(t *testing.T) {
- p := &ChainProvider{
- Providers: []Provider{},
- }
-
- assert.True(t, p.IsExpired(), "Expect expired with no providers")
- _, err := p.Retrieve()
- assert.Equal(t, ErrNoValidProvidersFoundInChain, err, "Expect no providers error returned")
-}
-
-func TestChainProviderWithNoValidProvider(t *testing.T) {
- p := &ChainProvider{
- Providers: []Provider{
- &stubProvider{err: awserr.New("FirstError", "first provider error", nil)},
- &stubProvider{err: awserr.New("SecondError", "second provider error", nil)},
- },
- }
-
- assert.True(t, p.IsExpired(), "Expect expired with no providers")
- _, err := p.Retrieve()
- assert.Equal(t, ErrNoValidProvidersFoundInChain, err, "Expect no providers error returned")
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go
deleted file mode 100644
index 99c2b47742e..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package credentials
-
-import (
- "testing"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/stretchr/testify/assert"
-)
-
-type stubProvider struct {
- creds Value
- expired bool
- err error
-}
-
-func (s *stubProvider) Retrieve() (Value, error) {
- s.expired = false
- return s.creds, s.err
-}
-func (s *stubProvider) IsExpired() bool {
- return s.expired
-}
-
-func TestCredentialsGet(t *testing.T) {
- c := NewCredentials(&stubProvider{
- creds: Value{
- AccessKeyID: "AKID",
- SecretAccessKey: "SECRET",
- SessionToken: "",
- },
- expired: true,
- })
-
- creds, err := c.Get()
- assert.Nil(t, err, "Expected no error")
- assert.Equal(t, "AKID", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "SECRET", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Empty(t, creds.SessionToken, "Expect session token to be empty")
-}
-
-func TestCredentialsGetWithError(t *testing.T) {
- c := NewCredentials(&stubProvider{err: awserr.New("provider error", "", nil), expired: true})
-
- _, err := c.Get()
- assert.Equal(t, "provider error", err.(awserr.Error).Code(), "Expected provider error")
-}
-
-func TestCredentialsExpire(t *testing.T) {
- stub := &stubProvider{}
- c := NewCredentials(stub)
-
- stub.expired = false
- assert.True(t, c.IsExpired(), "Expected to start out expired")
- c.Expire()
- assert.True(t, c.IsExpired(), "Expected to be expired")
-
- c.forceRefresh = false
- assert.False(t, c.IsExpired(), "Expected not to be expired")
-
- stub.expired = true
- assert.True(t, c.IsExpired(), "Expected to be expired")
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider_test.go
deleted file mode 100644
index da3d8ed3ec1..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider_test.go
+++ /dev/null
@@ -1,159 +0,0 @@
-package ec2rolecreds_test
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
- "github.com/aws/aws-sdk-go/aws/ec2metadata"
- "github.com/aws/aws-sdk-go/aws/session"
-)
-
-const credsRespTmpl = `{
- "Code": "Success",
- "Type": "AWS-HMAC",
- "AccessKeyId" : "accessKey",
- "SecretAccessKey" : "secret",
- "Token" : "token",
- "Expiration" : "%s",
- "LastUpdated" : "2009-11-23T0:00:00Z"
-}`
-
-const credsFailRespTmpl = `{
- "Code": "ErrorCode",
- "Message": "ErrorMsg",
- "LastUpdated": "2009-11-23T0:00:00Z"
-}`
-
-func initTestServer(expireOn string, failAssume bool) *httptest.Server {
- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path == "/latest/meta-data/iam/security-credentials" {
- fmt.Fprintln(w, "RoleName")
- } else if r.URL.Path == "/latest/meta-data/iam/security-credentials/RoleName" {
- if failAssume {
- fmt.Fprintf(w, credsFailRespTmpl)
- } else {
- fmt.Fprintf(w, credsRespTmpl, expireOn)
- }
- } else {
- http.Error(w, "bad request", http.StatusBadRequest)
- }
- }))
-
- return server
-}
-
-func TestEC2RoleProvider(t *testing.T) {
- server := initTestServer("2014-12-16T01:51:37Z", false)
- defer server.Close()
-
- p := &ec2rolecreds.EC2RoleProvider{
- Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
- }
-
- creds, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error, %v", err)
-
- assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestEC2RoleProviderFailAssume(t *testing.T) {
- server := initTestServer("2014-12-16T01:51:37Z", true)
- defer server.Close()
-
- p := &ec2rolecreds.EC2RoleProvider{
- Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
- }
-
- creds, err := p.Retrieve()
- assert.Error(t, err, "Expect error")
-
- e := err.(awserr.Error)
- assert.Equal(t, "ErrorCode", e.Code())
- assert.Equal(t, "ErrorMsg", e.Message())
- assert.Nil(t, e.OrigErr())
-
- assert.Equal(t, "", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Equal(t, "", creds.SessionToken, "Expect session token to match")
-}
-
-func TestEC2RoleProviderIsExpired(t *testing.T) {
- server := initTestServer("2014-12-16T01:51:37Z", false)
- defer server.Close()
-
- p := &ec2rolecreds.EC2RoleProvider{
- Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
- }
- p.CurrentTime = func() time.Time {
- return time.Date(2014, 12, 15, 21, 26, 0, 0, time.UTC)
- }
-
- assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.")
-
- _, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error, %v", err)
-
- assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.")
-
- p.CurrentTime = func() time.Time {
- return time.Date(3014, 12, 15, 21, 26, 0, 0, time.UTC)
- }
-
- assert.True(t, p.IsExpired(), "Expect creds to be expired.")
-}
-
-func TestEC2RoleProviderExpiryWindowIsExpired(t *testing.T) {
- server := initTestServer("2014-12-16T01:51:37Z", false)
- defer server.Close()
-
- p := &ec2rolecreds.EC2RoleProvider{
- Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
- ExpiryWindow: time.Hour * 1,
- }
- p.CurrentTime = func() time.Time {
- return time.Date(2014, 12, 15, 0, 51, 37, 0, time.UTC)
- }
-
- assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.")
-
- _, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error, %v", err)
-
- assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.")
-
- p.CurrentTime = func() time.Time {
- return time.Date(2014, 12, 16, 0, 55, 37, 0, time.UTC)
- }
-
- assert.True(t, p.IsExpired(), "Expect creds to be expired.")
-}
-
-func BenchmarkEC3RoleProvider(b *testing.B) {
- server := initTestServer("2014-12-16T01:51:37Z", false)
- defer server.Close()
-
- p := &ec2rolecreds.EC2RoleProvider{
- Client: ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")}),
- }
- _, err := p.Retrieve()
- if err != nil {
- b.Fatal(err)
- }
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- if _, err := p.Retrieve(); err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider_test.go
deleted file mode 100644
index 53f6ce256eb..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package credentials
-
-import (
- "github.com/stretchr/testify/assert"
- "os"
- "testing"
-)
-
-func TestEnvProviderRetrieve(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY_ID", "access")
- os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
- os.Setenv("AWS_SESSION_TOKEN", "token")
-
- e := EnvProvider{}
- creds, err := e.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.Equal(t, "access", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestEnvProviderIsExpired(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY_ID", "access")
- os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
- os.Setenv("AWS_SESSION_TOKEN", "token")
-
- e := EnvProvider{}
-
- assert.True(t, e.IsExpired(), "Expect creds to be expired before retrieve.")
-
- _, err := e.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.False(t, e.IsExpired(), "Expect creds to not be expired after retrieve.")
-}
-
-func TestEnvProviderNoAccessKeyID(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
-
- e := EnvProvider{}
- creds, err := e.Retrieve()
- assert.Equal(t, ErrAccessKeyIDNotFound, err, "ErrAccessKeyIDNotFound expected, but was %#v error: %#v", creds, err)
-}
-
-func TestEnvProviderNoSecretAccessKey(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY_ID", "access")
-
- e := EnvProvider{}
- creds, err := e.Retrieve()
- assert.Equal(t, ErrSecretAccessKeyNotFound, err, "ErrSecretAccessKeyNotFound expected, but was %#v error: %#v", creds, err)
-}
-
-func TestEnvProviderAlternateNames(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY", "access")
- os.Setenv("AWS_SECRET_KEY", "secret")
-
- e := EnvProvider{}
- creds, err := e.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.Equal(t, "access", creds.AccessKeyID, "Expected access key ID")
- assert.Equal(t, "secret", creds.SecretAccessKey, "Expected secret access key")
- assert.Empty(t, creds.SessionToken, "Expected no token")
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go
deleted file mode 100644
index 2e26da2634b..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package credentials
-
-import (
- "github.com/stretchr/testify/assert"
- "os"
- "testing"
-)
-
-func TestSharedCredentialsProvider(t *testing.T) {
- os.Clearenv()
-
- p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
- creds, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestSharedCredentialsProviderIsExpired(t *testing.T) {
- os.Clearenv()
-
- p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
-
- assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve")
-
- _, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve")
-}
-
-func TestSharedCredentialsProviderWithAWS_SHARED_CREDENTIALS_FILE(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "example.ini")
- p := SharedCredentialsProvider{}
- creds, err := p.Retrieve()
-
- assert.Nil(t, err, "Expect no error")
-
- assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Equal(t, "token", creds.SessionToken, "Expect session token to match")
-}
-
-func TestSharedCredentialsProviderWithAWS_PROFILE(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_PROFILE", "no_token")
-
- p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
- creds, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Empty(t, creds.SessionToken, "Expect no token")
-}
-
-func TestSharedCredentialsProviderWithoutTokenFromProfile(t *testing.T) {
- os.Clearenv()
-
- p := SharedCredentialsProvider{Filename: "example.ini", Profile: "no_token"}
- creds, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Empty(t, creds.SessionToken, "Expect no token")
-}
-
-func TestSharedCredentialsProviderColonInCredFile(t *testing.T) {
- os.Clearenv()
-
- p := SharedCredentialsProvider{Filename: "example.ini", Profile: "with_colon"}
- creds, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Empty(t, creds.SessionToken, "Expect no token")
-}
-
-func BenchmarkSharedCredentialsProvider(b *testing.B) {
- os.Clearenv()
-
- p := SharedCredentialsProvider{Filename: "example.ini", Profile: ""}
- _, err := p.Retrieve()
- if err != nil {
- b.Fatal(err)
- }
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- _, err := p.Retrieve()
- if err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider_test.go
deleted file mode 100644
index ea012369624..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package credentials
-
-import (
- "github.com/stretchr/testify/assert"
- "testing"
-)
-
-func TestStaticProviderGet(t *testing.T) {
- s := StaticProvider{
- Value: Value{
- AccessKeyID: "AKID",
- SecretAccessKey: "SECRET",
- SessionToken: "",
- },
- }
-
- creds, err := s.Retrieve()
- assert.Nil(t, err, "Expect no error")
- assert.Equal(t, "AKID", creds.AccessKeyID, "Expect access key ID to match")
- assert.Equal(t, "SECRET", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Empty(t, creds.SessionToken, "Expect no session token")
-}
-
-func TestStaticProviderIsExpired(t *testing.T) {
- s := StaticProvider{
- Value: Value{
- AccessKeyID: "AKID",
- SecretAccessKey: "SECRET",
- SessionToken: "",
- },
- }
-
- assert.False(t, s.IsExpired(), "Expect static credentials to never expire")
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider_test.go
deleted file mode 100644
index 6bd6e91973e..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package stscreds
-
-import (
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/service/sts"
- "github.com/stretchr/testify/assert"
-)
-
-type stubSTS struct {
-}
-
-func (s *stubSTS) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
- expiry := time.Now().Add(60 * time.Minute)
- return &sts.AssumeRoleOutput{
- Credentials: &sts.Credentials{
- // Just reflect the role arn to the provider.
- AccessKeyId: input.RoleArn,
- SecretAccessKey: aws.String("assumedSecretAccessKey"),
- SessionToken: aws.String("assumedSessionToken"),
- Expiration: &expiry,
- },
- }, nil
-}
-
-func TestAssumeRoleProvider(t *testing.T) {
- stub := &stubSTS{}
- p := &AssumeRoleProvider{
- Client: stub,
- RoleARN: "roleARN",
- }
-
- creds, err := p.Retrieve()
- assert.Nil(t, err, "Expect no error")
-
- assert.Equal(t, "roleARN", creds.AccessKeyID, "Expect access key ID to be reflected role ARN")
- assert.Equal(t, "assumedSecretAccessKey", creds.SecretAccessKey, "Expect secret access key to match")
- assert.Equal(t, "assumedSessionToken", creds.SessionToken, "Expect session token to match")
-}
-
-func BenchmarkAssumeRoleProvider(b *testing.B) {
- stub := &stubSTS{}
- p := &AssumeRoleProvider{
- Client: stub,
- RoleARN: "roleARN",
- }
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- if _, err := p.Retrieve(); err != nil {
- b.Fatal(err)
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
deleted file mode 100644
index b746783beca..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Package defaults is a collection of helpers to retrieve the SDK's default
-// configuration and handlers.
-package defaults
-
-import (
- "net/http"
- "os"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
- "github.com/aws/aws-sdk-go/aws/ec2metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/endpoints"
-)
-
-// A Defaults provides a collection of default values for SDK clients.
-type Defaults struct {
- Config *aws.Config
- Handlers request.Handlers
-}
-
-// Get returns the SDK's default values with Config and handlers pre-configured.
-func Get() Defaults {
- cfg := Config()
- handlers := Handlers()
- cfg.Credentials = CredChain(cfg, handlers)
-
- return Defaults{
- Config: cfg,
- Handlers: handlers,
- }
-}
-
-// Config returns the default configuration.
-func Config() *aws.Config {
- return aws.NewConfig().
- WithCredentials(credentials.AnonymousCredentials).
- WithRegion(os.Getenv("AWS_REGION")).
- WithHTTPClient(http.DefaultClient).
- WithMaxRetries(aws.UseServiceDefaultRetries).
- WithLogger(aws.NewDefaultLogger()).
- WithLogLevel(aws.LogOff).
- WithSleepDelay(time.Sleep)
-}
-
-// Handlers returns the default request handlers.
-func Handlers() request.Handlers {
- var handlers request.Handlers
-
- handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
- handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler)
- handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler)
- handlers.Send.PushBackNamed(corehandlers.SendHandler)
- handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler)
- handlers.ValidateResponse.PushBackNamed(corehandlers.ValidateResponseHandler)
-
- return handlers
-}
-
-// CredChain returns the default credential chain.
-func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials {
- endpoint, signingRegion := endpoints.EndpointForRegion(ec2metadata.ServiceName, *cfg.Region, true)
-
- return credentials.NewChainCredentials(
- []credentials.Provider{
- &credentials.EnvProvider{},
- &credentials.SharedCredentialsProvider{Filename: "", Profile: ""},
- &ec2rolecreds.EC2RoleProvider{
- Client: ec2metadata.NewClient(*cfg, handlers, endpoint, signingRegion),
- ExpiryWindow: 5 * time.Minute,
- },
- })
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
deleted file mode 100644
index e5137ca17da..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package ec2metadata
-
-import (
- "path"
-
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// GetMetadata uses the path provided to request
-func (c *EC2Metadata) GetMetadata(p string) (string, error) {
- op := &request.Operation{
- Name: "GetMetadata",
- HTTPMethod: "GET",
- HTTPPath: path.Join("/", "meta-data", p),
- }
-
- output := &metadataOutput{}
- req := c.NewRequest(op, nil, output)
-
- return output.Content, req.Send()
-}
-
-// Region returns the region the instance is running in.
-func (c *EC2Metadata) Region() (string, error) {
- resp, err := c.GetMetadata("placement/availability-zone")
- if err != nil {
- return "", err
- }
-
- // returns region without the suffix. Eg: us-west-2a becomes us-west-2
- return resp[:len(resp)-1], nil
-}
-
-// Available returns if the application has access to the EC2 Metadata service.
-// Can be used to determine if application is running within an EC2 Instance and
-// the metadata service is available.
-func (c *EC2Metadata) Available() bool {
- if _, err := c.GetMetadata("instance-id"); err != nil {
- return false
- }
-
- return true
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go
deleted file mode 100644
index c3c92972b7c..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package ec2metadata_test
-
-import (
- "bytes"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "path"
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/ec2metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/session"
-)
-
-func initTestServer(path string, resp string) *httptest.Server {
- return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.RequestURI != path {
- http.Error(w, "not found", http.StatusNotFound)
- return
- }
-
- w.Write([]byte(resp))
- }))
-}
-
-func TestEndpoint(t *testing.T) {
- c := ec2metadata.New(session.New())
- op := &request.Operation{
- Name: "GetMetadata",
- HTTPMethod: "GET",
- HTTPPath: path.Join("/", "meta-data", "testpath"),
- }
-
- req := c.NewRequest(op, nil, nil)
- assert.Equal(t, "http://169.254.169.254/latest", req.ClientInfo.Endpoint)
- assert.Equal(t, "http://169.254.169.254/latest/meta-data/testpath", req.HTTPRequest.URL.String())
-}
-
-func TestGetMetadata(t *testing.T) {
- server := initTestServer(
- "/latest/meta-data/some/path",
- "success", // real response includes suffix
- )
- defer server.Close()
- c := ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
-
- resp, err := c.GetMetadata("some/path")
-
- assert.NoError(t, err)
- assert.Equal(t, "success", resp)
-}
-
-func TestGetRegion(t *testing.T) {
- server := initTestServer(
- "/latest/meta-data/placement/availability-zone",
- "us-west-2a", // real response includes suffix
- )
- defer server.Close()
- c := ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
-
- region, err := c.Region()
-
- assert.NoError(t, err)
- assert.Equal(t, "us-west-2", region)
-}
-
-func TestMetadataAvailable(t *testing.T) {
- server := initTestServer(
- "/latest/meta-data/instance-id",
- "instance-id",
- )
- defer server.Close()
- c := ec2metadata.New(session.New(), &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
-
- available := c.Available()
-
- assert.True(t, available)
-}
-
-func TestMetadataNotAvailable(t *testing.T) {
- c := ec2metadata.New(session.New())
- c.Handlers.Send.Clear()
- c.Handlers.Send.PushBack(func(r *request.Request) {
- r.HTTPResponse = &http.Response{
- StatusCode: int(0),
- Status: http.StatusText(int(0)),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- r.Error = awserr.New("RequestError", "send request failed", nil)
- r.Retryable = aws.Bool(true) // network errors are retryable
- })
-
- available := c.Available()
-
- assert.False(t, available)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers_test.go
deleted file mode 100644
index 16a1418283b..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers_test.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package request_test
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-func TestHandlerList(t *testing.T) {
- s := ""
- r := &request.Request{}
- l := request.HandlerList{}
- l.PushBack(func(r *request.Request) {
- s += "a"
- r.Data = s
- })
- l.Run(r)
- assert.Equal(t, "a", s)
- assert.Equal(t, "a", r.Data)
-}
-
-func TestMultipleHandlers(t *testing.T) {
- r := &request.Request{}
- l := request.HandlerList{}
- l.PushBack(func(r *request.Request) { r.Data = nil })
- l.PushFront(func(r *request.Request) { r.Data = aws.Bool(true) })
- l.Run(r)
- if r.Data != nil {
- t.Error("Expected handler to execute")
- }
-}
-
-func TestNamedHandlers(t *testing.T) {
- l := request.HandlerList{}
- named := request.NamedHandler{Name: "Name", Fn: func(r *request.Request) {}}
- named2 := request.NamedHandler{Name: "NotName", Fn: func(r *request.Request) {}}
- l.PushBackNamed(named)
- l.PushBackNamed(named)
- l.PushBackNamed(named2)
- l.PushBack(func(r *request.Request) {})
- assert.Equal(t, 4, l.Len())
- l.Remove(named)
- assert.Equal(t, 2, l.Len())
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
deleted file mode 100644
index 95a8d99fbe6..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
+++ /dev/null
@@ -1,455 +0,0 @@
-package request_test
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/awstesting/unit"
- "github.com/aws/aws-sdk-go/service/dynamodb"
- "github.com/aws/aws-sdk-go/service/route53"
- "github.com/aws/aws-sdk-go/service/s3"
-)
-
-// Use DynamoDB methods for simplicity
-func TestPaginationQueryPage(t *testing.T) {
- db := dynamodb.New(unit.Session)
- tokens, pages, numPages, gotToEnd := []map[string]*dynamodb.AttributeValue{}, []map[string]*dynamodb.AttributeValue{}, 0, false
-
- reqNum := 0
- resps := []*dynamodb.QueryOutput{
- {
- LastEvaluatedKey: map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key1")}},
- Count: aws.Int64(1),
- Items: []map[string]*dynamodb.AttributeValue{
- map[string]*dynamodb.AttributeValue{
- "key": {S: aws.String("key1")},
- },
- },
- },
- {
- LastEvaluatedKey: map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key2")}},
- Count: aws.Int64(1),
- Items: []map[string]*dynamodb.AttributeValue{
- map[string]*dynamodb.AttributeValue{
- "key": {S: aws.String("key2")},
- },
- },
- },
- {
- LastEvaluatedKey: map[string]*dynamodb.AttributeValue{},
- Count: aws.Int64(1),
- Items: []map[string]*dynamodb.AttributeValue{
- map[string]*dynamodb.AttributeValue{
- "key": {S: aws.String("key3")},
- },
- },
- },
- }
-
- db.Handlers.Send.Clear() // mock sending
- db.Handlers.Unmarshal.Clear()
- db.Handlers.UnmarshalMeta.Clear()
- db.Handlers.ValidateResponse.Clear()
- db.Handlers.Build.PushBack(func(r *request.Request) {
- in := r.Params.(*dynamodb.QueryInput)
- if in == nil {
- tokens = append(tokens, nil)
- } else if len(in.ExclusiveStartKey) != 0 {
- tokens = append(tokens, in.ExclusiveStartKey)
- }
- })
- db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = resps[reqNum]
- reqNum++
- })
-
- params := &dynamodb.QueryInput{
- Limit: aws.Int64(2),
- TableName: aws.String("tablename"),
- }
- err := db.QueryPages(params, func(p *dynamodb.QueryOutput, last bool) bool {
- numPages++
- for _, item := range p.Items {
- pages = append(pages, item)
- }
- if last {
- if gotToEnd {
- assert.Fail(t, "last=true happened twice")
- }
- gotToEnd = true
- }
- return true
- })
- assert.Nil(t, err)
-
- assert.Equal(t,
- []map[string]*dynamodb.AttributeValue{
- map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key1")}},
- map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key2")}},
- }, tokens)
- assert.Equal(t,
- []map[string]*dynamodb.AttributeValue{
- map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key1")}},
- map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key2")}},
- map[string]*dynamodb.AttributeValue{"key": {S: aws.String("key3")}},
- }, pages)
- assert.Equal(t, 3, numPages)
- assert.True(t, gotToEnd)
- assert.Nil(t, params.ExclusiveStartKey)
-}
-
-// Use DynamoDB methods for simplicity
-func TestPagination(t *testing.T) {
- db := dynamodb.New(unit.Session)
- tokens, pages, numPages, gotToEnd := []string{}, []string{}, 0, false
-
- reqNum := 0
- resps := []*dynamodb.ListTablesOutput{
- {TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")},
- {TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")},
- {TableNames: []*string{aws.String("Table5")}},
- }
-
- db.Handlers.Send.Clear() // mock sending
- db.Handlers.Unmarshal.Clear()
- db.Handlers.UnmarshalMeta.Clear()
- db.Handlers.ValidateResponse.Clear()
- db.Handlers.Build.PushBack(func(r *request.Request) {
- in := r.Params.(*dynamodb.ListTablesInput)
- if in == nil {
- tokens = append(tokens, "")
- } else if in.ExclusiveStartTableName != nil {
- tokens = append(tokens, *in.ExclusiveStartTableName)
- }
- })
- db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = resps[reqNum]
- reqNum++
- })
-
- params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
- err := db.ListTablesPages(params, func(p *dynamodb.ListTablesOutput, last bool) bool {
- numPages++
- for _, t := range p.TableNames {
- pages = append(pages, *t)
- }
- if last {
- if gotToEnd {
- assert.Fail(t, "last=true happened twice")
- }
- gotToEnd = true
- }
- return true
- })
-
- assert.Equal(t, []string{"Table2", "Table4"}, tokens)
- assert.Equal(t, []string{"Table1", "Table2", "Table3", "Table4", "Table5"}, pages)
- assert.Equal(t, 3, numPages)
- assert.True(t, gotToEnd)
- assert.Nil(t, err)
- assert.Nil(t, params.ExclusiveStartTableName)
-}
-
-// Use DynamoDB methods for simplicity
-func TestPaginationEachPage(t *testing.T) {
- db := dynamodb.New(unit.Session)
- tokens, pages, numPages, gotToEnd := []string{}, []string{}, 0, false
-
- reqNum := 0
- resps := []*dynamodb.ListTablesOutput{
- {TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")},
- {TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")},
- {TableNames: []*string{aws.String("Table5")}},
- }
-
- db.Handlers.Send.Clear() // mock sending
- db.Handlers.Unmarshal.Clear()
- db.Handlers.UnmarshalMeta.Clear()
- db.Handlers.ValidateResponse.Clear()
- db.Handlers.Build.PushBack(func(r *request.Request) {
- in := r.Params.(*dynamodb.ListTablesInput)
- if in == nil {
- tokens = append(tokens, "")
- } else if in.ExclusiveStartTableName != nil {
- tokens = append(tokens, *in.ExclusiveStartTableName)
- }
- })
- db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = resps[reqNum]
- reqNum++
- })
-
- params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
- req, _ := db.ListTablesRequest(params)
- err := req.EachPage(func(p interface{}, last bool) bool {
- numPages++
- for _, t := range p.(*dynamodb.ListTablesOutput).TableNames {
- pages = append(pages, *t)
- }
- if last {
- if gotToEnd {
- assert.Fail(t, "last=true happened twice")
- }
- gotToEnd = true
- }
-
- return true
- })
-
- assert.Equal(t, []string{"Table2", "Table4"}, tokens)
- assert.Equal(t, []string{"Table1", "Table2", "Table3", "Table4", "Table5"}, pages)
- assert.Equal(t, 3, numPages)
- assert.True(t, gotToEnd)
- assert.Nil(t, err)
-}
-
-// Use DynamoDB methods for simplicity
-func TestPaginationEarlyExit(t *testing.T) {
- db := dynamodb.New(unit.Session)
- numPages, gotToEnd := 0, false
-
- reqNum := 0
- resps := []*dynamodb.ListTablesOutput{
- {TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")},
- {TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")},
- {TableNames: []*string{aws.String("Table5")}},
- }
-
- db.Handlers.Send.Clear() // mock sending
- db.Handlers.Unmarshal.Clear()
- db.Handlers.UnmarshalMeta.Clear()
- db.Handlers.ValidateResponse.Clear()
- db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = resps[reqNum]
- reqNum++
- })
-
- params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
- err := db.ListTablesPages(params, func(p *dynamodb.ListTablesOutput, last bool) bool {
- numPages++
- if numPages == 2 {
- return false
- }
- if last {
- if gotToEnd {
- assert.Fail(t, "last=true happened twice")
- }
- gotToEnd = true
- }
- return true
- })
-
- assert.Equal(t, 2, numPages)
- assert.False(t, gotToEnd)
- assert.Nil(t, err)
-}
-
-func TestSkipPagination(t *testing.T) {
- client := s3.New(unit.Session)
- client.Handlers.Send.Clear() // mock sending
- client.Handlers.Unmarshal.Clear()
- client.Handlers.UnmarshalMeta.Clear()
- client.Handlers.ValidateResponse.Clear()
- client.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = &s3.HeadBucketOutput{}
- })
-
- req, _ := client.HeadBucketRequest(&s3.HeadBucketInput{Bucket: aws.String("bucket")})
-
- numPages, gotToEnd := 0, false
- req.EachPage(func(p interface{}, last bool) bool {
- numPages++
- if last {
- gotToEnd = true
- }
- return true
- })
- assert.Equal(t, 1, numPages)
- assert.True(t, gotToEnd)
-}
-
-// Use S3 for simplicity
-func TestPaginationTruncation(t *testing.T) {
- client := s3.New(unit.Session)
-
- reqNum := 0
- resps := []*s3.ListObjectsOutput{
- {IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key1")}}},
- {IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key2")}}},
- {IsTruncated: aws.Bool(false), Contents: []*s3.Object{{Key: aws.String("Key3")}}},
- {IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key4")}}},
- }
-
- client.Handlers.Send.Clear() // mock sending
- client.Handlers.Unmarshal.Clear()
- client.Handlers.UnmarshalMeta.Clear()
- client.Handlers.ValidateResponse.Clear()
- client.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = resps[reqNum]
- reqNum++
- })
-
- params := &s3.ListObjectsInput{Bucket: aws.String("bucket")}
-
- results := []string{}
- err := client.ListObjectsPages(params, func(p *s3.ListObjectsOutput, last bool) bool {
- results = append(results, *p.Contents[0].Key)
- return true
- })
-
- assert.Equal(t, []string{"Key1", "Key2", "Key3"}, results)
- assert.Nil(t, err)
-
- // Try again without truncation token at all
- reqNum = 0
- resps[1].IsTruncated = nil
- resps[2].IsTruncated = aws.Bool(true)
- results = []string{}
- err = client.ListObjectsPages(params, func(p *s3.ListObjectsOutput, last bool) bool {
- results = append(results, *p.Contents[0].Key)
- return true
- })
-
- assert.Equal(t, []string{"Key1", "Key2"}, results)
- assert.Nil(t, err)
-}
-
-func TestPaginationNilToken(t *testing.T) {
- client := route53.New(unit.Session)
-
- reqNum := 0
- resps := []*route53.ListResourceRecordSetsOutput{
- {
- ResourceRecordSets: []*route53.ResourceRecordSet{
- {Name: aws.String("first.example.com.")},
- },
- IsTruncated: aws.Bool(true),
- NextRecordName: aws.String("second.example.com."),
- NextRecordType: aws.String("MX"),
- NextRecordIdentifier: aws.String("second"),
- MaxItems: aws.String("1"),
- },
- {
- ResourceRecordSets: []*route53.ResourceRecordSet{
- {Name: aws.String("second.example.com.")},
- },
- IsTruncated: aws.Bool(true),
- NextRecordName: aws.String("third.example.com."),
- NextRecordType: aws.String("MX"),
- MaxItems: aws.String("1"),
- },
- {
- ResourceRecordSets: []*route53.ResourceRecordSet{
- {Name: aws.String("third.example.com.")},
- },
- IsTruncated: aws.Bool(false),
- MaxItems: aws.String("1"),
- },
- }
- client.Handlers.Send.Clear() // mock sending
- client.Handlers.Unmarshal.Clear()
- client.Handlers.UnmarshalMeta.Clear()
- client.Handlers.ValidateResponse.Clear()
-
- idents := []string{}
- client.Handlers.Build.PushBack(func(r *request.Request) {
- p := r.Params.(*route53.ListResourceRecordSetsInput)
- idents = append(idents, aws.StringValue(p.StartRecordIdentifier))
-
- })
- client.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = resps[reqNum]
- reqNum++
- })
-
- params := &route53.ListResourceRecordSetsInput{
- HostedZoneId: aws.String("id-zone"),
- }
-
- results := []string{}
- err := client.ListResourceRecordSetsPages(params, func(p *route53.ListResourceRecordSetsOutput, last bool) bool {
- results = append(results, *p.ResourceRecordSets[0].Name)
- return true
- })
-
- assert.NoError(t, err)
- assert.Equal(t, []string{"", "second", ""}, idents)
- assert.Equal(t, []string{"first.example.com.", "second.example.com.", "third.example.com."}, results)
-}
-
-// Benchmarks
-var benchResps = []*dynamodb.ListTablesOutput{
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")},
- {TableNames: []*string{aws.String("TABLE")}},
-}
-
-var benchDb = func() *dynamodb.DynamoDB {
- db := dynamodb.New(unit.Session)
- db.Handlers.Send.Clear() // mock sending
- db.Handlers.Unmarshal.Clear()
- db.Handlers.UnmarshalMeta.Clear()
- db.Handlers.ValidateResponse.Clear()
- return db
-}
-
-func BenchmarkCodegenIterator(b *testing.B) {
- reqNum := 0
- db := benchDb()
- db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = benchResps[reqNum]
- reqNum++
- })
-
- input := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
- iter := func(fn func(*dynamodb.ListTablesOutput, bool) bool) error {
- page, _ := db.ListTablesRequest(input)
- for ; page != nil; page = page.NextPage() {
- page.Send()
- out := page.Data.(*dynamodb.ListTablesOutput)
- if result := fn(out, !page.HasNextPage()); page.Error != nil || !result {
- return page.Error
- }
- }
- return nil
- }
-
- for i := 0; i < b.N; i++ {
- reqNum = 0
- iter(func(p *dynamodb.ListTablesOutput, last bool) bool {
- return true
- })
- }
-}
-
-func BenchmarkEachPageIterator(b *testing.B) {
- reqNum := 0
- db := benchDb()
- db.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- r.Data = benchResps[reqNum]
- reqNum++
- })
-
- input := &dynamodb.ListTablesInput{Limit: aws.Int64(2)}
- for i := 0; i < b.N; i++ {
- reqNum = 0
- req, _ := db.ListTablesRequest(input)
- req.EachPage(func(p interface{}, last bool) bool {
- return true
- })
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_test.go
deleted file mode 100644
index 4828dff7fda..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_test.go
+++ /dev/null
@@ -1,261 +0,0 @@
-package request_test
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "runtime"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/awstesting"
-)
-
-type testData struct {
- Data string
-}
-
-func body(str string) io.ReadCloser {
- return ioutil.NopCloser(bytes.NewReader([]byte(str)))
-}
-
-func unmarshal(req *request.Request) {
- defer req.HTTPResponse.Body.Close()
- if req.Data != nil {
- json.NewDecoder(req.HTTPResponse.Body).Decode(req.Data)
- }
- return
-}
-
-func unmarshalError(req *request.Request) {
- bodyBytes, err := ioutil.ReadAll(req.HTTPResponse.Body)
- if err != nil {
- req.Error = awserr.New("UnmarshaleError", req.HTTPResponse.Status, err)
- return
- }
- if len(bodyBytes) == 0 {
- req.Error = awserr.NewRequestFailure(
- awserr.New("UnmarshaleError", req.HTTPResponse.Status, fmt.Errorf("empty body")),
- req.HTTPResponse.StatusCode,
- "",
- )
- return
- }
- var jsonErr jsonErrorResponse
- if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil {
- req.Error = awserr.New("UnmarshaleError", "JSON unmarshal", err)
- return
- }
- req.Error = awserr.NewRequestFailure(
- awserr.New(jsonErr.Code, jsonErr.Message, nil),
- req.HTTPResponse.StatusCode,
- "",
- )
-}
-
-type jsonErrorResponse struct {
- Code string `json:"__type"`
- Message string `json:"message"`
-}
-
-// test that retries occur for 5xx status codes
-func TestRequestRecoverRetry5xx(t *testing.T) {
- reqNum := 0
- reqs := []http.Response{
- {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
- {StatusCode: 501, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
- {StatusCode: 200, Body: body(`{"data":"valid"}`)},
- }
-
- s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
- s.Handlers.Validate.Clear()
- s.Handlers.Unmarshal.PushBack(unmarshal)
- s.Handlers.UnmarshalError.PushBack(unmarshalError)
- s.Handlers.Send.Clear() // mock sending
- s.Handlers.Send.PushBack(func(r *request.Request) {
- r.HTTPResponse = &reqs[reqNum]
- reqNum++
- })
- out := &testData{}
- r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
- err := r.Send()
- assert.Nil(t, err)
- assert.Equal(t, 2, int(r.RetryCount))
- assert.Equal(t, "valid", out.Data)
-}
-
-// test that retries occur for 4xx status codes with a response type that can be retried - see `shouldRetry`
-func TestRequestRecoverRetry4xxRetryable(t *testing.T) {
- reqNum := 0
- reqs := []http.Response{
- {StatusCode: 400, Body: body(`{"__type":"Throttling","message":"Rate exceeded."}`)},
- {StatusCode: 429, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)},
- {StatusCode: 200, Body: body(`{"data":"valid"}`)},
- }
-
- s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
- s.Handlers.Validate.Clear()
- s.Handlers.Unmarshal.PushBack(unmarshal)
- s.Handlers.UnmarshalError.PushBack(unmarshalError)
- s.Handlers.Send.Clear() // mock sending
- s.Handlers.Send.PushBack(func(r *request.Request) {
- r.HTTPResponse = &reqs[reqNum]
- reqNum++
- })
- out := &testData{}
- r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
- err := r.Send()
- assert.Nil(t, err)
- assert.Equal(t, 2, int(r.RetryCount))
- assert.Equal(t, "valid", out.Data)
-}
-
-// test that retries don't occur for 4xx status codes with a response type that can't be retried
-func TestRequest4xxUnretryable(t *testing.T) {
- s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
- s.Handlers.Validate.Clear()
- s.Handlers.Unmarshal.PushBack(unmarshal)
- s.Handlers.UnmarshalError.PushBack(unmarshalError)
- s.Handlers.Send.Clear() // mock sending
- s.Handlers.Send.PushBack(func(r *request.Request) {
- r.HTTPResponse = &http.Response{StatusCode: 401, Body: body(`{"__type":"SignatureDoesNotMatch","message":"Signature does not match."}`)}
- })
- out := &testData{}
- r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
- err := r.Send()
- assert.NotNil(t, err)
- if e, ok := err.(awserr.RequestFailure); ok {
- assert.Equal(t, 401, e.StatusCode())
- } else {
- assert.Fail(t, "Expected error to be a service failure")
- }
- assert.Equal(t, "SignatureDoesNotMatch", err.(awserr.Error).Code())
- assert.Equal(t, "Signature does not match.", err.(awserr.Error).Message())
- assert.Equal(t, 0, int(r.RetryCount))
-}
-
-func TestRequestExhaustRetries(t *testing.T) {
- delays := []time.Duration{}
- sleepDelay := func(delay time.Duration) {
- delays = append(delays, delay)
- }
-
- reqNum := 0
- reqs := []http.Response{
- {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
- {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
- {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
- {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
- }
-
- s := awstesting.NewClient(aws.NewConfig().WithSleepDelay(sleepDelay))
- s.Handlers.Validate.Clear()
- s.Handlers.Unmarshal.PushBack(unmarshal)
- s.Handlers.UnmarshalError.PushBack(unmarshalError)
- s.Handlers.Send.Clear() // mock sending
- s.Handlers.Send.PushBack(func(r *request.Request) {
- r.HTTPResponse = &reqs[reqNum]
- reqNum++
- })
- r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
- err := r.Send()
- assert.NotNil(t, err)
- if e, ok := err.(awserr.RequestFailure); ok {
- assert.Equal(t, 500, e.StatusCode())
- } else {
- assert.Fail(t, "Expected error to be a service failure")
- }
- assert.Equal(t, "UnknownError", err.(awserr.Error).Code())
- assert.Equal(t, "An error occurred.", err.(awserr.Error).Message())
- assert.Equal(t, 3, int(r.RetryCount))
-
- expectDelays := []struct{ min, max time.Duration }{{30, 59}, {60, 118}, {120, 236}}
- for i, v := range delays {
- min := expectDelays[i].min * time.Millisecond
- max := expectDelays[i].max * time.Millisecond
- assert.True(t, min <= v && v <= max,
- "Expect delay to be within range, i:%d, v:%s, min:%s, max:%s", i, v, min, max)
- }
-}
-
-// test that the request is retried after the credentials are expired.
-func TestRequestRecoverExpiredCreds(t *testing.T) {
- reqNum := 0
- reqs := []http.Response{
- {StatusCode: 400, Body: body(`{"__type":"ExpiredTokenException","message":"expired token"}`)},
- {StatusCode: 200, Body: body(`{"data":"valid"}`)},
- }
-
- s := awstesting.NewClient(&aws.Config{MaxRetries: aws.Int(10), Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "")})
- s.Handlers.Validate.Clear()
- s.Handlers.Unmarshal.PushBack(unmarshal)
- s.Handlers.UnmarshalError.PushBack(unmarshalError)
-
- credExpiredBeforeRetry := false
- credExpiredAfterRetry := false
-
- s.Handlers.AfterRetry.PushBack(func(r *request.Request) {
- credExpiredAfterRetry = r.Config.Credentials.IsExpired()
- })
-
- s.Handlers.Sign.Clear()
- s.Handlers.Sign.PushBack(func(r *request.Request) {
- r.Config.Credentials.Get()
- })
- s.Handlers.Send.Clear() // mock sending
- s.Handlers.Send.PushBack(func(r *request.Request) {
- r.HTTPResponse = &reqs[reqNum]
- reqNum++
- })
- out := &testData{}
- r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out)
- err := r.Send()
- assert.Nil(t, err)
-
- assert.False(t, credExpiredBeforeRetry, "Expect valid creds before retry check")
- assert.True(t, credExpiredAfterRetry, "Expect expired creds after retry check")
- assert.False(t, s.Config.Credentials.IsExpired(), "Expect valid creds after cred expired recovery")
-
- assert.Equal(t, 1, int(r.RetryCount))
- assert.Equal(t, "valid", out.Data)
-}
-
-func TestMakeAddtoUserAgentHandler(t *testing.T) {
- fn := request.MakeAddToUserAgentHandler("name", "version", "extra1", "extra2")
- r := &request.Request{HTTPRequest: &http.Request{Header: http.Header{}}}
- r.HTTPRequest.Header.Set("User-Agent", "foo/bar")
- fn(r)
-
- assert.Equal(t, "foo/bar name/version (extra1; extra2)", r.HTTPRequest.Header.Get("User-Agent"))
-}
-
-func TestMakeAddtoUserAgentFreeFormHandler(t *testing.T) {
- fn := request.MakeAddToUserAgentFreeFormHandler("name/version (extra1; extra2)")
- r := &request.Request{HTTPRequest: &http.Request{Header: http.Header{}}}
- r.HTTPRequest.Header.Set("User-Agent", "foo/bar")
- fn(r)
-
- assert.Equal(t, "foo/bar name/version (extra1; extra2)", r.HTTPRequest.Header.Get("User-Agent"))
-}
-
-func TestRequestUserAgent(t *testing.T) {
- s := awstesting.NewClient(&aws.Config{Region: aws.String("us-east-1")})
- // s.Handlers.Validate.Clear()
-
- req := s.NewRequest(&request.Operation{Name: "Operation"}, nil, &testData{})
- req.HTTPRequest.Header.Set("User-Agent", "foo/bar")
- assert.NoError(t, req.Build())
-
- expectUA := fmt.Sprintf("foo/bar %s/%s (%s; %s; %s)",
- aws.SDKName, aws.SDKVersion, runtime.Version(), runtime.GOOS, runtime.GOARCH)
- assert.Equal(t, expectUA, req.HTTPRequest.Header.Get("User-Agent"))
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session.go
deleted file mode 100644
index eb7fc2052f1..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Package session provides a way to create service clients with shared configuration
-// and handlers.
-package session
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/defaults"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/endpoints"
-)
-
-// A Session provides a central location to create service clients from and
-// store configurations and request handlers for those services.
-//
-// Sessions are safe to create service clients concurrently, but it is not safe
-// to mutate the session concurrently.
-type Session struct {
- Config *aws.Config
- Handlers request.Handlers
-}
-
-// New creates a new instance of the handlers merging in the provided Configs
-// on top of the SDK's default configurations. Once the session is created it
-// can be mutated to modify Configs or Handlers. The session is safe to be read
-// concurrently, but it should not be written to concurrently.
-//
-// Example:
-// // Create a session with the default config and request handlers.
-// sess := session.New()
-//
-// // Create a session with a custom region
-// sess := session.New(&aws.Config{Region: aws.String("us-east-1")})
-//
-// // Create a session, and add additional handlers for all service
-// // clients created with the session to inherit. Adds logging handler.
-// sess := session.New()
-// sess.Handlers.Send.PushFront(func(r *request.Request) {
-// // Log every request made and its payload
-// logger.Println("Request: %s/%s, Payload: %s", r.ClientInfo.ServiceName, r.Operation, r.Params)
-// })
-//
-// // Create a S3 client instance from a session
-// sess := session.New()
-// svc := s3.New(sess)
-func New(cfgs ...*aws.Config) *Session {
- def := defaults.Get()
- s := &Session{
- Config: def.Config,
- Handlers: def.Handlers,
- }
- s.Config.MergeIn(cfgs...)
-
- initHandlers(s)
-
- return s
-}
-
-func initHandlers(s *Session) {
- // Add the Validate parameter handler if it is not disabled.
- s.Handlers.Validate.Remove(corehandlers.ValidateParametersHandler)
- if !aws.BoolValue(s.Config.DisableParamValidation) {
- s.Handlers.Validate.PushBackNamed(corehandlers.ValidateParametersHandler)
- }
-}
-
-// Copy creates and returns a copy of the current session, coping the config
-// and handlers. If any additional configs are provided they will be merged
-// on top of the session's copied config.
-//
-// Example:
-// // Create a copy of the current session, configured for the us-west-2 region.
-// sess.Copy(&aws.Config{Region: aws.String("us-west-2"})
-func (s *Session) Copy(cfgs ...*aws.Config) *Session {
- newSession := &Session{
- Config: s.Config.Copy(cfgs...),
- Handlers: s.Handlers.Copy(),
- }
-
- initHandlers(newSession)
-
- return newSession
-}
-
-// ClientConfig satisfies the client.ConfigProvider interface and is used to
-// configure the service client instances. Passing the Session to the service
-// client's constructor (New) will use this method to configure the client.
-//
-// Example:
-// sess := session.New()
-// s3.New(sess)
-func (s *Session) ClientConfig(serviceName string, cfgs ...*aws.Config) client.Config {
- s = s.Copy(cfgs...)
- endpoint, signingRegion := endpoints.NormalizeEndpoint(
- aws.StringValue(s.Config.Endpoint), serviceName,
- aws.StringValue(s.Config.Region), aws.BoolValue(s.Config.DisableSSL))
-
- return client.Config{
- Config: s.Config,
- Handlers: s.Handlers,
- Endpoint: endpoint,
- SigningRegion: signingRegion,
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session_test.go
deleted file mode 100644
index e56c02fc661..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/session/session_test.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package session_test
-
-import (
- "net/http"
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
-)
-
-func TestNewDefaultSession(t *testing.T) {
- s := session.New(&aws.Config{Region: aws.String("region")})
-
- assert.Equal(t, "region", *s.Config.Region)
- assert.Equal(t, http.DefaultClient, s.Config.HTTPClient)
- assert.NotNil(t, s.Config.Logger)
- assert.Equal(t, aws.LogOff, *s.Config.LogLevel)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types_test.go
deleted file mode 100644
index a4ed20e7d22..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types_test.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package aws
-
-import (
- "math/rand"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestWriteAtBuffer(t *testing.T) {
- b := &WriteAtBuffer{}
-
- n, err := b.WriteAt([]byte{1}, 0)
- assert.NoError(t, err)
- assert.Equal(t, 1, n)
-
- n, err = b.WriteAt([]byte{1, 1, 1}, 5)
- assert.NoError(t, err)
- assert.Equal(t, 3, n)
-
- n, err = b.WriteAt([]byte{2}, 1)
- assert.NoError(t, err)
- assert.Equal(t, 1, n)
-
- n, err = b.WriteAt([]byte{3}, 2)
- assert.NoError(t, err)
- assert.Equal(t, 1, n)
-
- assert.Equal(t, []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes())
-}
-
-func BenchmarkWriteAtBuffer(b *testing.B) {
- buf := &WriteAtBuffer{}
- r := rand.New(rand.NewSource(1))
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- to := r.Intn(10) * 4096
- bs := make([]byte, to)
- buf.WriteAt(bs, r.Int63n(10)*4096)
- }
-}
-
-func BenchmarkWriteAtBufferParallel(b *testing.B) {
- buf := &WriteAtBuffer{}
- r := rand.New(rand.NewSource(1))
-
- b.ResetTimer()
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- to := r.Intn(10) * 4096
- bs := make([]byte, to)
- buf.WriteAt(bs, r.Int63n(10)*4096)
- }
- })
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go
deleted file mode 100644
index d040cccd57d..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Package endpoints validates regional endpoints for services.
-package endpoints
-
-//go:generate go run ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go
-//go:generate gofmt -s -w endpoints_map.go
-
-import "strings"
-
-// EndpointForRegion returns an endpoint and its signing region for a service and region.
-// if the service and region pair are not found endpoint and signingRegion will be empty.
-func EndpointForRegion(svcName, region string) (endpoint, signingRegion string) {
- derivedKeys := []string{
- region + "/" + svcName,
- region + "/*",
- "*/" + svcName,
- "*/*",
- }
-
- for _, key := range derivedKeys {
- if val, ok := endpointsMap.Endpoints[key]; ok {
- ep := val.Endpoint
- ep = strings.Replace(ep, "{region}", region, -1)
- ep = strings.Replace(ep, "{service}", svcName, -1)
-
- endpoint = ep
- signingRegion = val.SigningRegion
- return
- }
- }
- return
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.json b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.json
deleted file mode 100644
index 4c588090a9c..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "version": 2,
- "endpoints": {
- "*/*": {
- "endpoint": "{service}.{region}.amazonaws.com"
- },
- "cn-north-1/*": {
- "endpoint": "{service}.{region}.amazonaws.com.cn",
- "signatureVersion": "v4"
- },
- "us-gov-west-1/iam": {
- "endpoint": "iam.us-gov.amazonaws.com"
- },
- "us-gov-west-1/sts": {
- "endpoint": "sts.us-gov-west-1.amazonaws.com"
- },
- "us-gov-west-1/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "*/cloudfront": {
- "endpoint": "cloudfront.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/cloudsearchdomain": {
- "endpoint": "",
- "signingRegion": "us-east-1"
- },
- "*/iam": {
- "endpoint": "iam.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/importexport": {
- "endpoint": "importexport.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/route53": {
- "endpoint": "route53.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/sts": {
- "endpoint": "sts.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "us-east-1/sdb": {
- "endpoint": "sdb.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "us-east-1/s3": {
- "endpoint": "s3.amazonaws.com"
- },
- "us-west-1/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "us-west-2/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "eu-west-1/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "ap-southeast-1/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "ap-southeast-2/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "ap-northeast-1/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "sa-east-1/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "eu-central-1/s3": {
- "endpoint": "{service}.{region}.amazonaws.com",
- "signatureVersion": "v4"
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_map.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_map.go
deleted file mode 100644
index 894c1a64341..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_map.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package endpoints
-
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-type endpointStruct struct {
- Version int
- Endpoints map[string]endpointEntry
-}
-
-type endpointEntry struct {
- Endpoint string
- SigningRegion string
-}
-
-var endpointsMap = endpointStruct{
- Version: 2,
- Endpoints: map[string]endpointEntry{
- "*/*": {
- Endpoint: "{service}.{region}.amazonaws.com",
- },
- "*/cloudfront": {
- Endpoint: "cloudfront.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/cloudsearchdomain": {
- Endpoint: "",
- SigningRegion: "us-east-1",
- },
- "*/iam": {
- Endpoint: "iam.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/importexport": {
- Endpoint: "importexport.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/route53": {
- Endpoint: "route53.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/sts": {
- Endpoint: "sts.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "ap-northeast-1/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "ap-southeast-1/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "ap-southeast-2/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "cn-north-1/*": {
- Endpoint: "{service}.{region}.amazonaws.com.cn",
- },
- "eu-central-1/s3": {
- Endpoint: "{service}.{region}.amazonaws.com",
- },
- "eu-west-1/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "sa-east-1/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "us-east-1/s3": {
- Endpoint: "s3.amazonaws.com",
- },
- "us-east-1/sdb": {
- Endpoint: "sdb.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "us-gov-west-1/iam": {
- Endpoint: "iam.us-gov.amazonaws.com",
- },
- "us-gov-west-1/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "us-gov-west-1/sts": {
- Endpoint: "sts.us-gov-west-1.amazonaws.com",
- },
- "us-west-1/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "us-west-2/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- },
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_test.go
deleted file mode 100644
index 8af65879d40..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package endpoints
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestGlobalEndpoints(t *testing.T) {
- region := "mock-region-1"
- svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts"}
-
- for _, name := range svcs {
- ep, sr := EndpointForRegion(name, region)
- assert.Equal(t, name+".amazonaws.com", ep)
- assert.Equal(t, "us-east-1", sr)
- }
-}
-
-func TestServicesInCN(t *testing.T) {
- region := "cn-north-1"
- svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts", "s3"}
-
- for _, name := range svcs {
- ep, _ := EndpointForRegion(name, region)
- assert.Equal(t, name+"."+region+".amazonaws.com.cn", ep)
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go
deleted file mode 100644
index e3d4147ee33..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Package ec2query provides serialisation of AWS EC2 requests and responses.
-package ec2query
-
-//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/input/ec2.json build_test.go
-
-import (
- "net/url"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/protocol/query/queryutil"
-)
-
-// Build builds a request for the EC2 protocol.
-func Build(r *aws.Request) {
- body := url.Values{
- "Action": {r.Operation.Name},
- "Version": {r.Service.APIVersion},
- }
- if err := queryutil.Parse(body, r.Params, true); err != nil {
- r.Error = awserr.New("SerializationError", "failed encoding EC2 Query request", err)
- }
-
- if r.ExpireTime == 0 {
- r.HTTPRequest.Method = "POST"
- r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
- r.SetBufferBody([]byte(body.Encode()))
- } else { // This is a pre-signed request
- r.HTTPRequest.Method = "GET"
- r.HTTPRequest.URL.RawQuery = body.Encode()
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go
deleted file mode 100644
index 7973dd3baec..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go
+++ /dev/null
@@ -1,860 +0,0 @@
-package ec2query_test
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/internal/protocol/ec2query"
- "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/internal/signer/v4"
- "github.com/aws/aws-sdk-go/internal/util"
- "github.com/stretchr/testify/assert"
-)
-
-var _ bytes.Buffer // always import bytes
-var _ http.Request
-var _ json.Marshaler
-var _ time.Time
-var _ xmlutil.XMLNode
-var _ xml.Attr
-var _ = ioutil.Discard
-var _ = util.Trim("")
-var _ = url.Values{}
-var _ = io.EOF
-
-type InputService1ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService1ProtocolTest client.
-func NewInputService1ProtocolTest(config *aws.Config) *InputService1ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice1protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &InputService1ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService1ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService1TestCaseOperation1 = "OperationName"
-
-// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation.
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputShape) (req *aws.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService1TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService1TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService1TestShapeInputService1TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputShape) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
- req, out := c.InputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService1TestShapeInputService1TestCaseOperation1Output struct {
- metadataInputService1TestShapeInputService1TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputService1TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService1TestShapeInputShape struct {
- Bar *string `type:"string"`
-
- Foo *string `type:"string"`
-
- metadataInputService1TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService2ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService2ProtocolTest client.
-func NewInputService2ProtocolTest(config *aws.Config) *InputService2ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice2protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &InputService2ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService2ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService2TestCaseOperation1 = "OperationName"
-
-// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation.
-func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputShape) (req *aws.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService2TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService2TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService2TestShapeInputService2TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputShape) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
- req, out := c.InputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService2TestShapeInputService2TestCaseOperation1Output struct {
- metadataInputService2TestShapeInputService2TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeInputService2TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService2TestShapeInputShape struct {
- Bar *string `locationName:"barLocationName" type:"string"`
-
- Foo *string `type:"string"`
-
- Yuck *string `locationName:"yuckLocationName" queryName:"yuckQueryName" type:"string"`
-
- metadataInputService2TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService3ProtocolTest client.
-func NewInputService3ProtocolTest(config *aws.Config) *InputService3ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice3protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &InputService3ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService3ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService3TestCaseOperation1 = "OperationName"
-
-// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation.
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputShape) (req *aws.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService3TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService3TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService3TestShapeInputService3TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
- req, out := c.InputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService3TestShapeInputService3TestCaseOperation1Output struct {
- metadataInputService3TestShapeInputService3TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputService3TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3TestShapeInputShape struct {
- StructArg *InputService3TestShapeStructType `locationName:"Struct" type:"structure"`
-
- metadataInputService3TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3TestShapeStructType struct {
- ScalarArg *string `locationName:"Scalar" type:"string"`
-
- metadataInputService3TestShapeStructType `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeStructType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService4ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService4ProtocolTest client.
-func NewInputService4ProtocolTest(config *aws.Config) *InputService4ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice4protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &InputService4ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService4ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService4TestCaseOperation1 = "OperationName"
-
-// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation.
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputShape) (req *aws.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService4TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService4TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService4TestShapeInputService4TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
- req, out := c.InputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService4TestShapeInputService4TestCaseOperation1Output struct {
- metadataInputService4TestShapeInputService4TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputService4TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService4TestShapeInputShape struct {
- ListArg []*string `type:"list"`
-
- metadataInputService4TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService5ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService5ProtocolTest client.
-func NewInputService5ProtocolTest(config *aws.Config) *InputService5ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice5protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &InputService5ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService5ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService5TestCaseOperation1 = "OperationName"
-
-// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation.
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputShape) (req *aws.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService5TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService5TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService5TestShapeInputService5TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputShape) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
- req, out := c.InputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService5TestShapeInputService5TestCaseOperation1Output struct {
- metadataInputService5TestShapeInputService5TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputService5TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService5TestShapeInputShape struct {
- ListArg []*string `locationName:"ListMemberName" locationNameList:"item" type:"list"`
-
- metadataInputService5TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService6ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService6ProtocolTest client.
-func NewInputService6ProtocolTest(config *aws.Config) *InputService6ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice6protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &InputService6ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService6ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService6TestCaseOperation1 = "OperationName"
-
-// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation.
-func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputShape) (req *aws.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService6TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService6TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService6TestShapeInputService6TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputShape) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
- req, out := c.InputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService6TestShapeInputService6TestCaseOperation1Output struct {
- metadataInputService6TestShapeInputService6TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService6TestShapeInputService6TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService6TestShapeInputShape struct {
- ListArg []*string `locationName:"ListMemberName" queryName:"ListQueryName" locationNameList:"item" type:"list"`
-
- metadataInputService6TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService6TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService7ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService7ProtocolTest client.
-func NewInputService7ProtocolTest(config *aws.Config) *InputService7ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice7protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &InputService7ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService7ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService7TestCaseOperation1 = "OperationName"
-
-// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation.
-func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputShape) (req *aws.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService7TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService7TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService7TestShapeInputService7TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputShape) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
- req, out := c.InputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService7TestShapeInputService7TestCaseOperation1Output struct {
- metadataInputService7TestShapeInputService7TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService7TestShapeInputService7TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService7TestShapeInputShape struct {
- BlobArg []byte `type:"blob"`
-
- metadataInputService7TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService7TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService8ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService8ProtocolTest client.
-func NewInputService8ProtocolTest(config *aws.Config) *InputService8ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice8protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &InputService8ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService8ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService8TestCaseOperation1 = "OperationName"
-
-// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation.
-func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputShape) (req *aws.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService8TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService8TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService8TestShapeInputService8TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputShape) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
- req, out := c.InputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService8TestShapeInputService8TestCaseOperation1Output struct {
- metadataInputService8TestShapeInputService8TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService8TestShapeInputService8TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService8TestShapeInputShape struct {
- TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- metadataInputService8TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService8TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//
-// Tests begin here
-//
-
-func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- svc := NewInputService1ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService1TestShapeInputShape{
- Bar: aws.String("val2"),
- Foo: aws.String("val1"),
- }
- req, _ := svc.InputService1TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService2ProtocolTestStructureWithLocationNameAndQueryNameAppliedToMembersCase1(t *testing.T) {
- svc := NewInputService2ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService2TestShapeInputShape{
- Bar: aws.String("val2"),
- Foo: aws.String("val1"),
- Yuck: aws.String("val3"),
- }
- req, _ := svc.InputService2TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&BarLocationName=val2&Foo=val1&Version=2014-01-01&yuckQueryName=val3`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) {
- svc := NewInputService3ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService3TestShapeInputShape{
- StructArg: &InputService3TestShapeStructType{
- ScalarArg: aws.String("foo"),
- },
- }
- req, _ := svc.InputService3TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&Struct.Scalar=foo&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService4ProtocolTestListTypesCase1(t *testing.T) {
- svc := NewInputService4ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService4TestShapeInputShape{
- ListArg: []*string{
- aws.String("foo"),
- aws.String("bar"),
- aws.String("baz"),
- },
- }
- req, _ := svc.InputService4TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService5ProtocolTestListWithLocationNameAppliedToMemberCase1(t *testing.T) {
- svc := NewInputService5ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService5TestShapeInputShape{
- ListArg: []*string{
- aws.String("a"),
- aws.String("b"),
- aws.String("c"),
- },
- }
- req, _ := svc.InputService5TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService6ProtocolTestListWithLocationNameAndQueryNameCase1(t *testing.T) {
- svc := NewInputService6ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService6TestShapeInputShape{
- ListArg: []*string{
- aws.String("a"),
- aws.String("b"),
- aws.String("c"),
- },
- }
- req, _ := svc.InputService6TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
- svc := NewInputService7ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService7TestShapeInputShape{
- BlobArg: []byte("foo"),
- }
- req, _ := svc.InputService7TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) {
- svc := NewInputService8ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService8TestShapeInputShape{
- TimeArg: aws.Time(time.Unix(1422172800, 0)),
- }
- req, _ := svc.InputService8TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go
deleted file mode 100644
index e59b2bbac3e..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package ec2query
-
-//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/output/ec2.json unmarshal_test.go
-
-import (
- "encoding/xml"
- "io"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
-)
-
-// Unmarshal unmarshals a response body for the EC2 protocol.
-func Unmarshal(r *aws.Request) {
- defer r.HTTPResponse.Body.Close()
- if r.DataFilled() {
- decoder := xml.NewDecoder(r.HTTPResponse.Body)
- err := xmlutil.UnmarshalXML(r.Data, decoder, "")
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed decoding EC2 Query response", err)
- return
- }
- }
-}
-
-// UnmarshalMeta unmarshals response headers for the EC2 protocol.
-func UnmarshalMeta(r *aws.Request) {
- // TODO implement unmarshaling of request IDs
-}
-
-type xmlErrorResponse struct {
- XMLName xml.Name `xml:"Response"`
- Code string `xml:"Errors>Error>Code"`
- Message string `xml:"Errors>Error>Message"`
- RequestID string `xml:"RequestId"`
-}
-
-// UnmarshalError unmarshals a response error for the EC2 protocol.
-func UnmarshalError(r *aws.Request) {
- defer r.HTTPResponse.Body.Close()
-
- resp := &xmlErrorResponse{}
- err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp)
- if err != nil && err != io.EOF {
- r.Error = awserr.New("SerializationError", "failed decoding EC2 Query error response", err)
- } else {
- r.Error = awserr.NewRequestFailure(
- awserr.New(resp.Code, resp.Message, nil),
- r.HTTPResponse.StatusCode,
- resp.RequestID,
- )
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go
deleted file mode 100644
index a4527c14e7e..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go
+++ /dev/null
@@ -1,816 +0,0 @@
-package ec2query_test
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/internal/protocol/ec2query"
- "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/internal/signer/v4"
- "github.com/aws/aws-sdk-go/internal/util"
- "github.com/stretchr/testify/assert"
-)
-
-var _ bytes.Buffer // always import bytes
-var _ http.Request
-var _ json.Marshaler
-var _ time.Time
-var _ xmlutil.XMLNode
-var _ xml.Attr
-var _ = ioutil.Discard
-var _ = util.Trim("")
-var _ = url.Values{}
-var _ = io.EOF
-
-type OutputService1ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService1ProtocolTest client.
-func NewOutputService1ProtocolTest(config *aws.Config) *OutputService1ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice1protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &OutputService1ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService1ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService1TestCaseOperation1 = "OperationName"
-
-// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation.
-func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *aws.Request, output *OutputService1TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService1TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService1TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputShape, error) {
- req, out := c.OutputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- metadataOutputService1TestShapeOutputService1TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService1TestShapeOutputShape struct {
- Char *string `type:"character"`
-
- Double *float64 `type:"double"`
-
- FalseBool *bool `type:"boolean"`
-
- Float *float64 `type:"float"`
-
- Long *int64 `type:"long"`
-
- Num *int64 `locationName:"FooNum" type:"integer"`
-
- Str *string `type:"string"`
-
- TrueBool *bool `type:"boolean"`
-
- metadataOutputService1TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService1TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService2ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService2ProtocolTest client.
-func NewOutputService2ProtocolTest(config *aws.Config) *OutputService2ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice2protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &OutputService2ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService2ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService2TestCaseOperation1 = "OperationName"
-
-// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation.
-func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *aws.Request, output *OutputService2TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService2TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService2TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputShape, error) {
- req, out := c.OutputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- metadataOutputService2TestShapeOutputService2TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService2TestShapeOutputShape struct {
- Blob []byte `type:"blob"`
-
- metadataOutputService2TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService2TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService3ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService3ProtocolTest client.
-func NewOutputService3ProtocolTest(config *aws.Config) *OutputService3ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice3protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &OutputService3ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService3ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService3TestCaseOperation1 = "OperationName"
-
-// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation.
-func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *aws.Request, output *OutputService3TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService3TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService3TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputShape, error) {
- req, out := c.OutputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- metadataOutputService3TestShapeOutputService3TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService3TestShapeOutputShape struct {
- ListMember []*string `type:"list"`
-
- metadataOutputService3TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService3TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService4ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService4ProtocolTest client.
-func NewOutputService4ProtocolTest(config *aws.Config) *OutputService4ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice4protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &OutputService4ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService4ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService4TestCaseOperation1 = "OperationName"
-
-// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation.
-func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *aws.Request, output *OutputService4TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService4TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService4TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputShape, error) {
- req, out := c.OutputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- metadataOutputService4TestShapeOutputService4TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService4TestShapeOutputShape struct {
- ListMember []*string `locationNameList:"item" type:"list"`
-
- metadataOutputService4TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService4TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService5ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService5ProtocolTest client.
-func NewOutputService5ProtocolTest(config *aws.Config) *OutputService5ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice5protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &OutputService5ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService5ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService5TestCaseOperation1 = "OperationName"
-
-// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation.
-func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *aws.Request, output *OutputService5TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService5TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService5TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputShape, error) {
- req, out := c.OutputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- metadataOutputService5TestShapeOutputService5TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService5TestShapeOutputShape struct {
- ListMember []*string `type:"list" flattened:"true"`
-
- metadataOutputService5TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService5TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService6ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService6ProtocolTest client.
-func NewOutputService6ProtocolTest(config *aws.Config) *OutputService6ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice6protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &OutputService6ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService6ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService6TestCaseOperation1 = "OperationName"
-
-// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation.
-func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *aws.Request, output *OutputService6TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService6TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService6TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputShape, error) {
- req, out := c.OutputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- metadataOutputService6TestShapeOutputService6TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService6TestShapeOutputShape struct {
- Map map[string]*OutputService6TestShapeStructureType `type:"map"`
-
- metadataOutputService6TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService6TestShapeStructureType struct {
- Foo *string `locationName:"foo" type:"string"`
-
- metadataOutputService6TestShapeStructureType `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeStructureType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService7ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService7ProtocolTest client.
-func NewOutputService7ProtocolTest(config *aws.Config) *OutputService7ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice7protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &OutputService7ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService7TestCaseOperation1 = "OperationName"
-
-// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation.
-func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *aws.Request, output *OutputService7TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService7TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService7TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputShape, error) {
- req, out := c.OutputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- metadataOutputService7TestShapeOutputService7TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService7TestShapeOutputShape struct {
- Map map[string]*string `type:"map" flattened:"true"`
-
- metadataOutputService7TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService7TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService8ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService8ProtocolTest client.
-func NewOutputService8ProtocolTest(config *aws.Config) *OutputService8ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice8protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(ec2query.Build)
- service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return &OutputService8ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService8ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService8TestCaseOperation1 = "OperationName"
-
-// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation.
-func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *aws.Request, output *OutputService8TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService8TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService8TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputShape, error) {
- req, out := c.OutputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- metadataOutputService8TestShapeOutputService8TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService8TestShapeOutputShape struct {
- Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"`
-
- metadataOutputService8TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//
-// Tests begin here
-//
-
-func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- svc := NewOutputService1ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("myname123falsetrue1.21.3200arequest-id"))
- req, out := svc.OutputService1TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.Char)
- assert.Equal(t, 1.3, *out.Double)
- assert.Equal(t, false, *out.FalseBool)
- assert.Equal(t, 1.2, *out.Float)
- assert.Equal(t, int64(200), *out.Long)
- assert.Equal(t, int64(123), *out.Num)
- assert.Equal(t, "myname", *out.Str)
- assert.Equal(t, true, *out.TrueBool)
-
-}
-
-func TestOutputService2ProtocolTestBlobCase1(t *testing.T) {
- svc := NewOutputService2ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("dmFsdWU=requestid"))
- req, out := svc.OutputService2TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "value", string(out.Blob))
-
-}
-
-func TestOutputService3ProtocolTestListsCase1(t *testing.T) {
- svc := NewOutputService3ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService3TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
- svc := NewOutputService4ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService4TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) {
- svc := NewOutputService5ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService5TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) {
- svc := NewOutputService6ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService6TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"].Foo)
- assert.Equal(t, "bar", *out.Map["qux"].Foo)
-
-}
-
-func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) {
- svc := NewOutputService7ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService7TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
-
-func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) {
- svc := NewOutputService8ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService8TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build.go
deleted file mode 100644
index c4d8dd2635a..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Package query provides serialisation of AWS query requests, and responses.
-package query
-
-//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/input/query.json build_test.go
-
-import (
- "net/url"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/protocol/query/queryutil"
-)
-
-// Build builds a request for an AWS Query service.
-func Build(r *aws.Request) {
- body := url.Values{
- "Action": {r.Operation.Name},
- "Version": {r.Service.APIVersion},
- }
- if err := queryutil.Parse(body, r.Params, false); err != nil {
- r.Error = awserr.New("SerializationError", "failed encoding Query request", err)
- return
- }
-
- if r.ExpireTime == 0 {
- r.HTTPRequest.Method = "POST"
- r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
- r.SetBufferBody([]byte(body.Encode()))
- } else { // This is a pre-signed request
- r.HTTPRequest.Method = "GET"
- r.HTTPRequest.URL.RawQuery = body.Encode()
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build_test.go
deleted file mode 100644
index 52bbf7e1c87..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build_test.go
+++ /dev/null
@@ -1,1482 +0,0 @@
-package query_test
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/internal/protocol/query"
- "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/internal/signer/v4"
- "github.com/aws/aws-sdk-go/internal/util"
- "github.com/stretchr/testify/assert"
-)
-
-var _ bytes.Buffer // always import bytes
-var _ http.Request
-var _ json.Marshaler
-var _ time.Time
-var _ xmlutil.XMLNode
-var _ xml.Attr
-var _ = ioutil.Discard
-var _ = util.Trim("")
-var _ = url.Values{}
-var _ = io.EOF
-
-type InputService1ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService1ProtocolTest client.
-func NewInputService1ProtocolTest(config *aws.Config) *InputService1ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice1protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService1ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService1ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService1TestCaseOperation1 = "OperationName"
-
-// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation.
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputShape) (req *aws.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService1TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService1TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService1TestShapeInputService1TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputShape) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
- req, out := c.InputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService1TestShapeInputService1TestCaseOperation1Output struct {
- metadataInputService1TestShapeInputService1TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputService1TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService1TestShapeInputShape struct {
- Bar *string `type:"string"`
-
- Foo *string `type:"string"`
-
- metadataInputService1TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService2ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService2ProtocolTest client.
-func NewInputService2ProtocolTest(config *aws.Config) *InputService2ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice2protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService2ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService2ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService2TestCaseOperation1 = "OperationName"
-
-// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation.
-func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputShape) (req *aws.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService2TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService2TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService2TestShapeInputService2TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputShape) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
- req, out := c.InputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService2TestShapeInputService2TestCaseOperation1Output struct {
- metadataInputService2TestShapeInputService2TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeInputService2TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService2TestShapeInputShape struct {
- StructArg *InputService2TestShapeStructType `type:"structure"`
-
- metadataInputService2TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService2TestShapeStructType struct {
- ScalarArg *string `type:"string"`
-
- metadataInputService2TestShapeStructType `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeStructType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService3ProtocolTest client.
-func NewInputService3ProtocolTest(config *aws.Config) *InputService3ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice3protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService3ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService3ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService3TestCaseOperation1 = "OperationName"
-
-// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation.
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputShape) (req *aws.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService3TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService3TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService3TestShapeInputService3TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
- req, out := c.InputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService3TestCaseOperation2 = "OperationName"
-
-// InputService3TestCaseOperation2Request generates a request for the InputService3TestCaseOperation2 operation.
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation2Request(input *InputService3TestShapeInputShape) (req *aws.Request, output *InputService3TestShapeInputService3TestCaseOperation2Output) {
- op := &aws.Operation{
- Name: opInputService3TestCaseOperation2,
- }
-
- if input == nil {
- input = &InputService3TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService3TestShapeInputService3TestCaseOperation2Output{}
- req.Data = output
- return
-}
-
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation2(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation2Output, error) {
- req, out := c.InputService3TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService3TestShapeInputService3TestCaseOperation1Output struct {
- metadataInputService3TestShapeInputService3TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputService3TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3TestShapeInputService3TestCaseOperation2Output struct {
- metadataInputService3TestShapeInputService3TestCaseOperation2Output `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputService3TestCaseOperation2Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3TestShapeInputShape struct {
- ListArg []*string `type:"list"`
-
- metadataInputService3TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService4ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService4ProtocolTest client.
-func NewInputService4ProtocolTest(config *aws.Config) *InputService4ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice4protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService4ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService4ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService4TestCaseOperation1 = "OperationName"
-
-// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation.
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputShape) (req *aws.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService4TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService4TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService4TestShapeInputService4TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
- req, out := c.InputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService4TestCaseOperation2 = "OperationName"
-
-// InputService4TestCaseOperation2Request generates a request for the InputService4TestCaseOperation2 operation.
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation2Request(input *InputService4TestShapeInputShape) (req *aws.Request, output *InputService4TestShapeInputService4TestCaseOperation2Output) {
- op := &aws.Operation{
- Name: opInputService4TestCaseOperation2,
- }
-
- if input == nil {
- input = &InputService4TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService4TestShapeInputService4TestCaseOperation2Output{}
- req.Data = output
- return
-}
-
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation2(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation2Output, error) {
- req, out := c.InputService4TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService4TestShapeInputService4TestCaseOperation1Output struct {
- metadataInputService4TestShapeInputService4TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputService4TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService4TestShapeInputService4TestCaseOperation2Output struct {
- metadataInputService4TestShapeInputService4TestCaseOperation2Output `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputService4TestCaseOperation2Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService4TestShapeInputShape struct {
- ListArg []*string `type:"list" flattened:"true"`
-
- ScalarArg *string `type:"string"`
-
- metadataInputService4TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService5ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService5ProtocolTest client.
-func NewInputService5ProtocolTest(config *aws.Config) *InputService5ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice5protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService5ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService5ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService5TestCaseOperation1 = "OperationName"
-
-// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation.
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputShape) (req *aws.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService5TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService5TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService5TestShapeInputService5TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputShape) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
- req, out := c.InputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService5TestCaseOperation2 = "OperationName"
-
-// InputService5TestCaseOperation2Request generates a request for the InputService5TestCaseOperation2 operation.
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation2Request(input *InputService5TestShapeInputShape) (req *aws.Request, output *InputService5TestShapeInputService5TestCaseOperation2Output) {
- op := &aws.Operation{
- Name: opInputService5TestCaseOperation2,
- }
-
- if input == nil {
- input = &InputService5TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService5TestShapeInputService5TestCaseOperation2Output{}
- req.Data = output
- return
-}
-
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation2(input *InputService5TestShapeInputShape) (*InputService5TestShapeInputService5TestCaseOperation2Output, error) {
- req, out := c.InputService5TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService5TestShapeInputService5TestCaseOperation1Output struct {
- metadataInputService5TestShapeInputService5TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputService5TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService5TestShapeInputService5TestCaseOperation2Output struct {
- metadataInputService5TestShapeInputService5TestCaseOperation2Output `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputService5TestCaseOperation2Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService5TestShapeInputShape struct {
- MapArg map[string]*string `type:"map"`
-
- metadataInputService5TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService6ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService6ProtocolTest client.
-func NewInputService6ProtocolTest(config *aws.Config) *InputService6ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice6protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService6ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService6ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService6TestCaseOperation1 = "OperationName"
-
-// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation.
-func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputShape) (req *aws.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService6TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService6TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService6TestShapeInputService6TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputShape) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
- req, out := c.InputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService6TestShapeInputService6TestCaseOperation1Output struct {
- metadataInputService6TestShapeInputService6TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService6TestShapeInputService6TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService6TestShapeInputShape struct {
- MapArg map[string]*string `locationNameKey:"TheKey" locationNameValue:"TheValue" type:"map"`
-
- metadataInputService6TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService6TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService7ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService7ProtocolTest client.
-func NewInputService7ProtocolTest(config *aws.Config) *InputService7ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice7protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService7ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService7ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService7TestCaseOperation1 = "OperationName"
-
-// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation.
-func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputShape) (req *aws.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService7TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService7TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService7TestShapeInputService7TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputShape) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
- req, out := c.InputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService7TestShapeInputService7TestCaseOperation1Output struct {
- metadataInputService7TestShapeInputService7TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService7TestShapeInputService7TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService7TestShapeInputShape struct {
- BlobArg []byte `type:"blob"`
-
- metadataInputService7TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService7TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService8ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService8ProtocolTest client.
-func NewInputService8ProtocolTest(config *aws.Config) *InputService8ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice8protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService8ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService8ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService8TestCaseOperation1 = "OperationName"
-
-// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation.
-func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputShape) (req *aws.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService8TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService8TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService8TestShapeInputService8TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputShape) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
- req, out := c.InputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService8TestShapeInputService8TestCaseOperation1Output struct {
- metadataInputService8TestShapeInputService8TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService8TestShapeInputService8TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService8TestShapeInputShape struct {
- TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- metadataInputService8TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService8TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new InputService9ProtocolTest client.
-func NewInputService9ProtocolTest(config *aws.Config) *InputService9ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "inputservice9protocoltest",
- APIVersion: "2014-01-01",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &InputService9ProtocolTest{service}
-}
-
-// newRequest creates a new request for a InputService9ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService9ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opInputService9TestCaseOperation1 = "OperationName"
-
-// InputService9TestCaseOperation1Request generates a request for the InputService9TestCaseOperation1 operation.
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) {
- op := &aws.Operation{
- Name: opInputService9TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService9TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService9TestShapeInputService9TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputShape) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) {
- req, out := c.InputService9TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService9TestCaseOperation2 = "OperationName"
-
-// InputService9TestCaseOperation2Request generates a request for the InputService9TestCaseOperation2 operation.
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation2Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation2Output) {
- op := &aws.Operation{
- Name: opInputService9TestCaseOperation2,
- }
-
- if input == nil {
- input = &InputService9TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService9TestShapeInputService9TestCaseOperation2Output{}
- req.Data = output
- return
-}
-
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation2(input *InputService9TestShapeInputShape) (*InputService9TestShapeInputService9TestCaseOperation2Output, error) {
- req, out := c.InputService9TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService9TestCaseOperation3 = "OperationName"
-
-// InputService9TestCaseOperation3Request generates a request for the InputService9TestCaseOperation3 operation.
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation3Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation3Output) {
- op := &aws.Operation{
- Name: opInputService9TestCaseOperation3,
- }
-
- if input == nil {
- input = &InputService9TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService9TestShapeInputService9TestCaseOperation3Output{}
- req.Data = output
- return
-}
-
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation3(input *InputService9TestShapeInputShape) (*InputService9TestShapeInputService9TestCaseOperation3Output, error) {
- req, out := c.InputService9TestCaseOperation3Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService9TestCaseOperation4 = "OperationName"
-
-// InputService9TestCaseOperation4Request generates a request for the InputService9TestCaseOperation4 operation.
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation4Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation4Output) {
- op := &aws.Operation{
- Name: opInputService9TestCaseOperation4,
- }
-
- if input == nil {
- input = &InputService9TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService9TestShapeInputService9TestCaseOperation4Output{}
- req.Data = output
- return
-}
-
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation4(input *InputService9TestShapeInputShape) (*InputService9TestShapeInputService9TestCaseOperation4Output, error) {
- req, out := c.InputService9TestCaseOperation4Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService9TestCaseOperation5 = "OperationName"
-
-// InputService9TestCaseOperation5Request generates a request for the InputService9TestCaseOperation5 operation.
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation5Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation5Output) {
- op := &aws.Operation{
- Name: opInputService9TestCaseOperation5,
- }
-
- if input == nil {
- input = &InputService9TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService9TestShapeInputService9TestCaseOperation5Output{}
- req.Data = output
- return
-}
-
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation5(input *InputService9TestShapeInputShape) (*InputService9TestShapeInputService9TestCaseOperation5Output, error) {
- req, out := c.InputService9TestCaseOperation5Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService9TestCaseOperation6 = "OperationName"
-
-// InputService9TestCaseOperation6Request generates a request for the InputService9TestCaseOperation6 operation.
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation6Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation6Output) {
- op := &aws.Operation{
- Name: opInputService9TestCaseOperation6,
- }
-
- if input == nil {
- input = &InputService9TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService9TestShapeInputService9TestCaseOperation6Output{}
- req.Data = output
- return
-}
-
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation6(input *InputService9TestShapeInputShape) (*InputService9TestShapeInputService9TestCaseOperation6Output, error) {
- req, out := c.InputService9TestCaseOperation6Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService9TestShapeInputService9TestCaseOperation1Output struct {
- metadataInputService9TestShapeInputService9TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputService9TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9TestShapeInputService9TestCaseOperation2Output struct {
- metadataInputService9TestShapeInputService9TestCaseOperation2Output `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputService9TestCaseOperation2Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9TestShapeInputService9TestCaseOperation3Output struct {
- metadataInputService9TestShapeInputService9TestCaseOperation3Output `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputService9TestCaseOperation3Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9TestShapeInputService9TestCaseOperation4Output struct {
- metadataInputService9TestShapeInputService9TestCaseOperation4Output `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputService9TestCaseOperation4Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9TestShapeInputService9TestCaseOperation5Output struct {
- metadataInputService9TestShapeInputService9TestCaseOperation5Output `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputService9TestCaseOperation5Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9TestShapeInputService9TestCaseOperation6Output struct {
- metadataInputService9TestShapeInputService9TestCaseOperation6Output `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputService9TestCaseOperation6Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9TestShapeInputShape struct {
- RecursiveStruct *InputService9TestShapeRecursiveStructType `type:"structure"`
-
- metadataInputService9TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9TestShapeRecursiveStructType struct {
- NoRecurse *string `type:"string"`
-
- RecursiveList []*InputService9TestShapeRecursiveStructType `type:"list"`
-
- RecursiveMap map[string]*InputService9TestShapeRecursiveStructType `type:"map"`
-
- RecursiveStruct *InputService9TestShapeRecursiveStructType `type:"structure"`
-
- metadataInputService9TestShapeRecursiveStructType `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeRecursiveStructType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//
-// Tests begin here
-//
-
-func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- svc := NewInputService1ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService1TestShapeInputShape{
- Bar: aws.String("val2"),
- Foo: aws.String("val1"),
- }
- req, _ := svc.InputService1TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService2ProtocolTestNestedStructureMembersCase1(t *testing.T) {
- svc := NewInputService2ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService2TestShapeInputShape{
- StructArg: &InputService2TestShapeStructType{
- ScalarArg: aws.String("foo"),
- },
- }
- req, _ := svc.InputService2TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&StructArg.ScalarArg=foo&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService3ProtocolTestListTypesCase1(t *testing.T) {
- svc := NewInputService3ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService3TestShapeInputShape{
- ListArg: []*string{
- aws.String("foo"),
- aws.String("bar"),
- aws.String("baz"),
- },
- }
- req, _ := svc.InputService3TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&ListArg.member.1=foo&ListArg.member.2=bar&ListArg.member.3=baz&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService3ProtocolTestListTypesCase2(t *testing.T) {
- svc := NewInputService3ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService3TestShapeInputShape{
- ListArg: []*string{},
- }
- req, _ := svc.InputService3TestCaseOperation2Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&ListArg=&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService4ProtocolTestFlattenedListCase1(t *testing.T) {
- svc := NewInputService4ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService4TestShapeInputShape{
- ListArg: []*string{
- aws.String("a"),
- aws.String("b"),
- aws.String("c"),
- },
- ScalarArg: aws.String("foo"),
- }
- req, _ := svc.InputService4TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&ListArg.1=a&ListArg.2=b&ListArg.3=c&ScalarArg=foo&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService4ProtocolTestFlattenedListCase2(t *testing.T) {
- svc := NewInputService4ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService4TestShapeInputShape{
- ListArg: []*string{},
- ScalarArg: aws.String("foo"),
- }
- req, _ := svc.InputService4TestCaseOperation2Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&ListArg=&ScalarArg=foo&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService5ProtocolTestSerializeMapTypeCase1(t *testing.T) {
- svc := NewInputService5ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService5TestShapeInputShape{
- MapArg: map[string]*string{
- "key1": aws.String("val1"),
- "key2": aws.String("val2"),
- },
- }
- req, _ := svc.InputService5TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&MapArg.entry.1.key=key1&MapArg.entry.1.value=val1&MapArg.entry.2.key=key2&MapArg.entry.2.value=val2&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService5ProtocolTestSerializeMapTypeCase2(t *testing.T) {
- svc := NewInputService5ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService5TestShapeInputShape{
- MapArg: map[string]*string{},
- }
- req, _ := svc.InputService5TestCaseOperation2Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&MapArg=&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService6ProtocolTestSerializeMapTypeWithLocationNameCase1(t *testing.T) {
- svc := NewInputService6ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService6TestShapeInputShape{
- MapArg: map[string]*string{
- "key1": aws.String("val1"),
- "key2": aws.String("val2"),
- },
- }
- req, _ := svc.InputService6TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&MapArg.entry.1.TheKey=key1&MapArg.entry.1.TheValue=val1&MapArg.entry.2.TheKey=key2&MapArg.entry.2.TheValue=val2&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
- svc := NewInputService7ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService7TestShapeInputShape{
- BlobArg: []byte("foo"),
- }
- req, _ := svc.InputService7TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) {
- svc := NewInputService8ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService8TestShapeInputShape{
- TimeArg: aws.Time(time.Unix(1422172800, 0)),
- }
- req, _ := svc.InputService8TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService9ProtocolTestRecursiveShapesCase1(t *testing.T) {
- svc := NewInputService9ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService9TestShapeInputShape{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- NoRecurse: aws.String("foo"),
- },
- }
- req, _ := svc.InputService9TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&RecursiveStruct.NoRecurse=foo&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService9ProtocolTestRecursiveShapesCase2(t *testing.T) {
- svc := NewInputService9ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService9TestShapeInputShape{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- NoRecurse: aws.String("foo"),
- },
- },
- }
- req, _ := svc.InputService9TestCaseOperation2Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&RecursiveStruct.RecursiveStruct.NoRecurse=foo&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService9ProtocolTestRecursiveShapesCase3(t *testing.T) {
- svc := NewInputService9ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService9TestShapeInputShape{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- NoRecurse: aws.String("foo"),
- },
- },
- },
- },
- }
- req, _ := svc.InputService9TestCaseOperation3Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&RecursiveStruct.RecursiveStruct.RecursiveStruct.RecursiveStruct.NoRecurse=foo&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService9ProtocolTestRecursiveShapesCase4(t *testing.T) {
- svc := NewInputService9ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService9TestShapeInputShape{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- RecursiveList: []*InputService9TestShapeRecursiveStructType{
- {
- NoRecurse: aws.String("foo"),
- },
- {
- NoRecurse: aws.String("bar"),
- },
- },
- },
- }
- req, _ := svc.InputService9TestCaseOperation4Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.NoRecurse=bar&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService9ProtocolTestRecursiveShapesCase5(t *testing.T) {
- svc := NewInputService9ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService9TestShapeInputShape{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- RecursiveList: []*InputService9TestShapeRecursiveStructType{
- {
- NoRecurse: aws.String("foo"),
- },
- {
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- NoRecurse: aws.String("bar"),
- },
- },
- },
- },
- }
- req, _ := svc.InputService9TestCaseOperation5Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.RecursiveStruct.NoRecurse=bar&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService9ProtocolTestRecursiveShapesCase6(t *testing.T) {
- svc := NewInputService9ProtocolTest(nil)
- svc.Endpoint = "https://test"
-
- input := &InputService9TestShapeInputShape{
- RecursiveStruct: &InputService9TestShapeRecursiveStructType{
- RecursiveMap: map[string]*InputService9TestShapeRecursiveStructType{
- "bar": {
- NoRecurse: aws.String("bar"),
- },
- "foo": {
- NoRecurse: aws.String("foo"),
- },
- },
- },
- }
- req, _ := svc.InputService9TestCaseOperation6Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- assert.Equal(t, util.Trim(`Action=OperationName&RecursiveStruct.RecursiveMap.entry.1.key=bar&RecursiveStruct.RecursiveMap.entry.1.value.NoRecurse=bar&RecursiveStruct.RecursiveMap.entry.2.key=foo&RecursiveStruct.RecursiveMap.entry.2.value.NoRecurse=foo&Version=2014-01-01`), util.Trim(string(body)))
-
- // assert URL
- assert.Equal(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/queryutil/queryutil.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/queryutil/queryutil.go
deleted file mode 100644
index 3b417a89f71..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/queryutil/queryutil.go
+++ /dev/null
@@ -1,223 +0,0 @@
-package queryutil
-
-import (
- "encoding/base64"
- "fmt"
- "net/url"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-)
-
-// Parse parses an object i and fills a url.Values object. The isEC2 flag
-// indicates if this is the EC2 Query sub-protocol.
-func Parse(body url.Values, i interface{}, isEC2 bool) error {
- q := queryParser{isEC2: isEC2}
- return q.parseValue(body, reflect.ValueOf(i), "", "")
-}
-
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
-
-type queryParser struct {
- isEC2 bool
-}
-
-func (q *queryParser) parseValue(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- value = elemOf(value)
-
- // no need to handle zero values
- if !value.IsValid() {
- return nil
- }
-
- t := tag.Get("type")
- if t == "" {
- switch value.Kind() {
- case reflect.Struct:
- t = "structure"
- case reflect.Slice:
- t = "list"
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- return q.parseStruct(v, value, prefix)
- case "list":
- return q.parseList(v, value, prefix, tag)
- case "map":
- return q.parseMap(v, value, prefix, tag)
- default:
- return q.parseScalar(v, value, prefix, tag)
- }
-}
-
-func (q *queryParser) parseStruct(v url.Values, value reflect.Value, prefix string) error {
- if !value.IsValid() {
- return nil
- }
-
- t := value.Type()
- for i := 0; i < value.NumField(); i++ {
- if c := t.Field(i).Name[0:1]; strings.ToLower(c) == c {
- continue // ignore unexported fields
- }
-
- value := elemOf(value.Field(i))
- field := t.Field(i)
- var name string
-
- if q.isEC2 {
- name = field.Tag.Get("queryName")
- }
- if name == "" {
- if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
- name = field.Tag.Get("locationNameList")
- } else if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
- if name != "" && q.isEC2 {
- name = strings.ToUpper(name[0:1]) + name[1:]
- }
- }
- if name == "" {
- name = field.Name
- }
-
- if prefix != "" {
- name = prefix + "." + name
- }
-
- if err := q.parseValue(v, value, name, field.Tag); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- // If it's empty, generate an empty value
- if !value.IsNil() && value.Len() == 0 {
- v.Set(prefix, "")
- return nil
- }
-
- // check for unflattened list member
- if !q.isEC2 && tag.Get("flattened") == "" {
- prefix += ".member"
- }
-
- for i := 0; i < value.Len(); i++ {
- slicePrefix := prefix
- if slicePrefix == "" {
- slicePrefix = strconv.Itoa(i + 1)
- } else {
- slicePrefix = slicePrefix + "." + strconv.Itoa(i+1)
- }
- if err := q.parseValue(v, value.Index(i), slicePrefix, ""); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (q *queryParser) parseMap(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- // If it's empty, generate an empty value
- if !value.IsNil() && value.Len() == 0 {
- v.Set(prefix, "")
- return nil
- }
-
- // check for unflattened list member
- if !q.isEC2 && tag.Get("flattened") == "" {
- prefix += ".entry"
- }
-
- // sort keys for improved serialization consistency.
- // this is not strictly necessary for protocol support.
- mapKeyValues := value.MapKeys()
- mapKeys := map[string]reflect.Value{}
- mapKeyNames := make([]string, len(mapKeyValues))
- for i, mapKey := range mapKeyValues {
- name := mapKey.String()
- mapKeys[name] = mapKey
- mapKeyNames[i] = name
- }
- sort.Strings(mapKeyNames)
-
- for i, mapKeyName := range mapKeyNames {
- mapKey := mapKeys[mapKeyName]
- mapValue := value.MapIndex(mapKey)
-
- kname := tag.Get("locationNameKey")
- if kname == "" {
- kname = "key"
- }
- vname := tag.Get("locationNameValue")
- if vname == "" {
- vname = "value"
- }
-
- // serialize key
- var keyName string
- if prefix == "" {
- keyName = strconv.Itoa(i+1) + "." + kname
- } else {
- keyName = prefix + "." + strconv.Itoa(i+1) + "." + kname
- }
-
- if err := q.parseValue(v, mapKey, keyName, ""); err != nil {
- return err
- }
-
- // serialize value
- var valueName string
- if prefix == "" {
- valueName = strconv.Itoa(i+1) + "." + vname
- } else {
- valueName = prefix + "." + strconv.Itoa(i+1) + "." + vname
- }
-
- if err := q.parseValue(v, mapValue, valueName, ""); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, tag reflect.StructTag) error {
- switch value := r.Interface().(type) {
- case string:
- v.Set(name, value)
- case []byte:
- if !r.IsNil() {
- v.Set(name, base64.StdEncoding.EncodeToString(value))
- }
- case bool:
- v.Set(name, strconv.FormatBool(value))
- case int64:
- v.Set(name, strconv.FormatInt(value, 10))
- case int:
- v.Set(name, strconv.Itoa(value))
- case float64:
- v.Set(name, strconv.FormatFloat(value, 'f', -1, 64))
- case float32:
- v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32))
- case time.Time:
- const ISO8601UTC = "2006-01-02T15:04:05Z"
- v.Set(name, value.UTC().Format(ISO8601UTC))
- default:
- return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name())
- }
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal.go
deleted file mode 100644
index e8cfa926b65..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package query
-
-//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/output/query.json unmarshal_test.go
-
-import (
- "encoding/xml"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
-)
-
-// Unmarshal unmarshals a response for an AWS Query service.
-func Unmarshal(r *aws.Request) {
- defer r.HTTPResponse.Body.Close()
- if r.DataFilled() {
- decoder := xml.NewDecoder(r.HTTPResponse.Body)
- err := xmlutil.UnmarshalXML(r.Data, decoder, r.Operation.Name+"Result")
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed decoding Query response", err)
- return
- }
- }
-}
-
-// UnmarshalMeta unmarshals header response values for an AWS Query service.
-func UnmarshalMeta(r *aws.Request) {
- // TODO implement unmarshaling of request IDs
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go
deleted file mode 100644
index d88ee335805..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package query
-
-import (
- "encoding/xml"
- "io"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-type xmlErrorResponse struct {
- XMLName xml.Name `xml:"ErrorResponse"`
- Code string `xml:"Error>Code"`
- Message string `xml:"Error>Message"`
- RequestID string `xml:"RequestId"`
-}
-
-// UnmarshalError unmarshals an error response for an AWS Query service.
-func UnmarshalError(r *aws.Request) {
- defer r.HTTPResponse.Body.Close()
-
- resp := &xmlErrorResponse{}
- err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp)
- if err != nil && err != io.EOF {
- r.Error = awserr.New("SerializationError", "failed to decode query XML error response", err)
- } else {
- r.Error = awserr.NewRequestFailure(
- awserr.New(resp.Code, resp.Message, nil),
- r.HTTPResponse.StatusCode,
- resp.RequestID,
- )
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_test.go
deleted file mode 100644
index a44060ce8fe..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_test.go
+++ /dev/null
@@ -1,1418 +0,0 @@
-package query_test
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/internal/protocol/query"
- "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/internal/signer/v4"
- "github.com/aws/aws-sdk-go/internal/util"
- "github.com/stretchr/testify/assert"
-)
-
-var _ bytes.Buffer // always import bytes
-var _ http.Request
-var _ json.Marshaler
-var _ time.Time
-var _ xmlutil.XMLNode
-var _ xml.Attr
-var _ = ioutil.Discard
-var _ = util.Trim("")
-var _ = url.Values{}
-var _ = io.EOF
-
-type OutputService1ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService1ProtocolTest client.
-func NewOutputService1ProtocolTest(config *aws.Config) *OutputService1ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice1protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService1ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService1ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService1TestCaseOperation1 = "OperationName"
-
-// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation.
-func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *aws.Request, output *OutputService1TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService1TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService1TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputShape, error) {
- req, out := c.OutputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- metadataOutputService1TestShapeOutputService1TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService1TestShapeOutputShape struct {
- Char *string `type:"character"`
-
- Double *float64 `type:"double"`
-
- FalseBool *bool `type:"boolean"`
-
- Float *float64 `type:"float"`
-
- Long *int64 `type:"long"`
-
- Num *int64 `locationName:"FooNum" type:"integer"`
-
- Str *string `type:"string"`
-
- Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- TrueBool *bool `type:"boolean"`
-
- metadataOutputService1TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService1TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService2ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService2ProtocolTest client.
-func NewOutputService2ProtocolTest(config *aws.Config) *OutputService2ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice2protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService2ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService2ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService2TestCaseOperation1 = "OperationName"
-
-// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation.
-func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *aws.Request, output *OutputService2TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService2TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService2TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputShape, error) {
- req, out := c.OutputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- metadataOutputService2TestShapeOutputService2TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService2TestShapeOutputShape struct {
- Num *int64 `type:"integer"`
-
- Str *string `type:"string"`
-
- metadataOutputService2TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService2TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService3ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService3ProtocolTest client.
-func NewOutputService3ProtocolTest(config *aws.Config) *OutputService3ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice3protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService3ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService3ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService3TestCaseOperation1 = "OperationName"
-
-// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation.
-func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *aws.Request, output *OutputService3TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService3TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService3TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputShape, error) {
- req, out := c.OutputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- metadataOutputService3TestShapeOutputService3TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService3TestShapeOutputShape struct {
- Blob []byte `type:"blob"`
-
- metadataOutputService3TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService3TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService4ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService4ProtocolTest client.
-func NewOutputService4ProtocolTest(config *aws.Config) *OutputService4ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice4protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService4ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService4ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService4TestCaseOperation1 = "OperationName"
-
-// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation.
-func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *aws.Request, output *OutputService4TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService4TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService4TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputShape, error) {
- req, out := c.OutputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- metadataOutputService4TestShapeOutputService4TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService4TestShapeOutputShape struct {
- ListMember []*string `type:"list"`
-
- metadataOutputService4TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService4TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService5ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService5ProtocolTest client.
-func NewOutputService5ProtocolTest(config *aws.Config) *OutputService5ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice5protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService5ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService5ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService5TestCaseOperation1 = "OperationName"
-
-// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation.
-func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *aws.Request, output *OutputService5TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService5TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService5TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputShape, error) {
- req, out := c.OutputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- metadataOutputService5TestShapeOutputService5TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService5TestShapeOutputShape struct {
- ListMember []*string `locationNameList:"item" type:"list"`
-
- metadataOutputService5TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService5TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService6ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService6ProtocolTest client.
-func NewOutputService6ProtocolTest(config *aws.Config) *OutputService6ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice6protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService6ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService6ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService6TestCaseOperation1 = "OperationName"
-
-// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation.
-func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *aws.Request, output *OutputService6TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService6TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService6TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputShape, error) {
- req, out := c.OutputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- metadataOutputService6TestShapeOutputService6TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService6TestShapeOutputShape struct {
- ListMember []*string `type:"list" flattened:"true"`
-
- metadataOutputService6TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService7ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService7ProtocolTest client.
-func NewOutputService7ProtocolTest(config *aws.Config) *OutputService7ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice7protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService7ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService7TestCaseOperation1 = "OperationName"
-
-// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation.
-func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *aws.Request, output *OutputService7TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService7TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService7TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputShape, error) {
- req, out := c.OutputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- metadataOutputService7TestShapeOutputService7TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService7TestShapeOutputShape struct {
- ListMember []*string `type:"list" flattened:"true"`
-
- metadataOutputService7TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService7TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService8ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService8ProtocolTest client.
-func NewOutputService8ProtocolTest(config *aws.Config) *OutputService8ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice8protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService8ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService8ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService8TestCaseOperation1 = "OperationName"
-
-// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation.
-func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *aws.Request, output *OutputService8TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService8TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService8TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputShape, error) {
- req, out := c.OutputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- metadataOutputService8TestShapeOutputService8TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService8TestShapeOutputShape struct {
- List []*OutputService8TestShapeStructureShape `type:"list"`
-
- metadataOutputService8TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService8TestShapeStructureShape struct {
- Bar *string `type:"string"`
-
- Baz *string `type:"string"`
-
- Foo *string `type:"string"`
-
- metadataOutputService8TestShapeStructureShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeStructureShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService9ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService9ProtocolTest client.
-func NewOutputService9ProtocolTest(config *aws.Config) *OutputService9ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice9protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService9ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService9ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService9ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService9TestCaseOperation1 = "OperationName"
-
-// OutputService9TestCaseOperation1Request generates a request for the OutputService9TestCaseOperation1 operation.
-func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *aws.Request, output *OutputService9TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService9TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService9TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputShape, error) {
- req, out := c.OutputService9TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService9TestShapeOutputService9TestCaseOperation1Input struct {
- metadataOutputService9TestShapeOutputService9TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService9TestShapeOutputService9TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService9TestShapeOutputShape struct {
- List []*OutputService9TestShapeStructureShape `type:"list" flattened:"true"`
-
- metadataOutputService9TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService9TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService9TestShapeStructureShape struct {
- Bar *string `type:"string"`
-
- Baz *string `type:"string"`
-
- Foo *string `type:"string"`
-
- metadataOutputService9TestShapeStructureShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService9TestShapeStructureShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService10ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService10ProtocolTest client.
-func NewOutputService10ProtocolTest(config *aws.Config) *OutputService10ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice10protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService10ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService10ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService10ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService10TestCaseOperation1 = "OperationName"
-
-// OutputService10TestCaseOperation1Request generates a request for the OutputService10TestCaseOperation1 operation.
-func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *aws.Request, output *OutputService10TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService10TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService10TestShapeOutputService10TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService10TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputShape, error) {
- req, out := c.OutputService10TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService10TestShapeOutputService10TestCaseOperation1Input struct {
- metadataOutputService10TestShapeOutputService10TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService10TestShapeOutputService10TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService10TestShapeOutputShape struct {
- List []*string `locationNameList:"NamedList" type:"list" flattened:"true"`
-
- metadataOutputService10TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService10TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService11ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService11ProtocolTest client.
-func NewOutputService11ProtocolTest(config *aws.Config) *OutputService11ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice11protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService11ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService11ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService11ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService11TestCaseOperation1 = "OperationName"
-
-// OutputService11TestCaseOperation1Request generates a request for the OutputService11TestCaseOperation1 operation.
-func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *aws.Request, output *OutputService11TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService11TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService11TestShapeOutputService11TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService11TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputShape, error) {
- req, out := c.OutputService11TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService11TestShapeOutputService11TestCaseOperation1Input struct {
- metadataOutputService11TestShapeOutputService11TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService11TestShapeOutputService11TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService11TestShapeOutputShape struct {
- Map map[string]*OutputService11TestShapeStructType `type:"map"`
-
- metadataOutputService11TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService11TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService11TestShapeStructType struct {
- Foo *string `locationName:"foo" type:"string"`
-
- metadataOutputService11TestShapeStructType `json:"-" xml:"-"`
-}
-
-type metadataOutputService11TestShapeStructType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService12ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService12ProtocolTest client.
-func NewOutputService12ProtocolTest(config *aws.Config) *OutputService12ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice12protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService12ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService12ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService12ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService12TestCaseOperation1 = "OperationName"
-
-// OutputService12TestCaseOperation1Request generates a request for the OutputService12TestCaseOperation1 operation.
-func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *aws.Request, output *OutputService12TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService12TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService12TestShapeOutputService12TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService12TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputShape, error) {
- req, out := c.OutputService12TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService12TestShapeOutputService12TestCaseOperation1Input struct {
- metadataOutputService12TestShapeOutputService12TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService12TestShapeOutputService12TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService12TestShapeOutputShape struct {
- Map map[string]*string `type:"map" flattened:"true"`
-
- metadataOutputService12TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService12TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService13ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService13ProtocolTest client.
-func NewOutputService13ProtocolTest(config *aws.Config) *OutputService13ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice13protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService13ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService13ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService13ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService13TestCaseOperation1 = "OperationName"
-
-// OutputService13TestCaseOperation1Request generates a request for the OutputService13TestCaseOperation1 operation.
-func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1Request(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (req *aws.Request, output *OutputService13TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService13TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService13TestShapeOutputService13TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService13TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (*OutputService13TestShapeOutputShape, error) {
- req, out := c.OutputService13TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService13TestShapeOutputService13TestCaseOperation1Input struct {
- metadataOutputService13TestShapeOutputService13TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService13TestShapeOutputService13TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService13TestShapeOutputShape struct {
- Map map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
-
- metadataOutputService13TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService13TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService14ProtocolTest struct {
- *aws.Service
-}
-
-// New returns a new OutputService14ProtocolTest client.
-func NewOutputService14ProtocolTest(config *aws.Config) *OutputService14ProtocolTest {
- service := &aws.Service{
- Config: aws.DefaultConfig.Merge(config),
- ServiceName: "outputservice14protocoltest",
- APIVersion: "",
- }
- service.Initialize()
-
- // Handlers
- service.Handlers.Sign.PushBack(v4.Sign)
- service.Handlers.Build.PushBack(query.Build)
- service.Handlers.Unmarshal.PushBack(query.Unmarshal)
- service.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- service.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return &OutputService14ProtocolTest{service}
-}
-
-// newRequest creates a new request for a OutputService14ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService14ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
- req := aws.NewRequest(c.Service, op, params, data)
-
- return req
-}
-
-const opOutputService14TestCaseOperation1 = "OperationName"
-
-// OutputService14TestCaseOperation1Request generates a request for the OutputService14TestCaseOperation1 operation.
-func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1Request(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (req *aws.Request, output *OutputService14TestShapeOutputShape) {
- op := &aws.Operation{
- Name: opOutputService14TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService14TestShapeOutputService14TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService14TestShapeOutputShape{}
- req.Data = output
- return
-}
-
-func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (*OutputService14TestShapeOutputShape, error) {
- req, out := c.OutputService14TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService14TestShapeOutputService14TestCaseOperation1Input struct {
- metadataOutputService14TestShapeOutputService14TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService14TestShapeOutputService14TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService14TestShapeOutputShape struct {
- Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"`
-
- metadataOutputService14TestShapeOutputShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService14TestShapeOutputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//
-// Tests begin here
-//
-
-func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- svc := NewOutputService1ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("myname123falsetrue1.21.3200a2015-01-25T08:00:00Zrequest-id"))
- req, out := svc.OutputService1TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.Char)
- assert.Equal(t, 1.3, *out.Double)
- assert.Equal(t, false, *out.FalseBool)
- assert.Equal(t, 1.2, *out.Float)
- assert.Equal(t, int64(200), *out.Long)
- assert.Equal(t, int64(123), *out.Num)
- assert.Equal(t, "myname", *out.Str)
- assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
- assert.Equal(t, true, *out.TrueBool)
-
-}
-
-func TestOutputService2ProtocolTestNotAllMembersInResponseCase1(t *testing.T) {
- svc := NewOutputService2ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("mynamerequest-id"))
- req, out := svc.OutputService2TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "myname", *out.Str)
-
-}
-
-func TestOutputService3ProtocolTestBlobCase1(t *testing.T) {
- svc := NewOutputService3ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("dmFsdWU=requestid"))
- req, out := svc.OutputService3TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "value", string(out.Blob))
-
-}
-
-func TestOutputService4ProtocolTestListsCase1(t *testing.T) {
- svc := NewOutputService4ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService4TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService5ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
- svc := NewOutputService5ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService5TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService6ProtocolTestFlattenedListCase1(t *testing.T) {
- svc := NewOutputService6ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService6TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService7ProtocolTestFlattenedSingleElementListCase1(t *testing.T) {
- svc := NewOutputService7ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("abcrequestid"))
- req, out := svc.OutputService7TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
-
-}
-
-func TestOutputService8ProtocolTestListOfStructuresCase1(t *testing.T) {
- svc := NewOutputService8ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("firstfoofirstbarfirstbazsecondfoosecondbarsecondbazrequestid"))
- req, out := svc.OutputService8TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "firstbar", *out.List[0].Bar)
- assert.Equal(t, "firstbaz", *out.List[0].Baz)
- assert.Equal(t, "firstfoo", *out.List[0].Foo)
- assert.Equal(t, "secondbar", *out.List[1].Bar)
- assert.Equal(t, "secondbaz", *out.List[1].Baz)
- assert.Equal(t, "secondfoo", *out.List[1].Foo)
-
-}
-
-func TestOutputService9ProtocolTestFlattenedListOfStructuresCase1(t *testing.T) {
- svc := NewOutputService9ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("firstfoofirstbarfirstbazsecondfoosecondbarsecondbazrequestid"))
- req, out := svc.OutputService9TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "firstbar", *out.List[0].Bar)
- assert.Equal(t, "firstbaz", *out.List[0].Baz)
- assert.Equal(t, "firstfoo", *out.List[0].Foo)
- assert.Equal(t, "secondbar", *out.List[1].Bar)
- assert.Equal(t, "secondbaz", *out.List[1].Baz)
- assert.Equal(t, "secondfoo", *out.List[1].Foo)
-
-}
-
-func TestOutputService10ProtocolTestFlattenedListWithLocationNameCase1(t *testing.T) {
- svc := NewOutputService10ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("abrequestid"))
- req, out := svc.OutputService10TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.List[0])
- assert.Equal(t, "b", *out.List[1])
-
-}
-
-func TestOutputService11ProtocolTestNormalMapCase1(t *testing.T) {
- svc := NewOutputService11ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService11TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"].Foo)
- assert.Equal(t, "bar", *out.Map["qux"].Foo)
-
-}
-
-func TestOutputService12ProtocolTestFlattenedMapCase1(t *testing.T) {
- svc := NewOutputService12ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService12TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
-
-func TestOutputService13ProtocolTestFlattenedMapInShapeDefinitionCase1(t *testing.T) {
- svc := NewOutputService13ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("quxbarrequestid"))
- req, out := svc.OutputService13TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
-
-func TestOutputService14ProtocolTestNamedMapCase1(t *testing.T) {
- svc := NewOutputService14ProtocolTest(nil)
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService14TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go
deleted file mode 100644
index 8917ad7a9bc..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go
+++ /dev/null
@@ -1,217 +0,0 @@
-// Package rest provides RESTful serialisation of AWS requests and responses.
-package rest
-
-import (
- "bytes"
- "encoding/base64"
- "fmt"
- "io"
- "net/url"
- "path"
- "reflect"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// RFC822 returns an RFC822 formatted timestamp for AWS protocols
-const RFC822 = "Mon, 2 Jan 2006 15:04:05 GMT"
-
-// Whether the byte value can be sent without escaping in AWS URLs
-var noEscape [256]bool
-
-func init() {
- for i := 0; i < len(noEscape); i++ {
- // AWS expects every character except these to be escaped
- noEscape[i] = (i >= 'A' && i <= 'Z') ||
- (i >= 'a' && i <= 'z') ||
- (i >= '0' && i <= '9') ||
- i == '-' ||
- i == '.' ||
- i == '_' ||
- i == '~'
- }
-}
-
-// Build builds the REST component of a service request.
-func Build(r *aws.Request) {
- if r.ParamsFilled() {
- v := reflect.ValueOf(r.Params).Elem()
- buildLocationElements(r, v)
- buildBody(r, v)
- }
-}
-
-func buildLocationElements(r *aws.Request, v reflect.Value) {
- query := r.HTTPRequest.URL.Query()
-
- for i := 0; i < v.NumField(); i++ {
- m := v.Field(i)
- if n := v.Type().Field(i).Name; n[0:1] == strings.ToLower(n[0:1]) {
- continue
- }
-
- if m.IsValid() {
- field := v.Type().Field(i)
- name := field.Tag.Get("locationName")
- if name == "" {
- name = field.Name
- }
- if m.Kind() == reflect.Ptr {
- m = m.Elem()
- }
- if !m.IsValid() {
- continue
- }
-
- switch field.Tag.Get("location") {
- case "headers": // header maps
- buildHeaderMap(r, m, field.Tag.Get("locationName"))
- case "header":
- buildHeader(r, m, name)
- case "uri":
- buildURI(r, m, name)
- case "querystring":
- buildQueryString(r, m, name, query)
- }
- }
- if r.Error != nil {
- return
- }
- }
-
- r.HTTPRequest.URL.RawQuery = query.Encode()
- updatePath(r.HTTPRequest.URL, r.HTTPRequest.URL.Path)
-}
-
-func buildBody(r *aws.Request, v reflect.Value) {
- if field, ok := v.Type().FieldByName("SDKShapeTraits"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- pfield, _ := v.Type().FieldByName(payloadName)
- if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
- payload := reflect.Indirect(v.FieldByName(payloadName))
- if payload.IsValid() && payload.Interface() != nil {
- switch reader := payload.Interface().(type) {
- case io.ReadSeeker:
- r.SetReaderBody(reader)
- case []byte:
- r.SetBufferBody(reader)
- case string:
- r.SetStringBody(reader)
- default:
- r.Error = awserr.New("SerializationError",
- "failed to encode REST request",
- fmt.Errorf("unknown payload type %s", payload.Type()))
- }
- }
- }
- }
- }
-}
-
-func buildHeader(r *aws.Request, v reflect.Value, name string) {
- str, err := convertType(v)
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed to encode REST request", err)
- } else if str != nil {
- r.HTTPRequest.Header.Add(name, *str)
- }
-}
-
-func buildHeaderMap(r *aws.Request, v reflect.Value, prefix string) {
- for _, key := range v.MapKeys() {
- str, err := convertType(v.MapIndex(key))
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed to encode REST request", err)
- } else if str != nil {
- r.HTTPRequest.Header.Add(prefix+key.String(), *str)
- }
- }
-}
-
-func buildURI(r *aws.Request, v reflect.Value, name string) {
- value, err := convertType(v)
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed to encode REST request", err)
- } else if value != nil {
- uri := r.HTTPRequest.URL.Path
- uri = strings.Replace(uri, "{"+name+"}", EscapePath(*value, true), -1)
- uri = strings.Replace(uri, "{"+name+"+}", EscapePath(*value, false), -1)
- r.HTTPRequest.URL.Path = uri
- }
-}
-
-func buildQueryString(r *aws.Request, v reflect.Value, name string, query url.Values) {
- str, err := convertType(v)
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed to encode REST request", err)
- } else if str != nil {
- query.Set(name, *str)
- }
-}
-
-func updatePath(url *url.URL, urlPath string) {
- scheme, query := url.Scheme, url.RawQuery
-
- hasSlash := strings.HasSuffix(urlPath, "/")
-
- // clean up path
- urlPath = path.Clean(urlPath)
- if hasSlash && !strings.HasSuffix(urlPath, "/") {
- urlPath += "/"
- }
-
- // get formatted URL minus scheme so we can build this into Opaque
- url.Scheme, url.Path, url.RawQuery = "", "", ""
- s := url.String()
- url.Scheme = scheme
- url.RawQuery = query
-
- // build opaque URI
- url.Opaque = s + urlPath
-}
-
-// EscapePath escapes part of a URL path in Amazon style
-func EscapePath(path string, encodeSep bool) string {
- var buf bytes.Buffer
- for i := 0; i < len(path); i++ {
- c := path[i]
- if noEscape[c] || (c == '/' && !encodeSep) {
- buf.WriteByte(c)
- } else {
- buf.WriteByte('%')
- buf.WriteString(strings.ToUpper(strconv.FormatUint(uint64(c), 16)))
- }
- }
- return buf.String()
-}
-
-func convertType(v reflect.Value) (*string, error) {
- v = reflect.Indirect(v)
- if !v.IsValid() {
- return nil, nil
- }
-
- var str string
- switch value := v.Interface().(type) {
- case string:
- str = value
- case []byte:
- str = base64.StdEncoding.EncodeToString(value)
- case bool:
- str = strconv.FormatBool(value)
- case int64:
- str = strconv.FormatInt(value, 10)
- case float64:
- str = strconv.FormatFloat(value, 'f', -1, 64)
- case time.Time:
- str = value.UTC().Format(RFC822)
- default:
- err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
- return nil, err
- }
- return &str, nil
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go
deleted file mode 100644
index a4155f16699..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go
+++ /dev/null
@@ -1,174 +0,0 @@
-package rest
-
-import (
- "encoding/base64"
- "fmt"
- "io/ioutil"
- "net/http"
- "reflect"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// Unmarshal unmarshals the REST component of a response in a REST service.
-func Unmarshal(r *aws.Request) {
- if r.DataFilled() {
- v := reflect.Indirect(reflect.ValueOf(r.Data))
- unmarshalBody(r, v)
- unmarshalLocationElements(r, v)
- }
-}
-
-func unmarshalBody(r *aws.Request, v reflect.Value) {
- if field, ok := v.Type().FieldByName("SDKShapeTraits"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- pfield, _ := v.Type().FieldByName(payloadName)
- if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
- payload := v.FieldByName(payloadName)
- if payload.IsValid() {
- switch payload.Interface().(type) {
- case []byte:
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed to decode REST response", err)
- } else {
- payload.Set(reflect.ValueOf(b))
- }
- case *string:
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed to decode REST response", err)
- } else {
- str := string(b)
- payload.Set(reflect.ValueOf(&str))
- }
- default:
- switch payload.Type().String() {
- case "io.ReadSeeker":
- payload.Set(reflect.ValueOf(aws.ReadSeekCloser(r.HTTPResponse.Body)))
- case "aws.ReadSeekCloser", "io.ReadCloser":
- payload.Set(reflect.ValueOf(r.HTTPResponse.Body))
- default:
- r.Error = awserr.New("SerializationError",
- "failed to decode REST response",
- fmt.Errorf("unknown payload type %s", payload.Type()))
- }
- }
- }
- }
- }
- }
-}
-
-func unmarshalLocationElements(r *aws.Request, v reflect.Value) {
- for i := 0; i < v.NumField(); i++ {
- m, field := v.Field(i), v.Type().Field(i)
- if n := field.Name; n[0:1] == strings.ToLower(n[0:1]) {
- continue
- }
-
- if m.IsValid() {
- name := field.Tag.Get("locationName")
- if name == "" {
- name = field.Name
- }
-
- switch field.Tag.Get("location") {
- case "statusCode":
- unmarshalStatusCode(m, r.HTTPResponse.StatusCode)
- case "header":
- err := unmarshalHeader(m, r.HTTPResponse.Header.Get(name))
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed to decode REST response", err)
- break
- }
- case "headers":
- prefix := field.Tag.Get("locationName")
- err := unmarshalHeaderMap(m, r.HTTPResponse.Header, prefix)
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed to decode REST response", err)
- break
- }
- }
- }
- if r.Error != nil {
- return
- }
- }
-}
-
-func unmarshalStatusCode(v reflect.Value, statusCode int) {
- if !v.IsValid() {
- return
- }
-
- switch v.Interface().(type) {
- case *int64:
- s := int64(statusCode)
- v.Set(reflect.ValueOf(&s))
- }
-}
-
-func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string) error {
- switch r.Interface().(type) {
- case map[string]*string: // we only support string map value types
- out := map[string]*string{}
- for k, v := range headers {
- k = http.CanonicalHeaderKey(k)
- if strings.HasPrefix(strings.ToLower(k), strings.ToLower(prefix)) {
- out[k[len(prefix):]] = &v[0]
- }
- }
- r.Set(reflect.ValueOf(out))
- }
- return nil
-}
-
-func unmarshalHeader(v reflect.Value, header string) error {
- if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) {
- return nil
- }
-
- switch v.Interface().(type) {
- case *string:
- v.Set(reflect.ValueOf(&header))
- case []byte:
- b, err := base64.StdEncoding.DecodeString(header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&b))
- case *bool:
- b, err := strconv.ParseBool(header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&b))
- case *int64:
- i, err := strconv.ParseInt(header, 10, 64)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&i))
- case *float64:
- f, err := strconv.ParseFloat(header, 64)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&f))
- case *time.Time:
- t, err := time.Parse(RFC822, header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&t))
- default:
- err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
- return err
- }
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/build.go
deleted file mode 100644
index d3db250231b..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/build.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Package xmlutil provides XML serialisation of AWS requests and responses.
-package xmlutil
-
-import (
- "encoding/base64"
- "encoding/xml"
- "fmt"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-)
-
-// BuildXML will serialize params into an xml.Encoder.
-// Error will be returned if the serialization of any of the params or nested values fails.
-func BuildXML(params interface{}, e *xml.Encoder) error {
- b := xmlBuilder{encoder: e, namespaces: map[string]string{}}
- root := NewXMLElement(xml.Name{})
- if err := b.buildValue(reflect.ValueOf(params), root, ""); err != nil {
- return err
- }
- for _, c := range root.Children {
- for _, v := range c {
- return StructToXML(e, v, false)
- }
- }
- return nil
-}
-
-// Returns the reflection element of a value, if it is a pointer.
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
-
-// A xmlBuilder serializes values from Go code to XML
-type xmlBuilder struct {
- encoder *xml.Encoder
- namespaces map[string]string
-}
-
-// buildValue generic XMLNode builder for any type. Will build value for their specific type
-// struct, list, map, scalar.
-//
-// Also takes a "type" tag value to set what type a value should be converted to XMLNode as. If
-// type is not provided reflect will be used to determine the value's type.
-func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- value = elemOf(value)
- if !value.IsValid() { // no need to handle zero values
- return nil
- } else if tag.Get("location") != "" { // don't handle non-body location values
- return nil
- }
-
- t := tag.Get("type")
- if t == "" {
- switch value.Kind() {
- case reflect.Struct:
- t = "structure"
- case reflect.Slice:
- t = "list"
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- if field, ok := value.Type().FieldByName("SDKShapeTraits"); ok {
- tag = tag + reflect.StructTag(" ") + field.Tag
- }
- return b.buildStruct(value, current, tag)
- case "list":
- return b.buildList(value, current, tag)
- case "map":
- return b.buildMap(value, current, tag)
- default:
- return b.buildScalar(value, current, tag)
- }
-}
-
-// buildStruct adds a struct and its fields to the current XMLNode. All fields any any nested
-// types are converted to XMLNodes also.
-func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if !value.IsValid() {
- return nil
- }
-
- fieldAdded := false
-
- // unwrap payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := value.Type().FieldByName(payload)
- tag = field.Tag
- value = elemOf(value.FieldByName(payload))
-
- if !value.IsValid() {
- return nil
- }
- }
-
- child := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
-
- // there is an xmlNamespace associated with this struct
- if prefix, uri := tag.Get("xmlPrefix"), tag.Get("xmlURI"); uri != "" {
- ns := xml.Attr{
- Name: xml.Name{Local: "xmlns"},
- Value: uri,
- }
- if prefix != "" {
- b.namespaces[prefix] = uri // register the namespace
- ns.Name.Local = "xmlns:" + prefix
- }
-
- child.Attr = append(child.Attr, ns)
- }
-
- t := value.Type()
- for i := 0; i < value.NumField(); i++ {
- if c := t.Field(i).Name[0:1]; strings.ToLower(c) == c {
- continue // ignore unexported fields
- }
-
- member := elemOf(value.Field(i))
- field := t.Field(i)
- mTag := field.Tag
-
- if mTag.Get("location") != "" { // skip non-body members
- continue
- }
-
- memberName := mTag.Get("locationName")
- if memberName == "" {
- memberName = field.Name
- mTag = reflect.StructTag(string(mTag) + ` locationName:"` + memberName + `"`)
- }
- if err := b.buildValue(member, child, mTag); err != nil {
- return err
- }
-
- fieldAdded = true
- }
-
- if fieldAdded { // only append this child if we have one ore more valid members
- current.AddChild(child)
- }
-
- return nil
-}
-
-// buildList adds the value's list items to the current XMLNode as children nodes. All
-// nested values in the list are converted to XMLNodes also.
-func (b *xmlBuilder) buildList(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if value.IsNil() { // don't build omitted lists
- return nil
- }
-
- // check for unflattened list member
- flattened := tag.Get("flattened") != ""
-
- xname := xml.Name{Local: tag.Get("locationName")}
- if flattened {
- for i := 0; i < value.Len(); i++ {
- child := NewXMLElement(xname)
- current.AddChild(child)
- if err := b.buildValue(value.Index(i), child, ""); err != nil {
- return err
- }
- }
- } else {
- list := NewXMLElement(xname)
- current.AddChild(list)
-
- for i := 0; i < value.Len(); i++ {
- iname := tag.Get("locationNameList")
- if iname == "" {
- iname = "member"
- }
-
- child := NewXMLElement(xml.Name{Local: iname})
- list.AddChild(child)
- if err := b.buildValue(value.Index(i), child, ""); err != nil {
- return err
- }
- }
- }
-
- return nil
-}
-
-// buildMap adds the value's key/value pairs to the current XMLNode as children nodes. All
-// nested values in the map are converted to XMLNodes also.
-//
-// Error will be returned if it is unable to build the map's values into XMLNodes
-func (b *xmlBuilder) buildMap(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if value.IsNil() { // don't build omitted maps
- return nil
- }
-
- maproot := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
- current.AddChild(maproot)
- current = maproot
-
- kname, vname := "key", "value"
- if n := tag.Get("locationNameKey"); n != "" {
- kname = n
- }
- if n := tag.Get("locationNameValue"); n != "" {
- vname = n
- }
-
- // sorting is not required for compliance, but it makes testing easier
- keys := make([]string, value.Len())
- for i, k := range value.MapKeys() {
- keys[i] = k.String()
- }
- sort.Strings(keys)
-
- for _, k := range keys {
- v := value.MapIndex(reflect.ValueOf(k))
-
- mapcur := current
- if tag.Get("flattened") == "" { // add "entry" tag to non-flat maps
- child := NewXMLElement(xml.Name{Local: "entry"})
- mapcur.AddChild(child)
- mapcur = child
- }
-
- kchild := NewXMLElement(xml.Name{Local: kname})
- kchild.Text = k
- vchild := NewXMLElement(xml.Name{Local: vname})
- mapcur.AddChild(kchild)
- mapcur.AddChild(vchild)
-
- if err := b.buildValue(v, vchild, ""); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// buildScalar will convert the value into a string and append it as a attribute or child
-// of the current XMLNode.
-//
-// The value will be added as an attribute if tag contains a "xmlAttribute" attribute value.
-//
-// Error will be returned if the value type is unsupported.
-func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- var str string
- switch converted := value.Interface().(type) {
- case string:
- str = converted
- case []byte:
- if !value.IsNil() {
- str = base64.StdEncoding.EncodeToString(converted)
- }
- case bool:
- str = strconv.FormatBool(converted)
- case int64:
- str = strconv.FormatInt(converted, 10)
- case int:
- str = strconv.Itoa(converted)
- case float64:
- str = strconv.FormatFloat(converted, 'f', -1, 64)
- case float32:
- str = strconv.FormatFloat(float64(converted), 'f', -1, 32)
- case time.Time:
- const ISO8601UTC = "2006-01-02T15:04:05Z"
- str = converted.UTC().Format(ISO8601UTC)
- default:
- return fmt.Errorf("unsupported value for param %s: %v (%s)",
- tag.Get("locationName"), value.Interface(), value.Type().Name())
- }
-
- xname := xml.Name{Local: tag.Get("locationName")}
- if tag.Get("xmlAttribute") != "" { // put into current node's attribute list
- attr := xml.Attr{Name: xname, Value: str}
- current.Attr = append(current.Attr, attr)
- } else { // regular text node
- current.AddChild(&XMLNode{Name: xname, Text: str})
- }
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/functional_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/functional_test.go
deleted file mode 100644
index fbb0e41cdc1..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/functional_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package v4_test
-
-import (
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/internal/test/unit"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/stretchr/testify/assert"
-)
-
-var _ = unit.Imported
-
-func TestPresignHandler(t *testing.T) {
- svc := s3.New(nil)
- req, _ := svc.PutObjectRequest(&s3.PutObjectInput{
- Bucket: aws.String("bucket"),
- Key: aws.String("key"),
- ContentDisposition: aws.String("a+b c$d"),
- ACL: aws.String("public-read"),
- })
- req.Time = time.Unix(0, 0)
- urlstr, err := req.Presign(5 * time.Minute)
-
- assert.NoError(t, err)
-
- expectedDate := "19700101T000000Z"
- expectedHeaders := "host;x-amz-acl"
- expectedSig := "7edcb4e3a1bf12f4989018d75acbe3a7f03df24bd6f3112602d59fc551f0e4e2"
- expectedCred := "AKID/19700101/mock-region/s3/aws4_request"
-
- u, _ := url.Parse(urlstr)
- urlQ := u.Query()
- assert.Equal(t, expectedSig, urlQ.Get("X-Amz-Signature"))
- assert.Equal(t, expectedCred, urlQ.Get("X-Amz-Credential"))
- assert.Equal(t, expectedHeaders, urlQ.Get("X-Amz-SignedHeaders"))
- assert.Equal(t, expectedDate, urlQ.Get("X-Amz-Date"))
- assert.Equal(t, "300", urlQ.Get("X-Amz-Expires"))
-
- assert.NotContains(t, urlstr, "+") // + encoded as %20
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go
deleted file mode 100644
index 748c37f2e65..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go
+++ /dev/null
@@ -1,364 +0,0 @@
-// Package v4 implements signing for AWS V4 signer
-package v4
-
-import (
- "crypto/hmac"
- "crypto/sha256"
- "encoding/hex"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/internal/protocol/rest"
-)
-
-const (
- authHeaderPrefix = "AWS4-HMAC-SHA256"
- timeFormat = "20060102T150405Z"
- shortTimeFormat = "20060102"
-)
-
-var ignoredHeaders = map[string]bool{
- "Authorization": true,
- "Content-Type": true,
- "Content-Length": true,
- "User-Agent": true,
-}
-
-type signer struct {
- Request *http.Request
- Time time.Time
- ExpireTime time.Duration
- ServiceName string
- Region string
- CredValues credentials.Value
- Credentials *credentials.Credentials
- Query url.Values
- Body io.ReadSeeker
- Debug aws.LogLevelType
- Logger aws.Logger
-
- isPresign bool
- formattedTime string
- formattedShortTime string
-
- signedHeaders string
- canonicalHeaders string
- canonicalString string
- credentialString string
- stringToSign string
- signature string
- authorization string
-}
-
-// Sign requests with signature version 4.
-//
-// Will sign the requests with the service config's Credentials object
-// Signing is skipped if the credentials is the credentials.AnonymousCredentials
-// object.
-func Sign(req *aws.Request) {
- // If the request does not need to be signed ignore the signing of the
- // request if the AnonymousCredentials object is used.
- if req.Service.Config.Credentials == credentials.AnonymousCredentials {
- return
- }
-
- region := req.Service.SigningRegion
- if region == "" {
- region = aws.StringValue(req.Service.Config.Region)
- }
-
- name := req.Service.SigningName
- if name == "" {
- name = req.Service.ServiceName
- }
-
- s := signer{
- Request: req.HTTPRequest,
- Time: req.Time,
- ExpireTime: req.ExpireTime,
- Query: req.HTTPRequest.URL.Query(),
- Body: req.Body,
- ServiceName: name,
- Region: region,
- Credentials: req.Service.Config.Credentials,
- Debug: req.Service.Config.LogLevel.Value(),
- Logger: req.Service.Config.Logger,
- }
-
- req.Error = s.sign()
-}
-
-func (v4 *signer) sign() error {
- if v4.ExpireTime != 0 {
- v4.isPresign = true
- }
-
- if v4.isRequestSigned() {
- if !v4.Credentials.IsExpired() {
- // If the request is already signed, and the credentials have not
- // expired yet ignore the signing request.
- return nil
- }
-
- // The credentials have expired for this request. The current signing
- // is invalid, and needs to be request because the request will fail.
- if v4.isPresign {
- v4.removePresign()
- // Update the request's query string to ensure the values stays in
- // sync in the case retrieving the new credentials fails.
- v4.Request.URL.RawQuery = v4.Query.Encode()
- }
- }
-
- var err error
- v4.CredValues, err = v4.Credentials.Get()
- if err != nil {
- return err
- }
-
- if v4.isPresign {
- v4.Query.Set("X-Amz-Algorithm", authHeaderPrefix)
- if v4.CredValues.SessionToken != "" {
- v4.Query.Set("X-Amz-Security-Token", v4.CredValues.SessionToken)
- } else {
- v4.Query.Del("X-Amz-Security-Token")
- }
- } else if v4.CredValues.SessionToken != "" {
- v4.Request.Header.Set("X-Amz-Security-Token", v4.CredValues.SessionToken)
- }
-
- v4.build()
-
- if v4.Debug.Matches(aws.LogDebugWithSigning) {
- v4.logSigningInfo()
- }
-
- return nil
-}
-
-const logSignInfoMsg = `DEBUG: Request Signiture:
----[ CANONICAL STRING ]-----------------------------
-%s
----[ STRING TO SIGN ]--------------------------------
-%s%s
------------------------------------------------------`
-const logSignedURLMsg = `
----[ SIGNED URL ]------------------------------------
-%s`
-
-func (v4 *signer) logSigningInfo() {
- signedURLMsg := ""
- if v4.isPresign {
- signedURLMsg = fmt.Sprintf(logSignedURLMsg, v4.Request.URL.String())
- }
- msg := fmt.Sprintf(logSignInfoMsg, v4.canonicalString, v4.stringToSign, signedURLMsg)
- v4.Logger.Log(msg)
-}
-
-func (v4 *signer) build() {
- v4.buildTime() // no depends
- v4.buildCredentialString() // no depends
- if v4.isPresign {
- v4.buildQuery() // no depends
- }
- v4.buildCanonicalHeaders() // depends on cred string
- v4.buildCanonicalString() // depends on canon headers / signed headers
- v4.buildStringToSign() // depends on canon string
- v4.buildSignature() // depends on string to sign
-
- if v4.isPresign {
- v4.Request.URL.RawQuery += "&X-Amz-Signature=" + v4.signature
- } else {
- parts := []string{
- authHeaderPrefix + " Credential=" + v4.CredValues.AccessKeyID + "/" + v4.credentialString,
- "SignedHeaders=" + v4.signedHeaders,
- "Signature=" + v4.signature,
- }
- v4.Request.Header.Set("Authorization", strings.Join(parts, ", "))
- }
-}
-
-func (v4 *signer) buildTime() {
- v4.formattedTime = v4.Time.UTC().Format(timeFormat)
- v4.formattedShortTime = v4.Time.UTC().Format(shortTimeFormat)
-
- if v4.isPresign {
- duration := int64(v4.ExpireTime / time.Second)
- v4.Query.Set("X-Amz-Date", v4.formattedTime)
- v4.Query.Set("X-Amz-Expires", strconv.FormatInt(duration, 10))
- } else {
- v4.Request.Header.Set("X-Amz-Date", v4.formattedTime)
- }
-}
-
-func (v4 *signer) buildCredentialString() {
- v4.credentialString = strings.Join([]string{
- v4.formattedShortTime,
- v4.Region,
- v4.ServiceName,
- "aws4_request",
- }, "/")
-
- if v4.isPresign {
- v4.Query.Set("X-Amz-Credential", v4.CredValues.AccessKeyID+"/"+v4.credentialString)
- }
-}
-
-func (v4 *signer) buildQuery() {
- for k, h := range v4.Request.Header {
- if strings.HasPrefix(http.CanonicalHeaderKey(k), "X-Amz-") {
- continue // never hoist x-amz-* headers, they must be signed
- }
- if _, ok := ignoredHeaders[http.CanonicalHeaderKey(k)]; ok {
- continue // never hoist ignored headers
- }
-
- v4.Request.Header.Del(k)
- v4.Query.Del(k)
- for _, v := range h {
- v4.Query.Add(k, v)
- }
- }
-}
-
-func (v4 *signer) buildCanonicalHeaders() {
- var headers []string
- headers = append(headers, "host")
- for k := range v4.Request.Header {
- if _, ok := ignoredHeaders[http.CanonicalHeaderKey(k)]; ok {
- continue // ignored header
- }
- headers = append(headers, strings.ToLower(k))
- }
- sort.Strings(headers)
-
- v4.signedHeaders = strings.Join(headers, ";")
-
- if v4.isPresign {
- v4.Query.Set("X-Amz-SignedHeaders", v4.signedHeaders)
- }
-
- headerValues := make([]string, len(headers))
- for i, k := range headers {
- if k == "host" {
- headerValues[i] = "host:" + v4.Request.URL.Host
- } else {
- headerValues[i] = k + ":" +
- strings.Join(v4.Request.Header[http.CanonicalHeaderKey(k)], ",")
- }
- }
-
- v4.canonicalHeaders = strings.Join(headerValues, "\n")
-}
-
-func (v4 *signer) buildCanonicalString() {
- v4.Request.URL.RawQuery = strings.Replace(v4.Query.Encode(), "+", "%20", -1)
- uri := v4.Request.URL.Opaque
- if uri != "" {
- uri = "/" + strings.Join(strings.Split(uri, "/")[3:], "/")
- } else {
- uri = v4.Request.URL.Path
- }
- if uri == "" {
- uri = "/"
- }
-
- if v4.ServiceName != "s3" {
- uri = rest.EscapePath(uri, false)
- }
-
- v4.canonicalString = strings.Join([]string{
- v4.Request.Method,
- uri,
- v4.Request.URL.RawQuery,
- v4.canonicalHeaders + "\n",
- v4.signedHeaders,
- v4.bodyDigest(),
- }, "\n")
-}
-
-func (v4 *signer) buildStringToSign() {
- v4.stringToSign = strings.Join([]string{
- authHeaderPrefix,
- v4.formattedTime,
- v4.credentialString,
- hex.EncodeToString(makeSha256([]byte(v4.canonicalString))),
- }, "\n")
-}
-
-func (v4 *signer) buildSignature() {
- secret := v4.CredValues.SecretAccessKey
- date := makeHmac([]byte("AWS4"+secret), []byte(v4.formattedShortTime))
- region := makeHmac(date, []byte(v4.Region))
- service := makeHmac(region, []byte(v4.ServiceName))
- credentials := makeHmac(service, []byte("aws4_request"))
- signature := makeHmac(credentials, []byte(v4.stringToSign))
- v4.signature = hex.EncodeToString(signature)
-}
-
-func (v4 *signer) bodyDigest() string {
- hash := v4.Request.Header.Get("X-Amz-Content-Sha256")
- if hash == "" {
- if v4.isPresign && v4.ServiceName == "s3" {
- hash = "UNSIGNED-PAYLOAD"
- } else if v4.Body == nil {
- hash = hex.EncodeToString(makeSha256([]byte{}))
- } else {
- hash = hex.EncodeToString(makeSha256Reader(v4.Body))
- }
- v4.Request.Header.Add("X-Amz-Content-Sha256", hash)
- }
- return hash
-}
-
-// isRequestSigned returns if the request is currently signed or presigned
-func (v4 *signer) isRequestSigned() bool {
- if v4.isPresign && v4.Query.Get("X-Amz-Signature") != "" {
- return true
- }
- if v4.Request.Header.Get("Authorization") != "" {
- return true
- }
-
- return false
-}
-
-// unsign removes signing flags for both signed and presigned requests.
-func (v4 *signer) removePresign() {
- v4.Query.Del("X-Amz-Algorithm")
- v4.Query.Del("X-Amz-Signature")
- v4.Query.Del("X-Amz-Security-Token")
- v4.Query.Del("X-Amz-Date")
- v4.Query.Del("X-Amz-Expires")
- v4.Query.Del("X-Amz-Credential")
- v4.Query.Del("X-Amz-SignedHeaders")
-}
-
-func makeHmac(key []byte, data []byte) []byte {
- hash := hmac.New(sha256.New, key)
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func makeSha256(data []byte) []byte {
- hash := sha256.New()
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func makeSha256Reader(reader io.ReadSeeker) []byte {
- hash := sha256.New()
- start, _ := reader.Seek(0, 1)
- defer reader.Seek(start, 0)
-
- io.Copy(hash, reader)
- return hash.Sum(nil)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4_test.go
deleted file mode 100644
index adf8e7bd89e..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4_test.go
+++ /dev/null
@@ -1,245 +0,0 @@
-package v4
-
-import (
- "net/http"
- "strings"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/stretchr/testify/assert"
-)
-
-func buildSigner(serviceName string, region string, signTime time.Time, expireTime time.Duration, body string) signer {
- endpoint := "https://" + serviceName + "." + region + ".amazonaws.com"
- reader := strings.NewReader(body)
- req, _ := http.NewRequest("POST", endpoint, reader)
- req.URL.Opaque = "//example.org/bucket/key-._~,!@#$%^&*()"
- req.Header.Add("X-Amz-Target", "prefix.Operation")
- req.Header.Add("Content-Type", "application/x-amz-json-1.0")
- req.Header.Add("Content-Length", string(len(body)))
- req.Header.Add("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)")
-
- return signer{
- Request: req,
- Time: signTime,
- ExpireTime: expireTime,
- Query: req.URL.Query(),
- Body: reader,
- ServiceName: serviceName,
- Region: region,
- Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
- }
-}
-
-func removeWS(text string) string {
- text = strings.Replace(text, " ", "", -1)
- text = strings.Replace(text, "\n", "", -1)
- text = strings.Replace(text, "\t", "", -1)
- return text
-}
-
-func assertEqual(t *testing.T, expected, given string) {
- if removeWS(expected) != removeWS(given) {
- t.Errorf("\nExpected: %s\nGiven: %s", expected, given)
- }
-}
-
-func TestPresignRequest(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Unix(0, 0), 300*time.Second, "{}")
- signer.sign()
-
- expectedDate := "19700101T000000Z"
- expectedHeaders := "host;x-amz-meta-other-header;x-amz-target"
- expectedSig := "5eeedebf6f995145ce56daa02902d10485246d3defb34f97b973c1f40ab82d36"
- expectedCred := "AKID/19700101/us-east-1/dynamodb/aws4_request"
-
- q := signer.Request.URL.Query()
- assert.Equal(t, expectedSig, q.Get("X-Amz-Signature"))
- assert.Equal(t, expectedCred, q.Get("X-Amz-Credential"))
- assert.Equal(t, expectedHeaders, q.Get("X-Amz-SignedHeaders"))
- assert.Equal(t, expectedDate, q.Get("X-Amz-Date"))
-}
-
-func TestSignRequest(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Unix(0, 0), 0, "{}")
- signer.sign()
-
- expectedDate := "19700101T000000Z"
- expectedSig := "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/dynamodb/aws4_request, SignedHeaders=host;x-amz-date;x-amz-meta-other-header;x-amz-security-token;x-amz-target, Signature=69ada33fec48180dab153576e4dd80c4e04124f80dda3eccfed8a67c2b91ed5e"
-
- q := signer.Request.Header
- assert.Equal(t, expectedSig, q.Get("Authorization"))
- assert.Equal(t, expectedDate, q.Get("X-Amz-Date"))
-}
-
-func TestSignEmptyBody(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, "")
- signer.Body = nil
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", hash)
-}
-
-func TestSignBody(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, "hello")
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash)
-}
-
-func TestSignSeekedBody(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, " hello")
- signer.Body.Read(make([]byte, 3)) // consume first 3 bytes so body is now "hello"
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash)
-
- start, _ := signer.Body.Seek(0, 1)
- assert.Equal(t, int64(3), start)
-}
-
-func TestPresignEmptyBodyS3(t *testing.T) {
- signer := buildSigner("s3", "us-east-1", time.Now(), 5*time.Minute, "hello")
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "UNSIGNED-PAYLOAD", hash)
-}
-
-func TestSignPrecomputedBodyChecksum(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, "hello")
- signer.Request.Header.Set("X-Amz-Content-Sha256", "PRECOMPUTED")
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "PRECOMPUTED", hash)
-}
-
-func TestAnonymousCredentials(t *testing.T) {
- r := aws.NewRequest(
- aws.NewService(&aws.Config{Credentials: credentials.AnonymousCredentials}),
- &aws.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
- Sign(r)
-
- urlQ := r.HTTPRequest.URL.Query()
- assert.Empty(t, urlQ.Get("X-Amz-Signature"))
- assert.Empty(t, urlQ.Get("X-Amz-Credential"))
- assert.Empty(t, urlQ.Get("X-Amz-SignedHeaders"))
- assert.Empty(t, urlQ.Get("X-Amz-Date"))
-
- hQ := r.HTTPRequest.Header
- assert.Empty(t, hQ.Get("Authorization"))
- assert.Empty(t, hQ.Get("X-Amz-Date"))
-}
-
-func TestIgnoreResignRequestWithValidCreds(t *testing.T) {
- r := aws.NewRequest(
- aws.NewService(&aws.Config{
- Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
- Region: aws.String("us-west-2"),
- }),
- &aws.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
-
- Sign(r)
- sig := r.HTTPRequest.Header.Get("Authorization")
-
- Sign(r)
- assert.Equal(t, sig, r.HTTPRequest.Header.Get("Authorization"))
-}
-
-func TestIgnorePreResignRequestWithValidCreds(t *testing.T) {
- r := aws.NewRequest(
- aws.NewService(&aws.Config{
- Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
- Region: aws.String("us-west-2"),
- }),
- &aws.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
- r.ExpireTime = time.Minute * 10
-
- Sign(r)
- sig := r.HTTPRequest.Header.Get("X-Amz-Signature")
-
- Sign(r)
- assert.Equal(t, sig, r.HTTPRequest.Header.Get("X-Amz-Signature"))
-}
-
-func TestResignRequestExpiredCreds(t *testing.T) {
- creds := credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")
- r := aws.NewRequest(
- aws.NewService(&aws.Config{Credentials: creds}),
- &aws.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
- Sign(r)
- querySig := r.HTTPRequest.Header.Get("Authorization")
-
- creds.Expire()
-
- Sign(r)
- assert.NotEqual(t, querySig, r.HTTPRequest.Header.Get("Authorization"))
-}
-
-func TestPreResignRequestExpiredCreds(t *testing.T) {
- provider := &credentials.StaticProvider{credentials.Value{"AKID", "SECRET", "SESSION"}}
- creds := credentials.NewCredentials(provider)
- r := aws.NewRequest(
- aws.NewService(&aws.Config{Credentials: creds}),
- &aws.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
- r.ExpireTime = time.Minute * 10
-
- Sign(r)
- querySig := r.HTTPRequest.URL.Query().Get("X-Amz-Signature")
-
- creds.Expire()
- r.Time = time.Now().Add(time.Hour * 48)
-
- Sign(r)
- assert.NotEqual(t, querySig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature"))
-}
-
-func BenchmarkPresignRequest(b *testing.B) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 300*time.Second, "{}")
- for i := 0; i < b.N; i++ {
- signer.sign()
- }
-}
-
-func BenchmarkSignRequest(b *testing.B) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, "{}")
- for i := 0; i < b.N; i++ {
- signer.sign()
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints_test.go
deleted file mode 100644
index 2add48890b3..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package endpoints_test
-
-import (
- "fmt"
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/private/endpoints"
-)
-
-func TestGenericEndpoint(t *testing.T) {
- name := "service"
- region := "mock-region-1"
-
- ep, sr := endpoints.EndpointForRegion(name, region, false)
- assert.Equal(t, fmt.Sprintf("https://%s.%s.amazonaws.com", name, region), ep)
- assert.Empty(t, sr)
-}
-
-func TestGlobalEndpoints(t *testing.T) {
- region := "mock-region-1"
- svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts", "waf"}
-
- for _, name := range svcs {
- ep, sr := endpoints.EndpointForRegion(name, region, false)
- assert.Equal(t, fmt.Sprintf("https://%s.amazonaws.com", name), ep)
- assert.Equal(t, "us-east-1", sr)
- }
-}
-
-func TestServicesInCN(t *testing.T) {
- region := "cn-north-1"
- svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts", "s3", "waf"}
-
- for _, name := range svcs {
- ep, sr := endpoints.EndpointForRegion(name, region, false)
- assert.Equal(t, fmt.Sprintf("https://%s.%s.amazonaws.com.cn", name, region), ep)
- assert.Empty(t, sr)
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_bench_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_bench_test.go
deleted file mode 100644
index e135b93601d..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_bench_test.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// +build bench
-
-package ec2query_test
-
-import (
- "testing"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/awstesting"
- "github.com/aws/aws-sdk-go/private/protocol/ec2query"
- "github.com/aws/aws-sdk-go/service/ec2"
-)
-
-func BenchmarkEC2QueryBuild_Complex_ec2AuthorizeSecurityGroupEgress(b *testing.B) {
- params := &ec2.AuthorizeSecurityGroupEgressInput{
- GroupId: aws.String("String"), // Required
- CidrIp: aws.String("String"),
- DryRun: aws.Bool(true),
- FromPort: aws.Int64(1),
- IpPermissions: []*ec2.IpPermission{
- { // Required
- FromPort: aws.Int64(1),
- IpProtocol: aws.String("String"),
- IpRanges: []*ec2.IpRange{
- { // Required
- CidrIp: aws.String("String"),
- },
- // More values...
- },
- PrefixListIds: []*ec2.PrefixListId{
- { // Required
- PrefixListId: aws.String("String"),
- },
- // More values...
- },
- ToPort: aws.Int64(1),
- UserIdGroupPairs: []*ec2.UserIdGroupPair{
- { // Required
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- },
- // More values...
- },
- IpProtocol: aws.String("String"),
- SourceSecurityGroupName: aws.String("String"),
- SourceSecurityGroupOwnerId: aws.String("String"),
- ToPort: aws.Int64(1),
- }
-
- benchEC2QueryBuild(b, "AuthorizeSecurityGroupEgress", params)
-}
-
-func BenchmarkEC2QueryBuild_Simple_ec2AttachNetworkInterface(b *testing.B) {
- params := &ec2.AttachNetworkInterfaceInput{
- DeviceIndex: aws.Int64(1), // Required
- InstanceId: aws.String("String"), // Required
- NetworkInterfaceId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
-
- benchEC2QueryBuild(b, "AttachNetworkInterface", params)
-}
-
-func benchEC2QueryBuild(b *testing.B, opName string, params interface{}) {
- svc := awstesting.NewClient()
- svc.ServiceName = "ec2"
- svc.APIVersion = "2015-04-15"
-
- for i := 0; i < b.N; i++ {
- r := svc.NewRequest(&request.Operation{
- Name: opName,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }, params, nil)
- ec2query.Build(r)
- if r.Error != nil {
- b.Fatal("Unexpected error", r.Error)
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_test.go
deleted file mode 100644
index 887feeb1ea8..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build_test.go
+++ /dev/null
@@ -1,1051 +0,0 @@
-package ec2query_test
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/awstesting"
- "github.com/aws/aws-sdk-go/private/protocol/ec2query"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/private/signer/v4"
- "github.com/aws/aws-sdk-go/private/util"
- "github.com/stretchr/testify/assert"
-)
-
-var _ bytes.Buffer // always import bytes
-var _ http.Request
-var _ json.Marshaler
-var _ time.Time
-var _ xmlutil.XMLNode
-var _ xml.Attr
-var _ = awstesting.GenerateAssertions
-var _ = ioutil.Discard
-var _ = util.Trim("")
-var _ = url.Values{}
-var _ = io.EOF
-var _ = aws.String
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService1ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService1ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService1ProtocolTest client from just a session.
-// svc := inputservice1protocoltest.New(mySession)
-//
-// // Create a InputService1ProtocolTest client with additional configuration
-// svc := inputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService1ProtocolTest {
- c := p.ClientConfig("inputservice1protocoltest", cfgs...)
- return newInputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService1ProtocolTest {
- svc := &InputService1ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice1protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService1ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService1TestCaseOperation1 = "OperationName"
-
-// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation.
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation1Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService1TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService1TestShapeInputService1TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService1TestShapeInputService1TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation1Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
- req, out := c.InputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService1TestShapeInputService1TestCaseOperation1Input struct {
- Bar *string `type:"string"`
-
- Foo *string `type:"string"`
-
- metadataInputService1TestShapeInputService1TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputService1TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService1TestShapeInputService1TestCaseOperation1Output struct {
- metadataInputService1TestShapeInputService1TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputService1TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService2ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService2ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService2ProtocolTest client from just a session.
-// svc := inputservice2protocoltest.New(mySession)
-//
-// // Create a InputService2ProtocolTest client with additional configuration
-// svc := inputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService2ProtocolTest {
- c := p.ClientConfig("inputservice2protocoltest", cfgs...)
- return newInputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService2ProtocolTest {
- svc := &InputService2ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice2protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService2ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService2TestCaseOperation1 = "OperationName"
-
-// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation.
-func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService2TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService2TestShapeInputService2TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService2TestShapeInputService2TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
- req, out := c.InputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService2TestShapeInputService2TestCaseOperation1Input struct {
- Bar *string `locationName:"barLocationName" type:"string"`
-
- Foo *string `type:"string"`
-
- Yuck *string `locationName:"yuckLocationName" queryName:"yuckQueryName" type:"string"`
-
- metadataInputService2TestShapeInputService2TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeInputService2TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService2TestShapeInputService2TestCaseOperation1Output struct {
- metadataInputService2TestShapeInputService2TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeInputService2TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService3ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService3ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService3ProtocolTest client from just a session.
-// svc := inputservice3protocoltest.New(mySession)
-//
-// // Create a InputService3ProtocolTest client with additional configuration
-// svc := inputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService3ProtocolTest {
- c := p.ClientConfig("inputservice3protocoltest", cfgs...)
- return newInputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService3ProtocolTest {
- svc := &InputService3ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice3protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService3ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService3TestCaseOperation1 = "OperationName"
-
-// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation.
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation1Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService3TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService3TestShapeInputService3TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService3TestShapeInputService3TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation1Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
- req, out := c.InputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService3TestShapeInputService3TestCaseOperation1Input struct {
- StructArg *InputService3TestShapeStructType `locationName:"Struct" type:"structure"`
-
- metadataInputService3TestShapeInputService3TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputService3TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3TestShapeInputService3TestCaseOperation1Output struct {
- metadataInputService3TestShapeInputService3TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputService3TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3TestShapeStructType struct {
- ScalarArg *string `locationName:"Scalar" type:"string"`
-
- metadataInputService3TestShapeStructType `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeStructType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService4ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService4ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService4ProtocolTest client from just a session.
-// svc := inputservice4protocoltest.New(mySession)
-//
-// // Create a InputService4ProtocolTest client with additional configuration
-// svc := inputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService4ProtocolTest {
- c := p.ClientConfig("inputservice4protocoltest", cfgs...)
- return newInputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService4ProtocolTest {
- svc := &InputService4ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice4protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService4ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService4TestCaseOperation1 = "OperationName"
-
-// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation.
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService4TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService4TestShapeInputService4TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService4TestShapeInputService4TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
- req, out := c.InputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService4TestShapeInputService4TestCaseOperation1Input struct {
- ListArg []*string `type:"list"`
-
- metadataInputService4TestShapeInputService4TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputService4TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService4TestShapeInputService4TestCaseOperation1Output struct {
- metadataInputService4TestShapeInputService4TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputService4TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService5ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService5ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService5ProtocolTest client from just a session.
-// svc := inputservice5protocoltest.New(mySession)
-//
-// // Create a InputService5ProtocolTest client with additional configuration
-// svc := inputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService5ProtocolTest {
- c := p.ClientConfig("inputservice5protocoltest", cfgs...)
- return newInputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService5ProtocolTest {
- svc := &InputService5ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice5protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService5ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService5TestCaseOperation1 = "OperationName"
-
-// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation.
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService5TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService5TestShapeInputService5TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService5TestShapeInputService5TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
- req, out := c.InputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService5TestShapeInputService5TestCaseOperation1Input struct {
- ListArg []*string `locationName:"ListMemberName" locationNameList:"item" type:"list"`
-
- metadataInputService5TestShapeInputService5TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputService5TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService5TestShapeInputService5TestCaseOperation1Output struct {
- metadataInputService5TestShapeInputService5TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputService5TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService6ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService6ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService6ProtocolTest client from just a session.
-// svc := inputservice6protocoltest.New(mySession)
-//
-// // Create a InputService6ProtocolTest client with additional configuration
-// svc := inputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService6ProtocolTest {
- c := p.ClientConfig("inputservice6protocoltest", cfgs...)
- return newInputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService6ProtocolTest {
- svc := &InputService6ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice6protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService6ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService6TestCaseOperation1 = "OperationName"
-
-// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation.
-func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService6TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService6TestShapeInputService6TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService6TestShapeInputService6TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
- req, out := c.InputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService6TestShapeInputService6TestCaseOperation1Input struct {
- ListArg []*string `locationName:"ListMemberName" queryName:"ListQueryName" locationNameList:"item" type:"list"`
-
- metadataInputService6TestShapeInputService6TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService6TestShapeInputService6TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService6TestShapeInputService6TestCaseOperation1Output struct {
- metadataInputService6TestShapeInputService6TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService6TestShapeInputService6TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService7ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService7ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService7ProtocolTest client from just a session.
-// svc := inputservice7protocoltest.New(mySession)
-//
-// // Create a InputService7ProtocolTest client with additional configuration
-// svc := inputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService7ProtocolTest {
- c := p.ClientConfig("inputservice7protocoltest", cfgs...)
- return newInputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService7ProtocolTest {
- svc := &InputService7ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice7protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService7ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService7TestCaseOperation1 = "OperationName"
-
-// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation.
-func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService7TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService7TestShapeInputService7TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService7TestShapeInputService7TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
- req, out := c.InputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService7TestShapeInputService7TestCaseOperation1Input struct {
- BlobArg []byte `type:"blob"`
-
- metadataInputService7TestShapeInputService7TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService7TestShapeInputService7TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService7TestShapeInputService7TestCaseOperation1Output struct {
- metadataInputService7TestShapeInputService7TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService7TestShapeInputService7TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService8ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService8ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService8ProtocolTest client from just a session.
-// svc := inputservice8protocoltest.New(mySession)
-//
-// // Create a InputService8ProtocolTest client with additional configuration
-// svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest {
- c := p.ClientConfig("inputservice8protocoltest", cfgs...)
- return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService8ProtocolTest {
- svc := &InputService8ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice8protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService8ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService8TestCaseOperation1 = "OperationName"
-
-// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation.
-func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService8TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService8TestShapeInputService8TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService8TestShapeInputService8TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
- req, out := c.InputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService8TestShapeInputService8TestCaseOperation1Input struct {
- TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- metadataInputService8TestShapeInputService8TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService8TestShapeInputService8TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService8TestShapeInputService8TestCaseOperation1Output struct {
- metadataInputService8TestShapeInputService8TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService8TestShapeInputService8TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//
-// Tests begin here
-//
-
-func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService1ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService1TestShapeInputService1TestCaseOperation1Input{
- Bar: aws.String("val2"),
- Foo: aws.String("val1"),
- }
- req, _ := svc.InputService1TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService2ProtocolTestStructureWithLocationNameAndQueryNameAppliedToMembersCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService2ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService2TestShapeInputService2TestCaseOperation1Input{
- Bar: aws.String("val2"),
- Foo: aws.String("val1"),
- Yuck: aws.String("val3"),
- }
- req, _ := svc.InputService2TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&BarLocationName=val2&Foo=val1&Version=2014-01-01&yuckQueryName=val3`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService3ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService3TestShapeInputService3TestCaseOperation1Input{
- StructArg: &InputService3TestShapeStructType{
- ScalarArg: aws.String("foo"),
- },
- }
- req, _ := svc.InputService3TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&Struct.Scalar=foo&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService4ProtocolTestListTypesCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService4ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService4TestShapeInputService4TestCaseOperation1Input{
- ListArg: []*string{
- aws.String("foo"),
- aws.String("bar"),
- aws.String("baz"),
- },
- }
- req, _ := svc.InputService4TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService5ProtocolTestListWithLocationNameAppliedToMemberCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService5ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService5TestShapeInputService5TestCaseOperation1Input{
- ListArg: []*string{
- aws.String("a"),
- aws.String("b"),
- aws.String("c"),
- },
- }
- req, _ := svc.InputService5TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService6ProtocolTestListWithLocationNameAndQueryNameCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService6ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService6TestShapeInputService6TestCaseOperation1Input{
- ListArg: []*string{
- aws.String("a"),
- aws.String("b"),
- aws.String("c"),
- },
- }
- req, _ := svc.InputService6TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService7ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService7TestShapeInputService7TestCaseOperation1Input{
- BlobArg: []byte("foo"),
- }
- req, _ := svc.InputService7TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService8ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService8TestShapeInputService8TestCaseOperation1Input{
- TimeArg: aws.Time(time.Unix(1422172800, 0)),
- }
- req, _ := svc.InputService8TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- ec2query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal_test.go
deleted file mode 100644
index c347c371c10..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal_test.go
+++ /dev/null
@@ -1,1132 +0,0 @@
-package ec2query_test
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/awstesting"
- "github.com/aws/aws-sdk-go/private/protocol/ec2query"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/private/signer/v4"
- "github.com/aws/aws-sdk-go/private/util"
- "github.com/stretchr/testify/assert"
-)
-
-var _ bytes.Buffer // always import bytes
-var _ http.Request
-var _ json.Marshaler
-var _ time.Time
-var _ xmlutil.XMLNode
-var _ xml.Attr
-var _ = awstesting.GenerateAssertions
-var _ = ioutil.Discard
-var _ = util.Trim("")
-var _ = url.Values{}
-var _ = io.EOF
-var _ = aws.String
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService1ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService1ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService1ProtocolTest client from just a session.
-// svc := outputservice1protocoltest.New(mySession)
-//
-// // Create a OutputService1ProtocolTest client with additional configuration
-// svc := outputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService1ProtocolTest {
- c := p.ClientConfig("outputservice1protocoltest", cfgs...)
- return newOutputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService1ProtocolTest {
- svc := &OutputService1ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice1protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService1ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService1TestCaseOperation1 = "OperationName"
-
-// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation.
-func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService1TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) {
- req, out := c.OutputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- metadataOutputService1TestShapeOutputService1TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService1TestShapeOutputService1TestCaseOperation1Output struct {
- Char *string `type:"character"`
-
- Double *float64 `type:"double"`
-
- FalseBool *bool `type:"boolean"`
-
- Float *float64 `type:"float"`
-
- Long *int64 `type:"long"`
-
- Num *int64 `locationName:"FooNum" type:"integer"`
-
- Str *string `type:"string"`
-
- TrueBool *bool `type:"boolean"`
-
- metadataOutputService1TestShapeOutputService1TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService1TestShapeOutputService1TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService2ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService2ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService2ProtocolTest client from just a session.
-// svc := outputservice2protocoltest.New(mySession)
-//
-// // Create a OutputService2ProtocolTest client with additional configuration
-// svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest {
- c := p.ClientConfig("outputservice2protocoltest", cfgs...)
- return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService2ProtocolTest {
- svc := &OutputService2ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice2protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService2ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService2TestCaseOperation1 = "OperationName"
-
-// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation.
-func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService2TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) {
- req, out := c.OutputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- metadataOutputService2TestShapeOutputService2TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService2TestShapeOutputService2TestCaseOperation1Output struct {
- Blob []byte `type:"blob"`
-
- metadataOutputService2TestShapeOutputService2TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService2TestShapeOutputService2TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService3ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService3ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService3ProtocolTest client from just a session.
-// svc := outputservice3protocoltest.New(mySession)
-//
-// // Create a OutputService3ProtocolTest client with additional configuration
-// svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest {
- c := p.ClientConfig("outputservice3protocoltest", cfgs...)
- return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService3ProtocolTest {
- svc := &OutputService3ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice3protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService3ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService3TestCaseOperation1 = "OperationName"
-
-// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation.
-func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService3TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) {
- req, out := c.OutputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- metadataOutputService3TestShapeOutputService3TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService3TestShapeOutputService3TestCaseOperation1Output struct {
- ListMember []*string `type:"list"`
-
- metadataOutputService3TestShapeOutputService3TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService3TestShapeOutputService3TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService4ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService4ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService4ProtocolTest client from just a session.
-// svc := outputservice4protocoltest.New(mySession)
-//
-// // Create a OutputService4ProtocolTest client with additional configuration
-// svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest {
- c := p.ClientConfig("outputservice4protocoltest", cfgs...)
- return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService4ProtocolTest {
- svc := &OutputService4ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice4protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService4ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService4TestCaseOperation1 = "OperationName"
-
-// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation.
-func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService4TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) {
- req, out := c.OutputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- metadataOutputService4TestShapeOutputService4TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService4TestShapeOutputService4TestCaseOperation1Output struct {
- ListMember []*string `locationNameList:"item" type:"list"`
-
- metadataOutputService4TestShapeOutputService4TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService4TestShapeOutputService4TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService5ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService5ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService5ProtocolTest client from just a session.
-// svc := outputservice5protocoltest.New(mySession)
-//
-// // Create a OutputService5ProtocolTest client with additional configuration
-// svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest {
- c := p.ClientConfig("outputservice5protocoltest", cfgs...)
- return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService5ProtocolTest {
- svc := &OutputService5ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice5protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService5ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService5TestCaseOperation1 = "OperationName"
-
-// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation.
-func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService5TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) {
- req, out := c.OutputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- metadataOutputService5TestShapeOutputService5TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService5TestShapeOutputService5TestCaseOperation1Output struct {
- ListMember []*string `type:"list" flattened:"true"`
-
- metadataOutputService5TestShapeOutputService5TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService5TestShapeOutputService5TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService6ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService6ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService6ProtocolTest client from just a session.
-// svc := outputservice6protocoltest.New(mySession)
-//
-// // Create a OutputService6ProtocolTest client with additional configuration
-// svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest {
- c := p.ClientConfig("outputservice6protocoltest", cfgs...)
- return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService6ProtocolTest {
- svc := &OutputService6ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice6protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService6ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService6TestCaseOperation1 = "OperationName"
-
-// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation.
-func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService6TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) {
- req, out := c.OutputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- metadataOutputService6TestShapeOutputService6TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService6TestShapeOutputService6TestCaseOperation1Output struct {
- Map map[string]*OutputService6TestShapeStructureType `type:"map"`
-
- metadataOutputService6TestShapeOutputService6TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeOutputService6TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService6TestShapeStructureType struct {
- Foo *string `locationName:"foo" type:"string"`
-
- metadataOutputService6TestShapeStructureType `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeStructureType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService7ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService7ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService7ProtocolTest client from just a session.
-// svc := outputservice7protocoltest.New(mySession)
-//
-// // Create a OutputService7ProtocolTest client with additional configuration
-// svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest {
- c := p.ClientConfig("outputservice7protocoltest", cfgs...)
- return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService7ProtocolTest {
- svc := &OutputService7ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice7protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService7TestCaseOperation1 = "OperationName"
-
-// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation.
-func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService7TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) {
- req, out := c.OutputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- metadataOutputService7TestShapeOutputService7TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService7TestShapeOutputService7TestCaseOperation1Output struct {
- Map map[string]*string `type:"map" flattened:"true"`
-
- metadataOutputService7TestShapeOutputService7TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService7TestShapeOutputService7TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService8ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService8ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService8ProtocolTest client from just a session.
-// svc := outputservice8protocoltest.New(mySession)
-//
-// // Create a OutputService8ProtocolTest client with additional configuration
-// svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest {
- c := p.ClientConfig("outputservice8protocoltest", cfgs...)
- return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService8ProtocolTest {
- svc := &OutputService8ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice8protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService8ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService8TestCaseOperation1 = "OperationName"
-
-// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation.
-func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService8TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) {
- req, out := c.OutputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- metadataOutputService8TestShapeOutputService8TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService8TestShapeOutputService8TestCaseOperation1Output struct {
- Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"`
-
- metadataOutputService8TestShapeOutputService8TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeOutputService8TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService9ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService9ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService9ProtocolTest client from just a session.
-// svc := outputservice9protocoltest.New(mySession)
-//
-// // Create a OutputService9ProtocolTest client with additional configuration
-// svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest {
- c := p.ClientConfig("outputservice9protocoltest", cfgs...)
- return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService9ProtocolTest {
- svc := &OutputService9ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice9protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(ec2query.Build)
- svc.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService9ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService9TestCaseOperation1 = "OperationName"
-
-// OutputService9TestCaseOperation1Request generates a request for the OutputService9TestCaseOperation1 operation.
-func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService9TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) {
- req, out := c.OutputService9TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService9TestShapeOutputService9TestCaseOperation1Input struct {
- metadataOutputService9TestShapeOutputService9TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService9TestShapeOutputService9TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService9TestShapeOutputService9TestCaseOperation1Output struct {
- Foo *string `type:"string"`
-
- metadataOutputService9TestShapeOutputService9TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService9TestShapeOutputService9TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//
-// Tests begin here
-//
-
-func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService1ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("myname123falsetrue1.21.3200arequest-id"))
- req, out := svc.OutputService1TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.Char)
- assert.Equal(t, 1.3, *out.Double)
- assert.Equal(t, false, *out.FalseBool)
- assert.Equal(t, 1.2, *out.Float)
- assert.Equal(t, int64(200), *out.Long)
- assert.Equal(t, int64(123), *out.Num)
- assert.Equal(t, "myname", *out.Str)
- assert.Equal(t, true, *out.TrueBool)
-
-}
-
-func TestOutputService2ProtocolTestBlobCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService2ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("dmFsdWU=requestid"))
- req, out := svc.OutputService2TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "value", string(out.Blob))
-
-}
-
-func TestOutputService3ProtocolTestListsCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService3ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService3TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService4ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService4TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService5ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService5TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService6ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService6TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"].Foo)
- assert.Equal(t, "bar", *out.Map["qux"].Foo)
-
-}
-
-func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService7ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService7TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
-
-func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService8ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService8TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
-
-func TestOutputService9ProtocolTestEmptyStringCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService9ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService9TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- ec2query.UnmarshalMeta(req)
- ec2query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "", *out.Foo)
-
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go
deleted file mode 100644
index 535821b2fd4..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/build_test.go
+++ /dev/null
@@ -1,2139 +0,0 @@
-package query_test
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/awstesting"
- "github.com/aws/aws-sdk-go/private/protocol/query"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/private/signer/v4"
- "github.com/aws/aws-sdk-go/private/util"
- "github.com/stretchr/testify/assert"
-)
-
-var _ bytes.Buffer // always import bytes
-var _ http.Request
-var _ json.Marshaler
-var _ time.Time
-var _ xmlutil.XMLNode
-var _ xml.Attr
-var _ = awstesting.GenerateAssertions
-var _ = ioutil.Discard
-var _ = util.Trim("")
-var _ = url.Values{}
-var _ = io.EOF
-var _ = aws.String
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService1ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService1ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService1ProtocolTest client from just a session.
-// svc := inputservice1protocoltest.New(mySession)
-//
-// // Create a InputService1ProtocolTest client with additional configuration
-// svc := inputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService1ProtocolTest {
- c := p.ClientConfig("inputservice1protocoltest", cfgs...)
- return newInputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService1ProtocolTest {
- svc := &InputService1ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice1protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService1ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService1TestCaseOperation1 = "OperationName"
-
-// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation.
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputShape) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService1TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService1TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService1TestShapeInputService1TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputShape) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
- req, out := c.InputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService1TestCaseOperation2 = "OperationName"
-
-// InputService1TestCaseOperation2Request generates a request for the InputService1TestCaseOperation2 operation.
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation2Request(input *InputService1TestShapeInputShape) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation2Output) {
- op := &request.Operation{
- Name: opInputService1TestCaseOperation2,
- }
-
- if input == nil {
- input = &InputService1TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService1TestShapeInputService1TestCaseOperation2Output{}
- req.Data = output
- return
-}
-
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation2(input *InputService1TestShapeInputShape) (*InputService1TestShapeInputService1TestCaseOperation2Output, error) {
- req, out := c.InputService1TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService1TestCaseOperation3 = "OperationName"
-
-// InputService1TestCaseOperation3Request generates a request for the InputService1TestCaseOperation3 operation.
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation3Request(input *InputService1TestShapeInputShape) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation3Output) {
- op := &request.Operation{
- Name: opInputService1TestCaseOperation3,
- }
-
- if input == nil {
- input = &InputService1TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService1TestShapeInputService1TestCaseOperation3Output{}
- req.Data = output
- return
-}
-
-func (c *InputService1ProtocolTest) InputService1TestCaseOperation3(input *InputService1TestShapeInputShape) (*InputService1TestShapeInputService1TestCaseOperation3Output, error) {
- req, out := c.InputService1TestCaseOperation3Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService1TestShapeInputService1TestCaseOperation1Output struct {
- metadataInputService1TestShapeInputService1TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputService1TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService1TestShapeInputService1TestCaseOperation2Output struct {
- metadataInputService1TestShapeInputService1TestCaseOperation2Output `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputService1TestCaseOperation2Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService1TestShapeInputService1TestCaseOperation3Output struct {
- metadataInputService1TestShapeInputService1TestCaseOperation3Output `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputService1TestCaseOperation3Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService1TestShapeInputShape struct {
- Bar *string `type:"string"`
-
- Baz *bool `type:"boolean"`
-
- Foo *string `type:"string"`
-
- metadataInputService1TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService1TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService2ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService2ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService2ProtocolTest client from just a session.
-// svc := inputservice2protocoltest.New(mySession)
-//
-// // Create a InputService2ProtocolTest client with additional configuration
-// svc := inputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService2ProtocolTest {
- c := p.ClientConfig("inputservice2protocoltest", cfgs...)
- return newInputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService2ProtocolTest {
- svc := &InputService2ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice2protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService2ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService2TestCaseOperation1 = "OperationName"
-
-// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation.
-func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService2TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService2TestShapeInputService2TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService2TestShapeInputService2TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
- req, out := c.InputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService2TestShapeInputService2TestCaseOperation1Input struct {
- StructArg *InputService2TestShapeStructType `type:"structure"`
-
- metadataInputService2TestShapeInputService2TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeInputService2TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService2TestShapeInputService2TestCaseOperation1Output struct {
- metadataInputService2TestShapeInputService2TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeInputService2TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService2TestShapeStructType struct {
- ScalarArg *string `type:"string"`
-
- metadataInputService2TestShapeStructType `json:"-" xml:"-"`
-}
-
-type metadataInputService2TestShapeStructType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService3ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService3ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService3ProtocolTest client from just a session.
-// svc := inputservice3protocoltest.New(mySession)
-//
-// // Create a InputService3ProtocolTest client with additional configuration
-// svc := inputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService3ProtocolTest {
- c := p.ClientConfig("inputservice3protocoltest", cfgs...)
- return newInputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService3ProtocolTest {
- svc := &InputService3ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice3protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService3ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService3TestCaseOperation1 = "OperationName"
-
-// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation.
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputShape) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService3TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService3TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService3TestShapeInputService3TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
- req, out := c.InputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService3TestCaseOperation2 = "OperationName"
-
-// InputService3TestCaseOperation2Request generates a request for the InputService3TestCaseOperation2 operation.
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation2Request(input *InputService3TestShapeInputShape) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation2Output) {
- op := &request.Operation{
- Name: opInputService3TestCaseOperation2,
- }
-
- if input == nil {
- input = &InputService3TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService3TestShapeInputService3TestCaseOperation2Output{}
- req.Data = output
- return
-}
-
-func (c *InputService3ProtocolTest) InputService3TestCaseOperation2(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation2Output, error) {
- req, out := c.InputService3TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService3TestShapeInputService3TestCaseOperation1Output struct {
- metadataInputService3TestShapeInputService3TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputService3TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3TestShapeInputService3TestCaseOperation2Output struct {
- metadataInputService3TestShapeInputService3TestCaseOperation2Output `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputService3TestCaseOperation2Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService3TestShapeInputShape struct {
- ListArg []*string `type:"list"`
-
- metadataInputService3TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService3TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService4ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService4ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService4ProtocolTest client from just a session.
-// svc := inputservice4protocoltest.New(mySession)
-//
-// // Create a InputService4ProtocolTest client with additional configuration
-// svc := inputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService4ProtocolTest {
- c := p.ClientConfig("inputservice4protocoltest", cfgs...)
- return newInputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService4ProtocolTest {
- svc := &InputService4ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice4protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService4ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService4TestCaseOperation1 = "OperationName"
-
-// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation.
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputShape) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService4TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService4TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService4TestShapeInputService4TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
- req, out := c.InputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService4TestCaseOperation2 = "OperationName"
-
-// InputService4TestCaseOperation2Request generates a request for the InputService4TestCaseOperation2 operation.
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation2Request(input *InputService4TestShapeInputShape) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation2Output) {
- op := &request.Operation{
- Name: opInputService4TestCaseOperation2,
- }
-
- if input == nil {
- input = &InputService4TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService4TestShapeInputService4TestCaseOperation2Output{}
- req.Data = output
- return
-}
-
-func (c *InputService4ProtocolTest) InputService4TestCaseOperation2(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation2Output, error) {
- req, out := c.InputService4TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService4TestShapeInputService4TestCaseOperation1Output struct {
- metadataInputService4TestShapeInputService4TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputService4TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService4TestShapeInputService4TestCaseOperation2Output struct {
- metadataInputService4TestShapeInputService4TestCaseOperation2Output `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputService4TestCaseOperation2Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService4TestShapeInputShape struct {
- ListArg []*string `type:"list" flattened:"true"`
-
- NamedListArg []*string `locationNameList:"Foo" type:"list" flattened:"true"`
-
- ScalarArg *string `type:"string"`
-
- metadataInputService4TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService4TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService5ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService5ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService5ProtocolTest client from just a session.
-// svc := inputservice5protocoltest.New(mySession)
-//
-// // Create a InputService5ProtocolTest client with additional configuration
-// svc := inputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService5ProtocolTest {
- c := p.ClientConfig("inputservice5protocoltest", cfgs...)
- return newInputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService5ProtocolTest {
- svc := &InputService5ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice5protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService5ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService5TestCaseOperation1 = "OperationName"
-
-// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation.
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService5TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService5TestShapeInputService5TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService5TestShapeInputService5TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
- req, out := c.InputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService5TestShapeInputService5TestCaseOperation1Input struct {
- MapArg map[string]*string `type:"map" flattened:"true"`
-
- metadataInputService5TestShapeInputService5TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputService5TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService5TestShapeInputService5TestCaseOperation1Output struct {
- metadataInputService5TestShapeInputService5TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService5TestShapeInputService5TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService6ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService6ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService6ProtocolTest client from just a session.
-// svc := inputservice6protocoltest.New(mySession)
-//
-// // Create a InputService6ProtocolTest client with additional configuration
-// svc := inputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService6ProtocolTest {
- c := p.ClientConfig("inputservice6protocoltest", cfgs...)
- return newInputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService6ProtocolTest {
- svc := &InputService6ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice6protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService6ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService6TestCaseOperation1 = "OperationName"
-
-// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation.
-func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService6TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService6TestShapeInputService6TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService6TestShapeInputService6TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
- req, out := c.InputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService6TestShapeInputService6TestCaseOperation1Input struct {
- ListArg []*string `locationNameList:"item" type:"list"`
-
- metadataInputService6TestShapeInputService6TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService6TestShapeInputService6TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService6TestShapeInputService6TestCaseOperation1Output struct {
- metadataInputService6TestShapeInputService6TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService6TestShapeInputService6TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService7ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService7ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService7ProtocolTest client from just a session.
-// svc := inputservice7protocoltest.New(mySession)
-//
-// // Create a InputService7ProtocolTest client with additional configuration
-// svc := inputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService7ProtocolTest {
- c := p.ClientConfig("inputservice7protocoltest", cfgs...)
- return newInputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService7ProtocolTest {
- svc := &InputService7ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice7protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService7ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService7TestCaseOperation1 = "OperationName"
-
-// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation.
-func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService7TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService7TestShapeInputService7TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService7TestShapeInputService7TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
- req, out := c.InputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService7TestShapeInputService7TestCaseOperation1Input struct {
- ListArg []*string `locationNameList:"ListArgLocation" type:"list" flattened:"true"`
-
- ScalarArg *string `type:"string"`
-
- metadataInputService7TestShapeInputService7TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService7TestShapeInputService7TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService7TestShapeInputService7TestCaseOperation1Output struct {
- metadataInputService7TestShapeInputService7TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService7TestShapeInputService7TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService8ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService8ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService8ProtocolTest client from just a session.
-// svc := inputservice8protocoltest.New(mySession)
-//
-// // Create a InputService8ProtocolTest client with additional configuration
-// svc := inputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService8ProtocolTest {
- c := p.ClientConfig("inputservice8protocoltest", cfgs...)
- return newInputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService8ProtocolTest {
- svc := &InputService8ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice8protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService8ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService8TestCaseOperation1 = "OperationName"
-
-// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation.
-func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService8TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService8TestShapeInputService8TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService8TestShapeInputService8TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
- req, out := c.InputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService8TestShapeInputService8TestCaseOperation1Input struct {
- MapArg map[string]*string `type:"map"`
-
- metadataInputService8TestShapeInputService8TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService8TestShapeInputService8TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService8TestShapeInputService8TestCaseOperation1Output struct {
- metadataInputService8TestShapeInputService8TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService8TestShapeInputService8TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService9ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService9ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService9ProtocolTest client from just a session.
-// svc := inputservice9protocoltest.New(mySession)
-//
-// // Create a InputService9ProtocolTest client with additional configuration
-// svc := inputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService9ProtocolTest {
- c := p.ClientConfig("inputservice9protocoltest", cfgs...)
- return newInputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService9ProtocolTest {
- svc := &InputService9ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice9protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService9ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService9TestCaseOperation1 = "OperationName"
-
-// InputService9TestCaseOperation1Request generates a request for the InputService9TestCaseOperation1 operation.
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputService9TestCaseOperation1Input) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService9TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService9TestShapeInputService9TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService9TestShapeInputService9TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *InputService9TestShapeInputService9TestCaseOperation1Input) (*InputService9TestShapeInputService9TestCaseOperation1Output, error) {
- req, out := c.InputService9TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService9TestShapeInputService9TestCaseOperation1Input struct {
- MapArg map[string]*string `locationNameKey:"TheKey" locationNameValue:"TheValue" type:"map"`
-
- metadataInputService9TestShapeInputService9TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputService9TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService9TestShapeInputService9TestCaseOperation1Output struct {
- metadataInputService9TestShapeInputService9TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService9TestShapeInputService9TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService10ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService10ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService10ProtocolTest client from just a session.
-// svc := inputservice10protocoltest.New(mySession)
-//
-// // Create a InputService10ProtocolTest client with additional configuration
-// svc := inputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService10ProtocolTest {
- c := p.ClientConfig("inputservice10protocoltest", cfgs...)
- return newInputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService10ProtocolTest {
- svc := &InputService10ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice10protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService10ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService10TestCaseOperation1 = "OperationName"
-
-// InputService10TestCaseOperation1Request generates a request for the InputService10TestCaseOperation1 operation.
-func (c *InputService10ProtocolTest) InputService10TestCaseOperation1Request(input *InputService10TestShapeInputService10TestCaseOperation1Input) (req *request.Request, output *InputService10TestShapeInputService10TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService10TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService10TestShapeInputService10TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService10TestShapeInputService10TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService10ProtocolTest) InputService10TestCaseOperation1(input *InputService10TestShapeInputService10TestCaseOperation1Input) (*InputService10TestShapeInputService10TestCaseOperation1Output, error) {
- req, out := c.InputService10TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService10TestShapeInputService10TestCaseOperation1Input struct {
- BlobArg []byte `type:"blob"`
-
- metadataInputService10TestShapeInputService10TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService10TestShapeInputService10TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService10TestShapeInputService10TestCaseOperation1Output struct {
- metadataInputService10TestShapeInputService10TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService10TestShapeInputService10TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService11ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService11ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService11ProtocolTest client from just a session.
-// svc := inputservice11protocoltest.New(mySession)
-//
-// // Create a InputService11ProtocolTest client with additional configuration
-// svc := inputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService11ProtocolTest {
- c := p.ClientConfig("inputservice11protocoltest", cfgs...)
- return newInputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService11ProtocolTest {
- svc := &InputService11ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice11protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService11ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService11TestCaseOperation1 = "OperationName"
-
-// InputService11TestCaseOperation1Request generates a request for the InputService11TestCaseOperation1 operation.
-func (c *InputService11ProtocolTest) InputService11TestCaseOperation1Request(input *InputService11TestShapeInputService11TestCaseOperation1Input) (req *request.Request, output *InputService11TestShapeInputService11TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService11TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService11TestShapeInputService11TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService11TestShapeInputService11TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService11ProtocolTest) InputService11TestCaseOperation1(input *InputService11TestShapeInputService11TestCaseOperation1Input) (*InputService11TestShapeInputService11TestCaseOperation1Output, error) {
- req, out := c.InputService11TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService11TestShapeInputService11TestCaseOperation1Input struct {
- TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- metadataInputService11TestShapeInputService11TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataInputService11TestShapeInputService11TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService11TestShapeInputService11TestCaseOperation1Output struct {
- metadataInputService11TestShapeInputService11TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService11TestShapeInputService11TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type InputService12ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the InputService12ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a InputService12ProtocolTest client from just a session.
-// svc := inputservice12protocoltest.New(mySession)
-//
-// // Create a InputService12ProtocolTest client with additional configuration
-// svc := inputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewInputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *InputService12ProtocolTest {
- c := p.ClientConfig("inputservice12protocoltest", cfgs...)
- return newInputService12ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newInputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *InputService12ProtocolTest {
- svc := &InputService12ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "inputservice12protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2014-01-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a InputService12ProtocolTest operation and runs any
-// custom request initialization.
-func (c *InputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opInputService12TestCaseOperation1 = "OperationName"
-
-// InputService12TestCaseOperation1Request generates a request for the InputService12TestCaseOperation1 operation.
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation1Request(input *InputService12TestShapeInputShape) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opInputService12TestCaseOperation1,
- }
-
- if input == nil {
- input = &InputService12TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService12TestShapeInputService12TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation1(input *InputService12TestShapeInputShape) (*InputService12TestShapeInputService12TestCaseOperation1Output, error) {
- req, out := c.InputService12TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService12TestCaseOperation2 = "OperationName"
-
-// InputService12TestCaseOperation2Request generates a request for the InputService12TestCaseOperation2 operation.
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation2Request(input *InputService12TestShapeInputShape) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation2Output) {
- op := &request.Operation{
- Name: opInputService12TestCaseOperation2,
- }
-
- if input == nil {
- input = &InputService12TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService12TestShapeInputService12TestCaseOperation2Output{}
- req.Data = output
- return
-}
-
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation2(input *InputService12TestShapeInputShape) (*InputService12TestShapeInputService12TestCaseOperation2Output, error) {
- req, out := c.InputService12TestCaseOperation2Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService12TestCaseOperation3 = "OperationName"
-
-// InputService12TestCaseOperation3Request generates a request for the InputService12TestCaseOperation3 operation.
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation3Request(input *InputService12TestShapeInputShape) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation3Output) {
- op := &request.Operation{
- Name: opInputService12TestCaseOperation3,
- }
-
- if input == nil {
- input = &InputService12TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService12TestShapeInputService12TestCaseOperation3Output{}
- req.Data = output
- return
-}
-
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation3(input *InputService12TestShapeInputShape) (*InputService12TestShapeInputService12TestCaseOperation3Output, error) {
- req, out := c.InputService12TestCaseOperation3Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService12TestCaseOperation4 = "OperationName"
-
-// InputService12TestCaseOperation4Request generates a request for the InputService12TestCaseOperation4 operation.
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation4Request(input *InputService12TestShapeInputShape) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation4Output) {
- op := &request.Operation{
- Name: opInputService12TestCaseOperation4,
- }
-
- if input == nil {
- input = &InputService12TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService12TestShapeInputService12TestCaseOperation4Output{}
- req.Data = output
- return
-}
-
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation4(input *InputService12TestShapeInputShape) (*InputService12TestShapeInputService12TestCaseOperation4Output, error) {
- req, out := c.InputService12TestCaseOperation4Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService12TestCaseOperation5 = "OperationName"
-
-// InputService12TestCaseOperation5Request generates a request for the InputService12TestCaseOperation5 operation.
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation5Request(input *InputService12TestShapeInputShape) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation5Output) {
- op := &request.Operation{
- Name: opInputService12TestCaseOperation5,
- }
-
- if input == nil {
- input = &InputService12TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService12TestShapeInputService12TestCaseOperation5Output{}
- req.Data = output
- return
-}
-
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation5(input *InputService12TestShapeInputShape) (*InputService12TestShapeInputService12TestCaseOperation5Output, error) {
- req, out := c.InputService12TestCaseOperation5Request(input)
- err := req.Send()
- return out, err
-}
-
-const opInputService12TestCaseOperation6 = "OperationName"
-
-// InputService12TestCaseOperation6Request generates a request for the InputService12TestCaseOperation6 operation.
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation6Request(input *InputService12TestShapeInputShape) (req *request.Request, output *InputService12TestShapeInputService12TestCaseOperation6Output) {
- op := &request.Operation{
- Name: opInputService12TestCaseOperation6,
- }
-
- if input == nil {
- input = &InputService12TestShapeInputShape{}
- }
-
- req = c.newRequest(op, input, output)
- output = &InputService12TestShapeInputService12TestCaseOperation6Output{}
- req.Data = output
- return
-}
-
-func (c *InputService12ProtocolTest) InputService12TestCaseOperation6(input *InputService12TestShapeInputShape) (*InputService12TestShapeInputService12TestCaseOperation6Output, error) {
- req, out := c.InputService12TestCaseOperation6Request(input)
- err := req.Send()
- return out, err
-}
-
-type InputService12TestShapeInputService12TestCaseOperation1Output struct {
- metadataInputService12TestShapeInputService12TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataInputService12TestShapeInputService12TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService12TestShapeInputService12TestCaseOperation2Output struct {
- metadataInputService12TestShapeInputService12TestCaseOperation2Output `json:"-" xml:"-"`
-}
-
-type metadataInputService12TestShapeInputService12TestCaseOperation2Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService12TestShapeInputService12TestCaseOperation3Output struct {
- metadataInputService12TestShapeInputService12TestCaseOperation3Output `json:"-" xml:"-"`
-}
-
-type metadataInputService12TestShapeInputService12TestCaseOperation3Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService12TestShapeInputService12TestCaseOperation4Output struct {
- metadataInputService12TestShapeInputService12TestCaseOperation4Output `json:"-" xml:"-"`
-}
-
-type metadataInputService12TestShapeInputService12TestCaseOperation4Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService12TestShapeInputService12TestCaseOperation5Output struct {
- metadataInputService12TestShapeInputService12TestCaseOperation5Output `json:"-" xml:"-"`
-}
-
-type metadataInputService12TestShapeInputService12TestCaseOperation5Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService12TestShapeInputService12TestCaseOperation6Output struct {
- metadataInputService12TestShapeInputService12TestCaseOperation6Output `json:"-" xml:"-"`
-}
-
-type metadataInputService12TestShapeInputService12TestCaseOperation6Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService12TestShapeInputShape struct {
- RecursiveStruct *InputService12TestShapeRecursiveStructType `type:"structure"`
-
- metadataInputService12TestShapeInputShape `json:"-" xml:"-"`
-}
-
-type metadataInputService12TestShapeInputShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type InputService12TestShapeRecursiveStructType struct {
- NoRecurse *string `type:"string"`
-
- RecursiveList []*InputService12TestShapeRecursiveStructType `type:"list"`
-
- RecursiveMap map[string]*InputService12TestShapeRecursiveStructType `type:"map"`
-
- RecursiveStruct *InputService12TestShapeRecursiveStructType `type:"structure"`
-
- metadataInputService12TestShapeRecursiveStructType `json:"-" xml:"-"`
-}
-
-type metadataInputService12TestShapeRecursiveStructType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//
-// Tests begin here
-//
-
-func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService1ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService1TestShapeInputShape{
- Bar: aws.String("val2"),
- Foo: aws.String("val1"),
- }
- req, _ := svc.InputService1TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService1ProtocolTestScalarMembersCase2(t *testing.T) {
- sess := session.New()
- svc := NewInputService1ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService1TestShapeInputShape{
- Baz: aws.Bool(true),
- }
- req, _ := svc.InputService1TestCaseOperation2Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&Baz=true&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService1ProtocolTestScalarMembersCase3(t *testing.T) {
- sess := session.New()
- svc := NewInputService1ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService1TestShapeInputShape{
- Baz: aws.Bool(false),
- }
- req, _ := svc.InputService1TestCaseOperation3Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&Baz=false&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService2ProtocolTestNestedStructureMembersCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService2ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService2TestShapeInputService2TestCaseOperation1Input{
- StructArg: &InputService2TestShapeStructType{
- ScalarArg: aws.String("foo"),
- },
- }
- req, _ := svc.InputService2TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&StructArg.ScalarArg=foo&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService3ProtocolTestListTypesCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService3ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService3TestShapeInputShape{
- ListArg: []*string{
- aws.String("foo"),
- aws.String("bar"),
- aws.String("baz"),
- },
- }
- req, _ := svc.InputService3TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&ListArg.member.1=foo&ListArg.member.2=bar&ListArg.member.3=baz&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService3ProtocolTestListTypesCase2(t *testing.T) {
- sess := session.New()
- svc := NewInputService3ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService3TestShapeInputShape{
- ListArg: []*string{},
- }
- req, _ := svc.InputService3TestCaseOperation2Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&ListArg=&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService4ProtocolTestFlattenedListCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService4ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService4TestShapeInputShape{
- ListArg: []*string{
- aws.String("a"),
- aws.String("b"),
- aws.String("c"),
- },
- ScalarArg: aws.String("foo"),
- }
- req, _ := svc.InputService4TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&ListArg.1=a&ListArg.2=b&ListArg.3=c&ScalarArg=foo&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService4ProtocolTestFlattenedListCase2(t *testing.T) {
- sess := session.New()
- svc := NewInputService4ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService4TestShapeInputShape{
- NamedListArg: []*string{
- aws.String("a"),
- },
- }
- req, _ := svc.InputService4TestCaseOperation2Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&Foo.1=a&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService5ProtocolTestSerializeFlattenedMapTypeCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService5ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService5TestShapeInputService5TestCaseOperation1Input{
- MapArg: map[string]*string{
- "key1": aws.String("val1"),
- "key2": aws.String("val2"),
- },
- }
- req, _ := svc.InputService5TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&MapArg.1.key=key1&MapArg.1.value=val1&MapArg.2.key=key2&MapArg.2.value=val2&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService6ProtocolTestNonFlattenedListWithLocationNameCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService6ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService6TestShapeInputService6TestCaseOperation1Input{
- ListArg: []*string{
- aws.String("a"),
- aws.String("b"),
- aws.String("c"),
- },
- }
- req, _ := svc.InputService6TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&ListArg.item.1=a&ListArg.item.2=b&ListArg.item.3=c&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService7ProtocolTestFlattenedListWithLocationNameCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService7ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService7TestShapeInputService7TestCaseOperation1Input{
- ListArg: []*string{
- aws.String("a"),
- aws.String("b"),
- aws.String("c"),
- },
- ScalarArg: aws.String("foo"),
- }
- req, _ := svc.InputService7TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&ListArgLocation.1=a&ListArgLocation.2=b&ListArgLocation.3=c&ScalarArg=foo&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService8ProtocolTestSerializeMapTypeCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService8ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService8TestShapeInputService8TestCaseOperation1Input{
- MapArg: map[string]*string{
- "key1": aws.String("val1"),
- "key2": aws.String("val2"),
- },
- }
- req, _ := svc.InputService8TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&MapArg.entry.1.key=key1&MapArg.entry.1.value=val1&MapArg.entry.2.key=key2&MapArg.entry.2.value=val2&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService9ProtocolTestSerializeMapTypeWithLocationNameCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService9ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService9TestShapeInputService9TestCaseOperation1Input{
- MapArg: map[string]*string{
- "key1": aws.String("val1"),
- "key2": aws.String("val2"),
- },
- }
- req, _ := svc.InputService9TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&MapArg.entry.1.TheKey=key1&MapArg.entry.1.TheValue=val1&MapArg.entry.2.TheKey=key2&MapArg.entry.2.TheValue=val2&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService10ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService10ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService10TestShapeInputService10TestCaseOperation1Input{
- BlobArg: []byte("foo"),
- }
- req, _ := svc.InputService10TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService11ProtocolTestTimestampValuesCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService11ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService11TestShapeInputService11TestCaseOperation1Input{
- TimeArg: aws.Time(time.Unix(1422172800, 0)),
- }
- req, _ := svc.InputService11TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService12ProtocolTestRecursiveShapesCase1(t *testing.T) {
- sess := session.New()
- svc := NewInputService12ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService12TestShapeInputShape{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- NoRecurse: aws.String("foo"),
- },
- }
- req, _ := svc.InputService12TestCaseOperation1Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.NoRecurse=foo&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService12ProtocolTestRecursiveShapesCase2(t *testing.T) {
- sess := session.New()
- svc := NewInputService12ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService12TestShapeInputShape{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- NoRecurse: aws.String("foo"),
- },
- },
- }
- req, _ := svc.InputService12TestCaseOperation2Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveStruct.NoRecurse=foo&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService12ProtocolTestRecursiveShapesCase3(t *testing.T) {
- sess := session.New()
- svc := NewInputService12ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService12TestShapeInputShape{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- NoRecurse: aws.String("foo"),
- },
- },
- },
- },
- }
- req, _ := svc.InputService12TestCaseOperation3Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveStruct.RecursiveStruct.RecursiveStruct.NoRecurse=foo&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService12ProtocolTestRecursiveShapesCase4(t *testing.T) {
- sess := session.New()
- svc := NewInputService12ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService12TestShapeInputShape{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- RecursiveList: []*InputService12TestShapeRecursiveStructType{
- {
- NoRecurse: aws.String("foo"),
- },
- {
- NoRecurse: aws.String("bar"),
- },
- },
- },
- }
- req, _ := svc.InputService12TestCaseOperation4Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.NoRecurse=bar&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService12ProtocolTestRecursiveShapesCase5(t *testing.T) {
- sess := session.New()
- svc := NewInputService12ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService12TestShapeInputShape{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- RecursiveList: []*InputService12TestShapeRecursiveStructType{
- {
- NoRecurse: aws.String("foo"),
- },
- {
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- NoRecurse: aws.String("bar"),
- },
- },
- },
- },
- }
- req, _ := svc.InputService12TestCaseOperation5Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.RecursiveStruct.NoRecurse=bar&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
-
-func TestInputService12ProtocolTestRecursiveShapesCase6(t *testing.T) {
- sess := session.New()
- svc := NewInputService12ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- input := &InputService12TestShapeInputShape{
- RecursiveStruct: &InputService12TestShapeRecursiveStructType{
- RecursiveMap: map[string]*InputService12TestShapeRecursiveStructType{
- "bar": {
- NoRecurse: aws.String("bar"),
- },
- "foo": {
- NoRecurse: aws.String("foo"),
- },
- },
- },
- }
- req, _ := svc.InputService12TestCaseOperation6Request(input)
- r := req.HTTPRequest
-
- // build request
- query.Build(req)
- assert.NoError(t, req.Error)
-
- // assert body
- assert.NotNil(t, r.Body)
- body, _ := ioutil.ReadAll(r.Body)
- awstesting.AssertQuery(t, `Action=OperationName&RecursiveStruct.RecursiveMap.entry.1.key=foo&RecursiveStruct.RecursiveMap.entry.1.value.NoRecurse=foo&RecursiveStruct.RecursiveMap.entry.2.key=bar&RecursiveStruct.RecursiveMap.entry.2.value.NoRecurse=bar&Version=2014-01-01`, util.Trim(string(body)))
-
- // assert URL
- awstesting.AssertURL(t, "https://test/", r.URL.String())
-
- // assert headers
-
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go
deleted file mode 100644
index 08609d92088..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package query
-
-import (
- "encoding/xml"
- "io"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-type xmlErrorResponse struct {
- XMLName xml.Name `xml:"ErrorResponse"`
- Code string `xml:"Error>Code"`
- Message string `xml:"Error>Message"`
- RequestID string `xml:"RequestId"`
-}
-
-// UnmarshalError unmarshals an error response for an AWS Query service.
-func UnmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- resp := &xmlErrorResponse{}
- err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp)
- if err != nil && err != io.EOF {
- r.Error = awserr.New("SerializationError", "failed to decode query XML error response", err)
- } else {
- r.Error = awserr.NewRequestFailure(
- awserr.New(resp.Code, resp.Message, nil),
- r.HTTPResponse.StatusCode,
- resp.RequestID,
- )
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go
deleted file mode 100644
index fe2a58e3650..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_test.go
+++ /dev/null
@@ -1,1878 +0,0 @@
-package query_test
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "testing"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/awstesting"
- "github.com/aws/aws-sdk-go/private/protocol/query"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
- "github.com/aws/aws-sdk-go/private/signer/v4"
- "github.com/aws/aws-sdk-go/private/util"
- "github.com/stretchr/testify/assert"
-)
-
-var _ bytes.Buffer // always import bytes
-var _ http.Request
-var _ json.Marshaler
-var _ time.Time
-var _ xmlutil.XMLNode
-var _ xml.Attr
-var _ = awstesting.GenerateAssertions
-var _ = ioutil.Discard
-var _ = util.Trim("")
-var _ = url.Values{}
-var _ = io.EOF
-var _ = aws.String
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService1ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService1ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService1ProtocolTest client from just a session.
-// svc := outputservice1protocoltest.New(mySession)
-//
-// // Create a OutputService1ProtocolTest client with additional configuration
-// svc := outputservice1protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService1ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService1ProtocolTest {
- c := p.ClientConfig("outputservice1protocoltest", cfgs...)
- return newOutputService1ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService1ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService1ProtocolTest {
- svc := &OutputService1ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice1protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService1ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService1TestCaseOperation1 = "OperationName"
-
-// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation.
-func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService1TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) {
- req, out := c.OutputService1TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- metadataOutputService1TestShapeOutputService1TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService1TestShapeOutputService1TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService1TestShapeOutputService1TestCaseOperation1Output struct {
- Char *string `type:"character"`
-
- Double *float64 `type:"double"`
-
- FalseBool *bool `type:"boolean"`
-
- Float *float64 `type:"float"`
-
- Long *int64 `type:"long"`
-
- Num *int64 `locationName:"FooNum" type:"integer"`
-
- Str *string `type:"string"`
-
- Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- TrueBool *bool `type:"boolean"`
-
- metadataOutputService1TestShapeOutputService1TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService1TestShapeOutputService1TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService2ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService2ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService2ProtocolTest client from just a session.
-// svc := outputservice2protocoltest.New(mySession)
-//
-// // Create a OutputService2ProtocolTest client with additional configuration
-// svc := outputservice2protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService2ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService2ProtocolTest {
- c := p.ClientConfig("outputservice2protocoltest", cfgs...)
- return newOutputService2ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService2ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService2ProtocolTest {
- svc := &OutputService2ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice2protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService2ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService2TestCaseOperation1 = "OperationName"
-
-// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation.
-func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService2TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) {
- req, out := c.OutputService2TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- metadataOutputService2TestShapeOutputService2TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService2TestShapeOutputService2TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService2TestShapeOutputService2TestCaseOperation1Output struct {
- Num *int64 `type:"integer"`
-
- Str *string `type:"string"`
-
- metadataOutputService2TestShapeOutputService2TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService2TestShapeOutputService2TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService3ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService3ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService3ProtocolTest client from just a session.
-// svc := outputservice3protocoltest.New(mySession)
-//
-// // Create a OutputService3ProtocolTest client with additional configuration
-// svc := outputservice3protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService3ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService3ProtocolTest {
- c := p.ClientConfig("outputservice3protocoltest", cfgs...)
- return newOutputService3ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService3ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService3ProtocolTest {
- svc := &OutputService3ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice3protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService3ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService3TestCaseOperation1 = "OperationName"
-
-// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation.
-func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService3TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) {
- req, out := c.OutputService3TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- metadataOutputService3TestShapeOutputService3TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService3TestShapeOutputService3TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService3TestShapeOutputService3TestCaseOperation1Output struct {
- Blob []byte `type:"blob"`
-
- metadataOutputService3TestShapeOutputService3TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService3TestShapeOutputService3TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService4ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService4ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService4ProtocolTest client from just a session.
-// svc := outputservice4protocoltest.New(mySession)
-//
-// // Create a OutputService4ProtocolTest client with additional configuration
-// svc := outputservice4protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService4ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService4ProtocolTest {
- c := p.ClientConfig("outputservice4protocoltest", cfgs...)
- return newOutputService4ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService4ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService4ProtocolTest {
- svc := &OutputService4ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice4protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService4ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService4TestCaseOperation1 = "OperationName"
-
-// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation.
-func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService4TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) {
- req, out := c.OutputService4TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- metadataOutputService4TestShapeOutputService4TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService4TestShapeOutputService4TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService4TestShapeOutputService4TestCaseOperation1Output struct {
- ListMember []*string `type:"list"`
-
- metadataOutputService4TestShapeOutputService4TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService4TestShapeOutputService4TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService5ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService5ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService5ProtocolTest client from just a session.
-// svc := outputservice5protocoltest.New(mySession)
-//
-// // Create a OutputService5ProtocolTest client with additional configuration
-// svc := outputservice5protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService5ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService5ProtocolTest {
- c := p.ClientConfig("outputservice5protocoltest", cfgs...)
- return newOutputService5ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService5ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService5ProtocolTest {
- svc := &OutputService5ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice5protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService5ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService5TestCaseOperation1 = "OperationName"
-
-// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation.
-func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService5TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) {
- req, out := c.OutputService5TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- metadataOutputService5TestShapeOutputService5TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService5TestShapeOutputService5TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService5TestShapeOutputService5TestCaseOperation1Output struct {
- ListMember []*string `locationNameList:"item" type:"list"`
-
- metadataOutputService5TestShapeOutputService5TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService5TestShapeOutputService5TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService6ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService6ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService6ProtocolTest client from just a session.
-// svc := outputservice6protocoltest.New(mySession)
-//
-// // Create a OutputService6ProtocolTest client with additional configuration
-// svc := outputservice6protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService6ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService6ProtocolTest {
- c := p.ClientConfig("outputservice6protocoltest", cfgs...)
- return newOutputService6ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService6ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService6ProtocolTest {
- svc := &OutputService6ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice6protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService6ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService6TestCaseOperation1 = "OperationName"
-
-// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation.
-func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService6TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) {
- req, out := c.OutputService6TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- metadataOutputService6TestShapeOutputService6TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeOutputService6TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService6TestShapeOutputService6TestCaseOperation1Output struct {
- ListMember []*string `type:"list" flattened:"true"`
-
- metadataOutputService6TestShapeOutputService6TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService6TestShapeOutputService6TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService7ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService7ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService7ProtocolTest client from just a session.
-// svc := outputservice7protocoltest.New(mySession)
-//
-// // Create a OutputService7ProtocolTest client with additional configuration
-// svc := outputservice7protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService7ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService7ProtocolTest {
- c := p.ClientConfig("outputservice7protocoltest", cfgs...)
- return newOutputService7ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService7ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService7ProtocolTest {
- svc := &OutputService7ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice7protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService7TestCaseOperation1 = "OperationName"
-
-// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation.
-func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService7TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) {
- req, out := c.OutputService7TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- metadataOutputService7TestShapeOutputService7TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService7TestShapeOutputService7TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService7TestShapeOutputService7TestCaseOperation1Output struct {
- ListMember []*string `type:"list" flattened:"true"`
-
- metadataOutputService7TestShapeOutputService7TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService7TestShapeOutputService7TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService8ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService8ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService8ProtocolTest client from just a session.
-// svc := outputservice8protocoltest.New(mySession)
-//
-// // Create a OutputService8ProtocolTest client with additional configuration
-// svc := outputservice8protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService8ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService8ProtocolTest {
- c := p.ClientConfig("outputservice8protocoltest", cfgs...)
- return newOutputService8ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService8ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService8ProtocolTest {
- svc := &OutputService8ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice8protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService8ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService8TestCaseOperation1 = "OperationName"
-
-// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation.
-func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService8TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) {
- req, out := c.OutputService8TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- metadataOutputService8TestShapeOutputService8TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeOutputService8TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService8TestShapeOutputService8TestCaseOperation1Output struct {
- List []*OutputService8TestShapeStructureShape `type:"list"`
-
- metadataOutputService8TestShapeOutputService8TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeOutputService8TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService8TestShapeStructureShape struct {
- Bar *string `type:"string"`
-
- Baz *string `type:"string"`
-
- Foo *string `type:"string"`
-
- metadataOutputService8TestShapeStructureShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService8TestShapeStructureShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService9ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService9ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService9ProtocolTest client from just a session.
-// svc := outputservice9protocoltest.New(mySession)
-//
-// // Create a OutputService9ProtocolTest client with additional configuration
-// svc := outputservice9protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService9ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService9ProtocolTest {
- c := p.ClientConfig("outputservice9protocoltest", cfgs...)
- return newOutputService9ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService9ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService9ProtocolTest {
- svc := &OutputService9ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice9protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService9ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService9TestCaseOperation1 = "OperationName"
-
-// OutputService9TestCaseOperation1Request generates a request for the OutputService9TestCaseOperation1 operation.
-func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService9TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) {
- req, out := c.OutputService9TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService9TestShapeOutputService9TestCaseOperation1Input struct {
- metadataOutputService9TestShapeOutputService9TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService9TestShapeOutputService9TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService9TestShapeOutputService9TestCaseOperation1Output struct {
- List []*OutputService9TestShapeStructureShape `type:"list" flattened:"true"`
-
- metadataOutputService9TestShapeOutputService9TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService9TestShapeOutputService9TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService9TestShapeStructureShape struct {
- Bar *string `type:"string"`
-
- Baz *string `type:"string"`
-
- Foo *string `type:"string"`
-
- metadataOutputService9TestShapeStructureShape `json:"-" xml:"-"`
-}
-
-type metadataOutputService9TestShapeStructureShape struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService10ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService10ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService10ProtocolTest client from just a session.
-// svc := outputservice10protocoltest.New(mySession)
-//
-// // Create a OutputService10ProtocolTest client with additional configuration
-// svc := outputservice10protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService10ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService10ProtocolTest {
- c := p.ClientConfig("outputservice10protocoltest", cfgs...)
- return newOutputService10ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService10ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService10ProtocolTest {
- svc := &OutputService10ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice10protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService10ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService10TestCaseOperation1 = "OperationName"
-
-// OutputService10TestCaseOperation1Request generates a request for the OutputService10TestCaseOperation1 operation.
-func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *request.Request, output *OutputService10TestShapeOutputService10TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService10TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService10TestShapeOutputService10TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService10TestShapeOutputService10TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) {
- req, out := c.OutputService10TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService10TestShapeOutputService10TestCaseOperation1Input struct {
- metadataOutputService10TestShapeOutputService10TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService10TestShapeOutputService10TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService10TestShapeOutputService10TestCaseOperation1Output struct {
- List []*string `locationNameList:"NamedList" type:"list" flattened:"true"`
-
- metadataOutputService10TestShapeOutputService10TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService10TestShapeOutputService10TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService11ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService11ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService11ProtocolTest client from just a session.
-// svc := outputservice11protocoltest.New(mySession)
-//
-// // Create a OutputService11ProtocolTest client with additional configuration
-// svc := outputservice11protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService11ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService11ProtocolTest {
- c := p.ClientConfig("outputservice11protocoltest", cfgs...)
- return newOutputService11ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService11ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService11ProtocolTest {
- svc := &OutputService11ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice11protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService11ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService11TestCaseOperation1 = "OperationName"
-
-// OutputService11TestCaseOperation1Request generates a request for the OutputService11TestCaseOperation1 operation.
-func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *request.Request, output *OutputService11TestShapeOutputService11TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService11TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService11TestShapeOutputService11TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService11TestShapeOutputService11TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) {
- req, out := c.OutputService11TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService11TestShapeOutputService11TestCaseOperation1Input struct {
- metadataOutputService11TestShapeOutputService11TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService11TestShapeOutputService11TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService11TestShapeOutputService11TestCaseOperation1Output struct {
- Map map[string]*OutputService11TestShapeStructType `type:"map"`
-
- metadataOutputService11TestShapeOutputService11TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService11TestShapeOutputService11TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService11TestShapeStructType struct {
- Foo *string `locationName:"foo" type:"string"`
-
- metadataOutputService11TestShapeStructType `json:"-" xml:"-"`
-}
-
-type metadataOutputService11TestShapeStructType struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService12ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService12ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService12ProtocolTest client from just a session.
-// svc := outputservice12protocoltest.New(mySession)
-//
-// // Create a OutputService12ProtocolTest client with additional configuration
-// svc := outputservice12protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService12ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService12ProtocolTest {
- c := p.ClientConfig("outputservice12protocoltest", cfgs...)
- return newOutputService12ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService12ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService12ProtocolTest {
- svc := &OutputService12ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice12protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService12ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService12TestCaseOperation1 = "OperationName"
-
-// OutputService12TestCaseOperation1Request generates a request for the OutputService12TestCaseOperation1 operation.
-func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *request.Request, output *OutputService12TestShapeOutputService12TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService12TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService12TestShapeOutputService12TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService12TestShapeOutputService12TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) {
- req, out := c.OutputService12TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService12TestShapeOutputService12TestCaseOperation1Input struct {
- metadataOutputService12TestShapeOutputService12TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService12TestShapeOutputService12TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService12TestShapeOutputService12TestCaseOperation1Output struct {
- Map map[string]*string `type:"map" flattened:"true"`
-
- metadataOutputService12TestShapeOutputService12TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService12TestShapeOutputService12TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService13ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService13ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService13ProtocolTest client from just a session.
-// svc := outputservice13protocoltest.New(mySession)
-//
-// // Create a OutputService13ProtocolTest client with additional configuration
-// svc := outputservice13protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService13ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService13ProtocolTest {
- c := p.ClientConfig("outputservice13protocoltest", cfgs...)
- return newOutputService13ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService13ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService13ProtocolTest {
- svc := &OutputService13ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice13protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService13ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService13ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService13TestCaseOperation1 = "OperationName"
-
-// OutputService13TestCaseOperation1Request generates a request for the OutputService13TestCaseOperation1 operation.
-func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1Request(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (req *request.Request, output *OutputService13TestShapeOutputService13TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService13TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService13TestShapeOutputService13TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService13TestShapeOutputService13TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (*OutputService13TestShapeOutputService13TestCaseOperation1Output, error) {
- req, out := c.OutputService13TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService13TestShapeOutputService13TestCaseOperation1Input struct {
- metadataOutputService13TestShapeOutputService13TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService13TestShapeOutputService13TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService13TestShapeOutputService13TestCaseOperation1Output struct {
- Map map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"`
-
- metadataOutputService13TestShapeOutputService13TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService13TestShapeOutputService13TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService14ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService14ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService14ProtocolTest client from just a session.
-// svc := outputservice14protocoltest.New(mySession)
-//
-// // Create a OutputService14ProtocolTest client with additional configuration
-// svc := outputservice14protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService14ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService14ProtocolTest {
- c := p.ClientConfig("outputservice14protocoltest", cfgs...)
- return newOutputService14ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService14ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService14ProtocolTest {
- svc := &OutputService14ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice14protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService14ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService14ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService14TestCaseOperation1 = "OperationName"
-
-// OutputService14TestCaseOperation1Request generates a request for the OutputService14TestCaseOperation1 operation.
-func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1Request(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (req *request.Request, output *OutputService14TestShapeOutputService14TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService14TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService14TestShapeOutputService14TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService14TestShapeOutputService14TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (*OutputService14TestShapeOutputService14TestCaseOperation1Output, error) {
- req, out := c.OutputService14TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService14TestShapeOutputService14TestCaseOperation1Input struct {
- metadataOutputService14TestShapeOutputService14TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService14TestShapeOutputService14TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService14TestShapeOutputService14TestCaseOperation1Output struct {
- Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"`
-
- metadataOutputService14TestShapeOutputService14TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService14TestShapeOutputService14TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type OutputService15ProtocolTest struct {
- *client.Client
-}
-
-// New creates a new instance of the OutputService15ProtocolTest client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a OutputService15ProtocolTest client from just a session.
-// svc := outputservice15protocoltest.New(mySession)
-//
-// // Create a OutputService15ProtocolTest client with additional configuration
-// svc := outputservice15protocoltest.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func NewOutputService15ProtocolTest(p client.ConfigProvider, cfgs ...*aws.Config) *OutputService15ProtocolTest {
- c := p.ClientConfig("outputservice15protocoltest", cfgs...)
- return newOutputService15ProtocolTestClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newOutputService15ProtocolTestClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *OutputService15ProtocolTest {
- svc := &OutputService15ProtocolTest{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "outputservice15protocoltest",
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- return svc
-}
-
-// newRequest creates a new request for a OutputService15ProtocolTest operation and runs any
-// custom request initialization.
-func (c *OutputService15ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- return req
-}
-
-const opOutputService15TestCaseOperation1 = "OperationName"
-
-// OutputService15TestCaseOperation1Request generates a request for the OutputService15TestCaseOperation1 operation.
-func (c *OutputService15ProtocolTest) OutputService15TestCaseOperation1Request(input *OutputService15TestShapeOutputService15TestCaseOperation1Input) (req *request.Request, output *OutputService15TestShapeOutputService15TestCaseOperation1Output) {
- op := &request.Operation{
- Name: opOutputService15TestCaseOperation1,
- }
-
- if input == nil {
- input = &OutputService15TestShapeOutputService15TestCaseOperation1Input{}
- }
-
- req = c.newRequest(op, input, output)
- output = &OutputService15TestShapeOutputService15TestCaseOperation1Output{}
- req.Data = output
- return
-}
-
-func (c *OutputService15ProtocolTest) OutputService15TestCaseOperation1(input *OutputService15TestShapeOutputService15TestCaseOperation1Input) (*OutputService15TestShapeOutputService15TestCaseOperation1Output, error) {
- req, out := c.OutputService15TestCaseOperation1Request(input)
- err := req.Send()
- return out, err
-}
-
-type OutputService15TestShapeOutputService15TestCaseOperation1Input struct {
- metadataOutputService15TestShapeOutputService15TestCaseOperation1Input `json:"-" xml:"-"`
-}
-
-type metadataOutputService15TestShapeOutputService15TestCaseOperation1Input struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-type OutputService15TestShapeOutputService15TestCaseOperation1Output struct {
- Foo *string `type:"string"`
-
- metadataOutputService15TestShapeOutputService15TestCaseOperation1Output `json:"-" xml:"-"`
-}
-
-type metadataOutputService15TestShapeOutputService15TestCaseOperation1Output struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-//
-// Tests begin here
-//
-
-func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService1ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("myname123falsetrue1.21.3200a2015-01-25T08:00:00Zrequest-id"))
- req, out := svc.OutputService1TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.Char)
- assert.Equal(t, 1.3, *out.Double)
- assert.Equal(t, false, *out.FalseBool)
- assert.Equal(t, 1.2, *out.Float)
- assert.Equal(t, int64(200), *out.Long)
- assert.Equal(t, int64(123), *out.Num)
- assert.Equal(t, "myname", *out.Str)
- assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
- assert.Equal(t, true, *out.TrueBool)
-
-}
-
-func TestOutputService2ProtocolTestNotAllMembersInResponseCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService2ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("mynamerequest-id"))
- req, out := svc.OutputService2TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "myname", *out.Str)
-
-}
-
-func TestOutputService3ProtocolTestBlobCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService3ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("dmFsdWU=requestid"))
- req, out := svc.OutputService3TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "value", string(out.Blob))
-
-}
-
-func TestOutputService4ProtocolTestListsCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService4ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService4TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService5ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService5ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService5TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService6ProtocolTestFlattenedListCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService6ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("abc123requestid"))
- req, out := svc.OutputService6TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
- assert.Equal(t, "123", *out.ListMember[1])
-
-}
-
-func TestOutputService7ProtocolTestFlattenedSingleElementListCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService7ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("abcrequestid"))
- req, out := svc.OutputService7TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "abc", *out.ListMember[0])
-
-}
-
-func TestOutputService8ProtocolTestListOfStructuresCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService8ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("firstfoofirstbarfirstbazsecondfoosecondbarsecondbazrequestid"))
- req, out := svc.OutputService8TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "firstbar", *out.List[0].Bar)
- assert.Equal(t, "firstbaz", *out.List[0].Baz)
- assert.Equal(t, "firstfoo", *out.List[0].Foo)
- assert.Equal(t, "secondbar", *out.List[1].Bar)
- assert.Equal(t, "secondbaz", *out.List[1].Baz)
- assert.Equal(t, "secondfoo", *out.List[1].Foo)
-
-}
-
-func TestOutputService9ProtocolTestFlattenedListOfStructuresCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService9ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("firstfoofirstbarfirstbazsecondfoosecondbarsecondbazrequestid"))
- req, out := svc.OutputService9TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "firstbar", *out.List[0].Bar)
- assert.Equal(t, "firstbaz", *out.List[0].Baz)
- assert.Equal(t, "firstfoo", *out.List[0].Foo)
- assert.Equal(t, "secondbar", *out.List[1].Bar)
- assert.Equal(t, "secondbaz", *out.List[1].Baz)
- assert.Equal(t, "secondfoo", *out.List[1].Foo)
-
-}
-
-func TestOutputService10ProtocolTestFlattenedListWithLocationNameCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService10ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("abrequestid"))
- req, out := svc.OutputService10TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "a", *out.List[0])
- assert.Equal(t, "b", *out.List[1])
-
-}
-
-func TestOutputService11ProtocolTestNormalMapCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService11ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService11TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"].Foo)
- assert.Equal(t, "bar", *out.Map["qux"].Foo)
-
-}
-
-func TestOutputService12ProtocolTestFlattenedMapCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService12ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService12TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
-
-func TestOutputService13ProtocolTestFlattenedMapInShapeDefinitionCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService13ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("quxbarrequestid"))
- req, out := svc.OutputService13TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
-
-func TestOutputService14ProtocolTestNamedMapCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService14ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService14TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "bam", *out.Map["baz"])
- assert.Equal(t, "bar", *out.Map["qux"])
-
-}
-
-func TestOutputService15ProtocolTestEmptyStringCase1(t *testing.T) {
- sess := session.New()
- svc := NewOutputService15ProtocolTest(sess, &aws.Config{Endpoint: aws.String("https://test")})
-
- buf := bytes.NewReader([]byte("requestid"))
- req, out := svc.OutputService15TestCaseOperation1Request(nil)
- req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
-
- // set headers
-
- // unmarshal response
- query.UnmarshalMeta(req)
- query.Unmarshal(req)
- assert.NoError(t, req.Error)
-
- // assert response
- assert.NotNil(t, out) // ensure out variable is used
- assert.Equal(t, "", *out.Foo)
-
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
deleted file mode 100644
index 1f603bb719f..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package rest
-
-import "reflect"
-
-// PayloadMember returns the payload field member of i if there is one, or nil.
-func PayloadMember(i interface{}) interface{} {
- if i == nil {
- return nil
- }
-
- v := reflect.ValueOf(i).Elem()
- if !v.IsValid() {
- return nil
- }
- if field, ok := v.Type().FieldByName("SDKShapeTraits"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- field, _ := v.Type().FieldByName(payloadName)
- if field.Tag.Get("type") != "structure" {
- return nil
- }
-
- payload := v.FieldByName(payloadName)
- if payload.IsValid() || (payload.Kind() == reflect.Ptr && !payload.IsNil()) {
- return payload.Interface()
- }
- }
- }
- return nil
-}
-
-// PayloadType returns the type of a payload field member of i if there is one, or "".
-func PayloadType(i interface{}) string {
- v := reflect.Indirect(reflect.ValueOf(i))
- if !v.IsValid() {
- return ""
- }
- if field, ok := v.Type().FieldByName("SDKShapeTraits"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- if member, ok := v.Type().FieldByName(payloadName); ok {
- return member.Tag.Get("type")
- }
- }
- }
- return ""
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
deleted file mode 100644
index 5e4fe210b36..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
+++ /dev/null
@@ -1,260 +0,0 @@
-package xmlutil
-
-import (
- "encoding/base64"
- "encoding/xml"
- "fmt"
- "io"
- "reflect"
- "strconv"
- "strings"
- "time"
-)
-
-// UnmarshalXML deserializes an xml.Decoder into the container v. V
-// needs to match the shape of the XML expected to be decoded.
-// If the shape doesn't match unmarshaling will fail.
-func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
- n, _ := XMLToStruct(d, nil)
- if n.Children != nil {
- for _, root := range n.Children {
- for _, c := range root {
- if wrappedChild, ok := c.Children[wrapper]; ok {
- c = wrappedChild[0] // pull out wrapped element
- }
-
- err := parse(reflect.ValueOf(v), c, "")
- if err != nil {
- if err == io.EOF {
- return nil
- }
- return err
- }
- }
- }
- return nil
- }
- return nil
-}
-
-// parse deserializes any value from the XMLNode. The type tag is used to infer the type, or reflect
-// will be used to determine the type from r.
-func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- rtype := r.Type()
- if rtype.Kind() == reflect.Ptr {
- rtype = rtype.Elem() // check kind of actual element type
- }
-
- t := tag.Get("type")
- if t == "" {
- switch rtype.Kind() {
- case reflect.Struct:
- t = "structure"
- case reflect.Slice:
- t = "list"
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- if field, ok := rtype.FieldByName("SDKShapeTraits"); ok {
- tag = field.Tag
- }
- return parseStruct(r, node, tag)
- case "list":
- return parseList(r, node, tag)
- case "map":
- return parseMap(r, node, tag)
- default:
- return parseScalar(r, node, tag)
- }
-}
-
-// parseStruct deserializes a structure and its fields from an XMLNode. Any nested
-// types in the structure will also be deserialized.
-func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- t := r.Type()
- if r.Kind() == reflect.Ptr {
- if r.IsNil() { // create the structure if it's nil
- s := reflect.New(r.Type().Elem())
- r.Set(s)
- r = s
- }
-
- r = r.Elem()
- t = t.Elem()
- }
-
- // unwrap any payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := t.FieldByName(payload)
- return parseStruct(r.FieldByName(payload), node, field.Tag)
- }
-
- for i := 0; i < t.NumField(); i++ {
- field := t.Field(i)
- if c := field.Name[0:1]; strings.ToLower(c) == c {
- continue // ignore unexported fields
- }
-
- // figure out what this field is called
- name := field.Name
- if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
- name = field.Tag.Get("locationNameList")
- } else if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
-
- // try to find the field by name in elements
- elems := node.Children[name]
-
- if elems == nil { // try to find the field in attributes
- for _, a := range node.Attr {
- if name == a.Name.Local {
- // turn this into a text node for de-serializing
- elems = []*XMLNode{{Text: a.Value}}
- }
- }
- }
-
- member := r.FieldByName(field.Name)
- for _, elem := range elems {
- err := parse(member, elem, field.Tag)
- if err != nil {
- return err
- }
- }
- }
- return nil
-}
-
-// parseList deserializes a list of values from an XML node. Each list entry
-// will also be deserialized.
-func parseList(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- t := r.Type()
-
- if tag.Get("flattened") == "" { // look at all item entries
- mname := "member"
- if name := tag.Get("locationNameList"); name != "" {
- mname = name
- }
-
- if Children, ok := node.Children[mname]; ok {
- if r.IsNil() {
- r.Set(reflect.MakeSlice(t, len(Children), len(Children)))
- }
-
- for i, c := range Children {
- err := parse(r.Index(i), c, "")
- if err != nil {
- return err
- }
- }
- }
- } else { // flattened list means this is a single element
- if r.IsNil() {
- r.Set(reflect.MakeSlice(t, 0, 0))
- }
-
- childR := reflect.Zero(t.Elem())
- r.Set(reflect.Append(r, childR))
- err := parse(r.Index(r.Len()-1), node, "")
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// parseMap deserializes a map from an XMLNode. The direct children of the XMLNode
-// will also be deserialized as map entries.
-func parseMap(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- if r.IsNil() {
- r.Set(reflect.MakeMap(r.Type()))
- }
-
- if tag.Get("flattened") == "" { // look at all child entries
- for _, entry := range node.Children["entry"] {
- parseMapEntry(r, entry, tag)
- }
- } else { // this element is itself an entry
- parseMapEntry(r, node, tag)
- }
-
- return nil
-}
-
-// parseMapEntry deserializes a map entry from a XML node.
-func parseMapEntry(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- kname, vname := "key", "value"
- if n := tag.Get("locationNameKey"); n != "" {
- kname = n
- }
- if n := tag.Get("locationNameValue"); n != "" {
- vname = n
- }
-
- keys, ok := node.Children[kname]
- values := node.Children[vname]
- if ok {
- for i, key := range keys {
- keyR := reflect.ValueOf(key.Text)
- value := values[i]
- valueR := reflect.New(r.Type().Elem()).Elem()
-
- parse(valueR, value, "")
- r.SetMapIndex(keyR, valueR)
- }
- }
- return nil
-}
-
-// parseScaller deserializes an XMLNode value into a concrete type based on the
-// interface type of r.
-//
-// Error is returned if the deserialization fails due to invalid type conversion,
-// or unsupported interface type.
-func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- switch r.Interface().(type) {
- case *string:
- r.Set(reflect.ValueOf(&node.Text))
- return nil
- case []byte:
- b, err := base64.StdEncoding.DecodeString(node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(b))
- case *bool:
- v, err := strconv.ParseBool(node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *int64:
- v, err := strconv.ParseInt(node.Text, 10, 64)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *float64:
- v, err := strconv.ParseFloat(node.Text, 64)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *time.Time:
- const ISO8601UTC = "2006-01-02T15:04:05Z"
- t, err := time.Parse(ISO8601UTC, node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&t))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", r.Interface(), r.Type())
- }
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
deleted file mode 100644
index 72c198a9d8d..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
+++ /dev/null
@@ -1,105 +0,0 @@
-package xmlutil
-
-import (
- "encoding/xml"
- "io"
- "sort"
-)
-
-// A XMLNode contains the values to be encoded or decoded.
-type XMLNode struct {
- Name xml.Name `json:",omitempty"`
- Children map[string][]*XMLNode `json:",omitempty"`
- Text string `json:",omitempty"`
- Attr []xml.Attr `json:",omitempty"`
-}
-
-// NewXMLElement returns a pointer to a new XMLNode initialized to default values.
-func NewXMLElement(name xml.Name) *XMLNode {
- return &XMLNode{
- Name: name,
- Children: map[string][]*XMLNode{},
- Attr: []xml.Attr{},
- }
-}
-
-// AddChild adds child to the XMLNode.
-func (n *XMLNode) AddChild(child *XMLNode) {
- if _, ok := n.Children[child.Name.Local]; !ok {
- n.Children[child.Name.Local] = []*XMLNode{}
- }
- n.Children[child.Name.Local] = append(n.Children[child.Name.Local], child)
-}
-
-// XMLToStruct converts a xml.Decoder stream to XMLNode with nested values.
-func XMLToStruct(d *xml.Decoder, s *xml.StartElement) (*XMLNode, error) {
- out := &XMLNode{}
- for {
- tok, err := d.Token()
- if tok == nil || err == io.EOF {
- break
- }
- if err != nil {
- return out, err
- }
-
- switch typed := tok.(type) {
- case xml.CharData:
- out.Text = string(typed.Copy())
- case xml.StartElement:
- el := typed.Copy()
- out.Attr = el.Attr
- if out.Children == nil {
- out.Children = map[string][]*XMLNode{}
- }
-
- name := typed.Name.Local
- slice := out.Children[name]
- if slice == nil {
- slice = []*XMLNode{}
- }
- node, e := XMLToStruct(d, &el)
- if e != nil {
- return out, e
- }
- node.Name = typed.Name
- slice = append(slice, node)
- out.Children[name] = slice
- case xml.EndElement:
- if s != nil && s.Name.Local == typed.Name.Local { // matching end token
- return out, nil
- }
- }
- }
- return out, nil
-}
-
-// StructToXML writes an XMLNode to a xml.Encoder as tokens.
-func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error {
- e.EncodeToken(xml.StartElement{Name: node.Name, Attr: node.Attr})
-
- if node.Text != "" {
- e.EncodeToken(xml.CharData([]byte(node.Text)))
- } else if sorted {
- sortedNames := []string{}
- for k := range node.Children {
- sortedNames = append(sortedNames, k)
- }
- sort.Strings(sortedNames)
-
- for _, k := range sortedNames {
- for _, v := range node.Children[k] {
- StructToXML(e, v, sorted)
- }
- }
- } else {
- for _, c := range node.Children {
- for _, v := range c {
- StructToXML(e, v, sorted)
- }
- }
- }
-
- e.EncodeToken(xml.EndElement{Name: node.Name})
- return e.Flush()
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/functional_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/functional_test.go
deleted file mode 100644
index 51a26d6ade6..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/functional_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package v4_test
-
-import (
- "net/url"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/unit"
- "github.com/aws/aws-sdk-go/service/s3"
-)
-
-func TestPresignHandler(t *testing.T) {
- svc := s3.New(unit.Session)
- req, _ := svc.PutObjectRequest(&s3.PutObjectInput{
- Bucket: aws.String("bucket"),
- Key: aws.String("key"),
- ContentDisposition: aws.String("a+b c$d"),
- ACL: aws.String("public-read"),
- })
- req.Time = time.Unix(0, 0)
- urlstr, err := req.Presign(5 * time.Minute)
-
- assert.NoError(t, err)
-
- expectedDate := "19700101T000000Z"
- expectedHeaders := "host;x-amz-acl"
- expectedSig := "7edcb4e3a1bf12f4989018d75acbe3a7f03df24bd6f3112602d59fc551f0e4e2"
- expectedCred := "AKID/19700101/mock-region/s3/aws4_request"
-
- u, _ := url.Parse(urlstr)
- urlQ := u.Query()
- assert.Equal(t, expectedSig, urlQ.Get("X-Amz-Signature"))
- assert.Equal(t, expectedCred, urlQ.Get("X-Amz-Credential"))
- assert.Equal(t, expectedHeaders, urlQ.Get("X-Amz-SignedHeaders"))
- assert.Equal(t, expectedDate, urlQ.Get("X-Amz-Date"))
- assert.Equal(t, "300", urlQ.Get("X-Amz-Expires"))
-
- assert.NotContains(t, urlstr, "+") // + encoded as %20
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4.go
deleted file mode 100644
index dc176f312ba..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4.go
+++ /dev/null
@@ -1,365 +0,0 @@
-// Package v4 implements signing for AWS V4 signer
-package v4
-
-import (
- "crypto/hmac"
- "crypto/sha256"
- "encoding/hex"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-const (
- authHeaderPrefix = "AWS4-HMAC-SHA256"
- timeFormat = "20060102T150405Z"
- shortTimeFormat = "20060102"
-)
-
-var ignoredHeaders = map[string]bool{
- "Authorization": true,
- "Content-Type": true,
- "Content-Length": true,
- "User-Agent": true,
-}
-
-type signer struct {
- Request *http.Request
- Time time.Time
- ExpireTime time.Duration
- ServiceName string
- Region string
- CredValues credentials.Value
- Credentials *credentials.Credentials
- Query url.Values
- Body io.ReadSeeker
- Debug aws.LogLevelType
- Logger aws.Logger
-
- isPresign bool
- formattedTime string
- formattedShortTime string
-
- signedHeaders string
- canonicalHeaders string
- canonicalString string
- credentialString string
- stringToSign string
- signature string
- authorization string
-}
-
-// Sign requests with signature version 4.
-//
-// Will sign the requests with the service config's Credentials object
-// Signing is skipped if the credentials is the credentials.AnonymousCredentials
-// object.
-func Sign(req *request.Request) {
- // If the request does not need to be signed ignore the signing of the
- // request if the AnonymousCredentials object is used.
- if req.Config.Credentials == credentials.AnonymousCredentials {
- return
- }
-
- region := req.ClientInfo.SigningRegion
- if region == "" {
- region = aws.StringValue(req.Config.Region)
- }
-
- name := req.ClientInfo.SigningName
- if name == "" {
- name = req.ClientInfo.ServiceName
- }
-
- s := signer{
- Request: req.HTTPRequest,
- Time: req.Time,
- ExpireTime: req.ExpireTime,
- Query: req.HTTPRequest.URL.Query(),
- Body: req.Body,
- ServiceName: name,
- Region: region,
- Credentials: req.Config.Credentials,
- Debug: req.Config.LogLevel.Value(),
- Logger: req.Config.Logger,
- }
-
- req.Error = s.sign()
-}
-
-func (v4 *signer) sign() error {
- if v4.ExpireTime != 0 {
- v4.isPresign = true
- }
-
- if v4.isRequestSigned() {
- if !v4.Credentials.IsExpired() {
- // If the request is already signed, and the credentials have not
- // expired yet ignore the signing request.
- return nil
- }
-
- // The credentials have expired for this request. The current signing
- // is invalid, and needs to be request because the request will fail.
- if v4.isPresign {
- v4.removePresign()
- // Update the request's query string to ensure the values stays in
- // sync in the case retrieving the new credentials fails.
- v4.Request.URL.RawQuery = v4.Query.Encode()
- }
- }
-
- var err error
- v4.CredValues, err = v4.Credentials.Get()
- if err != nil {
- return err
- }
-
- if v4.isPresign {
- v4.Query.Set("X-Amz-Algorithm", authHeaderPrefix)
- if v4.CredValues.SessionToken != "" {
- v4.Query.Set("X-Amz-Security-Token", v4.CredValues.SessionToken)
- } else {
- v4.Query.Del("X-Amz-Security-Token")
- }
- } else if v4.CredValues.SessionToken != "" {
- v4.Request.Header.Set("X-Amz-Security-Token", v4.CredValues.SessionToken)
- }
-
- v4.build()
-
- if v4.Debug.Matches(aws.LogDebugWithSigning) {
- v4.logSigningInfo()
- }
-
- return nil
-}
-
-const logSignInfoMsg = `DEBUG: Request Signiture:
----[ CANONICAL STRING ]-----------------------------
-%s
----[ STRING TO SIGN ]--------------------------------
-%s%s
------------------------------------------------------`
-const logSignedURLMsg = `
----[ SIGNED URL ]------------------------------------
-%s`
-
-func (v4 *signer) logSigningInfo() {
- signedURLMsg := ""
- if v4.isPresign {
- signedURLMsg = fmt.Sprintf(logSignedURLMsg, v4.Request.URL.String())
- }
- msg := fmt.Sprintf(logSignInfoMsg, v4.canonicalString, v4.stringToSign, signedURLMsg)
- v4.Logger.Log(msg)
-}
-
-func (v4 *signer) build() {
- v4.buildTime() // no depends
- v4.buildCredentialString() // no depends
- if v4.isPresign {
- v4.buildQuery() // no depends
- }
- v4.buildCanonicalHeaders() // depends on cred string
- v4.buildCanonicalString() // depends on canon headers / signed headers
- v4.buildStringToSign() // depends on canon string
- v4.buildSignature() // depends on string to sign
-
- if v4.isPresign {
- v4.Request.URL.RawQuery += "&X-Amz-Signature=" + v4.signature
- } else {
- parts := []string{
- authHeaderPrefix + " Credential=" + v4.CredValues.AccessKeyID + "/" + v4.credentialString,
- "SignedHeaders=" + v4.signedHeaders,
- "Signature=" + v4.signature,
- }
- v4.Request.Header.Set("Authorization", strings.Join(parts, ", "))
- }
-}
-
-func (v4 *signer) buildTime() {
- v4.formattedTime = v4.Time.UTC().Format(timeFormat)
- v4.formattedShortTime = v4.Time.UTC().Format(shortTimeFormat)
-
- if v4.isPresign {
- duration := int64(v4.ExpireTime / time.Second)
- v4.Query.Set("X-Amz-Date", v4.formattedTime)
- v4.Query.Set("X-Amz-Expires", strconv.FormatInt(duration, 10))
- } else {
- v4.Request.Header.Set("X-Amz-Date", v4.formattedTime)
- }
-}
-
-func (v4 *signer) buildCredentialString() {
- v4.credentialString = strings.Join([]string{
- v4.formattedShortTime,
- v4.Region,
- v4.ServiceName,
- "aws4_request",
- }, "/")
-
- if v4.isPresign {
- v4.Query.Set("X-Amz-Credential", v4.CredValues.AccessKeyID+"/"+v4.credentialString)
- }
-}
-
-func (v4 *signer) buildQuery() {
- for k, h := range v4.Request.Header {
- if strings.HasPrefix(http.CanonicalHeaderKey(k), "X-Amz-") {
- continue // never hoist x-amz-* headers, they must be signed
- }
- if _, ok := ignoredHeaders[http.CanonicalHeaderKey(k)]; ok {
- continue // never hoist ignored headers
- }
-
- v4.Request.Header.Del(k)
- v4.Query.Del(k)
- for _, v := range h {
- v4.Query.Add(k, v)
- }
- }
-}
-
-func (v4 *signer) buildCanonicalHeaders() {
- var headers []string
- headers = append(headers, "host")
- for k := range v4.Request.Header {
- if _, ok := ignoredHeaders[http.CanonicalHeaderKey(k)]; ok {
- continue // ignored header
- }
- headers = append(headers, strings.ToLower(k))
- }
- sort.Strings(headers)
-
- v4.signedHeaders = strings.Join(headers, ";")
-
- if v4.isPresign {
- v4.Query.Set("X-Amz-SignedHeaders", v4.signedHeaders)
- }
-
- headerValues := make([]string, len(headers))
- for i, k := range headers {
- if k == "host" {
- headerValues[i] = "host:" + v4.Request.URL.Host
- } else {
- headerValues[i] = k + ":" +
- strings.Join(v4.Request.Header[http.CanonicalHeaderKey(k)], ",")
- }
- }
-
- v4.canonicalHeaders = strings.Join(headerValues, "\n")
-}
-
-func (v4 *signer) buildCanonicalString() {
- v4.Request.URL.RawQuery = strings.Replace(v4.Query.Encode(), "+", "%20", -1)
- uri := v4.Request.URL.Opaque
- if uri != "" {
- uri = "/" + strings.Join(strings.Split(uri, "/")[3:], "/")
- } else {
- uri = v4.Request.URL.Path
- }
- if uri == "" {
- uri = "/"
- }
-
- if v4.ServiceName != "s3" {
- uri = rest.EscapePath(uri, false)
- }
-
- v4.canonicalString = strings.Join([]string{
- v4.Request.Method,
- uri,
- v4.Request.URL.RawQuery,
- v4.canonicalHeaders + "\n",
- v4.signedHeaders,
- v4.bodyDigest(),
- }, "\n")
-}
-
-func (v4 *signer) buildStringToSign() {
- v4.stringToSign = strings.Join([]string{
- authHeaderPrefix,
- v4.formattedTime,
- v4.credentialString,
- hex.EncodeToString(makeSha256([]byte(v4.canonicalString))),
- }, "\n")
-}
-
-func (v4 *signer) buildSignature() {
- secret := v4.CredValues.SecretAccessKey
- date := makeHmac([]byte("AWS4"+secret), []byte(v4.formattedShortTime))
- region := makeHmac(date, []byte(v4.Region))
- service := makeHmac(region, []byte(v4.ServiceName))
- credentials := makeHmac(service, []byte("aws4_request"))
- signature := makeHmac(credentials, []byte(v4.stringToSign))
- v4.signature = hex.EncodeToString(signature)
-}
-
-func (v4 *signer) bodyDigest() string {
- hash := v4.Request.Header.Get("X-Amz-Content-Sha256")
- if hash == "" {
- if v4.isPresign && v4.ServiceName == "s3" {
- hash = "UNSIGNED-PAYLOAD"
- } else if v4.Body == nil {
- hash = hex.EncodeToString(makeSha256([]byte{}))
- } else {
- hash = hex.EncodeToString(makeSha256Reader(v4.Body))
- }
- v4.Request.Header.Add("X-Amz-Content-Sha256", hash)
- }
- return hash
-}
-
-// isRequestSigned returns if the request is currently signed or presigned
-func (v4 *signer) isRequestSigned() bool {
- if v4.isPresign && v4.Query.Get("X-Amz-Signature") != "" {
- return true
- }
- if v4.Request.Header.Get("Authorization") != "" {
- return true
- }
-
- return false
-}
-
-// unsign removes signing flags for both signed and presigned requests.
-func (v4 *signer) removePresign() {
- v4.Query.Del("X-Amz-Algorithm")
- v4.Query.Del("X-Amz-Signature")
- v4.Query.Del("X-Amz-Security-Token")
- v4.Query.Del("X-Amz-Date")
- v4.Query.Del("X-Amz-Expires")
- v4.Query.Del("X-Amz-Credential")
- v4.Query.Del("X-Amz-SignedHeaders")
-}
-
-func makeHmac(key []byte, data []byte) []byte {
- hash := hmac.New(sha256.New, key)
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func makeSha256(data []byte) []byte {
- hash := sha256.New()
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func makeSha256Reader(reader io.ReadSeeker) []byte {
- hash := sha256.New()
- start, _ := reader.Seek(0, 1)
- defer reader.Seek(start, 0)
-
- io.Copy(hash, reader)
- return hash.Sum(nil)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4_test.go
deleted file mode 100644
index f39414fcf91..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4_test.go
+++ /dev/null
@@ -1,252 +0,0 @@
-package v4
-
-import (
- "net/http"
- "strings"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/awstesting"
-)
-
-func buildSigner(serviceName string, region string, signTime time.Time, expireTime time.Duration, body string) signer {
- endpoint := "https://" + serviceName + "." + region + ".amazonaws.com"
- reader := strings.NewReader(body)
- req, _ := http.NewRequest("POST", endpoint, reader)
- req.URL.Opaque = "//example.org/bucket/key-._~,!@#$%^&*()"
- req.Header.Add("X-Amz-Target", "prefix.Operation")
- req.Header.Add("Content-Type", "application/x-amz-json-1.0")
- req.Header.Add("Content-Length", string(len(body)))
- req.Header.Add("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)")
-
- return signer{
- Request: req,
- Time: signTime,
- ExpireTime: expireTime,
- Query: req.URL.Query(),
- Body: reader,
- ServiceName: serviceName,
- Region: region,
- Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
- }
-}
-
-func removeWS(text string) string {
- text = strings.Replace(text, " ", "", -1)
- text = strings.Replace(text, "\n", "", -1)
- text = strings.Replace(text, "\t", "", -1)
- return text
-}
-
-func assertEqual(t *testing.T, expected, given string) {
- if removeWS(expected) != removeWS(given) {
- t.Errorf("\nExpected: %s\nGiven: %s", expected, given)
- }
-}
-
-func TestPresignRequest(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Unix(0, 0), 300*time.Second, "{}")
- signer.sign()
-
- expectedDate := "19700101T000000Z"
- expectedHeaders := "host;x-amz-meta-other-header;x-amz-target"
- expectedSig := "5eeedebf6f995145ce56daa02902d10485246d3defb34f97b973c1f40ab82d36"
- expectedCred := "AKID/19700101/us-east-1/dynamodb/aws4_request"
-
- q := signer.Request.URL.Query()
- assert.Equal(t, expectedSig, q.Get("X-Amz-Signature"))
- assert.Equal(t, expectedCred, q.Get("X-Amz-Credential"))
- assert.Equal(t, expectedHeaders, q.Get("X-Amz-SignedHeaders"))
- assert.Equal(t, expectedDate, q.Get("X-Amz-Date"))
-}
-
-func TestSignRequest(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Unix(0, 0), 0, "{}")
- signer.sign()
-
- expectedDate := "19700101T000000Z"
- expectedSig := "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/dynamodb/aws4_request, SignedHeaders=host;x-amz-date;x-amz-meta-other-header;x-amz-security-token;x-amz-target, Signature=69ada33fec48180dab153576e4dd80c4e04124f80dda3eccfed8a67c2b91ed5e"
-
- q := signer.Request.Header
- assert.Equal(t, expectedSig, q.Get("Authorization"))
- assert.Equal(t, expectedDate, q.Get("X-Amz-Date"))
-}
-
-func TestSignEmptyBody(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, "")
- signer.Body = nil
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", hash)
-}
-
-func TestSignBody(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, "hello")
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash)
-}
-
-func TestSignSeekedBody(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, " hello")
- signer.Body.Read(make([]byte, 3)) // consume first 3 bytes so body is now "hello"
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash)
-
- start, _ := signer.Body.Seek(0, 1)
- assert.Equal(t, int64(3), start)
-}
-
-func TestPresignEmptyBodyS3(t *testing.T) {
- signer := buildSigner("s3", "us-east-1", time.Now(), 5*time.Minute, "hello")
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "UNSIGNED-PAYLOAD", hash)
-}
-
-func TestSignPrecomputedBodyChecksum(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, "hello")
- signer.Request.Header.Set("X-Amz-Content-Sha256", "PRECOMPUTED")
- signer.sign()
- hash := signer.Request.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "PRECOMPUTED", hash)
-}
-
-func TestAnonymousCredentials(t *testing.T) {
- svc := awstesting.NewClient(&aws.Config{Credentials: credentials.AnonymousCredentials})
- r := svc.NewRequest(
- &request.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
- Sign(r)
-
- urlQ := r.HTTPRequest.URL.Query()
- assert.Empty(t, urlQ.Get("X-Amz-Signature"))
- assert.Empty(t, urlQ.Get("X-Amz-Credential"))
- assert.Empty(t, urlQ.Get("X-Amz-SignedHeaders"))
- assert.Empty(t, urlQ.Get("X-Amz-Date"))
-
- hQ := r.HTTPRequest.Header
- assert.Empty(t, hQ.Get("Authorization"))
- assert.Empty(t, hQ.Get("X-Amz-Date"))
-}
-
-func TestIgnoreResignRequestWithValidCreds(t *testing.T) {
- svc := awstesting.NewClient(&aws.Config{
- Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
- Region: aws.String("us-west-2"),
- })
- r := svc.NewRequest(
- &request.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
-
- Sign(r)
- sig := r.HTTPRequest.Header.Get("Authorization")
-
- Sign(r)
- assert.Equal(t, sig, r.HTTPRequest.Header.Get("Authorization"))
-}
-
-func TestIgnorePreResignRequestWithValidCreds(t *testing.T) {
- svc := awstesting.NewClient(&aws.Config{
- Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
- Region: aws.String("us-west-2"),
- })
- r := svc.NewRequest(
- &request.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
- r.ExpireTime = time.Minute * 10
-
- Sign(r)
- sig := r.HTTPRequest.Header.Get("X-Amz-Signature")
-
- Sign(r)
- assert.Equal(t, sig, r.HTTPRequest.Header.Get("X-Amz-Signature"))
-}
-
-func TestResignRequestExpiredCreds(t *testing.T) {
- creds := credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")
- svc := awstesting.NewClient(&aws.Config{Credentials: creds})
- r := svc.NewRequest(
- &request.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
- Sign(r)
- querySig := r.HTTPRequest.Header.Get("Authorization")
-
- creds.Expire()
-
- Sign(r)
- assert.NotEqual(t, querySig, r.HTTPRequest.Header.Get("Authorization"))
-}
-
-func TestPreResignRequestExpiredCreds(t *testing.T) {
- provider := &credentials.StaticProvider{Value: credentials.Value{
- AccessKeyID: "AKID",
- SecretAccessKey: "SECRET",
- SessionToken: "SESSION",
- }}
- creds := credentials.NewCredentials(provider)
- svc := awstesting.NewClient(&aws.Config{Credentials: creds})
- r := svc.NewRequest(
- &request.Operation{
- Name: "BatchGetItem",
- HTTPMethod: "POST",
- HTTPPath: "/",
- },
- nil,
- nil,
- )
- r.ExpireTime = time.Minute * 10
-
- Sign(r)
- querySig := r.HTTPRequest.URL.Query().Get("X-Amz-Signature")
-
- creds.Expire()
- r.Time = time.Now().Add(time.Hour * 48)
-
- Sign(r)
- assert.NotEqual(t, querySig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature"))
-}
-
-func BenchmarkPresignRequest(b *testing.B) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 300*time.Second, "{}")
- for i := 0; i < b.N; i++ {
- signer.sign()
- }
-}
-
-func BenchmarkSignRequest(b *testing.B) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), 0, "{}")
- for i := 0; i < b.N; i++ {
- signer.sign()
- }
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/waiter/waiter_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/waiter/waiter_test.go
deleted file mode 100644
index d545f35370f..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/waiter/waiter_test.go
+++ /dev/null
@@ -1,391 +0,0 @@
-package waiter_test
-
-import (
- "bytes"
- "io/ioutil"
- "net/http"
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/awstesting"
- "github.com/aws/aws-sdk-go/private/waiter"
-)
-
-type mockClient struct {
- *client.Client
-}
-type MockInput struct{}
-type MockOutput struct {
- States []*MockState
-}
-type MockState struct {
- State *string
-}
-
-func (c *mockClient) MockRequest(input *MockInput) (*request.Request, *MockOutput) {
- op := &request.Operation{
- Name: "Mock",
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &MockInput{}
- }
-
- output := &MockOutput{}
- req := c.NewRequest(op, input, output)
- req.Data = output
- return req, output
-}
-
-func TestWaiterPathAll(t *testing.T) {
- svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
- Region: aws.String("mock-region"),
- })}
- svc.Handlers.Send.Clear() // mock sending
- svc.Handlers.Unmarshal.Clear()
- svc.Handlers.UnmarshalMeta.Clear()
- svc.Handlers.ValidateResponse.Clear()
-
- reqNum := 0
- resps := []*MockOutput{
- { // Request 1
- States: []*MockState{
- {State: aws.String("pending")},
- {State: aws.String("pending")},
- },
- },
- { // Request 2
- States: []*MockState{
- {State: aws.String("running")},
- {State: aws.String("pending")},
- },
- },
- { // Request 3
- States: []*MockState{
- {State: aws.String("running")},
- {State: aws.String("running")},
- },
- },
- }
-
- numBuiltReq := 0
- svc.Handlers.Build.PushBack(func(r *request.Request) {
- numBuiltReq++
- })
- svc.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- if reqNum >= len(resps) {
- assert.Fail(t, "too many polling requests made")
- return
- }
- r.Data = resps[reqNum]
- reqNum++
- })
-
- waiterCfg := waiter.Config{
- Operation: "Mock",
- Delay: 0,
- MaxAttempts: 10,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "States[].State",
- Expected: "running",
- },
- },
- }
- w := waiter.Waiter{
- Client: svc,
- Input: &MockInput{},
- Config: waiterCfg,
- }
-
- err := w.Wait()
- assert.NoError(t, err)
- assert.Equal(t, 3, numBuiltReq)
- assert.Equal(t, 3, reqNum)
-}
-
-func TestWaiterPath(t *testing.T) {
- svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
- Region: aws.String("mock-region"),
- })}
- svc.Handlers.Send.Clear() // mock sending
- svc.Handlers.Unmarshal.Clear()
- svc.Handlers.UnmarshalMeta.Clear()
- svc.Handlers.ValidateResponse.Clear()
-
- reqNum := 0
- resps := []*MockOutput{
- { // Request 1
- States: []*MockState{
- {State: aws.String("pending")},
- {State: aws.String("pending")},
- },
- },
- { // Request 2
- States: []*MockState{
- {State: aws.String("running")},
- {State: aws.String("pending")},
- },
- },
- { // Request 3
- States: []*MockState{
- {State: aws.String("running")},
- {State: aws.String("running")},
- },
- },
- }
-
- numBuiltReq := 0
- svc.Handlers.Build.PushBack(func(r *request.Request) {
- numBuiltReq++
- })
- svc.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- if reqNum >= len(resps) {
- assert.Fail(t, "too many polling requests made")
- return
- }
- r.Data = resps[reqNum]
- reqNum++
- })
-
- waiterCfg := waiter.Config{
- Operation: "Mock",
- Delay: 0,
- MaxAttempts: 10,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "path",
- Argument: "States[].State",
- Expected: "running",
- },
- },
- }
- w := waiter.Waiter{
- Client: svc,
- Input: &MockInput{},
- Config: waiterCfg,
- }
-
- err := w.Wait()
- assert.NoError(t, err)
- assert.Equal(t, 3, numBuiltReq)
- assert.Equal(t, 3, reqNum)
-}
-
-func TestWaiterFailure(t *testing.T) {
- svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
- Region: aws.String("mock-region"),
- })}
- svc.Handlers.Send.Clear() // mock sending
- svc.Handlers.Unmarshal.Clear()
- svc.Handlers.UnmarshalMeta.Clear()
- svc.Handlers.ValidateResponse.Clear()
-
- reqNum := 0
- resps := []*MockOutput{
- { // Request 1
- States: []*MockState{
- {State: aws.String("pending")},
- {State: aws.String("pending")},
- },
- },
- { // Request 2
- States: []*MockState{
- {State: aws.String("running")},
- {State: aws.String("pending")},
- },
- },
- { // Request 3
- States: []*MockState{
- {State: aws.String("running")},
- {State: aws.String("stopping")},
- },
- },
- }
-
- numBuiltReq := 0
- svc.Handlers.Build.PushBack(func(r *request.Request) {
- numBuiltReq++
- })
- svc.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- if reqNum >= len(resps) {
- assert.Fail(t, "too many polling requests made")
- return
- }
- r.Data = resps[reqNum]
- reqNum++
- })
-
- waiterCfg := waiter.Config{
- Operation: "Mock",
- Delay: 0,
- MaxAttempts: 10,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "States[].State",
- Expected: "running",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "States[].State",
- Expected: "stopping",
- },
- },
- }
- w := waiter.Waiter{
- Client: svc,
- Input: &MockInput{},
- Config: waiterCfg,
- }
-
- err := w.Wait().(awserr.Error)
- assert.Error(t, err)
- assert.Equal(t, "ResourceNotReady", err.Code())
- assert.Equal(t, "failed waiting for successful resource state", err.Message())
- assert.Equal(t, 3, numBuiltReq)
- assert.Equal(t, 3, reqNum)
-}
-
-func TestWaiterError(t *testing.T) {
- svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
- Region: aws.String("mock-region"),
- })}
- svc.Handlers.Send.Clear() // mock sending
- svc.Handlers.Unmarshal.Clear()
- svc.Handlers.UnmarshalMeta.Clear()
- svc.Handlers.ValidateResponse.Clear()
-
- reqNum := 0
- resps := []*MockOutput{
- { // Request 1
- States: []*MockState{
- {State: aws.String("pending")},
- {State: aws.String("pending")},
- },
- },
- { // Request 2, error case
- },
- { // Request 3
- States: []*MockState{
- {State: aws.String("running")},
- {State: aws.String("running")},
- },
- },
- }
-
- numBuiltReq := 0
- svc.Handlers.Build.PushBack(func(r *request.Request) {
- numBuiltReq++
- })
- svc.Handlers.Send.PushBack(func(r *request.Request) {
- if reqNum == 1 {
- r.Error = awserr.New("MockException", "mock exception message", nil)
- r.HTTPResponse = &http.Response{
- StatusCode: 400,
- Status: http.StatusText(400),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- reqNum++
- }
- })
- svc.Handlers.Unmarshal.PushBack(func(r *request.Request) {
- if reqNum >= len(resps) {
- assert.Fail(t, "too many polling requests made")
- return
- }
- r.Data = resps[reqNum]
- reqNum++
- })
-
- waiterCfg := waiter.Config{
- Operation: "Mock",
- Delay: 0,
- MaxAttempts: 10,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "States[].State",
- Expected: "running",
- },
- {
- State: "retry",
- Matcher: "error",
- Argument: "",
- Expected: "MockException",
- },
- },
- }
- w := waiter.Waiter{
- Client: svc,
- Input: &MockInput{},
- Config: waiterCfg,
- }
-
- err := w.Wait()
- assert.NoError(t, err)
- assert.Equal(t, 3, numBuiltReq)
- assert.Equal(t, 3, reqNum)
-}
-
-func TestWaiterStatus(t *testing.T) {
- svc := &mockClient{Client: awstesting.NewClient(&aws.Config{
- Region: aws.String("mock-region"),
- })}
- svc.Handlers.Send.Clear() // mock sending
- svc.Handlers.Unmarshal.Clear()
- svc.Handlers.UnmarshalMeta.Clear()
- svc.Handlers.ValidateResponse.Clear()
-
- reqNum := 0
- svc.Handlers.Build.PushBack(func(r *request.Request) {
- reqNum++
- })
- svc.Handlers.Send.PushBack(func(r *request.Request) {
- code := 200
- if reqNum == 3 {
- code = 404
- }
- r.HTTPResponse = &http.Response{
- StatusCode: code,
- Status: http.StatusText(code),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- })
-
- waiterCfg := waiter.Config{
- Operation: "Mock",
- Delay: 0,
- MaxAttempts: 10,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "status",
- Argument: "",
- Expected: 404,
- },
- },
- }
- w := waiter.Waiter{
- Client: svc,
- Input: &MockInput{},
- Config: waiterCfg,
- }
-
- err := w.Wait()
- assert.NoError(t, err)
- assert.Equal(t, 3, reqNum)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/api.go
deleted file mode 100644
index 2099e40491d..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/api.go
+++ /dev/null
@@ -1,1481 +0,0 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-// Package cloudwatch provides a client for Amazon CloudWatch.
-package cloudwatch
-
-import (
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const opDeleteAlarms = "DeleteAlarms"
-
-// DeleteAlarmsRequest generates a request for the DeleteAlarms operation.
-func (c *CloudWatch) DeleteAlarmsRequest(input *DeleteAlarmsInput) (req *request.Request, output *DeleteAlarmsOutput) {
- op := &request.Operation{
- Name: opDeleteAlarms,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteAlarmsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteAlarmsOutput{}
- req.Data = output
- return
-}
-
-// Deletes all specified alarms. In the event of an error, no alarms are deleted.
-func (c *CloudWatch) DeleteAlarms(input *DeleteAlarmsInput) (*DeleteAlarmsOutput, error) {
- req, out := c.DeleteAlarmsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeAlarmHistory = "DescribeAlarmHistory"
-
-// DescribeAlarmHistoryRequest generates a request for the DescribeAlarmHistory operation.
-func (c *CloudWatch) DescribeAlarmHistoryRequest(input *DescribeAlarmHistoryInput) (req *request.Request, output *DescribeAlarmHistoryOutput) {
- op := &request.Operation{
- Name: opDescribeAlarmHistory,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxRecords",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeAlarmHistoryInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeAlarmHistoryOutput{}
- req.Data = output
- return
-}
-
-// Retrieves history for the specified alarm. Filter alarms by date range or
-// item type. If an alarm name is not specified, Amazon CloudWatch returns histories
-// for all of the owner's alarms.
-func (c *CloudWatch) DescribeAlarmHistory(input *DescribeAlarmHistoryInput) (*DescribeAlarmHistoryOutput, error) {
- req, out := c.DescribeAlarmHistoryRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *CloudWatch) DescribeAlarmHistoryPages(input *DescribeAlarmHistoryInput, fn func(p *DescribeAlarmHistoryOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeAlarmHistoryRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeAlarmHistoryOutput), lastPage)
- })
-}
-
-const opDescribeAlarms = "DescribeAlarms"
-
-// DescribeAlarmsRequest generates a request for the DescribeAlarms operation.
-func (c *CloudWatch) DescribeAlarmsRequest(input *DescribeAlarmsInput) (req *request.Request, output *DescribeAlarmsOutput) {
- op := &request.Operation{
- Name: opDescribeAlarms,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxRecords",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeAlarmsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeAlarmsOutput{}
- req.Data = output
- return
-}
-
-// Retrieves alarms with the specified names. If no name is specified, all alarms
-// for the user are returned. Alarms can be retrieved by using only a prefix
-// for the alarm name, the alarm state, or a prefix for any action.
-func (c *CloudWatch) DescribeAlarms(input *DescribeAlarmsInput) (*DescribeAlarmsOutput, error) {
- req, out := c.DescribeAlarmsRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *CloudWatch) DescribeAlarmsPages(input *DescribeAlarmsInput, fn func(p *DescribeAlarmsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeAlarmsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeAlarmsOutput), lastPage)
- })
-}
-
-const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric"
-
-// DescribeAlarmsForMetricRequest generates a request for the DescribeAlarmsForMetric operation.
-func (c *CloudWatch) DescribeAlarmsForMetricRequest(input *DescribeAlarmsForMetricInput) (req *request.Request, output *DescribeAlarmsForMetricOutput) {
- op := &request.Operation{
- Name: opDescribeAlarmsForMetric,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeAlarmsForMetricInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeAlarmsForMetricOutput{}
- req.Data = output
- return
-}
-
-// Retrieves all alarms for a single metric. Specify a statistic, period, or
-// unit to filter the set of alarms further.
-func (c *CloudWatch) DescribeAlarmsForMetric(input *DescribeAlarmsForMetricInput) (*DescribeAlarmsForMetricOutput, error) {
- req, out := c.DescribeAlarmsForMetricRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDisableAlarmActions = "DisableAlarmActions"
-
-// DisableAlarmActionsRequest generates a request for the DisableAlarmActions operation.
-func (c *CloudWatch) DisableAlarmActionsRequest(input *DisableAlarmActionsInput) (req *request.Request, output *DisableAlarmActionsOutput) {
- op := &request.Operation{
- Name: opDisableAlarmActions,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisableAlarmActionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DisableAlarmActionsOutput{}
- req.Data = output
- return
-}
-
-// Disables actions for the specified alarms. When an alarm's actions are disabled
-// the alarm's state may change, but none of the alarm's actions will execute.
-func (c *CloudWatch) DisableAlarmActions(input *DisableAlarmActionsInput) (*DisableAlarmActionsOutput, error) {
- req, out := c.DisableAlarmActionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opEnableAlarmActions = "EnableAlarmActions"
-
-// EnableAlarmActionsRequest generates a request for the EnableAlarmActions operation.
-func (c *CloudWatch) EnableAlarmActionsRequest(input *EnableAlarmActionsInput) (req *request.Request, output *EnableAlarmActionsOutput) {
- op := &request.Operation{
- Name: opEnableAlarmActions,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnableAlarmActionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &EnableAlarmActionsOutput{}
- req.Data = output
- return
-}
-
-// Enables actions for the specified alarms.
-func (c *CloudWatch) EnableAlarmActions(input *EnableAlarmActionsInput) (*EnableAlarmActionsOutput, error) {
- req, out := c.EnableAlarmActionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opGetMetricStatistics = "GetMetricStatistics"
-
-// GetMetricStatisticsRequest generates a request for the GetMetricStatistics operation.
-func (c *CloudWatch) GetMetricStatisticsRequest(input *GetMetricStatisticsInput) (req *request.Request, output *GetMetricStatisticsOutput) {
- op := &request.Operation{
- Name: opGetMetricStatistics,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetMetricStatisticsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &GetMetricStatisticsOutput{}
- req.Data = output
- return
-}
-
-// Gets statistics for the specified metric.
-//
-// The maximum number of data points returned from a single GetMetricStatistics
-// request is 1,440, wereas the maximum number of data points that can be queried
-// is 50,850. If you make a request that generates more than 1,440 data points,
-// Amazon CloudWatch returns an error. In such a case, you can alter the request
-// by narrowing the specified time range or increasing the specified period.
-// Alternatively, you can make multiple requests across adjacent time ranges.
-//
-// Amazon CloudWatch aggregates data points based on the length of the period
-// that you specify. For example, if you request statistics with a one-minute
-// granularity, Amazon CloudWatch aggregates data points with time stamps that
-// fall within the same one-minute period. In such a case, the data points queried
-// can greatly outnumber the data points returned.
-//
-// The following examples show various statistics allowed by the data point
-// query maximum of 50,850 when you call GetMetricStatistics on Amazon EC2 instances
-// with detailed (one-minute) monitoring enabled:
-//
-// Statistics for up to 400 instances for a span of one hour Statistics for
-// up to 35 instances over a span of 24 hours Statistics for up to 2 instances
-// over a span of 2 weeks For information about the namespace, metric names,
-// and dimensions that other Amazon Web Services products use to send metrics
-// to Cloudwatch, go to Amazon CloudWatch Metrics, Namespaces, and Dimensions
-// Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html)
-// in the Amazon CloudWatch Developer Guide.
-func (c *CloudWatch) GetMetricStatistics(input *GetMetricStatisticsInput) (*GetMetricStatisticsOutput, error) {
- req, out := c.GetMetricStatisticsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opListMetrics = "ListMetrics"
-
-// ListMetricsRequest generates a request for the ListMetrics operation.
-func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.Request, output *ListMetricsOutput) {
- op := &request.Operation{
- Name: opListMetrics,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListMetricsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ListMetricsOutput{}
- req.Data = output
- return
-}
-
-// Returns a list of valid metrics stored for the AWS account owner. Returned
-// metrics can be used with GetMetricStatistics to obtain statistical data for
-// a given metric.
-func (c *CloudWatch) ListMetrics(input *ListMetricsInput) (*ListMetricsOutput, error) {
- req, out := c.ListMetricsRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *CloudWatch) ListMetricsPages(input *ListMetricsInput, fn func(p *ListMetricsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListMetricsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListMetricsOutput), lastPage)
- })
-}
-
-const opPutMetricAlarm = "PutMetricAlarm"
-
-// PutMetricAlarmRequest generates a request for the PutMetricAlarm operation.
-func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *request.Request, output *PutMetricAlarmOutput) {
- op := &request.Operation{
- Name: opPutMetricAlarm,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &PutMetricAlarmInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &PutMetricAlarmOutput{}
- req.Data = output
- return
-}
-
-// Creates or updates an alarm and associates it with the specified Amazon CloudWatch
-// metric. Optionally, this operation can associate one or more Amazon Simple
-// Notification Service resources with the alarm.
-//
-// When this operation creates an alarm, the alarm state is immediately set
-// to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is set appropriately.
-// Any actions associated with the StateValue is then executed.
-func (c *CloudWatch) PutMetricAlarm(input *PutMetricAlarmInput) (*PutMetricAlarmOutput, error) {
- req, out := c.PutMetricAlarmRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opPutMetricData = "PutMetricData"
-
-// PutMetricDataRequest generates a request for the PutMetricData operation.
-func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *request.Request, output *PutMetricDataOutput) {
- op := &request.Operation{
- Name: opPutMetricData,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &PutMetricDataInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &PutMetricDataOutput{}
- req.Data = output
- return
-}
-
-// Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch associates
-// the data points with the specified metric. If the specified metric does not
-// exist, Amazon CloudWatch creates the metric. It can take up to fifteen minutes
-// for a new metric to appear in calls to the ListMetrics action.
-//
-// The size of a PutMetricData request is limited to 8 KB for HTTP GET requests
-// and 40 KB for HTTP POST requests.
-//
-// Although the Value parameter accepts numbers of type Double, Amazon CloudWatch
-// truncates values with very large exponents. Values with base-10 exponents
-// greater than 126 (1 x 10^126) are truncated. Likewise, values with base-10
-// exponents less than -130 (1 x 10^-130) are also truncated. Data that is
-// timestamped 24 hours or more in the past may take in excess of 48 hours to
-// become available from submission time using GetMetricStatistics.
-func (c *CloudWatch) PutMetricData(input *PutMetricDataInput) (*PutMetricDataOutput, error) {
- req, out := c.PutMetricDataRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opSetAlarmState = "SetAlarmState"
-
-// SetAlarmStateRequest generates a request for the SetAlarmState operation.
-func (c *CloudWatch) SetAlarmStateRequest(input *SetAlarmStateInput) (req *request.Request, output *SetAlarmStateOutput) {
- op := &request.Operation{
- Name: opSetAlarmState,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &SetAlarmStateInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &SetAlarmStateOutput{}
- req.Data = output
- return
-}
-
-// Temporarily sets the state of an alarm. When the updated StateValue differs
-// from the previous value, the action configured for the appropriate state
-// is invoked. This is not a permanent change. The next periodic alarm check
-// (in about a minute) will set the alarm to its actual state.
-func (c *CloudWatch) SetAlarmState(input *SetAlarmStateInput) (*SetAlarmStateOutput, error) {
- req, out := c.SetAlarmStateRequest(input)
- err := req.Send()
- return out, err
-}
-
-// The AlarmHistoryItem data type contains descriptive information about the
-// history of a specific alarm. If you call DescribeAlarmHistory, Amazon CloudWatch
-// returns this data type as part of the DescribeAlarmHistoryResult data type.
-type AlarmHistoryItem struct {
- // The descriptive name for the alarm.
- AlarmName *string `min:"1" type:"string"`
-
- // Machine-readable data about the alarm in JSON format.
- HistoryData *string `min:"1" type:"string"`
-
- // The type of alarm history item.
- HistoryItemType *string `type:"string" enum:"HistoryItemType"`
-
- // A human-readable summary of the alarm history.
- HistorySummary *string `min:"1" type:"string"`
-
- // The time stamp for the alarm history item. Amazon CloudWatch uses Coordinated
- // Universal Time (UTC) when returning time stamps, which do not accommodate
- // seasonal adjustments such as daylight savings time. For more information,
- // see Time stamps (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp)
- // in the Amazon CloudWatch Developer Guide.
- Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- metadataAlarmHistoryItem `json:"-" xml:"-"`
-}
-
-type metadataAlarmHistoryItem struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AlarmHistoryItem) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AlarmHistoryItem) GoString() string {
- return s.String()
-}
-
-// The Datapoint data type encapsulates the statistical data that Amazon CloudWatch
-// computes from metric data.
-type Datapoint struct {
- // The average of metric values that correspond to the datapoint.
- Average *float64 `type:"double"`
-
- // The maximum of the metric value used for the datapoint.
- Maximum *float64 `type:"double"`
-
- // The minimum metric value used for the datapoint.
- Minimum *float64 `type:"double"`
-
- // The number of metric values that contributed to the aggregate value of this
- // datapoint.
- SampleCount *float64 `type:"double"`
-
- // The sum of metric values used for the datapoint.
- Sum *float64 `type:"double"`
-
- // The time stamp used for the datapoint. Amazon CloudWatch uses Coordinated
- // Universal Time (UTC) when returning time stamps, which do not accommodate
- // seasonal adjustments such as daylight savings time. For more information,
- // see Time stamps (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp)
- // in the Amazon CloudWatch Developer Guide.
- Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // The standard unit used for the datapoint.
- Unit *string `type:"string" enum:"StandardUnit"`
-
- metadataDatapoint `json:"-" xml:"-"`
-}
-
-type metadataDatapoint struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Datapoint) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Datapoint) GoString() string {
- return s.String()
-}
-
-type DeleteAlarmsInput struct {
- // A list of alarms to be deleted.
- AlarmNames []*string `type:"list" required:"true"`
-
- metadataDeleteAlarmsInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteAlarmsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteAlarmsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteAlarmsInput) GoString() string {
- return s.String()
-}
-
-type DeleteAlarmsOutput struct {
- metadataDeleteAlarmsOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteAlarmsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteAlarmsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteAlarmsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeAlarmHistoryInput struct {
- // The name of the alarm.
- AlarmName *string `min:"1" type:"string"`
-
- // The ending date to retrieve alarm history.
- EndDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // The type of alarm histories to retrieve.
- HistoryItemType *string `type:"string" enum:"HistoryItemType"`
-
- // The maximum number of alarm history records to retrieve.
- MaxRecords *int64 `min:"1" type:"integer"`
-
- // The token returned by a previous call to indicate that there is more data
- // available.
- NextToken *string `type:"string"`
-
- // The starting date to retrieve alarm history.
- StartDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- metadataDescribeAlarmHistoryInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAlarmHistoryInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAlarmHistoryInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAlarmHistoryInput) GoString() string {
- return s.String()
-}
-
-// The output for the DescribeAlarmHistory action.
-type DescribeAlarmHistoryOutput struct {
- // A list of alarm histories in JSON format.
- AlarmHistoryItems []*AlarmHistoryItem `type:"list"`
-
- // A string that marks the start of the next batch of returned results.
- NextToken *string `type:"string"`
-
- metadataDescribeAlarmHistoryOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAlarmHistoryOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAlarmHistoryOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAlarmHistoryOutput) GoString() string {
- return s.String()
-}
-
-type DescribeAlarmsForMetricInput struct {
- // The list of dimensions associated with the metric.
- Dimensions []*Dimension `type:"list"`
-
- // The name of the metric.
- MetricName *string `min:"1" type:"string" required:"true"`
-
- // The namespace of the metric.
- Namespace *string `min:"1" type:"string" required:"true"`
-
- // The period in seconds over which the statistic is applied.
- Period *int64 `min:"60" type:"integer"`
-
- // The statistic for the metric.
- Statistic *string `type:"string" enum:"Statistic"`
-
- // The unit for the metric.
- Unit *string `type:"string" enum:"StandardUnit"`
-
- metadataDescribeAlarmsForMetricInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAlarmsForMetricInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAlarmsForMetricInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAlarmsForMetricInput) GoString() string {
- return s.String()
-}
-
-// The output for the DescribeAlarmsForMetric action.
-type DescribeAlarmsForMetricOutput struct {
- // A list of information for each alarm with the specified metric.
- MetricAlarms []*MetricAlarm `type:"list"`
-
- metadataDescribeAlarmsForMetricOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAlarmsForMetricOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAlarmsForMetricOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAlarmsForMetricOutput) GoString() string {
- return s.String()
-}
-
-type DescribeAlarmsInput struct {
- // The action name prefix.
- ActionPrefix *string `min:"1" type:"string"`
-
- // The alarm name prefix. AlarmNames cannot be specified if this parameter is
- // specified.
- AlarmNamePrefix *string `min:"1" type:"string"`
-
- // A list of alarm names to retrieve information for.
- AlarmNames []*string `type:"list"`
-
- // The maximum number of alarm descriptions to retrieve.
- MaxRecords *int64 `min:"1" type:"integer"`
-
- // The token returned by a previous call to indicate that there is more data
- // available.
- NextToken *string `type:"string"`
-
- // The state value to be used in matching alarms.
- StateValue *string `type:"string" enum:"StateValue"`
-
- metadataDescribeAlarmsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAlarmsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAlarmsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAlarmsInput) GoString() string {
- return s.String()
-}
-
-// The output for the DescribeAlarms action.
-type DescribeAlarmsOutput struct {
- // A list of information for the specified alarms.
- MetricAlarms []*MetricAlarm `type:"list"`
-
- // A string that marks the start of the next batch of returned results.
- NextToken *string `type:"string"`
-
- metadataDescribeAlarmsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAlarmsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAlarmsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAlarmsOutput) GoString() string {
- return s.String()
-}
-
-// The Dimension data type further expands on the identity of a metric using
-// a Name, Value pair.
-//
-// For examples that use one or more dimensions, see PutMetricData.
-type Dimension struct {
- // The name of the dimension.
- Name *string `min:"1" type:"string" required:"true"`
-
- // The value representing the dimension measurement
- Value *string `min:"1" type:"string" required:"true"`
-
- metadataDimension `json:"-" xml:"-"`
-}
-
-type metadataDimension struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Dimension) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Dimension) GoString() string {
- return s.String()
-}
-
-// The DimensionFilter data type is used to filter ListMetrics results.
-type DimensionFilter struct {
- // The dimension name to be matched.
- Name *string `min:"1" type:"string" required:"true"`
-
- // The value of the dimension to be matched.
- Value *string `min:"1" type:"string"`
-
- metadataDimensionFilter `json:"-" xml:"-"`
-}
-
-type metadataDimensionFilter struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DimensionFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DimensionFilter) GoString() string {
- return s.String()
-}
-
-type DisableAlarmActionsInput struct {
- // The names of the alarms to disable actions for.
- AlarmNames []*string `type:"list" required:"true"`
-
- metadataDisableAlarmActionsInput `json:"-" xml:"-"`
-}
-
-type metadataDisableAlarmActionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisableAlarmActionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisableAlarmActionsInput) GoString() string {
- return s.String()
-}
-
-type DisableAlarmActionsOutput struct {
- metadataDisableAlarmActionsOutput `json:"-" xml:"-"`
-}
-
-type metadataDisableAlarmActionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisableAlarmActionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisableAlarmActionsOutput) GoString() string {
- return s.String()
-}
-
-type EnableAlarmActionsInput struct {
- // The names of the alarms to enable actions for.
- AlarmNames []*string `type:"list" required:"true"`
-
- metadataEnableAlarmActionsInput `json:"-" xml:"-"`
-}
-
-type metadataEnableAlarmActionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableAlarmActionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableAlarmActionsInput) GoString() string {
- return s.String()
-}
-
-type EnableAlarmActionsOutput struct {
- metadataEnableAlarmActionsOutput `json:"-" xml:"-"`
-}
-
-type metadataEnableAlarmActionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableAlarmActionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableAlarmActionsOutput) GoString() string {
- return s.String()
-}
-
-type GetMetricStatisticsInput struct {
- // A list of dimensions describing qualities of the metric.
- Dimensions []*Dimension `type:"list"`
-
- // The time stamp to use for determining the last datapoint to return. The value
- // specified is exclusive; results will include datapoints up to the time stamp
- // specified.
- EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
-
- // The name of the metric, with or without spaces.
- MetricName *string `min:"1" type:"string" required:"true"`
-
- // The namespace of the metric, with or without spaces.
- Namespace *string `min:"1" type:"string" required:"true"`
-
- // The granularity, in seconds, of the returned datapoints. Period must be at
- // least 60 seconds and must be a multiple of 60. The default value is 60.
- Period *int64 `min:"60" type:"integer" required:"true"`
-
- // The time stamp to use for determining the first datapoint to return. The
- // value specified is inclusive; results include datapoints with the time stamp
- // specified.
- StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
-
- // The metric statistics to return. For information about specific statistics
- // returned by GetMetricStatistics, go to Statistics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/index.html?CHAP_TerminologyandKeyConcepts.html#Statistic)
- // in the Amazon CloudWatch Developer Guide.
- //
- // Valid Values: Average | Sum | SampleCount | Maximum | Minimum
- Statistics []*string `min:"1" type:"list" required:"true"`
-
- // The unit for the metric.
- Unit *string `type:"string" enum:"StandardUnit"`
-
- metadataGetMetricStatisticsInput `json:"-" xml:"-"`
-}
-
-type metadataGetMetricStatisticsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetMetricStatisticsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetMetricStatisticsInput) GoString() string {
- return s.String()
-}
-
-// The output for the GetMetricStatistics action.
-type GetMetricStatisticsOutput struct {
- // The datapoints for the specified metric.
- Datapoints []*Datapoint `type:"list"`
-
- // A label describing the specified metric.
- Label *string `type:"string"`
-
- metadataGetMetricStatisticsOutput `json:"-" xml:"-"`
-}
-
-type metadataGetMetricStatisticsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetMetricStatisticsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetMetricStatisticsOutput) GoString() string {
- return s.String()
-}
-
-type ListMetricsInput struct {
- // A list of dimensions to filter against.
- Dimensions []*DimensionFilter `type:"list"`
-
- // The name of the metric to filter against.
- MetricName *string `min:"1" type:"string"`
-
- // The namespace to filter against.
- Namespace *string `min:"1" type:"string"`
-
- // The token returned by a previous call to indicate that there is more data
- // available.
- NextToken *string `type:"string"`
-
- metadataListMetricsInput `json:"-" xml:"-"`
-}
-
-type metadataListMetricsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ListMetricsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListMetricsInput) GoString() string {
- return s.String()
-}
-
-// The output for the ListMetrics action.
-type ListMetricsOutput struct {
- // A list of metrics used to generate statistics for an AWS account.
- Metrics []*Metric `type:"list"`
-
- // A string that marks the start of the next batch of returned results.
- NextToken *string `type:"string"`
-
- metadataListMetricsOutput `json:"-" xml:"-"`
-}
-
-type metadataListMetricsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ListMetricsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListMetricsOutput) GoString() string {
- return s.String()
-}
-
-// The Metric data type contains information about a specific metric. If you
-// call ListMetrics, Amazon CloudWatch returns information contained by this
-// data type.
-//
-// The example in the Examples section publishes two metrics named buffers
-// and latency. Both metrics are in the examples namespace. Both metrics have
-// two dimensions, InstanceID and InstanceType.
-type Metric struct {
- // A list of dimensions associated with the metric.
- Dimensions []*Dimension `type:"list"`
-
- // The name of the metric.
- MetricName *string `min:"1" type:"string"`
-
- // The namespace of the metric.
- Namespace *string `min:"1" type:"string"`
-
- metadataMetric `json:"-" xml:"-"`
-}
-
-type metadataMetric struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Metric) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Metric) GoString() string {
- return s.String()
-}
-
-// The MetricAlarm data type represents an alarm. You can use PutMetricAlarm
-// to create or update an alarm.
-type MetricAlarm struct {
- // Indicates whether actions should be executed during any changes to the alarm's
- // state.
- ActionsEnabled *bool `type:"boolean"`
-
- // The list of actions to execute when this alarm transitions into an ALARM
- // state from any other state. Each action is specified as an Amazon Resource
- // Number (ARN). Currently the only actions supported are publishing to an Amazon
- // SNS topic and triggering an Auto Scaling policy.
- AlarmActions []*string `type:"list"`
-
- // The Amazon Resource Name (ARN) of the alarm.
- AlarmArn *string `min:"1" type:"string"`
-
- // The time stamp of the last update to the alarm configuration. Amazon CloudWatch
- // uses Coordinated Universal Time (UTC) when returning time stamps, which do
- // not accommodate seasonal adjustments such as daylight savings time. For more
- // information, see Time stamps (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp)
- // in the Amazon CloudWatch Developer Guide.
- AlarmConfigurationUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // The description for the alarm.
- AlarmDescription *string `type:"string"`
-
- // The name of the alarm.
- AlarmName *string `min:"1" type:"string"`
-
- // The arithmetic operation to use when comparing the specified Statistic and
- // Threshold. The specified Statistic value is used as the first operand.
- ComparisonOperator *string `type:"string" enum:"ComparisonOperator"`
-
- // The list of dimensions associated with the alarm's associated metric.
- Dimensions []*Dimension `type:"list"`
-
- // The number of periods over which data is compared to the specified threshold.
- EvaluationPeriods *int64 `min:"1" type:"integer"`
-
- // The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA
- // state from any other state. Each action is specified as an Amazon Resource
- // Number (ARN). Currently the only actions supported are publishing to an Amazon
- // SNS topic or triggering an Auto Scaling policy.
- //
- // The current WSDL lists this attribute as UnknownActions.
- InsufficientDataActions []*string `type:"list"`
-
- // The name of the alarm's metric.
- MetricName *string `min:"1" type:"string"`
-
- // The namespace of alarm's associated metric.
- Namespace *string `min:"1" type:"string"`
-
- // The list of actions to execute when this alarm transitions into an OK state
- // from any other state. Each action is specified as an Amazon Resource Number
- // (ARN). Currently the only actions supported are publishing to an Amazon SNS
- // topic and triggering an Auto Scaling policy.
- OKActions []*string `type:"list"`
-
- // The period in seconds over which the statistic is applied.
- Period *int64 `min:"60" type:"integer"`
-
- // A human-readable explanation for the alarm's state.
- StateReason *string `type:"string"`
-
- // An explanation for the alarm's state in machine-readable JSON format
- StateReasonData *string `type:"string"`
-
- // The time stamp of the last update to the alarm's state. Amazon CloudWatch
- // uses Coordinated Universal Time (UTC) when returning time stamps, which do
- // not accommodate seasonal adjustments such as daylight savings time. For more
- // information, see Time stamps (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp)
- // in the Amazon CloudWatch Developer Guide.
- StateUpdatedTimestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // The state value for the alarm.
- StateValue *string `type:"string" enum:"StateValue"`
-
- // The statistic to apply to the alarm's associated metric.
- Statistic *string `type:"string" enum:"Statistic"`
-
- // The value against which the specified statistic is compared.
- Threshold *float64 `type:"double"`
-
- // The unit of the alarm's associated metric.
- Unit *string `type:"string" enum:"StandardUnit"`
-
- metadataMetricAlarm `json:"-" xml:"-"`
-}
-
-type metadataMetricAlarm struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s MetricAlarm) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MetricAlarm) GoString() string {
- return s.String()
-}
-
-// The MetricDatum data type encapsulates the information sent with PutMetricData
-// to either create a new metric or add new values to be aggregated into an
-// existing metric.
-type MetricDatum struct {
- // A list of dimensions associated with the metric. Note, when using the Dimensions
- // value in a query, you need to append .member.N to it (e.g., Dimensions.member.N).
- Dimensions []*Dimension `type:"list"`
-
- // The name of the metric.
- MetricName *string `min:"1" type:"string" required:"true"`
-
- // A set of statistical values describing the metric.
- StatisticValues *StatisticSet `type:"structure"`
-
- // The time stamp used for the metric. If not specified, the default value is
- // set to the time the metric data was received. Amazon CloudWatch uses Coordinated
- // Universal Time (UTC) when returning time stamps, which do not accommodate
- // seasonal adjustments such as daylight savings time. For more information,
- // see Time stamps (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp)
- // in the Amazon CloudWatch Developer Guide.
- Timestamp *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // The unit of the metric.
- Unit *string `type:"string" enum:"StandardUnit"`
-
- // The value for the metric.
- //
- // Although the Value parameter accepts numbers of type Double, Amazon CloudWatch
- // truncates values with very large exponents. Values with base-10 exponents
- // greater than 126 (1 x 10^126) are truncated. Likewise, values with base-10
- // exponents less than -130 (1 x 10^-130) are also truncated.
- Value *float64 `type:"double"`
-
- metadataMetricDatum `json:"-" xml:"-"`
-}
-
-type metadataMetricDatum struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s MetricDatum) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MetricDatum) GoString() string {
- return s.String()
-}
-
-type PutMetricAlarmInput struct {
- // Indicates whether or not actions should be executed during any changes to
- // the alarm's state.
- ActionsEnabled *bool `type:"boolean"`
-
- // The list of actions to execute when this alarm transitions into an ALARM
- // state from any other state. Each action is specified as an Amazon Resource
- // Number (ARN). Currently the only action supported is publishing to an Amazon
- // SNS topic or an Amazon Auto Scaling policy.
- AlarmActions []*string `type:"list"`
-
- // The description for the alarm.
- AlarmDescription *string `type:"string"`
-
- // The descriptive name for the alarm. This name must be unique within the user's
- // AWS account
- AlarmName *string `min:"1" type:"string" required:"true"`
-
- // The arithmetic operation to use when comparing the specified Statistic and
- // Threshold. The specified Statistic value is used as the first operand.
- ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
-
- // The dimensions for the alarm's associated metric.
- Dimensions []*Dimension `type:"list"`
-
- // The number of periods over which data is compared to the specified threshold.
- EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"`
-
- // The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA
- // state from any other state. Each action is specified as an Amazon Resource
- // Number (ARN). Currently the only action supported is publishing to an Amazon
- // SNS topic or an Amazon Auto Scaling policy.
- InsufficientDataActions []*string `type:"list"`
-
- // The name for the alarm's associated metric.
- MetricName *string `min:"1" type:"string" required:"true"`
-
- // The namespace for the alarm's associated metric.
- Namespace *string `min:"1" type:"string" required:"true"`
-
- // The list of actions to execute when this alarm transitions into an OK state
- // from any other state. Each action is specified as an Amazon Resource Number
- // (ARN). Currently the only action supported is publishing to an Amazon SNS
- // topic or an Amazon Auto Scaling policy.
- OKActions []*string `type:"list"`
-
- // The period in seconds over which the specified statistic is applied.
- Period *int64 `min:"60" type:"integer" required:"true"`
-
- // The statistic to apply to the alarm's associated metric.
- Statistic *string `type:"string" required:"true" enum:"Statistic"`
-
- // The value against which the specified statistic is compared.
- Threshold *float64 `type:"double" required:"true"`
-
- // The unit for the alarm's associated metric.
- Unit *string `type:"string" enum:"StandardUnit"`
-
- metadataPutMetricAlarmInput `json:"-" xml:"-"`
-}
-
-type metadataPutMetricAlarmInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutMetricAlarmInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutMetricAlarmInput) GoString() string {
- return s.String()
-}
-
-type PutMetricAlarmOutput struct {
- metadataPutMetricAlarmOutput `json:"-" xml:"-"`
-}
-
-type metadataPutMetricAlarmOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutMetricAlarmOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutMetricAlarmOutput) GoString() string {
- return s.String()
-}
-
-type PutMetricDataInput struct {
- // A list of data describing the metric.
- MetricData []*MetricDatum `type:"list" required:"true"`
-
- // The namespace for the metric data.
- Namespace *string `min:"1" type:"string" required:"true"`
-
- metadataPutMetricDataInput `json:"-" xml:"-"`
-}
-
-type metadataPutMetricDataInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutMetricDataInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutMetricDataInput) GoString() string {
- return s.String()
-}
-
-type PutMetricDataOutput struct {
- metadataPutMetricDataOutput `json:"-" xml:"-"`
-}
-
-type metadataPutMetricDataOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutMetricDataOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutMetricDataOutput) GoString() string {
- return s.String()
-}
-
-type SetAlarmStateInput struct {
- // The descriptive name for the alarm. This name must be unique within the user's
- // AWS account. The maximum length is 255 characters.
- AlarmName *string `min:"1" type:"string" required:"true"`
-
- // The reason that this alarm is set to this specific state (in human-readable
- // text format)
- StateReason *string `type:"string" required:"true"`
-
- // The reason that this alarm is set to this specific state (in machine-readable
- // JSON format)
- StateReasonData *string `type:"string"`
-
- // The value of the state.
- StateValue *string `type:"string" required:"true" enum:"StateValue"`
-
- metadataSetAlarmStateInput `json:"-" xml:"-"`
-}
-
-type metadataSetAlarmStateInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SetAlarmStateInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SetAlarmStateInput) GoString() string {
- return s.String()
-}
-
-type SetAlarmStateOutput struct {
- metadataSetAlarmStateOutput `json:"-" xml:"-"`
-}
-
-type metadataSetAlarmStateOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SetAlarmStateOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SetAlarmStateOutput) GoString() string {
- return s.String()
-}
-
-// The StatisticSet data type describes the StatisticValues component of MetricDatum,
-// and represents a set of statistics that describes a specific metric.
-type StatisticSet struct {
- // The maximum value of the sample set.
- Maximum *float64 `type:"double" required:"true"`
-
- // The minimum value of the sample set.
- Minimum *float64 `type:"double" required:"true"`
-
- // The number of samples used for the statistic set.
- SampleCount *float64 `type:"double" required:"true"`
-
- // The sum of values for the sample set.
- Sum *float64 `type:"double" required:"true"`
-
- metadataStatisticSet `json:"-" xml:"-"`
-}
-
-type metadataStatisticSet struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s StatisticSet) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StatisticSet) GoString() string {
- return s.String()
-}
-
-const (
- // @enum ComparisonOperator
- ComparisonOperatorGreaterThanOrEqualToThreshold = "GreaterThanOrEqualToThreshold"
- // @enum ComparisonOperator
- ComparisonOperatorGreaterThanThreshold = "GreaterThanThreshold"
- // @enum ComparisonOperator
- ComparisonOperatorLessThanThreshold = "LessThanThreshold"
- // @enum ComparisonOperator
- ComparisonOperatorLessThanOrEqualToThreshold = "LessThanOrEqualToThreshold"
-)
-
-const (
- // @enum HistoryItemType
- HistoryItemTypeConfigurationUpdate = "ConfigurationUpdate"
- // @enum HistoryItemType
- HistoryItemTypeStateUpdate = "StateUpdate"
- // @enum HistoryItemType
- HistoryItemTypeAction = "Action"
-)
-
-const (
- // @enum StandardUnit
- StandardUnitSeconds = "Seconds"
- // @enum StandardUnit
- StandardUnitMicroseconds = "Microseconds"
- // @enum StandardUnit
- StandardUnitMilliseconds = "Milliseconds"
- // @enum StandardUnit
- StandardUnitBytes = "Bytes"
- // @enum StandardUnit
- StandardUnitKilobytes = "Kilobytes"
- // @enum StandardUnit
- StandardUnitMegabytes = "Megabytes"
- // @enum StandardUnit
- StandardUnitGigabytes = "Gigabytes"
- // @enum StandardUnit
- StandardUnitTerabytes = "Terabytes"
- // @enum StandardUnit
- StandardUnitBits = "Bits"
- // @enum StandardUnit
- StandardUnitKilobits = "Kilobits"
- // @enum StandardUnit
- StandardUnitMegabits = "Megabits"
- // @enum StandardUnit
- StandardUnitGigabits = "Gigabits"
- // @enum StandardUnit
- StandardUnitTerabits = "Terabits"
- // @enum StandardUnit
- StandardUnitPercent = "Percent"
- // @enum StandardUnit
- StandardUnitCount = "Count"
- // @enum StandardUnit
- StandardUnitBytesSecond = "Bytes/Second"
- // @enum StandardUnit
- StandardUnitKilobytesSecond = "Kilobytes/Second"
- // @enum StandardUnit
- StandardUnitMegabytesSecond = "Megabytes/Second"
- // @enum StandardUnit
- StandardUnitGigabytesSecond = "Gigabytes/Second"
- // @enum StandardUnit
- StandardUnitTerabytesSecond = "Terabytes/Second"
- // @enum StandardUnit
- StandardUnitBitsSecond = "Bits/Second"
- // @enum StandardUnit
- StandardUnitKilobitsSecond = "Kilobits/Second"
- // @enum StandardUnit
- StandardUnitMegabitsSecond = "Megabits/Second"
- // @enum StandardUnit
- StandardUnitGigabitsSecond = "Gigabits/Second"
- // @enum StandardUnit
- StandardUnitTerabitsSecond = "Terabits/Second"
- // @enum StandardUnit
- StandardUnitCountSecond = "Count/Second"
- // @enum StandardUnit
- StandardUnitNone = "None"
-)
-
-const (
- // @enum StateValue
- StateValueOk = "OK"
- // @enum StateValue
- StateValueAlarm = "ALARM"
- // @enum StateValue
- StateValueInsufficientData = "INSUFFICIENT_DATA"
-)
-
-const (
- // @enum Statistic
- StatisticSampleCount = "SampleCount"
- // @enum Statistic
- StatisticAverage = "Average"
- // @enum Statistic
- StatisticSum = "Sum"
- // @enum Statistic
- StatisticMinimum = "Minimum"
- // @enum Statistic
- StatisticMaximum = "Maximum"
-)
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/examples_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/examples_test.go
deleted file mode 100644
index 07b010852b9..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/examples_test.go
+++ /dev/null
@@ -1,337 +0,0 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-package cloudwatch_test
-
-import (
- "bytes"
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/cloudwatch"
-)
-
-var _ time.Duration
-var _ bytes.Buffer
-
-func ExampleCloudWatch_DeleteAlarms() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.DeleteAlarmsInput{
- AlarmNames: []*string{ // Required
- aws.String("AlarmName"), // Required
- // More values...
- },
- }
- resp, err := svc.DeleteAlarms(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_DescribeAlarmHistory() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.DescribeAlarmHistoryInput{
- AlarmName: aws.String("AlarmName"),
- EndDate: aws.Time(time.Now()),
- HistoryItemType: aws.String("HistoryItemType"),
- MaxRecords: aws.Int64(1),
- NextToken: aws.String("NextToken"),
- StartDate: aws.Time(time.Now()),
- }
- resp, err := svc.DescribeAlarmHistory(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_DescribeAlarms() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.DescribeAlarmsInput{
- ActionPrefix: aws.String("ActionPrefix"),
- AlarmNamePrefix: aws.String("AlarmNamePrefix"),
- AlarmNames: []*string{
- aws.String("AlarmName"), // Required
- // More values...
- },
- MaxRecords: aws.Int64(1),
- NextToken: aws.String("NextToken"),
- StateValue: aws.String("StateValue"),
- }
- resp, err := svc.DescribeAlarms(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_DescribeAlarmsForMetric() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.DescribeAlarmsForMetricInput{
- MetricName: aws.String("MetricName"), // Required
- Namespace: aws.String("Namespace"), // Required
- Dimensions: []*cloudwatch.Dimension{
- { // Required
- Name: aws.String("DimensionName"), // Required
- Value: aws.String("DimensionValue"), // Required
- },
- // More values...
- },
- Period: aws.Int64(1),
- Statistic: aws.String("Statistic"),
- Unit: aws.String("StandardUnit"),
- }
- resp, err := svc.DescribeAlarmsForMetric(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_DisableAlarmActions() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.DisableAlarmActionsInput{
- AlarmNames: []*string{ // Required
- aws.String("AlarmName"), // Required
- // More values...
- },
- }
- resp, err := svc.DisableAlarmActions(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_EnableAlarmActions() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.EnableAlarmActionsInput{
- AlarmNames: []*string{ // Required
- aws.String("AlarmName"), // Required
- // More values...
- },
- }
- resp, err := svc.EnableAlarmActions(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_GetMetricStatistics() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.GetMetricStatisticsInput{
- EndTime: aws.Time(time.Now()), // Required
- MetricName: aws.String("MetricName"), // Required
- Namespace: aws.String("Namespace"), // Required
- Period: aws.Int64(1), // Required
- StartTime: aws.Time(time.Now()), // Required
- Statistics: []*string{ // Required
- aws.String("Statistic"), // Required
- // More values...
- },
- Dimensions: []*cloudwatch.Dimension{
- { // Required
- Name: aws.String("DimensionName"), // Required
- Value: aws.String("DimensionValue"), // Required
- },
- // More values...
- },
- Unit: aws.String("StandardUnit"),
- }
- resp, err := svc.GetMetricStatistics(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_ListMetrics() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.ListMetricsInput{
- Dimensions: []*cloudwatch.DimensionFilter{
- { // Required
- Name: aws.String("DimensionName"), // Required
- Value: aws.String("DimensionValue"),
- },
- // More values...
- },
- MetricName: aws.String("MetricName"),
- Namespace: aws.String("Namespace"),
- NextToken: aws.String("NextToken"),
- }
- resp, err := svc.ListMetrics(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_PutMetricAlarm() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.PutMetricAlarmInput{
- AlarmName: aws.String("AlarmName"), // Required
- ComparisonOperator: aws.String("ComparisonOperator"), // Required
- EvaluationPeriods: aws.Int64(1), // Required
- MetricName: aws.String("MetricName"), // Required
- Namespace: aws.String("Namespace"), // Required
- Period: aws.Int64(1), // Required
- Statistic: aws.String("Statistic"), // Required
- Threshold: aws.Float64(1.0), // Required
- ActionsEnabled: aws.Bool(true),
- AlarmActions: []*string{
- aws.String("ResourceName"), // Required
- // More values...
- },
- AlarmDescription: aws.String("AlarmDescription"),
- Dimensions: []*cloudwatch.Dimension{
- { // Required
- Name: aws.String("DimensionName"), // Required
- Value: aws.String("DimensionValue"), // Required
- },
- // More values...
- },
- InsufficientDataActions: []*string{
- aws.String("ResourceName"), // Required
- // More values...
- },
- OKActions: []*string{
- aws.String("ResourceName"), // Required
- // More values...
- },
- Unit: aws.String("StandardUnit"),
- }
- resp, err := svc.PutMetricAlarm(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_PutMetricData() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.PutMetricDataInput{
- MetricData: []*cloudwatch.MetricDatum{ // Required
- { // Required
- MetricName: aws.String("MetricName"), // Required
- Dimensions: []*cloudwatch.Dimension{
- { // Required
- Name: aws.String("DimensionName"), // Required
- Value: aws.String("DimensionValue"), // Required
- },
- // More values...
- },
- StatisticValues: &cloudwatch.StatisticSet{
- Maximum: aws.Float64(1.0), // Required
- Minimum: aws.Float64(1.0), // Required
- SampleCount: aws.Float64(1.0), // Required
- Sum: aws.Float64(1.0), // Required
- },
- Timestamp: aws.Time(time.Now()),
- Unit: aws.String("StandardUnit"),
- Value: aws.Float64(1.0),
- },
- // More values...
- },
- Namespace: aws.String("Namespace"), // Required
- }
- resp, err := svc.PutMetricData(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleCloudWatch_SetAlarmState() {
- svc := cloudwatch.New(session.New())
-
- params := &cloudwatch.SetAlarmStateInput{
- AlarmName: aws.String("AlarmName"), // Required
- StateReason: aws.String("StateReason"), // Required
- StateValue: aws.String("StateValue"), // Required
- StateReasonData: aws.String("StateReasonData"),
- }
- resp, err := svc.SetAlarmState(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/service.go
deleted file mode 100644
index e6f85068460..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/cloudwatch/service.go
+++ /dev/null
@@ -1,125 +0,0 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-package cloudwatch
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/query"
- "github.com/aws/aws-sdk-go/private/signer/v4"
-)
-
-// This is the Amazon CloudWatch API Reference. This guide provides detailed
-// information about Amazon CloudWatch actions, data types, parameters, and
-// errors. For detailed information about Amazon CloudWatch features and their
-// associated API calls, go to the Amazon CloudWatch Developer Guide (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide).
-//
-// Amazon CloudWatch is a web service that enables you to publish, monitor,
-// and manage various metrics, as well as configure alarm actions based on data
-// from metrics. For more information about this product go to http://aws.amazon.com/cloudwatch
-// (http://aws.amazon.com/cloudwatch).
-//
-// For information about the namespace, metric names, and dimensions that
-// other Amazon Web Services products use to send metrics to Cloudwatch, go
-// to Amazon CloudWatch Metrics, Namespaces, and Dimensions Reference (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html)
-// in the Amazon CloudWatch Developer Guide.
-//
-// Use the following links to get started using the Amazon CloudWatch API Reference:
-//
-// Actions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Operations.html):
-// An alphabetical list of all Amazon CloudWatch actions. Data Types (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Types.html):
-// An alphabetical list of all Amazon CloudWatch data types. Common Parameters
-// (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CommonParameters.html):
-// Parameters that all Query actions can use. Common Errors (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CommonErrors.html):
-// Client and server errors that all actions can return. Regions and Endpoints
-// (http://docs.aws.amazon.com/general/latest/gr/index.html?rande.html): Itemized
-// regions and endpoints for all AWS products. WSDL Location (http://monitoring.amazonaws.com/doc/2010-08-01/CloudWatch.wsdl):
-// http://monitoring.amazonaws.com/doc/2010-08-01/CloudWatch.wsdl In addition
-// to using the Amazon CloudWatch API, you can also use the following SDKs and
-// third-party libraries to access Amazon CloudWatch programmatically.
-//
-// AWS SDK for Java Documentation (http://aws.amazon.com/documentation/sdkforjava/)
-// AWS SDK for .NET Documentation (http://aws.amazon.com/documentation/sdkfornet/)
-// AWS SDK for PHP Documentation (http://aws.amazon.com/documentation/sdkforphp/)
-// AWS SDK for Ruby Documentation (http://aws.amazon.com/documentation/sdkforruby/)
-// Developers in the AWS developer community also provide their own libraries,
-// which you can find at the following AWS developer centers:
-//
-// AWS Java Developer Center (http://aws.amazon.com/java/) AWS PHP Developer
-// Center (http://aws.amazon.com/php/) AWS Python Developer Center (http://aws.amazon.com/python/)
-// AWS Ruby Developer Center (http://aws.amazon.com/ruby/) AWS Windows and .NET
-// Developer Center (http://aws.amazon.com/net/)
-//The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-type CloudWatch struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// A ServiceName is the name of the service the client will make API calls to.
-const ServiceName = "monitoring"
-
-// New creates a new instance of the CloudWatch client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a CloudWatch client from just a session.
-// svc := cloudwatch.New(mySession)
-//
-// // Create a CloudWatch client with additional configuration
-// svc := cloudwatch.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudWatch {
- c := p.ClientConfig(ServiceName, cfgs...)
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *CloudWatch {
- svc := &CloudWatch{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "2010-08-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBack(v4.Sign)
- svc.Handlers.Build.PushBack(query.Build)
- svc.Handlers.Unmarshal.PushBack(query.Unmarshal)
- svc.Handlers.UnmarshalMeta.PushBack(query.UnmarshalMeta)
- svc.Handlers.UnmarshalError.PushBack(query.UnmarshalError)
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a CloudWatch operation and runs any
-// custom request initialization.
-func (c *CloudWatch) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go
deleted file mode 100644
index 337392a86f2..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go
+++ /dev/null
@@ -1,24756 +0,0 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-// Package ec2 provides a client for Amazon Elastic Compute Cloud.
-package ec2
-
-import (
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection"
-
-// AcceptVpcPeeringConnectionRequest generates a request for the AcceptVpcPeeringConnection operation.
-func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectionInput) (req *request.Request, output *AcceptVpcPeeringConnectionOutput) {
- op := &request.Operation{
- Name: opAcceptVpcPeeringConnection,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AcceptVpcPeeringConnectionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AcceptVpcPeeringConnectionOutput{}
- req.Data = output
- return
-}
-
-// Accept a VPC peering connection request. To accept a request, the VPC peering
-// connection must be in the pending-acceptance state, and you must be the owner
-// of the peer VPC. Use the DescribeVpcPeeringConnections request to view your
-// outstanding VPC peering connection requests.
-func (c *EC2) AcceptVpcPeeringConnection(input *AcceptVpcPeeringConnectionInput) (*AcceptVpcPeeringConnectionOutput, error) {
- req, out := c.AcceptVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAllocateAddress = "AllocateAddress"
-
-// AllocateAddressRequest generates a request for the AllocateAddress operation.
-func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request.Request, output *AllocateAddressOutput) {
- op := &request.Operation{
- Name: opAllocateAddress,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AllocateAddressInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AllocateAddressOutput{}
- req.Data = output
- return
-}
-
-// Acquires an Elastic IP address.
-//
-// An Elastic IP address is for use either in the EC2-Classic platform or in
-// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) AllocateAddress(input *AllocateAddressInput) (*AllocateAddressOutput, error) {
- req, out := c.AllocateAddressRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses"
-
-// AssignPrivateIpAddressesRequest generates a request for the AssignPrivateIpAddresses operation.
-func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInput) (req *request.Request, output *AssignPrivateIpAddressesOutput) {
- op := &request.Operation{
- Name: opAssignPrivateIpAddresses,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssignPrivateIpAddressesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AssignPrivateIpAddressesOutput{}
- req.Data = output
- return
-}
-
-// Assigns one or more secondary private IP addresses to the specified network
-// interface. You can specify one or more specific secondary IP addresses, or
-// you can specify the number of secondary IP addresses to be automatically
-// assigned within the subnet's CIDR block range. The number of secondary IP
-// addresses that you can assign to an instance varies by instance type. For
-// information about instance types, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
-// in the Amazon Elastic Compute Cloud User Guide. For more information about
-// Elastic IP addresses, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// AssignPrivateIpAddresses is available only in EC2-VPC.
-func (c *EC2) AssignPrivateIpAddresses(input *AssignPrivateIpAddressesInput) (*AssignPrivateIpAddressesOutput, error) {
- req, out := c.AssignPrivateIpAddressesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAssociateAddress = "AssociateAddress"
-
-// AssociateAddressRequest generates a request for the AssociateAddress operation.
-func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *request.Request, output *AssociateAddressOutput) {
- op := &request.Operation{
- Name: opAssociateAddress,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssociateAddressInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AssociateAddressOutput{}
- req.Data = output
- return
-}
-
-// Associates an Elastic IP address with an instance or a network interface.
-//
-// An Elastic IP address is for use in either the EC2-Classic platform or in
-// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// [EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address
-// is already associated with a different instance, it is disassociated from
-// that instance and associated with the specified instance.
-//
-// [VPC in an EC2-Classic account] If you don't specify a private IP address,
-// the Elastic IP address is associated with the primary IP address. If the
-// Elastic IP address is already associated with a different instance or a network
-// interface, you get an error unless you allow reassociation.
-//
-// This is an idempotent operation. If you perform the operation more than
-// once, Amazon EC2 doesn't return an error.
-func (c *EC2) AssociateAddress(input *AssociateAddressInput) (*AssociateAddressOutput, error) {
- req, out := c.AssociateAddressRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAssociateDhcpOptions = "AssociateDhcpOptions"
-
-// AssociateDhcpOptionsRequest generates a request for the AssociateDhcpOptions operation.
-func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req *request.Request, output *AssociateDhcpOptionsOutput) {
- op := &request.Operation{
- Name: opAssociateDhcpOptions,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssociateDhcpOptionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AssociateDhcpOptionsOutput{}
- req.Data = output
- return
-}
-
-// Associates a set of DHCP options (that you've previously created) with the
-// specified VPC, or associates no DHCP options with the VPC.
-//
-// After you associate the options with the VPC, any existing instances and
-// all new instances that you launch in that VPC use the options. You don't
-// need to restart or relaunch the instances. They automatically pick up the
-// changes within a few hours, depending on how frequently the instance renews
-// its DHCP lease. You can explicitly renew the lease using the operating system
-// on the instance.
-//
-// For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) AssociateDhcpOptions(input *AssociateDhcpOptionsInput) (*AssociateDhcpOptionsOutput, error) {
- req, out := c.AssociateDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAssociateRouteTable = "AssociateRouteTable"
-
-// AssociateRouteTableRequest generates a request for the AssociateRouteTable operation.
-func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *request.Request, output *AssociateRouteTableOutput) {
- op := &request.Operation{
- Name: opAssociateRouteTable,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssociateRouteTableInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AssociateRouteTableOutput{}
- req.Data = output
- return
-}
-
-// Associates a subnet with a route table. The subnet and route table must be
-// in the same VPC. This association causes traffic originating from the subnet
-// to be routed according to the routes in the route table. The action returns
-// an association ID, which you need in order to disassociate the route table
-// from the subnet later. A route table can be associated with multiple subnets.
-//
-// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) AssociateRouteTable(input *AssociateRouteTableInput) (*AssociateRouteTableOutput, error) {
- req, out := c.AssociateRouteTableRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAttachClassicLinkVpc = "AttachClassicLinkVpc"
-
-// AttachClassicLinkVpcRequest generates a request for the AttachClassicLinkVpc operation.
-func (c *EC2) AttachClassicLinkVpcRequest(input *AttachClassicLinkVpcInput) (req *request.Request, output *AttachClassicLinkVpcOutput) {
- op := &request.Operation{
- Name: opAttachClassicLinkVpc,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AttachClassicLinkVpcInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AttachClassicLinkVpcOutput{}
- req.Data = output
- return
-}
-
-// Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or
-// more of the VPC's security groups. You cannot link an EC2-Classic instance
-// to more than one VPC at a time. You can only link an instance that's in the
-// running state. An instance is automatically unlinked from a VPC when it's
-// stopped - you can link it to the VPC again when you restart it.
-//
-// After you've linked an instance, you cannot change the VPC security groups
-// that are associated with it. To change the security groups, you must first
-// unlink the instance, and then link it again.
-//
-// Linking your instance to a VPC is sometimes referred to as attaching your
-// instance.
-func (c *EC2) AttachClassicLinkVpc(input *AttachClassicLinkVpcInput) (*AttachClassicLinkVpcOutput, error) {
- req, out := c.AttachClassicLinkVpcRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAttachInternetGateway = "AttachInternetGateway"
-
-// AttachInternetGatewayRequest generates a request for the AttachInternetGateway operation.
-func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (req *request.Request, output *AttachInternetGatewayOutput) {
- op := &request.Operation{
- Name: opAttachInternetGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AttachInternetGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AttachInternetGatewayOutput{}
- req.Data = output
- return
-}
-
-// Attaches an Internet gateway to a VPC, enabling connectivity between the
-// Internet and the VPC. For more information about your VPC and Internet gateway,
-// see the Amazon Virtual Private Cloud User Guide (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/).
-func (c *EC2) AttachInternetGateway(input *AttachInternetGatewayInput) (*AttachInternetGatewayOutput, error) {
- req, out := c.AttachInternetGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAttachNetworkInterface = "AttachNetworkInterface"
-
-// AttachNetworkInterfaceRequest generates a request for the AttachNetworkInterface operation.
-func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput) (req *request.Request, output *AttachNetworkInterfaceOutput) {
- op := &request.Operation{
- Name: opAttachNetworkInterface,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AttachNetworkInterfaceInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AttachNetworkInterfaceOutput{}
- req.Data = output
- return
-}
-
-// Attaches a network interface to an instance.
-func (c *EC2) AttachNetworkInterface(input *AttachNetworkInterfaceInput) (*AttachNetworkInterfaceOutput, error) {
- req, out := c.AttachNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAttachVolume = "AttachVolume"
-
-// AttachVolumeRequest generates a request for the AttachVolume operation.
-func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Request, output *VolumeAttachment) {
- op := &request.Operation{
- Name: opAttachVolume,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AttachVolumeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &VolumeAttachment{}
- req.Data = output
- return
-}
-
-// Attaches an EBS volume to a running or stopped instance and exposes it to
-// the instance with the specified device name.
-//
-// Encrypted EBS volumes may only be attached to instances that support Amazon
-// EBS encryption. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// For a list of supported device names, see Attaching an EBS Volume to an
-// Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html).
-// Any device names that aren't reserved for instance store volumes can be used
-// for EBS volumes. For more information, see Amazon EC2 Instance Store (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// If a volume has an AWS Marketplace product code:
-//
-// The volume can be attached only to a stopped instance. AWS Marketplace
-// product codes are copied from the volume to the instance. You must be subscribed
-// to the product. The instance type and operating system of the instance must
-// support the product. For example, you can't detach a volume from a Windows
-// instance and attach it to a Linux instance. For an overview of the AWS Marketplace,
-// see Introducing AWS Marketplace (https://aws.amazon.com/marketplace/help/200900000).
-//
-// For more information about EBS volumes, see Attaching Amazon EBS Volumes
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) AttachVolume(input *AttachVolumeInput) (*VolumeAttachment, error) {
- req, out := c.AttachVolumeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAttachVpnGateway = "AttachVpnGateway"
-
-// AttachVpnGatewayRequest generates a request for the AttachVpnGateway operation.
-func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *request.Request, output *AttachVpnGatewayOutput) {
- op := &request.Operation{
- Name: opAttachVpnGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AttachVpnGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AttachVpnGatewayOutput{}
- req.Data = output
- return
-}
-
-// Attaches a virtual private gateway to a VPC. For more information, see Adding
-// a Hardware Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) {
- req, out := c.AttachVpnGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress"
-
-// AuthorizeSecurityGroupEgressRequest generates a request for the AuthorizeSecurityGroupEgress operation.
-func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupEgressInput) (req *request.Request, output *AuthorizeSecurityGroupEgressOutput) {
- op := &request.Operation{
- Name: opAuthorizeSecurityGroupEgress,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AuthorizeSecurityGroupEgressInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AuthorizeSecurityGroupEgressOutput{}
- req.Data = output
- return
-}
-
-// Adds one or more egress rules to a security group for use with a VPC. Specifically,
-// this action permits instances to send traffic to one or more destination
-// CIDR IP address ranges, or to one or more destination security groups for
-// the same VPC.
-//
-// You can have up to 50 rules per security group (covering both ingress and
-// egress rules).
-//
-// A security group is for use with instances either in the EC2-Classic platform
-// or in a specific VPC. This action doesn't apply to security groups for use
-// in EC2-Classic. For more information, see Security Groups for Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
-// in the Amazon Virtual Private Cloud User Guide.
-//
-// Each rule consists of the protocol (for example, TCP), plus either a CIDR
-// range or a source group. For the TCP and UDP protocols, you must also specify
-// the destination port or port range. For the ICMP protocol, you must also
-// specify the ICMP type and code. You can use -1 for the type or code to mean
-// all types or all codes.
-//
-// Rule changes are propagated to affected instances as quickly as possible.
-// However, a small delay might occur.
-func (c *EC2) AuthorizeSecurityGroupEgress(input *AuthorizeSecurityGroupEgressInput) (*AuthorizeSecurityGroupEgressOutput, error) {
- req, out := c.AuthorizeSecurityGroupEgressRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress"
-
-// AuthorizeSecurityGroupIngressRequest generates a request for the AuthorizeSecurityGroupIngress operation.
-func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroupIngressInput) (req *request.Request, output *AuthorizeSecurityGroupIngressOutput) {
- op := &request.Operation{
- Name: opAuthorizeSecurityGroupIngress,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AuthorizeSecurityGroupIngressInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &AuthorizeSecurityGroupIngressOutput{}
- req.Data = output
- return
-}
-
-// Adds one or more ingress rules to a security group.
-//
-// EC2-Classic: You can have up to 100 rules per group.
-//
-// EC2-VPC: You can have up to 50 rules per group (covering both ingress and
-// egress rules).
-//
-// Rule changes are propagated to instances within the security group as quickly
-// as possible. However, a small delay might occur.
-//
-// [EC2-Classic] This action gives one or more CIDR IP address ranges permission
-// to access a security group in your account, or gives one or more security
-// groups (called the source groups) permission to access a security group for
-// your account. A source group can be for your own AWS account, or another.
-//
-// [EC2-VPC] This action gives one or more CIDR IP address ranges permission
-// to access a security group in your VPC, or gives one or more other security
-// groups (called the source groups) permission to access a security group for
-// your VPC. The security groups must all be for the same VPC.
-func (c *EC2) AuthorizeSecurityGroupIngress(input *AuthorizeSecurityGroupIngressInput) (*AuthorizeSecurityGroupIngressOutput, error) {
- req, out := c.AuthorizeSecurityGroupIngressRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opBundleInstance = "BundleInstance"
-
-// BundleInstanceRequest generates a request for the BundleInstance operation.
-func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *request.Request, output *BundleInstanceOutput) {
- op := &request.Operation{
- Name: opBundleInstance,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &BundleInstanceInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &BundleInstanceOutput{}
- req.Data = output
- return
-}
-
-// Bundles an Amazon instance store-backed Windows instance.
-//
-// During bundling, only the root device volume (C:\) is bundled. Data on other
-// instance store volumes is not preserved.
-//
-// This action is not applicable for Linux/Unix instances or Windows instances
-// that are backed by Amazon EBS.
-//
-// For more information, see Creating an Instance Store-Backed Windows AMI
-// (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html).
-func (c *EC2) BundleInstance(input *BundleInstanceInput) (*BundleInstanceOutput, error) {
- req, out := c.BundleInstanceRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCancelBundleTask = "CancelBundleTask"
-
-// CancelBundleTaskRequest generates a request for the CancelBundleTask operation.
-func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *request.Request, output *CancelBundleTaskOutput) {
- op := &request.Operation{
- Name: opCancelBundleTask,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelBundleTaskInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CancelBundleTaskOutput{}
- req.Data = output
- return
-}
-
-// Cancels a bundling operation for an instance store-backed Windows instance.
-func (c *EC2) CancelBundleTask(input *CancelBundleTaskInput) (*CancelBundleTaskOutput, error) {
- req, out := c.CancelBundleTaskRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCancelConversionTask = "CancelConversionTask"
-
-// CancelConversionTaskRequest generates a request for the CancelConversionTask operation.
-func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req *request.Request, output *CancelConversionTaskOutput) {
- op := &request.Operation{
- Name: opCancelConversionTask,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelConversionTaskInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CancelConversionTaskOutput{}
- req.Data = output
- return
-}
-
-// Cancels an active conversion task. The task can be the import of an instance
-// or volume. The action removes all artifacts of the conversion, including
-// a partially uploaded volume or instance. If the conversion is complete or
-// is in the process of transferring the final disk image, the command fails
-// and returns an exception.
-//
-// For more information, see Using the Command Line Tools to Import Your Virtual
-// Machine to Amazon EC2 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UploadingYourInstancesandVolumes.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CancelConversionTask(input *CancelConversionTaskInput) (*CancelConversionTaskOutput, error) {
- req, out := c.CancelConversionTaskRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCancelExportTask = "CancelExportTask"
-
-// CancelExportTaskRequest generates a request for the CancelExportTask operation.
-func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) {
- op := &request.Operation{
- Name: opCancelExportTask,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelExportTaskInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CancelExportTaskOutput{}
- req.Data = output
- return
-}
-
-// Cancels an active export task. The request removes all artifacts of the export,
-// including any partially-created Amazon S3 objects. If the export task is
-// complete or is in the process of transferring the final disk image, the command
-// fails and returns an error.
-func (c *EC2) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) {
- req, out := c.CancelExportTaskRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCancelImportTask = "CancelImportTask"
-
-// CancelImportTaskRequest generates a request for the CancelImportTask operation.
-func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *request.Request, output *CancelImportTaskOutput) {
- op := &request.Operation{
- Name: opCancelImportTask,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelImportTaskInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CancelImportTaskOutput{}
- req.Data = output
- return
-}
-
-// Cancels an in-process import virtual machine or import snapshot task.
-func (c *EC2) CancelImportTask(input *CancelImportTaskInput) (*CancelImportTaskOutput, error) {
- req, out := c.CancelImportTaskRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCancelReservedInstancesListing = "CancelReservedInstancesListing"
-
-// CancelReservedInstancesListingRequest generates a request for the CancelReservedInstancesListing operation.
-func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstancesListingInput) (req *request.Request, output *CancelReservedInstancesListingOutput) {
- op := &request.Operation{
- Name: opCancelReservedInstancesListing,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelReservedInstancesListingInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CancelReservedInstancesListingOutput{}
- req.Data = output
- return
-}
-
-// Cancels the specified Reserved Instance listing in the Reserved Instance
-// Marketplace.
-//
-// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CancelReservedInstancesListing(input *CancelReservedInstancesListingInput) (*CancelReservedInstancesListingOutput, error) {
- req, out := c.CancelReservedInstancesListingRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCancelSpotFleetRequests = "CancelSpotFleetRequests"
-
-// CancelSpotFleetRequestsRequest generates a request for the CancelSpotFleetRequests operation.
-func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput) (req *request.Request, output *CancelSpotFleetRequestsOutput) {
- op := &request.Operation{
- Name: opCancelSpotFleetRequests,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelSpotFleetRequestsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CancelSpotFleetRequestsOutput{}
- req.Data = output
- return
-}
-
-// Cancels the specified Spot fleet requests.
-//
-// After you cancel a Spot fleet request, the Spot fleet launches no new Spot
-// instances. You must specify whether the Spot fleet should also terminate
-// its Spot instances. If you terminate the instances, the Spot fleet request
-// enters the cancelled_terminating state. Otherwise, the Spot fleet request
-// enters the cancelled_running state and the instances continue to run until
-// they are interrupted or you terminate them manually.
-func (c *EC2) CancelSpotFleetRequests(input *CancelSpotFleetRequestsInput) (*CancelSpotFleetRequestsOutput, error) {
- req, out := c.CancelSpotFleetRequestsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests"
-
-// CancelSpotInstanceRequestsRequest generates a request for the CancelSpotInstanceRequests operation.
-func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequestsInput) (req *request.Request, output *CancelSpotInstanceRequestsOutput) {
- op := &request.Operation{
- Name: opCancelSpotInstanceRequests,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelSpotInstanceRequestsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CancelSpotInstanceRequestsOutput{}
- req.Data = output
- return
-}
-
-// Cancels one or more Spot instance requests. Spot instances are instances
-// that Amazon EC2 starts on your behalf when the bid price that you specify
-// exceeds the current Spot price. Amazon EC2 periodically sets the Spot price
-// based on available Spot instance capacity and current Spot instance requests.
-// For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// Canceling a Spot instance request does not terminate running Spot instances
-// associated with the request.
-func (c *EC2) CancelSpotInstanceRequests(input *CancelSpotInstanceRequestsInput) (*CancelSpotInstanceRequestsOutput, error) {
- req, out := c.CancelSpotInstanceRequestsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opConfirmProductInstance = "ConfirmProductInstance"
-
-// ConfirmProductInstanceRequest generates a request for the ConfirmProductInstance operation.
-func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput) (req *request.Request, output *ConfirmProductInstanceOutput) {
- op := &request.Operation{
- Name: opConfirmProductInstance,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ConfirmProductInstanceInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ConfirmProductInstanceOutput{}
- req.Data = output
- return
-}
-
-// Determines whether a product code is associated with an instance. This action
-// can only be used by the owner of the product code. It is useful when a product
-// code owner needs to verify whether another user's instance is eligible for
-// support.
-func (c *EC2) ConfirmProductInstance(input *ConfirmProductInstanceInput) (*ConfirmProductInstanceOutput, error) {
- req, out := c.ConfirmProductInstanceRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCopyImage = "CopyImage"
-
-// CopyImageRequest generates a request for the CopyImage operation.
-func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, output *CopyImageOutput) {
- op := &request.Operation{
- Name: opCopyImage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CopyImageInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CopyImageOutput{}
- req.Data = output
- return
-}
-
-// Initiates the copy of an AMI from the specified source region to the current
-// region. You specify the destination region by using its endpoint when making
-// the request. AMIs that use encrypted EBS snapshots cannot be copied with
-// this method.
-//
-// For more information, see Copying AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CopyImage(input *CopyImageInput) (*CopyImageOutput, error) {
- req, out := c.CopyImageRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCopySnapshot = "CopySnapshot"
-
-// CopySnapshotRequest generates a request for the CopySnapshot operation.
-func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Request, output *CopySnapshotOutput) {
- op := &request.Operation{
- Name: opCopySnapshot,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CopySnapshotInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CopySnapshotOutput{}
- req.Data = output
- return
-}
-
-// Copies a point-in-time snapshot of an EBS volume and stores it in Amazon
-// S3. You can copy the snapshot within the same region or from one region to
-// another. You can use the snapshot to create EBS volumes or Amazon Machine
-// Images (AMIs). The snapshot is copied to the regional endpoint that you send
-// the HTTP request to.
-//
-// Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted
-// snapshots remain unencrypted, unless the Encrypted flag is specified during
-// the snapshot copy operation. By default, encrypted snapshot copies use the
-// default AWS Key Management Service (AWS KMS) customer master key (CMK); however,
-// you can specify a non-default CMK with the KmsKeyId parameter.
-//
-// For more information, see Copying an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) {
- req, out := c.CopySnapshotRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateCustomerGateway = "CreateCustomerGateway"
-
-// CreateCustomerGatewayRequest generates a request for the CreateCustomerGateway operation.
-func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (req *request.Request, output *CreateCustomerGatewayOutput) {
- op := &request.Operation{
- Name: opCreateCustomerGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateCustomerGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateCustomerGatewayOutput{}
- req.Data = output
- return
-}
-
-// Provides information to AWS about your VPN customer gateway device. The customer
-// gateway is the appliance at your end of the VPN connection. (The device on
-// the AWS side of the VPN connection is the virtual private gateway.) You must
-// provide the Internet-routable IP address of the customer gateway's external
-// interface. The IP address must be static and may be behind a device performing
-// network address translation (NAT).
-//
-// For devices that use Border Gateway Protocol (BGP), you can also provide
-// the device's BGP Autonomous System Number (ASN). You can use an existing
-// ASN assigned to your network. If you don't have an ASN already, you can use
-// a private ASN (in the 64512 - 65534 range).
-//
-// Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with
-// the exception of 7224, which is reserved in the us-east-1 region, and 9059,
-// which is reserved in the eu-west-1 region.
-//
-// For more information about VPN customer gateways, see Adding a Hardware
-// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
-//
-// You cannot create more than one customer gateway with the same VPN type,
-// IP address, and BGP ASN parameter values. If you run an identical request
-// more than one time, the first request creates the customer gateway, and subsequent
-// requests return information about the existing customer gateway. The subsequent
-// requests do not create new customer gateway resources.
-func (c *EC2) CreateCustomerGateway(input *CreateCustomerGatewayInput) (*CreateCustomerGatewayOutput, error) {
- req, out := c.CreateCustomerGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateDhcpOptions = "CreateDhcpOptions"
-
-// CreateDhcpOptionsRequest generates a request for the CreateDhcpOptions operation.
-func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *request.Request, output *CreateDhcpOptionsOutput) {
- op := &request.Operation{
- Name: opCreateDhcpOptions,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateDhcpOptionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateDhcpOptionsOutput{}
- req.Data = output
- return
-}
-
-// Creates a set of DHCP options for your VPC. After creating the set, you must
-// associate it with the VPC, causing all existing and new instances that you
-// launch in the VPC to use this set of DHCP options. The following are the
-// individual DHCP options you can specify. For more information about the options,
-// see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt).
-//
-// domain-name-servers - The IP addresses of up to four domain name servers,
-// or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS.
-// If specifying more than one domain name server, specify the IP addresses
-// in a single parameter, separated by commas. domain-name - If you're using
-// AmazonProvidedDNS in us-east-1, specify ec2.internal. If you're using AmazonProvidedDNS
-// in another region, specify region.compute.internal (for example, ap-northeast-1.compute.internal).
-// Otherwise, specify a domain name (for example, MyCompany.com). Important:
-// Some Linux operating systems accept multiple domain names separated by spaces.
-// However, Windows and other Linux operating systems treat the value as a single
-// domain, which results in unexpected behavior. If your DHCP options set is
-// associated with a VPC that has instances with multiple operating systems,
-// specify only one domain name. ntp-servers - The IP addresses of up to four
-// Network Time Protocol (NTP) servers. netbios-name-servers - The IP addresses
-// of up to four NetBIOS name servers. netbios-node-type - The NetBIOS node
-// type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast
-// are not currently supported). For more information about these node types,
-// see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt). Your VPC automatically
-// starts out with a set of DHCP options that includes only a DNS server that
-// we provide (AmazonProvidedDNS). If you create a set of options, and if your
-// VPC has an Internet gateway, make sure to set the domain-name-servers option
-// either to AmazonProvidedDNS or to a domain name server of your choice. For
-// more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateDhcpOptions(input *CreateDhcpOptionsInput) (*CreateDhcpOptionsOutput, error) {
- req, out := c.CreateDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateFlowLogs = "CreateFlowLogs"
-
-// CreateFlowLogsRequest generates a request for the CreateFlowLogs operation.
-func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Request, output *CreateFlowLogsOutput) {
- op := &request.Operation{
- Name: opCreateFlowLogs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateFlowLogsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateFlowLogsOutput{}
- req.Data = output
- return
-}
-
-// Creates one or more flow logs to capture IP traffic for a specific network
-// interface, subnet, or VPC. Flow logs are delivered to a specified log group
-// in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request,
-// a log stream is created in CloudWatch Logs for each network interface in
-// the subnet or VPC. Log streams can include information about accepted and
-// rejected traffic to a network interface. You can view the data in your log
-// streams using Amazon CloudWatch Logs.
-//
-// In your request, you must also specify an IAM role that has permission to
-// publish logs to CloudWatch Logs.
-func (c *EC2) CreateFlowLogs(input *CreateFlowLogsInput) (*CreateFlowLogsOutput, error) {
- req, out := c.CreateFlowLogsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateImage = "CreateImage"
-
-// CreateImageRequest generates a request for the CreateImage operation.
-func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *request.Request, output *CreateImageOutput) {
- op := &request.Operation{
- Name: opCreateImage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateImageInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateImageOutput{}
- req.Data = output
- return
-}
-
-// Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that
-// is either running or stopped.
-//
-// If you customized your instance with instance store volumes or EBS volumes
-// in addition to the root device volume, the new AMI contains block device
-// mapping information for those volumes. When you launch an instance from this
-// new AMI, the instance automatically launches with those additional volumes.
-//
-// For more information, see Creating Amazon EBS-Backed Linux AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateImage(input *CreateImageInput) (*CreateImageOutput, error) {
- req, out := c.CreateImageRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateInstanceExportTask = "CreateInstanceExportTask"
-
-// CreateInstanceExportTaskRequest generates a request for the CreateInstanceExportTask operation.
-func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInput) (req *request.Request, output *CreateInstanceExportTaskOutput) {
- op := &request.Operation{
- Name: opCreateInstanceExportTask,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateInstanceExportTaskInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateInstanceExportTaskOutput{}
- req.Data = output
- return
-}
-
-// Exports a running or stopped instance to an S3 bucket.
-//
-// For information about the supported operating systems, image formats, and
-// known limitations for the types of instances you can export, see Exporting
-// EC2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ExportingEC2Instances.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateInstanceExportTask(input *CreateInstanceExportTaskInput) (*CreateInstanceExportTaskOutput, error) {
- req, out := c.CreateInstanceExportTaskRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateInternetGateway = "CreateInternetGateway"
-
-// CreateInternetGatewayRequest generates a request for the CreateInternetGateway operation.
-func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (req *request.Request, output *CreateInternetGatewayOutput) {
- op := &request.Operation{
- Name: opCreateInternetGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateInternetGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateInternetGatewayOutput{}
- req.Data = output
- return
-}
-
-// Creates an Internet gateway for use with a VPC. After creating the Internet
-// gateway, you attach it to a VPC using AttachInternetGateway.
-//
-// For more information about your VPC and Internet gateway, see the Amazon
-// Virtual Private Cloud User Guide (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/).
-func (c *EC2) CreateInternetGateway(input *CreateInternetGatewayInput) (*CreateInternetGatewayOutput, error) {
- req, out := c.CreateInternetGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateKeyPair = "CreateKeyPair"
-
-// CreateKeyPairRequest generates a request for the CreateKeyPair operation.
-func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Request, output *CreateKeyPairOutput) {
- op := &request.Operation{
- Name: opCreateKeyPair,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateKeyPairInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateKeyPairOutput{}
- req.Data = output
- return
-}
-
-// Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores
-// the public key and displays the private key for you to save to a file. The
-// private key is returned as an unencrypted PEM encoded PKCS#8 private key.
-// If a key with the specified name already exists, Amazon EC2 returns an error.
-//
-// You can have up to five thousand key pairs per region.
-//
-// The key pair returned to you is available only in the region in which you
-// create it. To create a key pair that is available in all regions, use ImportKeyPair.
-//
-// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateKeyPair(input *CreateKeyPairInput) (*CreateKeyPairOutput, error) {
- req, out := c.CreateKeyPairRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateNetworkAcl = "CreateNetworkAcl"
-
-// CreateNetworkAclRequest generates a request for the CreateNetworkAcl operation.
-func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *request.Request, output *CreateNetworkAclOutput) {
- op := &request.Operation{
- Name: opCreateNetworkAcl,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateNetworkAclInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateNetworkAclOutput{}
- req.Data = output
- return
-}
-
-// Creates a network ACL in a VPC. Network ACLs provide an optional layer of
-// security (in addition to security groups) for the instances in your VPC.
-//
-// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateNetworkAcl(input *CreateNetworkAclInput) (*CreateNetworkAclOutput, error) {
- req, out := c.CreateNetworkAclRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateNetworkAclEntry = "CreateNetworkAclEntry"
-
-// CreateNetworkAclEntryRequest generates a request for the CreateNetworkAclEntry operation.
-func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (req *request.Request, output *CreateNetworkAclEntryOutput) {
- op := &request.Operation{
- Name: opCreateNetworkAclEntry,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateNetworkAclEntryInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateNetworkAclEntryOutput{}
- req.Data = output
- return
-}
-
-// Creates an entry (a rule) in a network ACL with the specified rule number.
-// Each network ACL has a set of numbered ingress rules and a separate set of
-// numbered egress rules. When determining whether a packet should be allowed
-// in or out of a subnet associated with the ACL, we process the entries in
-// the ACL according to the rule numbers, in ascending order. Each network ACL
-// has a set of ingress rules and a separate set of egress rules.
-//
-// We recommend that you leave room between the rule numbers (for example,
-// 100, 110, 120, ...), and not number them one right after the other (for example,
-// 101, 102, 103, ...). This makes it easier to add a rule between existing
-// ones without having to renumber the rules.
-//
-// After you add an entry, you can't modify it; you must either replace it,
-// or create an entry and delete the old one.
-//
-// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateNetworkAclEntry(input *CreateNetworkAclEntryInput) (*CreateNetworkAclEntryOutput, error) {
- req, out := c.CreateNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateNetworkInterface = "CreateNetworkInterface"
-
-// CreateNetworkInterfaceRequest generates a request for the CreateNetworkInterface operation.
-func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput) (req *request.Request, output *CreateNetworkInterfaceOutput) {
- op := &request.Operation{
- Name: opCreateNetworkInterface,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateNetworkInterfaceInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateNetworkInterfaceOutput{}
- req.Data = output
- return
-}
-
-// Creates a network interface in the specified subnet.
-//
-// For more information about network interfaces, see Elastic Network Interfaces
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) in the
-// Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*CreateNetworkInterfaceOutput, error) {
- req, out := c.CreateNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreatePlacementGroup = "CreatePlacementGroup"
-
-// CreatePlacementGroupRequest generates a request for the CreatePlacementGroup operation.
-func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req *request.Request, output *CreatePlacementGroupOutput) {
- op := &request.Operation{
- Name: opCreatePlacementGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreatePlacementGroupInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreatePlacementGroupOutput{}
- req.Data = output
- return
-}
-
-// Creates a placement group that you launch cluster instances into. You must
-// give the group a name that's unique within the scope of your account.
-//
-// For more information about placement groups and cluster instances, see Cluster
-// Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreatePlacementGroup(input *CreatePlacementGroupInput) (*CreatePlacementGroupOutput, error) {
- req, out := c.CreatePlacementGroupRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateReservedInstancesListing = "CreateReservedInstancesListing"
-
-// CreateReservedInstancesListingRequest generates a request for the CreateReservedInstancesListing operation.
-func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstancesListingInput) (req *request.Request, output *CreateReservedInstancesListingOutput) {
- op := &request.Operation{
- Name: opCreateReservedInstancesListing,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateReservedInstancesListingInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateReservedInstancesListingOutput{}
- req.Data = output
- return
-}
-
-// Creates a listing for Amazon EC2 Reserved Instances to be sold in the Reserved
-// Instance Marketplace. You can submit one Reserved Instance listing at a time.
-// To get a list of your Reserved Instances, you can use the DescribeReservedInstances
-// operation.
-//
-// The Reserved Instance Marketplace matches sellers who want to resell Reserved
-// Instance capacity that they no longer need with buyers who want to purchase
-// additional capacity. Reserved Instances bought and sold through the Reserved
-// Instance Marketplace work like any other Reserved Instances.
-//
-// To sell your Reserved Instances, you must first register as a seller in
-// the Reserved Instance Marketplace. After completing the registration process,
-// you can create a Reserved Instance Marketplace listing of some or all of
-// your Reserved Instances, and specify the upfront price to receive for them.
-// Your Reserved Instance listings then become available for purchase. To view
-// the details of your Reserved Instance listing, you can use the DescribeReservedInstancesListings
-// operation.
-//
-// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateReservedInstancesListing(input *CreateReservedInstancesListingInput) (*CreateReservedInstancesListingOutput, error) {
- req, out := c.CreateReservedInstancesListingRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateRoute = "CreateRoute"
-
-// CreateRouteRequest generates a request for the CreateRoute operation.
-func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) {
- op := &request.Operation{
- Name: opCreateRoute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateRouteInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateRouteOutput{}
- req.Data = output
- return
-}
-
-// Creates a route in a route table within a VPC.
-//
-// You must specify one of the following targets: Internet gateway or virtual
-// private gateway, NAT instance, VPC peering connection, or network interface.
-//
-// When determining how to route traffic, we use the route with the most specific
-// match. For example, let's say the traffic is destined for 192.0.2.3, and
-// the route table includes the following two routes:
-//
-// 192.0.2.0/24 (goes to some target A)
-//
-// 192.0.2.0/28 (goes to some target B)
-//
-// Both routes apply to the traffic destined for 192.0.2.3. However, the
-// second route in the list covers a smaller number of IP addresses and is therefore
-// more specific, so we use that route to determine where to target the traffic.
-//
-// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) {
- req, out := c.CreateRouteRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateRouteTable = "CreateRouteTable"
-
-// CreateRouteTableRequest generates a request for the CreateRouteTable operation.
-func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *request.Request, output *CreateRouteTableOutput) {
- op := &request.Operation{
- Name: opCreateRouteTable,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateRouteTableInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateRouteTableOutput{}
- req.Data = output
- return
-}
-
-// Creates a route table for the specified VPC. After you create a route table,
-// you can add routes and associate the table with a subnet.
-//
-// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateRouteTable(input *CreateRouteTableInput) (*CreateRouteTableOutput, error) {
- req, out := c.CreateRouteTableRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateSecurityGroup = "CreateSecurityGroup"
-
-// CreateSecurityGroupRequest generates a request for the CreateSecurityGroup operation.
-func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *request.Request, output *CreateSecurityGroupOutput) {
- op := &request.Operation{
- Name: opCreateSecurityGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateSecurityGroupInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateSecurityGroupOutput{}
- req.Data = output
- return
-}
-
-// Creates a security group.
-//
-// A security group is for use with instances either in the EC2-Classic platform
-// or in a specific VPC. For more information, see Amazon EC2 Security Groups
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
-// in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your
-// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
-// in the Amazon Virtual Private Cloud User Guide.
-//
-// EC2-Classic: You can have up to 500 security groups.
-//
-// EC2-VPC: You can create up to 100 security groups per VPC.
-//
-// When you create a security group, you specify a friendly name of your choice.
-// You can have a security group for use in EC2-Classic with the same name as
-// a security group for use in a VPC. However, you can't have two security groups
-// for use in EC2-Classic with the same name or two security groups for use
-// in a VPC with the same name.
-//
-// You have a default security group for use in EC2-Classic and a default security
-// group for use in your VPC. If you don't specify a security group when you
-// launch an instance, the instance is launched into the appropriate default
-// security group. A default security group includes a default rule that grants
-// instances unrestricted network access to each other.
-//
-// You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress,
-// AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress.
-func (c *EC2) CreateSecurityGroup(input *CreateSecurityGroupInput) (*CreateSecurityGroupOutput, error) {
- req, out := c.CreateSecurityGroupRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateSnapshot = "CreateSnapshot"
-
-// CreateSnapshotRequest generates a request for the CreateSnapshot operation.
-func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *Snapshot) {
- op := &request.Operation{
- Name: opCreateSnapshot,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateSnapshotInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &Snapshot{}
- req.Data = output
- return
-}
-
-// Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use
-// snapshots for backups, to make copies of EBS volumes, and to save data before
-// shutting down an instance.
-//
-// When a snapshot is created, any AWS Marketplace product codes that are associated
-// with the source volume are propagated to the snapshot.
-//
-// You can take a snapshot of an attached volume that is in use. However, snapshots
-// only capture data that has been written to your EBS volume at the time the
-// snapshot command is issued; this may exclude any data that has been cached
-// by any applications or the operating system. If you can pause any file systems
-// on the volume long enough to take a snapshot, your snapshot should be complete.
-// However, if you cannot pause all file writes to the volume, you should unmount
-// the volume from within the instance, issue the snapshot command, and then
-// remount the volume to ensure a consistent and complete snapshot. You may
-// remount and use your volume while the snapshot status is pending.
-//
-// To create a snapshot for EBS volumes that serve as root devices, you should
-// stop the instance before taking the snapshot.
-//
-// Snapshots that are taken from encrypted volumes are automatically encrypted.
-// Volumes that are created from encrypted snapshots are also automatically
-// encrypted. Your encrypted volumes and any associated snapshots always remain
-// protected.
-//
-// For more information, see Amazon Elastic Block Store (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html)
-// and Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateSnapshot(input *CreateSnapshotInput) (*Snapshot, error) {
- req, out := c.CreateSnapshotRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription"
-
-// CreateSpotDatafeedSubscriptionRequest generates a request for the CreateSpotDatafeedSubscription operation.
-func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSubscriptionInput) (req *request.Request, output *CreateSpotDatafeedSubscriptionOutput) {
- op := &request.Operation{
- Name: opCreateSpotDatafeedSubscription,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateSpotDatafeedSubscriptionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateSpotDatafeedSubscriptionOutput{}
- req.Data = output
- return
-}
-
-// Creates a data feed for Spot instances, enabling you to view Spot instance
-// usage logs. You can create one data feed per AWS account. For more information,
-// see Spot Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateSpotDatafeedSubscription(input *CreateSpotDatafeedSubscriptionInput) (*CreateSpotDatafeedSubscriptionOutput, error) {
- req, out := c.CreateSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateSubnet = "CreateSubnet"
-
-// CreateSubnetRequest generates a request for the CreateSubnet operation.
-func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Request, output *CreateSubnetOutput) {
- op := &request.Operation{
- Name: opCreateSubnet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateSubnetInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateSubnetOutput{}
- req.Data = output
- return
-}
-
-// Creates a subnet in an existing VPC.
-//
-// When you create each subnet, you provide the VPC ID and the CIDR block you
-// want for the subnet. After you create a subnet, you can't change its CIDR
-// block. The subnet's CIDR block can be the same as the VPC's CIDR block (assuming
-// you want only a single subnet in the VPC), or a subset of the VPC's CIDR
-// block. If you create more than one subnet in a VPC, the subnets' CIDR blocks
-// must not overlap. The smallest subnet (and VPC) you can create uses a /28
-// netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP
-// addresses).
-//
-// AWS reserves both the first four and the last IP address in each subnet's
-// CIDR block. They're not available for use.
-//
-// If you add more than one subnet to a VPC, they're set up in a star topology
-// with a logical router in the middle.
-//
-// If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP
-// address doesn't change if you stop and restart the instance (unlike a similar
-// instance launched outside a VPC, which gets a new IP address when restarted).
-// It's therefore possible to have a subnet with no running instances (they're
-// all stopped), but no remaining IP addresses available.
-//
-// For more information about subnets, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateSubnet(input *CreateSubnetInput) (*CreateSubnetOutput, error) {
- req, out := c.CreateSubnetRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateTags = "CreateTags"
-
-// CreateTagsRequest generates a request for the CreateTags operation.
-func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
- op := &request.Operation{
- Name: opCreateTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateTagsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateTagsOutput{}
- req.Data = output
- return
-}
-
-// Adds or overwrites one or more tags for the specified Amazon EC2 resource
-// or resources. Each resource can have a maximum of 10 tags. Each tag consists
-// of a key and optional value. Tag keys must be unique per resource.
-//
-// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
-// in the Amazon Elastic Compute Cloud User Guide. For more information about
-// creating IAM policies that control users' access to resources based on tags,
-// see Supported Resource-Level Permissions for Amazon EC2 API Actions (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
- req, out := c.CreateTagsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateVolume = "CreateVolume"
-
-// CreateVolumeRequest generates a request for the CreateVolume operation.
-func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Request, output *Volume) {
- op := &request.Operation{
- Name: opCreateVolume,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateVolumeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &Volume{}
- req.Data = output
- return
-}
-
-// Creates an EBS volume that can be attached to an instance in the same Availability
-// Zone. The volume is created in the regional endpoint that you send the HTTP
-// request to. For more information see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html).
-//
-// You can create a new empty volume or restore a volume from an EBS snapshot.
-// Any AWS Marketplace product codes from the snapshot are propagated to the
-// volume.
-//
-// You can create encrypted volumes with the Encrypted parameter. Encrypted
-// volumes may only be attached to instances that support Amazon EBS encryption.
-// Volumes that are created from encrypted snapshots are also automatically
-// encrypted. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// For more information, see Creating or Restoring an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) CreateVolume(input *CreateVolumeInput) (*Volume, error) {
- req, out := c.CreateVolumeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateVpc = "CreateVpc"
-
-// CreateVpcRequest generates a request for the CreateVpc operation.
-func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, output *CreateVpcOutput) {
- op := &request.Operation{
- Name: opCreateVpc,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateVpcInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateVpcOutput{}
- req.Data = output
- return
-}
-
-// Creates a VPC with the specified CIDR block.
-//
-// The smallest VPC you can create uses a /28 netmask (16 IP addresses), and
-// the largest uses a /16 netmask (65,536 IP addresses). To help you decide
-// how big to make your VPC, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html)
-// in the Amazon Virtual Private Cloud User Guide.
-//
-// By default, each instance you launch in the VPC has the default DHCP options,
-// which includes only a default DNS server that we provide (AmazonProvidedDNS).
-// For more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateVpc(input *CreateVpcInput) (*CreateVpcOutput, error) {
- req, out := c.CreateVpcRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateVpcEndpoint = "CreateVpcEndpoint"
-
-// CreateVpcEndpointRequest generates a request for the CreateVpcEndpoint operation.
-func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *request.Request, output *CreateVpcEndpointOutput) {
- op := &request.Operation{
- Name: opCreateVpcEndpoint,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateVpcEndpointInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateVpcEndpointOutput{}
- req.Data = output
- return
-}
-
-// Creates a VPC endpoint for a specified AWS service. An endpoint enables you
-// to create a private connection between your VPC and another AWS service in
-// your account. You can specify an endpoint policy to attach to the endpoint
-// that will control access to the service from your VPC. You can also specify
-// the VPC route tables that use the endpoint.
-//
-// Currently, only endpoints to Amazon S3 are supported.
-func (c *EC2) CreateVpcEndpoint(input *CreateVpcEndpointInput) (*CreateVpcEndpointOutput, error) {
- req, out := c.CreateVpcEndpointRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection"
-
-// CreateVpcPeeringConnectionRequest generates a request for the CreateVpcPeeringConnection operation.
-func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectionInput) (req *request.Request, output *CreateVpcPeeringConnectionOutput) {
- op := &request.Operation{
- Name: opCreateVpcPeeringConnection,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateVpcPeeringConnectionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateVpcPeeringConnectionOutput{}
- req.Data = output
- return
-}
-
-// Requests a VPC peering connection between two VPCs: a requester VPC that
-// you own and a peer VPC with which to create the connection. The peer VPC
-// can belong to another AWS account. The requester VPC and peer VPC cannot
-// have overlapping CIDR blocks.
-//
-// The owner of the peer VPC must accept the peering request to activate the
-// peering connection. The VPC peering connection request expires after 7 days,
-// after which it cannot be accepted or rejected.
-//
-// A CreateVpcPeeringConnection request between VPCs with overlapping CIDR
-// blocks results in the VPC peering connection having a status of failed.
-func (c *EC2) CreateVpcPeeringConnection(input *CreateVpcPeeringConnectionInput) (*CreateVpcPeeringConnectionOutput, error) {
- req, out := c.CreateVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateVpnConnection = "CreateVpnConnection"
-
-// CreateVpnConnectionRequest generates a request for the CreateVpnConnection operation.
-func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req *request.Request, output *CreateVpnConnectionOutput) {
- op := &request.Operation{
- Name: opCreateVpnConnection,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateVpnConnectionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateVpnConnectionOutput{}
- req.Data = output
- return
-}
-
-// Creates a VPN connection between an existing virtual private gateway and
-// a VPN customer gateway. The only supported connection type is ipsec.1.
-//
-// The response includes information that you need to give to your network
-// administrator to configure your customer gateway.
-//
-// We strongly recommend that you use HTTPS when calling this operation because
-// the response contains sensitive cryptographic information for configuring
-// your customer gateway.
-//
-// If you decide to shut down your VPN connection for any reason and later
-// create a new VPN connection, you must reconfigure your customer gateway with
-// the new information returned from this call.
-//
-// For more information about VPN connections, see Adding a Hardware Virtual
-// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateVpnConnection(input *CreateVpnConnectionInput) (*CreateVpnConnectionOutput, error) {
- req, out := c.CreateVpnConnectionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute"
-
-// CreateVpnConnectionRouteRequest generates a request for the CreateVpnConnectionRoute operation.
-func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInput) (req *request.Request, output *CreateVpnConnectionRouteOutput) {
- op := &request.Operation{
- Name: opCreateVpnConnectionRoute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateVpnConnectionRouteInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateVpnConnectionRouteOutput{}
- req.Data = output
- return
-}
-
-// Creates a static route associated with a VPN connection between an existing
-// virtual private gateway and a VPN customer gateway. The static route allows
-// traffic to be routed from the virtual private gateway to the VPN customer
-// gateway.
-//
-// For more information about VPN connections, see Adding a Hardware Virtual
-// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateVpnConnectionRoute(input *CreateVpnConnectionRouteInput) (*CreateVpnConnectionRouteOutput, error) {
- req, out := c.CreateVpnConnectionRouteRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opCreateVpnGateway = "CreateVpnGateway"
-
-// CreateVpnGatewayRequest generates a request for the CreateVpnGateway operation.
-func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *request.Request, output *CreateVpnGatewayOutput) {
- op := &request.Operation{
- Name: opCreateVpnGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateVpnGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &CreateVpnGatewayOutput{}
- req.Data = output
- return
-}
-
-// Creates a virtual private gateway. A virtual private gateway is the endpoint
-// on the VPC side of your VPN connection. You can create a virtual private
-// gateway before creating the VPC itself.
-//
-// For more information about virtual private gateways, see Adding a Hardware
-// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) CreateVpnGateway(input *CreateVpnGatewayInput) (*CreateVpnGatewayOutput, error) {
- req, out := c.CreateVpnGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteCustomerGateway = "DeleteCustomerGateway"
-
-// DeleteCustomerGatewayRequest generates a request for the DeleteCustomerGateway operation.
-func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (req *request.Request, output *DeleteCustomerGatewayOutput) {
- op := &request.Operation{
- Name: opDeleteCustomerGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteCustomerGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteCustomerGatewayOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified customer gateway. You must delete the VPN connection
-// before you can delete the customer gateway.
-func (c *EC2) DeleteCustomerGateway(input *DeleteCustomerGatewayInput) (*DeleteCustomerGatewayOutput, error) {
- req, out := c.DeleteCustomerGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteDhcpOptions = "DeleteDhcpOptions"
-
-// DeleteDhcpOptionsRequest generates a request for the DeleteDhcpOptions operation.
-func (c *EC2) DeleteDhcpOptionsRequest(input *DeleteDhcpOptionsInput) (req *request.Request, output *DeleteDhcpOptionsOutput) {
- op := &request.Operation{
- Name: opDeleteDhcpOptions,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteDhcpOptionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteDhcpOptionsOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified set of DHCP options. You must disassociate the set
-// of DHCP options before you can delete it. You can disassociate the set of
-// DHCP options by associating either a new set of options or the default set
-// of options with the VPC.
-func (c *EC2) DeleteDhcpOptions(input *DeleteDhcpOptionsInput) (*DeleteDhcpOptionsOutput, error) {
- req, out := c.DeleteDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteFlowLogs = "DeleteFlowLogs"
-
-// DeleteFlowLogsRequest generates a request for the DeleteFlowLogs operation.
-func (c *EC2) DeleteFlowLogsRequest(input *DeleteFlowLogsInput) (req *request.Request, output *DeleteFlowLogsOutput) {
- op := &request.Operation{
- Name: opDeleteFlowLogs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteFlowLogsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteFlowLogsOutput{}
- req.Data = output
- return
-}
-
-// Deletes one or more flow logs.
-func (c *EC2) DeleteFlowLogs(input *DeleteFlowLogsInput) (*DeleteFlowLogsOutput, error) {
- req, out := c.DeleteFlowLogsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteInternetGateway = "DeleteInternetGateway"
-
-// DeleteInternetGatewayRequest generates a request for the DeleteInternetGateway operation.
-func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (req *request.Request, output *DeleteInternetGatewayOutput) {
- op := &request.Operation{
- Name: opDeleteInternetGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteInternetGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteInternetGatewayOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified Internet gateway. You must detach the Internet gateway
-// from the VPC before you can delete it.
-func (c *EC2) DeleteInternetGateway(input *DeleteInternetGatewayInput) (*DeleteInternetGatewayOutput, error) {
- req, out := c.DeleteInternetGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteKeyPair = "DeleteKeyPair"
-
-// DeleteKeyPairRequest generates a request for the DeleteKeyPair operation.
-func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Request, output *DeleteKeyPairOutput) {
- op := &request.Operation{
- Name: opDeleteKeyPair,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteKeyPairInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteKeyPairOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified key pair, by removing the public key from Amazon EC2.
-func (c *EC2) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) {
- req, out := c.DeleteKeyPairRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteNetworkAcl = "DeleteNetworkAcl"
-
-// DeleteNetworkAclRequest generates a request for the DeleteNetworkAcl operation.
-func (c *EC2) DeleteNetworkAclRequest(input *DeleteNetworkAclInput) (req *request.Request, output *DeleteNetworkAclOutput) {
- op := &request.Operation{
- Name: opDeleteNetworkAcl,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteNetworkAclInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteNetworkAclOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified network ACL. You can't delete the ACL if it's associated
-// with any subnets. You can't delete the default network ACL.
-func (c *EC2) DeleteNetworkAcl(input *DeleteNetworkAclInput) (*DeleteNetworkAclOutput, error) {
- req, out := c.DeleteNetworkAclRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry"
-
-// DeleteNetworkAclEntryRequest generates a request for the DeleteNetworkAclEntry operation.
-func (c *EC2) DeleteNetworkAclEntryRequest(input *DeleteNetworkAclEntryInput) (req *request.Request, output *DeleteNetworkAclEntryOutput) {
- op := &request.Operation{
- Name: opDeleteNetworkAclEntry,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteNetworkAclEntryInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteNetworkAclEntryOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified ingress or egress entry (rule) from the specified network
-// ACL.
-func (c *EC2) DeleteNetworkAclEntry(input *DeleteNetworkAclEntryInput) (*DeleteNetworkAclEntryOutput, error) {
- req, out := c.DeleteNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteNetworkInterface = "DeleteNetworkInterface"
-
-// DeleteNetworkInterfaceRequest generates a request for the DeleteNetworkInterface operation.
-func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput) (req *request.Request, output *DeleteNetworkInterfaceOutput) {
- op := &request.Operation{
- Name: opDeleteNetworkInterface,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteNetworkInterfaceInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteNetworkInterfaceOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified network interface. You must detach the network interface
-// before you can delete it.
-func (c *EC2) DeleteNetworkInterface(input *DeleteNetworkInterfaceInput) (*DeleteNetworkInterfaceOutput, error) {
- req, out := c.DeleteNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeletePlacementGroup = "DeletePlacementGroup"
-
-// DeletePlacementGroupRequest generates a request for the DeletePlacementGroup operation.
-func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req *request.Request, output *DeletePlacementGroupOutput) {
- op := &request.Operation{
- Name: opDeletePlacementGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeletePlacementGroupInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeletePlacementGroupOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified placement group. You must terminate all instances in
-// the placement group before you can delete the placement group. For more information
-// about placement groups and cluster instances, see Cluster Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DeletePlacementGroup(input *DeletePlacementGroupInput) (*DeletePlacementGroupOutput, error) {
- req, out := c.DeletePlacementGroupRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteRoute = "DeleteRoute"
-
-// DeleteRouteRequest generates a request for the DeleteRoute operation.
-func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) {
- op := &request.Operation{
- Name: opDeleteRoute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteRouteInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteRouteOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified route from the specified route table.
-func (c *EC2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) {
- req, out := c.DeleteRouteRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteRouteTable = "DeleteRouteTable"
-
-// DeleteRouteTableRequest generates a request for the DeleteRouteTable operation.
-func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *request.Request, output *DeleteRouteTableOutput) {
- op := &request.Operation{
- Name: opDeleteRouteTable,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteRouteTableInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteRouteTableOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified route table. You must disassociate the route table
-// from any subnets before you can delete it. You can't delete the main route
-// table.
-func (c *EC2) DeleteRouteTable(input *DeleteRouteTableInput) (*DeleteRouteTableOutput, error) {
- req, out := c.DeleteRouteTableRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteSecurityGroup = "DeleteSecurityGroup"
-
-// DeleteSecurityGroupRequest generates a request for the DeleteSecurityGroup operation.
-func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *request.Request, output *DeleteSecurityGroupOutput) {
- op := &request.Operation{
- Name: opDeleteSecurityGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteSecurityGroupInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteSecurityGroupOutput{}
- req.Data = output
- return
-}
-
-// Deletes a security group.
-//
-// If you attempt to delete a security group that is associated with an instance,
-// or is referenced by another security group, the operation fails with InvalidGroup.InUse
-// in EC2-Classic or DependencyViolation in EC2-VPC.
-func (c *EC2) DeleteSecurityGroup(input *DeleteSecurityGroupInput) (*DeleteSecurityGroupOutput, error) {
- req, out := c.DeleteSecurityGroupRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteSnapshot = "DeleteSnapshot"
-
-// DeleteSnapshotRequest generates a request for the DeleteSnapshot operation.
-func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Request, output *DeleteSnapshotOutput) {
- op := &request.Operation{
- Name: opDeleteSnapshot,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteSnapshotInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteSnapshotOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified snapshot.
-//
-// When you make periodic snapshots of a volume, the snapshots are incremental,
-// and only the blocks on the device that have changed since your last snapshot
-// are saved in the new snapshot. When you delete a snapshot, only the data
-// not needed for any other snapshot is removed. So regardless of which prior
-// snapshots have been deleted, all active snapshots will have access to all
-// the information needed to restore the volume.
-//
-// You cannot delete a snapshot of the root device of an EBS volume used by
-// a registered AMI. You must first de-register the AMI before you can delete
-// the snapshot.
-//
-// For more information, see Deleting an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error) {
- req, out := c.DeleteSnapshotRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription"
-
-// DeleteSpotDatafeedSubscriptionRequest generates a request for the DeleteSpotDatafeedSubscription operation.
-func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSubscriptionInput) (req *request.Request, output *DeleteSpotDatafeedSubscriptionOutput) {
- op := &request.Operation{
- Name: opDeleteSpotDatafeedSubscription,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteSpotDatafeedSubscriptionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteSpotDatafeedSubscriptionOutput{}
- req.Data = output
- return
-}
-
-// Deletes the data feed for Spot instances.
-func (c *EC2) DeleteSpotDatafeedSubscription(input *DeleteSpotDatafeedSubscriptionInput) (*DeleteSpotDatafeedSubscriptionOutput, error) {
- req, out := c.DeleteSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteSubnet = "DeleteSubnet"
-
-// DeleteSubnetRequest generates a request for the DeleteSubnet operation.
-func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *request.Request, output *DeleteSubnetOutput) {
- op := &request.Operation{
- Name: opDeleteSubnet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteSubnetInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteSubnetOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified subnet. You must terminate all running instances in
-// the subnet before you can delete the subnet.
-func (c *EC2) DeleteSubnet(input *DeleteSubnetInput) (*DeleteSubnetOutput, error) {
- req, out := c.DeleteSubnetRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteTags = "DeleteTags"
-
-// DeleteTagsRequest generates a request for the DeleteTags operation.
-func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
- op := &request.Operation{
- Name: opDeleteTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteTagsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteTagsOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified set of tags from the specified set of resources. This
-// call is designed to follow a DescribeTags request.
-//
-// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
- req, out := c.DeleteTagsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteVolume = "DeleteVolume"
-
-// DeleteVolumeRequest generates a request for the DeleteVolume operation.
-func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Request, output *DeleteVolumeOutput) {
- op := &request.Operation{
- Name: opDeleteVolume,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteVolumeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteVolumeOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified EBS volume. The volume must be in the available state
-// (not attached to an instance).
-//
-// The volume may remain in the deleting state for several minutes.
-//
-// For more information, see Deleting an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) {
- req, out := c.DeleteVolumeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteVpc = "DeleteVpc"
-
-// DeleteVpcRequest generates a request for the DeleteVpc operation.
-func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, output *DeleteVpcOutput) {
- op := &request.Operation{
- Name: opDeleteVpc,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteVpcInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteVpcOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified VPC. You must detach or delete all gateways and resources
-// that are associated with the VPC before you can delete it. For example, you
-// must terminate all instances running in the VPC, delete all security groups
-// associated with the VPC (except the default one), delete all route tables
-// associated with the VPC (except the default one), and so on.
-func (c *EC2) DeleteVpc(input *DeleteVpcInput) (*DeleteVpcOutput, error) {
- req, out := c.DeleteVpcRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteVpcEndpoints = "DeleteVpcEndpoints"
-
-// DeleteVpcEndpointsRequest generates a request for the DeleteVpcEndpoints operation.
-func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *request.Request, output *DeleteVpcEndpointsOutput) {
- op := &request.Operation{
- Name: opDeleteVpcEndpoints,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteVpcEndpointsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteVpcEndpointsOutput{}
- req.Data = output
- return
-}
-
-// Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes
-// the endpoint routes in the route tables that were associated with the endpoint.
-func (c *EC2) DeleteVpcEndpoints(input *DeleteVpcEndpointsInput) (*DeleteVpcEndpointsOutput, error) {
- req, out := c.DeleteVpcEndpointsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection"
-
-// DeleteVpcPeeringConnectionRequest generates a request for the DeleteVpcPeeringConnection operation.
-func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectionInput) (req *request.Request, output *DeleteVpcPeeringConnectionOutput) {
- op := &request.Operation{
- Name: opDeleteVpcPeeringConnection,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteVpcPeeringConnectionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteVpcPeeringConnectionOutput{}
- req.Data = output
- return
-}
-
-// Deletes a VPC peering connection. Either the owner of the requester VPC or
-// the owner of the peer VPC can delete the VPC peering connection if it's in
-// the active state. The owner of the requester VPC can delete a VPC peering
-// connection in the pending-acceptance state.
-func (c *EC2) DeleteVpcPeeringConnection(input *DeleteVpcPeeringConnectionInput) (*DeleteVpcPeeringConnectionOutput, error) {
- req, out := c.DeleteVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteVpnConnection = "DeleteVpnConnection"
-
-// DeleteVpnConnectionRequest generates a request for the DeleteVpnConnection operation.
-func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req *request.Request, output *DeleteVpnConnectionOutput) {
- op := &request.Operation{
- Name: opDeleteVpnConnection,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteVpnConnectionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteVpnConnectionOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified VPN connection.
-//
-// If you're deleting the VPC and its associated components, we recommend that
-// you detach the virtual private gateway from the VPC and delete the VPC before
-// deleting the VPN connection. If you believe that the tunnel credentials for
-// your VPN connection have been compromised, you can delete the VPN connection
-// and create a new one that has new keys, without needing to delete the VPC
-// or virtual private gateway. If you create a new VPN connection, you must
-// reconfigure the customer gateway using the new configuration information
-// returned with the new VPN connection ID.
-func (c *EC2) DeleteVpnConnection(input *DeleteVpnConnectionInput) (*DeleteVpnConnectionOutput, error) {
- req, out := c.DeleteVpnConnectionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute"
-
-// DeleteVpnConnectionRouteRequest generates a request for the DeleteVpnConnectionRoute operation.
-func (c *EC2) DeleteVpnConnectionRouteRequest(input *DeleteVpnConnectionRouteInput) (req *request.Request, output *DeleteVpnConnectionRouteOutput) {
- op := &request.Operation{
- Name: opDeleteVpnConnectionRoute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteVpnConnectionRouteInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteVpnConnectionRouteOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified static route associated with a VPN connection between
-// an existing virtual private gateway and a VPN customer gateway. The static
-// route allows traffic to be routed from the virtual private gateway to the
-// VPN customer gateway.
-func (c *EC2) DeleteVpnConnectionRoute(input *DeleteVpnConnectionRouteInput) (*DeleteVpnConnectionRouteOutput, error) {
- req, out := c.DeleteVpnConnectionRouteRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeleteVpnGateway = "DeleteVpnGateway"
-
-// DeleteVpnGatewayRequest generates a request for the DeleteVpnGateway operation.
-func (c *EC2) DeleteVpnGatewayRequest(input *DeleteVpnGatewayInput) (req *request.Request, output *DeleteVpnGatewayOutput) {
- op := &request.Operation{
- Name: opDeleteVpnGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteVpnGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeleteVpnGatewayOutput{}
- req.Data = output
- return
-}
-
-// Deletes the specified virtual private gateway. We recommend that before you
-// delete a virtual private gateway, you detach it from the VPC and delete the
-// VPN connection. Note that you don't need to delete the virtual private gateway
-// if you plan to delete and recreate the VPN connection between your VPC and
-// your network.
-func (c *EC2) DeleteVpnGateway(input *DeleteVpnGatewayInput) (*DeleteVpnGatewayOutput, error) {
- req, out := c.DeleteVpnGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDeregisterImage = "DeregisterImage"
-
-// DeregisterImageRequest generates a request for the DeregisterImage operation.
-func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request.Request, output *DeregisterImageOutput) {
- op := &request.Operation{
- Name: opDeregisterImage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeregisterImageInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DeregisterImageOutput{}
- req.Data = output
- return
-}
-
-// Deregisters the specified AMI. After you deregister an AMI, it can't be used
-// to launch new instances.
-//
-// This command does not delete the AMI.
-func (c *EC2) DeregisterImage(input *DeregisterImageInput) (*DeregisterImageOutput, error) {
- req, out := c.DeregisterImageRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeAccountAttributes = "DescribeAccountAttributes"
-
-// DescribeAccountAttributesRequest generates a request for the DescribeAccountAttributes operation.
-func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) {
- op := &request.Operation{
- Name: opDescribeAccountAttributes,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeAccountAttributesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeAccountAttributesOutput{}
- req.Data = output
- return
-}
-
-// Describes attributes of your AWS account. The following are the supported
-// account attributes:
-//
-// supported-platforms: Indicates whether your account can launch instances
-// into EC2-Classic and EC2-VPC, or only into EC2-VPC.
-//
-// default-vpc: The ID of the default VPC for your account, or none.
-//
-// max-instances: The maximum number of On-Demand instances that you can
-// run.
-//
-// vpc-max-security-groups-per-interface: The maximum number of security
-// groups that you can assign to a network interface.
-//
-// max-elastic-ips: The maximum number of Elastic IP addresses that you can
-// allocate for use with EC2-Classic.
-//
-// vpc-max-elastic-ips: The maximum number of Elastic IP addresses that you
-// can allocate for use with EC2-VPC.
-func (c *EC2) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) {
- req, out := c.DescribeAccountAttributesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeAddresses = "DescribeAddresses"
-
-// DescribeAddressesRequest generates a request for the DescribeAddresses operation.
-func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *request.Request, output *DescribeAddressesOutput) {
- op := &request.Operation{
- Name: opDescribeAddresses,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeAddressesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeAddressesOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your Elastic IP addresses.
-//
-// An Elastic IP address is for use in either the EC2-Classic platform or in
-// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddressesOutput, error) {
- req, out := c.DescribeAddressesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeAvailabilityZones = "DescribeAvailabilityZones"
-
-// DescribeAvailabilityZonesRequest generates a request for the DescribeAvailabilityZones operation.
-func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesInput) (req *request.Request, output *DescribeAvailabilityZonesOutput) {
- op := &request.Operation{
- Name: opDescribeAvailabilityZones,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeAvailabilityZonesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeAvailabilityZonesOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of the Availability Zones that are available to you.
-// The results include zones only for the region you're currently using. If
-// there is an event impacting an Availability Zone, you can use this request
-// to view the state and any provided message for that Availability Zone.
-//
-// For more information, see Regions and Availability Zones (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeAvailabilityZones(input *DescribeAvailabilityZonesInput) (*DescribeAvailabilityZonesOutput, error) {
- req, out := c.DescribeAvailabilityZonesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeBundleTasks = "DescribeBundleTasks"
-
-// DescribeBundleTasksRequest generates a request for the DescribeBundleTasks operation.
-func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *request.Request, output *DescribeBundleTasksOutput) {
- op := &request.Operation{
- Name: opDescribeBundleTasks,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeBundleTasksInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeBundleTasksOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your bundling tasks.
-//
-// Completed bundle tasks are listed for only a limited time. If your bundle
-// task is no longer in the list, you can still register an AMI from it. Just
-// use RegisterImage with the Amazon S3 bucket name and image manifest name
-// you provided to the bundle task.
-func (c *EC2) DescribeBundleTasks(input *DescribeBundleTasksInput) (*DescribeBundleTasksOutput, error) {
- req, out := c.DescribeBundleTasksRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances"
-
-// DescribeClassicLinkInstancesRequest generates a request for the DescribeClassicLinkInstances operation.
-func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInstancesInput) (req *request.Request, output *DescribeClassicLinkInstancesOutput) {
- op := &request.Operation{
- Name: opDescribeClassicLinkInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeClassicLinkInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeClassicLinkInstancesOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your linked EC2-Classic instances. This request
-// only returns information about EC2-Classic instances linked to a VPC through
-// ClassicLink; you cannot use this request to return information about other
-// instances.
-func (c *EC2) DescribeClassicLinkInstances(input *DescribeClassicLinkInstancesInput) (*DescribeClassicLinkInstancesOutput, error) {
- req, out := c.DescribeClassicLinkInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeConversionTasks = "DescribeConversionTasks"
-
-// DescribeConversionTasksRequest generates a request for the DescribeConversionTasks operation.
-func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput) (req *request.Request, output *DescribeConversionTasksOutput) {
- op := &request.Operation{
- Name: opDescribeConversionTasks,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeConversionTasksInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeConversionTasksOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your conversion tasks. For more information, see
-// Using the Command Line Tools to Import Your Virtual Machine to Amazon EC2
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UploadingYourInstancesandVolumes.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeConversionTasks(input *DescribeConversionTasksInput) (*DescribeConversionTasksOutput, error) {
- req, out := c.DescribeConversionTasksRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeCustomerGateways = "DescribeCustomerGateways"
-
-// DescribeCustomerGatewaysRequest generates a request for the DescribeCustomerGateways operation.
-func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInput) (req *request.Request, output *DescribeCustomerGatewaysOutput) {
- op := &request.Operation{
- Name: opDescribeCustomerGateways,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeCustomerGatewaysInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeCustomerGatewaysOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your VPN customer gateways.
-//
-// For more information about VPN customer gateways, see Adding a Hardware
-// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DescribeCustomerGateways(input *DescribeCustomerGatewaysInput) (*DescribeCustomerGatewaysOutput, error) {
- req, out := c.DescribeCustomerGatewaysRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeDhcpOptions = "DescribeDhcpOptions"
-
-// DescribeDhcpOptionsRequest generates a request for the DescribeDhcpOptions operation.
-func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req *request.Request, output *DescribeDhcpOptionsOutput) {
- op := &request.Operation{
- Name: opDescribeDhcpOptions,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeDhcpOptionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeDhcpOptionsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your DHCP options sets.
-//
-// For more information about DHCP options sets, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DescribeDhcpOptions(input *DescribeDhcpOptionsInput) (*DescribeDhcpOptionsOutput, error) {
- req, out := c.DescribeDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeExportTasks = "DescribeExportTasks"
-
-// DescribeExportTasksRequest generates a request for the DescribeExportTasks operation.
-func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) {
- op := &request.Operation{
- Name: opDescribeExportTasks,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeExportTasksInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeExportTasksOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your export tasks.
-func (c *EC2) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) {
- req, out := c.DescribeExportTasksRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeFlowLogs = "DescribeFlowLogs"
-
-// DescribeFlowLogsRequest generates a request for the DescribeFlowLogs operation.
-func (c *EC2) DescribeFlowLogsRequest(input *DescribeFlowLogsInput) (req *request.Request, output *DescribeFlowLogsOutput) {
- op := &request.Operation{
- Name: opDescribeFlowLogs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeFlowLogsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeFlowLogsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more flow logs. To view the information in your flow logs
-// (the log streams for the network interfaces), you must use the CloudWatch
-// Logs console or the CloudWatch Logs API.
-func (c *EC2) DescribeFlowLogs(input *DescribeFlowLogsInput) (*DescribeFlowLogsOutput, error) {
- req, out := c.DescribeFlowLogsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeImageAttribute = "DescribeImageAttribute"
-
-// DescribeImageAttributeRequest generates a request for the DescribeImageAttribute operation.
-func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput) (req *request.Request, output *DescribeImageAttributeOutput) {
- op := &request.Operation{
- Name: opDescribeImageAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeImageAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeImageAttributeOutput{}
- req.Data = output
- return
-}
-
-// Describes the specified attribute of the specified AMI. You can specify only
-// one attribute at a time.
-func (c *EC2) DescribeImageAttribute(input *DescribeImageAttributeInput) (*DescribeImageAttributeOutput, error) {
- req, out := c.DescribeImageAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeImages = "DescribeImages"
-
-// DescribeImagesRequest generates a request for the DescribeImages operation.
-func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) {
- op := &request.Operation{
- Name: opDescribeImages,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeImagesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeImagesOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of the images (AMIs, AKIs, and ARIs) available to you.
-// Images available to you include public images, private images that you own,
-// and private images owned by other AWS accounts but for which you have explicit
-// launch permissions.
-//
-// Deregistered images are included in the returned results for an unspecified
-// interval after deregistration.
-func (c *EC2) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
- req, out := c.DescribeImagesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeImportImageTasks = "DescribeImportImageTasks"
-
-// DescribeImportImageTasksRequest generates a request for the DescribeImportImageTasks operation.
-func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInput) (req *request.Request, output *DescribeImportImageTasksOutput) {
- op := &request.Operation{
- Name: opDescribeImportImageTasks,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeImportImageTasksInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeImportImageTasksOutput{}
- req.Data = output
- return
-}
-
-// Displays details about an import virtual machine or import snapshot tasks
-// that are already created.
-func (c *EC2) DescribeImportImageTasks(input *DescribeImportImageTasksInput) (*DescribeImportImageTasksOutput, error) {
- req, out := c.DescribeImportImageTasksRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks"
-
-// DescribeImportSnapshotTasksRequest generates a request for the DescribeImportSnapshotTasks operation.
-func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTasksInput) (req *request.Request, output *DescribeImportSnapshotTasksOutput) {
- op := &request.Operation{
- Name: opDescribeImportSnapshotTasks,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeImportSnapshotTasksInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeImportSnapshotTasksOutput{}
- req.Data = output
- return
-}
-
-// Describes your import snapshot tasks.
-func (c *EC2) DescribeImportSnapshotTasks(input *DescribeImportSnapshotTasksInput) (*DescribeImportSnapshotTasksOutput, error) {
- req, out := c.DescribeImportSnapshotTasksRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeInstanceAttribute = "DescribeInstanceAttribute"
-
-// DescribeInstanceAttributeRequest generates a request for the DescribeInstanceAttribute operation.
-func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeInput) (req *request.Request, output *DescribeInstanceAttributeOutput) {
- op := &request.Operation{
- Name: opDescribeInstanceAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeInstanceAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeInstanceAttributeOutput{}
- req.Data = output
- return
-}
-
-// Describes the specified attribute of the specified instance. You can specify
-// only one attribute at a time. Valid attribute values are: instanceType |
-// kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior
-// | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck |
-// groupSet | ebsOptimized | sriovNetSupport
-func (c *EC2) DescribeInstanceAttribute(input *DescribeInstanceAttributeInput) (*DescribeInstanceAttributeOutput, error) {
- req, out := c.DescribeInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeInstanceStatus = "DescribeInstanceStatus"
-
-// DescribeInstanceStatusRequest generates a request for the DescribeInstanceStatus operation.
-func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput) (req *request.Request, output *DescribeInstanceStatusOutput) {
- op := &request.Operation{
- Name: opDescribeInstanceStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeInstanceStatusInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeInstanceStatusOutput{}
- req.Data = output
- return
-}
-
-// Describes the status of one or more instances.
-//
-// Instance status includes the following components:
-//
-// Status checks - Amazon EC2 performs status checks on running EC2 instances
-// to identify hardware and software issues. For more information, see Status
-// Checks for Your Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html)
-// and Troubleshooting Instances with Failed Status Checks (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// Scheduled events - Amazon EC2 can schedule events (such as reboot, stop,
-// or terminate) for your instances related to hardware issues, software updates,
-// or system maintenance. For more information, see Scheduled Events for Your
-// Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// Instance state - You can manage your instances from the moment you launch
-// them through their termination. For more information, see Instance Lifecycle
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeInstanceStatus(input *DescribeInstanceStatusInput) (*DescribeInstanceStatusOutput, error) {
- req, out := c.DescribeInstanceStatusRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeInstanceStatusPages(input *DescribeInstanceStatusInput, fn func(p *DescribeInstanceStatusOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeInstanceStatusRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeInstanceStatusOutput), lastPage)
- })
-}
-
-const opDescribeInstances = "DescribeInstances"
-
-// DescribeInstancesRequest generates a request for the DescribeInstances operation.
-func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *request.Request, output *DescribeInstancesOutput) {
- op := &request.Operation{
- Name: opDescribeInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeInstancesOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your instances.
-//
-// If you specify one or more instance IDs, Amazon EC2 returns information
-// for those instances. If you do not specify instance IDs, Amazon EC2 returns
-// information for all relevant instances. If you specify an instance ID that
-// is not valid, an error is returned. If you specify an instance that you do
-// not own, it is not included in the returned results.
-//
-// Recently terminated instances might appear in the returned results. This
-// interval is usually less than one hour.
-func (c *EC2) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstancesOutput, error) {
- req, out := c.DescribeInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeInstancesPages(input *DescribeInstancesInput, fn func(p *DescribeInstancesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeInstancesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeInstancesOutput), lastPage)
- })
-}
-
-const opDescribeInternetGateways = "DescribeInternetGateways"
-
-// DescribeInternetGatewaysRequest generates a request for the DescribeInternetGateways operation.
-func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInput) (req *request.Request, output *DescribeInternetGatewaysOutput) {
- op := &request.Operation{
- Name: opDescribeInternetGateways,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeInternetGatewaysInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeInternetGatewaysOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your Internet gateways.
-func (c *EC2) DescribeInternetGateways(input *DescribeInternetGatewaysInput) (*DescribeInternetGatewaysOutput, error) {
- req, out := c.DescribeInternetGatewaysRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeKeyPairs = "DescribeKeyPairs"
-
-// DescribeKeyPairsRequest generates a request for the DescribeKeyPairs operation.
-func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *request.Request, output *DescribeKeyPairsOutput) {
- op := &request.Operation{
- Name: opDescribeKeyPairs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeKeyPairsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeKeyPairsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your key pairs.
-//
-// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeKeyPairs(input *DescribeKeyPairsInput) (*DescribeKeyPairsOutput, error) {
- req, out := c.DescribeKeyPairsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeMovingAddresses = "DescribeMovingAddresses"
-
-// DescribeMovingAddressesRequest generates a request for the DescribeMovingAddresses operation.
-func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput) (req *request.Request, output *DescribeMovingAddressesOutput) {
- op := &request.Operation{
- Name: opDescribeMovingAddresses,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeMovingAddressesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeMovingAddressesOutput{}
- req.Data = output
- return
-}
-
-// Describes your Elastic IP addresses that are being moved to the EC2-VPC platform,
-// or that are being restored to the EC2-Classic platform. This request does
-// not return information about any other Elastic IP addresses in your account.
-func (c *EC2) DescribeMovingAddresses(input *DescribeMovingAddressesInput) (*DescribeMovingAddressesOutput, error) {
- req, out := c.DescribeMovingAddressesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeNetworkAcls = "DescribeNetworkAcls"
-
-// DescribeNetworkAclsRequest generates a request for the DescribeNetworkAcls operation.
-func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req *request.Request, output *DescribeNetworkAclsOutput) {
- op := &request.Operation{
- Name: opDescribeNetworkAcls,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeNetworkAclsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeNetworkAclsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your network ACLs.
-//
-// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DescribeNetworkAcls(input *DescribeNetworkAclsInput) (*DescribeNetworkAclsOutput, error) {
- req, out := c.DescribeNetworkAclsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute"
-
-// DescribeNetworkInterfaceAttributeRequest generates a request for the DescribeNetworkInterfaceAttribute operation.
-func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInterfaceAttributeInput) (req *request.Request, output *DescribeNetworkInterfaceAttributeOutput) {
- op := &request.Operation{
- Name: opDescribeNetworkInterfaceAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeNetworkInterfaceAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeNetworkInterfaceAttributeOutput{}
- req.Data = output
- return
-}
-
-// Describes a network interface attribute. You can specify only one attribute
-// at a time.
-func (c *EC2) DescribeNetworkInterfaceAttribute(input *DescribeNetworkInterfaceAttributeInput) (*DescribeNetworkInterfaceAttributeOutput, error) {
- req, out := c.DescribeNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces"
-
-// DescribeNetworkInterfacesRequest generates a request for the DescribeNetworkInterfaces operation.
-func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesInput) (req *request.Request, output *DescribeNetworkInterfacesOutput) {
- op := &request.Operation{
- Name: opDescribeNetworkInterfaces,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeNetworkInterfacesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeNetworkInterfacesOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your network interfaces.
-func (c *EC2) DescribeNetworkInterfaces(input *DescribeNetworkInterfacesInput) (*DescribeNetworkInterfacesOutput, error) {
- req, out := c.DescribeNetworkInterfacesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribePlacementGroups = "DescribePlacementGroups"
-
-// DescribePlacementGroupsRequest generates a request for the DescribePlacementGroups operation.
-func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput) (req *request.Request, output *DescribePlacementGroupsOutput) {
- op := &request.Operation{
- Name: opDescribePlacementGroups,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribePlacementGroupsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribePlacementGroupsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your placement groups. For more information about
-// placement groups and cluster instances, see Cluster Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribePlacementGroups(input *DescribePlacementGroupsInput) (*DescribePlacementGroupsOutput, error) {
- req, out := c.DescribePlacementGroupsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribePrefixLists = "DescribePrefixLists"
-
-// DescribePrefixListsRequest generates a request for the DescribePrefixLists operation.
-func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *request.Request, output *DescribePrefixListsOutput) {
- op := &request.Operation{
- Name: opDescribePrefixLists,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribePrefixListsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribePrefixListsOutput{}
- req.Data = output
- return
-}
-
-// Describes available AWS services in a prefix list format, which includes
-// the prefix list name and prefix list ID of the service and the IP address
-// range for the service. A prefix list ID is required for creating an outbound
-// security group rule that allows traffic from a VPC to access an AWS service
-// through a VPC endpoint.
-func (c *EC2) DescribePrefixLists(input *DescribePrefixListsInput) (*DescribePrefixListsOutput, error) {
- req, out := c.DescribePrefixListsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeRegions = "DescribeRegions"
-
-// DescribeRegionsRequest generates a request for the DescribeRegions operation.
-func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *request.Request, output *DescribeRegionsOutput) {
- op := &request.Operation{
- Name: opDescribeRegions,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeRegionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeRegionsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more regions that are currently available to you.
-//
-// For a list of the regions supported by Amazon EC2, see Regions and Endpoints
-// (http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region).
-func (c *EC2) DescribeRegions(input *DescribeRegionsInput) (*DescribeRegionsOutput, error) {
- req, out := c.DescribeRegionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeReservedInstances = "DescribeReservedInstances"
-
-// DescribeReservedInstancesRequest generates a request for the DescribeReservedInstances operation.
-func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesInput) (req *request.Request, output *DescribeReservedInstancesOutput) {
- op := &request.Operation{
- Name: opDescribeReservedInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeReservedInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeReservedInstancesOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of the Reserved Instances that you purchased.
-//
-// For more information about Reserved Instances, see Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeReservedInstances(input *DescribeReservedInstancesInput) (*DescribeReservedInstancesOutput, error) {
- req, out := c.DescribeReservedInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings"
-
-// DescribeReservedInstancesListingsRequest generates a request for the DescribeReservedInstancesListings operation.
-func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedInstancesListingsInput) (req *request.Request, output *DescribeReservedInstancesListingsOutput) {
- op := &request.Operation{
- Name: opDescribeReservedInstancesListings,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeReservedInstancesListingsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeReservedInstancesListingsOutput{}
- req.Data = output
- return
-}
-
-// Describes your account's Reserved Instance listings in the Reserved Instance
-// Marketplace.
-//
-// The Reserved Instance Marketplace matches sellers who want to resell Reserved
-// Instance capacity that they no longer need with buyers who want to purchase
-// additional capacity. Reserved Instances bought and sold through the Reserved
-// Instance Marketplace work like any other Reserved Instances.
-//
-// As a seller, you choose to list some or all of your Reserved Instances,
-// and you specify the upfront price to receive for them. Your Reserved Instances
-// are then listed in the Reserved Instance Marketplace and are available for
-// purchase.
-//
-// As a buyer, you specify the configuration of the Reserved Instance to purchase,
-// and the Marketplace matches what you're searching for with what's available.
-// The Marketplace first sells the lowest priced Reserved Instances to you,
-// and continues to sell available Reserved Instance listings to you until your
-// demand is met. You are charged based on the total price of all of the listings
-// that you purchase.
-//
-// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeReservedInstancesListings(input *DescribeReservedInstancesListingsInput) (*DescribeReservedInstancesListingsOutput, error) {
- req, out := c.DescribeReservedInstancesListingsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModifications"
-
-// DescribeReservedInstancesModificationsRequest generates a request for the DescribeReservedInstancesModifications operation.
-func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReservedInstancesModificationsInput) (req *request.Request, output *DescribeReservedInstancesModificationsOutput) {
- op := &request.Operation{
- Name: opDescribeReservedInstancesModifications,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeReservedInstancesModificationsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeReservedInstancesModificationsOutput{}
- req.Data = output
- return
-}
-
-// Describes the modifications made to your Reserved Instances. If no parameter
-// is specified, information about all your Reserved Instances modification
-// requests is returned. If a modification ID is specified, only information
-// about the specific modification is returned.
-//
-// For more information, see Modifying Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeReservedInstancesModifications(input *DescribeReservedInstancesModificationsInput) (*DescribeReservedInstancesModificationsOutput, error) {
- req, out := c.DescribeReservedInstancesModificationsRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeReservedInstancesModificationsPages(input *DescribeReservedInstancesModificationsInput, fn func(p *DescribeReservedInstancesModificationsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeReservedInstancesModificationsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeReservedInstancesModificationsOutput), lastPage)
- })
-}
-
-const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings"
-
-// DescribeReservedInstancesOfferingsRequest generates a request for the DescribeReservedInstancesOfferings operation.
-func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedInstancesOfferingsInput) (req *request.Request, output *DescribeReservedInstancesOfferingsOutput) {
- op := &request.Operation{
- Name: opDescribeReservedInstancesOfferings,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeReservedInstancesOfferingsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeReservedInstancesOfferingsOutput{}
- req.Data = output
- return
-}
-
-// Describes Reserved Instance offerings that are available for purchase. With
-// Reserved Instances, you purchase the right to launch instances for a period
-// of time. During that time period, you do not receive insufficient capacity
-// errors, and you pay a lower usage rate than the rate charged for On-Demand
-// instances for the actual time used.
-//
-// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeReservedInstancesOfferings(input *DescribeReservedInstancesOfferingsInput) (*DescribeReservedInstancesOfferingsOutput, error) {
- req, out := c.DescribeReservedInstancesOfferingsRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeReservedInstancesOfferingsPages(input *DescribeReservedInstancesOfferingsInput, fn func(p *DescribeReservedInstancesOfferingsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeReservedInstancesOfferingsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeReservedInstancesOfferingsOutput), lastPage)
- })
-}
-
-const opDescribeRouteTables = "DescribeRouteTables"
-
-// DescribeRouteTablesRequest generates a request for the DescribeRouteTables operation.
-func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *request.Request, output *DescribeRouteTablesOutput) {
- op := &request.Operation{
- Name: opDescribeRouteTables,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeRouteTablesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeRouteTablesOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your route tables.
-//
-// Each subnet in your VPC must be associated with a route table. If a subnet
-// is not explicitly associated with any route table, it is implicitly associated
-// with the main route table. This command does not return the subnet ID for
-// implicit associations.
-//
-// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DescribeRouteTables(input *DescribeRouteTablesInput) (*DescribeRouteTablesOutput, error) {
- req, out := c.DescribeRouteTablesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeSecurityGroups = "DescribeSecurityGroups"
-
-// DescribeSecurityGroupsRequest generates a request for the DescribeSecurityGroups operation.
-func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput) (req *request.Request, output *DescribeSecurityGroupsOutput) {
- op := &request.Operation{
- Name: opDescribeSecurityGroups,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeSecurityGroupsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSecurityGroupsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your security groups.
-//
-// A security group is for use with instances either in the EC2-Classic platform
-// or in a specific VPC. For more information, see Amazon EC2 Security Groups
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
-// in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your
-// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DescribeSecurityGroups(input *DescribeSecurityGroupsInput) (*DescribeSecurityGroupsOutput, error) {
- req, out := c.DescribeSecurityGroupsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute"
-
-// DescribeSnapshotAttributeRequest generates a request for the DescribeSnapshotAttribute operation.
-func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeInput) (req *request.Request, output *DescribeSnapshotAttributeOutput) {
- op := &request.Operation{
- Name: opDescribeSnapshotAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeSnapshotAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSnapshotAttributeOutput{}
- req.Data = output
- return
-}
-
-// Describes the specified attribute of the specified snapshot. You can specify
-// only one attribute at a time.
-//
-// For more information about EBS snapshots, see Amazon EBS Snapshots in the
-// Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeSnapshotAttribute(input *DescribeSnapshotAttributeInput) (*DescribeSnapshotAttributeOutput, error) {
- req, out := c.DescribeSnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeSnapshots = "DescribeSnapshots"
-
-// DescribeSnapshotsRequest generates a request for the DescribeSnapshots operation.
-func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *request.Request, output *DescribeSnapshotsOutput) {
- op := &request.Operation{
- Name: opDescribeSnapshots,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeSnapshotsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSnapshotsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of the EBS snapshots available to you. Available snapshots
-// include public snapshots available for any AWS account to launch, private
-// snapshots that you own, and private snapshots owned by another AWS account
-// but for which you've been given explicit create volume permissions.
-//
-// The create volume permissions fall into the following categories:
-//
-// public: The owner of the snapshot granted create volume permissions for
-// the snapshot to the all group. All AWS accounts have create volume permissions
-// for these snapshots. explicit: The owner of the snapshot granted create
-// volume permissions to a specific AWS account. implicit: An AWS account has
-// implicit create volume permissions for all snapshots it owns. The list of
-// snapshots returned can be modified by specifying snapshot IDs, snapshot owners,
-// or AWS accounts with create volume permissions. If no options are specified,
-// Amazon EC2 returns all snapshots for which you have create volume permissions.
-//
-// If you specify one or more snapshot IDs, only snapshots that have the specified
-// IDs are returned. If you specify an invalid snapshot ID, an error is returned.
-// If you specify a snapshot ID for which you do not have access, it is not
-// included in the returned results.
-//
-// If you specify one or more snapshot owners, only snapshots from the specified
-// owners and for which you have access are returned. The results can include
-// the AWS account IDs of the specified owners, amazon for snapshots owned by
-// Amazon, or self for snapshots that you own.
-//
-// If you specify a list of restorable users, only snapshots with create snapshot
-// permissions for those users are returned. You can specify AWS account IDs
-// (if you own the snapshots), self for snapshots for which you own or have
-// explicit permissions, or all for public snapshots.
-//
-// If you are describing a long list of snapshots, you can paginate the output
-// to make the list more manageable. The MaxResults parameter sets the maximum
-// number of results returned in a single page. If the list of results exceeds
-// your MaxResults value, then that number of results is returned along with
-// a NextToken value that can be passed to a subsequent DescribeSnapshots request
-// to retrieve the remaining results.
-//
-// For more information about EBS snapshots, see Amazon EBS Snapshots in the
-// Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) {
- req, out := c.DescribeSnapshotsRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeSnapshotsPages(input *DescribeSnapshotsInput, fn func(p *DescribeSnapshotsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeSnapshotsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeSnapshotsOutput), lastPage)
- })
-}
-
-const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription"
-
-// DescribeSpotDatafeedSubscriptionRequest generates a request for the DescribeSpotDatafeedSubscription operation.
-func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafeedSubscriptionInput) (req *request.Request, output *DescribeSpotDatafeedSubscriptionOutput) {
- op := &request.Operation{
- Name: opDescribeSpotDatafeedSubscription,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeSpotDatafeedSubscriptionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSpotDatafeedSubscriptionOutput{}
- req.Data = output
- return
-}
-
-// Describes the data feed for Spot instances. For more information, see Spot
-// Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeSpotDatafeedSubscription(input *DescribeSpotDatafeedSubscriptionInput) (*DescribeSpotDatafeedSubscriptionOutput, error) {
- req, out := c.DescribeSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances"
-
-// DescribeSpotFleetInstancesRequest generates a request for the DescribeSpotFleetInstances operation.
-func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstancesInput) (req *request.Request, output *DescribeSpotFleetInstancesOutput) {
- op := &request.Operation{
- Name: opDescribeSpotFleetInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeSpotFleetInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSpotFleetInstancesOutput{}
- req.Data = output
- return
-}
-
-// Describes the running instances for the specified Spot fleet.
-func (c *EC2) DescribeSpotFleetInstances(input *DescribeSpotFleetInstancesInput) (*DescribeSpotFleetInstancesOutput, error) {
- req, out := c.DescribeSpotFleetInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory"
-
-// DescribeSpotFleetRequestHistoryRequest generates a request for the DescribeSpotFleetRequestHistory operation.
-func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetRequestHistoryInput) (req *request.Request, output *DescribeSpotFleetRequestHistoryOutput) {
- op := &request.Operation{
- Name: opDescribeSpotFleetRequestHistory,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeSpotFleetRequestHistoryInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSpotFleetRequestHistoryOutput{}
- req.Data = output
- return
-}
-
-// Describes the events for the specified Spot fleet request during the specified
-// time.
-//
-// Spot fleet events are delayed by up to 30 seconds before they can be described.
-// This ensures that you can query by the last evaluated time and not miss a
-// recorded event.
-func (c *EC2) DescribeSpotFleetRequestHistory(input *DescribeSpotFleetRequestHistoryInput) (*DescribeSpotFleetRequestHistoryOutput, error) {
- req, out := c.DescribeSpotFleetRequestHistoryRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests"
-
-// DescribeSpotFleetRequestsRequest generates a request for the DescribeSpotFleetRequests operation.
-func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsInput) (req *request.Request, output *DescribeSpotFleetRequestsOutput) {
- op := &request.Operation{
- Name: opDescribeSpotFleetRequests,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeSpotFleetRequestsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSpotFleetRequestsOutput{}
- req.Data = output
- return
-}
-
-// Describes your Spot fleet requests.
-func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) (*DescribeSpotFleetRequestsOutput, error) {
- req, out := c.DescribeSpotFleetRequestsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests"
-
-// DescribeSpotInstanceRequestsRequest generates a request for the DescribeSpotInstanceRequests operation.
-func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceRequestsInput) (req *request.Request, output *DescribeSpotInstanceRequestsOutput) {
- op := &request.Operation{
- Name: opDescribeSpotInstanceRequests,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeSpotInstanceRequestsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSpotInstanceRequestsOutput{}
- req.Data = output
- return
-}
-
-// Describes the Spot instance requests that belong to your account. Spot instances
-// are instances that Amazon EC2 launches when the bid price that you specify
-// exceeds the current Spot price. Amazon EC2 periodically sets the Spot price
-// based on available Spot instance capacity and current Spot instance requests.
-// For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// You can use DescribeSpotInstanceRequests to find a running Spot instance
-// by examining the response. If the status of the Spot instance is fulfilled,
-// the instance ID appears in the response and contains the identifier of the
-// instance. Alternatively, you can use DescribeInstances with a filter to look
-// for instances where the instance lifecycle is spot.
-func (c *EC2) DescribeSpotInstanceRequests(input *DescribeSpotInstanceRequestsInput) (*DescribeSpotInstanceRequestsOutput, error) {
- req, out := c.DescribeSpotInstanceRequestsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory"
-
-// DescribeSpotPriceHistoryRequest generates a request for the DescribeSpotPriceHistory operation.
-func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInput) (req *request.Request, output *DescribeSpotPriceHistoryOutput) {
- op := &request.Operation{
- Name: opDescribeSpotPriceHistory,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeSpotPriceHistoryInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSpotPriceHistoryOutput{}
- req.Data = output
- return
-}
-
-// Describes the Spot price history. The prices returned are listed in chronological
-// order, from the oldest to the most recent, for up to the past 90 days. For
-// more information, see Spot Instance Pricing History (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// When you specify a start and end time, this operation returns the prices
-// of the instance types within the time range that you specified and the time
-// when the price changed. The price is valid within the time period that you
-// specified; the response merely indicates the last time that the price changed.
-func (c *EC2) DescribeSpotPriceHistory(input *DescribeSpotPriceHistoryInput) (*DescribeSpotPriceHistoryOutput, error) {
- req, out := c.DescribeSpotPriceHistoryRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeSpotPriceHistoryPages(input *DescribeSpotPriceHistoryInput, fn func(p *DescribeSpotPriceHistoryOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeSpotPriceHistoryRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeSpotPriceHistoryOutput), lastPage)
- })
-}
-
-const opDescribeSubnets = "DescribeSubnets"
-
-// DescribeSubnetsRequest generates a request for the DescribeSubnets operation.
-func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request.Request, output *DescribeSubnetsOutput) {
- op := &request.Operation{
- Name: opDescribeSubnets,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeSubnetsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeSubnetsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your subnets.
-//
-// For more information about subnets, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DescribeSubnets(input *DescribeSubnetsInput) (*DescribeSubnetsOutput, error) {
- req, out := c.DescribeSubnetsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeTags = "DescribeTags"
-
-// DescribeTagsRequest generates a request for the DescribeTags operation.
-func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
- op := &request.Operation{
- Name: opDescribeTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeTagsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeTagsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of the tags for your EC2 resources.
-//
-// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
- req, out := c.DescribeTagsRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeTagsPages(input *DescribeTagsInput, fn func(p *DescribeTagsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeTagsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeTagsOutput), lastPage)
- })
-}
-
-const opDescribeVolumeAttribute = "DescribeVolumeAttribute"
-
-// DescribeVolumeAttributeRequest generates a request for the DescribeVolumeAttribute operation.
-func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput) (req *request.Request, output *DescribeVolumeAttributeOutput) {
- op := &request.Operation{
- Name: opDescribeVolumeAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVolumeAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVolumeAttributeOutput{}
- req.Data = output
- return
-}
-
-// Describes the specified attribute of the specified volume. You can specify
-// only one attribute at a time.
-//
-// For more information about EBS volumes, see Amazon EBS Volumes in the Amazon
-// Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeVolumeAttribute(input *DescribeVolumeAttributeInput) (*DescribeVolumeAttributeOutput, error) {
- req, out := c.DescribeVolumeAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeVolumeStatus = "DescribeVolumeStatus"
-
-// DescribeVolumeStatusRequest generates a request for the DescribeVolumeStatus operation.
-func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req *request.Request, output *DescribeVolumeStatusOutput) {
- op := &request.Operation{
- Name: opDescribeVolumeStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeVolumeStatusInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVolumeStatusOutput{}
- req.Data = output
- return
-}
-
-// Describes the status of the specified volumes. Volume status provides the
-// result of the checks performed on your volumes to determine events that can
-// impair the performance of your volumes. The performance of a volume can be
-// affected if an issue occurs on the volume's underlying host. If the volume's
-// underlying host experiences a power outage or system issue, after the system
-// is restored, there could be data inconsistencies on the volume. Volume events
-// notify you if this occurs. Volume actions notify you if any action needs
-// to be taken in response to the event.
-//
-// The DescribeVolumeStatus operation provides the following information about
-// the specified volumes:
-//
-// Status: Reflects the current status of the volume. The possible values are
-// ok, impaired , warning, or insufficient-data. If all checks pass, the overall
-// status of the volume is ok. If the check fails, the overall status is impaired.
-// If the status is insufficient-data, then the checks may still be taking place
-// on your volume at the time. We recommend that you retry the request. For
-// more information on volume status, see Monitoring the Status of Your Volumes
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html).
-//
-// Events: Reflect the cause of a volume status and may require you to take
-// action. For example, if your volume returns an impaired status, then the
-// volume event might be potential-data-inconsistency. This means that your
-// volume has been affected by an issue with the underlying host, has all I/O
-// operations disabled, and may have inconsistent data.
-//
-// Actions: Reflect the actions you may have to take in response to an event.
-// For example, if the status of the volume is impaired and the volume event
-// shows potential-data-inconsistency, then the action shows enable-volume-io.
-// This means that you may want to enable the I/O operations for the volume
-// by calling the EnableVolumeIO action and then check the volume for data consistency.
-//
-// Volume status is based on the volume status checks, and does not reflect
-// the volume state. Therefore, volume status does not indicate volumes in the
-// error state (for example, when a volume is incapable of accepting I/O.)
-func (c *EC2) DescribeVolumeStatus(input *DescribeVolumeStatusInput) (*DescribeVolumeStatusOutput, error) {
- req, out := c.DescribeVolumeStatusRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeVolumeStatusPages(input *DescribeVolumeStatusInput, fn func(p *DescribeVolumeStatusOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeVolumeStatusRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeVolumeStatusOutput), lastPage)
- })
-}
-
-const opDescribeVolumes = "DescribeVolumes"
-
-// DescribeVolumesRequest generates a request for the DescribeVolumes operation.
-func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.Request, output *DescribeVolumesOutput) {
- op := &request.Operation{
- Name: opDescribeVolumes,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &DescribeVolumesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVolumesOutput{}
- req.Data = output
- return
-}
-
-// Describes the specified EBS volumes.
-//
-// If you are describing a long list of volumes, you can paginate the output
-// to make the list more manageable. The MaxResults parameter sets the maximum
-// number of results returned in a single page. If the list of results exceeds
-// your MaxResults value, then that number of results is returned along with
-// a NextToken value that can be passed to a subsequent DescribeVolumes request
-// to retrieve the remaining results.
-//
-// For more information about EBS volumes, see Amazon EBS Volumes in the Amazon
-// Elastic Compute Cloud User Guide.
-func (c *EC2) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutput, error) {
- req, out := c.DescribeVolumesRequest(input)
- err := req.Send()
- return out, err
-}
-
-func (c *EC2) DescribeVolumesPages(input *DescribeVolumesInput, fn func(p *DescribeVolumesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeVolumesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeVolumesOutput), lastPage)
- })
-}
-
-const opDescribeVpcAttribute = "DescribeVpcAttribute"
-
-// DescribeVpcAttributeRequest generates a request for the DescribeVpcAttribute operation.
-func (c *EC2) DescribeVpcAttributeRequest(input *DescribeVpcAttributeInput) (req *request.Request, output *DescribeVpcAttributeOutput) {
- op := &request.Operation{
- Name: opDescribeVpcAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVpcAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVpcAttributeOutput{}
- req.Data = output
- return
-}
-
-// Describes the specified attribute of the specified VPC. You can specify only
-// one attribute at a time.
-func (c *EC2) DescribeVpcAttribute(input *DescribeVpcAttributeInput) (*DescribeVpcAttributeOutput, error) {
- req, out := c.DescribeVpcAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeVpcClassicLink = "DescribeVpcClassicLink"
-
-// DescribeVpcClassicLinkRequest generates a request for the DescribeVpcClassicLink operation.
-func (c *EC2) DescribeVpcClassicLinkRequest(input *DescribeVpcClassicLinkInput) (req *request.Request, output *DescribeVpcClassicLinkOutput) {
- op := &request.Operation{
- Name: opDescribeVpcClassicLink,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVpcClassicLinkInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVpcClassicLinkOutput{}
- req.Data = output
- return
-}
-
-// Describes the ClassicLink status of one or more VPCs.
-func (c *EC2) DescribeVpcClassicLink(input *DescribeVpcClassicLinkInput) (*DescribeVpcClassicLinkOutput, error) {
- req, out := c.DescribeVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices"
-
-// DescribeVpcEndpointServicesRequest generates a request for the DescribeVpcEndpointServices operation.
-func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServicesInput) (req *request.Request, output *DescribeVpcEndpointServicesOutput) {
- op := &request.Operation{
- Name: opDescribeVpcEndpointServices,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVpcEndpointServicesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVpcEndpointServicesOutput{}
- req.Data = output
- return
-}
-
-// Describes all supported AWS services that can be specified when creating
-// a VPC endpoint.
-func (c *EC2) DescribeVpcEndpointServices(input *DescribeVpcEndpointServicesInput) (*DescribeVpcEndpointServicesOutput, error) {
- req, out := c.DescribeVpcEndpointServicesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeVpcEndpoints = "DescribeVpcEndpoints"
-
-// DescribeVpcEndpointsRequest generates a request for the DescribeVpcEndpoints operation.
-func (c *EC2) DescribeVpcEndpointsRequest(input *DescribeVpcEndpointsInput) (req *request.Request, output *DescribeVpcEndpointsOutput) {
- op := &request.Operation{
- Name: opDescribeVpcEndpoints,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVpcEndpointsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVpcEndpointsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your VPC endpoints.
-func (c *EC2) DescribeVpcEndpoints(input *DescribeVpcEndpointsInput) (*DescribeVpcEndpointsOutput, error) {
- req, out := c.DescribeVpcEndpointsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections"
-
-// DescribeVpcPeeringConnectionsRequest generates a request for the DescribeVpcPeeringConnections operation.
-func (c *EC2) DescribeVpcPeeringConnectionsRequest(input *DescribeVpcPeeringConnectionsInput) (req *request.Request, output *DescribeVpcPeeringConnectionsOutput) {
- op := &request.Operation{
- Name: opDescribeVpcPeeringConnections,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVpcPeeringConnectionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVpcPeeringConnectionsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your VPC peering connections.
-func (c *EC2) DescribeVpcPeeringConnections(input *DescribeVpcPeeringConnectionsInput) (*DescribeVpcPeeringConnectionsOutput, error) {
- req, out := c.DescribeVpcPeeringConnectionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeVpcs = "DescribeVpcs"
-
-// DescribeVpcsRequest generates a request for the DescribeVpcs operation.
-func (c *EC2) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Request, output *DescribeVpcsOutput) {
- op := &request.Operation{
- Name: opDescribeVpcs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVpcsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVpcsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your VPCs.
-func (c *EC2) DescribeVpcs(input *DescribeVpcsInput) (*DescribeVpcsOutput, error) {
- req, out := c.DescribeVpcsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeVpnConnections = "DescribeVpnConnections"
-
-// DescribeVpnConnectionsRequest generates a request for the DescribeVpnConnections operation.
-func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput) (req *request.Request, output *DescribeVpnConnectionsOutput) {
- op := &request.Operation{
- Name: opDescribeVpnConnections,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVpnConnectionsInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVpnConnectionsOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your VPN connections.
-//
-// For more information about VPN connections, see Adding a Hardware Virtual
-// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DescribeVpnConnections(input *DescribeVpnConnectionsInput) (*DescribeVpnConnectionsOutput, error) {
- req, out := c.DescribeVpnConnectionsRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDescribeVpnGateways = "DescribeVpnGateways"
-
-// DescribeVpnGatewaysRequest generates a request for the DescribeVpnGateways operation.
-func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req *request.Request, output *DescribeVpnGatewaysOutput) {
- op := &request.Operation{
- Name: opDescribeVpnGateways,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeVpnGatewaysInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DescribeVpnGatewaysOutput{}
- req.Data = output
- return
-}
-
-// Describes one or more of your virtual private gateways.
-//
-// For more information about virtual private gateways, see Adding an IPsec
-// Hardware VPN to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DescribeVpnGateways(input *DescribeVpnGatewaysInput) (*DescribeVpnGatewaysOutput, error) {
- req, out := c.DescribeVpnGatewaysRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDetachClassicLinkVpc = "DetachClassicLinkVpc"
-
-// DetachClassicLinkVpcRequest generates a request for the DetachClassicLinkVpc operation.
-func (c *EC2) DetachClassicLinkVpcRequest(input *DetachClassicLinkVpcInput) (req *request.Request, output *DetachClassicLinkVpcOutput) {
- op := &request.Operation{
- Name: opDetachClassicLinkVpc,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DetachClassicLinkVpcInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DetachClassicLinkVpcOutput{}
- req.Data = output
- return
-}
-
-// Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance
-// has been unlinked, the VPC security groups are no longer associated with
-// it. An instance is automatically unlinked from a VPC when it's stopped.
-func (c *EC2) DetachClassicLinkVpc(input *DetachClassicLinkVpcInput) (*DetachClassicLinkVpcOutput, error) {
- req, out := c.DetachClassicLinkVpcRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDetachInternetGateway = "DetachInternetGateway"
-
-// DetachInternetGatewayRequest generates a request for the DetachInternetGateway operation.
-func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (req *request.Request, output *DetachInternetGatewayOutput) {
- op := &request.Operation{
- Name: opDetachInternetGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DetachInternetGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DetachInternetGatewayOutput{}
- req.Data = output
- return
-}
-
-// Detaches an Internet gateway from a VPC, disabling connectivity between the
-// Internet and the VPC. The VPC must not contain any running instances with
-// Elastic IP addresses.
-func (c *EC2) DetachInternetGateway(input *DetachInternetGatewayInput) (*DetachInternetGatewayOutput, error) {
- req, out := c.DetachInternetGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDetachNetworkInterface = "DetachNetworkInterface"
-
-// DetachNetworkInterfaceRequest generates a request for the DetachNetworkInterface operation.
-func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput) (req *request.Request, output *DetachNetworkInterfaceOutput) {
- op := &request.Operation{
- Name: opDetachNetworkInterface,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DetachNetworkInterfaceInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DetachNetworkInterfaceOutput{}
- req.Data = output
- return
-}
-
-// Detaches a network interface from an instance.
-func (c *EC2) DetachNetworkInterface(input *DetachNetworkInterfaceInput) (*DetachNetworkInterfaceOutput, error) {
- req, out := c.DetachNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDetachVolume = "DetachVolume"
-
-// DetachVolumeRequest generates a request for the DetachVolume operation.
-func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Request, output *VolumeAttachment) {
- op := &request.Operation{
- Name: opDetachVolume,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DetachVolumeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &VolumeAttachment{}
- req.Data = output
- return
-}
-
-// Detaches an EBS volume from an instance. Make sure to unmount any file systems
-// on the device within your operating system before detaching the volume. Failure
-// to do so results in the volume being stuck in a busy state while detaching.
-//
-// If an Amazon EBS volume is the root device of an instance, it can't be detached
-// while the instance is running. To detach the root volume, stop the instance
-// first.
-//
-// When a volume with an AWS Marketplace product code is detached from an instance,
-// the product code is no longer associated with the instance.
-//
-// For more information, see Detaching an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) DetachVolume(input *DetachVolumeInput) (*VolumeAttachment, error) {
- req, out := c.DetachVolumeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDetachVpnGateway = "DetachVpnGateway"
-
-// DetachVpnGatewayRequest generates a request for the DetachVpnGateway operation.
-func (c *EC2) DetachVpnGatewayRequest(input *DetachVpnGatewayInput) (req *request.Request, output *DetachVpnGatewayOutput) {
- op := &request.Operation{
- Name: opDetachVpnGateway,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DetachVpnGatewayInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DetachVpnGatewayOutput{}
- req.Data = output
- return
-}
-
-// Detaches a virtual private gateway from a VPC. You do this if you're planning
-// to turn off the VPC and not use it anymore. You can confirm a virtual private
-// gateway has been completely detached from a VPC by describing the virtual
-// private gateway (any attachments to the virtual private gateway are also
-// described).
-//
-// You must wait for the attachment's state to switch to detached before you
-// can delete the VPC or attach a different VPC to the virtual private gateway.
-func (c *EC2) DetachVpnGateway(input *DetachVpnGatewayInput) (*DetachVpnGatewayOutput, error) {
- req, out := c.DetachVpnGatewayRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation"
-
-// DisableVgwRoutePropagationRequest generates a request for the DisableVgwRoutePropagation operation.
-func (c *EC2) DisableVgwRoutePropagationRequest(input *DisableVgwRoutePropagationInput) (req *request.Request, output *DisableVgwRoutePropagationOutput) {
- op := &request.Operation{
- Name: opDisableVgwRoutePropagation,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisableVgwRoutePropagationInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DisableVgwRoutePropagationOutput{}
- req.Data = output
- return
-}
-
-// Disables a virtual private gateway (VGW) from propagating routes to a specified
-// route table of a VPC.
-func (c *EC2) DisableVgwRoutePropagation(input *DisableVgwRoutePropagationInput) (*DisableVgwRoutePropagationOutput, error) {
- req, out := c.DisableVgwRoutePropagationRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDisableVpcClassicLink = "DisableVpcClassicLink"
-
-// DisableVpcClassicLinkRequest generates a request for the DisableVpcClassicLink operation.
-func (c *EC2) DisableVpcClassicLinkRequest(input *DisableVpcClassicLinkInput) (req *request.Request, output *DisableVpcClassicLinkOutput) {
- op := &request.Operation{
- Name: opDisableVpcClassicLink,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisableVpcClassicLinkInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DisableVpcClassicLinkOutput{}
- req.Data = output
- return
-}
-
-// Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC
-// that has EC2-Classic instances linked to it.
-func (c *EC2) DisableVpcClassicLink(input *DisableVpcClassicLinkInput) (*DisableVpcClassicLinkOutput, error) {
- req, out := c.DisableVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDisassociateAddress = "DisassociateAddress"
-
-// DisassociateAddressRequest generates a request for the DisassociateAddress operation.
-func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *request.Request, output *DisassociateAddressOutput) {
- op := &request.Operation{
- Name: opDisassociateAddress,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisassociateAddressInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DisassociateAddressOutput{}
- req.Data = output
- return
-}
-
-// Disassociates an Elastic IP address from the instance or network interface
-// it's associated with.
-//
-// An Elastic IP address is for use in either the EC2-Classic platform or in
-// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// This is an idempotent operation. If you perform the operation more than
-// once, Amazon EC2 doesn't return an error.
-func (c *EC2) DisassociateAddress(input *DisassociateAddressInput) (*DisassociateAddressOutput, error) {
- req, out := c.DisassociateAddressRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opDisassociateRouteTable = "DisassociateRouteTable"
-
-// DisassociateRouteTableRequest generates a request for the DisassociateRouteTable operation.
-func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) (req *request.Request, output *DisassociateRouteTableOutput) {
- op := &request.Operation{
- Name: opDisassociateRouteTable,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisassociateRouteTableInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &DisassociateRouteTableOutput{}
- req.Data = output
- return
-}
-
-// Disassociates a subnet from a route table.
-//
-// After you perform this action, the subnet no longer uses the routes in the
-// route table. Instead, it uses the routes in the VPC's main route table. For
-// more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) DisassociateRouteTable(input *DisassociateRouteTableInput) (*DisassociateRouteTableOutput, error) {
- req, out := c.DisassociateRouteTableRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation"
-
-// EnableVgwRoutePropagationRequest generates a request for the EnableVgwRoutePropagation operation.
-func (c *EC2) EnableVgwRoutePropagationRequest(input *EnableVgwRoutePropagationInput) (req *request.Request, output *EnableVgwRoutePropagationOutput) {
- op := &request.Operation{
- Name: opEnableVgwRoutePropagation,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnableVgwRoutePropagationInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &EnableVgwRoutePropagationOutput{}
- req.Data = output
- return
-}
-
-// Enables a virtual private gateway (VGW) to propagate routes to the specified
-// route table of a VPC.
-func (c *EC2) EnableVgwRoutePropagation(input *EnableVgwRoutePropagationInput) (*EnableVgwRoutePropagationOutput, error) {
- req, out := c.EnableVgwRoutePropagationRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opEnableVolumeIO = "EnableVolumeIO"
-
-// EnableVolumeIORequest generates a request for the EnableVolumeIO operation.
-func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *request.Request, output *EnableVolumeIOOutput) {
- op := &request.Operation{
- Name: opEnableVolumeIO,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnableVolumeIOInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &EnableVolumeIOOutput{}
- req.Data = output
- return
-}
-
-// Enables I/O operations for a volume that had I/O operations disabled because
-// the data on the volume was potentially inconsistent.
-func (c *EC2) EnableVolumeIO(input *EnableVolumeIOInput) (*EnableVolumeIOOutput, error) {
- req, out := c.EnableVolumeIORequest(input)
- err := req.Send()
- return out, err
-}
-
-const opEnableVpcClassicLink = "EnableVpcClassicLink"
-
-// EnableVpcClassicLinkRequest generates a request for the EnableVpcClassicLink operation.
-func (c *EC2) EnableVpcClassicLinkRequest(input *EnableVpcClassicLinkInput) (req *request.Request, output *EnableVpcClassicLinkOutput) {
- op := &request.Operation{
- Name: opEnableVpcClassicLink,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnableVpcClassicLinkInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &EnableVpcClassicLinkOutput{}
- req.Data = output
- return
-}
-
-// Enables a VPC for ClassicLink. You can then link EC2-Classic instances to
-// your ClassicLink-enabled VPC to allow communication over private IP addresses.
-// You cannot enable your VPC for ClassicLink if any of your VPC's route tables
-// have existing routes for address ranges within the 10.0.0.0/8 IP address
-// range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16
-// IP address ranges. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) EnableVpcClassicLink(input *EnableVpcClassicLinkInput) (*EnableVpcClassicLinkOutput, error) {
- req, out := c.EnableVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opGetConsoleOutput = "GetConsoleOutput"
-
-// GetConsoleOutputRequest generates a request for the GetConsoleOutput operation.
-func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *request.Request, output *GetConsoleOutputOutput) {
- op := &request.Operation{
- Name: opGetConsoleOutput,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetConsoleOutputInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &GetConsoleOutputOutput{}
- req.Data = output
- return
-}
-
-// Gets the console output for the specified instance.
-//
-// Instances do not have a physical monitor through which you can view their
-// console output. They also lack physical controls that allow you to power
-// up, reboot, or shut them down. To allow these actions, we provide them through
-// the Amazon EC2 API and command line interface.
-//
-// Instance console output is buffered and posted shortly after instance boot,
-// reboot, and termination. Amazon EC2 preserves the most recent 64 KB output
-// which is available for at least one hour after the most recent post.
-//
-// For Linux instances, the instance console output displays the exact console
-// output that would normally be displayed on a physical monitor attached to
-// a computer. This output is buffered because the instance produces it and
-// then posts it to a store where the instance's owner can retrieve it.
-//
-// For Windows instances, the instance console output includes output from
-// the EC2Config service.
-func (c *EC2) GetConsoleOutput(input *GetConsoleOutputInput) (*GetConsoleOutputOutput, error) {
- req, out := c.GetConsoleOutputRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opGetPasswordData = "GetPasswordData"
-
-// GetPasswordDataRequest generates a request for the GetPasswordData operation.
-func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request.Request, output *GetPasswordDataOutput) {
- op := &request.Operation{
- Name: opGetPasswordData,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetPasswordDataInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &GetPasswordDataOutput{}
- req.Data = output
- return
-}
-
-// Retrieves the encrypted administrator password for an instance running Windows.
-//
-// The Windows password is generated at boot if the EC2Config service plugin,
-// Ec2SetPassword, is enabled. This usually only happens the first time an AMI
-// is launched, and then Ec2SetPassword is automatically disabled. The password
-// is not generated for rebundled AMIs unless Ec2SetPassword is enabled before
-// bundling.
-//
-// The password is encrypted using the key pair that you specified when you
-// launched the instance. You must provide the corresponding key pair file.
-//
-// Password generation and encryption takes a few moments. We recommend that
-// you wait up to 15 minutes after launching an instance before trying to retrieve
-// the generated password.
-func (c *EC2) GetPasswordData(input *GetPasswordDataInput) (*GetPasswordDataOutput, error) {
- req, out := c.GetPasswordDataRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opImportImage = "ImportImage"
-
-// ImportImageRequest generates a request for the ImportImage operation.
-func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request, output *ImportImageOutput) {
- op := &request.Operation{
- Name: opImportImage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ImportImageInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ImportImageOutput{}
- req.Data = output
- return
-}
-
-// Import single or multi-volume disk images or EBS snapshots into an Amazon
-// Machine Image (AMI).
-func (c *EC2) ImportImage(input *ImportImageInput) (*ImportImageOutput, error) {
- req, out := c.ImportImageRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opImportInstance = "ImportInstance"
-
-// ImportInstanceRequest generates a request for the ImportInstance operation.
-func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *request.Request, output *ImportInstanceOutput) {
- op := &request.Operation{
- Name: opImportInstance,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ImportInstanceInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ImportInstanceOutput{}
- req.Data = output
- return
-}
-
-// Creates an import instance task using metadata from the specified disk image.
-// ImportInstance only supports single-volume VMs. To import multi-volume VMs,
-// use ImportImage. After importing the image, you then upload it using the
-// ec2-import-volume command in the EC2 command line tools. For more information,
-// see Using the Command Line Tools to Import Your Virtual Machine to Amazon
-// EC2 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UploadingYourInstancesandVolumes.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) ImportInstance(input *ImportInstanceInput) (*ImportInstanceOutput, error) {
- req, out := c.ImportInstanceRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opImportKeyPair = "ImportKeyPair"
-
-// ImportKeyPairRequest generates a request for the ImportKeyPair operation.
-func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) {
- op := &request.Operation{
- Name: opImportKeyPair,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ImportKeyPairInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ImportKeyPairOutput{}
- req.Data = output
- return
-}
-
-// Imports the public key from an RSA key pair that you created with a third-party
-// tool. Compare this with CreateKeyPair, in which AWS creates the key pair
-// and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair,
-// you create the key pair and give AWS just the public key. The private key
-// is never transferred between you and AWS.
-//
-// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) {
- req, out := c.ImportKeyPairRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opImportSnapshot = "ImportSnapshot"
-
-// ImportSnapshotRequest generates a request for the ImportSnapshot operation.
-func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *request.Request, output *ImportSnapshotOutput) {
- op := &request.Operation{
- Name: opImportSnapshot,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ImportSnapshotInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ImportSnapshotOutput{}
- req.Data = output
- return
-}
-
-// Imports a disk into an EBS snapshot.
-func (c *EC2) ImportSnapshot(input *ImportSnapshotInput) (*ImportSnapshotOutput, error) {
- req, out := c.ImportSnapshotRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opImportVolume = "ImportVolume"
-
-// ImportVolumeRequest generates a request for the ImportVolume operation.
-func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *request.Request, output *ImportVolumeOutput) {
- op := &request.Operation{
- Name: opImportVolume,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ImportVolumeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ImportVolumeOutput{}
- req.Data = output
- return
-}
-
-// Creates an import volume task using metadata from the specified disk image.
-// After importing the image, you then upload it using the ec2-import-volume
-// command in the Amazon EC2 command-line interface (CLI) tools. For more information,
-// see Using the Command Line Tools to Import Your Virtual Machine to Amazon
-// EC2 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UploadingYourInstancesandVolumes.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) ImportVolume(input *ImportVolumeInput) (*ImportVolumeOutput, error) {
- req, out := c.ImportVolumeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifyImageAttribute = "ModifyImageAttribute"
-
-// ModifyImageAttributeRequest generates a request for the ModifyImageAttribute operation.
-func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req *request.Request, output *ModifyImageAttributeOutput) {
- op := &request.Operation{
- Name: opModifyImageAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifyImageAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifyImageAttributeOutput{}
- req.Data = output
- return
-}
-
-// Modifies the specified attribute of the specified AMI. You can specify only
-// one attribute at a time.
-//
-// AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace
-// product code cannot be made public.
-func (c *EC2) ModifyImageAttribute(input *ModifyImageAttributeInput) (*ModifyImageAttributeOutput, error) {
- req, out := c.ModifyImageAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifyInstanceAttribute = "ModifyInstanceAttribute"
-
-// ModifyInstanceAttributeRequest generates a request for the ModifyInstanceAttribute operation.
-func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput) (req *request.Request, output *ModifyInstanceAttributeOutput) {
- op := &request.Operation{
- Name: opModifyInstanceAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifyInstanceAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifyInstanceAttributeOutput{}
- req.Data = output
- return
-}
-
-// Modifies the specified attribute of the specified instance. You can specify
-// only one attribute at a time.
-//
-// To modify some attributes, the instance must be stopped. For more information,
-// see Modifying Attributes of a Stopped Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) ModifyInstanceAttribute(input *ModifyInstanceAttributeInput) (*ModifyInstanceAttributeOutput, error) {
- req, out := c.ModifyInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute"
-
-// ModifyNetworkInterfaceAttributeRequest generates a request for the ModifyNetworkInterfaceAttribute operation.
-func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfaceAttributeInput) (req *request.Request, output *ModifyNetworkInterfaceAttributeOutput) {
- op := &request.Operation{
- Name: opModifyNetworkInterfaceAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifyNetworkInterfaceAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifyNetworkInterfaceAttributeOutput{}
- req.Data = output
- return
-}
-
-// Modifies the specified network interface attribute. You can specify only
-// one attribute at a time.
-func (c *EC2) ModifyNetworkInterfaceAttribute(input *ModifyNetworkInterfaceAttributeInput) (*ModifyNetworkInterfaceAttributeOutput, error) {
- req, out := c.ModifyNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifyReservedInstances = "ModifyReservedInstances"
-
-// ModifyReservedInstancesRequest generates a request for the ModifyReservedInstances operation.
-func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput) (req *request.Request, output *ModifyReservedInstancesOutput) {
- op := &request.Operation{
- Name: opModifyReservedInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifyReservedInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifyReservedInstancesOutput{}
- req.Data = output
- return
-}
-
-// Modifies the Availability Zone, instance count, instance type, or network
-// platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved
-// Instances to be modified must be identical, except for Availability Zone,
-// network platform, and instance type.
-//
-// For more information, see Modifying Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) ModifyReservedInstances(input *ModifyReservedInstancesInput) (*ModifyReservedInstancesOutput, error) {
- req, out := c.ModifyReservedInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifySnapshotAttribute = "ModifySnapshotAttribute"
-
-// ModifySnapshotAttributeRequest generates a request for the ModifySnapshotAttribute operation.
-func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput) (req *request.Request, output *ModifySnapshotAttributeOutput) {
- op := &request.Operation{
- Name: opModifySnapshotAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifySnapshotAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifySnapshotAttributeOutput{}
- req.Data = output
- return
-}
-
-// Adds or removes permission settings for the specified snapshot. You may add
-// or remove specified AWS account IDs from a snapshot's list of create volume
-// permissions, but you cannot do both in a single API call. If you need to
-// both add and remove account IDs for a snapshot, you must use multiple API
-// calls.
-//
-// For more information on modifying snapshot permissions, see Sharing Snapshots
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// Snapshots with AWS Marketplace product codes cannot be made public.
-func (c *EC2) ModifySnapshotAttribute(input *ModifySnapshotAttributeInput) (*ModifySnapshotAttributeOutput, error) {
- req, out := c.ModifySnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifySpotFleetRequest = "ModifySpotFleetRequest"
-
-// ModifySpotFleetRequestRequest generates a request for the ModifySpotFleetRequest operation.
-func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput) (req *request.Request, output *ModifySpotFleetRequestOutput) {
- op := &request.Operation{
- Name: opModifySpotFleetRequest,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifySpotFleetRequestInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifySpotFleetRequestOutput{}
- req.Data = output
- return
-}
-
-// Modifies the specified Spot fleet request.
-//
-// While the Spot fleet request is being modified, it is in the modifying state.
-//
-// To scale up your Spot fleet, increase its target capacity. The Spot fleet
-// launches the additional Spot instances according to the allocation strategy
-// for the Spot fleet request. If the allocation strategy is lowestPrice, the
-// Spot fleet launches instances using the Spot pool with the lowest price.
-// If the allocation strategy is diversified, the Spot fleet distributes the
-// instances across the Spot pools.
-//
-// To scale down your Spot fleet, decrease its target capacity. First, the
-// Spot fleet cancels any open bids that exceed the new target capacity. You
-// can request that the Spot fleet terminate Spot instances until the size of
-// the fleet no longer exceeds the new target capacity. If the allocation strategy
-// is lowestPrice, the Spot fleet terminates the instances with the highest
-// price per unit. If the allocation strategy is diversified, the Spot fleet
-// terminates instances across the Spot pools. Alternatively, you can request
-// that the Spot fleet keep the fleet at its current size, but not replace any
-// Spot instances that are interrupted or that you terminate manually.
-func (c *EC2) ModifySpotFleetRequest(input *ModifySpotFleetRequestInput) (*ModifySpotFleetRequestOutput, error) {
- req, out := c.ModifySpotFleetRequestRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifySubnetAttribute = "ModifySubnetAttribute"
-
-// ModifySubnetAttributeRequest generates a request for the ModifySubnetAttribute operation.
-func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (req *request.Request, output *ModifySubnetAttributeOutput) {
- op := &request.Operation{
- Name: opModifySubnetAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifySubnetAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifySubnetAttributeOutput{}
- req.Data = output
- return
-}
-
-// Modifies a subnet attribute.
-func (c *EC2) ModifySubnetAttribute(input *ModifySubnetAttributeInput) (*ModifySubnetAttributeOutput, error) {
- req, out := c.ModifySubnetAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifyVolumeAttribute = "ModifyVolumeAttribute"
-
-// ModifyVolumeAttributeRequest generates a request for the ModifyVolumeAttribute operation.
-func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (req *request.Request, output *ModifyVolumeAttributeOutput) {
- op := &request.Operation{
- Name: opModifyVolumeAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifyVolumeAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifyVolumeAttributeOutput{}
- req.Data = output
- return
-}
-
-// Modifies a volume attribute.
-//
-// By default, all I/O operations for the volume are suspended when the data
-// on the volume is determined to be potentially inconsistent, to prevent undetectable,
-// latent data corruption. The I/O access to the volume can be resumed by first
-// enabling I/O access and then checking the data consistency on your volume.
-//
-// You can change the default behavior to resume I/O operations. We recommend
-// that you change this only for boot volumes or for volumes that are stateless
-// or disposable.
-func (c *EC2) ModifyVolumeAttribute(input *ModifyVolumeAttributeInput) (*ModifyVolumeAttributeOutput, error) {
- req, out := c.ModifyVolumeAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifyVpcAttribute = "ModifyVpcAttribute"
-
-// ModifyVpcAttributeRequest generates a request for the ModifyVpcAttribute operation.
-func (c *EC2) ModifyVpcAttributeRequest(input *ModifyVpcAttributeInput) (req *request.Request, output *ModifyVpcAttributeOutput) {
- op := &request.Operation{
- Name: opModifyVpcAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifyVpcAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifyVpcAttributeOutput{}
- req.Data = output
- return
-}
-
-// Modifies the specified attribute of the specified VPC.
-func (c *EC2) ModifyVpcAttribute(input *ModifyVpcAttributeInput) (*ModifyVpcAttributeOutput, error) {
- req, out := c.ModifyVpcAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opModifyVpcEndpoint = "ModifyVpcEndpoint"
-
-// ModifyVpcEndpointRequest generates a request for the ModifyVpcEndpoint operation.
-func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *request.Request, output *ModifyVpcEndpointOutput) {
- op := &request.Operation{
- Name: opModifyVpcEndpoint,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ModifyVpcEndpointInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ModifyVpcEndpointOutput{}
- req.Data = output
- return
-}
-
-// Modifies attributes of a specified VPC endpoint. You can modify the policy
-// associated with the endpoint, and you can add and remove route tables associated
-// with the endpoint.
-func (c *EC2) ModifyVpcEndpoint(input *ModifyVpcEndpointInput) (*ModifyVpcEndpointOutput, error) {
- req, out := c.ModifyVpcEndpointRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opMonitorInstances = "MonitorInstances"
-
-// MonitorInstancesRequest generates a request for the MonitorInstances operation.
-func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *request.Request, output *MonitorInstancesOutput) {
- op := &request.Operation{
- Name: opMonitorInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &MonitorInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &MonitorInstancesOutput{}
- req.Data = output
- return
-}
-
-// Enables monitoring for a running instance. For more information about monitoring
-// instances, see Monitoring Your Instances and Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) MonitorInstances(input *MonitorInstancesInput) (*MonitorInstancesOutput, error) {
- req, out := c.MonitorInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opMoveAddressToVpc = "MoveAddressToVpc"
-
-// MoveAddressToVpcRequest generates a request for the MoveAddressToVpc operation.
-func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *request.Request, output *MoveAddressToVpcOutput) {
- op := &request.Operation{
- Name: opMoveAddressToVpc,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &MoveAddressToVpcInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &MoveAddressToVpcOutput{}
- req.Data = output
- return
-}
-
-// Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC
-// platform. The Elastic IP address must be allocated to your account, and it
-// must not be associated with an instance. After the Elastic IP address is
-// moved, it is no longer available for use in the EC2-Classic platform, unless
-// you move it back using the RestoreAddressToClassic request. You cannot move
-// an Elastic IP address that's allocated for use in the EC2-VPC platform to
-// the EC2-Classic platform.
-func (c *EC2) MoveAddressToVpc(input *MoveAddressToVpcInput) (*MoveAddressToVpcOutput, error) {
- req, out := c.MoveAddressToVpcRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering"
-
-// PurchaseReservedInstancesOfferingRequest generates a request for the PurchaseReservedInstancesOffering operation.
-func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedInstancesOfferingInput) (req *request.Request, output *PurchaseReservedInstancesOfferingOutput) {
- op := &request.Operation{
- Name: opPurchaseReservedInstancesOffering,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &PurchaseReservedInstancesOfferingInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &PurchaseReservedInstancesOfferingOutput{}
- req.Data = output
- return
-}
-
-// Purchases a Reserved Instance for use with your account. With Amazon EC2
-// Reserved Instances, you obtain a capacity reservation for a certain instance
-// configuration over a specified period of time and pay a lower hourly rate
-// compared to on-Demand Instance pricing.
-//
-// Use DescribeReservedInstancesOfferings to get a list of Reserved Instance
-// offerings that match your specifications. After you've purchased a Reserved
-// Instance, you can check for your new Reserved Instance with DescribeReservedInstances.
-//
-// For more information, see Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html)
-// and Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) PurchaseReservedInstancesOffering(input *PurchaseReservedInstancesOfferingInput) (*PurchaseReservedInstancesOfferingOutput, error) {
- req, out := c.PurchaseReservedInstancesOfferingRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRebootInstances = "RebootInstances"
-
-// RebootInstancesRequest generates a request for the RebootInstances operation.
-func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request.Request, output *RebootInstancesOutput) {
- op := &request.Operation{
- Name: opRebootInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RebootInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &RebootInstancesOutput{}
- req.Data = output
- return
-}
-
-// Requests a reboot of one or more instances. This operation is asynchronous;
-// it only queues a request to reboot the specified instances. The operation
-// succeeds if the instances are valid and belong to you. Requests to reboot
-// terminated instances are ignored.
-//
-// If a Linux/Unix instance does not cleanly shut down within four minutes,
-// Amazon EC2 performs a hard reboot.
-//
-// For more information about troubleshooting, see Getting Console Output and
-// Rebooting Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) RebootInstances(input *RebootInstancesInput) (*RebootInstancesOutput, error) {
- req, out := c.RebootInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRegisterImage = "RegisterImage"
-
-// RegisterImageRequest generates a request for the RegisterImage operation.
-func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Request, output *RegisterImageOutput) {
- op := &request.Operation{
- Name: opRegisterImage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RegisterImageInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &RegisterImageOutput{}
- req.Data = output
- return
-}
-
-// Registers an AMI. When you're creating an AMI, this is the final step you
-// must complete before you can launch an instance from the AMI. For more information
-// about creating AMIs, see Creating Your Own AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// For Amazon EBS-backed instances, CreateImage creates and registers the AMI
-// in a single request, so you don't have to register the AMI yourself.
-//
-// You can also use RegisterImage to create an Amazon EBS-backed Linux AMI
-// from a snapshot of a root device volume. For more information, see Launching
-// an Instance from a Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_LaunchingInstanceFromSnapshot.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE
-// Linux Enterprise Server (SLES), use the EC2 billingProduct code associated
-// with an AMI to verify subscription status for package updates. Creating an
-// AMI from an EBS snapshot does not maintain this billing code, and subsequent
-// instances launched from such an AMI will not be able to connect to package
-// update infrastructure.
-//
-// Similarly, although you can create a Windows AMI from a snapshot, you can't
-// successfully launch an instance from the AMI.
-//
-// To create Windows AMIs or to create AMIs for Linux operating systems that
-// must retain AMI billing codes to work properly, see CreateImage.
-//
-// If needed, you can deregister an AMI at any time. Any modifications you
-// make to an AMI backed by an instance store volume invalidates its registration.
-// If you make changes to an image, deregister the previous image and register
-// the new image.
-//
-// You can't register an image where a secondary (non-root) snapshot has AWS
-// Marketplace product codes.
-func (c *EC2) RegisterImage(input *RegisterImageInput) (*RegisterImageOutput, error) {
- req, out := c.RegisterImageRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection"
-
-// RejectVpcPeeringConnectionRequest generates a request for the RejectVpcPeeringConnection operation.
-func (c *EC2) RejectVpcPeeringConnectionRequest(input *RejectVpcPeeringConnectionInput) (req *request.Request, output *RejectVpcPeeringConnectionOutput) {
- op := &request.Operation{
- Name: opRejectVpcPeeringConnection,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RejectVpcPeeringConnectionInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &RejectVpcPeeringConnectionOutput{}
- req.Data = output
- return
-}
-
-// Rejects a VPC peering connection request. The VPC peering connection must
-// be in the pending-acceptance state. Use the DescribeVpcPeeringConnections
-// request to view your outstanding VPC peering connection requests. To delete
-// an active VPC peering connection, or to delete a VPC peering connection request
-// that you initiated, use DeleteVpcPeeringConnection.
-func (c *EC2) RejectVpcPeeringConnection(input *RejectVpcPeeringConnectionInput) (*RejectVpcPeeringConnectionOutput, error) {
- req, out := c.RejectVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opReleaseAddress = "ReleaseAddress"
-
-// ReleaseAddressRequest generates a request for the ReleaseAddress operation.
-func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Request, output *ReleaseAddressOutput) {
- op := &request.Operation{
- Name: opReleaseAddress,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ReleaseAddressInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ReleaseAddressOutput{}
- req.Data = output
- return
-}
-
-// Releases the specified Elastic IP address.
-//
-// After releasing an Elastic IP address, it is released to the IP address
-// pool and might be unavailable to you. Be sure to update your DNS records
-// and any servers or devices that communicate with the address. If you attempt
-// to release an Elastic IP address that you already released, you'll get an
-// AuthFailure error if the address is already allocated to another AWS account.
-//
-// [EC2-Classic, default VPC] Releasing an Elastic IP address automatically
-// disassociates it from any instance that it's associated with. To disassociate
-// an Elastic IP address without releasing it, use DisassociateAddress.
-//
-// [Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic
-// IP address before you try to release it. Otherwise, Amazon EC2 returns an
-// error (InvalidIPAddress.InUse).
-func (c *EC2) ReleaseAddress(input *ReleaseAddressInput) (*ReleaseAddressOutput, error) {
- req, out := c.ReleaseAddressRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation"
-
-// ReplaceNetworkAclAssociationRequest generates a request for the ReplaceNetworkAclAssociation operation.
-func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssociationInput) (req *request.Request, output *ReplaceNetworkAclAssociationOutput) {
- op := &request.Operation{
- Name: opReplaceNetworkAclAssociation,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ReplaceNetworkAclAssociationInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ReplaceNetworkAclAssociationOutput{}
- req.Data = output
- return
-}
-
-// Changes which network ACL a subnet is associated with. By default when you
-// create a subnet, it's automatically associated with the default network ACL.
-// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) ReplaceNetworkAclAssociation(input *ReplaceNetworkAclAssociationInput) (*ReplaceNetworkAclAssociationOutput, error) {
- req, out := c.ReplaceNetworkAclAssociationRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry"
-
-// ReplaceNetworkAclEntryRequest generates a request for the ReplaceNetworkAclEntry operation.
-func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput) (req *request.Request, output *ReplaceNetworkAclEntryOutput) {
- op := &request.Operation{
- Name: opReplaceNetworkAclEntry,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ReplaceNetworkAclEntryInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ReplaceNetworkAclEntryOutput{}
- req.Data = output
- return
-}
-
-// Replaces an entry (rule) in a network ACL. For more information about network
-// ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) ReplaceNetworkAclEntry(input *ReplaceNetworkAclEntryInput) (*ReplaceNetworkAclEntryOutput, error) {
- req, out := c.ReplaceNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opReplaceRoute = "ReplaceRoute"
-
-// ReplaceRouteRequest generates a request for the ReplaceRoute operation.
-func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Request, output *ReplaceRouteOutput) {
- op := &request.Operation{
- Name: opReplaceRoute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ReplaceRouteInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ReplaceRouteOutput{}
- req.Data = output
- return
-}
-
-// Replaces an existing route within a route table in a VPC. You must provide
-// only one of the following: Internet gateway or virtual private gateway, NAT
-// instance, VPC peering connection, or network interface.
-//
-// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) ReplaceRoute(input *ReplaceRouteInput) (*ReplaceRouteOutput, error) {
- req, out := c.ReplaceRouteRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation"
-
-// ReplaceRouteTableAssociationRequest generates a request for the ReplaceRouteTableAssociation operation.
-func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssociationInput) (req *request.Request, output *ReplaceRouteTableAssociationOutput) {
- op := &request.Operation{
- Name: opReplaceRouteTableAssociation,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ReplaceRouteTableAssociationInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ReplaceRouteTableAssociationOutput{}
- req.Data = output
- return
-}
-
-// Changes the route table associated with a given subnet in a VPC. After the
-// operation completes, the subnet uses the routes in the new route table it's
-// associated with. For more information about route tables, see Route Tables
-// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
-// in the Amazon Virtual Private Cloud User Guide.
-//
-// You can also use ReplaceRouteTableAssociation to change which table is the
-// main route table in the VPC. You just specify the main route table's association
-// ID and the route table to be the new main route table.
-func (c *EC2) ReplaceRouteTableAssociation(input *ReplaceRouteTableAssociationInput) (*ReplaceRouteTableAssociationOutput, error) {
- req, out := c.ReplaceRouteTableAssociationRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opReportInstanceStatus = "ReportInstanceStatus"
-
-// ReportInstanceStatusRequest generates a request for the ReportInstanceStatus operation.
-func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req *request.Request, output *ReportInstanceStatusOutput) {
- op := &request.Operation{
- Name: opReportInstanceStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ReportInstanceStatusInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ReportInstanceStatusOutput{}
- req.Data = output
- return
-}
-
-// Submits feedback about the status of an instance. The instance must be in
-// the running state. If your experience with the instance differs from the
-// instance status returned by DescribeInstanceStatus, use ReportInstanceStatus
-// to report your experience with the instance. Amazon EC2 collects this information
-// to improve the accuracy of status checks.
-//
-// Use of this action does not change the value returned by DescribeInstanceStatus.
-func (c *EC2) ReportInstanceStatus(input *ReportInstanceStatusInput) (*ReportInstanceStatusOutput, error) {
- req, out := c.ReportInstanceStatusRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRequestSpotFleet = "RequestSpotFleet"
-
-// RequestSpotFleetRequest generates a request for the RequestSpotFleet operation.
-func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *request.Request, output *RequestSpotFleetOutput) {
- op := &request.Operation{
- Name: opRequestSpotFleet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RequestSpotFleetInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &RequestSpotFleetOutput{}
- req.Data = output
- return
-}
-
-// Creates a Spot fleet request.
-//
-// You can submit a single request that includes multiple launch specifications
-// that vary by instance type, AMI, Availability Zone, or subnet.
-//
-// By default, the Spot fleet requests Spot instances in the Spot pool where
-// the price per unit is the lowest. Each launch specification can include its
-// own instance weighting that reflects the value of the instance type to your
-// application workload.
-//
-// Alternatively, you can specify that the Spot fleet distribute the target
-// capacity across the Spot pools included in its launch specifications. By
-// ensuring that the Spot instances in your Spot fleet are in different Spot
-// pools, you can improve the availability of your fleet.
-//
-// For more information, see Spot Fleet Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) RequestSpotFleet(input *RequestSpotFleetInput) (*RequestSpotFleetOutput, error) {
- req, out := c.RequestSpotFleetRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRequestSpotInstances = "RequestSpotInstances"
-
-// RequestSpotInstancesRequest generates a request for the RequestSpotInstances operation.
-func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req *request.Request, output *RequestSpotInstancesOutput) {
- op := &request.Operation{
- Name: opRequestSpotInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RequestSpotInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &RequestSpotInstancesOutput{}
- req.Data = output
- return
-}
-
-// Creates a Spot instance request. Spot instances are instances that Amazon
-// EC2 launches when the bid price that you specify exceeds the current Spot
-// price. Amazon EC2 periodically sets the Spot price based on available Spot
-// Instance capacity and current Spot instance requests. For more information,
-// see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) RequestSpotInstances(input *RequestSpotInstancesInput) (*RequestSpotInstancesOutput, error) {
- req, out := c.RequestSpotInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opResetImageAttribute = "ResetImageAttribute"
-
-// ResetImageAttributeRequest generates a request for the ResetImageAttribute operation.
-func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *request.Request, output *ResetImageAttributeOutput) {
- op := &request.Operation{
- Name: opResetImageAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ResetImageAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ResetImageAttributeOutput{}
- req.Data = output
- return
-}
-
-// Resets an attribute of an AMI to its default value.
-//
-// The productCodes attribute can't be reset.
-func (c *EC2) ResetImageAttribute(input *ResetImageAttributeInput) (*ResetImageAttributeOutput, error) {
- req, out := c.ResetImageAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opResetInstanceAttribute = "ResetInstanceAttribute"
-
-// ResetInstanceAttributeRequest generates a request for the ResetInstanceAttribute operation.
-func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput) (req *request.Request, output *ResetInstanceAttributeOutput) {
- op := &request.Operation{
- Name: opResetInstanceAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ResetInstanceAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ResetInstanceAttributeOutput{}
- req.Data = output
- return
-}
-
-// Resets an attribute of an instance to its default value. To reset the kernel
-// or ramdisk, the instance must be in a stopped state. To reset the SourceDestCheck,
-// the instance can be either running or stopped.
-//
-// The SourceDestCheck attribute controls whether source/destination checking
-// is enabled. The default value is true, which means checking is enabled. This
-// value must be false for a NAT instance to perform NAT. For more information,
-// see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
-// in the Amazon Virtual Private Cloud User Guide.
-func (c *EC2) ResetInstanceAttribute(input *ResetInstanceAttributeInput) (*ResetInstanceAttributeOutput, error) {
- req, out := c.ResetInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute"
-
-// ResetNetworkInterfaceAttributeRequest generates a request for the ResetNetworkInterfaceAttribute operation.
-func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterfaceAttributeInput) (req *request.Request, output *ResetNetworkInterfaceAttributeOutput) {
- op := &request.Operation{
- Name: opResetNetworkInterfaceAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ResetNetworkInterfaceAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ResetNetworkInterfaceAttributeOutput{}
- req.Data = output
- return
-}
-
-// Resets a network interface attribute. You can specify only one attribute
-// at a time.
-func (c *EC2) ResetNetworkInterfaceAttribute(input *ResetNetworkInterfaceAttributeInput) (*ResetNetworkInterfaceAttributeOutput, error) {
- req, out := c.ResetNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opResetSnapshotAttribute = "ResetSnapshotAttribute"
-
-// ResetSnapshotAttributeRequest generates a request for the ResetSnapshotAttribute operation.
-func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) (req *request.Request, output *ResetSnapshotAttributeOutput) {
- op := &request.Operation{
- Name: opResetSnapshotAttribute,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ResetSnapshotAttributeInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &ResetSnapshotAttributeOutput{}
- req.Data = output
- return
-}
-
-// Resets permission settings for the specified snapshot.
-//
-// For more information on modifying snapshot permissions, see Sharing Snapshots
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) ResetSnapshotAttribute(input *ResetSnapshotAttributeInput) (*ResetSnapshotAttributeOutput, error) {
- req, out := c.ResetSnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRestoreAddressToClassic = "RestoreAddressToClassic"
-
-// RestoreAddressToClassicRequest generates a request for the RestoreAddressToClassic operation.
-func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput) (req *request.Request, output *RestoreAddressToClassicOutput) {
- op := &request.Operation{
- Name: opRestoreAddressToClassic,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RestoreAddressToClassicInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &RestoreAddressToClassicOutput{}
- req.Data = output
- return
-}
-
-// Restores an Elastic IP address that was previously moved to the EC2-VPC platform
-// back to the EC2-Classic platform. You cannot move an Elastic IP address that
-// was originally allocated for use in EC2-VPC. The Elastic IP address must
-// not be associated with an instance or network interface.
-func (c *EC2) RestoreAddressToClassic(input *RestoreAddressToClassicInput) (*RestoreAddressToClassicOutput, error) {
- req, out := c.RestoreAddressToClassicRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress"
-
-// RevokeSecurityGroupEgressRequest generates a request for the RevokeSecurityGroupEgress operation.
-func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressInput) (req *request.Request, output *RevokeSecurityGroupEgressOutput) {
- op := &request.Operation{
- Name: opRevokeSecurityGroupEgress,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RevokeSecurityGroupEgressInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &RevokeSecurityGroupEgressOutput{}
- req.Data = output
- return
-}
-
-// Removes one or more egress rules from a security group for EC2-VPC. The values
-// that you specify in the revoke request (for example, ports) must match the
-// existing rule's values for the rule to be revoked.
-//
-// Each rule consists of the protocol and the CIDR range or source security
-// group. For the TCP and UDP protocols, you must also specify the destination
-// port or range of ports. For the ICMP protocol, you must also specify the
-// ICMP type and code.
-//
-// Rule changes are propagated to instances within the security group as quickly
-// as possible. However, a small delay might occur.
-func (c *EC2) RevokeSecurityGroupEgress(input *RevokeSecurityGroupEgressInput) (*RevokeSecurityGroupEgressOutput, error) {
- req, out := c.RevokeSecurityGroupEgressRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress"
-
-// RevokeSecurityGroupIngressRequest generates a request for the RevokeSecurityGroupIngress operation.
-func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngressInput) (req *request.Request, output *RevokeSecurityGroupIngressOutput) {
- op := &request.Operation{
- Name: opRevokeSecurityGroupIngress,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RevokeSecurityGroupIngressInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &RevokeSecurityGroupIngressOutput{}
- req.Data = output
- return
-}
-
-// Removes one or more ingress rules from a security group. The values that
-// you specify in the revoke request (for example, ports) must match the existing
-// rule's values for the rule to be removed.
-//
-// Each rule consists of the protocol and the CIDR range or source security
-// group. For the TCP and UDP protocols, you must also specify the destination
-// port or range of ports. For the ICMP protocol, you must also specify the
-// ICMP type and code.
-//
-// Rule changes are propagated to instances within the security group as quickly
-// as possible. However, a small delay might occur.
-func (c *EC2) RevokeSecurityGroupIngress(input *RevokeSecurityGroupIngressInput) (*RevokeSecurityGroupIngressOutput, error) {
- req, out := c.RevokeSecurityGroupIngressRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opRunInstances = "RunInstances"
-
-// RunInstancesRequest generates a request for the RunInstances operation.
-func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Request, output *Reservation) {
- op := &request.Operation{
- Name: opRunInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RunInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &Reservation{}
- req.Data = output
- return
-}
-
-// Launches the specified number of instances using an AMI for which you have
-// permissions.
-//
-// When you launch an instance, it enters the pending state. After the instance
-// is ready for you, it enters the running state. To check the state of your
-// instance, call DescribeInstances.
-//
-// If you don't specify a security group when launching an instance, Amazon
-// EC2 uses the default security group. For more information, see Security Groups
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// [EC2-VPC only accounts] If you don't specify a subnet in the request, we
-// choose a default subnet from your default VPC for you.
-//
-// [EC2-Classic accounts] If you're launching into EC2-Classic and you don't
-// specify an Availability Zone, we choose one for you.
-//
-// Linux instances have access to the public key of the key pair at boot. You
-// can use this key to provide secure access to the instance. Amazon EC2 public
-// images use this feature to provide secure access without passwords. For more
-// information, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// You can provide optional user data when launching an instance. For more
-// information, see Instance Metadata (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// If any of the AMIs have a product code attached for which the user has not
-// subscribed, RunInstances fails.
-//
-// T2 instance types can only be launched into a VPC. If you do not have a
-// default VPC, or if you do not specify a subnet ID in the request, RunInstances
-// fails.
-//
-// For more information about troubleshooting, see What To Do If An Instance
-// Immediately Terminates (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html),
-// and Troubleshooting Connecting to Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) RunInstances(input *RunInstancesInput) (*Reservation, error) {
- req, out := c.RunInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opStartInstances = "StartInstances"
-
-// StartInstancesRequest generates a request for the StartInstances operation.
-func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Request, output *StartInstancesOutput) {
- op := &request.Operation{
- Name: opStartInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &StartInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &StartInstancesOutput{}
- req.Data = output
- return
-}
-
-// Starts an Amazon EBS-backed AMI that you've previously stopped.
-//
-// Instances that use Amazon EBS volumes as their root devices can be quickly
-// stopped and started. When an instance is stopped, the compute resources are
-// released and you are not billed for hourly instance usage. However, your
-// root partition Amazon EBS volume remains, continues to persist your data,
-// and you are charged for Amazon EBS volume usage. You can restart your instance
-// at any time. Each time you transition an instance from stopped to started,
-// Amazon EC2 charges a full instance hour, even if transitions happen multiple
-// times within a single hour.
-//
-// Before stopping an instance, make sure it is in a state from which it can
-// be restarted. Stopping an instance does not preserve data stored in RAM.
-//
-// Performing this operation on an instance that uses an instance store as
-// its root device returns an error.
-//
-// For more information, see Stopping Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) StartInstances(input *StartInstancesInput) (*StartInstancesOutput, error) {
- req, out := c.StartInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opStopInstances = "StopInstances"
-
-// StopInstancesRequest generates a request for the StopInstances operation.
-func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Request, output *StopInstancesOutput) {
- op := &request.Operation{
- Name: opStopInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &StopInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &StopInstancesOutput{}
- req.Data = output
- return
-}
-
-// Stops an Amazon EBS-backed instance. Each time you transition an instance
-// from stopped to started, Amazon EC2 charges a full instance hour, even if
-// transitions happen multiple times within a single hour.
-//
-// You can't start or stop Spot Instances.
-//
-// Instances that use Amazon EBS volumes as their root devices can be quickly
-// stopped and started. When an instance is stopped, the compute resources are
-// released and you are not billed for hourly instance usage. However, your
-// root partition Amazon EBS volume remains, continues to persist your data,
-// and you are charged for Amazon EBS volume usage. You can restart your instance
-// at any time.
-//
-// Before stopping an instance, make sure it is in a state from which it can
-// be restarted. Stopping an instance does not preserve data stored in RAM.
-//
-// Performing this operation on an instance that uses an instance store as
-// its root device returns an error.
-//
-// You can stop, start, and terminate EBS-backed instances. You can only terminate
-// instance store-backed instances. What happens to an instance differs if you
-// stop it or terminate it. For example, when you stop an instance, the root
-// device and any other devices attached to the instance persist. When you terminate
-// an instance, the root device and any other devices attached during the instance
-// launch are automatically deleted. For more information about the differences
-// between stopping and terminating instances, see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// For more information about troubleshooting, see Troubleshooting Stopping
-// Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) StopInstances(input *StopInstancesInput) (*StopInstancesOutput, error) {
- req, out := c.StopInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opTerminateInstances = "TerminateInstances"
-
-// TerminateInstancesRequest generates a request for the TerminateInstances operation.
-func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *request.Request, output *TerminateInstancesOutput) {
- op := &request.Operation{
- Name: opTerminateInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &TerminateInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &TerminateInstancesOutput{}
- req.Data = output
- return
-}
-
-// Shuts down one or more instances. This operation is idempotent; if you terminate
-// an instance more than once, each call succeeds.
-//
-// Terminated instances remain visible after termination (for approximately
-// one hour).
-//
-// By default, Amazon EC2 deletes all EBS volumes that were attached when the
-// instance launched. Volumes attached after instance launch continue running.
-//
-// You can stop, start, and terminate EBS-backed instances. You can only terminate
-// instance store-backed instances. What happens to an instance differs if you
-// stop it or terminate it. For example, when you stop an instance, the root
-// device and any other devices attached to the instance persist. When you terminate
-// an instance, any attached EBS volumes with the DeleteOnTermination block
-// device mapping parameter set to true are automatically deleted. For more
-// information about the differences between stopping and terminating instances,
-// see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-//
-// For more information about troubleshooting, see Troubleshooting Terminating
-// Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) TerminateInstances(input *TerminateInstancesInput) (*TerminateInstancesOutput, error) {
- req, out := c.TerminateInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses"
-
-// UnassignPrivateIpAddressesRequest generates a request for the UnassignPrivateIpAddresses operation.
-func (c *EC2) UnassignPrivateIpAddressesRequest(input *UnassignPrivateIpAddressesInput) (req *request.Request, output *UnassignPrivateIpAddressesOutput) {
- op := &request.Operation{
- Name: opUnassignPrivateIpAddresses,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UnassignPrivateIpAddressesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &UnassignPrivateIpAddressesOutput{}
- req.Data = output
- return
-}
-
-// Unassigns one or more secondary private IP addresses from a network interface.
-func (c *EC2) UnassignPrivateIpAddresses(input *UnassignPrivateIpAddressesInput) (*UnassignPrivateIpAddressesOutput, error) {
- req, out := c.UnassignPrivateIpAddressesRequest(input)
- err := req.Send()
- return out, err
-}
-
-const opUnmonitorInstances = "UnmonitorInstances"
-
-// UnmonitorInstancesRequest generates a request for the UnmonitorInstances operation.
-func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *request.Request, output *UnmonitorInstancesOutput) {
- op := &request.Operation{
- Name: opUnmonitorInstances,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UnmonitorInstancesInput{}
- }
-
- req = c.newRequest(op, input, output)
- output = &UnmonitorInstancesOutput{}
- req.Data = output
- return
-}
-
-// Disables monitoring for a running instance. For more information about monitoring
-// instances, see Monitoring Your Instances and Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html)
-// in the Amazon Elastic Compute Cloud User Guide.
-func (c *EC2) UnmonitorInstances(input *UnmonitorInstancesInput) (*UnmonitorInstancesOutput, error) {
- req, out := c.UnmonitorInstancesRequest(input)
- err := req.Send()
- return out, err
-}
-
-type AcceptVpcPeeringConnectionInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC peering connection.
- VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"`
-
- metadataAcceptVpcPeeringConnectionInput `json:"-" xml:"-"`
-}
-
-type metadataAcceptVpcPeeringConnectionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AcceptVpcPeeringConnectionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AcceptVpcPeeringConnectionInput) GoString() string {
- return s.String()
-}
-
-type AcceptVpcPeeringConnectionOutput struct {
- // Information about the VPC peering connection.
- VpcPeeringConnection *VpcPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"`
-
- metadataAcceptVpcPeeringConnectionOutput `json:"-" xml:"-"`
-}
-
-type metadataAcceptVpcPeeringConnectionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AcceptVpcPeeringConnectionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AcceptVpcPeeringConnectionOutput) GoString() string {
- return s.String()
-}
-
-// Describes an account attribute.
-type AccountAttribute struct {
- // The name of the account attribute.
- AttributeName *string `locationName:"attributeName" type:"string"`
-
- // One or more values for the account attribute.
- AttributeValues []*AccountAttributeValue `locationName:"attributeValueSet" locationNameList:"item" type:"list"`
-
- metadataAccountAttribute `json:"-" xml:"-"`
-}
-
-type metadataAccountAttribute struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AccountAttribute) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccountAttribute) GoString() string {
- return s.String()
-}
-
-// Describes a value of an account attribute.
-type AccountAttributeValue struct {
- // The value of the attribute.
- AttributeValue *string `locationName:"attributeValue" type:"string"`
-
- metadataAccountAttributeValue `json:"-" xml:"-"`
-}
-
-type metadataAccountAttributeValue struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AccountAttributeValue) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccountAttributeValue) GoString() string {
- return s.String()
-}
-
-// Describes a running instance in a Spot fleet.
-type ActiveInstance struct {
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The instance type.
- InstanceType *string `locationName:"instanceType" type:"string"`
-
- // The ID of the Spot instance request.
- SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"`
-
- metadataActiveInstance `json:"-" xml:"-"`
-}
-
-type metadataActiveInstance struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ActiveInstance) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ActiveInstance) GoString() string {
- return s.String()
-}
-
-// Describes an Elastic IP address.
-type Address struct {
- // The ID representing the allocation of the address for use with EC2-VPC.
- AllocationId *string `locationName:"allocationId" type:"string"`
-
- // The ID representing the association of the address with an instance in a
- // VPC.
- AssociationId *string `locationName:"associationId" type:"string"`
-
- // Indicates whether this Elastic IP address is for use with instances in EC2-Classic
- // (standard) or instances in a VPC (vpc).
- Domain *string `locationName:"domain" type:"string" enum:"DomainType"`
-
- // The ID of the instance that the address is associated with (if any).
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // The ID of the AWS account that owns the network interface.
- NetworkInterfaceOwnerId *string `locationName:"networkInterfaceOwnerId" type:"string"`
-
- // The private IP address associated with the Elastic IP address.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // The Elastic IP address.
- PublicIp *string `locationName:"publicIp" type:"string"`
-
- metadataAddress `json:"-" xml:"-"`
-}
-
-type metadataAddress struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Address) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Address) GoString() string {
- return s.String()
-}
-
-type AllocateAddressInput struct {
- // Set to vpc to allocate the address for use with instances in a VPC.
- //
- // Default: The address is for use with instances in EC2-Classic.
- Domain *string `type:"string" enum:"DomainType"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataAllocateAddressInput `json:"-" xml:"-"`
-}
-
-type metadataAllocateAddressInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AllocateAddressInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AllocateAddressInput) GoString() string {
- return s.String()
-}
-
-type AllocateAddressOutput struct {
- // [EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic
- // IP address for use with instances in a VPC.
- AllocationId *string `locationName:"allocationId" type:"string"`
-
- // Indicates whether this Elastic IP address is for use with instances in EC2-Classic
- // (standard) or instances in a VPC (vpc).
- Domain *string `locationName:"domain" type:"string" enum:"DomainType"`
-
- // The Elastic IP address.
- PublicIp *string `locationName:"publicIp" type:"string"`
-
- metadataAllocateAddressOutput `json:"-" xml:"-"`
-}
-
-type metadataAllocateAddressOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AllocateAddressOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AllocateAddressOutput) GoString() string {
- return s.String()
-}
-
-type AssignPrivateIpAddressesInput struct {
- // Indicates whether to allow an IP address that is already assigned to another
- // network interface or instance to be reassigned to the specified network interface.
- AllowReassignment *bool `locationName:"allowReassignment" type:"boolean"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"`
-
- // One or more IP addresses to be assigned as a secondary private IP address
- // to the network interface. You can't specify this parameter when also specifying
- // a number of secondary IP addresses.
- //
- // If you don't specify an IP address, Amazon EC2 automatically selects an
- // IP address within the subnet range.
- PrivateIpAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list"`
-
- // The number of secondary IP addresses to assign to the network interface.
- // You can't specify this parameter when also specifying private IP addresses.
- SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"`
-
- metadataAssignPrivateIpAddressesInput `json:"-" xml:"-"`
-}
-
-type metadataAssignPrivateIpAddressesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssignPrivateIpAddressesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssignPrivateIpAddressesInput) GoString() string {
- return s.String()
-}
-
-type AssignPrivateIpAddressesOutput struct {
- metadataAssignPrivateIpAddressesOutput `json:"-" xml:"-"`
-}
-
-type metadataAssignPrivateIpAddressesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssignPrivateIpAddressesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssignPrivateIpAddressesOutput) GoString() string {
- return s.String()
-}
-
-type AssociateAddressInput struct {
- // [EC2-VPC] The allocation ID. This is required for EC2-VPC.
- AllocationId *string `type:"string"`
-
- // [EC2-VPC] Allows an Elastic IP address that is already associated with an
- // instance or network interface to be re-associated with the specified instance
- // or network interface. Otherwise, the operation fails.
- //
- // Default: false
- AllowReassociation *bool `locationName:"allowReassociation" type:"boolean"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you
- // can specify either the instance ID or the network interface ID, but not both.
- // The operation fails if you specify an instance ID unless exactly one network
- // interface is attached.
- InstanceId *string `type:"string"`
-
- // [EC2-VPC] The ID of the network interface. If the instance has more than
- // one network interface, you must specify a network interface ID.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // [EC2-VPC] The primary or secondary private IP address to associate with the
- // Elastic IP address. If no private IP address is specified, the Elastic IP
- // address is associated with the primary private IP address.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // The Elastic IP address. This is required for EC2-Classic.
- PublicIp *string `type:"string"`
-
- metadataAssociateAddressInput `json:"-" xml:"-"`
-}
-
-type metadataAssociateAddressInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssociateAddressInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssociateAddressInput) GoString() string {
- return s.String()
-}
-
-type AssociateAddressOutput struct {
- // [EC2-VPC] The ID that represents the association of the Elastic IP address
- // with an instance.
- AssociationId *string `locationName:"associationId" type:"string"`
-
- metadataAssociateAddressOutput `json:"-" xml:"-"`
-}
-
-type metadataAssociateAddressOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssociateAddressOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssociateAddressOutput) GoString() string {
- return s.String()
-}
-
-type AssociateDhcpOptionsInput struct {
- // The ID of the DHCP options set, or default to associate no DHCP options with
- // the VPC.
- DhcpOptionsId *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `type:"string" required:"true"`
-
- metadataAssociateDhcpOptionsInput `json:"-" xml:"-"`
-}
-
-type metadataAssociateDhcpOptionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssociateDhcpOptionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssociateDhcpOptionsInput) GoString() string {
- return s.String()
-}
-
-type AssociateDhcpOptionsOutput struct {
- metadataAssociateDhcpOptionsOutput `json:"-" xml:"-"`
-}
-
-type metadataAssociateDhcpOptionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssociateDhcpOptionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssociateDhcpOptionsOutput) GoString() string {
- return s.String()
-}
-
-type AssociateRouteTableInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the route table.
- RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"`
-
- // The ID of the subnet.
- SubnetId *string `locationName:"subnetId" type:"string" required:"true"`
-
- metadataAssociateRouteTableInput `json:"-" xml:"-"`
-}
-
-type metadataAssociateRouteTableInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssociateRouteTableInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssociateRouteTableInput) GoString() string {
- return s.String()
-}
-
-type AssociateRouteTableOutput struct {
- // The route table association ID (needed to disassociate the route table).
- AssociationId *string `locationName:"associationId" type:"string"`
-
- metadataAssociateRouteTableOutput `json:"-" xml:"-"`
-}
-
-type metadataAssociateRouteTableOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssociateRouteTableOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssociateRouteTableOutput) GoString() string {
- return s.String()
-}
-
-type AttachClassicLinkVpcInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of one or more of the VPC's security groups. You cannot specify security
- // groups from a different VPC.
- Groups []*string `locationName:"SecurityGroupId" locationNameList:"groupId" type:"list" required:"true"`
-
- // The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.
- InstanceId *string `locationName:"instanceId" type:"string" required:"true"`
-
- // The ID of a ClassicLink-enabled VPC.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataAttachClassicLinkVpcInput `json:"-" xml:"-"`
-}
-
-type metadataAttachClassicLinkVpcInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachClassicLinkVpcInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachClassicLinkVpcInput) GoString() string {
- return s.String()
-}
-
-type AttachClassicLinkVpcOutput struct {
- // Returns true if the request succeeds; otherwise, it returns an error.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataAttachClassicLinkVpcOutput `json:"-" xml:"-"`
-}
-
-type metadataAttachClassicLinkVpcOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachClassicLinkVpcOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachClassicLinkVpcOutput) GoString() string {
- return s.String()
-}
-
-type AttachInternetGatewayInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the Internet gateway.
- InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataAttachInternetGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataAttachInternetGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachInternetGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachInternetGatewayInput) GoString() string {
- return s.String()
-}
-
-type AttachInternetGatewayOutput struct {
- metadataAttachInternetGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataAttachInternetGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachInternetGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachInternetGatewayOutput) GoString() string {
- return s.String()
-}
-
-type AttachNetworkInterfaceInput struct {
- // The index of the device for the network interface attachment.
- DeviceIndex *int64 `locationName:"deviceIndex" type:"integer" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string" required:"true"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"`
-
- metadataAttachNetworkInterfaceInput `json:"-" xml:"-"`
-}
-
-type metadataAttachNetworkInterfaceInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachNetworkInterfaceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachNetworkInterfaceInput) GoString() string {
- return s.String()
-}
-
-type AttachNetworkInterfaceOutput struct {
- // The ID of the network interface attachment.
- AttachmentId *string `locationName:"attachmentId" type:"string"`
-
- metadataAttachNetworkInterfaceOutput `json:"-" xml:"-"`
-}
-
-type metadataAttachNetworkInterfaceOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachNetworkInterfaceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachNetworkInterfaceOutput) GoString() string {
- return s.String()
-}
-
-type AttachVolumeInput struct {
- // The device name to expose to the instance (for example, /dev/sdh or xvdh).
- Device *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance.
- InstanceId *string `type:"string" required:"true"`
-
- // The ID of the EBS volume. The volume and instance must be within the same
- // Availability Zone.
- VolumeId *string `type:"string" required:"true"`
-
- metadataAttachVolumeInput `json:"-" xml:"-"`
-}
-
-type metadataAttachVolumeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachVolumeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachVolumeInput) GoString() string {
- return s.String()
-}
-
-type AttachVpnGatewayInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `type:"string" required:"true"`
-
- // The ID of the virtual private gateway.
- VpnGatewayId *string `type:"string" required:"true"`
-
- metadataAttachVpnGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataAttachVpnGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachVpnGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachVpnGatewayInput) GoString() string {
- return s.String()
-}
-
-type AttachVpnGatewayOutput struct {
- // Information about the attachment.
- VpcAttachment *VpcAttachment `locationName:"attachment" type:"structure"`
-
- metadataAttachVpnGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataAttachVpnGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachVpnGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachVpnGatewayOutput) GoString() string {
- return s.String()
-}
-
-// The value to use when a resource attribute accepts a Boolean value.
-type AttributeBooleanValue struct {
- // Valid values are true or false.
- Value *bool `locationName:"value" type:"boolean"`
-
- metadataAttributeBooleanValue `json:"-" xml:"-"`
-}
-
-type metadataAttributeBooleanValue struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttributeBooleanValue) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttributeBooleanValue) GoString() string {
- return s.String()
-}
-
-// The value to use for a resource attribute.
-type AttributeValue struct {
- // Valid values are case-sensitive and vary by action.
- Value *string `locationName:"value" type:"string"`
-
- metadataAttributeValue `json:"-" xml:"-"`
-}
-
-type metadataAttributeValue struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttributeValue) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttributeValue) GoString() string {
- return s.String()
-}
-
-type AuthorizeSecurityGroupEgressInput struct {
- // The CIDR IP address range. You can't specify this parameter when specifying
- // a source security group.
- CidrIp *string `locationName:"cidrIp" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The start of port range for the TCP and UDP protocols, or an ICMP type number.
- // For the ICMP type number, use -1 to specify all ICMP types.
- FromPort *int64 `locationName:"fromPort" type:"integer"`
-
- // The ID of the security group.
- GroupId *string `locationName:"groupId" type:"string" required:"true"`
-
- // A set of IP permissions. You can't specify a destination security group and
- // a CIDR IP address range.
- IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"`
-
- // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
- // Use -1 to specify all.
- IpProtocol *string `locationName:"ipProtocol" type:"string"`
-
- // The name of a destination security group. To authorize outbound access to
- // a destination security group, we recommend that you use a set of IP permissions
- // instead.
- SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"`
-
- // The AWS account number for a destination security group. To authorize outbound
- // access to a destination security group, we recommend that you use a set of
- // IP permissions instead.
- SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"`
-
- // The end of port range for the TCP and UDP protocols, or an ICMP code number.
- // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
- ToPort *int64 `locationName:"toPort" type:"integer"`
-
- metadataAuthorizeSecurityGroupEgressInput `json:"-" xml:"-"`
-}
-
-type metadataAuthorizeSecurityGroupEgressInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AuthorizeSecurityGroupEgressInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AuthorizeSecurityGroupEgressInput) GoString() string {
- return s.String()
-}
-
-type AuthorizeSecurityGroupEgressOutput struct {
- metadataAuthorizeSecurityGroupEgressOutput `json:"-" xml:"-"`
-}
-
-type metadataAuthorizeSecurityGroupEgressOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AuthorizeSecurityGroupEgressOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AuthorizeSecurityGroupEgressOutput) GoString() string {
- return s.String()
-}
-
-type AuthorizeSecurityGroupIngressInput struct {
- // The CIDR IP address range. You can't specify this parameter when specifying
- // a source security group.
- CidrIp *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The start of port range for the TCP and UDP protocols, or an ICMP type number.
- // For the ICMP type number, use -1 to specify all ICMP types.
- FromPort *int64 `type:"integer"`
-
- // The ID of the security group. Required for a nondefault VPC.
- GroupId *string `type:"string"`
-
- // [EC2-Classic, default VPC] The name of the security group.
- GroupName *string `type:"string"`
-
- // A set of IP permissions. Can be used to specify multiple rules in a single
- // command.
- IpPermissions []*IpPermission `locationNameList:"item" type:"list"`
-
- // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
- // (VPC only) Use -1 to specify all.
- IpProtocol *string `type:"string"`
-
- // [EC2-Classic, default VPC] The name of the source security group. You can't
- // specify this parameter in combination with the following parameters: the
- // CIDR IP address range, the start of the port range, the IP protocol, and
- // the end of the port range. For EC2-VPC, the source security group must be
- // in the same VPC.
- SourceSecurityGroupName *string `type:"string"`
-
- // [EC2-Classic, default VPC] The AWS account number for the source security
- // group. For EC2-VPC, the source security group must be in the same VPC. You
- // can't specify this parameter in combination with the following parameters:
- // the CIDR IP address range, the IP protocol, the start of the port range,
- // and the end of the port range. Creates rules that grant full ICMP, UDP, and
- // TCP access. To create a rule with a specific IP protocol and port range,
- // use a set of IP permissions instead.
- SourceSecurityGroupOwnerId *string `type:"string"`
-
- // The end of port range for the TCP and UDP protocols, or an ICMP code number.
- // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
- ToPort *int64 `type:"integer"`
-
- metadataAuthorizeSecurityGroupIngressInput `json:"-" xml:"-"`
-}
-
-type metadataAuthorizeSecurityGroupIngressInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AuthorizeSecurityGroupIngressInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AuthorizeSecurityGroupIngressInput) GoString() string {
- return s.String()
-}
-
-type AuthorizeSecurityGroupIngressOutput struct {
- metadataAuthorizeSecurityGroupIngressOutput `json:"-" xml:"-"`
-}
-
-type metadataAuthorizeSecurityGroupIngressOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AuthorizeSecurityGroupIngressOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AuthorizeSecurityGroupIngressOutput) GoString() string {
- return s.String()
-}
-
-// Describes an Availability Zone.
-type AvailabilityZone struct {
- // Any messages about the Availability Zone.
- Messages []*AvailabilityZoneMessage `locationName:"messageSet" locationNameList:"item" type:"list"`
-
- // The name of the region.
- RegionName *string `locationName:"regionName" type:"string"`
-
- // The state of the Availability Zone.
- State *string `locationName:"zoneState" type:"string" enum:"AvailabilityZoneState"`
-
- // The name of the Availability Zone.
- ZoneName *string `locationName:"zoneName" type:"string"`
-
- metadataAvailabilityZone `json:"-" xml:"-"`
-}
-
-type metadataAvailabilityZone struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AvailabilityZone) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AvailabilityZone) GoString() string {
- return s.String()
-}
-
-// Describes a message about an Availability Zone.
-type AvailabilityZoneMessage struct {
- // The message about the Availability Zone.
- Message *string `locationName:"message" type:"string"`
-
- metadataAvailabilityZoneMessage `json:"-" xml:"-"`
-}
-
-type metadataAvailabilityZoneMessage struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s AvailabilityZoneMessage) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AvailabilityZoneMessage) GoString() string {
- return s.String()
-}
-
-type BlobAttributeValue struct {
- Value []byte `locationName:"value" type:"blob"`
-
- metadataBlobAttributeValue `json:"-" xml:"-"`
-}
-
-type metadataBlobAttributeValue struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s BlobAttributeValue) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BlobAttributeValue) GoString() string {
- return s.String()
-}
-
-// Describes a block device mapping.
-type BlockDeviceMapping struct {
- // The device name exposed to the instance (for example, /dev/sdh or xvdh).
- DeviceName *string `locationName:"deviceName" type:"string"`
-
- // Parameters used to automatically set up EBS volumes when the instance is
- // launched.
- Ebs *EbsBlockDevice `locationName:"ebs" type:"structure"`
-
- // Suppresses the specified device included in the block device mapping of the
- // AMI.
- NoDevice *string `locationName:"noDevice" type:"string"`
-
- // The virtual device name (ephemeralN). Instance store volumes are numbered
- // starting from 0. An instance type with 2 available instance store volumes
- // can specify mappings for ephemeral0 and ephemeral1.The number of available
- // instance store volumes depends on the instance type. After you connect to
- // the instance, you must mount the volume.
- //
- // Constraints: For M3 instances, you must specify instance store volumes in
- // the block device mapping for the instance. When you launch an M3 instance,
- // we ignore any instance store volumes specified in the block device mapping
- // for the AMI.
- VirtualName *string `locationName:"virtualName" type:"string"`
-
- metadataBlockDeviceMapping `json:"-" xml:"-"`
-}
-
-type metadataBlockDeviceMapping struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s BlockDeviceMapping) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BlockDeviceMapping) GoString() string {
- return s.String()
-}
-
-type BundleInstanceInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance to bundle.
- //
- // Type: String
- //
- // Default: None
- //
- // Required: Yes
- InstanceId *string `type:"string" required:"true"`
-
- // The bucket in which to store the AMI. You can specify a bucket that you already
- // own or a new bucket that Amazon EC2 creates on your behalf. If you specify
- // a bucket that belongs to someone else, Amazon EC2 returns an error.
- Storage *Storage `type:"structure" required:"true"`
-
- metadataBundleInstanceInput `json:"-" xml:"-"`
-}
-
-type metadataBundleInstanceInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s BundleInstanceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BundleInstanceInput) GoString() string {
- return s.String()
-}
-
-type BundleInstanceOutput struct {
- // Information about the bundle task.
- BundleTask *BundleTask `locationName:"bundleInstanceTask" type:"structure"`
-
- metadataBundleInstanceOutput `json:"-" xml:"-"`
-}
-
-type metadataBundleInstanceOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s BundleInstanceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BundleInstanceOutput) GoString() string {
- return s.String()
-}
-
-// Describes a bundle task.
-type BundleTask struct {
- // The ID of the bundle task.
- BundleId *string `locationName:"bundleId" type:"string"`
-
- // If the task fails, a description of the error.
- BundleTaskError *BundleTaskError `locationName:"error" type:"structure"`
-
- // The ID of the instance associated with this bundle task.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The level of task completion, as a percent (for example, 20%).
- Progress *string `locationName:"progress" type:"string"`
-
- // The time this task started.
- StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // The state of the task.
- State *string `locationName:"state" type:"string" enum:"BundleTaskState"`
-
- // The Amazon S3 storage locations.
- Storage *Storage `locationName:"storage" type:"structure"`
-
- // The time of the most recent update for the task.
- UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataBundleTask `json:"-" xml:"-"`
-}
-
-type metadataBundleTask struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s BundleTask) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BundleTask) GoString() string {
- return s.String()
-}
-
-// Describes an error for BundleInstance.
-type BundleTaskError struct {
- // The error code.
- Code *string `locationName:"code" type:"string"`
-
- // The error message.
- Message *string `locationName:"message" type:"string"`
-
- metadataBundleTaskError `json:"-" xml:"-"`
-}
-
-type metadataBundleTaskError struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s BundleTaskError) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BundleTaskError) GoString() string {
- return s.String()
-}
-
-type CancelBundleTaskInput struct {
- // The ID of the bundle task.
- BundleId *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataCancelBundleTaskInput `json:"-" xml:"-"`
-}
-
-type metadataCancelBundleTaskInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelBundleTaskInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelBundleTaskInput) GoString() string {
- return s.String()
-}
-
-type CancelBundleTaskOutput struct {
- // Information about the bundle task.
- BundleTask *BundleTask `locationName:"bundleInstanceTask" type:"structure"`
-
- metadataCancelBundleTaskOutput `json:"-" xml:"-"`
-}
-
-type metadataCancelBundleTaskOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelBundleTaskOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelBundleTaskOutput) GoString() string {
- return s.String()
-}
-
-type CancelConversionTaskInput struct {
- // The ID of the conversion task.
- ConversionTaskId *string `locationName:"conversionTaskId" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The reason for canceling the conversion task.
- ReasonMessage *string `locationName:"reasonMessage" type:"string"`
-
- metadataCancelConversionTaskInput `json:"-" xml:"-"`
-}
-
-type metadataCancelConversionTaskInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelConversionTaskInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelConversionTaskInput) GoString() string {
- return s.String()
-}
-
-type CancelConversionTaskOutput struct {
- metadataCancelConversionTaskOutput `json:"-" xml:"-"`
-}
-
-type metadataCancelConversionTaskOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelConversionTaskOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelConversionTaskOutput) GoString() string {
- return s.String()
-}
-
-type CancelExportTaskInput struct {
- // The ID of the export task. This is the ID returned by CreateInstanceExportTask.
- ExportTaskId *string `locationName:"exportTaskId" type:"string" required:"true"`
-
- metadataCancelExportTaskInput `json:"-" xml:"-"`
-}
-
-type metadataCancelExportTaskInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelExportTaskInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelExportTaskInput) GoString() string {
- return s.String()
-}
-
-type CancelExportTaskOutput struct {
- metadataCancelExportTaskOutput `json:"-" xml:"-"`
-}
-
-type metadataCancelExportTaskOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelExportTaskOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelExportTaskOutput) GoString() string {
- return s.String()
-}
-
-type CancelImportTaskInput struct {
- // The reason for canceling the task.
- CancelReason *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // The ID of the import image or import snapshot task to be canceled.
- ImportTaskId *string `type:"string"`
-
- metadataCancelImportTaskInput `json:"-" xml:"-"`
-}
-
-type metadataCancelImportTaskInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelImportTaskInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelImportTaskInput) GoString() string {
- return s.String()
-}
-
-type CancelImportTaskOutput struct {
- // The ID of the task being canceled.
- ImportTaskId *string `locationName:"importTaskId" type:"string"`
-
- // The current state of the task being canceled.
- PreviousState *string `locationName:"previousState" type:"string"`
-
- // The current state of the task being canceled.
- State *string `locationName:"state" type:"string"`
-
- metadataCancelImportTaskOutput `json:"-" xml:"-"`
-}
-
-type metadataCancelImportTaskOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelImportTaskOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelImportTaskOutput) GoString() string {
- return s.String()
-}
-
-type CancelReservedInstancesListingInput struct {
- // The ID of the Reserved Instance listing.
- ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string" required:"true"`
-
- metadataCancelReservedInstancesListingInput `json:"-" xml:"-"`
-}
-
-type metadataCancelReservedInstancesListingInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelReservedInstancesListingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelReservedInstancesListingInput) GoString() string {
- return s.String()
-}
-
-type CancelReservedInstancesListingOutput struct {
- // The Reserved Instance listing.
- ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"`
-
- metadataCancelReservedInstancesListingOutput `json:"-" xml:"-"`
-}
-
-type metadataCancelReservedInstancesListingOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelReservedInstancesListingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelReservedInstancesListingOutput) GoString() string {
- return s.String()
-}
-
-// Describes a Spot fleet error.
-type CancelSpotFleetRequestsError struct {
- // The error code.
- Code *string `locationName:"code" type:"string" required:"true" enum:"CancelBatchErrorCode"`
-
- // The description for the error code.
- Message *string `locationName:"message" type:"string" required:"true"`
-
- metadataCancelSpotFleetRequestsError `json:"-" xml:"-"`
-}
-
-type metadataCancelSpotFleetRequestsError struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelSpotFleetRequestsError) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelSpotFleetRequestsError) GoString() string {
- return s.String()
-}
-
-// Describes a Spot fleet request that was not successfully canceled.
-type CancelSpotFleetRequestsErrorItem struct {
- // The error.
- Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure" required:"true"`
-
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- metadataCancelSpotFleetRequestsErrorItem `json:"-" xml:"-"`
-}
-
-type metadataCancelSpotFleetRequestsErrorItem struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelSpotFleetRequestsErrorItem) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelSpotFleetRequestsErrorItem) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for CancelSpotFleetRequests.
-type CancelSpotFleetRequestsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The IDs of the Spot fleet requests.
- SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list" required:"true"`
-
- // Indicates whether to terminate instances for a Spot fleet request if it is
- // canceled successfully.
- TerminateInstances *bool `locationName:"terminateInstances" type:"boolean" required:"true"`
-
- metadataCancelSpotFleetRequestsInput `json:"-" xml:"-"`
-}
-
-type metadataCancelSpotFleetRequestsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelSpotFleetRequestsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelSpotFleetRequestsInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of CancelSpotFleetRequests.
-type CancelSpotFleetRequestsOutput struct {
- // Information about the Spot fleet requests that are successfully canceled.
- SuccessfulFleetRequests []*CancelSpotFleetRequestsSuccessItem `locationName:"successfulFleetRequestSet" locationNameList:"item" type:"list"`
-
- // Information about the Spot fleet requests that are not successfully canceled.
- UnsuccessfulFleetRequests []*CancelSpotFleetRequestsErrorItem `locationName:"unsuccessfulFleetRequestSet" locationNameList:"item" type:"list"`
-
- metadataCancelSpotFleetRequestsOutput `json:"-" xml:"-"`
-}
-
-type metadataCancelSpotFleetRequestsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelSpotFleetRequestsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelSpotFleetRequestsOutput) GoString() string {
- return s.String()
-}
-
-// Describes a Spot fleet request that was successfully canceled.
-type CancelSpotFleetRequestsSuccessItem struct {
- // The current state of the Spot fleet request.
- CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
-
- // The previous state of the Spot fleet request.
- PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
-
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- metadataCancelSpotFleetRequestsSuccessItem `json:"-" xml:"-"`
-}
-
-type metadataCancelSpotFleetRequestsSuccessItem struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelSpotFleetRequestsSuccessItem) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelSpotFleetRequestsSuccessItem) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for CancelSpotInstanceRequests.
-type CancelSpotInstanceRequestsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more Spot instance request IDs.
- SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list" required:"true"`
-
- metadataCancelSpotInstanceRequestsInput `json:"-" xml:"-"`
-}
-
-type metadataCancelSpotInstanceRequestsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelSpotInstanceRequestsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelSpotInstanceRequestsInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of CancelSpotInstanceRequests.
-type CancelSpotInstanceRequestsOutput struct {
- // One or more Spot instance requests.
- CancelledSpotInstanceRequests []*CancelledSpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
-
- metadataCancelSpotInstanceRequestsOutput `json:"-" xml:"-"`
-}
-
-type metadataCancelSpotInstanceRequestsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelSpotInstanceRequestsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelSpotInstanceRequestsOutput) GoString() string {
- return s.String()
-}
-
-// Describes a request to cancel a Spot instance.
-type CancelledSpotInstanceRequest struct {
- // The ID of the Spot instance request.
- SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"`
-
- // The state of the Spot instance request.
- State *string `locationName:"state" type:"string" enum:"CancelSpotInstanceRequestState"`
-
- metadataCancelledSpotInstanceRequest `json:"-" xml:"-"`
-}
-
-type metadataCancelledSpotInstanceRequest struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelledSpotInstanceRequest) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelledSpotInstanceRequest) GoString() string {
- return s.String()
-}
-
-// Describes a linked EC2-Classic instance.
-type ClassicLinkInstance struct {
- // A list of security groups.
- Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // Any tags assigned to the instance.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataClassicLinkInstance `json:"-" xml:"-"`
-}
-
-type metadataClassicLinkInstance struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ClassicLinkInstance) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ClassicLinkInstance) GoString() string {
- return s.String()
-}
-
-// Describes the client-specific data.
-type ClientData struct {
- // A user-defined comment about the disk upload.
- Comment *string `type:"string"`
-
- // The time that the disk upload ends.
- UploadEnd *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // The size of the uploaded disk image, in GiB.
- UploadSize *float64 `type:"double"`
-
- // The time that the disk upload starts.
- UploadStart *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- metadataClientData `json:"-" xml:"-"`
-}
-
-type metadataClientData struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ClientData) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ClientData) GoString() string {
- return s.String()
-}
-
-type ConfirmProductInstanceInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance.
- InstanceId *string `type:"string" required:"true"`
-
- // The product code. This must be a product code that you own.
- ProductCode *string `type:"string" required:"true"`
-
- metadataConfirmProductInstanceInput `json:"-" xml:"-"`
-}
-
-type metadataConfirmProductInstanceInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ConfirmProductInstanceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ConfirmProductInstanceInput) GoString() string {
- return s.String()
-}
-
-type ConfirmProductInstanceOutput struct {
- // The AWS account ID of the instance owner. This is only present if the product
- // code is attached to the instance.
- OwnerId *string `locationName:"ownerId" type:"string"`
-
- // The return value of the request. Returns true if the specified product code
- // is owned by the requester and associated with the specified instance.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataConfirmProductInstanceOutput `json:"-" xml:"-"`
-}
-
-type metadataConfirmProductInstanceOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ConfirmProductInstanceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ConfirmProductInstanceOutput) GoString() string {
- return s.String()
-}
-
-// Describes a conversion task.
-type ConversionTask struct {
- // The ID of the conversion task.
- ConversionTaskId *string `locationName:"conversionTaskId" type:"string" required:"true"`
-
- // The time when the task expires. If the upload isn't complete before the expiration
- // time, we automatically cancel the task.
- ExpirationTime *string `locationName:"expirationTime" type:"string"`
-
- // If the task is for importing an instance, this contains information about
- // the import instance task.
- ImportInstance *ImportInstanceTaskDetails `locationName:"importInstance" type:"structure"`
-
- // If the task is for importing a volume, this contains information about the
- // import volume task.
- ImportVolume *ImportVolumeTaskDetails `locationName:"importVolume" type:"structure"`
-
- // The state of the conversion task.
- State *string `locationName:"state" type:"string" required:"true" enum:"ConversionTaskState"`
-
- // The status message related to the conversion task.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- // Any tags assigned to the task.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- metadataConversionTask `json:"-" xml:"-"`
-}
-
-type metadataConversionTask struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ConversionTask) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ConversionTask) GoString() string {
- return s.String()
-}
-
-type CopyImageInput struct {
- // Unique, case-sensitive identifier you provide to ensure idempotency of the
- // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- ClientToken *string `type:"string"`
-
- // A description for the new AMI in the destination region.
- Description *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The name of the new AMI in the destination region.
- Name *string `type:"string" required:"true"`
-
- // The ID of the AMI to copy.
- SourceImageId *string `type:"string" required:"true"`
-
- // The name of the region that contains the AMI to copy.
- SourceRegion *string `type:"string" required:"true"`
-
- metadataCopyImageInput `json:"-" xml:"-"`
-}
-
-type metadataCopyImageInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CopyImageInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CopyImageInput) GoString() string {
- return s.String()
-}
-
-type CopyImageOutput struct {
- // The ID of the new AMI.
- ImageId *string `locationName:"imageId" type:"string"`
-
- metadataCopyImageOutput `json:"-" xml:"-"`
-}
-
-type metadataCopyImageOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CopyImageOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CopyImageOutput) GoString() string {
- return s.String()
-}
-
-type CopySnapshotInput struct {
- // A description for the EBS snapshot.
- Description *string `type:"string"`
-
- // The destination region to use in the PresignedUrl parameter of a snapshot
- // copy operation. This parameter is only valid for specifying the destination
- // region in a PresignedUrl parameter, where it is required.
- //
- // CopySnapshot sends the snapshot copy to the regional endpoint that you
- // send the HTTP request to, such as ec2.us-east-1.amazonaws.com (in the AWS
- // CLI, this is specified with the --region parameter or the default region
- // in your AWS configuration file).
- DestinationRegion *string `locationName:"destinationRegion" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Specifies whether the destination snapshot should be encrypted. There is
- // no way to create an unencrypted snapshot copy from an encrypted snapshot;
- // however, you can encrypt a copy of an unencrypted snapshot with this flag.
- // The default CMK for EBS is used unless a non-default AWS Key Management Service
- // (AWS KMS) CMK is specified with KmsKeyId. For more information, see Amazon
- // EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- Encrypted *bool `locationName:"encrypted" type:"boolean"`
-
- // The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when
- // creating the snapshot copy. This parameter is only required if you want to
- // use a non-default CMK; if this parameter is not specified, the default CMK
- // for EBS is used. The ARN contains the arn:aws:kms namespace, followed by
- // the region of the CMK, the AWS account ID of the CMK owner, the key namespace,
- // and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
- // The specified CMK must exist in the region that the snapshot is being copied
- // to. If a KmsKeyId is specified, the Encrypted flag must also be set.
- KmsKeyId *string `locationName:"kmsKeyId" type:"string"`
-
- // The pre-signed URL that facilitates copying an encrypted snapshot. This parameter
- // is only required when copying an encrypted snapshot with the Amazon EC2 Query
- // API; it is available as an optional parameter in all other cases. The PresignedUrl
- // should use the snapshot source endpoint, the CopySnapshot action, and include
- // the SourceRegion, SourceSnapshotId, and DestinationRegion parameters. The
- // PresignedUrl must be signed using AWS Signature Version 4. Because EBS snapshots
- // are stored in Amazon S3, the signing algorithm for this parameter uses the
- // same logic that is described in Authenticating Requests by Using Query Parameters
- // (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html)
- // in the Amazon Simple Storage Service API Reference. An invalid or improperly
- // signed PresignedUrl will cause the copy operation to fail asynchronously,
- // and the snapshot will move to an error state.
- PresignedUrl *string `locationName:"presignedUrl" type:"string"`
-
- // The ID of the region that contains the snapshot to be copied.
- SourceRegion *string `type:"string" required:"true"`
-
- // The ID of the EBS snapshot to copy.
- SourceSnapshotId *string `type:"string" required:"true"`
-
- metadataCopySnapshotInput `json:"-" xml:"-"`
-}
-
-type metadataCopySnapshotInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CopySnapshotInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CopySnapshotInput) GoString() string {
- return s.String()
-}
-
-type CopySnapshotOutput struct {
- // The ID of the new snapshot.
- SnapshotId *string `locationName:"snapshotId" type:"string"`
-
- metadataCopySnapshotOutput `json:"-" xml:"-"`
-}
-
-type metadataCopySnapshotOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CopySnapshotOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CopySnapshotOutput) GoString() string {
- return s.String()
-}
-
-type CreateCustomerGatewayInput struct {
- // For devices that support BGP, the customer gateway's BGP ASN.
- //
- // Default: 65000
- BgpAsn *int64 `type:"integer" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The Internet-routable IP address for the customer gateway's outside interface.
- // The address must be static.
- PublicIp *string `locationName:"IpAddress" type:"string" required:"true"`
-
- // The type of VPN connection that this customer gateway supports (ipsec.1).
- Type *string `type:"string" required:"true" enum:"GatewayType"`
-
- metadataCreateCustomerGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataCreateCustomerGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateCustomerGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateCustomerGatewayInput) GoString() string {
- return s.String()
-}
-
-type CreateCustomerGatewayOutput struct {
- // Information about the customer gateway.
- CustomerGateway *CustomerGateway `locationName:"customerGateway" type:"structure"`
-
- metadataCreateCustomerGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateCustomerGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateCustomerGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateCustomerGatewayOutput) GoString() string {
- return s.String()
-}
-
-type CreateDhcpOptionsInput struct {
- // A DHCP configuration option.
- DhcpConfigurations []*NewDhcpConfiguration `locationName:"dhcpConfiguration" locationNameList:"item" type:"list" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataCreateDhcpOptionsInput `json:"-" xml:"-"`
-}
-
-type metadataCreateDhcpOptionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateDhcpOptionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateDhcpOptionsInput) GoString() string {
- return s.String()
-}
-
-type CreateDhcpOptionsOutput struct {
- // A set of DHCP options.
- DhcpOptions *DhcpOptions `locationName:"dhcpOptions" type:"structure"`
-
- metadataCreateDhcpOptionsOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateDhcpOptionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateDhcpOptionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateDhcpOptionsOutput) GoString() string {
- return s.String()
-}
-
-type CreateFlowLogsInput struct {
- // Unique, case-sensitive identifier you provide to ensure the idempotency of
- // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
- ClientToken *string `type:"string"`
-
- // The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs
- // log group.
- DeliverLogsPermissionArn *string `type:"string" required:"true"`
-
- // The name of the CloudWatch log group.
- LogGroupName *string `type:"string" required:"true"`
-
- // One or more subnet, network interface, or VPC IDs.
- ResourceIds []*string `locationName:"ResourceId" locationNameList:"item" type:"list" required:"true"`
-
- // The type of resource on which to create the flow log.
- ResourceType *string `type:"string" required:"true" enum:"FlowLogsResourceType"`
-
- // The type of traffic to log.
- TrafficType *string `type:"string" required:"true" enum:"TrafficType"`
-
- metadataCreateFlowLogsInput `json:"-" xml:"-"`
-}
-
-type metadataCreateFlowLogsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateFlowLogsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateFlowLogsInput) GoString() string {
- return s.String()
-}
-
-type CreateFlowLogsOutput struct {
- // Unique, case-sensitive identifier you provide to ensure the idempotency of
- // the request.
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // The IDs of the flow logs.
- FlowLogIds []*string `locationName:"flowLogIdSet" locationNameList:"item" type:"list"`
-
- // Information about the flow logs that could not be created successfully.
- Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
-
- metadataCreateFlowLogsOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateFlowLogsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateFlowLogsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateFlowLogsOutput) GoString() string {
- return s.String()
-}
-
-type CreateImageInput struct {
- // Information about one or more block device mappings.
- BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"`
-
- // A description for the new image.
- Description *string `locationName:"description" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string" required:"true"`
-
- // A name for the new image.
- //
- // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets
- // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('),
- // at-signs (@), or underscores(_)
- Name *string `locationName:"name" type:"string" required:"true"`
-
- // By default, this parameter is set to false, which means Amazon EC2 attempts
- // to shut down the instance cleanly before image creation and then reboots
- // the instance. When the parameter is set to true, Amazon EC2 doesn't shut
- // down the instance before creating the image. When this option is used, file
- // system integrity on the created image can't be guaranteed.
- NoReboot *bool `locationName:"noReboot" type:"boolean"`
-
- metadataCreateImageInput `json:"-" xml:"-"`
-}
-
-type metadataCreateImageInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateImageInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateImageInput) GoString() string {
- return s.String()
-}
-
-type CreateImageOutput struct {
- // The ID of the new AMI.
- ImageId *string `locationName:"imageId" type:"string"`
-
- metadataCreateImageOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateImageOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateImageOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateImageOutput) GoString() string {
- return s.String()
-}
-
-type CreateInstanceExportTaskInput struct {
- // A description for the conversion task or the resource being exported. The
- // maximum length is 255 bytes.
- Description *string `locationName:"description" type:"string"`
-
- // The format and location for an instance export task.
- ExportToS3Task *ExportToS3TaskSpecification `locationName:"exportToS3" type:"structure"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string" required:"true"`
-
- // The target virtualization environment.
- TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"`
-
- metadataCreateInstanceExportTaskInput `json:"-" xml:"-"`
-}
-
-type metadataCreateInstanceExportTaskInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateInstanceExportTaskInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateInstanceExportTaskInput) GoString() string {
- return s.String()
-}
-
-type CreateInstanceExportTaskOutput struct {
- // Information about the instance export task.
- ExportTask *ExportTask `locationName:"exportTask" type:"structure"`
-
- metadataCreateInstanceExportTaskOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateInstanceExportTaskOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateInstanceExportTaskOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateInstanceExportTaskOutput) GoString() string {
- return s.String()
-}
-
-type CreateInternetGatewayInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataCreateInternetGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataCreateInternetGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateInternetGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateInternetGatewayInput) GoString() string {
- return s.String()
-}
-
-type CreateInternetGatewayOutput struct {
- // Information about the Internet gateway.
- InternetGateway *InternetGateway `locationName:"internetGateway" type:"structure"`
-
- metadataCreateInternetGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateInternetGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateInternetGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateInternetGatewayOutput) GoString() string {
- return s.String()
-}
-
-type CreateKeyPairInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // A unique name for the key pair.
- //
- // Constraints: Up to 255 ASCII characters
- KeyName *string `type:"string" required:"true"`
-
- metadataCreateKeyPairInput `json:"-" xml:"-"`
-}
-
-type metadataCreateKeyPairInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateKeyPairInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateKeyPairInput) GoString() string {
- return s.String()
-}
-
-// Describes a key pair.
-type CreateKeyPairOutput struct {
- // The SHA-1 digest of the DER encoded private key.
- KeyFingerprint *string `locationName:"keyFingerprint" type:"string"`
-
- // An unencrypted PEM encoded RSA private key.
- KeyMaterial *string `locationName:"keyMaterial" type:"string"`
-
- // The name of the key pair.
- KeyName *string `locationName:"keyName" type:"string"`
-
- metadataCreateKeyPairOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateKeyPairOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateKeyPairOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateKeyPairOutput) GoString() string {
- return s.String()
-}
-
-type CreateNetworkAclEntryInput struct {
- // The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24).
- CidrBlock *string `locationName:"cidrBlock" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Indicates whether this is an egress rule (rule is applied to traffic leaving
- // the subnet).
- Egress *bool `locationName:"egress" type:"boolean" required:"true"`
-
- // ICMP protocol: The ICMP type and code. Required if specifying ICMP for the
- // protocol.
- IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"`
-
- // The ID of the network ACL.
- NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"`
-
- // TCP or UDP protocols: The range of ports the rule applies to.
- PortRange *PortRange `locationName:"portRange" type:"structure"`
-
- // The protocol. A value of -1 means all protocols.
- Protocol *string `locationName:"protocol" type:"string" required:"true"`
-
- // Indicates whether to allow or deny the traffic that matches the rule.
- RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"`
-
- // The rule number for the entry (for example, 100). ACL entries are processed
- // in ascending order by rule number.
- //
- // Constraints: Positive integer from 1 to 32766
- RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"`
-
- metadataCreateNetworkAclEntryInput `json:"-" xml:"-"`
-}
-
-type metadataCreateNetworkAclEntryInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateNetworkAclEntryInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateNetworkAclEntryInput) GoString() string {
- return s.String()
-}
-
-type CreateNetworkAclEntryOutput struct {
- metadataCreateNetworkAclEntryOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateNetworkAclEntryOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateNetworkAclEntryOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateNetworkAclEntryOutput) GoString() string {
- return s.String()
-}
-
-type CreateNetworkAclInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataCreateNetworkAclInput `json:"-" xml:"-"`
-}
-
-type metadataCreateNetworkAclInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateNetworkAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateNetworkAclInput) GoString() string {
- return s.String()
-}
-
-type CreateNetworkAclOutput struct {
- // Information about the network ACL.
- NetworkAcl *NetworkAcl `locationName:"networkAcl" type:"structure"`
-
- metadataCreateNetworkAclOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateNetworkAclOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateNetworkAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateNetworkAclOutput) GoString() string {
- return s.String()
-}
-
-type CreateNetworkInterfaceInput struct {
- // A description for the network interface.
- Description *string `locationName:"description" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The IDs of one or more security groups.
- Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
-
- // The primary private IP address of the network interface. If you don't specify
- // an IP address, Amazon EC2 selects one for you from the subnet range. If you
- // specify an IP address, you cannot indicate any IP addresses specified in
- // privateIpAddresses as primary (only one IP address can be designated as primary).
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // One or more private IP addresses.
- PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"`
-
- // The number of secondary private IP addresses to assign to a network interface.
- // When you specify a number of secondary IP addresses, Amazon EC2 selects these
- // IP addresses within the subnet range. You can't specify this option and specify
- // more than one private IP address using privateIpAddresses.
- //
- // The number of IP addresses you can assign to a network interface varies
- // by instance type. For more information, see Private IP Addresses Per ENI
- // Per Instance Type (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI)
- // in the Amazon Elastic Compute Cloud User Guide.
- SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"`
-
- // The ID of the subnet to associate with the network interface.
- SubnetId *string `locationName:"subnetId" type:"string" required:"true"`
-
- metadataCreateNetworkInterfaceInput `json:"-" xml:"-"`
-}
-
-type metadataCreateNetworkInterfaceInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateNetworkInterfaceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateNetworkInterfaceInput) GoString() string {
- return s.String()
-}
-
-type CreateNetworkInterfaceOutput struct {
- // Information about the network interface.
- NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"`
-
- metadataCreateNetworkInterfaceOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateNetworkInterfaceOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateNetworkInterfaceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateNetworkInterfaceOutput) GoString() string {
- return s.String()
-}
-
-type CreatePlacementGroupInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // A name for the placement group.
- //
- // Constraints: Up to 255 ASCII characters
- GroupName *string `locationName:"groupName" type:"string" required:"true"`
-
- // The placement strategy.
- Strategy *string `locationName:"strategy" type:"string" required:"true" enum:"PlacementStrategy"`
-
- metadataCreatePlacementGroupInput `json:"-" xml:"-"`
-}
-
-type metadataCreatePlacementGroupInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreatePlacementGroupInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreatePlacementGroupInput) GoString() string {
- return s.String()
-}
-
-type CreatePlacementGroupOutput struct {
- metadataCreatePlacementGroupOutput `json:"-" xml:"-"`
-}
-
-type metadataCreatePlacementGroupOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreatePlacementGroupOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreatePlacementGroupOutput) GoString() string {
- return s.String()
-}
-
-type CreateReservedInstancesListingInput struct {
- // Unique, case-sensitive identifier you provide to ensure idempotency of your
- // listings. This helps avoid duplicate listings. For more information, see
- // Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
- ClientToken *string `locationName:"clientToken" type:"string" required:"true"`
-
- // The number of instances that are a part of a Reserved Instance account to
- // be listed in the Reserved Instance Marketplace. This number should be less
- // than or equal to the instance count associated with the Reserved Instance
- // ID specified in this call.
- InstanceCount *int64 `locationName:"instanceCount" type:"integer" required:"true"`
-
- // A list specifying the price of the Reserved Instance for each month remaining
- // in the Reserved Instance term.
- PriceSchedules []*PriceScheduleSpecification `locationName:"priceSchedules" locationNameList:"item" type:"list" required:"true"`
-
- // The ID of the active Reserved Instance.
- ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string" required:"true"`
-
- metadataCreateReservedInstancesListingInput `json:"-" xml:"-"`
-}
-
-type metadataCreateReservedInstancesListingInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateReservedInstancesListingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateReservedInstancesListingInput) GoString() string {
- return s.String()
-}
-
-type CreateReservedInstancesListingOutput struct {
- // Information about the Reserved Instances listing.
- ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"`
-
- metadataCreateReservedInstancesListingOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateReservedInstancesListingOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateReservedInstancesListingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateReservedInstancesListingOutput) GoString() string {
- return s.String()
-}
-
-type CreateRouteInput struct {
- // The CIDR address block used for the destination match. Routing decisions
- // are based on the most specific match.
- DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of an Internet gateway or virtual private gateway attached to your
- // VPC.
- GatewayId *string `locationName:"gatewayId" type:"string"`
-
- // The ID of a NAT instance in your VPC. The operation fails if you specify
- // an instance ID unless exactly one network interface is attached.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The ID of a network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // The ID of the route table for the route.
- RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"`
-
- // The ID of a VPC peering connection.
- VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"`
-
- metadataCreateRouteInput `json:"-" xml:"-"`
-}
-
-type metadataCreateRouteInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateRouteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateRouteInput) GoString() string {
- return s.String()
-}
-
-type CreateRouteOutput struct {
- // Returns true if the request succeeds; otherwise, it returns an error.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataCreateRouteOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateRouteOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateRouteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateRouteOutput) GoString() string {
- return s.String()
-}
-
-type CreateRouteTableInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataCreateRouteTableInput `json:"-" xml:"-"`
-}
-
-type metadataCreateRouteTableInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateRouteTableInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateRouteTableInput) GoString() string {
- return s.String()
-}
-
-type CreateRouteTableOutput struct {
- // Information about the route table.
- RouteTable *RouteTable `locationName:"routeTable" type:"structure"`
-
- metadataCreateRouteTableOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateRouteTableOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateRouteTableOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateRouteTableOutput) GoString() string {
- return s.String()
-}
-
-type CreateSecurityGroupInput struct {
- // A description for the security group. This is informational only.
- //
- // Constraints: Up to 255 characters in length
- //
- // Constraints for EC2-Classic: ASCII characters
- //
- // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
- Description *string `locationName:"GroupDescription" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The name of the security group.
- //
- // Constraints: Up to 255 characters in length
- //
- // Constraints for EC2-Classic: ASCII characters
- //
- // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
- GroupName *string `type:"string" required:"true"`
-
- // [EC2-VPC] The ID of the VPC. Required for EC2-VPC.
- VpcId *string `type:"string"`
-
- metadataCreateSecurityGroupInput `json:"-" xml:"-"`
-}
-
-type metadataCreateSecurityGroupInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateSecurityGroupInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateSecurityGroupInput) GoString() string {
- return s.String()
-}
-
-type CreateSecurityGroupOutput struct {
- // The ID of the security group.
- GroupId *string `locationName:"groupId" type:"string"`
-
- metadataCreateSecurityGroupOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateSecurityGroupOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateSecurityGroupOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateSecurityGroupOutput) GoString() string {
- return s.String()
-}
-
-type CreateSnapshotInput struct {
- // A description for the snapshot.
- Description *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the EBS volume.
- VolumeId *string `type:"string" required:"true"`
-
- metadataCreateSnapshotInput `json:"-" xml:"-"`
-}
-
-type metadataCreateSnapshotInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateSnapshotInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateSnapshotInput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for CreateSpotDatafeedSubscription.
-type CreateSpotDatafeedSubscriptionInput struct {
- // The Amazon S3 bucket in which to store the Spot instance data feed.
- Bucket *string `locationName:"bucket" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // A prefix for the data feed file names.
- Prefix *string `locationName:"prefix" type:"string"`
-
- metadataCreateSpotDatafeedSubscriptionInput `json:"-" xml:"-"`
-}
-
-type metadataCreateSpotDatafeedSubscriptionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateSpotDatafeedSubscriptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateSpotDatafeedSubscriptionInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of CreateSpotDatafeedSubscription.
-type CreateSpotDatafeedSubscriptionOutput struct {
- // The Spot instance data feed subscription.
- SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"`
-
- metadataCreateSpotDatafeedSubscriptionOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateSpotDatafeedSubscriptionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateSpotDatafeedSubscriptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateSpotDatafeedSubscriptionOutput) GoString() string {
- return s.String()
-}
-
-type CreateSubnetInput struct {
- // The Availability Zone for the subnet.
- //
- // Default: AWS selects one for you. If you create more than one subnet in
- // your VPC, we may not necessarily select a different zone for each subnet.
- AvailabilityZone *string `type:"string"`
-
- // The network range for the subnet, in CIDR notation. For example, 10.0.0.0/24.
- CidrBlock *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `type:"string" required:"true"`
-
- metadataCreateSubnetInput `json:"-" xml:"-"`
-}
-
-type metadataCreateSubnetInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateSubnetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateSubnetInput) GoString() string {
- return s.String()
-}
-
-type CreateSubnetOutput struct {
- // Information about the subnet.
- Subnet *Subnet `locationName:"subnet" type:"structure"`
-
- metadataCreateSubnetOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateSubnetOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateSubnetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateSubnetOutput) GoString() string {
- return s.String()
-}
-
-type CreateTagsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
- Resources []*string `locationName:"ResourceId" type:"list" required:"true"`
-
- // One or more tags. The value parameter is required, but if you don't want
- // the tag to have a value, specify the parameter with no value, and we set
- // the value to an empty string.
- Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list" required:"true"`
-
- metadataCreateTagsInput `json:"-" xml:"-"`
-}
-
-type metadataCreateTagsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateTagsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateTagsInput) GoString() string {
- return s.String()
-}
-
-type CreateTagsOutput struct {
- metadataCreateTagsOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateTagsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateTagsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateTagsOutput) GoString() string {
- return s.String()
-}
-
-type CreateVolumeInput struct {
- // The Availability Zone in which to create the volume. Use DescribeAvailabilityZones
- // to list the Availability Zones that are currently available to you.
- AvailabilityZone *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes
- // may only be attached to instances that support Amazon EBS encryption. Volumes
- // that are created from encrypted snapshots are automatically encrypted. There
- // is no way to create an encrypted volume from an unencrypted snapshot or vice
- // versa. If your AMI uses encrypted volumes, you can only launch it on supported
- // instance types. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- Encrypted *bool `locationName:"encrypted" type:"boolean"`
-
- // Only valid for Provisioned IOPS (SSD) volumes. The number of I/O operations
- // per second (IOPS) to provision for the volume, with a maximum ratio of 30
- // IOPS/GiB.
- //
- // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes
- Iops *int64 `type:"integer"`
-
- // The full ARN of the AWS Key Management Service (AWS KMS) customer master
- // key (CMK) to use when creating the encrypted volume. This parameter is only
- // required if you want to use a non-default CMK; if this parameter is not specified,
- // the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace,
- // followed by the region of the CMK, the AWS account ID of the CMK owner, the
- // key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
- // If a KmsKeyId is specified, the Encrypted flag must also be set.
- KmsKeyId *string `type:"string"`
-
- // The size of the volume, in GiBs.
- //
- // Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384
- // for io1 volumes. If you specify a snapshot, the volume size must be equal
- // to or larger than the snapshot size.
- //
- // Default: If you're creating the volume from a snapshot and don't specify
- // a volume size, the default is the snapshot size.
- Size *int64 `type:"integer"`
-
- // The snapshot from which to create the volume.
- SnapshotId *string `type:"string"`
-
- // The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for
- // Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.
- //
- // Default: standard
- VolumeType *string `type:"string" enum:"VolumeType"`
-
- metadataCreateVolumeInput `json:"-" xml:"-"`
-}
-
-type metadataCreateVolumeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVolumeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVolumeInput) GoString() string {
- return s.String()
-}
-
-// Describes the user or group to be added or removed from the permissions for
-// a volume.
-type CreateVolumePermission struct {
- // The specific group that is to be added or removed from a volume's list of
- // create volume permissions.
- Group *string `locationName:"group" type:"string" enum:"PermissionGroup"`
-
- // The specific AWS account ID that is to be added or removed from a volume's
- // list of create volume permissions.
- UserId *string `locationName:"userId" type:"string"`
-
- metadataCreateVolumePermission `json:"-" xml:"-"`
-}
-
-type metadataCreateVolumePermission struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVolumePermission) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVolumePermission) GoString() string {
- return s.String()
-}
-
-// Describes modifications to the permissions for a volume.
-type CreateVolumePermissionModifications struct {
- // Adds a specific AWS account ID or group to a volume's list of create volume
- // permissions.
- Add []*CreateVolumePermission `locationNameList:"item" type:"list"`
-
- // Removes a specific AWS account ID or group from a volume's list of create
- // volume permissions.
- Remove []*CreateVolumePermission `locationNameList:"item" type:"list"`
-
- metadataCreateVolumePermissionModifications `json:"-" xml:"-"`
-}
-
-type metadataCreateVolumePermissionModifications struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVolumePermissionModifications) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVolumePermissionModifications) GoString() string {
- return s.String()
-}
-
-type CreateVpcEndpointInput struct {
- // Unique, case-sensitive identifier you provide to ensure the idempotency of
- // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
- ClientToken *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // A policy to attach to the endpoint that controls access to the service. The
- // policy must be in valid JSON format. If this parameter is not specified,
- // we attach a default policy that allows full access to the service.
- PolicyDocument *string `type:"string"`
-
- // One or more route table IDs.
- RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"`
-
- // The AWS service name, in the form com.amazonaws.region.service. To get a
- // list of available services, use the DescribeVpcEndpointServices request.
- ServiceName *string `type:"string" required:"true"`
-
- // The ID of the VPC in which the endpoint will be used.
- VpcId *string `type:"string" required:"true"`
-
- metadataCreateVpcEndpointInput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpcEndpointInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpcEndpointInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpcEndpointInput) GoString() string {
- return s.String()
-}
-
-type CreateVpcEndpointOutput struct {
- // Unique, case-sensitive identifier you provide to ensure the idempotency of
- // the request.
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // Information about the endpoint.
- VpcEndpoint *VpcEndpoint `locationName:"vpcEndpoint" type:"structure"`
-
- metadataCreateVpcEndpointOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpcEndpointOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpcEndpointOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpcEndpointOutput) GoString() string {
- return s.String()
-}
-
-type CreateVpcInput struct {
- // The network range for the VPC, in CIDR notation. For example, 10.0.0.0/16.
- CidrBlock *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The supported tenancy options for instances launched into the VPC. A value
- // of default means that instances can be launched with any tenancy; a value
- // of dedicated means all instances launched into the VPC are launched as dedicated
- // tenancy instances regardless of the tenancy assigned to the instance at launch.
- // Dedicated tenancy instances run on single-tenant hardware.
- //
- // Default: default
- InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
-
- metadataCreateVpcInput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpcInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpcInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpcInput) GoString() string {
- return s.String()
-}
-
-type CreateVpcOutput struct {
- // Information about the VPC.
- Vpc *Vpc `locationName:"vpc" type:"structure"`
-
- metadataCreateVpcOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpcOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpcOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpcOutput) GoString() string {
- return s.String()
-}
-
-type CreateVpcPeeringConnectionInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The AWS account ID of the owner of the peer VPC.
- //
- // Default: Your AWS account ID
- PeerOwnerId *string `locationName:"peerOwnerId" type:"string"`
-
- // The ID of the VPC with which you are creating the VPC peering connection.
- PeerVpcId *string `locationName:"peerVpcId" type:"string"`
-
- // The ID of the requester VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataCreateVpcPeeringConnectionInput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpcPeeringConnectionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpcPeeringConnectionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpcPeeringConnectionInput) GoString() string {
- return s.String()
-}
-
-type CreateVpcPeeringConnectionOutput struct {
- // Information about the VPC peering connection.
- VpcPeeringConnection *VpcPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"`
-
- metadataCreateVpcPeeringConnectionOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpcPeeringConnectionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpcPeeringConnectionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpcPeeringConnectionOutput) GoString() string {
- return s.String()
-}
-
-type CreateVpnConnectionInput struct {
- // The ID of the customer gateway.
- CustomerGatewayId *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Indicates whether the VPN connection requires static routes. If you are creating
- // a VPN connection for a device that does not support BGP, you must specify
- // true.
- //
- // Default: false
- Options *VpnConnectionOptionsSpecification `locationName:"options" type:"structure"`
-
- // The type of VPN connection (ipsec.1).
- Type *string `type:"string" required:"true"`
-
- // The ID of the virtual private gateway.
- VpnGatewayId *string `type:"string" required:"true"`
-
- metadataCreateVpnConnectionInput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpnConnectionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpnConnectionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpnConnectionInput) GoString() string {
- return s.String()
-}
-
-type CreateVpnConnectionOutput struct {
- // Information about the VPN connection.
- VpnConnection *VpnConnection `locationName:"vpnConnection" type:"structure"`
-
- metadataCreateVpnConnectionOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpnConnectionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpnConnectionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpnConnectionOutput) GoString() string {
- return s.String()
-}
-
-type CreateVpnConnectionRouteInput struct {
- // The CIDR block associated with the local subnet of the customer network.
- DestinationCidrBlock *string `type:"string" required:"true"`
-
- // The ID of the VPN connection.
- VpnConnectionId *string `type:"string" required:"true"`
-
- metadataCreateVpnConnectionRouteInput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpnConnectionRouteInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpnConnectionRouteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpnConnectionRouteInput) GoString() string {
- return s.String()
-}
-
-type CreateVpnConnectionRouteOutput struct {
- metadataCreateVpnConnectionRouteOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpnConnectionRouteOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpnConnectionRouteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpnConnectionRouteOutput) GoString() string {
- return s.String()
-}
-
-type CreateVpnGatewayInput struct {
- // The Availability Zone for the virtual private gateway.
- AvailabilityZone *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The type of VPN connection this virtual private gateway supports.
- Type *string `type:"string" required:"true" enum:"GatewayType"`
-
- metadataCreateVpnGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpnGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpnGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpnGatewayInput) GoString() string {
- return s.String()
-}
-
-type CreateVpnGatewayOutput struct {
- // Information about the virtual private gateway.
- VpnGateway *VpnGateway `locationName:"vpnGateway" type:"structure"`
-
- metadataCreateVpnGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataCreateVpnGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateVpnGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateVpnGatewayOutput) GoString() string {
- return s.String()
-}
-
-// Describes a customer gateway.
-type CustomerGateway struct {
- // The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number
- // (ASN).
- BgpAsn *string `locationName:"bgpAsn" type:"string"`
-
- // The ID of the customer gateway.
- CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"`
-
- // The Internet-routable IP address of the customer gateway's outside interface.
- IpAddress *string `locationName:"ipAddress" type:"string"`
-
- // The current state of the customer gateway (pending | available | deleting
- // | deleted).
- State *string `locationName:"state" type:"string"`
-
- // Any tags assigned to the customer gateway.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The type of VPN connection the customer gateway supports (ipsec.1).
- Type *string `locationName:"type" type:"string"`
-
- metadataCustomerGateway `json:"-" xml:"-"`
-}
-
-type metadataCustomerGateway struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s CustomerGateway) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CustomerGateway) GoString() string {
- return s.String()
-}
-
-type DeleteCustomerGatewayInput struct {
- // The ID of the customer gateway.
- CustomerGatewayId *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataDeleteCustomerGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteCustomerGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteCustomerGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteCustomerGatewayInput) GoString() string {
- return s.String()
-}
-
-type DeleteCustomerGatewayOutput struct {
- metadataDeleteCustomerGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteCustomerGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteCustomerGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteCustomerGatewayOutput) GoString() string {
- return s.String()
-}
-
-type DeleteDhcpOptionsInput struct {
- // The ID of the DHCP options set.
- DhcpOptionsId *string `type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataDeleteDhcpOptionsInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteDhcpOptionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteDhcpOptionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteDhcpOptionsInput) GoString() string {
- return s.String()
-}
-
-type DeleteDhcpOptionsOutput struct {
- metadataDeleteDhcpOptionsOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteDhcpOptionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteDhcpOptionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteDhcpOptionsOutput) GoString() string {
- return s.String()
-}
-
-type DeleteFlowLogsInput struct {
- // One or more flow log IDs.
- FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list" required:"true"`
-
- metadataDeleteFlowLogsInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteFlowLogsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteFlowLogsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteFlowLogsInput) GoString() string {
- return s.String()
-}
-
-type DeleteFlowLogsOutput struct {
- // Information about the flow logs that could not be deleted successfully.
- Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
-
- metadataDeleteFlowLogsOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteFlowLogsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteFlowLogsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteFlowLogsOutput) GoString() string {
- return s.String()
-}
-
-type DeleteInternetGatewayInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the Internet gateway.
- InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"`
-
- metadataDeleteInternetGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteInternetGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteInternetGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteInternetGatewayInput) GoString() string {
- return s.String()
-}
-
-type DeleteInternetGatewayOutput struct {
- metadataDeleteInternetGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteInternetGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteInternetGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteInternetGatewayOutput) GoString() string {
- return s.String()
-}
-
-type DeleteKeyPairInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The name of the key pair.
- KeyName *string `type:"string" required:"true"`
-
- metadataDeleteKeyPairInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteKeyPairInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteKeyPairInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteKeyPairInput) GoString() string {
- return s.String()
-}
-
-type DeleteKeyPairOutput struct {
- metadataDeleteKeyPairOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteKeyPairOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteKeyPairOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteKeyPairOutput) GoString() string {
- return s.String()
-}
-
-type DeleteNetworkAclEntryInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Indicates whether the rule is an egress rule.
- Egress *bool `locationName:"egress" type:"boolean" required:"true"`
-
- // The ID of the network ACL.
- NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"`
-
- // The rule number of the entry to delete.
- RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"`
-
- metadataDeleteNetworkAclEntryInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteNetworkAclEntryInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteNetworkAclEntryInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteNetworkAclEntryInput) GoString() string {
- return s.String()
-}
-
-type DeleteNetworkAclEntryOutput struct {
- metadataDeleteNetworkAclEntryOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteNetworkAclEntryOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteNetworkAclEntryOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteNetworkAclEntryOutput) GoString() string {
- return s.String()
-}
-
-type DeleteNetworkAclInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the network ACL.
- NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"`
-
- metadataDeleteNetworkAclInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteNetworkAclInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteNetworkAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteNetworkAclInput) GoString() string {
- return s.String()
-}
-
-type DeleteNetworkAclOutput struct {
- metadataDeleteNetworkAclOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteNetworkAclOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteNetworkAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteNetworkAclOutput) GoString() string {
- return s.String()
-}
-
-type DeleteNetworkInterfaceInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"`
-
- metadataDeleteNetworkInterfaceInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteNetworkInterfaceInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteNetworkInterfaceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteNetworkInterfaceInput) GoString() string {
- return s.String()
-}
-
-type DeleteNetworkInterfaceOutput struct {
- metadataDeleteNetworkInterfaceOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteNetworkInterfaceOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteNetworkInterfaceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteNetworkInterfaceOutput) GoString() string {
- return s.String()
-}
-
-type DeletePlacementGroupInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The name of the placement group.
- GroupName *string `locationName:"groupName" type:"string" required:"true"`
-
- metadataDeletePlacementGroupInput `json:"-" xml:"-"`
-}
-
-type metadataDeletePlacementGroupInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeletePlacementGroupInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletePlacementGroupInput) GoString() string {
- return s.String()
-}
-
-type DeletePlacementGroupOutput struct {
- metadataDeletePlacementGroupOutput `json:"-" xml:"-"`
-}
-
-type metadataDeletePlacementGroupOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeletePlacementGroupOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletePlacementGroupOutput) GoString() string {
- return s.String()
-}
-
-type DeleteRouteInput struct {
- // The CIDR range for the route. The value you specify must match the CIDR for
- // the route exactly.
- DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the route table.
- RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"`
-
- metadataDeleteRouteInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteRouteInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteRouteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteRouteInput) GoString() string {
- return s.String()
-}
-
-type DeleteRouteOutput struct {
- metadataDeleteRouteOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteRouteOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteRouteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteRouteOutput) GoString() string {
- return s.String()
-}
-
-type DeleteRouteTableInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the route table.
- RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"`
-
- metadataDeleteRouteTableInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteRouteTableInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteRouteTableInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteRouteTableInput) GoString() string {
- return s.String()
-}
-
-type DeleteRouteTableOutput struct {
- metadataDeleteRouteTableOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteRouteTableOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteRouteTableOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteRouteTableOutput) GoString() string {
- return s.String()
-}
-
-type DeleteSecurityGroupInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the security group. Required for a nondefault VPC.
- GroupId *string `type:"string"`
-
- // [EC2-Classic, default VPC] The name of the security group. You can specify
- // either the security group name or the security group ID.
- GroupName *string `type:"string"`
-
- metadataDeleteSecurityGroupInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteSecurityGroupInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteSecurityGroupInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteSecurityGroupInput) GoString() string {
- return s.String()
-}
-
-type DeleteSecurityGroupOutput struct {
- metadataDeleteSecurityGroupOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteSecurityGroupOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteSecurityGroupOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteSecurityGroupOutput) GoString() string {
- return s.String()
-}
-
-type DeleteSnapshotInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the EBS snapshot.
- SnapshotId *string `type:"string" required:"true"`
-
- metadataDeleteSnapshotInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteSnapshotInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteSnapshotInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteSnapshotInput) GoString() string {
- return s.String()
-}
-
-type DeleteSnapshotOutput struct {
- metadataDeleteSnapshotOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteSnapshotOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteSnapshotOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteSnapshotOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for DeleteSpotDatafeedSubscription.
-type DeleteSpotDatafeedSubscriptionInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataDeleteSpotDatafeedSubscriptionInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteSpotDatafeedSubscriptionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteSpotDatafeedSubscriptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteSpotDatafeedSubscriptionInput) GoString() string {
- return s.String()
-}
-
-type DeleteSpotDatafeedSubscriptionOutput struct {
- metadataDeleteSpotDatafeedSubscriptionOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteSpotDatafeedSubscriptionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteSpotDatafeedSubscriptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string {
- return s.String()
-}
-
-type DeleteSubnetInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the subnet.
- SubnetId *string `type:"string" required:"true"`
-
- metadataDeleteSubnetInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteSubnetInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteSubnetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteSubnetInput) GoString() string {
- return s.String()
-}
-
-type DeleteSubnetOutput struct {
- metadataDeleteSubnetOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteSubnetOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteSubnetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteSubnetOutput) GoString() string {
- return s.String()
-}
-
-type DeleteTagsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the resource. For example, ami-1a2b3c4d. You can specify more than
- // one resource ID.
- Resources []*string `locationName:"resourceId" type:"list" required:"true"`
-
- // One or more tags to delete. If you omit the value parameter, we delete the
- // tag regardless of its value. If you specify this parameter with an empty
- // string as the value, we delete the key only if its value is an empty string.
- Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"`
-
- metadataDeleteTagsInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteTagsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteTagsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteTagsInput) GoString() string {
- return s.String()
-}
-
-type DeleteTagsOutput struct {
- metadataDeleteTagsOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteTagsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteTagsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteTagsOutput) GoString() string {
- return s.String()
-}
-
-type DeleteVolumeInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the volume.
- VolumeId *string `type:"string" required:"true"`
-
- metadataDeleteVolumeInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVolumeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVolumeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVolumeInput) GoString() string {
- return s.String()
-}
-
-type DeleteVolumeOutput struct {
- metadataDeleteVolumeOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVolumeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVolumeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVolumeOutput) GoString() string {
- return s.String()
-}
-
-type DeleteVpcEndpointsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // One or more endpoint IDs.
- VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"`
-
- metadataDeleteVpcEndpointsInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpcEndpointsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpcEndpointsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpcEndpointsInput) GoString() string {
- return s.String()
-}
-
-type DeleteVpcEndpointsOutput struct {
- // Information about the endpoints that were not successfully deleted.
- Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
-
- metadataDeleteVpcEndpointsOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpcEndpointsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpcEndpointsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpcEndpointsOutput) GoString() string {
- return s.String()
-}
-
-type DeleteVpcInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `type:"string" required:"true"`
-
- metadataDeleteVpcInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpcInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpcInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpcInput) GoString() string {
- return s.String()
-}
-
-type DeleteVpcOutput struct {
- metadataDeleteVpcOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpcOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpcOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpcOutput) GoString() string {
- return s.String()
-}
-
-type DeleteVpcPeeringConnectionInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC peering connection.
- VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"`
-
- metadataDeleteVpcPeeringConnectionInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpcPeeringConnectionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpcPeeringConnectionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpcPeeringConnectionInput) GoString() string {
- return s.String()
-}
-
-type DeleteVpcPeeringConnectionOutput struct {
- // Returns true if the request succeeds; otherwise, it returns an error.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataDeleteVpcPeeringConnectionOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpcPeeringConnectionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpcPeeringConnectionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpcPeeringConnectionOutput) GoString() string {
- return s.String()
-}
-
-type DeleteVpnConnectionInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPN connection.
- VpnConnectionId *string `type:"string" required:"true"`
-
- metadataDeleteVpnConnectionInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpnConnectionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpnConnectionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpnConnectionInput) GoString() string {
- return s.String()
-}
-
-type DeleteVpnConnectionOutput struct {
- metadataDeleteVpnConnectionOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpnConnectionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpnConnectionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpnConnectionOutput) GoString() string {
- return s.String()
-}
-
-type DeleteVpnConnectionRouteInput struct {
- // The CIDR block associated with the local subnet of the customer network.
- DestinationCidrBlock *string `type:"string" required:"true"`
-
- // The ID of the VPN connection.
- VpnConnectionId *string `type:"string" required:"true"`
-
- metadataDeleteVpnConnectionRouteInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpnConnectionRouteInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpnConnectionRouteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpnConnectionRouteInput) GoString() string {
- return s.String()
-}
-
-type DeleteVpnConnectionRouteOutput struct {
- metadataDeleteVpnConnectionRouteOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpnConnectionRouteOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpnConnectionRouteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpnConnectionRouteOutput) GoString() string {
- return s.String()
-}
-
-type DeleteVpnGatewayInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the virtual private gateway.
- VpnGatewayId *string `type:"string" required:"true"`
-
- metadataDeleteVpnGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpnGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpnGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpnGatewayInput) GoString() string {
- return s.String()
-}
-
-type DeleteVpnGatewayOutput struct {
- metadataDeleteVpnGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataDeleteVpnGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteVpnGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteVpnGatewayOutput) GoString() string {
- return s.String()
-}
-
-type DeregisterImageInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the AMI.
- ImageId *string `type:"string" required:"true"`
-
- metadataDeregisterImageInput `json:"-" xml:"-"`
-}
-
-type metadataDeregisterImageInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeregisterImageInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeregisterImageInput) GoString() string {
- return s.String()
-}
-
-type DeregisterImageOutput struct {
- metadataDeregisterImageOutput `json:"-" xml:"-"`
-}
-
-type metadataDeregisterImageOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeregisterImageOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeregisterImageOutput) GoString() string {
- return s.String()
-}
-
-type DescribeAccountAttributesInput struct {
- // One or more account attribute names.
- AttributeNames []*string `locationName:"attributeName" locationNameList:"attributeName" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataDescribeAccountAttributesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAccountAttributesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAccountAttributesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAccountAttributesInput) GoString() string {
- return s.String()
-}
-
-type DescribeAccountAttributesOutput struct {
- // Information about one or more account attributes.
- AccountAttributes []*AccountAttribute `locationName:"accountAttributeSet" locationNameList:"item" type:"list"`
-
- metadataDescribeAccountAttributesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAccountAttributesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAccountAttributesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAccountAttributesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeAddressesInput struct {
- // [EC2-VPC] One or more allocation IDs.
- //
- // Default: Describes all your Elastic IP addresses.
- AllocationIds []*string `locationName:"AllocationId" locationNameList:"AllocationId" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters. Filter names and values are case-sensitive.
- //
- // allocation-id - [EC2-VPC] The allocation ID for the address.
- //
- // association-id - [EC2-VPC] The association ID for the address.
- //
- // domain - Indicates whether the address is for use in EC2-Classic (standard)
- // or in a VPC (vpc).
- //
- // instance-id - The ID of the instance the address is associated with, if
- // any.
- //
- // network-interface-id - [EC2-VPC] The ID of the network interface that
- // the address is associated with, if any.
- //
- // network-interface-owner-id - The AWS account ID of the owner.
- //
- // private-ip-address - [EC2-VPC] The private IP address associated with
- // the Elastic IP address.
- //
- // public-ip - The Elastic IP address.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // [EC2-Classic] One or more Elastic IP addresses.
- //
- // Default: Describes all your Elastic IP addresses.
- PublicIps []*string `locationName:"PublicIp" locationNameList:"PublicIp" type:"list"`
-
- metadataDescribeAddressesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAddressesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAddressesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAddressesInput) GoString() string {
- return s.String()
-}
-
-type DescribeAddressesOutput struct {
- // Information about one or more Elastic IP addresses.
- Addresses []*Address `locationName:"addressesSet" locationNameList:"item" type:"list"`
-
- metadataDescribeAddressesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAddressesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAddressesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAddressesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeAvailabilityZonesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // message - Information about the Availability Zone.
- //
- // region-name - The name of the region for the Availability Zone (for example,
- // us-east-1).
- //
- // state - The state of the Availability Zone (available | information |
- // impaired | unavailable).
- //
- // zone-name - The name of the Availability Zone (for example, us-east-1a).
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The names of one or more Availability Zones.
- ZoneNames []*string `locationName:"ZoneName" locationNameList:"ZoneName" type:"list"`
-
- metadataDescribeAvailabilityZonesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAvailabilityZonesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAvailabilityZonesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAvailabilityZonesInput) GoString() string {
- return s.String()
-}
-
-type DescribeAvailabilityZonesOutput struct {
- // Information about one or more Availability Zones.
- AvailabilityZones []*AvailabilityZone `locationName:"availabilityZoneInfo" locationNameList:"item" type:"list"`
-
- metadataDescribeAvailabilityZonesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeAvailabilityZonesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAvailabilityZonesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAvailabilityZonesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeBundleTasksInput struct {
- // One or more bundle task IDs.
- //
- // Default: Describes all your bundle tasks.
- BundleIds []*string `locationName:"BundleId" locationNameList:"BundleId" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // bundle-id - The ID of the bundle task.
- //
- // error-code - If the task failed, the error code returned.
- //
- // error-message - If the task failed, the error message returned.
- //
- // instance-id - The ID of the instance.
- //
- // progress - The level of task completion, as a percentage (for example,
- // 20%).
- //
- // s3-bucket - The Amazon S3 bucket to store the AMI.
- //
- // s3-prefix - The beginning of the AMI name.
- //
- // start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z).
- //
- // state - The state of the task (pending | waiting-for-shutdown | bundling
- // | storing | cancelling | complete | failed).
- //
- // update-time - The time of the most recent update for the task.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- metadataDescribeBundleTasksInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeBundleTasksInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeBundleTasksInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeBundleTasksInput) GoString() string {
- return s.String()
-}
-
-type DescribeBundleTasksOutput struct {
- // Information about one or more bundle tasks.
- BundleTasks []*BundleTask `locationName:"bundleInstanceTasksSet" locationNameList:"item" type:"list"`
-
- metadataDescribeBundleTasksOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeBundleTasksOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeBundleTasksOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeBundleTasksOutput) GoString() string {
- return s.String()
-}
-
-type DescribeClassicLinkInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // group-id - The ID of a VPC security group that's associated with the instance.
- //
- // instance-id - The ID of the instance.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // vpc-id - The ID of the VPC that the instance is linked to.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more instance IDs. Must be instances linked to a VPC through ClassicLink.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"`
-
- // The maximum number of results to return for the request in a single page.
- // The remaining results of the initial request can be seen by sending another
- // request with the returned NextToken value. This value can be between 5 and
- // 1000; if MaxResults is given a value larger than 1000, only 1000 results
- // are returned. You cannot specify this parameter and the instance IDs parameter
- // in the same request.
- //
- // Constraint: If the value is greater than 1000, we return only 1000 items.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The token to retrieve the next page of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeClassicLinkInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeClassicLinkInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeClassicLinkInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeClassicLinkInstancesInput) GoString() string {
- return s.String()
-}
-
-type DescribeClassicLinkInstancesOutput struct {
- // Information about one or more linked EC2-Classic instances.
- Instances []*ClassicLinkInstance `locationName:"instancesSet" locationNameList:"item" type:"list"`
-
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeClassicLinkInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeClassicLinkInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeClassicLinkInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeClassicLinkInstancesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeConversionTasksInput struct {
- // One or more conversion task IDs.
- ConversionTaskIds []*string `locationName:"conversionTaskId" locationNameList:"item" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"`
-
- metadataDescribeConversionTasksInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeConversionTasksInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeConversionTasksInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeConversionTasksInput) GoString() string {
- return s.String()
-}
-
-type DescribeConversionTasksOutput struct {
- // Information about the conversion tasks.
- ConversionTasks []*ConversionTask `locationName:"conversionTasks" locationNameList:"item" type:"list"`
-
- metadataDescribeConversionTasksOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeConversionTasksOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeConversionTasksOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeConversionTasksOutput) GoString() string {
- return s.String()
-}
-
-type DescribeCustomerGatewaysInput struct {
- // One or more customer gateway IDs.
- //
- // Default: Describes all your customer gateways.
- CustomerGatewayIds []*string `locationName:"CustomerGatewayId" locationNameList:"CustomerGatewayId" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous
- // System Number (ASN).
- //
- // customer-gateway-id - The ID of the customer gateway.
- //
- // ip-address - The IP address of the customer gateway's Internet-routable
- // external interface.
- //
- // state - The state of the customer gateway (pending | available | deleting
- // | deleted).
- //
- // type - The type of customer gateway. Currently, the only supported type
- // is ipsec.1.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- metadataDescribeCustomerGatewaysInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeCustomerGatewaysInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeCustomerGatewaysInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeCustomerGatewaysInput) GoString() string {
- return s.String()
-}
-
-type DescribeCustomerGatewaysOutput struct {
- // Information about one or more customer gateways.
- CustomerGateways []*CustomerGateway `locationName:"customerGatewaySet" locationNameList:"item" type:"list"`
-
- metadataDescribeCustomerGatewaysOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeCustomerGatewaysOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeCustomerGatewaysOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeCustomerGatewaysOutput) GoString() string {
- return s.String()
-}
-
-type DescribeDhcpOptionsInput struct {
- // The IDs of one or more DHCP options sets.
- //
- // Default: Describes all your DHCP options sets.
- DhcpOptionsIds []*string `locationName:"DhcpOptionsId" locationNameList:"DhcpOptionsId" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // dhcp-options-id - The ID of a set of DHCP options.
- //
- // key - The key for one of the options (for example, domain-name).
- //
- // value - The value for one of the options.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- metadataDescribeDhcpOptionsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeDhcpOptionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeDhcpOptionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeDhcpOptionsInput) GoString() string {
- return s.String()
-}
-
-type DescribeDhcpOptionsOutput struct {
- // Information about one or more DHCP options sets.
- DhcpOptions []*DhcpOptions `locationName:"dhcpOptionsSet" locationNameList:"item" type:"list"`
-
- metadataDescribeDhcpOptionsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeDhcpOptionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeDhcpOptionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeDhcpOptionsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeExportTasksInput struct {
- // One or more export task IDs.
- ExportTaskIds []*string `locationName:"exportTaskId" locationNameList:"ExportTaskId" type:"list"`
-
- metadataDescribeExportTasksInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeExportTasksInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeExportTasksInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeExportTasksInput) GoString() string {
- return s.String()
-}
-
-type DescribeExportTasksOutput struct {
- // Information about the export tasks.
- ExportTasks []*ExportTask `locationName:"exportTaskSet" locationNameList:"item" type:"list"`
-
- metadataDescribeExportTasksOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeExportTasksOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeExportTasksOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeExportTasksOutput) GoString() string {
- return s.String()
-}
-
-type DescribeFlowLogsInput struct {
- // One or more filters.
- //
- // deliver-log-status - The status of the logs delivery (SUCCESS | FAILED).
- //
- // flow-log-id - The ID of the flow log.
- //
- // log-group-name - The name of the log group.
- //
- // resource-id - The ID of the VPC, subnet, or network interface.
- //
- // traffic-type - The type of traffic (ACCEPT | REJECT | ALL)
- Filter []*Filter `locationNameList:"Filter" type:"list"`
-
- // One or more flow log IDs.
- FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list"`
-
- // The maximum number of results to return for the request in a single page.
- // The remaining results can be seen by sending another request with the returned
- // NextToken value. This value can be between 5 and 1000; if MaxResults is given
- // a value larger than 1000, only 1000 results are returned. You cannot specify
- // this parameter and the flow log IDs parameter in the same request.
- MaxResults *int64 `type:"integer"`
-
- // The token to retrieve the next page of results.
- NextToken *string `type:"string"`
-
- metadataDescribeFlowLogsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeFlowLogsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeFlowLogsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeFlowLogsInput) GoString() string {
- return s.String()
-}
-
-type DescribeFlowLogsOutput struct {
- // Information about the flow logs.
- FlowLogs []*FlowLog `locationName:"flowLogSet" locationNameList:"item" type:"list"`
-
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeFlowLogsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeFlowLogsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeFlowLogsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeFlowLogsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeImageAttributeInput struct {
- // The AMI attribute.
- //
- // Note: Depending on your account privileges, the blockDeviceMapping attribute
- // may return a Client.AuthFailure error. If this happens, use DescribeImages
- // to get information about the block device mapping for the AMI.
- Attribute *string `type:"string" required:"true" enum:"ImageAttributeName"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the AMI.
- ImageId *string `type:"string" required:"true"`
-
- metadataDescribeImageAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeImageAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeImageAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeImageAttributeInput) GoString() string {
- return s.String()
-}
-
-// Describes an image attribute.
-type DescribeImageAttributeOutput struct {
- // One or more block device mapping entries.
- BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
-
- // A description for the AMI.
- Description *AttributeValue `locationName:"description" type:"structure"`
-
- // The ID of the AMI.
- ImageId *string `locationName:"imageId" type:"string"`
-
- // The kernel ID.
- KernelId *AttributeValue `locationName:"kernel" type:"structure"`
-
- // One or more launch permissions.
- LaunchPermissions []*LaunchPermission `locationName:"launchPermission" locationNameList:"item" type:"list"`
-
- // One or more product codes.
- ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
-
- // The RAM disk ID.
- RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"`
-
- // The value to use for a resource attribute.
- SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"`
-
- metadataDescribeImageAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeImageAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeImageAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeImageAttributeOutput) GoString() string {
- return s.String()
-}
-
-type DescribeImagesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Scopes the images by users with explicit launch permissions. Specify an AWS
- // account ID, self (the sender of the request), or all (public AMIs).
- ExecutableUsers []*string `locationName:"ExecutableBy" locationNameList:"ExecutableBy" type:"list"`
-
- // One or more filters.
- //
- // architecture - The image architecture (i386 | x86_64).
- //
- // block-device-mapping.delete-on-termination - A Boolean value that indicates
- // whether the Amazon EBS volume is deleted on instance termination.
- //
- // block-device-mapping.device-name - The device name for the EBS volume
- // (for example, /dev/sdh).
- //
- // block-device-mapping.snapshot-id - The ID of the snapshot used for the
- // EBS volume.
- //
- // block-device-mapping.volume-size - The volume size of the EBS volume,
- // in GiB.
- //
- // block-device-mapping.volume-type - The volume type of the EBS volume (gp2
- // | standard | io1).
- //
- // description - The description of the image (provided during image creation).
- //
- // hypervisor - The hypervisor type (ovm | xen).
- //
- // image-id - The ID of the image.
- //
- // image-type - The image type (machine | kernel | ramdisk).
- //
- // is-public - A Boolean that indicates whether the image is public.
- //
- // kernel-id - The kernel ID.
- //
- // manifest-location - The location of the image manifest.
- //
- // name - The name of the AMI (provided during image creation).
- //
- // owner-alias - The AWS account alias (for example, amazon).
- //
- // owner-id - The AWS account ID of the image owner.
- //
- // platform - The platform. To only list Windows-based AMIs, use windows.
- //
- // product-code - The product code.
- //
- // product-code.type - The type of the product code (devpay | marketplace).
- //
- // ramdisk-id - The RAM disk ID.
- //
- // root-device-name - The name of the root device volume (for example, /dev/sda1).
- //
- // root-device-type - The type of the root device volume (ebs | instance-store).
- //
- // state - The state of the image (available | pending | failed).
- //
- // state-reason-code - The reason code for the state change.
- //
- // state-reason-message - The message for the state change.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // virtualization-type - The virtualization type (paravirtual | hvm).
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more image IDs.
- //
- // Default: Describes all images available to you.
- ImageIds []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"`
-
- // Filters the images by the owner. Specify an AWS account ID, amazon (owner
- // is Amazon), aws-marketplace (owner is AWS Marketplace), self (owner is the
- // sender of the request). Omitting this option returns all images for which
- // you have launch permissions, regardless of ownership.
- Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"`
-
- metadataDescribeImagesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeImagesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeImagesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeImagesInput) GoString() string {
- return s.String()
-}
-
-type DescribeImagesOutput struct {
- // Information about one or more images.
- Images []*Image `locationName:"imagesSet" locationNameList:"item" type:"list"`
-
- metadataDescribeImagesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeImagesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeImagesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeImagesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeImportImageTasksInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // One or more filters.
- Filters []*Filter `locationNameList:"Filter" type:"list"`
-
- // A list of import image task IDs.
- ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"`
-
- // The maximum number of results to return in a single request.
- MaxResults *int64 `type:"integer"`
-
- // A token that indicates the next page of results.
- NextToken *string `type:"string"`
-
- metadataDescribeImportImageTasksInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeImportImageTasksInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeImportImageTasksInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeImportImageTasksInput) GoString() string {
- return s.String()
-}
-
-type DescribeImportImageTasksOutput struct {
- // A list of zero or more import image tasks that are currently active or were
- // completed or canceled in the previous 7 days.
- ImportImageTasks []*ImportImageTask `locationName:"importImageTaskSet" locationNameList:"item" type:"list"`
-
- // The token to use to get the next page of results. This value is null when
- // there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeImportImageTasksOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeImportImageTasksOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeImportImageTasksOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeImportImageTasksOutput) GoString() string {
- return s.String()
-}
-
-type DescribeImportSnapshotTasksInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // One or more filters.
- Filters []*Filter `locationNameList:"Filter" type:"list"`
-
- // A list of import snapshot task IDs.
- ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"`
-
- // The maximum number of results to return in a single request.
- MaxResults *int64 `type:"integer"`
-
- // A token that indicates the next page of results.
- NextToken *string `type:"string"`
-
- metadataDescribeImportSnapshotTasksInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeImportSnapshotTasksInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeImportSnapshotTasksInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeImportSnapshotTasksInput) GoString() string {
- return s.String()
-}
-
-type DescribeImportSnapshotTasksOutput struct {
- // A list of zero or more import snapshot tasks that are currently active or
- // were completed or canceled in the previous 7 days.
- ImportSnapshotTasks []*ImportSnapshotTask `locationName:"importSnapshotTaskSet" locationNameList:"item" type:"list"`
-
- // The token to use to get the next page of results. This value is null when
- // there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeImportSnapshotTasksOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeImportSnapshotTasksOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeImportSnapshotTasksOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeImportSnapshotTasksOutput) GoString() string {
- return s.String()
-}
-
-type DescribeInstanceAttributeInput struct {
- // The instance attribute.
- Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string" required:"true"`
-
- metadataDescribeInstanceAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeInstanceAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeInstanceAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeInstanceAttributeInput) GoString() string {
- return s.String()
-}
-
-// Describes an instance attribute.
-type DescribeInstanceAttributeOutput struct {
- // The block device mapping of the instance.
- BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
-
- // If the value is true, you can't terminate the instance through the Amazon
- // EC2 console, CLI, or API; otherwise, you can.
- DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"`
-
- // Indicates whether the instance is optimized for EBS I/O.
- EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"`
-
- // The security groups associated with the instance.
- Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // Indicates whether an instance stops or terminates when you initiate shutdown
- // from the instance (using the operating system command for system shutdown).
- InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"`
-
- // The instance type.
- InstanceType *AttributeValue `locationName:"instanceType" type:"structure"`
-
- // The kernel ID.
- KernelId *AttributeValue `locationName:"kernel" type:"structure"`
-
- // A list of product codes.
- ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
-
- // The RAM disk ID.
- RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"`
-
- // The name of the root device (for example, /dev/sda1 or /dev/xvda).
- RootDeviceName *AttributeValue `locationName:"rootDeviceName" type:"structure"`
-
- // Indicates whether source/destination checking is enabled. A value of true
- // means checking is enabled, and false means checking is disabled. This value
- // must be false for a NAT instance to perform NAT.
- SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"`
-
- // The value to use for a resource attribute.
- SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"`
-
- // The Base64-encoded MIME user data.
- UserData *AttributeValue `locationName:"userData" type:"structure"`
-
- metadataDescribeInstanceAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeInstanceAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeInstanceAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeInstanceAttributeOutput) GoString() string {
- return s.String()
-}
-
-type DescribeInstanceStatusInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // availability-zone - The Availability Zone of the instance.
- //
- // event.code - The code for the scheduled event (instance-reboot | system-reboot
- // | system-maintenance | instance-retirement | instance-stop).
- //
- // event.description - A description of the event.
- //
- // event.not-after - The latest end time for the scheduled event (for example,
- // 2014-09-15T17:15:20.000Z).
- //
- // event.not-before - The earliest start time for the scheduled event (for
- // example, 2014-09-15T17:15:20.000Z).
- //
- // instance-state-code - The code for the instance state, as a 16-bit unsigned
- // integer. The high byte is an opaque internal value and should be ignored.
- // The low byte is set based on the state represented. The valid values are
- // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping),
- // and 80 (stopped).
- //
- // instance-state-name - The state of the instance (pending | running | shutting-down
- // | terminated | stopping | stopped).
- //
- // instance-status.reachability - Filters on instance status where the name
- // is reachability (passed | failed | initializing | insufficient-data).
- //
- // instance-status.status - The status of the instance (ok | impaired | initializing
- // | insufficient-data | not-applicable).
- //
- // system-status.reachability - Filters on system status where the name is
- // reachability (passed | failed | initializing | insufficient-data).
- //
- // system-status.status - The system status of the instance (ok | impaired
- // | initializing | insufficient-data | not-applicable).
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // When true, includes the health status for all instances. When false, includes
- // the health status for running instances only.
- //
- // Default: false
- IncludeAllInstances *bool `locationName:"includeAllInstances" type:"boolean"`
-
- // One or more instance IDs.
- //
- // Default: Describes all your instances.
- //
- // Constraints: Maximum 100 explicitly specified instance IDs.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"`
-
- // The maximum number of results to return for the request in a single page.
- // The remaining results of the initial request can be seen by sending another
- // request with the returned NextToken value. This value can be between 5 and
- // 1000; if MaxResults is given a value larger than 1000, only 1000 results
- // are returned. You cannot specify this parameter and the instance IDs parameter
- // in the same request.
- MaxResults *int64 `type:"integer"`
-
- // The token to retrieve the next page of results.
- NextToken *string `type:"string"`
-
- metadataDescribeInstanceStatusInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeInstanceStatusInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeInstanceStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeInstanceStatusInput) GoString() string {
- return s.String()
-}
-
-type DescribeInstanceStatusOutput struct {
- // One or more instance status descriptions.
- InstanceStatuses []*InstanceStatus `locationName:"instanceStatusSet" locationNameList:"item" type:"list"`
-
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeInstanceStatusOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeInstanceStatusOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeInstanceStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeInstanceStatusOutput) GoString() string {
- return s.String()
-}
-
-type DescribeInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // architecture - The instance architecture (i386 | x86_64).
- //
- // availability-zone - The Availability Zone of the instance.
- //
- // block-device-mapping.attach-time - The attach time for an EBS volume mapped
- // to the instance, for example, 2010-09-15T17:15:20.000Z.
- //
- // block-device-mapping.delete-on-termination - A Boolean that indicates
- // whether the EBS volume is deleted on instance termination.
- //
- // block-device-mapping.device-name - The device name for the EBS volume
- // (for example, /dev/sdh or xvdh).
- //
- // block-device-mapping.status - The status for the EBS volume (attaching
- // | attached | detaching | detached).
- //
- // block-device-mapping.volume-id - The volume ID of the EBS volume.
- //
- // client-token - The idempotency token you provided when you launched the
- // instance.
- //
- // dns-name - The public DNS name of the instance.
- //
- // group-id - The ID of the security group for the instance. EC2-Classic
- // only.
- //
- // group-name - The name of the security group for the instance. EC2-Classic
- // only.
- //
- // hypervisor - The hypervisor type of the instance (ovm | xen).
- //
- // iam-instance-profile.arn - The instance profile associated with the instance.
- // Specified as an ARN.
- //
- // image-id - The ID of the image used to launch the instance.
- //
- // instance-id - The ID of the instance.
- //
- // instance-lifecycle - Indicates whether this is a Spot Instance (spot).
- //
- // instance-state-code - The state of the instance, as a 16-bit unsigned
- // integer. The high byte is an opaque internal value and should be ignored.
- // The low byte is set based on the state represented. The valid values are:
- // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping),
- // and 80 (stopped).
- //
- // instance-state-name - The state of the instance (pending | running | shutting-down
- // | terminated | stopping | stopped).
- //
- // instance-type - The type of instance (for example, t2.micro).
- //
- // instance.group-id - The ID of the security group for the instance.
- //
- // instance.group-name - The name of the security group for the instance.
- //
- // ip-address - The public IP address of the instance.
- //
- // kernel-id - The kernel ID.
- //
- // key-name - The name of the key pair used when the instance was launched.
- //
- // launch-index - When launching multiple instances, this is the index for
- // the instance in the launch group (for example, 0, 1, 2, and so on).
- //
- // launch-time - The time when the instance was launched.
- //
- // monitoring-state - Indicates whether monitoring is enabled for the instance
- // (disabled | enabled).
- //
- // owner-id - The AWS account ID of the instance owner.
- //
- // placement-group-name - The name of the placement group for the instance.
- //
- // platform - The platform. Use windows if you have Windows instances; otherwise,
- // leave blank.
- //
- // private-dns-name - The private DNS name of the instance.
- //
- // private-ip-address - The private IP address of the instance.
- //
- // product-code - The product code associated with the AMI used to launch
- // the instance.
- //
- // product-code.type - The type of product code (devpay | marketplace).
- //
- // ramdisk-id - The RAM disk ID.
- //
- // reason - The reason for the current state of the instance (for example,
- // shows "User Initiated [date]" when you stop or terminate the instance). Similar
- // to the state-reason-code filter.
- //
- // requester-id - The ID of the entity that launched the instance on your
- // behalf (for example, AWS Management Console, Auto Scaling, and so on).
- //
- // reservation-id - The ID of the instance's reservation. A reservation ID
- // is created any time you launch an instance. A reservation ID has a one-to-one
- // relationship with an instance launch request, but can be associated with
- // more than one instance if you launch multiple instances using the same launch
- // request. For example, if you launch one instance, you'll get one reservation
- // ID. If you launch ten instances using the same launch request, you'll also
- // get one reservation ID.
- //
- // root-device-name - The name of the root device for the instance (for example,
- // /dev/sda1 or /dev/xvda).
- //
- // root-device-type - The type of root device that the instance uses (ebs
- // | instance-store).
- //
- // source-dest-check - Indicates whether the instance performs source/destination
- // checking. A value of true means that checking is enabled, and false means
- // checking is disabled. The value must be false for the instance to perform
- // network address translation (NAT) in your VPC.
- //
- // spot-instance-request-id - The ID of the Spot Instance request.
- //
- // state-reason-code - The reason code for the state change.
- //
- // state-reason-message - A message that describes the state change.
- //
- // subnet-id - The ID of the subnet for the instance.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource,
- // where tag:key is the tag's key.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // tenancy - The tenancy of an instance (dedicated | default).
- //
- // virtualization-type - The virtualization type of the instance (paravirtual
- // | hvm).
- //
- // vpc-id - The ID of the VPC that the instance is running in.
- //
- // network-interface.description - The description of the network interface.
- //
- // network-interface.subnet-id - The ID of the subnet for the network interface.
- //
- // network-interface.vpc-id - The ID of the VPC for the network interface.
- //
- // network-interface.network-interface-id - The ID of the network interface.
- //
- // network-interface.owner-id - The ID of the owner of the network interface.
- //
- // network-interface.availability-zone - The Availability Zone for the network
- // interface.
- //
- // network-interface.requester-id - The requester ID for the network interface.
- //
- // network-interface.requester-managed - Indicates whether the network interface
- // is being managed by AWS.
- //
- // network-interface.status - The status of the network interface (available)
- // | in-use).
- //
- // network-interface.mac-address - The MAC address of the network interface.
- //
- // network-interface-private-dns-name - The private DNS name of the network
- // interface.
- //
- // network-interface.source-dest-check - Whether the network interface performs
- // source/destination checking. A value of true means checking is enabled, and
- // false means checking is disabled. The value must be false for the network
- // interface to perform network address translation (NAT) in your VPC.
- //
- // network-interface.group-id - The ID of a security group associated with
- // the network interface.
- //
- // network-interface.group-name - The name of a security group associated
- // with the network interface.
- //
- // network-interface.attachment.attachment-id - The ID of the interface attachment.
- //
- // network-interface.attachment.instance-id - The ID of the instance to which
- // the network interface is attached.
- //
- // network-interface.attachment.instance-owner-id - The owner ID of the instance
- // to which the network interface is attached.
- //
- // network-interface.addresses.private-ip-address - The private IP address
- // associated with the network interface.
- //
- // network-interface.attachment.device-index - The device index to which
- // the network interface is attached.
- //
- // network-interface.attachment.status - The status of the attachment (attaching
- // | attached | detaching | detached).
- //
- // network-interface.attachment.attach-time - The time that the network interface
- // was attached to an instance.
- //
- // network-interface.attachment.delete-on-termination - Specifies whether
- // the attachment is deleted when an instance is terminated.
- //
- // network-interface.addresses.primary - Specifies whether the IP address
- // of the network interface is the primary private IP address.
- //
- // network-interface.addresses.association.public-ip - The ID of the association
- // of an Elastic IP address with a network interface.
- //
- // network-interface.addresses.association.ip-owner-id - The owner ID of
- // the private IP address associated with the network interface.
- //
- // association.public-ip - The address of the Elastic IP address bound to
- // the network interface.
- //
- // association.ip-owner-id - The owner of the Elastic IP address associated
- // with the network interface.
- //
- // association.allocation-id - The allocation ID returned when you allocated
- // the Elastic IP address for your network interface.
- //
- // association.association-id - The association ID returned when the network
- // interface was associated with an IP address.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more instance IDs.
- //
- // Default: Describes all your instances.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"`
-
- // The maximum number of results to return for the request in a single page.
- // The remaining results of the initial request can be seen by sending another
- // request with the returned NextToken value. This value can be between 5 and
- // 1000; if MaxResults is given a value larger than 1000, only 1000 results
- // are returned. You cannot specify this parameter and the instance IDs parameter
- // in the same request.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The token to request the next page of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeInstancesInput) GoString() string {
- return s.String()
-}
-
-type DescribeInstancesOutput struct {
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // One or more reservations.
- Reservations []*Reservation `locationName:"reservationSet" locationNameList:"item" type:"list"`
-
- metadataDescribeInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeInstancesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeInternetGatewaysInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // attachment.state - The current state of the attachment between the gateway
- // and the VPC (available). Present only if a VPC is attached.
- //
- // attachment.vpc-id - The ID of an attached VPC.
- //
- // internet-gateway-id - The ID of the Internet gateway.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more Internet gateway IDs.
- //
- // Default: Describes all your Internet gateways.
- InternetGatewayIds []*string `locationName:"internetGatewayId" locationNameList:"item" type:"list"`
-
- metadataDescribeInternetGatewaysInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeInternetGatewaysInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeInternetGatewaysInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeInternetGatewaysInput) GoString() string {
- return s.String()
-}
-
-type DescribeInternetGatewaysOutput struct {
- // Information about one or more Internet gateways.
- InternetGateways []*InternetGateway `locationName:"internetGatewaySet" locationNameList:"item" type:"list"`
-
- metadataDescribeInternetGatewaysOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeInternetGatewaysOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeInternetGatewaysOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeInternetGatewaysOutput) GoString() string {
- return s.String()
-}
-
-type DescribeKeyPairsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // fingerprint - The fingerprint of the key pair.
- //
- // key-name - The name of the key pair.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more key pair names.
- //
- // Default: Describes all your key pairs.
- KeyNames []*string `locationName:"KeyName" locationNameList:"KeyName" type:"list"`
-
- metadataDescribeKeyPairsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeKeyPairsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeKeyPairsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeKeyPairsInput) GoString() string {
- return s.String()
-}
-
-type DescribeKeyPairsOutput struct {
- // Information about one or more key pairs.
- KeyPairs []*KeyPairInfo `locationName:"keySet" locationNameList:"item" type:"list"`
-
- metadataDescribeKeyPairsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeKeyPairsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeKeyPairsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeKeyPairsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeMovingAddressesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // moving-status - The status of the Elastic IP address (MovingToVpc | RestoringToClassic).
- Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"`
-
- // The maximum number of results to return for the request in a single page.
- // The remaining results of the initial request can be seen by sending another
- // request with the returned NextToken value. This value can be between 5 and
- // 1000; if MaxResults is given a value outside of this range, an error is returned.
- //
- // Default: If no value is provided, the default is 1000.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The token to use to retrieve the next page of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // One or more Elastic IP addresses.
- PublicIps []*string `locationName:"publicIp" locationNameList:"item" type:"list"`
-
- metadataDescribeMovingAddressesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeMovingAddressesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeMovingAddressesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeMovingAddressesInput) GoString() string {
- return s.String()
-}
-
-type DescribeMovingAddressesOutput struct {
- // The status for each Elastic IP address.
- MovingAddressStatuses []*MovingAddressStatus `locationName:"movingAddressStatusSet" locationNameList:"item" type:"list"`
-
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeMovingAddressesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeMovingAddressesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeMovingAddressesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeMovingAddressesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeNetworkAclsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // association.association-id - The ID of an association ID for the ACL.
- //
- // association.network-acl-id - The ID of the network ACL involved in the
- // association.
- //
- // association.subnet-id - The ID of the subnet involved in the association.
- //
- // default - Indicates whether the ACL is the default network ACL for the
- // VPC.
- //
- // entry.cidr - The CIDR range specified in the entry.
- //
- // entry.egress - Indicates whether the entry applies to egress traffic.
- //
- // entry.icmp.code - The ICMP code specified in the entry, if any.
- //
- // entry.icmp.type - The ICMP type specified in the entry, if any.
- //
- // entry.port-range.from - The start of the port range specified in the entry.
- //
- // entry.port-range.to - The end of the port range specified in the entry.
- //
- // entry.protocol - The protocol specified in the entry (tcp | udp | icmp
- // or a protocol number).
- //
- // entry.rule-action - Allows or denies the matching traffic (allow | deny).
- //
- // entry.rule-number - The number of an entry (in other words, rule) in the
- // ACL's set of entries.
- //
- // network-acl-id - The ID of the network ACL.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // vpc-id - The ID of the VPC for the network ACL.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more network ACL IDs.
- //
- // Default: Describes all your network ACLs.
- NetworkAclIds []*string `locationName:"NetworkAclId" locationNameList:"item" type:"list"`
-
- metadataDescribeNetworkAclsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeNetworkAclsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeNetworkAclsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeNetworkAclsInput) GoString() string {
- return s.String()
-}
-
-type DescribeNetworkAclsOutput struct {
- // Information about one or more network ACLs.
- NetworkAcls []*NetworkAcl `locationName:"networkAclSet" locationNameList:"item" type:"list"`
-
- metadataDescribeNetworkAclsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeNetworkAclsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeNetworkAclsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeNetworkAclsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeNetworkInterfaceAttributeInput struct {
- // The attribute of the network interface.
- Attribute *string `locationName:"attribute" type:"string" enum:"NetworkInterfaceAttribute"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"`
-
- metadataDescribeNetworkInterfaceAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeNetworkInterfaceAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeNetworkInterfaceAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeNetworkInterfaceAttributeInput) GoString() string {
- return s.String()
-}
-
-type DescribeNetworkInterfaceAttributeOutput struct {
- // The attachment (if any) of the network interface.
- Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"`
-
- // The description of the network interface.
- Description *AttributeValue `locationName:"description" type:"structure"`
-
- // The security groups associated with the network interface.
- Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // Indicates whether source/destination checking is enabled.
- SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"`
-
- metadataDescribeNetworkInterfaceAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeNetworkInterfaceAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeNetworkInterfaceAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeNetworkInterfaceAttributeOutput) GoString() string {
- return s.String()
-}
-
-type DescribeNetworkInterfacesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // addresses.private-ip-address - The private IP addresses associated with
- // the network interface.
- //
- // addresses.primary - Whether the private IP address is the primary IP address
- // associated with the network interface.
- //
- // addresses.association.public-ip - The association ID returned when the
- // network interface was associated with the Elastic IP address.
- //
- // addresses.association.owner-id - The owner ID of the addresses associated
- // with the network interface.
- //
- // association.association-id - The association ID returned when the network
- // interface was associated with an IP address.
- //
- // association.allocation-id - The allocation ID returned when you allocated
- // the Elastic IP address for your network interface.
- //
- // association.ip-owner-id - The owner of the Elastic IP address associated
- // with the network interface.
- //
- // association.public-ip - The address of the Elastic IP address bound to
- // the network interface.
- //
- // association.public-dns-name - The public DNS name for the network interface.
- //
- // attachment.attachment-id - The ID of the interface attachment.
- //
- // attachment.instance-id - The ID of the instance to which the network interface
- // is attached.
- //
- // attachment.instance-owner-id - The owner ID of the instance to which the
- // network interface is attached.
- //
- // attachment.device-index - The device index to which the network interface
- // is attached.
- //
- // attachment.status - The status of the attachment (attaching | attached
- // | detaching | detached).
- //
- // attachment.attach.time - The time that the network interface was attached
- // to an instance.
- //
- // attachment.delete-on-termination - Indicates whether the attachment is
- // deleted when an instance is terminated.
- //
- // availability-zone - The Availability Zone of the network interface.
- //
- // description - The description of the network interface.
- //
- // group-id - The ID of a security group associated with the network interface.
- //
- // group-name - The name of a security group associated with the network
- // interface.
- //
- // mac-address - The MAC address of the network interface.
- //
- // network-interface-id - The ID of the network interface.
- //
- // owner-id - The AWS account ID of the network interface owner.
- //
- // private-ip-address - The private IP address or addresses of the network
- // interface.
- //
- // private-dns-name - The private DNS name of the network interface.
- //
- // requester-id - The ID of the entity that launched the instance on your
- // behalf (for example, AWS Management Console, Auto Scaling, and so on).
- //
- // requester-managed - Indicates whether the network interface is being managed
- // by an AWS service (for example, AWS Management Console, Auto Scaling, and
- // so on).
- //
- // source-desk-check - Indicates whether the network interface performs source/destination
- // checking. A value of true means checking is enabled, and false means checking
- // is disabled. The value must be false for the network interface to perform
- // Network Address Translation (NAT) in your VPC.
- //
- // status - The status of the network interface. If the network interface
- // is not attached to an instance, the status is available; if a network interface
- // is attached to an instance the status is in-use.
- //
- // subnet-id - The ID of the subnet for the network interface.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // vpc-id - The ID of the VPC for the network interface.
- Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"`
-
- // One or more network interface IDs.
- //
- // Default: Describes all your network interfaces.
- NetworkInterfaceIds []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"`
-
- metadataDescribeNetworkInterfacesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeNetworkInterfacesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeNetworkInterfacesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeNetworkInterfacesInput) GoString() string {
- return s.String()
-}
-
-type DescribeNetworkInterfacesOutput struct {
- // Information about one or more network interfaces.
- NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
-
- metadataDescribeNetworkInterfacesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeNetworkInterfacesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeNetworkInterfacesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeNetworkInterfacesOutput) GoString() string {
- return s.String()
-}
-
-type DescribePlacementGroupsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // group-name - The name of the placement group.
- //
- // state - The state of the placement group (pending | available | deleting
- // | deleted).
- //
- // strategy - The strategy of the placement group (cluster).
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more placement group names.
- //
- // Default: Describes all your placement groups, or only those otherwise specified.
- GroupNames []*string `locationName:"groupName" type:"list"`
-
- metadataDescribePlacementGroupsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribePlacementGroupsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribePlacementGroupsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribePlacementGroupsInput) GoString() string {
- return s.String()
-}
-
-type DescribePlacementGroupsOutput struct {
- // One or more placement groups.
- PlacementGroups []*PlacementGroup `locationName:"placementGroupSet" locationNameList:"item" type:"list"`
-
- metadataDescribePlacementGroupsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribePlacementGroupsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribePlacementGroupsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribePlacementGroupsOutput) GoString() string {
- return s.String()
-}
-
-type DescribePrefixListsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // One or more filters.
- //
- // prefix-list-id: The ID of a prefix list.
- //
- // prefix-list-name: The name of a prefix list.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The maximum number of items to return for this request. The request returns
- // a token that you can specify in a subsequent call to get the next set of
- // results.
- //
- // Constraint: If the value specified is greater than 1000, we return only
- // 1000 items.
- MaxResults *int64 `type:"integer"`
-
- // The token for the next set of items to return. (You received this token from
- // a prior call.)
- NextToken *string `type:"string"`
-
- // One or more prefix list IDs.
- PrefixListIds []*string `locationName:"PrefixListId" locationNameList:"item" type:"list"`
-
- metadataDescribePrefixListsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribePrefixListsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribePrefixListsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribePrefixListsInput) GoString() string {
- return s.String()
-}
-
-type DescribePrefixListsOutput struct {
- // The token to use when requesting the next set of items. If there are no additional
- // items to return, the string is empty.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // All available prefix lists.
- PrefixLists []*PrefixList `locationName:"prefixListSet" locationNameList:"item" type:"list"`
-
- metadataDescribePrefixListsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribePrefixListsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribePrefixListsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribePrefixListsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeRegionsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // endpoint - The endpoint of the region (for example, ec2.us-east-1.amazonaws.com).
- //
- // region-name - The name of the region (for example, us-east-1).
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The names of one or more regions.
- RegionNames []*string `locationName:"RegionName" locationNameList:"RegionName" type:"list"`
-
- metadataDescribeRegionsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeRegionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeRegionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeRegionsInput) GoString() string {
- return s.String()
-}
-
-type DescribeRegionsOutput struct {
- // Information about one or more regions.
- Regions []*Region `locationName:"regionInfo" locationNameList:"item" type:"list"`
-
- metadataDescribeRegionsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeRegionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeRegionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeRegionsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeReservedInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // availability-zone - The Availability Zone where the Reserved Instance
- // can be used.
- //
- // duration - The duration of the Reserved Instance (one year or three years),
- // in seconds (31536000 | 94608000).
- //
- // end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).
- //
- // fixed-price - The purchase price of the Reserved Instance (for example,
- // 9800.0).
- //
- // instance-type - The instance type on which the Reserved Instance can be
- // used.
- //
- // product-description - The Reserved Instance product platform description.
- // Instances that include (Amazon VPC) in the product platform description will
- // only be displayed to EC2-Classic account holders and are for use with Amazon
- // VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon
- // VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) |
- // Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows
- // with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows
- // with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows
- // with SQL Server Enterprise (Amazon VPC)).
- //
- // reserved-instances-id - The ID of the Reserved Instance.
- //
- // start - The time at which the Reserved Instance purchase request was placed
- // (for example, 2014-08-07T11:54:42.000Z).
- //
- // state - The state of the Reserved Instance (payment-pending | active |
- // payment-failed | retired).
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // usage-price - The usage price of the Reserved Instance, per hour (for
- // example, 0.84).
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The Reserved Instance offering type. If you are using tools that predate
- // the 2011-11-01 API version, you only have access to the Medium Utilization
- // Reserved Instance offering type.
- OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"`
-
- // One or more Reserved Instance IDs.
- //
- // Default: Describes all your Reserved Instances, or only those otherwise
- // specified.
- ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list"`
-
- metadataDescribeReservedInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeReservedInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReservedInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReservedInstancesInput) GoString() string {
- return s.String()
-}
-
-type DescribeReservedInstancesListingsInput struct {
- // One or more filters.
- //
- // reserved-instances-id - The ID of the Reserved Instances.
- //
- // reserved-instances-listing-id - The ID of the Reserved Instances listing.
- //
- // status - The status of the Reserved Instance listing (pending | active
- // | cancelled | closed).
- //
- // status-message - The reason for the status.
- Filters []*Filter `locationName:"filters" locationNameList:"Filter" type:"list"`
-
- // One or more Reserved Instance IDs.
- ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"`
-
- // One or more Reserved Instance Listing IDs.
- ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"`
-
- metadataDescribeReservedInstancesListingsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeReservedInstancesListingsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReservedInstancesListingsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReservedInstancesListingsInput) GoString() string {
- return s.String()
-}
-
-type DescribeReservedInstancesListingsOutput struct {
- // Information about the Reserved Instance listing.
- ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"`
-
- metadataDescribeReservedInstancesListingsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeReservedInstancesListingsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReservedInstancesListingsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReservedInstancesListingsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeReservedInstancesModificationsInput struct {
- // One or more filters.
- //
- // client-token - The idempotency token for the modification request.
- //
- // create-date - The time when the modification request was created.
- //
- // effective-date - The time when the modification becomes effective.
- //
- // modification-result.reserved-instances-id - The ID for the Reserved Instances
- // created as part of the modification request. This ID is only available when
- // the status of the modification is fulfilled.
- //
- // modification-result.target-configuration.availability-zone - The Availability
- // Zone for the new Reserved Instances.
- //
- // modification-result.target-configuration.instance-count - The number
- // of new Reserved Instances.
- //
- // modification-result.target-configuration.instance-type - The instance
- // type of the new Reserved Instances.
- //
- // modification-result.target-configuration.platform - The network platform
- // of the new Reserved Instances (EC2-Classic | EC2-VPC).
- //
- // reserved-instances-id - The ID of the Reserved Instances modified.
- //
- // reserved-instances-modification-id - The ID of the modification request.
- //
- // status - The status of the Reserved Instances modification request (processing
- // | fulfilled | failed).
- //
- // status-message - The reason for the status.
- //
- // update-date - The time when the modification request was last updated.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The token to retrieve the next page of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // IDs for the submitted modification request.
- ReservedInstancesModificationIds []*string `locationName:"ReservedInstancesModificationId" locationNameList:"ReservedInstancesModificationId" type:"list"`
-
- metadataDescribeReservedInstancesModificationsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeReservedInstancesModificationsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReservedInstancesModificationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReservedInstancesModificationsInput) GoString() string {
- return s.String()
-}
-
-type DescribeReservedInstancesModificationsOutput struct {
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // The Reserved Instance modification information.
- ReservedInstancesModifications []*ReservedInstancesModification `locationName:"reservedInstancesModificationsSet" locationNameList:"item" type:"list"`
-
- metadataDescribeReservedInstancesModificationsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeReservedInstancesModificationsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReservedInstancesModificationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReservedInstancesModificationsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeReservedInstancesOfferingsInput struct {
- // The Availability Zone in which the Reserved Instance can be used.
- AvailabilityZone *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // availability-zone - The Availability Zone where the Reserved Instance
- // can be used.
- //
- // duration - The duration of the Reserved Instance (for example, one year
- // or three years), in seconds (31536000 | 94608000).
- //
- // fixed-price - The purchase price of the Reserved Instance (for example,
- // 9800.0).
- //
- // instance-type - The instance type on which the Reserved Instance can be
- // used.
- //
- // marketplace - Set to true to show only Reserved Instance Marketplace offerings.
- // When this filter is not used, which is the default behavior, all offerings
- // from AWS and Reserved Instance Marketplace are listed.
- //
- // product-description - The Reserved Instance product platform description.
- // Instances that include (Amazon VPC) in the product platform description will
- // only be displayed to EC2-Classic account holders and are for use with Amazon
- // VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon
- // VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) |
- // Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows
- // with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows
- // with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows
- // with SQL Server Enterprise (Amazon VPC))
- //
- // reserved-instances-offering-id - The Reserved Instances offering ID.
- //
- // usage-price - The usage price of the Reserved Instance, per hour (for
- // example, 0.84).
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // Include Marketplace offerings in the response.
- IncludeMarketplace *bool `type:"boolean"`
-
- // The tenancy of the Reserved Instance offering. A Reserved Instance with dedicated
- // tenancy runs on single-tenant hardware and can only be launched within a
- // VPC.
- //
- // Default: default
- InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
-
- // The instance type on which the Reserved Instance can be used. For more information,
- // see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- InstanceType *string `type:"string" enum:"InstanceType"`
-
- // The maximum duration (in seconds) to filter when searching for offerings.
- //
- // Default: 94608000 (3 years)
- MaxDuration *int64 `type:"long"`
-
- // The maximum number of instances to filter when searching for offerings.
- //
- // Default: 20
- MaxInstanceCount *int64 `type:"integer"`
-
- // The maximum number of results to return for the request in a single page.
- // The remaining results of the initial request can be seen by sending another
- // request with the returned NextToken value. The maximum is 100.
- //
- // Default: 100
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The minimum duration (in seconds) to filter when searching for offerings.
- //
- // Default: 2592000 (1 month)
- MinDuration *int64 `type:"long"`
-
- // The token to retrieve the next page of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // The Reserved Instance offering type. If you are using tools that predate
- // the 2011-11-01 API version, you only have access to the Medium Utilization
- // Reserved Instance offering type.
- OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"`
-
- // The Reserved Instance product platform description. Instances that include
- // (Amazon VPC) in the description are for use with Amazon VPC.
- ProductDescription *string `type:"string" enum:"RIProductDescription"`
-
- // One or more Reserved Instances offering IDs.
- ReservedInstancesOfferingIds []*string `locationName:"ReservedInstancesOfferingId" type:"list"`
-
- metadataDescribeReservedInstancesOfferingsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeReservedInstancesOfferingsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReservedInstancesOfferingsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReservedInstancesOfferingsInput) GoString() string {
- return s.String()
-}
-
-type DescribeReservedInstancesOfferingsOutput struct {
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // A list of Reserved Instances offerings.
- ReservedInstancesOfferings []*ReservedInstancesOffering `locationName:"reservedInstancesOfferingsSet" locationNameList:"item" type:"list"`
-
- metadataDescribeReservedInstancesOfferingsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeReservedInstancesOfferingsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReservedInstancesOfferingsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReservedInstancesOfferingsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeReservedInstancesOutput struct {
- // A list of Reserved Instances.
- ReservedInstances []*ReservedInstances `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"`
-
- metadataDescribeReservedInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeReservedInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReservedInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReservedInstancesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeRouteTablesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // association.route-table-association-id - The ID of an association ID for
- // the route table.
- //
- // association.route-table-id - The ID of the route table involved in the
- // association.
- //
- // association.subnet-id - The ID of the subnet involved in the association.
- //
- // association.main - Indicates whether the route table is the main route
- // table for the VPC.
- //
- // route-table-id - The ID of the route table.
- //
- // route.destination-cidr-block - The CIDR range specified in a route in
- // the table.
- //
- // route.destination-prefix-list-id - The ID (prefix) of the AWS service
- // specified in a route in the table.
- //
- // route.gateway-id - The ID of a gateway specified in a route in the table.
- //
- // route.instance-id - The ID of an instance specified in a route in the
- // table.
- //
- // route.origin - Describes how the route was created. CreateRouteTable indicates
- // that the route was automatically created when the route table was created;
- // CreateRoute indicates that the route was manually added to the route table;
- // EnableVgwRoutePropagation indicates that the route was propagated by route
- // propagation.
- //
- // route.state - The state of a route in the route table (active | blackhole).
- // The blackhole state indicates that the route's target isn't available (for
- // example, the specified gateway isn't attached to the VPC, the specified NAT
- // instance has been terminated, and so on).
- //
- // route.vpc-peering-connection-id - The ID of a VPC peering connection specified
- // in a route in the table.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // vpc-id - The ID of the VPC for the route table.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more route table IDs.
- //
- // Default: Describes all your route tables.
- RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"`
-
- metadataDescribeRouteTablesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeRouteTablesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeRouteTablesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeRouteTablesInput) GoString() string {
- return s.String()
-}
-
-type DescribeRouteTablesOutput struct {
- // Information about one or more route tables.
- RouteTables []*RouteTable `locationName:"routeTableSet" locationNameList:"item" type:"list"`
-
- metadataDescribeRouteTablesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeRouteTablesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeRouteTablesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeRouteTablesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeSecurityGroupsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters. If using multiple filters for rules, the results include
- // security groups for which any combination of rules - not necessarily a single
- // rule - match all filters.
- //
- // description - The description of the security group.
- //
- // egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service
- // to which the security group allows access.
- //
- // group-id - The ID of the security group.
- //
- // group-name - The name of the security group.
- //
- // ip-permission.cidr - A CIDR range that has been granted permission.
- //
- // ip-permission.from-port - The start of port range for the TCP and UDP
- // protocols, or an ICMP type number.
- //
- // ip-permission.group-id - The ID of a security group that has been granted
- // permission.
- //
- // ip-permission.group-name - The name of a security group that has been
- // granted permission.
- //
- // ip-permission.protocol - The IP protocol for the permission (tcp | udp
- // | icmp or a protocol number).
- //
- // ip-permission.to-port - The end of port range for the TCP and UDP protocols,
- // or an ICMP code.
- //
- // ip-permission.user-id - The ID of an AWS account that has been granted
- // permission.
- //
- // owner-id - The AWS account ID of the owner of the security group.
- //
- // tag-key - The key of a tag assigned to the security group.
- //
- // tag-value - The value of a tag assigned to the security group.
- //
- // vpc-id - The ID of the VPC specified when the security group was created.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more security group IDs. Required for security groups in a nondefault
- // VPC.
- //
- // Default: Describes all your security groups.
- GroupIds []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"`
-
- // [EC2-Classic and default VPC only] One or more security group names. You
- // can specify either the security group name or the security group ID. For
- // security groups in a nondefault VPC, use the group-name filter to describe
- // security groups by name.
- //
- // Default: Describes all your security groups.
- GroupNames []*string `locationName:"GroupName" locationNameList:"GroupName" type:"list"`
-
- metadataDescribeSecurityGroupsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSecurityGroupsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSecurityGroupsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSecurityGroupsInput) GoString() string {
- return s.String()
-}
-
-type DescribeSecurityGroupsOutput struct {
- // Information about one or more security groups.
- SecurityGroups []*SecurityGroup `locationName:"securityGroupInfo" locationNameList:"item" type:"list"`
-
- metadataDescribeSecurityGroupsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSecurityGroupsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSecurityGroupsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSecurityGroupsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeSnapshotAttributeInput struct {
- // The snapshot attribute you would like to view.
- Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the EBS snapshot.
- SnapshotId *string `type:"string" required:"true"`
-
- metadataDescribeSnapshotAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSnapshotAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSnapshotAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSnapshotAttributeInput) GoString() string {
- return s.String()
-}
-
-type DescribeSnapshotAttributeOutput struct {
- // A list of permissions for creating volumes from the snapshot.
- CreateVolumePermissions []*CreateVolumePermission `locationName:"createVolumePermission" locationNameList:"item" type:"list"`
-
- // A list of product codes.
- ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
-
- // The ID of the EBS snapshot.
- SnapshotId *string `locationName:"snapshotId" type:"string"`
-
- metadataDescribeSnapshotAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSnapshotAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSnapshotAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSnapshotAttributeOutput) GoString() string {
- return s.String()
-}
-
-type DescribeSnapshotsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // description - A description of the snapshot.
- //
- // owner-alias - The AWS account alias (for example, amazon) that owns the
- // snapshot.
- //
- // owner-id - The ID of the AWS account that owns the snapshot.
- //
- // progress - The progress of the snapshot, as a percentage (for example,
- // 80%).
- //
- // snapshot-id - The snapshot ID.
- //
- // start-time - The time stamp when the snapshot was initiated.
- //
- // status - The status of the snapshot (pending | completed | error).
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // volume-id - The ID of the volume the snapshot is for.
- //
- // volume-size - The size of the volume, in GiB.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The maximum number of snapshot results returned by DescribeSnapshots in paginated
- // output. When this parameter is used, DescribeSnapshots only returns MaxResults
- // results in a single page along with a NextToken response element. The remaining
- // results of the initial request can be seen by sending another DescribeSnapshots
- // request with the returned NextToken value. This value can be between 5 and
- // 1000; if MaxResults is given a value larger than 1000, only 1000 results
- // are returned. If this parameter is not used, then DescribeSnapshots returns
- // all results. You cannot specify this parameter and the snapshot IDs parameter
- // in the same request.
- MaxResults *int64 `type:"integer"`
-
- // The NextToken value returned from a previous paginated DescribeSnapshots
- // request where MaxResults was used and the results exceeded the value of that
- // parameter. Pagination continues from the end of the previous results that
- // returned the NextToken value. This value is null when there are no more results
- // to return.
- NextToken *string `type:"string"`
-
- // Returns the snapshots owned by the specified owner. Multiple owners can be
- // specified.
- OwnerIds []*string `locationName:"Owner" locationNameList:"Owner" type:"list"`
-
- // One or more AWS accounts IDs that can create volumes from the snapshot.
- RestorableByUserIds []*string `locationName:"RestorableBy" type:"list"`
-
- // One or more snapshot IDs.
- //
- // Default: Describes snapshots for which you have launch permissions.
- SnapshotIds []*string `locationName:"SnapshotId" locationNameList:"SnapshotId" type:"list"`
-
- metadataDescribeSnapshotsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSnapshotsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSnapshotsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSnapshotsInput) GoString() string {
- return s.String()
-}
-
-type DescribeSnapshotsOutput struct {
- // The NextToken value to include in a future DescribeSnapshots request. When
- // the results of a DescribeSnapshots request exceed MaxResults, this value
- // can be used to retrieve the next page of results. This value is null when
- // there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // Information about the snapshots.
- Snapshots []*Snapshot `locationName:"snapshotSet" locationNameList:"item" type:"list"`
-
- metadataDescribeSnapshotsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSnapshotsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSnapshotsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSnapshotsOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for DescribeSpotDatafeedSubscription.
-type DescribeSpotDatafeedSubscriptionInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataDescribeSpotDatafeedSubscriptionInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotDatafeedSubscriptionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotDatafeedSubscriptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotDatafeedSubscriptionInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of DescribeSpotDatafeedSubscription.
-type DescribeSpotDatafeedSubscriptionOutput struct {
- // The Spot instance data feed subscription.
- SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"`
-
- metadataDescribeSpotDatafeedSubscriptionOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotDatafeedSubscriptionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotDatafeedSubscriptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotDatafeedSubscriptionOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for DescribeSpotFleetInstances.
-type DescribeSpotFleetInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The maximum number of results to return in a single call. Specify a value
- // between 1 and 1000. The default value is 1000. To retrieve the remaining
- // results, make another call with the returned NextToken value.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The token for the next set of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- metadataDescribeSpotFleetInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotFleetInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotFleetInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotFleetInstancesInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of DescribeSpotFleetInstances.
-type DescribeSpotFleetInstancesOutput struct {
- // The running instances. Note that this list is refreshed periodically and
- // might be out of date.
- ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list" required:"true"`
-
- // The token required to retrieve the next set of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- metadataDescribeSpotFleetInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotFleetInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotFleetInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotFleetInstancesOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for DescribeSpotFleetRequestHistory.
-type DescribeSpotFleetRequestHistoryInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The type of events to describe. By default, all events are described.
- EventType *string `locationName:"eventType" type:"string" enum:"EventType"`
-
- // The maximum number of results to return in a single call. Specify a value
- // between 1 and 1000. The default value is 1000. To retrieve the remaining
- // results, make another call with the returned NextToken value.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The token for the next set of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"`
-
- metadataDescribeSpotFleetRequestHistoryInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotFleetRequestHistoryInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotFleetRequestHistoryInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotFleetRequestHistoryInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of DescribeSpotFleetRequestHistory.
-type DescribeSpotFleetRequestHistoryOutput struct {
- // Information about the events in the history of the Spot fleet request.
- HistoryRecords []*HistoryRecord `locationName:"historyRecordSet" locationNameList:"item" type:"list" required:"true"`
-
- // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- // All records up to this time were retrieved.
- //
- // If nextToken indicates that there are more results, this value is not present.
- LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" timestampFormat:"iso8601" required:"true"`
-
- // The token required to retrieve the next set of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"`
-
- metadataDescribeSpotFleetRequestHistoryOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotFleetRequestHistoryOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotFleetRequestHistoryOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotFleetRequestHistoryOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for DescribeSpotFleetRequests.
-type DescribeSpotFleetRequestsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The maximum number of results to return in a single call. Specify a value
- // between 1 and 1000. The default value is 1000. To retrieve the remaining
- // results, make another call with the returned NextToken value.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The token for the next set of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // The IDs of the Spot fleet requests.
- SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list"`
-
- metadataDescribeSpotFleetRequestsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotFleetRequestsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotFleetRequestsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotFleetRequestsInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of DescribeSpotFleetRequests.
-type DescribeSpotFleetRequestsOutput struct {
- // The token required to retrieve the next set of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // Information about the configuration of your Spot fleet.
- SpotFleetRequestConfigs []*SpotFleetRequestConfig `locationName:"spotFleetRequestConfigSet" locationNameList:"item" type:"list" required:"true"`
-
- metadataDescribeSpotFleetRequestsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotFleetRequestsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotFleetRequestsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotFleetRequestsOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for DescribeSpotInstanceRequests.
-type DescribeSpotInstanceRequestsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // availability-zone-group - The Availability Zone group.
- //
- // create-time - The time stamp when the Spot instance request was created.
- //
- // fault-code - The fault code related to the request.
- //
- // fault-message - The fault message related to the request.
- //
- // instance-id - The ID of the instance that fulfilled the request.
- //
- // launch-group - The Spot instance launch group.
- //
- // launch.block-device-mapping.delete-on-termination - Indicates whether
- // the Amazon EBS volume is deleted on instance termination.
- //
- // launch.block-device-mapping.device-name - The device name for the Amazon
- // EBS volume (for example, /dev/sdh).
- //
- // launch.block-device-mapping.snapshot-id - The ID of the snapshot used
- // for the Amazon EBS volume.
- //
- // launch.block-device-mapping.volume-size - The size of the Amazon EBS volume,
- // in GiB.
- //
- // launch.block-device-mapping.volume-type - The type of the Amazon EBS volume
- // (gp2 | standard | io1).
- //
- // launch.group-id - The security group for the instance.
- //
- // launch.image-id - The ID of the AMI.
- //
- // launch.instance-type - The type of instance (for example, m3.medium).
- //
- // launch.kernel-id - The kernel ID.
- //
- // launch.key-name - The name of the key pair the instance launched with.
- //
- // launch.monitoring-enabled - Whether monitoring is enabled for the Spot
- // instance.
- //
- // launch.ramdisk-id - The RAM disk ID.
- //
- // network-interface.network-interface-id - The ID of the network interface.
- //
- // network-interface.device-index - The index of the device for the network
- // interface attachment on the instance.
- //
- // network-interface.subnet-id - The ID of the subnet for the instance.
- //
- // network-interface.description - A description of the network interface.
- //
- // network-interface.private-ip-address - The primary private IP address
- // of the network interface.
- //
- // network-interface.delete-on-termination - Indicates whether the network
- // interface is deleted when the instance is terminated.
- //
- // network-interface.group-id - The ID of the security group associated with
- // the network interface.
- //
- // network-interface.group-name - The name of the security group associated
- // with the network interface.
- //
- // network-interface.addresses.primary - Indicates whether the IP address
- // is the primary private IP address.
- //
- // product-description - The product description associated with the instance
- // (Linux/UNIX | Windows).
- //
- // spot-instance-request-id - The Spot instance request ID.
- //
- // spot-price - The maximum hourly price for any Spot instance launched to
- // fulfill the request.
- //
- // state - The state of the Spot instance request (open | active | closed
- // | cancelled | failed). Spot bid status information can help you track your
- // Amazon EC2 Spot instance requests. For more information, see Spot Bid Status
- // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- //
- // status-code - The short code describing the most recent evaluation of
- // your Spot instance request.
- //
- // status-message - The message explaining the status of the Spot instance
- // request.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // type - The type of Spot instance request (one-time | persistent).
- //
- // launched-availability-zone - The Availability Zone in which the bid is
- // launched.
- //
- // valid-from - The start date of the request.
- //
- // valid-until - The end date of the request.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more Spot instance request IDs.
- SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"`
-
- metadataDescribeSpotInstanceRequestsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotInstanceRequestsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotInstanceRequestsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotInstanceRequestsInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of DescribeSpotInstanceRequests.
-type DescribeSpotInstanceRequestsOutput struct {
- // One or more Spot instance requests.
- SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
-
- metadataDescribeSpotInstanceRequestsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotInstanceRequestsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotInstanceRequestsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotInstanceRequestsOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for DescribeSpotPriceHistory.
-type DescribeSpotPriceHistoryInput struct {
- // Filters the results by the specified Availability Zone.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The date and time, up to the current date, from which to stop retrieving
- // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // One or more filters.
- //
- // availability-zone - The Availability Zone for which prices should be returned.
- //
- // instance-type - The type of instance (for example, m3.medium).
- //
- // product-description - The product description for the Spot price (Linux/UNIX
- // | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC)
- // | Windows (Amazon VPC)).
- //
- // spot-price - The Spot price. The value must match exactly (or use wildcards;
- // greater than or less than comparison is not supported).
- //
- // timestamp - The timestamp of the Spot price history, in UTC format (for
- // example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater
- // than or less than comparison is not supported.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // Filters the results by the specified instance types.
- InstanceTypes []*string `locationName:"InstanceType" type:"list"`
-
- // The maximum number of results to return in a single call. Specify a value
- // between 1 and 1000. The default value is 1000. To retrieve the remaining
- // results, make another call with the returned NextToken value.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The token for the next set of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // Filters the results by the specified basic product descriptions.
- ProductDescriptions []*string `locationName:"ProductDescription" type:"list"`
-
- // The date and time, up to the past 90 days, from which to start retrieving
- // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataDescribeSpotPriceHistoryInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotPriceHistoryInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotPriceHistoryInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotPriceHistoryInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of DescribeSpotPriceHistory.
-type DescribeSpotPriceHistoryOutput struct {
- // The token required to retrieve the next set of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // The historical Spot prices.
- SpotPriceHistory []*SpotPrice `locationName:"spotPriceHistorySet" locationNameList:"item" type:"list"`
-
- metadataDescribeSpotPriceHistoryOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSpotPriceHistoryOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSpotPriceHistoryOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSpotPriceHistoryOutput) GoString() string {
- return s.String()
-}
-
-type DescribeSubnetsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // availabilityZone - The Availability Zone for the subnet. You can also
- // use availability-zone as the filter name.
- //
- // available-ip-address-count - The number of IP addresses in the subnet
- // that are available.
- //
- // cidrBlock - The CIDR block of the subnet. The CIDR block you specify must
- // exactly match the subnet's CIDR block for information to be returned for
- // the subnet. You can also use cidr or cidr-block as the filter names.
- //
- // defaultForAz - Indicates whether this is the default subnet for the Availability
- // Zone. You can also use default-for-az as the filter name.
- //
- // state - The state of the subnet (pending | available).
- //
- // subnet-id - The ID of the subnet.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // vpc-id - The ID of the VPC for the subnet.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more subnet IDs.
- //
- // Default: Describes all your subnets.
- SubnetIds []*string `locationName:"SubnetId" locationNameList:"SubnetId" type:"list"`
-
- metadataDescribeSubnetsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSubnetsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSubnetsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSubnetsInput) GoString() string {
- return s.String()
-}
-
-type DescribeSubnetsOutput struct {
- // Information about one or more subnets.
- Subnets []*Subnet `locationName:"subnetSet" locationNameList:"item" type:"list"`
-
- metadataDescribeSubnetsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeSubnetsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeSubnetsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeSubnetsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeTagsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // key - The tag key.
- //
- // resource-id - The resource ID.
- //
- // resource-type - The resource type (customer-gateway | dhcp-options | image
- // | instance | internet-gateway | network-acl | network-interface | reserved-instances
- // | route-table | security-group | snapshot | spot-instances-request | subnet
- // | volume | vpc | vpn-connection | vpn-gateway).
- //
- // value - The tag value.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The maximum number of results to return for the request in a single page.
- // The remaining results of the initial request can be seen by sending another
- // request with the returned NextToken value. This value can be between 5 and
- // 1000; if MaxResults is given a value larger than 1000, only 1000 results
- // are returned.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The token to retrieve the next page of results.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- metadataDescribeTagsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeTagsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeTagsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeTagsInput) GoString() string {
- return s.String()
-}
-
-type DescribeTagsOutput struct {
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return..
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // A list of tags.
- Tags []*TagDescription `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- metadataDescribeTagsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeTagsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeTagsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeTagsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVolumeAttributeInput struct {
- // The instance attribute.
- Attribute *string `type:"string" enum:"VolumeAttributeName"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the volume.
- VolumeId *string `type:"string" required:"true"`
-
- metadataDescribeVolumeAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVolumeAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVolumeAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVolumeAttributeInput) GoString() string {
- return s.String()
-}
-
-type DescribeVolumeAttributeOutput struct {
- // The state of autoEnableIO attribute.
- AutoEnableIO *AttributeBooleanValue `locationName:"autoEnableIO" type:"structure"`
-
- // A list of product codes.
- ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
-
- // The ID of the volume.
- VolumeId *string `locationName:"volumeId" type:"string"`
-
- metadataDescribeVolumeAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVolumeAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVolumeAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVolumeAttributeOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVolumeStatusInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // action.code - The action code for the event (for example, enable-volume-io).
- //
- // action.description - A description of the action.
- //
- // action.event-id - The event ID associated with the action.
- //
- // availability-zone - The Availability Zone of the instance.
- //
- // event.description - A description of the event.
- //
- // event.event-id - The event ID.
- //
- // event.event-type - The event type (for io-enabled: passed | failed; for
- // io-performance: io-performance:degraded | io-performance:severely-degraded
- // | io-performance:stalled).
- //
- // event.not-after - The latest end time for the event.
- //
- // event.not-before - The earliest start time for the event.
- //
- // volume-status.details-name - The cause for volume-status.status (io-enabled
- // | io-performance).
- //
- // volume-status.details-status - The status of volume-status.details-name
- // (for io-enabled: passed | failed; for io-performance: normal | degraded |
- // severely-degraded | stalled).
- //
- // volume-status.status - The status of the volume (ok | impaired | warning
- // | insufficient-data).
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The maximum number of volume results returned by DescribeVolumeStatus in
- // paginated output. When this parameter is used, the request only returns MaxResults
- // results in a single page along with a NextToken response element. The remaining
- // results of the initial request can be seen by sending another request with
- // the returned NextToken value. This value can be between 5 and 1000; if MaxResults
- // is given a value larger than 1000, only 1000 results are returned. If this
- // parameter is not used, then DescribeVolumeStatus returns all results. You
- // cannot specify this parameter and the volume IDs parameter in the same request.
- MaxResults *int64 `type:"integer"`
-
- // The NextToken value to include in a future DescribeVolumeStatus request.
- // When the results of the request exceed MaxResults, this value can be used
- // to retrieve the next page of results. This value is null when there are no
- // more results to return.
- NextToken *string `type:"string"`
-
- // One or more volume IDs.
- //
- // Default: Describes all your volumes.
- VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"`
-
- metadataDescribeVolumeStatusInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVolumeStatusInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVolumeStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVolumeStatusInput) GoString() string {
- return s.String()
-}
-
-type DescribeVolumeStatusOutput struct {
- // The token to use to retrieve the next page of results. This value is null
- // when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // A list of volumes.
- VolumeStatuses []*VolumeStatusItem `locationName:"volumeStatusSet" locationNameList:"item" type:"list"`
-
- metadataDescribeVolumeStatusOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVolumeStatusOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVolumeStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVolumeStatusOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVolumesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // attachment.attach-time - The time stamp when the attachment initiated.
- //
- // attachment.delete-on-termination - Whether the volume is deleted on instance
- // termination.
- //
- // attachment.device - The device name that is exposed to the instance (for
- // example, /dev/sda1).
- //
- // attachment.instance-id - The ID of the instance the volume is attached
- // to.
- //
- // attachment.status - The attachment state (attaching | attached | detaching
- // | detached).
- //
- // availability-zone - The Availability Zone in which the volume was created.
- //
- // create-time - The time stamp when the volume was created.
- //
- // encrypted - The encryption status of the volume.
- //
- // size - The size of the volume, in GiB.
- //
- // snapshot-id - The snapshot from which the volume was created.
- //
- // status - The status of the volume (creating | available | in-use | deleting
- // | deleted | error).
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // volume-id - The volume ID.
- //
- // volume-type - The Amazon EBS volume type. This can be gp2 for General
- // Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, or standard
- // for Magnetic volumes.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The maximum number of volume results returned by DescribeVolumes in paginated
- // output. When this parameter is used, DescribeVolumes only returns MaxResults
- // results in a single page along with a NextToken response element. The remaining
- // results of the initial request can be seen by sending another DescribeVolumes
- // request with the returned NextToken value. This value can be between 5 and
- // 1000; if MaxResults is given a value larger than 1000, only 1000 results
- // are returned. If this parameter is not used, then DescribeVolumes returns
- // all results. You cannot specify this parameter and the volume IDs parameter
- // in the same request.
- MaxResults *int64 `locationName:"maxResults" type:"integer"`
-
- // The NextToken value returned from a previous paginated DescribeVolumes request
- // where MaxResults was used and the results exceeded the value of that parameter.
- // Pagination continues from the end of the previous results that returned the
- // NextToken value. This value is null when there are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // One or more volume IDs.
- VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"`
-
- metadataDescribeVolumesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVolumesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVolumesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVolumesInput) GoString() string {
- return s.String()
-}
-
-type DescribeVolumesOutput struct {
- // The NextToken value to include in a future DescribeVolumes request. When
- // the results of a DescribeVolumes request exceed MaxResults, this value can
- // be used to retrieve the next page of results. This value is null when there
- // are no more results to return.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // Information about the volumes.
- Volumes []*Volume `locationName:"volumeSet" locationNameList:"item" type:"list"`
-
- metadataDescribeVolumesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVolumesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVolumesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVolumesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcAttributeInput struct {
- // The VPC attribute.
- Attribute *string `type:"string" enum:"VpcAttributeName"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `type:"string" required:"true"`
-
- metadataDescribeVpcAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcAttributeInput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcAttributeOutput struct {
- // Indicates whether the instances launched in the VPC get DNS hostnames. If
- // this attribute is true, instances in the VPC get DNS hostnames; otherwise,
- // they do not.
- EnableDnsHostnames *AttributeBooleanValue `locationName:"enableDnsHostnames" type:"structure"`
-
- // Indicates whether DNS resolution is enabled for the VPC. If this attribute
- // is true, the Amazon DNS server resolves DNS hostnames for your instances
- // to their corresponding IP addresses; otherwise, it does not.
- EnableDnsSupport *AttributeBooleanValue `locationName:"enableDnsSupport" type:"structure"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataDescribeVpcAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcAttributeOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcClassicLinkInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // is-classic-link-enabled - Whether the VPC is enabled for ClassicLink (true
- // | false).
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more VPCs for which you want to describe the ClassicLink status.
- VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"`
-
- metadataDescribeVpcClassicLinkInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcClassicLinkInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcClassicLinkInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcClassicLinkInput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcClassicLinkOutput struct {
- // The ClassicLink status of one or more VPCs.
- Vpcs []*VpcClassicLink `locationName:"vpcSet" locationNameList:"item" type:"list"`
-
- metadataDescribeVpcClassicLinkOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcClassicLinkOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcClassicLinkOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcClassicLinkOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcEndpointServicesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // The maximum number of items to return for this request. The request returns
- // a token that you can specify in a subsequent call to get the next set of
- // results.
- //
- // Constraint: If the value is greater than 1000, we return only 1000 items.
- MaxResults *int64 `type:"integer"`
-
- // The token for the next set of items to return. (You received this token from
- // a prior call.)
- NextToken *string `type:"string"`
-
- metadataDescribeVpcEndpointServicesInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcEndpointServicesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcEndpointServicesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcEndpointServicesInput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcEndpointServicesOutput struct {
- // The token to use when requesting the next set of items. If there are no additional
- // items to return, the string is empty.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // A list of supported AWS services.
- ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"`
-
- metadataDescribeVpcEndpointServicesOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcEndpointServicesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcEndpointServicesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcEndpointServicesOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcEndpointsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // One or more filters.
- //
- // service-name: The name of the AWS service.
- //
- // vpc-id: The ID of the VPC in which the endpoint resides.
- //
- // vpc-endpoint-id: The ID of the endpoint.
- //
- // vpc-endpoint-state: The state of the endpoint. (pending | available |
- // deleting | deleted)
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // The maximum number of items to return for this request. The request returns
- // a token that you can specify in a subsequent call to get the next set of
- // results.
- //
- // Constraint: If the value is greater than 1000, we return only 1000 items.
- MaxResults *int64 `type:"integer"`
-
- // The token for the next set of items to return. (You received this token from
- // a prior call.)
- NextToken *string `type:"string"`
-
- // One or more endpoint IDs.
- VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list"`
-
- metadataDescribeVpcEndpointsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcEndpointsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcEndpointsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcEndpointsInput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcEndpointsOutput struct {
- // The token to use when requesting the next set of items. If there are no additional
- // items to return, the string is empty.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // Information about the endpoints.
- VpcEndpoints []*VpcEndpoint `locationName:"vpcEndpointSet" locationNameList:"item" type:"list"`
-
- metadataDescribeVpcEndpointsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcEndpointsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcEndpointsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcEndpointsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcPeeringConnectionsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // accepter-vpc-info.cidr-block - The CIDR block of the peer VPC.
- //
- // accepter-vpc-info.owner-id - The AWS account ID of the owner of the peer
- // VPC.
- //
- // accepter-vpc-info.vpc-id - The ID of the peer VPC.
- //
- // expiration-time - The expiration date and time for the VPC peering connection.
- //
- // requester-vpc-info.cidr-block - The CIDR block of the requester's VPC.
- //
- // requester-vpc-info.owner-id - The AWS account ID of the owner of the requester
- // VPC.
- //
- // requester-vpc-info.vpc-id - The ID of the requester VPC.
- //
- // status-code - The status of the VPC peering connection (pending-acceptance
- // | failed | expired | provisioning | active | deleted | rejected).
- //
- // status-message - A message that provides more information about the status
- // of the VPC peering connection, if applicable.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // vpc-peering-connection-id - The ID of the VPC peering connection.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more VPC peering connection IDs.
- //
- // Default: Describes all your VPC peering connections.
- VpcPeeringConnectionIds []*string `locationName:"VpcPeeringConnectionId" locationNameList:"item" type:"list"`
-
- metadataDescribeVpcPeeringConnectionsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcPeeringConnectionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcPeeringConnectionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcPeeringConnectionsInput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcPeeringConnectionsOutput struct {
- // Information about the VPC peering connections.
- VpcPeeringConnections []*VpcPeeringConnection `locationName:"vpcPeeringConnectionSet" locationNameList:"item" type:"list"`
-
- metadataDescribeVpcPeeringConnectionsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcPeeringConnectionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcPeeringConnectionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcPeeringConnectionsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // cidr - The CIDR block of the VPC. The CIDR block you specify must exactly
- // match the VPC's CIDR block for information to be returned for the VPC. Must
- // contain the slash followed by one or two digits (for example, /28).
- //
- // dhcp-options-id - The ID of a set of DHCP options.
- //
- // isDefault - Indicates whether the VPC is the default VPC.
- //
- // state - The state of the VPC (pending | available).
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // vpc-id - The ID of the VPC.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more VPC IDs.
- //
- // Default: Describes all your VPCs.
- VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"`
-
- metadataDescribeVpcsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcsInput) GoString() string {
- return s.String()
-}
-
-type DescribeVpcsOutput struct {
- // Information about one or more VPCs.
- Vpcs []*Vpc `locationName:"vpcSet" locationNameList:"item" type:"list"`
-
- metadataDescribeVpcsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpcsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpcsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpcsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVpnConnectionsInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // customer-gateway-configuration - The configuration information for the
- // customer gateway.
- //
- // customer-gateway-id - The ID of a customer gateway associated with the
- // VPN connection.
- //
- // state - The state of the VPN connection (pending | available | deleting
- // | deleted).
- //
- // option.static-routes-only - Indicates whether the connection has static
- // routes only. Used for devices that do not support Border Gateway Protocol
- // (BGP).
- //
- // route.destination-cidr-block - The destination CIDR block. This corresponds
- // to the subnet used in a customer data center.
- //
- // bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP
- // device.
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // type - The type of VPN connection. Currently the only supported type is
- // ipsec.1.
- //
- // vpn-connection-id - The ID of the VPN connection.
- //
- // vpn-gateway-id - The ID of a virtual private gateway associated with the
- // VPN connection.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more VPN connection IDs.
- //
- // Default: Describes your VPN connections.
- VpnConnectionIds []*string `locationName:"VpnConnectionId" locationNameList:"VpnConnectionId" type:"list"`
-
- metadataDescribeVpnConnectionsInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpnConnectionsInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpnConnectionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpnConnectionsInput) GoString() string {
- return s.String()
-}
-
-type DescribeVpnConnectionsOutput struct {
- // Information about one or more VPN connections.
- VpnConnections []*VpnConnection `locationName:"vpnConnectionSet" locationNameList:"item" type:"list"`
-
- metadataDescribeVpnConnectionsOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpnConnectionsOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpnConnectionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpnConnectionsOutput) GoString() string {
- return s.String()
-}
-
-type DescribeVpnGatewaysInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more filters.
- //
- // attachment.state - The current state of the attachment between the gateway
- // and the VPC (attaching | attached | detaching | detached).
- //
- // attachment.vpc-id - The ID of an attached VPC.
- //
- // availability-zone - The Availability Zone for the virtual private gateway.
- //
- // state - The state of the virtual private gateway (pending | available
- // | deleting | deleted).
- //
- // tag:key=value - The key/value combination of a tag assigned to the resource.
- //
- // tag-key - The key of a tag assigned to the resource. This filter is independent
- // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
- // and the filter "tag-value=X", you get any resources assigned both the tag
- // key Purpose (regardless of what the tag's value is), and the tag value X
- // (regardless of what the tag's key is). If you want to list only resources
- // where Purpose is X, see the tag:key=value filter.
- //
- // tag-value - The value of a tag assigned to the resource. This filter is
- // independent of the tag-key filter.
- //
- // type - The type of virtual private gateway. Currently the only supported
- // type is ipsec.1.
- //
- // vpn-gateway-id - The ID of the virtual private gateway.
- Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
-
- // One or more virtual private gateway IDs.
- //
- // Default: Describes all your virtual private gateways.
- VpnGatewayIds []*string `locationName:"VpnGatewayId" locationNameList:"VpnGatewayId" type:"list"`
-
- metadataDescribeVpnGatewaysInput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpnGatewaysInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpnGatewaysInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpnGatewaysInput) GoString() string {
- return s.String()
-}
-
-type DescribeVpnGatewaysOutput struct {
- // Information about one or more virtual private gateways.
- VpnGateways []*VpnGateway `locationName:"vpnGatewaySet" locationNameList:"item" type:"list"`
-
- metadataDescribeVpnGatewaysOutput `json:"-" xml:"-"`
-}
-
-type metadataDescribeVpnGatewaysOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeVpnGatewaysOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeVpnGatewaysOutput) GoString() string {
- return s.String()
-}
-
-type DetachClassicLinkVpcInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance to unlink from the VPC.
- InstanceId *string `locationName:"instanceId" type:"string" required:"true"`
-
- // The ID of the VPC to which the instance is linked.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataDetachClassicLinkVpcInput `json:"-" xml:"-"`
-}
-
-type metadataDetachClassicLinkVpcInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachClassicLinkVpcInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachClassicLinkVpcInput) GoString() string {
- return s.String()
-}
-
-type DetachClassicLinkVpcOutput struct {
- // Returns true if the request succeeds; otherwise, it returns an error.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataDetachClassicLinkVpcOutput `json:"-" xml:"-"`
-}
-
-type metadataDetachClassicLinkVpcOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachClassicLinkVpcOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachClassicLinkVpcOutput) GoString() string {
- return s.String()
-}
-
-type DetachInternetGatewayInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the Internet gateway.
- InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataDetachInternetGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataDetachInternetGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachInternetGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachInternetGatewayInput) GoString() string {
- return s.String()
-}
-
-type DetachInternetGatewayOutput struct {
- metadataDetachInternetGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataDetachInternetGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachInternetGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachInternetGatewayOutput) GoString() string {
- return s.String()
-}
-
-type DetachNetworkInterfaceInput struct {
- // The ID of the attachment.
- AttachmentId *string `locationName:"attachmentId" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Specifies whether to force a detachment.
- Force *bool `locationName:"force" type:"boolean"`
-
- metadataDetachNetworkInterfaceInput `json:"-" xml:"-"`
-}
-
-type metadataDetachNetworkInterfaceInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachNetworkInterfaceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachNetworkInterfaceInput) GoString() string {
- return s.String()
-}
-
-type DetachNetworkInterfaceOutput struct {
- metadataDetachNetworkInterfaceOutput `json:"-" xml:"-"`
-}
-
-type metadataDetachNetworkInterfaceOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachNetworkInterfaceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachNetworkInterfaceOutput) GoString() string {
- return s.String()
-}
-
-type DetachVolumeInput struct {
- // The device name.
- Device *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Forces detachment if the previous detachment attempt did not occur cleanly
- // (for example, logging into an instance, unmounting the volume, and detaching
- // normally). This option can lead to data loss or a corrupted file system.
- // Use this option only as a last resort to detach a volume from a failed instance.
- // The instance won't have an opportunity to flush file system caches or file
- // system metadata. If you use this option, you must perform file system check
- // and repair procedures.
- Force *bool `type:"boolean"`
-
- // The ID of the instance.
- InstanceId *string `type:"string"`
-
- // The ID of the volume.
- VolumeId *string `type:"string" required:"true"`
-
- metadataDetachVolumeInput `json:"-" xml:"-"`
-}
-
-type metadataDetachVolumeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachVolumeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachVolumeInput) GoString() string {
- return s.String()
-}
-
-type DetachVpnGatewayInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `type:"string" required:"true"`
-
- // The ID of the virtual private gateway.
- VpnGatewayId *string `type:"string" required:"true"`
-
- metadataDetachVpnGatewayInput `json:"-" xml:"-"`
-}
-
-type metadataDetachVpnGatewayInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachVpnGatewayInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachVpnGatewayInput) GoString() string {
- return s.String()
-}
-
-type DetachVpnGatewayOutput struct {
- metadataDetachVpnGatewayOutput `json:"-" xml:"-"`
-}
-
-type metadataDetachVpnGatewayOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachVpnGatewayOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachVpnGatewayOutput) GoString() string {
- return s.String()
-}
-
-// Describes a DHCP configuration option.
-type DhcpConfiguration struct {
- // The name of a DHCP option.
- Key *string `locationName:"key" type:"string"`
-
- // One or more values for the DHCP option.
- Values []*AttributeValue `locationName:"valueSet" locationNameList:"item" type:"list"`
-
- metadataDhcpConfiguration `json:"-" xml:"-"`
-}
-
-type metadataDhcpConfiguration struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DhcpConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DhcpConfiguration) GoString() string {
- return s.String()
-}
-
-// Describes a set of DHCP options.
-type DhcpOptions struct {
- // One or more DHCP options in the set.
- DhcpConfigurations []*DhcpConfiguration `locationName:"dhcpConfigurationSet" locationNameList:"item" type:"list"`
-
- // The ID of the set of DHCP options.
- DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"`
-
- // Any tags assigned to the DHCP options set.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- metadataDhcpOptions `json:"-" xml:"-"`
-}
-
-type metadataDhcpOptions struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DhcpOptions) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DhcpOptions) GoString() string {
- return s.String()
-}
-
-type DisableVgwRoutePropagationInput struct {
- // The ID of the virtual private gateway.
- GatewayId *string `type:"string" required:"true"`
-
- // The ID of the route table.
- RouteTableId *string `type:"string" required:"true"`
-
- metadataDisableVgwRoutePropagationInput `json:"-" xml:"-"`
-}
-
-type metadataDisableVgwRoutePropagationInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisableVgwRoutePropagationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisableVgwRoutePropagationInput) GoString() string {
- return s.String()
-}
-
-type DisableVgwRoutePropagationOutput struct {
- metadataDisableVgwRoutePropagationOutput `json:"-" xml:"-"`
-}
-
-type metadataDisableVgwRoutePropagationOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisableVgwRoutePropagationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisableVgwRoutePropagationOutput) GoString() string {
- return s.String()
-}
-
-type DisableVpcClassicLinkInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataDisableVpcClassicLinkInput `json:"-" xml:"-"`
-}
-
-type metadataDisableVpcClassicLinkInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisableVpcClassicLinkInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisableVpcClassicLinkInput) GoString() string {
- return s.String()
-}
-
-type DisableVpcClassicLinkOutput struct {
- // Returns true if the request succeeds; otherwise, it returns an error.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataDisableVpcClassicLinkOutput `json:"-" xml:"-"`
-}
-
-type metadataDisableVpcClassicLinkOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisableVpcClassicLinkOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisableVpcClassicLinkOutput) GoString() string {
- return s.String()
-}
-
-type DisassociateAddressInput struct {
- // [EC2-VPC] The association ID. Required for EC2-VPC.
- AssociationId *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
- PublicIp *string `type:"string"`
-
- metadataDisassociateAddressInput `json:"-" xml:"-"`
-}
-
-type metadataDisassociateAddressInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisassociateAddressInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisassociateAddressInput) GoString() string {
- return s.String()
-}
-
-type DisassociateAddressOutput struct {
- metadataDisassociateAddressOutput `json:"-" xml:"-"`
-}
-
-type metadataDisassociateAddressOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisassociateAddressOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisassociateAddressOutput) GoString() string {
- return s.String()
-}
-
-type DisassociateRouteTableInput struct {
- // The association ID representing the current association between the route
- // table and subnet.
- AssociationId *string `locationName:"associationId" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- metadataDisassociateRouteTableInput `json:"-" xml:"-"`
-}
-
-type metadataDisassociateRouteTableInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisassociateRouteTableInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisassociateRouteTableInput) GoString() string {
- return s.String()
-}
-
-type DisassociateRouteTableOutput struct {
- metadataDisassociateRouteTableOutput `json:"-" xml:"-"`
-}
-
-type metadataDisassociateRouteTableOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisassociateRouteTableOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisassociateRouteTableOutput) GoString() string {
- return s.String()
-}
-
-// Describes a disk image.
-type DiskImage struct {
- // A description of the disk image.
- Description *string `type:"string"`
-
- // Information about the disk image.
- Image *DiskImageDetail `type:"structure"`
-
- // Information about the volume.
- Volume *VolumeDetail `type:"structure"`
-
- metadataDiskImage `json:"-" xml:"-"`
-}
-
-type metadataDiskImage struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DiskImage) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DiskImage) GoString() string {
- return s.String()
-}
-
-// Describes a disk image.
-type DiskImageDescription struct {
- // The checksum computed for the disk image.
- Checksum *string `locationName:"checksum" type:"string"`
-
- // The disk image format.
- Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"`
-
- // A presigned URL for the import manifest stored in Amazon S3. For information
- // about creating a presigned URL for an Amazon S3 object, read the "Query String
- // Request Authentication Alternative" section of the Authenticating REST Requests
- // (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
- // topic in the Amazon Simple Storage Service Developer Guide.
- ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"`
-
- // The size of the disk image, in GiB.
- Size *int64 `locationName:"size" type:"long" required:"true"`
-
- metadataDiskImageDescription `json:"-" xml:"-"`
-}
-
-type metadataDiskImageDescription struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DiskImageDescription) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DiskImageDescription) GoString() string {
- return s.String()
-}
-
-// Describes a disk image.
-type DiskImageDetail struct {
- // The size of the disk image, in GiB.
- Bytes *int64 `locationName:"bytes" type:"long" required:"true"`
-
- // The disk image format.
- Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"`
-
- // A presigned URL for the import manifest stored in Amazon S3 and presented
- // here as an Amazon S3 presigned URL. For information about creating a presigned
- // URL for an Amazon S3 object, read the "Query String Request Authentication
- // Alternative" section of the Authenticating REST Requests (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
- // topic in the Amazon Simple Storage Service Developer Guide.
- ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"`
-
- metadataDiskImageDetail `json:"-" xml:"-"`
-}
-
-type metadataDiskImageDetail struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DiskImageDetail) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DiskImageDetail) GoString() string {
- return s.String()
-}
-
-// Describes a disk image volume.
-type DiskImageVolumeDescription struct {
- // The volume identifier.
- Id *string `locationName:"id" type:"string" required:"true"`
-
- // The size of the volume, in GiB.
- Size *int64 `locationName:"size" type:"long"`
-
- metadataDiskImageVolumeDescription `json:"-" xml:"-"`
-}
-
-type metadataDiskImageVolumeDescription struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s DiskImageVolumeDescription) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DiskImageVolumeDescription) GoString() string {
- return s.String()
-}
-
-// Describes a block device for an EBS volume.
-type EbsBlockDevice struct {
- // Indicates whether the EBS volume is deleted on instance termination.
- DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
-
- // Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes
- // may only be attached to instances that support Amazon EBS encryption.
- Encrypted *bool `locationName:"encrypted" type:"boolean"`
-
- // The number of I/O operations per second (IOPS) that the volume supports.
- // For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that
- // are provisioned for the volume. For General Purpose (SSD) volumes, this represents
- // the baseline performance of the volume and the rate at which the volume accumulates
- // I/O credits for bursting. For more information on General Purpose (SSD) baseline
- // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- //
- // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and
- // 3 to 10000 for General Purpose (SSD) volumes.
- //
- // Condition: This parameter is required for requests to create io1 volumes;
- // it is not used in requests to create standard or gp2 volumes.
- Iops *int64 `locationName:"iops" type:"integer"`
-
- // The ID of the snapshot.
- SnapshotId *string `locationName:"snapshotId" type:"string"`
-
- // The size of the volume, in GiB.
- //
- // Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384
- // for io1 volumes. If you specify a snapshot, the volume size must be equal
- // to or larger than the snapshot size.
- //
- // Default: If you're creating the volume from a snapshot and don't specify
- // a volume size, the default is the snapshot size.
- VolumeSize *int64 `locationName:"volumeSize" type:"integer"`
-
- // The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned
- // IOPS (SSD) volumes, and standard for Magnetic volumes.
- //
- // Default: standard
- VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"`
-
- metadataEbsBlockDevice `json:"-" xml:"-"`
-}
-
-type metadataEbsBlockDevice struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EbsBlockDevice) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EbsBlockDevice) GoString() string {
- return s.String()
-}
-
-// Describes a parameter used to set up an EBS volume in a block device mapping.
-type EbsInstanceBlockDevice struct {
- // The time stamp when the attachment initiated.
- AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // Indicates whether the volume is deleted on instance termination.
- DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
-
- // The attachment state.
- Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"`
-
- // The ID of the EBS volume.
- VolumeId *string `locationName:"volumeId" type:"string"`
-
- metadataEbsInstanceBlockDevice `json:"-" xml:"-"`
-}
-
-type metadataEbsInstanceBlockDevice struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EbsInstanceBlockDevice) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EbsInstanceBlockDevice) GoString() string {
- return s.String()
-}
-
-type EbsInstanceBlockDeviceSpecification struct {
- // Indicates whether the volume is deleted on instance termination.
- DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
-
- // The ID of the EBS volume.
- VolumeId *string `locationName:"volumeId" type:"string"`
-
- metadataEbsInstanceBlockDeviceSpecification `json:"-" xml:"-"`
-}
-
-type metadataEbsInstanceBlockDeviceSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EbsInstanceBlockDeviceSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EbsInstanceBlockDeviceSpecification) GoString() string {
- return s.String()
-}
-
-type EnableVgwRoutePropagationInput struct {
- // The ID of the virtual private gateway.
- GatewayId *string `type:"string" required:"true"`
-
- // The ID of the route table.
- RouteTableId *string `type:"string" required:"true"`
-
- metadataEnableVgwRoutePropagationInput `json:"-" xml:"-"`
-}
-
-type metadataEnableVgwRoutePropagationInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableVgwRoutePropagationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableVgwRoutePropagationInput) GoString() string {
- return s.String()
-}
-
-type EnableVgwRoutePropagationOutput struct {
- metadataEnableVgwRoutePropagationOutput `json:"-" xml:"-"`
-}
-
-type metadataEnableVgwRoutePropagationOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableVgwRoutePropagationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableVgwRoutePropagationOutput) GoString() string {
- return s.String()
-}
-
-type EnableVolumeIOInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the volume.
- VolumeId *string `locationName:"volumeId" type:"string" required:"true"`
-
- metadataEnableVolumeIOInput `json:"-" xml:"-"`
-}
-
-type metadataEnableVolumeIOInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableVolumeIOInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableVolumeIOInput) GoString() string {
- return s.String()
-}
-
-type EnableVolumeIOOutput struct {
- metadataEnableVolumeIOOutput `json:"-" xml:"-"`
-}
-
-type metadataEnableVolumeIOOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableVolumeIOOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableVolumeIOOutput) GoString() string {
- return s.String()
-}
-
-type EnableVpcClassicLinkInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataEnableVpcClassicLinkInput `json:"-" xml:"-"`
-}
-
-type metadataEnableVpcClassicLinkInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableVpcClassicLinkInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableVpcClassicLinkInput) GoString() string {
- return s.String()
-}
-
-type EnableVpcClassicLinkOutput struct {
- // Returns true if the request succeeds; otherwise, it returns an error.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataEnableVpcClassicLinkOutput `json:"-" xml:"-"`
-}
-
-type metadataEnableVpcClassicLinkOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableVpcClassicLinkOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableVpcClassicLinkOutput) GoString() string {
- return s.String()
-}
-
-// Describes a Spot fleet event.
-type EventInformation struct {
- // The description of the event.
- EventDescription *string `locationName:"eventDescription" type:"string"`
-
- // The event.
- //
- // The following are the error events.
- //
- // iamFleetRoleInvalid - The Spot fleet did not have the required permissions
- // either to launch or terminate an instance.
- //
- // launchSpecTemporarilyBlacklisted - The configuration is not valid and
- // several attempts to launch instances have failed. For more information, see
- // the description of the event.
- //
- // spotFleetRequestConfigurationInvalid - The configuration is not valid.
- // For more information, see the description of the event.
- //
- // spotInstanceCountLimitExceeded - You've reached the limit on the number
- // of Spot instances that you can launch.
- //
- // The following are the fleetRequestChange events.
- //
- // active - The Spot fleet has been validated and Amazon EC2 is attempting
- // to maintain the target number of running Spot instances.
- //
- // cancelled - The Spot fleet is canceled and has no running Spot instances.
- // The Spot fleet will be deleted two days after its instances were terminated.
- //
- // cancelled_running - The Spot fleet is canceled and will not launch additional
- // Spot instances, but its existing Spot instances continue to run until they
- // are interrupted or terminated.
- //
- // cancelled_terminating - The Spot fleet is canceled and its Spot instances
- // are terminating.
- //
- // expired - The Spot fleet request has expired. A subsequent event indicates
- // that the instances were terminated, if the request was created with TerminateInstancesWithExpiration
- // set.
- //
- // modify_in_progress - A request to modify the Spot fleet request was accepted
- // and is in progress.
- //
- // modify_successful - The Spot fleet request was modified.
- //
- // price_update - The bid price for a launch configuration was adjusted because
- // it was too high. This change is permanent.
- //
- // submitted - The Spot fleet request is being evaluated and Amazon EC2 is
- // preparing to launch the target number of Spot instances.
- //
- // The following are the instanceChange events.
- //
- // launched - A bid was fulfilled and a new instance was launched.
- //
- // terminated - An instance was terminated by the user.
- EventSubType *string `locationName:"eventSubType" type:"string"`
-
- // The ID of the instance. This information is available only for instanceChange
- // events.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- metadataEventInformation `json:"-" xml:"-"`
-}
-
-type metadataEventInformation struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s EventInformation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EventInformation) GoString() string {
- return s.String()
-}
-
-// Describes an instance export task.
-type ExportTask struct {
- // A description of the resource being exported.
- Description *string `locationName:"description" type:"string"`
-
- // The ID of the export task.
- ExportTaskId *string `locationName:"exportTaskId" type:"string"`
-
- // Information about the export task.
- ExportToS3Task *ExportToS3Task `locationName:"exportToS3" type:"structure"`
-
- // Information about the instance to export.
- InstanceExportDetails *InstanceExportDetails `locationName:"instanceExport" type:"structure"`
-
- // The state of the export task.
- State *string `locationName:"state" type:"string" enum:"ExportTaskState"`
-
- // The status message related to the export task.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- metadataExportTask `json:"-" xml:"-"`
-}
-
-type metadataExportTask struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ExportTask) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ExportTask) GoString() string {
- return s.String()
-}
-
-// Describes the format and location for an instance export task.
-type ExportToS3Task struct {
- // The container format used to combine disk images with metadata (such as OVF).
- // If absent, only the disk image is exported.
- ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"`
-
- // The format for the exported image.
- DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"`
-
- // The S3 bucket for the destination image. The destination bucket must exist
- // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.
- S3Bucket *string `locationName:"s3Bucket" type:"string"`
-
- // The encryption key for your S3 bucket.
- S3Key *string `locationName:"s3Key" type:"string"`
-
- metadataExportToS3Task `json:"-" xml:"-"`
-}
-
-type metadataExportToS3Task struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ExportToS3Task) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ExportToS3Task) GoString() string {
- return s.String()
-}
-
-// Describes an instance export task.
-type ExportToS3TaskSpecification struct {
- // The container format used to combine disk images with metadata (such as OVF).
- // If absent, only the disk image is exported.
- ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"`
-
- // The format for the exported image.
- DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"`
-
- // The S3 bucket for the destination image. The destination bucket must exist
- // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.
- S3Bucket *string `locationName:"s3Bucket" type:"string"`
-
- // The image is written to a single object in the S3 bucket at the S3 key s3prefix
- // + exportTaskId + '.' + diskImageFormat.
- S3Prefix *string `locationName:"s3Prefix" type:"string"`
-
- metadataExportToS3TaskSpecification `json:"-" xml:"-"`
-}
-
-type metadataExportToS3TaskSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ExportToS3TaskSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ExportToS3TaskSpecification) GoString() string {
- return s.String()
-}
-
-// A filter name and value pair that is used to return a more specific list
-// of results. Filters can be used to match a set of resources by various criteria,
-// such as tags, attributes, or IDs.
-type Filter struct {
- // The name of the filter. Filter names are case-sensitive.
- Name *string `type:"string"`
-
- // One or more filter values. Filter values are case-sensitive.
- Values []*string `locationName:"Value" locationNameList:"item" type:"list"`
-
- metadataFilter `json:"-" xml:"-"`
-}
-
-type metadataFilter struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Filter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Filter) GoString() string {
- return s.String()
-}
-
-// Describes a flow log.
-type FlowLog struct {
- // The date and time the flow log was created.
- CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // Information about the error that occurred. Rate limited indicates that CloudWatch
- // logs throttling has been applied for one or more network interfaces. Access
- // error indicates that the IAM role associated with the flow log does not have
- // sufficient permissions to publish to CloudWatch Logs. Unknown error indicates
- // an internal error.
- DeliverLogsErrorMessage *string `locationName:"deliverLogsErrorMessage" type:"string"`
-
- // The ARN of the IAM role that posts logs to CloudWatch Logs.
- DeliverLogsPermissionArn *string `locationName:"deliverLogsPermissionArn" type:"string"`
-
- // The status of the logs delivery (SUCCESS | FAILED).
- DeliverLogsStatus *string `locationName:"deliverLogsStatus" type:"string"`
-
- // The flow log ID.
- FlowLogId *string `locationName:"flowLogId" type:"string"`
-
- // The status of the flow log (ACTIVE).
- FlowLogStatus *string `locationName:"flowLogStatus" type:"string"`
-
- // The name of the flow log group.
- LogGroupName *string `locationName:"logGroupName" type:"string"`
-
- // The ID of the resource on which the flow log was created.
- ResourceId *string `locationName:"resourceId" type:"string"`
-
- // The type of traffic captured for the flow log.
- TrafficType *string `locationName:"trafficType" type:"string" enum:"TrafficType"`
-
- metadataFlowLog `json:"-" xml:"-"`
-}
-
-type metadataFlowLog struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s FlowLog) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s FlowLog) GoString() string {
- return s.String()
-}
-
-type GetConsoleOutputInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance.
- InstanceId *string `type:"string" required:"true"`
-
- metadataGetConsoleOutputInput `json:"-" xml:"-"`
-}
-
-type metadataGetConsoleOutputInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetConsoleOutputInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetConsoleOutputInput) GoString() string {
- return s.String()
-}
-
-type GetConsoleOutputOutput struct {
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The console output, Base64 encoded.
- Output *string `locationName:"output" type:"string"`
-
- // The time the output was last updated.
- Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataGetConsoleOutputOutput `json:"-" xml:"-"`
-}
-
-type metadataGetConsoleOutputOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetConsoleOutputOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetConsoleOutputOutput) GoString() string {
- return s.String()
-}
-
-type GetPasswordDataInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the Windows instance.
- InstanceId *string `type:"string" required:"true"`
-
- metadataGetPasswordDataInput `json:"-" xml:"-"`
-}
-
-type metadataGetPasswordDataInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetPasswordDataInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetPasswordDataInput) GoString() string {
- return s.String()
-}
-
-type GetPasswordDataOutput struct {
- // The ID of the Windows instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The password of the instance.
- PasswordData *string `locationName:"passwordData" type:"string"`
-
- // The time the data was last updated.
- Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataGetPasswordDataOutput `json:"-" xml:"-"`
-}
-
-type metadataGetPasswordDataOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetPasswordDataOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetPasswordDataOutput) GoString() string {
- return s.String()
-}
-
-// Describes a security group.
-type GroupIdentifier struct {
- // The ID of the security group.
- GroupId *string `locationName:"groupId" type:"string"`
-
- // The name of the security group.
- GroupName *string `locationName:"groupName" type:"string"`
-
- metadataGroupIdentifier `json:"-" xml:"-"`
-}
-
-type metadataGroupIdentifier struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s GroupIdentifier) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GroupIdentifier) GoString() string {
- return s.String()
-}
-
-// Describes an event in the history of the Spot fleet request.
-type HistoryRecord struct {
- // Information about the event.
- EventInformation *EventInformation `locationName:"eventInformation" type:"structure" required:"true"`
-
- // The event type.
- //
- // error - Indicates an error with the Spot fleet request.
- //
- // fleetRequestChange - Indicates a change in the status or configuration
- // of the Spot fleet request.
- //
- // instanceChange - Indicates that an instance was launched or terminated.
- EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"`
-
- // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601" required:"true"`
-
- metadataHistoryRecord `json:"-" xml:"-"`
-}
-
-type metadataHistoryRecord struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s HistoryRecord) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HistoryRecord) GoString() string {
- return s.String()
-}
-
-// Describes an IAM instance profile.
-type IamInstanceProfile struct {
- // The Amazon Resource Name (ARN) of the instance profile.
- Arn *string `locationName:"arn" type:"string"`
-
- // The ID of the instance profile.
- Id *string `locationName:"id" type:"string"`
-
- metadataIamInstanceProfile `json:"-" xml:"-"`
-}
-
-type metadataIamInstanceProfile struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s IamInstanceProfile) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IamInstanceProfile) GoString() string {
- return s.String()
-}
-
-// Describes an IAM instance profile.
-type IamInstanceProfileSpecification struct {
- // The Amazon Resource Name (ARN) of the instance profile.
- Arn *string `locationName:"arn" type:"string"`
-
- // The name of the instance profile.
- Name *string `locationName:"name" type:"string"`
-
- metadataIamInstanceProfileSpecification `json:"-" xml:"-"`
-}
-
-type metadataIamInstanceProfileSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s IamInstanceProfileSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IamInstanceProfileSpecification) GoString() string {
- return s.String()
-}
-
-// Describes the ICMP type and code.
-type IcmpTypeCode struct {
- // The ICMP type. A value of -1 means all types.
- Code *int64 `locationName:"code" type:"integer"`
-
- // The ICMP code. A value of -1 means all codes for the specified ICMP type.
- Type *int64 `locationName:"type" type:"integer"`
-
- metadataIcmpTypeCode `json:"-" xml:"-"`
-}
-
-type metadataIcmpTypeCode struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s IcmpTypeCode) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IcmpTypeCode) GoString() string {
- return s.String()
-}
-
-// Describes an image.
-type Image struct {
- // The architecture of the image.
- Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
-
- // Any block device mapping entries.
- BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
-
- // The date and time the image was created.
- CreationDate *string `locationName:"creationDate" type:"string"`
-
- // The description of the AMI that was provided during image creation.
- Description *string `locationName:"description" type:"string"`
-
- // The hypervisor type of the image.
- Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"`
-
- // The ID of the AMI.
- ImageId *string `locationName:"imageId" type:"string"`
-
- // The location of the AMI.
- ImageLocation *string `locationName:"imageLocation" type:"string"`
-
- // The AWS account alias (for example, amazon, self) or the AWS account ID of
- // the AMI owner.
- ImageOwnerAlias *string `locationName:"imageOwnerAlias" type:"string"`
-
- // The type of image.
- ImageType *string `locationName:"imageType" type:"string" enum:"ImageTypeValues"`
-
- // The kernel associated with the image, if any. Only applicable for machine
- // images.
- KernelId *string `locationName:"kernelId" type:"string"`
-
- // The name of the AMI that was provided during image creation.
- Name *string `locationName:"name" type:"string"`
-
- // The AWS account ID of the image owner.
- OwnerId *string `locationName:"imageOwnerId" type:"string"`
-
- // The value is Windows for Windows AMIs; otherwise blank.
- Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"`
-
- // Any product codes associated with the AMI.
- ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
-
- // Indicates whether the image has public launch permissions. The value is true
- // if this image has public launch permissions or false if it has only implicit
- // and explicit launch permissions.
- Public *bool `locationName:"isPublic" type:"boolean"`
-
- // The RAM disk associated with the image, if any. Only applicable for machine
- // images.
- RamdiskId *string `locationName:"ramdiskId" type:"string"`
-
- // The device name of the root device (for example, /dev/sda1 or /dev/xvda).
- RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
-
- // The type of root device used by the AMI. The AMI can use an EBS volume or
- // an instance store volume.
- RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"`
-
- // Specifies whether enhanced networking is enabled.
- SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"`
-
- // The current state of the AMI. If the state is available, the image is successfully
- // registered and can be used to launch an instance.
- State *string `locationName:"imageState" type:"string" enum:"ImageState"`
-
- // The reason for the state change.
- StateReason *StateReason `locationName:"stateReason" type:"structure"`
-
- // Any tags assigned to the image.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The type of virtualization of the AMI.
- VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"`
-
- metadataImage `json:"-" xml:"-"`
-}
-
-type metadataImage struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Image) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Image) GoString() string {
- return s.String()
-}
-
-// Describes the disk container object for an import image task.
-type ImageDiskContainer struct {
- // The description of the disk image.
- Description *string `type:"string"`
-
- // The block device mapping for the disk.
- DeviceName *string `type:"string"`
-
- // The format of the disk image being imported.
- //
- // Valid values: RAW | VHD | VMDK | OVA
- Format *string `type:"string"`
-
- // The ID of the EBS snapshot to be used for importing the snapshot.
- SnapshotId *string `type:"string"`
-
- // The URL to the Amazon S3-based disk image being imported. The URL can either
- // be a https URL (https://..) or an Amazon S3 URL (s3://..)
- Url *string `type:"string"`
-
- // The S3 bucket for the disk image.
- UserBucket *UserBucket `type:"structure"`
-
- metadataImageDiskContainer `json:"-" xml:"-"`
-}
-
-type metadataImageDiskContainer struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImageDiskContainer) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImageDiskContainer) GoString() string {
- return s.String()
-}
-
-type ImportImageInput struct {
- // The architecture of the virtual machine.
- //
- // Valid values: i386 | x86_64
- Architecture *string `type:"string"`
-
- // The client-specific data.
- ClientData *ClientData `type:"structure"`
-
- // The token to enable idempotency for VM import requests.
- ClientToken *string `type:"string"`
-
- // A description string for the import image task.
- Description *string `type:"string"`
-
- // Information about the disk containers.
- DiskContainers []*ImageDiskContainer `locationName:"DiskContainer" locationNameList:"item" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // The target hypervisor platform.
- //
- // Valid values: xen
- Hypervisor *string `type:"string"`
-
- // The license type to be used for the Amazon Machine Image (AMI) after importing.
- //
- // Note: You may only use BYOL if you have existing licenses with rights to
- // use these licenses in a third party cloud like AWS. For more information,
- // see VM Import/Export Prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- //
- // Valid values: AWS | BYOL
- LicenseType *string `type:"string"`
-
- // The operating system of the virtual machine.
- //
- // Valid values: Windows | Linux
- Platform *string `type:"string"`
-
- // The name of the role to use when not using the default role, 'vmimport'.
- RoleName *string `type:"string"`
-
- metadataImportImageInput `json:"-" xml:"-"`
-}
-
-type metadataImportImageInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportImageInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportImageInput) GoString() string {
- return s.String()
-}
-
-type ImportImageOutput struct {
- // The architecture of the virtual machine.
- Architecture *string `locationName:"architecture" type:"string"`
-
- // A description of the import task.
- Description *string `locationName:"description" type:"string"`
-
- // The target hypervisor of the import task.
- Hypervisor *string `locationName:"hypervisor" type:"string"`
-
- // The ID of the Amazon Machine Image (AMI) created by the import task.
- ImageId *string `locationName:"imageId" type:"string"`
-
- // The task ID of the import image task.
- ImportTaskId *string `locationName:"importTaskId" type:"string"`
-
- // The license type of the virtual machine.
- LicenseType *string `locationName:"licenseType" type:"string"`
-
- // The operating system of the virtual machine.
- Platform *string `locationName:"platform" type:"string"`
-
- // The progress of the task.
- Progress *string `locationName:"progress" type:"string"`
-
- // Information about the snapshots.
- SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"`
-
- // A brief status of the task.
- Status *string `locationName:"status" type:"string"`
-
- // A detailed status message of the import task.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- metadataImportImageOutput `json:"-" xml:"-"`
-}
-
-type metadataImportImageOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportImageOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportImageOutput) GoString() string {
- return s.String()
-}
-
-// Describes an import image task.
-type ImportImageTask struct {
- // The architecture of the virtual machine.
- //
- // Valid values: i386 | x86_64
- Architecture *string `locationName:"architecture" type:"string"`
-
- // A description of the import task.
- Description *string `locationName:"description" type:"string"`
-
- // The target hypervisor for the import task.
- //
- // Valid values: xen
- Hypervisor *string `locationName:"hypervisor" type:"string"`
-
- // The ID of the Amazon Machine Image (AMI) of the imported virtual machine.
- ImageId *string `locationName:"imageId" type:"string"`
-
- // The ID of the import image task.
- ImportTaskId *string `locationName:"importTaskId" type:"string"`
-
- // The license type of the virtual machine.
- LicenseType *string `locationName:"licenseType" type:"string"`
-
- // The description string for the import image task.
- Platform *string `locationName:"platform" type:"string"`
-
- // The percentage of progress of the import image task.
- Progress *string `locationName:"progress" type:"string"`
-
- // Information about the snapshots.
- SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"`
-
- // A brief status for the import image task.
- Status *string `locationName:"status" type:"string"`
-
- // A descriptive status message for the import image task.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- metadataImportImageTask `json:"-" xml:"-"`
-}
-
-type metadataImportImageTask struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportImageTask) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportImageTask) GoString() string {
- return s.String()
-}
-
-type ImportInstanceInput struct {
- // A description for the instance being imported.
- Description *string `locationName:"description" type:"string"`
-
- // The disk image.
- DiskImages []*DiskImage `locationName:"diskImage" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The launch specification.
- LaunchSpecification *ImportInstanceLaunchSpecification `locationName:"launchSpecification" type:"structure"`
-
- // The instance operating system.
- Platform *string `locationName:"platform" type:"string" required:"true" enum:"PlatformValues"`
-
- metadataImportInstanceInput `json:"-" xml:"-"`
-}
-
-type metadataImportInstanceInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportInstanceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportInstanceInput) GoString() string {
- return s.String()
-}
-
-// Describes the launch specification for VM import.
-type ImportInstanceLaunchSpecification struct {
- // Reserved.
- AdditionalInfo *string `locationName:"additionalInfo" type:"string"`
-
- // The architecture of the instance.
- Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
-
- // One or more security group IDs.
- GroupIds []*string `locationName:"GroupId" locationNameList:"SecurityGroupId" type:"list"`
-
- // One or more security group names.
- GroupNames []*string `locationName:"GroupName" locationNameList:"SecurityGroup" type:"list"`
-
- // Indicates whether an instance stops or terminates when you initiate shutdown
- // from the instance (using the operating system command for system shutdown).
- InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"`
-
- // The instance type. For more information about the instance types that you
- // can import, see Before You Get Started (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // Indicates whether monitoring is enabled.
- Monitoring *bool `locationName:"monitoring" type:"boolean"`
-
- // The placement information for the instance.
- Placement *Placement `locationName:"placement" type:"structure"`
-
- // [EC2-VPC] An available IP address from the IP address range of the subnet.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // [EC2-VPC] The ID of the subnet in which to launch the instance.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- // The Base64-encoded MIME user data to be made available to the instance.
- UserData *UserData `locationName:"userData" type:"structure"`
-
- metadataImportInstanceLaunchSpecification `json:"-" xml:"-"`
-}
-
-type metadataImportInstanceLaunchSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportInstanceLaunchSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportInstanceLaunchSpecification) GoString() string {
- return s.String()
-}
-
-type ImportInstanceOutput struct {
- // Information about the conversion task.
- ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"`
-
- metadataImportInstanceOutput `json:"-" xml:"-"`
-}
-
-type metadataImportInstanceOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportInstanceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportInstanceOutput) GoString() string {
- return s.String()
-}
-
-// Describes an import instance task.
-type ImportInstanceTaskDetails struct {
- // A description of the task.
- Description *string `locationName:"description" type:"string"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The instance operating system.
- Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"`
-
- // One or more volumes.
- Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list" required:"true"`
-
- metadataImportInstanceTaskDetails `json:"-" xml:"-"`
-}
-
-type metadataImportInstanceTaskDetails struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportInstanceTaskDetails) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportInstanceTaskDetails) GoString() string {
- return s.String()
-}
-
-// Describes an import volume task.
-type ImportInstanceVolumeDetailItem struct {
- // The Availability Zone where the resulting instance will reside.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"`
-
- // The number of bytes converted so far.
- BytesConverted *int64 `locationName:"bytesConverted" type:"long" required:"true"`
-
- // A description of the task.
- Description *string `locationName:"description" type:"string"`
-
- // The image.
- Image *DiskImageDescription `locationName:"image" type:"structure" required:"true"`
-
- // The status of the import of this particular disk image.
- Status *string `locationName:"status" type:"string" required:"true"`
-
- // The status information or errors related to the disk image.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- // The volume.
- Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure" required:"true"`
-
- metadataImportInstanceVolumeDetailItem `json:"-" xml:"-"`
-}
-
-type metadataImportInstanceVolumeDetailItem struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportInstanceVolumeDetailItem) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportInstanceVolumeDetailItem) GoString() string {
- return s.String()
-}
-
-type ImportKeyPairInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // A unique name for the key pair.
- KeyName *string `locationName:"keyName" type:"string" required:"true"`
-
- // The public key. You must base64 encode the public key material before sending
- // it to AWS.
- PublicKeyMaterial []byte `locationName:"publicKeyMaterial" type:"blob" required:"true"`
-
- metadataImportKeyPairInput `json:"-" xml:"-"`
-}
-
-type metadataImportKeyPairInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportKeyPairInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportKeyPairInput) GoString() string {
- return s.String()
-}
-
-type ImportKeyPairOutput struct {
- // The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- KeyFingerprint *string `locationName:"keyFingerprint" type:"string"`
-
- // The key pair name you provided.
- KeyName *string `locationName:"keyName" type:"string"`
-
- metadataImportKeyPairOutput `json:"-" xml:"-"`
-}
-
-type metadataImportKeyPairOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportKeyPairOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportKeyPairOutput) GoString() string {
- return s.String()
-}
-
-type ImportSnapshotInput struct {
- // The client-specific data.
- ClientData *ClientData `type:"structure"`
-
- // Token to enable idempotency for VM import requests.
- ClientToken *string `type:"string"`
-
- // The description string for the import snapshot task.
- Description *string `type:"string"`
-
- // Information about the disk container.
- DiskContainer *SnapshotDiskContainer `type:"structure"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // The name of the role to use when not using the default role, 'vmimport'.
- RoleName *string `type:"string"`
-
- metadataImportSnapshotInput `json:"-" xml:"-"`
-}
-
-type metadataImportSnapshotInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportSnapshotInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportSnapshotInput) GoString() string {
- return s.String()
-}
-
-type ImportSnapshotOutput struct {
- // A description of the import snapshot task.
- Description *string `locationName:"description" type:"string"`
-
- // The ID of the import snapshot task.
- ImportTaskId *string `locationName:"importTaskId" type:"string"`
-
- // Information about the import snapshot task.
- SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"`
-
- metadataImportSnapshotOutput `json:"-" xml:"-"`
-}
-
-type metadataImportSnapshotOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportSnapshotOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportSnapshotOutput) GoString() string {
- return s.String()
-}
-
-// Describes an import snapshot task.
-type ImportSnapshotTask struct {
- // A description of the import snapshot task.
- Description *string `locationName:"description" type:"string"`
-
- // The ID of the import snapshot task.
- ImportTaskId *string `locationName:"importTaskId" type:"string"`
-
- // Describes an import snapshot task.
- SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"`
-
- metadataImportSnapshotTask `json:"-" xml:"-"`
-}
-
-type metadataImportSnapshotTask struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportSnapshotTask) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportSnapshotTask) GoString() string {
- return s.String()
-}
-
-type ImportVolumeInput struct {
- // The Availability Zone for the resulting EBS volume.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"`
-
- // A description of the volume.
- Description *string `locationName:"description" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The disk image.
- Image *DiskImageDetail `locationName:"image" type:"structure" required:"true"`
-
- // The volume size.
- Volume *VolumeDetail `locationName:"volume" type:"structure" required:"true"`
-
- metadataImportVolumeInput `json:"-" xml:"-"`
-}
-
-type metadataImportVolumeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportVolumeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportVolumeInput) GoString() string {
- return s.String()
-}
-
-type ImportVolumeOutput struct {
- // Information about the conversion task.
- ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"`
-
- metadataImportVolumeOutput `json:"-" xml:"-"`
-}
-
-type metadataImportVolumeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportVolumeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportVolumeOutput) GoString() string {
- return s.String()
-}
-
-// Describes an import volume task.
-type ImportVolumeTaskDetails struct {
- // The Availability Zone where the resulting volume will reside.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"`
-
- // The number of bytes converted so far.
- BytesConverted *int64 `locationName:"bytesConverted" type:"long" required:"true"`
-
- // The description you provided when starting the import volume task.
- Description *string `locationName:"description" type:"string"`
-
- // The image.
- Image *DiskImageDescription `locationName:"image" type:"structure" required:"true"`
-
- // The volume.
- Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure" required:"true"`
-
- metadataImportVolumeTaskDetails `json:"-" xml:"-"`
-}
-
-type metadataImportVolumeTaskDetails struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ImportVolumeTaskDetails) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ImportVolumeTaskDetails) GoString() string {
- return s.String()
-}
-
-// Describes an instance.
-type Instance struct {
- // The AMI launch index, which can be used to find this instance in the launch
- // group.
- AmiLaunchIndex *int64 `locationName:"amiLaunchIndex" type:"integer"`
-
- // The architecture of the image.
- Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
-
- // Any block device mapping entries for the instance.
- BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
-
- // The idempotency token you provided when you launched the instance, if applicable.
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // Indicates whether the instance is optimized for EBS I/O. This optimization
- // provides dedicated throughput to Amazon EBS and an optimized configuration
- // stack to provide optimal I/O performance. This optimization isn't available
- // with all instance types. Additional usage charges apply when using an EBS
- // Optimized instance.
- EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
-
- // The hypervisor type of the instance.
- Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"`
-
- // The IAM instance profile associated with the instance, if applicable.
- IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"`
-
- // The ID of the AMI used to launch the instance.
- ImageId *string `locationName:"imageId" type:"string"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // Indicates whether this is a Spot Instance.
- InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"`
-
- // The instance type.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // The kernel associated with this instance, if applicable.
- KernelId *string `locationName:"kernelId" type:"string"`
-
- // The name of the key pair, if this instance was launched with an associated
- // key pair.
- KeyName *string `locationName:"keyName" type:"string"`
-
- // The time the instance was launched.
- LaunchTime *time.Time `locationName:"launchTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // The monitoring information for the instance.
- Monitoring *Monitoring `locationName:"monitoring" type:"structure"`
-
- // [EC2-VPC] One or more network interfaces for the instance.
- NetworkInterfaces []*InstanceNetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
-
- // The location where the instance launched, if applicable.
- Placement *Placement `locationName:"placement" type:"structure"`
-
- // The value is Windows for Windows instances; otherwise blank.
- Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"`
-
- // The private DNS name assigned to the instance. This DNS name can only be
- // used inside the Amazon EC2 network. This name is not available until the
- // instance enters the running state. For EC2-VPC, this name is only available
- // if you've enabled DNS hostnames for your VPC.
- PrivateDnsName *string `locationName:"privateDnsName" type:"string"`
-
- // The private IP address assigned to the instance.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // The product codes attached to this instance, if applicable.
- ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
-
- // The public DNS name assigned to the instance. This name is not available
- // until the instance enters the running state. For EC2-VPC, this name is only
- // available if you've enabled DNS hostnames for your VPC.
- PublicDnsName *string `locationName:"dnsName" type:"string"`
-
- // The public IP address assigned to the instance, if applicable.
- PublicIpAddress *string `locationName:"ipAddress" type:"string"`
-
- // The RAM disk associated with this instance, if applicable.
- RamdiskId *string `locationName:"ramdiskId" type:"string"`
-
- // The root device name (for example, /dev/sda1 or /dev/xvda).
- RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
-
- // The root device type used by the AMI. The AMI can use an EBS volume or an
- // instance store volume.
- RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"`
-
- // One or more security groups for the instance.
- SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // Specifies whether to enable an instance launched in a VPC to perform NAT.
- // This controls whether source/destination checking is enabled on the instance.
- // A value of true means checking is enabled, and false means checking is disabled.
- // The value must be false for the instance to perform NAT. For more information,
- // see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
- // in the Amazon Virtual Private Cloud User Guide.
- SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"`
-
- // If the request is a Spot instance request, the ID of the request.
- SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"`
-
- // Specifies whether enhanced networking is enabled.
- SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"`
-
- // The current state of the instance.
- State *InstanceState `locationName:"instanceState" type:"structure"`
-
- // The reason for the most recent state transition.
- StateReason *StateReason `locationName:"stateReason" type:"structure"`
-
- // The reason for the most recent state transition. This might be an empty string.
- StateTransitionReason *string `locationName:"reason" type:"string"`
-
- // [EC2-VPC] The ID of the subnet in which the instance is running.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- // Any tags assigned to the instance.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The virtualization type of the instance.
- VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"`
-
- // [EC2-VPC] The ID of the VPC in which the instance is running.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataInstance `json:"-" xml:"-"`
-}
-
-type metadataInstance struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Instance) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Instance) GoString() string {
- return s.String()
-}
-
-// Describes a block device mapping.
-type InstanceBlockDeviceMapping struct {
- // The device name exposed to the instance (for example, /dev/sdh or xvdh).
- DeviceName *string `locationName:"deviceName" type:"string"`
-
- // Parameters used to automatically set up EBS volumes when the instance is
- // launched.
- Ebs *EbsInstanceBlockDevice `locationName:"ebs" type:"structure"`
-
- metadataInstanceBlockDeviceMapping `json:"-" xml:"-"`
-}
-
-type metadataInstanceBlockDeviceMapping struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceBlockDeviceMapping) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceBlockDeviceMapping) GoString() string {
- return s.String()
-}
-
-// Describes a block device mapping entry.
-type InstanceBlockDeviceMappingSpecification struct {
- // The device name exposed to the instance (for example, /dev/sdh or xvdh).
- DeviceName *string `locationName:"deviceName" type:"string"`
-
- // Parameters used to automatically set up EBS volumes when the instance is
- // launched.
- Ebs *EbsInstanceBlockDeviceSpecification `locationName:"ebs" type:"structure"`
-
- // suppress the specified device included in the block device mapping.
- NoDevice *string `locationName:"noDevice" type:"string"`
-
- // The virtual device name.
- VirtualName *string `locationName:"virtualName" type:"string"`
-
- metadataInstanceBlockDeviceMappingSpecification `json:"-" xml:"-"`
-}
-
-type metadataInstanceBlockDeviceMappingSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceBlockDeviceMappingSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceBlockDeviceMappingSpecification) GoString() string {
- return s.String()
-}
-
-// Describes a Reserved Instance listing state.
-type InstanceCount struct {
- // The number of listed Reserved Instances in the state specified by the state.
- InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
-
- // The states of the listed Reserved Instances.
- State *string `locationName:"state" type:"string" enum:"ListingState"`
-
- metadataInstanceCount `json:"-" xml:"-"`
-}
-
-type metadataInstanceCount struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceCount) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceCount) GoString() string {
- return s.String()
-}
-
-// Describes an instance to export.
-type InstanceExportDetails struct {
- // The ID of the resource being exported.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The target virtualization environment.
- TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"`
-
- metadataInstanceExportDetails `json:"-" xml:"-"`
-}
-
-type metadataInstanceExportDetails struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceExportDetails) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceExportDetails) GoString() string {
- return s.String()
-}
-
-// Describes the monitoring information of the instance.
-type InstanceMonitoring struct {
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The monitoring information.
- Monitoring *Monitoring `locationName:"monitoring" type:"structure"`
-
- metadataInstanceMonitoring `json:"-" xml:"-"`
-}
-
-type metadataInstanceMonitoring struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceMonitoring) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceMonitoring) GoString() string {
- return s.String()
-}
-
-// Describes a network interface.
-type InstanceNetworkInterface struct {
- // The association information for an Elastic IP associated with the network
- // interface.
- Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"`
-
- // The network interface attachment.
- Attachment *InstanceNetworkInterfaceAttachment `locationName:"attachment" type:"structure"`
-
- // The description.
- Description *string `locationName:"description" type:"string"`
-
- // One or more security groups.
- Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // The MAC address.
- MacAddress *string `locationName:"macAddress" type:"string"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // The ID of the AWS account that created the network interface.
- OwnerId *string `locationName:"ownerId" type:"string"`
-
- // The private DNS name.
- PrivateDnsName *string `locationName:"privateDnsName" type:"string"`
-
- // The IP address of the network interface within the subnet.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // The private IP addresses associated with the network interface.
- PrivateIpAddresses []*InstancePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"`
-
- // Indicates whether to validate network traffic to or from this network interface.
- SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"`
-
- // The status of the network interface.
- Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"`
-
- // The ID of the subnet.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataInstanceNetworkInterface `json:"-" xml:"-"`
-}
-
-type metadataInstanceNetworkInterface struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceNetworkInterface) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceNetworkInterface) GoString() string {
- return s.String()
-}
-
-// Describes association information for an Elastic IP address.
-type InstanceNetworkInterfaceAssociation struct {
- // The ID of the owner of the Elastic IP address.
- IpOwnerId *string `locationName:"ipOwnerId" type:"string"`
-
- // The public DNS name.
- PublicDnsName *string `locationName:"publicDnsName" type:"string"`
-
- // The public IP address or Elastic IP address bound to the network interface.
- PublicIp *string `locationName:"publicIp" type:"string"`
-
- metadataInstanceNetworkInterfaceAssociation `json:"-" xml:"-"`
-}
-
-type metadataInstanceNetworkInterfaceAssociation struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceNetworkInterfaceAssociation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceNetworkInterfaceAssociation) GoString() string {
- return s.String()
-}
-
-// Describes a network interface attachment.
-type InstanceNetworkInterfaceAttachment struct {
- // The time stamp when the attachment initiated.
- AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // The ID of the network interface attachment.
- AttachmentId *string `locationName:"attachmentId" type:"string"`
-
- // Indicates whether the network interface is deleted when the instance is terminated.
- DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
-
- // The index of the device on the instance for the network interface attachment.
- DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"`
-
- // The attachment state.
- Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"`
-
- metadataInstanceNetworkInterfaceAttachment `json:"-" xml:"-"`
-}
-
-type metadataInstanceNetworkInterfaceAttachment struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceNetworkInterfaceAttachment) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceNetworkInterfaceAttachment) GoString() string {
- return s.String()
-}
-
-// Describes a network interface.
-type InstanceNetworkInterfaceSpecification struct {
- // Indicates whether to assign a public IP address to an instance you launch
- // in a VPC. The public IP address can only be assigned to a network interface
- // for eth0, and can only be assigned to a new network interface, not an existing
- // one. You cannot specify more than one network interface in the request. If
- // launching into a default subnet, the default value is true.
- AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"`
-
- // If set to true, the interface is deleted when the instance is terminated.
- // You can specify true only if creating a new network interface when launching
- // an instance.
- DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
-
- // The description of the network interface. Applies only if creating a network
- // interface when launching an instance.
- Description *string `locationName:"description" type:"string"`
-
- // The index of the device on the instance for the network interface attachment.
- // If you are specifying a network interface in a RunInstances request, you
- // must provide the device index.
- DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"`
-
- // The IDs of the security groups for the network interface. Applies only if
- // creating a network interface when launching an instance.
- Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // The private IP address of the network interface. Applies only if creating
- // a network interface when launching an instance.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // One or more private IP addresses to assign to the network interface. Only
- // one private IP address can be designated as primary.
- PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" queryName:"PrivateIpAddresses" locationNameList:"item" type:"list"`
-
- // The number of secondary private IP addresses. You can't specify this option
- // and specify more than one private IP address using the private IP addresses
- // option.
- SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"`
-
- // The ID of the subnet associated with the network string. Applies only if
- // creating a network interface when launching an instance.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- metadataInstanceNetworkInterfaceSpecification `json:"-" xml:"-"`
-}
-
-type metadataInstanceNetworkInterfaceSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceNetworkInterfaceSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceNetworkInterfaceSpecification) GoString() string {
- return s.String()
-}
-
-// Describes a private IP address.
-type InstancePrivateIpAddress struct {
- // The association information for an Elastic IP address for the network interface.
- Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"`
-
- // Indicates whether this IP address is the primary private IP address of the
- // network interface.
- Primary *bool `locationName:"primary" type:"boolean"`
-
- // The private DNS name.
- PrivateDnsName *string `locationName:"privateDnsName" type:"string"`
-
- // The private IP address of the network interface.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- metadataInstancePrivateIpAddress `json:"-" xml:"-"`
-}
-
-type metadataInstancePrivateIpAddress struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstancePrivateIpAddress) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstancePrivateIpAddress) GoString() string {
- return s.String()
-}
-
-// Describes the current state of the instance.
-type InstanceState struct {
- // The low byte represents the state. The high byte is an opaque internal value
- // and should be ignored.
- //
- // 0 : pending
- //
- // 16 : running
- //
- // 32 : shutting-down
- //
- // 48 : terminated
- //
- // 64 : stopping
- //
- // 80 : stopped
- Code *int64 `locationName:"code" type:"integer"`
-
- // The current state of the instance.
- Name *string `locationName:"name" type:"string" enum:"InstanceStateName"`
-
- metadataInstanceState `json:"-" xml:"-"`
-}
-
-type metadataInstanceState struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceState) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceState) GoString() string {
- return s.String()
-}
-
-// Describes an instance state change.
-type InstanceStateChange struct {
- // The current state of the instance.
- CurrentState *InstanceState `locationName:"currentState" type:"structure"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The previous state of the instance.
- PreviousState *InstanceState `locationName:"previousState" type:"structure"`
-
- metadataInstanceStateChange `json:"-" xml:"-"`
-}
-
-type metadataInstanceStateChange struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceStateChange) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceStateChange) GoString() string {
- return s.String()
-}
-
-// Describes the status of an instance.
-type InstanceStatus struct {
- // The Availability Zone of the instance.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // Any scheduled events associated with the instance.
- Events []*InstanceStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The intended state of the instance. DescribeInstanceStatus requires that
- // an instance be in the running state.
- InstanceState *InstanceState `locationName:"instanceState" type:"structure"`
-
- // Reports impaired functionality that stems from issues internal to the instance,
- // such as impaired reachability.
- InstanceStatus *InstanceStatusSummary `locationName:"instanceStatus" type:"structure"`
-
- // Reports impaired functionality that stems from issues related to the systems
- // that support an instance, such as hardware failures and network connectivity
- // problems.
- SystemStatus *InstanceStatusSummary `locationName:"systemStatus" type:"structure"`
-
- metadataInstanceStatus `json:"-" xml:"-"`
-}
-
-type metadataInstanceStatus struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceStatus) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceStatus) GoString() string {
- return s.String()
-}
-
-// Describes the instance status.
-type InstanceStatusDetails struct {
- // The time when a status check failed. For an instance that was launched and
- // impaired, this is the time when the instance was launched.
- ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp" timestampFormat:"iso8601"`
-
- // The type of instance status.
- Name *string `locationName:"name" type:"string" enum:"StatusName"`
-
- // The status.
- Status *string `locationName:"status" type:"string" enum:"StatusType"`
-
- metadataInstanceStatusDetails `json:"-" xml:"-"`
-}
-
-type metadataInstanceStatusDetails struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceStatusDetails) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceStatusDetails) GoString() string {
- return s.String()
-}
-
-// Describes a scheduled event for an instance.
-type InstanceStatusEvent struct {
- // The event code.
- Code *string `locationName:"code" type:"string" enum:"EventCode"`
-
- // A description of the event.
- //
- // After a scheduled event is completed, it can still be described for up to
- // a week. If the event has been completed, this description starts with the
- // following text: [Completed].
- Description *string `locationName:"description" type:"string"`
-
- // The latest scheduled end time for the event.
- NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"iso8601"`
-
- // The earliest scheduled start time for the event.
- NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataInstanceStatusEvent `json:"-" xml:"-"`
-}
-
-type metadataInstanceStatusEvent struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceStatusEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceStatusEvent) GoString() string {
- return s.String()
-}
-
-// Describes the status of an instance.
-type InstanceStatusSummary struct {
- // The system instance health or application instance health.
- Details []*InstanceStatusDetails `locationName:"details" locationNameList:"item" type:"list"`
-
- // The status.
- Status *string `locationName:"status" type:"string" enum:"SummaryStatus"`
-
- metadataInstanceStatusSummary `json:"-" xml:"-"`
-}
-
-type metadataInstanceStatusSummary struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InstanceStatusSummary) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InstanceStatusSummary) GoString() string {
- return s.String()
-}
-
-// Describes an Internet gateway.
-type InternetGateway struct {
- // Any VPCs attached to the Internet gateway.
- Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"`
-
- // The ID of the Internet gateway.
- InternetGatewayId *string `locationName:"internetGatewayId" type:"string"`
-
- // Any tags assigned to the Internet gateway.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- metadataInternetGateway `json:"-" xml:"-"`
-}
-
-type metadataInternetGateway struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InternetGateway) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InternetGateway) GoString() string {
- return s.String()
-}
-
-// Describes the attachment of a VPC to an Internet gateway.
-type InternetGatewayAttachment struct {
- // The current state of the attachment.
- State *string `locationName:"state" type:"string" enum:"AttachmentStatus"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataInternetGatewayAttachment `json:"-" xml:"-"`
-}
-
-type metadataInternetGatewayAttachment struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s InternetGatewayAttachment) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InternetGatewayAttachment) GoString() string {
- return s.String()
-}
-
-// Describes a security group rule.
-type IpPermission struct {
- // The start of port range for the TCP and UDP protocols, or an ICMP type number.
- // A value of -1 indicates all ICMP types.
- FromPort *int64 `locationName:"fromPort" type:"integer"`
-
- // The protocol.
- //
- // When you call DescribeSecurityGroups, the protocol value returned is the
- // number. Exception: For TCP, UDP, and ICMP, the value returned is the name
- // (for example, tcp, udp, or icmp). For a list of protocol numbers, see Protocol
- // Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
- // (VPC only) When you call AuthorizeSecurityGroupIngress, you can use -1 to
- // specify all.
- IpProtocol *string `locationName:"ipProtocol" type:"string"`
-
- // One or more IP ranges.
- IpRanges []*IpRange `locationName:"ipRanges" locationNameList:"item" type:"list"`
-
- // (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups
- // only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress
- // request, this is the AWS service that you want to access through a VPC endpoint
- // from instances associated with the security group.
- PrefixListIds []*PrefixListId `locationName:"prefixListIds" locationNameList:"item" type:"list"`
-
- // The end of port range for the TCP and UDP protocols, or an ICMP code. A value
- // of -1 indicates all ICMP codes for the specified ICMP type.
- ToPort *int64 `locationName:"toPort" type:"integer"`
-
- // One or more security group and AWS account ID pairs.
- UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"`
-
- metadataIpPermission `json:"-" xml:"-"`
-}
-
-type metadataIpPermission struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s IpPermission) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IpPermission) GoString() string {
- return s.String()
-}
-
-// Describes an IP range.
-type IpRange struct {
- // The CIDR range. You can either specify a CIDR range or a source security
- // group, not both.
- CidrIp *string `locationName:"cidrIp" type:"string"`
-
- metadataIpRange `json:"-" xml:"-"`
-}
-
-type metadataIpRange struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s IpRange) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IpRange) GoString() string {
- return s.String()
-}
-
-// Describes a key pair.
-type KeyPairInfo struct {
- // If you used CreateKeyPair to create the key pair, this is the SHA-1 digest
- // of the DER encoded private key. If you used ImportKeyPair to provide AWS
- // the public key, this is the MD5 public key fingerprint as specified in section
- // 4 of RFC4716.
- KeyFingerprint *string `locationName:"keyFingerprint" type:"string"`
-
- // The name of the key pair.
- KeyName *string `locationName:"keyName" type:"string"`
-
- metadataKeyPairInfo `json:"-" xml:"-"`
-}
-
-type metadataKeyPairInfo struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s KeyPairInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s KeyPairInfo) GoString() string {
- return s.String()
-}
-
-// Describes a launch permission.
-type LaunchPermission struct {
- // The name of the group.
- Group *string `locationName:"group" type:"string" enum:"PermissionGroup"`
-
- // The AWS account ID.
- UserId *string `locationName:"userId" type:"string"`
-
- metadataLaunchPermission `json:"-" xml:"-"`
-}
-
-type metadataLaunchPermission struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s LaunchPermission) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LaunchPermission) GoString() string {
- return s.String()
-}
-
-// Describes a launch permission modification.
-type LaunchPermissionModifications struct {
- // The AWS account ID to add to the list of launch permissions for the AMI.
- Add []*LaunchPermission `locationNameList:"item" type:"list"`
-
- // The AWS account ID to remove from the list of launch permissions for the
- // AMI.
- Remove []*LaunchPermission `locationNameList:"item" type:"list"`
-
- metadataLaunchPermissionModifications `json:"-" xml:"-"`
-}
-
-type metadataLaunchPermissionModifications struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s LaunchPermissionModifications) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LaunchPermissionModifications) GoString() string {
- return s.String()
-}
-
-// Describes the launch specification for an instance.
-type LaunchSpecification struct {
- // Deprecated.
- AddressingType *string `locationName:"addressingType" type:"string"`
-
- // One or more block device mapping entries.
- BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
-
- // Indicates whether the instance is optimized for EBS I/O. This optimization
- // provides dedicated throughput to Amazon EBS and an optimized configuration
- // stack to provide optimal EBS I/O performance. This optimization isn't available
- // with all instance types. Additional usage charges apply when using an EBS
- // Optimized instance.
- //
- // Default: false
- EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
-
- // The IAM instance profile.
- IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
-
- // The ID of the AMI.
- ImageId *string `locationName:"imageId" type:"string"`
-
- // The instance type.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // The ID of the kernel.
- KernelId *string `locationName:"kernelId" type:"string"`
-
- // The name of the key pair.
- KeyName *string `locationName:"keyName" type:"string"`
-
- // Describes the monitoring for the instance.
- Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"`
-
- // One or more network interfaces.
- NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
-
- // The placement information for the instance.
- Placement *SpotPlacement `locationName:"placement" type:"structure"`
-
- // The ID of the RAM disk.
- RamdiskId *string `locationName:"ramdiskId" type:"string"`
-
- // One or more security groups. When requesting instances in a VPC, you must
- // specify the IDs of the security groups. When requesting instances in EC2-Classic,
- // you can specify the names or the IDs of the security groups.
- SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // The ID of the subnet in which to launch the instance.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- // The Base64-encoded MIME user data to make available to the instances.
- UserData *string `locationName:"userData" type:"string"`
-
- metadataLaunchSpecification `json:"-" xml:"-"`
-}
-
-type metadataLaunchSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s LaunchSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LaunchSpecification) GoString() string {
- return s.String()
-}
-
-type ModifyImageAttributeInput struct {
- // The name of the attribute to modify.
- Attribute *string `type:"string"`
-
- // A description for the AMI.
- Description *AttributeValue `type:"structure"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the AMI.
- ImageId *string `type:"string" required:"true"`
-
- // A launch permission modification.
- LaunchPermission *LaunchPermissionModifications `type:"structure"`
-
- // The operation type.
- OperationType *string `type:"string" enum:"OperationType"`
-
- // One or more product codes. After you add a product code to an AMI, it can't
- // be removed. This is only valid when modifying the productCodes attribute.
- ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"`
-
- // One or more user groups. This is only valid when modifying the launchPermission
- // attribute.
- UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"`
-
- // One or more AWS account IDs. This is only valid when modifying the launchPermission
- // attribute.
- UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"`
-
- // The value of the attribute being modified. This is only valid when modifying
- // the description attribute.
- Value *string `type:"string"`
-
- metadataModifyImageAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataModifyImageAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyImageAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyImageAttributeInput) GoString() string {
- return s.String()
-}
-
-type ModifyImageAttributeOutput struct {
- metadataModifyImageAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataModifyImageAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyImageAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyImageAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ModifyInstanceAttributeInput struct {
- // The name of the attribute.
- Attribute *string `locationName:"attribute" type:"string" enum:"InstanceAttributeName"`
-
- // Modifies the DeleteOnTermination attribute for volumes that are currently
- // attached. The volume must be owned by the caller. If no value is specified
- // for DeleteOnTermination, the default is true and the volume is deleted when
- // the instance is terminated.
- //
- // To add instance store volumes to an Amazon EBS-backed instance, you must
- // add them when you launch the instance. For more information, see Updating
- // the Block Device Mapping when Launching an Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM)
- // in the Amazon Elastic Compute Cloud User Guide.
- BlockDeviceMappings []*InstanceBlockDeviceMappingSpecification `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
-
- // If the value is true, you can't terminate the instance using the Amazon EC2
- // console, CLI, or API; otherwise, you can. You cannot use this paramater for
- // Spot Instances.
- DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Specifies whether the instance is optimized for EBS I/O. This optimization
- // provides dedicated throughput to Amazon EBS and an optimized configuration
- // stack to provide optimal EBS I/O performance. This optimization isn't available
- // with all instance types. Additional usage charges apply when using an EBS
- // Optimized instance.
- EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"`
-
- // [EC2-VPC] Changes the security groups of the instance. You must specify at
- // least one security group, even if it's just the default security group for
- // the VPC. You must specify the security group ID, not the security group name.
- Groups []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string" required:"true"`
-
- // Specifies whether an instance stops or terminates when you initiate shutdown
- // from the instance (using the operating system command for system shutdown).
- InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"`
-
- // Changes the instance type to the specified value. For more information, see
- // Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html).
- // If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.
- InstanceType *AttributeValue `locationName:"instanceType" type:"structure"`
-
- // Changes the instance's kernel to the specified value. We recommend that you
- // use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB
- // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html).
- Kernel *AttributeValue `locationName:"kernel" type:"structure"`
-
- // Changes the instance's RAM disk to the specified value. We recommend that
- // you use PV-GRUB instead of kernels and RAM disks. For more information, see
- // PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html).
- Ramdisk *AttributeValue `locationName:"ramdisk" type:"structure"`
-
- // Specifies whether source/destination checking is enabled. A value of true
- // means that checking is enabled, and false means checking is disabled. This
- // value must be false for a NAT instance to perform NAT.
- SourceDestCheck *AttributeBooleanValue `type:"structure"`
-
- // Set to simple to enable enhanced networking for the instance.
- //
- // There is no way to disable enhanced networking at this time.
- //
- // This option is supported only for HVM instances. Specifying this option
- // with a PV instance can make it unreachable.
- SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"`
-
- // Changes the instance's user data to the specified value.
- UserData *BlobAttributeValue `locationName:"userData" type:"structure"`
-
- // A new value for the attribute. Use only with the kernel, ramdisk, userData,
- // disableApiTermination, or instanceInitiatedShutdownBehavior attribute.
- Value *string `locationName:"value" type:"string"`
-
- metadataModifyInstanceAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataModifyInstanceAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyInstanceAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyInstanceAttributeInput) GoString() string {
- return s.String()
-}
-
-type ModifyInstanceAttributeOutput struct {
- metadataModifyInstanceAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataModifyInstanceAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyInstanceAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyInstanceAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ModifyNetworkInterfaceAttributeInput struct {
- // Information about the interface attachment. If modifying the 'delete on termination'
- // attribute, you must specify the ID of the interface attachment.
- Attachment *NetworkInterfaceAttachmentChanges `locationName:"attachment" type:"structure"`
-
- // A description for the network interface.
- Description *AttributeValue `locationName:"description" type:"structure"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Changes the security groups for the network interface. The new set of groups
- // you specify replaces the current set. You must specify at least one group,
- // even if it's just the default security group in the VPC. You must specify
- // the ID of the security group, not the name.
- Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"`
-
- // Indicates whether source/destination checking is enabled. A value of true
- // means checking is enabled, and false means checking is disabled. This value
- // must be false for a NAT instance to perform NAT. For more information, see
- // NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
- // in the Amazon Virtual Private Cloud User Guide.
- SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"`
-
- metadataModifyNetworkInterfaceAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataModifyNetworkInterfaceAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyNetworkInterfaceAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyNetworkInterfaceAttributeInput) GoString() string {
- return s.String()
-}
-
-type ModifyNetworkInterfaceAttributeOutput struct {
- metadataModifyNetworkInterfaceAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataModifyNetworkInterfaceAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyNetworkInterfaceAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyNetworkInterfaceAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ModifyReservedInstancesInput struct {
- // A unique, case-sensitive token you provide to ensure idempotency of your
- // modification request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // The IDs of the Reserved Instances to modify.
- ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list" required:"true"`
-
- // The configuration settings for the Reserved Instances to modify.
- TargetConfigurations []*ReservedInstancesConfiguration `locationName:"ReservedInstancesConfigurationSetItemType" locationNameList:"item" type:"list" required:"true"`
-
- metadataModifyReservedInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataModifyReservedInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyReservedInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyReservedInstancesInput) GoString() string {
- return s.String()
-}
-
-type ModifyReservedInstancesOutput struct {
- // The ID for the modification.
- ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"`
-
- metadataModifyReservedInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataModifyReservedInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyReservedInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyReservedInstancesOutput) GoString() string {
- return s.String()
-}
-
-type ModifySnapshotAttributeInput struct {
- // The snapshot attribute to modify.
- //
- // Only volume creation permissions may be modified at the customer level.
- Attribute *string `type:"string" enum:"SnapshotAttributeName"`
-
- // A JSON representation of the snapshot attribute modification.
- CreateVolumePermission *CreateVolumePermissionModifications `type:"structure"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The group to modify for the snapshot.
- GroupNames []*string `locationName:"UserGroup" locationNameList:"GroupName" type:"list"`
-
- // The type of operation to perform to the attribute.
- OperationType *string `type:"string" enum:"OperationType"`
-
- // The ID of the snapshot.
- SnapshotId *string `type:"string" required:"true"`
-
- // The account ID to modify for the snapshot.
- UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"`
-
- metadataModifySnapshotAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataModifySnapshotAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifySnapshotAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifySnapshotAttributeInput) GoString() string {
- return s.String()
-}
-
-type ModifySnapshotAttributeOutput struct {
- metadataModifySnapshotAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataModifySnapshotAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifySnapshotAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifySnapshotAttributeOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for ModifySpotFleetRequest.
-type ModifySpotFleetRequestInput struct {
- // Indicates whether running Spot instances should be terminated if the target
- // capacity of the Spot fleet request is decreased below the current size of
- // the Spot fleet.
- ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"`
-
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- // The size of the fleet.
- TargetCapacity *int64 `locationName:"targetCapacity" type:"integer"`
-
- metadataModifySpotFleetRequestInput `json:"-" xml:"-"`
-}
-
-type metadataModifySpotFleetRequestInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifySpotFleetRequestInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifySpotFleetRequestInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of ModifySpotFleetRequest.
-type ModifySpotFleetRequestOutput struct {
- // Is true if the request succeeds, and an error otherwise.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataModifySpotFleetRequestOutput `json:"-" xml:"-"`
-}
-
-type metadataModifySpotFleetRequestOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifySpotFleetRequestOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifySpotFleetRequestOutput) GoString() string {
- return s.String()
-}
-
-type ModifySubnetAttributeInput struct {
- // Specify true to indicate that instances launched into the specified subnet
- // should be assigned public IP address.
- MapPublicIpOnLaunch *AttributeBooleanValue `type:"structure"`
-
- // The ID of the subnet.
- SubnetId *string `locationName:"subnetId" type:"string" required:"true"`
-
- metadataModifySubnetAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataModifySubnetAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifySubnetAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifySubnetAttributeInput) GoString() string {
- return s.String()
-}
-
-type ModifySubnetAttributeOutput struct {
- metadataModifySubnetAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataModifySubnetAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifySubnetAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifySubnetAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ModifyVolumeAttributeInput struct {
- // Indicates whether the volume should be auto-enabled for I/O operations.
- AutoEnableIO *AttributeBooleanValue `type:"structure"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the volume.
- VolumeId *string `type:"string" required:"true"`
-
- metadataModifyVolumeAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataModifyVolumeAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyVolumeAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyVolumeAttributeInput) GoString() string {
- return s.String()
-}
-
-type ModifyVolumeAttributeOutput struct {
- metadataModifyVolumeAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataModifyVolumeAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyVolumeAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyVolumeAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ModifyVpcAttributeInput struct {
- // Indicates whether the instances launched in the VPC get DNS hostnames. If
- // enabled, instances in the VPC get DNS hostnames; otherwise, they do not.
- //
- // You cannot modify the DNS resolution and DNS hostnames attributes in the
- // same request. Use separate requests for each attribute. You can only enable
- // DNS hostnames if you've enabled DNS support.
- EnableDnsHostnames *AttributeBooleanValue `type:"structure"`
-
- // Indicates whether the DNS resolution is supported for the VPC. If enabled,
- // queries to the Amazon provided DNS server at the 169.254.169.253 IP address,
- // or the reserved IP address at the base of the VPC network range "plus two"
- // will succeed. If disabled, the Amazon provided DNS service in the VPC that
- // resolves public DNS hostnames to IP addresses is not enabled.
- //
- // You cannot modify the DNS resolution and DNS hostnames attributes in the
- // same request. Use separate requests for each attribute.
- EnableDnsSupport *AttributeBooleanValue `type:"structure"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string" required:"true"`
-
- metadataModifyVpcAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataModifyVpcAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyVpcAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyVpcAttributeInput) GoString() string {
- return s.String()
-}
-
-type ModifyVpcAttributeOutput struct {
- metadataModifyVpcAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataModifyVpcAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyVpcAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyVpcAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ModifyVpcEndpointInput struct {
- // One or more route tables IDs to associate with the endpoint.
- AddRouteTableIds []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `type:"boolean"`
-
- // A policy document to attach to the endpoint. The policy must be in valid
- // JSON format.
- PolicyDocument *string `type:"string"`
-
- // One or more route table IDs to disassociate from the endpoint.
- RemoveRouteTableIds []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"`
-
- // Specify true to reset the policy document to the default policy. The default
- // policy allows access to the service.
- ResetPolicy *bool `type:"boolean"`
-
- // The ID of the endpoint.
- VpcEndpointId *string `type:"string" required:"true"`
-
- metadataModifyVpcEndpointInput `json:"-" xml:"-"`
-}
-
-type metadataModifyVpcEndpointInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyVpcEndpointInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyVpcEndpointInput) GoString() string {
- return s.String()
-}
-
-type ModifyVpcEndpointOutput struct {
- // Returns true if the request succeeds; otherwise, it returns an error.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataModifyVpcEndpointOutput `json:"-" xml:"-"`
-}
-
-type metadataModifyVpcEndpointOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ModifyVpcEndpointOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ModifyVpcEndpointOutput) GoString() string {
- return s.String()
-}
-
-type MonitorInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more instance IDs.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
-
- metadataMonitorInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataMonitorInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s MonitorInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MonitorInstancesInput) GoString() string {
- return s.String()
-}
-
-type MonitorInstancesOutput struct {
- // Monitoring information for one or more instances.
- InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"`
-
- metadataMonitorInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataMonitorInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s MonitorInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MonitorInstancesOutput) GoString() string {
- return s.String()
-}
-
-// Describes the monitoring for the instance.
-type Monitoring struct {
- // Indicates whether monitoring is enabled for the instance.
- State *string `locationName:"state" type:"string" enum:"MonitoringState"`
-
- metadataMonitoring `json:"-" xml:"-"`
-}
-
-type metadataMonitoring struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Monitoring) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Monitoring) GoString() string {
- return s.String()
-}
-
-type MoveAddressToVpcInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The Elastic IP address.
- PublicIp *string `locationName:"publicIp" type:"string" required:"true"`
-
- metadataMoveAddressToVpcInput `json:"-" xml:"-"`
-}
-
-type metadataMoveAddressToVpcInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s MoveAddressToVpcInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MoveAddressToVpcInput) GoString() string {
- return s.String()
-}
-
-type MoveAddressToVpcOutput struct {
- // The allocation ID for the Elastic IP address.
- AllocationId *string `locationName:"allocationId" type:"string"`
-
- // The status of the move of the IP address.
- Status *string `locationName:"status" type:"string" enum:"Status"`
-
- metadataMoveAddressToVpcOutput `json:"-" xml:"-"`
-}
-
-type metadataMoveAddressToVpcOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s MoveAddressToVpcOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MoveAddressToVpcOutput) GoString() string {
- return s.String()
-}
-
-// Describes the status of a moving Elastic IP address.
-type MovingAddressStatus struct {
- // The status of the Elastic IP address that's being moved to the EC2-VPC platform,
- // or restored to the EC2-Classic platform.
- MoveStatus *string `locationName:"moveStatus" type:"string" enum:"MoveStatus"`
-
- // The Elastic IP address.
- PublicIp *string `locationName:"publicIp" type:"string"`
-
- metadataMovingAddressStatus `json:"-" xml:"-"`
-}
-
-type metadataMovingAddressStatus struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s MovingAddressStatus) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MovingAddressStatus) GoString() string {
- return s.String()
-}
-
-// Describes a network ACL.
-type NetworkAcl struct {
- // Any associations between the network ACL and one or more subnets
- Associations []*NetworkAclAssociation `locationName:"associationSet" locationNameList:"item" type:"list"`
-
- // One or more entries (rules) in the network ACL.
- Entries []*NetworkAclEntry `locationName:"entrySet" locationNameList:"item" type:"list"`
-
- // Indicates whether this is the default network ACL for the VPC.
- IsDefault *bool `locationName:"default" type:"boolean"`
-
- // The ID of the network ACL.
- NetworkAclId *string `locationName:"networkAclId" type:"string"`
-
- // Any tags assigned to the network ACL.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the VPC for the network ACL.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataNetworkAcl `json:"-" xml:"-"`
-}
-
-type metadataNetworkAcl struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NetworkAcl) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NetworkAcl) GoString() string {
- return s.String()
-}
-
-// Describes an association between a network ACL and a subnet.
-type NetworkAclAssociation struct {
- // The ID of the association between a network ACL and a subnet.
- NetworkAclAssociationId *string `locationName:"networkAclAssociationId" type:"string"`
-
- // The ID of the network ACL.
- NetworkAclId *string `locationName:"networkAclId" type:"string"`
-
- // The ID of the subnet.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- metadataNetworkAclAssociation `json:"-" xml:"-"`
-}
-
-type metadataNetworkAclAssociation struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NetworkAclAssociation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NetworkAclAssociation) GoString() string {
- return s.String()
-}
-
-// Describes an entry in a network ACL.
-type NetworkAclEntry struct {
- // The network range to allow or deny, in CIDR notation.
- CidrBlock *string `locationName:"cidrBlock" type:"string"`
-
- // Indicates whether the rule is an egress rule (applied to traffic leaving
- // the subnet).
- Egress *bool `locationName:"egress" type:"boolean"`
-
- // ICMP protocol: The ICMP type and code.
- IcmpTypeCode *IcmpTypeCode `locationName:"icmpTypeCode" type:"structure"`
-
- // TCP or UDP protocols: The range of ports the rule applies to.
- PortRange *PortRange `locationName:"portRange" type:"structure"`
-
- // The protocol. A value of -1 means all protocols.
- Protocol *string `locationName:"protocol" type:"string"`
-
- // Indicates whether to allow or deny the traffic that matches the rule.
- RuleAction *string `locationName:"ruleAction" type:"string" enum:"RuleAction"`
-
- // The rule number for the entry. ACL entries are processed in ascending order
- // by rule number.
- RuleNumber *int64 `locationName:"ruleNumber" type:"integer"`
-
- metadataNetworkAclEntry `json:"-" xml:"-"`
-}
-
-type metadataNetworkAclEntry struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NetworkAclEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NetworkAclEntry) GoString() string {
- return s.String()
-}
-
-// Describes a network interface.
-type NetworkInterface struct {
- // The association information for an Elastic IP associated with the network
- // interface.
- Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"`
-
- // The network interface attachment.
- Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"`
-
- // The Availability Zone.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // A description.
- Description *string `locationName:"description" type:"string"`
-
- // Any security groups for the network interface.
- Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // The MAC address.
- MacAddress *string `locationName:"macAddress" type:"string"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // The AWS account ID of the owner of the network interface.
- OwnerId *string `locationName:"ownerId" type:"string"`
-
- // The private DNS name.
- PrivateDnsName *string `locationName:"privateDnsName" type:"string"`
-
- // The IP address of the network interface within the subnet.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // The private IP addresses associated with the network interface.
- PrivateIpAddresses []*NetworkInterfacePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"`
-
- // The ID of the entity that launched the instance on your behalf (for example,
- // AWS Management Console or Auto Scaling).
- RequesterId *string `locationName:"requesterId" type:"string"`
-
- // Indicates whether the network interface is being managed by AWS.
- RequesterManaged *bool `locationName:"requesterManaged" type:"boolean"`
-
- // Indicates whether traffic to or from the instance is validated.
- SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"`
-
- // The status of the network interface.
- Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"`
-
- // The ID of the subnet.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- // Any tags assigned to the network interface.
- TagSet []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataNetworkInterface `json:"-" xml:"-"`
-}
-
-type metadataNetworkInterface struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NetworkInterface) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NetworkInterface) GoString() string {
- return s.String()
-}
-
-// Describes association information for an Elastic IP address.
-type NetworkInterfaceAssociation struct {
- // The allocation ID.
- AllocationId *string `locationName:"allocationId" type:"string"`
-
- // The association ID.
- AssociationId *string `locationName:"associationId" type:"string"`
-
- // The ID of the Elastic IP address owner.
- IpOwnerId *string `locationName:"ipOwnerId" type:"string"`
-
- // The public DNS name.
- PublicDnsName *string `locationName:"publicDnsName" type:"string"`
-
- // The address of the Elastic IP address bound to the network interface.
- PublicIp *string `locationName:"publicIp" type:"string"`
-
- metadataNetworkInterfaceAssociation `json:"-" xml:"-"`
-}
-
-type metadataNetworkInterfaceAssociation struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NetworkInterfaceAssociation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NetworkInterfaceAssociation) GoString() string {
- return s.String()
-}
-
-// Describes a network interface attachment.
-type NetworkInterfaceAttachment struct {
- // The timestamp indicating when the attachment initiated.
- AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // The ID of the network interface attachment.
- AttachmentId *string `locationName:"attachmentId" type:"string"`
-
- // Indicates whether the network interface is deleted when the instance is terminated.
- DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
-
- // The device index of the network interface attachment on the instance.
- DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The AWS account ID of the owner of the instance.
- InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"`
-
- // The attachment state.
- Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"`
-
- metadataNetworkInterfaceAttachment `json:"-" xml:"-"`
-}
-
-type metadataNetworkInterfaceAttachment struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NetworkInterfaceAttachment) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NetworkInterfaceAttachment) GoString() string {
- return s.String()
-}
-
-// Describes an attachment change.
-type NetworkInterfaceAttachmentChanges struct {
- // The ID of the network interface attachment.
- AttachmentId *string `locationName:"attachmentId" type:"string"`
-
- // Indicates whether the network interface is deleted when the instance is terminated.
- DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
-
- metadataNetworkInterfaceAttachmentChanges `json:"-" xml:"-"`
-}
-
-type metadataNetworkInterfaceAttachmentChanges struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NetworkInterfaceAttachmentChanges) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NetworkInterfaceAttachmentChanges) GoString() string {
- return s.String()
-}
-
-// Describes the private IP address of a network interface.
-type NetworkInterfacePrivateIpAddress struct {
- // The association information for an Elastic IP address associated with the
- // network interface.
- Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"`
-
- // Indicates whether this IP address is the primary private IP address of the
- // network interface.
- Primary *bool `locationName:"primary" type:"boolean"`
-
- // The private DNS name.
- PrivateDnsName *string `locationName:"privateDnsName" type:"string"`
-
- // The private IP address.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- metadataNetworkInterfacePrivateIpAddress `json:"-" xml:"-"`
-}
-
-type metadataNetworkInterfacePrivateIpAddress struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NetworkInterfacePrivateIpAddress) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NetworkInterfacePrivateIpAddress) GoString() string {
- return s.String()
-}
-
-type NewDhcpConfiguration struct {
- Key *string `locationName:"key" type:"string"`
-
- Values []*string `locationName:"Value" locationNameList:"item" type:"list"`
-
- metadataNewDhcpConfiguration `json:"-" xml:"-"`
-}
-
-type metadataNewDhcpConfiguration struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s NewDhcpConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NewDhcpConfiguration) GoString() string {
- return s.String()
-}
-
-// Describes the placement for the instance.
-type Placement struct {
- // The Availability Zone of the instance.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The name of the placement group the instance is in (for cluster compute instances).
- GroupName *string `locationName:"groupName" type:"string"`
-
- // The tenancy of the instance (if the instance is running in a VPC). An instance
- // with a tenancy of dedicated runs on single-tenant hardware.
- Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"`
-
- metadataPlacement `json:"-" xml:"-"`
-}
-
-type metadataPlacement struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Placement) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Placement) GoString() string {
- return s.String()
-}
-
-// Describes a placement group.
-type PlacementGroup struct {
- // The name of the placement group.
- GroupName *string `locationName:"groupName" type:"string"`
-
- // The state of the placement group.
- State *string `locationName:"state" type:"string" enum:"PlacementGroupState"`
-
- // The placement strategy.
- Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"`
-
- metadataPlacementGroup `json:"-" xml:"-"`
-}
-
-type metadataPlacementGroup struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PlacementGroup) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PlacementGroup) GoString() string {
- return s.String()
-}
-
-// Describes a range of ports.
-type PortRange struct {
- // The first port in the range.
- From *int64 `locationName:"from" type:"integer"`
-
- // The last port in the range.
- To *int64 `locationName:"to" type:"integer"`
-
- metadataPortRange `json:"-" xml:"-"`
-}
-
-type metadataPortRange struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PortRange) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PortRange) GoString() string {
- return s.String()
-}
-
-// Describes prefixes for AWS services.
-type PrefixList struct {
- // The IP address range of the AWS service.
- Cidrs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"`
-
- // The ID of the prefix.
- PrefixListId *string `locationName:"prefixListId" type:"string"`
-
- // The name of the prefix.
- PrefixListName *string `locationName:"prefixListName" type:"string"`
-
- metadataPrefixList `json:"-" xml:"-"`
-}
-
-type metadataPrefixList struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PrefixList) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PrefixList) GoString() string {
- return s.String()
-}
-
-// The ID of the prefix.
-type PrefixListId struct {
- // The ID of the prefix.
- PrefixListId *string `locationName:"prefixListId" type:"string"`
-
- metadataPrefixListId `json:"-" xml:"-"`
-}
-
-type metadataPrefixListId struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PrefixListId) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PrefixListId) GoString() string {
- return s.String()
-}
-
-// Describes the price for a Reserved Instance.
-type PriceSchedule struct {
- // The current price schedule, as determined by the term remaining for the Reserved
- // Instance in the listing.
- //
- // A specific price schedule is always in effect, but only one price schedule
- // can be active at any time. Take, for example, a Reserved Instance listing
- // that has five months remaining in its term. When you specify price schedules
- // for five months and two months, this means that schedule 1, covering the
- // first three months of the remaining term, will be active during months 5,
- // 4, and 3. Then schedule 2, covering the last two months of the term, will
- // be active for months 2 and 1.
- Active *bool `locationName:"active" type:"boolean"`
-
- // The currency for transacting the Reserved Instance resale. At this time,
- // the only supported currency is USD.
- CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
-
- // The fixed price for the term.
- Price *float64 `locationName:"price" type:"double"`
-
- // The number of months remaining in the reservation. For example, 2 is the
- // second to the last month before the capacity reservation expires.
- Term *int64 `locationName:"term" type:"long"`
-
- metadataPriceSchedule `json:"-" xml:"-"`
-}
-
-type metadataPriceSchedule struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PriceSchedule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PriceSchedule) GoString() string {
- return s.String()
-}
-
-// Describes the price for a Reserved Instance.
-type PriceScheduleSpecification struct {
- // The currency for transacting the Reserved Instance resale. At this time,
- // the only supported currency is USD.
- CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
-
- // The fixed price for the term.
- Price *float64 `locationName:"price" type:"double"`
-
- // The number of months remaining in the reservation. For example, 2 is the
- // second to the last month before the capacity reservation expires.
- Term *int64 `locationName:"term" type:"long"`
-
- metadataPriceScheduleSpecification `json:"-" xml:"-"`
-}
-
-type metadataPriceScheduleSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PriceScheduleSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PriceScheduleSpecification) GoString() string {
- return s.String()
-}
-
-// Describes a Reserved Instance offering.
-type PricingDetail struct {
- // The number of instances available for the price.
- Count *int64 `locationName:"count" type:"integer"`
-
- // The price per instance.
- Price *float64 `locationName:"price" type:"double"`
-
- metadataPricingDetail `json:"-" xml:"-"`
-}
-
-type metadataPricingDetail struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PricingDetail) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PricingDetail) GoString() string {
- return s.String()
-}
-
-// Describes a secondary private IP address for a network interface.
-type PrivateIpAddressSpecification struct {
- // Indicates whether the private IP address is the primary private IP address.
- // Only one IP address can be designated as primary.
- Primary *bool `locationName:"primary" type:"boolean"`
-
- // The private IP addresses.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string" required:"true"`
-
- metadataPrivateIpAddressSpecification `json:"-" xml:"-"`
-}
-
-type metadataPrivateIpAddressSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PrivateIpAddressSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PrivateIpAddressSpecification) GoString() string {
- return s.String()
-}
-
-// Describes a product code.
-type ProductCode struct {
- // The product code.
- ProductCodeId *string `locationName:"productCode" type:"string"`
-
- // The type of product code.
- ProductCodeType *string `locationName:"type" type:"string" enum:"ProductCodeValues"`
-
- metadataProductCode `json:"-" xml:"-"`
-}
-
-type metadataProductCode struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ProductCode) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ProductCode) GoString() string {
- return s.String()
-}
-
-// Describes a virtual private gateway propagating route.
-type PropagatingVgw struct {
- // The ID of the virtual private gateway (VGW).
- GatewayId *string `locationName:"gatewayId" type:"string"`
-
- metadataPropagatingVgw `json:"-" xml:"-"`
-}
-
-type metadataPropagatingVgw struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PropagatingVgw) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PropagatingVgw) GoString() string {
- return s.String()
-}
-
-type PurchaseReservedInstancesOfferingInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The number of Reserved Instances to purchase.
- InstanceCount *int64 `type:"integer" required:"true"`
-
- // Specified for Reserved Instance Marketplace offerings to limit the total
- // order and ensure that the Reserved Instances are not purchased at unexpected
- // prices.
- LimitPrice *ReservedInstanceLimitPrice `locationName:"limitPrice" type:"structure"`
-
- // The ID of the Reserved Instance offering to purchase.
- ReservedInstancesOfferingId *string `type:"string" required:"true"`
-
- metadataPurchaseReservedInstancesOfferingInput `json:"-" xml:"-"`
-}
-
-type metadataPurchaseReservedInstancesOfferingInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PurchaseReservedInstancesOfferingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PurchaseReservedInstancesOfferingInput) GoString() string {
- return s.String()
-}
-
-type PurchaseReservedInstancesOfferingOutput struct {
- // The IDs of the purchased Reserved Instances.
- ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"`
-
- metadataPurchaseReservedInstancesOfferingOutput `json:"-" xml:"-"`
-}
-
-type metadataPurchaseReservedInstancesOfferingOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s PurchaseReservedInstancesOfferingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PurchaseReservedInstancesOfferingOutput) GoString() string {
- return s.String()
-}
-
-type RebootInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more instance IDs.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
-
- metadataRebootInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataRebootInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RebootInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RebootInstancesInput) GoString() string {
- return s.String()
-}
-
-type RebootInstancesOutput struct {
- metadataRebootInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataRebootInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RebootInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RebootInstancesOutput) GoString() string {
- return s.String()
-}
-
-// Describes a recurring charge.
-type RecurringCharge struct {
- // The amount of the recurring charge.
- Amount *float64 `locationName:"amount" type:"double"`
-
- // The frequency of the recurring charge.
- Frequency *string `locationName:"frequency" type:"string" enum:"RecurringChargeFrequency"`
-
- metadataRecurringCharge `json:"-" xml:"-"`
-}
-
-type metadataRecurringCharge struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RecurringCharge) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RecurringCharge) GoString() string {
- return s.String()
-}
-
-// Describes a region.
-type Region struct {
- // The region service endpoint.
- Endpoint *string `locationName:"regionEndpoint" type:"string"`
-
- // The name of the region.
- RegionName *string `locationName:"regionName" type:"string"`
-
- metadataRegion `json:"-" xml:"-"`
-}
-
-type metadataRegion struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Region) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Region) GoString() string {
- return s.String()
-}
-
-type RegisterImageInput struct {
- // The architecture of the AMI.
- //
- // Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs,
- // the architecture specified in the manifest file.
- Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
-
- // One or more block device mapping entries.
- BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"`
-
- // A description for your AMI.
- Description *string `locationName:"description" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The full path to your AMI manifest in Amazon S3 storage.
- ImageLocation *string `type:"string"`
-
- // The ID of the kernel.
- KernelId *string `locationName:"kernelId" type:"string"`
-
- // A name for your AMI.
- //
- // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets
- // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('),
- // at-signs (@), or underscores(_)
- Name *string `locationName:"name" type:"string" required:"true"`
-
- // The ID of the RAM disk.
- RamdiskId *string `locationName:"ramdiskId" type:"string"`
-
- // The name of the root device (for example, /dev/sda1, or /dev/xvda).
- RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
-
- // Set to simple to enable enhanced networking for the AMI and any instances
- // that you launch from the AMI.
- //
- // There is no way to disable enhanced networking at this time.
- //
- // This option is supported only for HVM AMIs. Specifying this option with
- // a PV AMI can make instances launched from the AMI unreachable.
- SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"`
-
- // The type of virtualization.
- //
- // Default: paravirtual
- VirtualizationType *string `locationName:"virtualizationType" type:"string"`
-
- metadataRegisterImageInput `json:"-" xml:"-"`
-}
-
-type metadataRegisterImageInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RegisterImageInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RegisterImageInput) GoString() string {
- return s.String()
-}
-
-type RegisterImageOutput struct {
- // The ID of the newly registered AMI.
- ImageId *string `locationName:"imageId" type:"string"`
-
- metadataRegisterImageOutput `json:"-" xml:"-"`
-}
-
-type metadataRegisterImageOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RegisterImageOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RegisterImageOutput) GoString() string {
- return s.String()
-}
-
-type RejectVpcPeeringConnectionInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the VPC peering connection.
- VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"`
-
- metadataRejectVpcPeeringConnectionInput `json:"-" xml:"-"`
-}
-
-type metadataRejectVpcPeeringConnectionInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RejectVpcPeeringConnectionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RejectVpcPeeringConnectionInput) GoString() string {
- return s.String()
-}
-
-type RejectVpcPeeringConnectionOutput struct {
- // Returns true if the request succeeds; otherwise, it returns an error.
- Return *bool `locationName:"return" type:"boolean"`
-
- metadataRejectVpcPeeringConnectionOutput `json:"-" xml:"-"`
-}
-
-type metadataRejectVpcPeeringConnectionOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RejectVpcPeeringConnectionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RejectVpcPeeringConnectionOutput) GoString() string {
- return s.String()
-}
-
-type ReleaseAddressInput struct {
- // [EC2-VPC] The allocation ID. Required for EC2-VPC.
- AllocationId *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
- PublicIp *string `type:"string"`
-
- metadataReleaseAddressInput `json:"-" xml:"-"`
-}
-
-type metadataReleaseAddressInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReleaseAddressInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReleaseAddressInput) GoString() string {
- return s.String()
-}
-
-type ReleaseAddressOutput struct {
- metadataReleaseAddressOutput `json:"-" xml:"-"`
-}
-
-type metadataReleaseAddressOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReleaseAddressOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReleaseAddressOutput) GoString() string {
- return s.String()
-}
-
-type ReplaceNetworkAclAssociationInput struct {
- // The ID of the current association between the original network ACL and the
- // subnet.
- AssociationId *string `locationName:"associationId" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the new network ACL to associate with the subnet.
- NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"`
-
- metadataReplaceNetworkAclAssociationInput `json:"-" xml:"-"`
-}
-
-type metadataReplaceNetworkAclAssociationInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplaceNetworkAclAssociationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplaceNetworkAclAssociationInput) GoString() string {
- return s.String()
-}
-
-type ReplaceNetworkAclAssociationOutput struct {
- // The ID of the new association.
- NewAssociationId *string `locationName:"newAssociationId" type:"string"`
-
- metadataReplaceNetworkAclAssociationOutput `json:"-" xml:"-"`
-}
-
-type metadataReplaceNetworkAclAssociationOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplaceNetworkAclAssociationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplaceNetworkAclAssociationOutput) GoString() string {
- return s.String()
-}
-
-type ReplaceNetworkAclEntryInput struct {
- // The network range to allow or deny, in CIDR notation.
- CidrBlock *string `locationName:"cidrBlock" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Indicates whether to replace the egress rule.
- //
- // Default: If no value is specified, we replace the ingress rule.
- Egress *bool `locationName:"egress" type:"boolean" required:"true"`
-
- // ICMP protocol: The ICMP type and code. Required if specifying 1 (ICMP) for
- // the protocol.
- IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"`
-
- // The ID of the ACL.
- NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"`
-
- // TCP or UDP protocols: The range of ports the rule applies to. Required if
- // specifying 6 (TCP) or 17 (UDP) for the protocol.
- PortRange *PortRange `locationName:"portRange" type:"structure"`
-
- // The IP protocol. You can specify all or -1 to mean all protocols.
- Protocol *string `locationName:"protocol" type:"string" required:"true"`
-
- // Indicates whether to allow or deny the traffic that matches the rule.
- RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"`
-
- // The rule number of the entry to replace.
- RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"`
-
- metadataReplaceNetworkAclEntryInput `json:"-" xml:"-"`
-}
-
-type metadataReplaceNetworkAclEntryInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplaceNetworkAclEntryInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplaceNetworkAclEntryInput) GoString() string {
- return s.String()
-}
-
-type ReplaceNetworkAclEntryOutput struct {
- metadataReplaceNetworkAclEntryOutput `json:"-" xml:"-"`
-}
-
-type metadataReplaceNetworkAclEntryOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplaceNetworkAclEntryOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplaceNetworkAclEntryOutput) GoString() string {
- return s.String()
-}
-
-type ReplaceRouteInput struct {
- // The CIDR address block used for the destination match. The value you provide
- // must match the CIDR of an existing route in the table.
- DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of an Internet gateway or virtual private gateway.
- GatewayId *string `locationName:"gatewayId" type:"string"`
-
- // The ID of a NAT instance in your VPC.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The ID of a network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // The ID of the route table.
- RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"`
-
- // The ID of a VPC peering connection.
- VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"`
-
- metadataReplaceRouteInput `json:"-" xml:"-"`
-}
-
-type metadataReplaceRouteInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplaceRouteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplaceRouteInput) GoString() string {
- return s.String()
-}
-
-type ReplaceRouteOutput struct {
- metadataReplaceRouteOutput `json:"-" xml:"-"`
-}
-
-type metadataReplaceRouteOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplaceRouteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplaceRouteOutput) GoString() string {
- return s.String()
-}
-
-type ReplaceRouteTableAssociationInput struct {
- // The association ID.
- AssociationId *string `locationName:"associationId" type:"string" required:"true"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the new route table to associate with the subnet.
- RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"`
-
- metadataReplaceRouteTableAssociationInput `json:"-" xml:"-"`
-}
-
-type metadataReplaceRouteTableAssociationInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplaceRouteTableAssociationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplaceRouteTableAssociationInput) GoString() string {
- return s.String()
-}
-
-type ReplaceRouteTableAssociationOutput struct {
- // The ID of the new association.
- NewAssociationId *string `locationName:"newAssociationId" type:"string"`
-
- metadataReplaceRouteTableAssociationOutput `json:"-" xml:"-"`
-}
-
-type metadataReplaceRouteTableAssociationOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplaceRouteTableAssociationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplaceRouteTableAssociationOutput) GoString() string {
- return s.String()
-}
-
-type ReportInstanceStatusInput struct {
- // Descriptive text about the health state of your instance.
- Description *string `locationName:"description" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The time at which the reported instance health state ended.
- EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // One or more instances.
- Instances []*string `locationName:"instanceId" locationNameList:"InstanceId" type:"list" required:"true"`
-
- // One or more reason codes that describes the health state of your instance.
- //
- // instance-stuck-in-state: My instance is stuck in a state.
- //
- // unresponsive: My instance is unresponsive.
- //
- // not-accepting-credentials: My instance is not accepting my credentials.
- //
- // password-not-available: A password is not available for my instance.
- //
- // performance-network: My instance is experiencing performance problems which
- // I believe are network related.
- //
- // performance-instance-store: My instance is experiencing performance problems
- // which I believe are related to the instance stores.
- //
- // performance-ebs-volume: My instance is experiencing performance problems
- // which I believe are related to an EBS volume.
- //
- // performance-other: My instance is experiencing performance problems.
- //
- // other: [explain using the description parameter]
- ReasonCodes []*string `locationName:"reasonCode" locationNameList:"item" type:"list" required:"true"`
-
- // The time at which the reported instance health state began.
- StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // The status of all instances listed.
- Status *string `locationName:"status" type:"string" required:"true" enum:"ReportStatusType"`
-
- metadataReportInstanceStatusInput `json:"-" xml:"-"`
-}
-
-type metadataReportInstanceStatusInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReportInstanceStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReportInstanceStatusInput) GoString() string {
- return s.String()
-}
-
-type ReportInstanceStatusOutput struct {
- metadataReportInstanceStatusOutput `json:"-" xml:"-"`
-}
-
-type metadataReportInstanceStatusOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReportInstanceStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReportInstanceStatusOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for RequestSpotFleet.
-type RequestSpotFleetInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The configuration for the Spot fleet request.
- SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"`
-
- metadataRequestSpotFleetInput `json:"-" xml:"-"`
-}
-
-type metadataRequestSpotFleetInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RequestSpotFleetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RequestSpotFleetInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of RequestSpotFleet.
-type RequestSpotFleetOutput struct {
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- metadataRequestSpotFleetOutput `json:"-" xml:"-"`
-}
-
-type metadataRequestSpotFleetOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RequestSpotFleetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RequestSpotFleetOutput) GoString() string {
- return s.String()
-}
-
-// Contains the parameters for RequestSpotInstances.
-type RequestSpotInstancesInput struct {
- // The user-specified name for a logical grouping of bids.
- //
- // When you specify an Availability Zone group in a Spot Instance request,
- // all Spot instances in the request are launched in the same Availability Zone.
- // Instance proximity is maintained with this parameter, but the choice of Availability
- // Zone is not. The group applies only to bids for Spot Instances of the same
- // instance type. Any additional Spot instance requests that are specified with
- // the same Availability Zone group name are launched in that same Availability
- // Zone, as long as at least one instance from the group is still active.
- //
- // If there is no active instance running in the Availability Zone group that
- // you specify for a new Spot instance request (all instances are terminated,
- // the bid is expired, or the bid falls below current market), then Amazon EC2
- // launches the instance in any Availability Zone where the constraint can be
- // met. Consequently, the subsequent set of Spot instances could be placed in
- // a different zone from the original request, even if you specified the same
- // Availability Zone group.
- //
- // Default: Instances are launched in any available Availability Zone.
- AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"`
-
- // The required duration for the Spot instances, in minutes. This value must
- // be a multiple of 60 (60, 120, 180, 240, 300, or 360).
- //
- // The duration period starts as soon as your Spot instance receives its instance
- // ID. At the end of the duration period, Amazon EC2 marks the Spot instance
- // for termination and provides a Spot instance termination notice, which gives
- // the instance a two-minute warning before it terminates.
- //
- // Note that you can't specify an Availability Zone group or a launch group
- // if you specify a duration.
- BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"`
-
- // Unique, case-sensitive identifier that you provide to ensure the idempotency
- // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The maximum number of Spot instances to launch.
- //
- // Default: 1
- InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
-
- // The instance launch group. Launch groups are Spot instances that launch together
- // and terminate together.
- //
- // Default: Instances are launched and terminated individually
- LaunchGroup *string `locationName:"launchGroup" type:"string"`
-
- // Describes the launch specification for an instance.
- LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"`
-
- // The maximum hourly price (bid) for any Spot instance launched to fulfill
- // the request.
- SpotPrice *string `locationName:"spotPrice" type:"string" required:"true"`
-
- // The Spot instance request type.
- //
- // Default: one-time
- Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"`
-
- // The start date of the request. If this is a one-time request, the request
- // becomes active at this date and time and remains active until all instances
- // launch, the request expires, or the request is canceled. If the request is
- // persistent, the request becomes active at this date and time and remains
- // active until it expires or is canceled.
- //
- // Default: The request is effective indefinitely.
- ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"`
-
- // The end date of the request. If this is a one-time request, the request remains
- // active until all instances launch, the request is canceled, or this date
- // is reached. If the request is persistent, it remains active until it is canceled
- // or this date and time is reached.
- //
- // Default: The request is effective indefinitely.
- ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataRequestSpotInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataRequestSpotInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RequestSpotInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RequestSpotInstancesInput) GoString() string {
- return s.String()
-}
-
-// Contains the output of RequestSpotInstances.
-type RequestSpotInstancesOutput struct {
- // One or more Spot instance requests.
- SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
-
- metadataRequestSpotInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataRequestSpotInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RequestSpotInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RequestSpotInstancesOutput) GoString() string {
- return s.String()
-}
-
-// Describes the launch specification for an instance.
-type RequestSpotLaunchSpecification struct {
- // Deprecated.
- AddressingType *string `locationName:"addressingType" type:"string"`
-
- // One or more block device mapping entries.
- BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
-
- // Indicates whether the instance is optimized for EBS I/O. This optimization
- // provides dedicated throughput to Amazon EBS and an optimized configuration
- // stack to provide optimal EBS I/O performance. This optimization isn't available
- // with all instance types. Additional usage charges apply when using an EBS
- // Optimized instance.
- //
- // Default: false
- EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
-
- // The IAM instance profile.
- IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
-
- // The ID of the AMI.
- ImageId *string `locationName:"imageId" type:"string"`
-
- // The instance type.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // The ID of the kernel.
- KernelId *string `locationName:"kernelId" type:"string"`
-
- // The name of the key pair.
- KeyName *string `locationName:"keyName" type:"string"`
-
- // Describes the monitoring for the instance.
- Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"`
-
- // One or more network interfaces.
- NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"NetworkInterface" locationNameList:"item" type:"list"`
-
- // The placement information for the instance.
- Placement *SpotPlacement `locationName:"placement" type:"structure"`
-
- // The ID of the RAM disk.
- RamdiskId *string `locationName:"ramdiskId" type:"string"`
-
- SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"`
-
- SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"`
-
- // The ID of the subnet in which to launch the instance.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- // The Base64-encoded MIME user data to make available to the instances.
- UserData *string `locationName:"userData" type:"string"`
-
- metadataRequestSpotLaunchSpecification `json:"-" xml:"-"`
-}
-
-type metadataRequestSpotLaunchSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RequestSpotLaunchSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RequestSpotLaunchSpecification) GoString() string {
- return s.String()
-}
-
-// Describes a reservation.
-type Reservation struct {
- // One or more security groups.
- Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // One or more instances.
- Instances []*Instance `locationName:"instancesSet" locationNameList:"item" type:"list"`
-
- // The ID of the AWS account that owns the reservation.
- OwnerId *string `locationName:"ownerId" type:"string"`
-
- // The ID of the requester that launched the instances on your behalf (for example,
- // AWS Management Console or Auto Scaling).
- RequesterId *string `locationName:"requesterId" type:"string"`
-
- // The ID of the reservation.
- ReservationId *string `locationName:"reservationId" type:"string"`
-
- metadataReservation `json:"-" xml:"-"`
-}
-
-type metadataReservation struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Reservation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Reservation) GoString() string {
- return s.String()
-}
-
-// Describes the limit price of a Reserved Instance offering.
-type ReservedInstanceLimitPrice struct {
- // Used for Reserved Instance Marketplace offerings. Specifies the limit price
- // on the total order (instanceCount * price).
- Amount *float64 `locationName:"amount" type:"double"`
-
- // The currency in which the limitPrice amount is specified. At this time, the
- // only supported currency is USD.
- CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
-
- metadataReservedInstanceLimitPrice `json:"-" xml:"-"`
-}
-
-type metadataReservedInstanceLimitPrice struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReservedInstanceLimitPrice) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReservedInstanceLimitPrice) GoString() string {
- return s.String()
-}
-
-// Describes a Reserved Instance.
-type ReservedInstances struct {
- // The Availability Zone in which the Reserved Instance can be used.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The currency of the Reserved Instance. It's specified using ISO 4217 standard
- // currency codes. At this time, the only supported currency is USD.
- CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
-
- // The duration of the Reserved Instance, in seconds.
- Duration *int64 `locationName:"duration" type:"long"`
-
- // The time when the Reserved Instance expires.
- End *time.Time `locationName:"end" type:"timestamp" timestampFormat:"iso8601"`
-
- // The purchase price of the Reserved Instance.
- FixedPrice *float64 `locationName:"fixedPrice" type:"float"`
-
- // The number of Reserved Instances purchased.
- InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
-
- // The tenancy of the reserved instance.
- InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
-
- // The instance type on which the Reserved Instance can be used.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // The Reserved Instance offering type.
- OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"`
-
- // The Reserved Instance product platform description.
- ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
-
- // The recurring charge tag assigned to the resource.
- RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"`
-
- // The ID of the Reserved Instance.
- ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"`
-
- // The date and time the Reserved Instance started.
- Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"`
-
- // The state of the Reserved Instance purchase.
- State *string `locationName:"state" type:"string" enum:"ReservedInstanceState"`
-
- // Any tags assigned to the resource.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The usage price of the Reserved Instance, per hour.
- UsagePrice *float64 `locationName:"usagePrice" type:"float"`
-
- metadataReservedInstances `json:"-" xml:"-"`
-}
-
-type metadataReservedInstances struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReservedInstances) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReservedInstances) GoString() string {
- return s.String()
-}
-
-// Describes the configuration settings for the modified Reserved Instances.
-type ReservedInstancesConfiguration struct {
- // The Availability Zone for the modified Reserved Instances.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The number of modified Reserved Instances.
- InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
-
- // The instance type for the modified Reserved Instances.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // The network platform of the modified Reserved Instances, which is either
- // EC2-Classic or EC2-VPC.
- Platform *string `locationName:"platform" type:"string"`
-
- metadataReservedInstancesConfiguration `json:"-" xml:"-"`
-}
-
-type metadataReservedInstancesConfiguration struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReservedInstancesConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReservedInstancesConfiguration) GoString() string {
- return s.String()
-}
-
-// Describes the ID of a Reserved Instance.
-type ReservedInstancesId struct {
- // The ID of the Reserved Instance.
- ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"`
-
- metadataReservedInstancesId `json:"-" xml:"-"`
-}
-
-type metadataReservedInstancesId struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReservedInstancesId) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReservedInstancesId) GoString() string {
- return s.String()
-}
-
-// Describes a Reserved Instance listing.
-type ReservedInstancesListing struct {
- // A unique, case-sensitive key supplied by the client to ensure that the request
- // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // The time the listing was created.
- CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"`
-
- // The number of instances in this state.
- InstanceCounts []*InstanceCount `locationName:"instanceCounts" locationNameList:"item" type:"list"`
-
- // The price of the Reserved Instance listing.
- PriceSchedules []*PriceSchedule `locationName:"priceSchedules" locationNameList:"item" type:"list"`
-
- // The ID of the Reserved Instance.
- ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"`
-
- // The ID of the Reserved Instance listing.
- ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"`
-
- // The status of the Reserved Instance listing.
- Status *string `locationName:"status" type:"string" enum:"ListingStatus"`
-
- // The reason for the current status of the Reserved Instance listing. The response
- // can be blank.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- // Any tags assigned to the resource.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The last modified timestamp of the listing.
- UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataReservedInstancesListing `json:"-" xml:"-"`
-}
-
-type metadataReservedInstancesListing struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReservedInstancesListing) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReservedInstancesListing) GoString() string {
- return s.String()
-}
-
-// Describes a Reserved Instance modification.
-type ReservedInstancesModification struct {
- // A unique, case-sensitive key supplied by the client to ensure that the request
- // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // The time when the modification request was created.
- CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"`
-
- // The time for the modification to become effective.
- EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp" timestampFormat:"iso8601"`
-
- // Contains target configurations along with their corresponding new Reserved
- // Instance IDs.
- ModificationResults []*ReservedInstancesModificationResult `locationName:"modificationResultSet" locationNameList:"item" type:"list"`
-
- // The IDs of one or more Reserved Instances.
- ReservedInstancesIds []*ReservedInstancesId `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"`
-
- // A unique ID for the Reserved Instance modification.
- ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"`
-
- // The status of the Reserved Instances modification request.
- Status *string `locationName:"status" type:"string"`
-
- // The reason for the status.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- // The time when the modification request was last updated.
- UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataReservedInstancesModification `json:"-" xml:"-"`
-}
-
-type metadataReservedInstancesModification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReservedInstancesModification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReservedInstancesModification) GoString() string {
- return s.String()
-}
-
-type ReservedInstancesModificationResult struct {
- // The ID for the Reserved Instances that were created as part of the modification
- // request. This field is only available when the modification is fulfilled.
- ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"`
-
- // The target Reserved Instances configurations supplied as part of the modification
- // request.
- TargetConfiguration *ReservedInstancesConfiguration `locationName:"targetConfiguration" type:"structure"`
-
- metadataReservedInstancesModificationResult `json:"-" xml:"-"`
-}
-
-type metadataReservedInstancesModificationResult struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReservedInstancesModificationResult) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReservedInstancesModificationResult) GoString() string {
- return s.String()
-}
-
-// Describes a Reserved Instance offering.
-type ReservedInstancesOffering struct {
- // The Availability Zone in which the Reserved Instance can be used.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The currency of the Reserved Instance offering you are purchasing. It's specified
- // using ISO 4217 standard currency codes. At this time, the only supported
- // currency is USD.
- CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
-
- // The duration of the Reserved Instance, in seconds.
- Duration *int64 `locationName:"duration" type:"long"`
-
- // The purchase price of the Reserved Instance.
- FixedPrice *float64 `locationName:"fixedPrice" type:"float"`
-
- // The tenancy of the reserved instance.
- InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
-
- // The instance type on which the Reserved Instance can be used.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // Indicates whether the offering is available through the Reserved Instance
- // Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering,
- // this is true.
- Marketplace *bool `locationName:"marketplace" type:"boolean"`
-
- // The Reserved Instance offering type.
- OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"`
-
- // The pricing details of the Reserved Instance offering.
- PricingDetails []*PricingDetail `locationName:"pricingDetailsSet" locationNameList:"item" type:"list"`
-
- // The Reserved Instance product platform description.
- ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
-
- // The recurring charge tag assigned to the resource.
- RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"`
-
- // The ID of the Reserved Instance offering.
- ReservedInstancesOfferingId *string `locationName:"reservedInstancesOfferingId" type:"string"`
-
- // The usage price of the Reserved Instance, per hour.
- UsagePrice *float64 `locationName:"usagePrice" type:"float"`
-
- metadataReservedInstancesOffering `json:"-" xml:"-"`
-}
-
-type metadataReservedInstancesOffering struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReservedInstancesOffering) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReservedInstancesOffering) GoString() string {
- return s.String()
-}
-
-type ResetImageAttributeInput struct {
- // The attribute to reset (currently you can only reset the launch permission
- // attribute).
- Attribute *string `type:"string" required:"true" enum:"ResetImageAttributeName"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the AMI.
- ImageId *string `type:"string" required:"true"`
-
- metadataResetImageAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataResetImageAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ResetImageAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResetImageAttributeInput) GoString() string {
- return s.String()
-}
-
-type ResetImageAttributeOutput struct {
- metadataResetImageAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataResetImageAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ResetImageAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResetImageAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ResetInstanceAttributeInput struct {
- // The attribute to reset.
- Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string" required:"true"`
-
- metadataResetInstanceAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataResetInstanceAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ResetInstanceAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResetInstanceAttributeInput) GoString() string {
- return s.String()
-}
-
-type ResetInstanceAttributeOutput struct {
- metadataResetInstanceAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataResetInstanceAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ResetInstanceAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResetInstanceAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ResetNetworkInterfaceAttributeInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"`
-
- // The source/destination checking attribute. Resets the value to true.
- SourceDestCheck *string `locationName:"sourceDestCheck" type:"string"`
-
- metadataResetNetworkInterfaceAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataResetNetworkInterfaceAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ResetNetworkInterfaceAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResetNetworkInterfaceAttributeInput) GoString() string {
- return s.String()
-}
-
-type ResetNetworkInterfaceAttributeOutput struct {
- metadataResetNetworkInterfaceAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataResetNetworkInterfaceAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ResetNetworkInterfaceAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResetNetworkInterfaceAttributeOutput) GoString() string {
- return s.String()
-}
-
-type ResetSnapshotAttributeInput struct {
- // The attribute to reset. Currently, only the attribute for permission to create
- // volumes can be reset.
- Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The ID of the snapshot.
- SnapshotId *string `type:"string" required:"true"`
-
- metadataResetSnapshotAttributeInput `json:"-" xml:"-"`
-}
-
-type metadataResetSnapshotAttributeInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ResetSnapshotAttributeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResetSnapshotAttributeInput) GoString() string {
- return s.String()
-}
-
-type ResetSnapshotAttributeOutput struct {
- metadataResetSnapshotAttributeOutput `json:"-" xml:"-"`
-}
-
-type metadataResetSnapshotAttributeOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s ResetSnapshotAttributeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResetSnapshotAttributeOutput) GoString() string {
- return s.String()
-}
-
-type RestoreAddressToClassicInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The Elastic IP address.
- PublicIp *string `locationName:"publicIp" type:"string" required:"true"`
-
- metadataRestoreAddressToClassicInput `json:"-" xml:"-"`
-}
-
-type metadataRestoreAddressToClassicInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RestoreAddressToClassicInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RestoreAddressToClassicInput) GoString() string {
- return s.String()
-}
-
-type RestoreAddressToClassicOutput struct {
- // The Elastic IP address.
- PublicIp *string `locationName:"publicIp" type:"string"`
-
- // The move status for the IP address.
- Status *string `locationName:"status" type:"string" enum:"Status"`
-
- metadataRestoreAddressToClassicOutput `json:"-" xml:"-"`
-}
-
-type metadataRestoreAddressToClassicOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RestoreAddressToClassicOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RestoreAddressToClassicOutput) GoString() string {
- return s.String()
-}
-
-type RevokeSecurityGroupEgressInput struct {
- // The CIDR IP address range. You can't specify this parameter when specifying
- // a source security group.
- CidrIp *string `locationName:"cidrIp" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The start of port range for the TCP and UDP protocols, or an ICMP type number.
- // For the ICMP type number, use -1 to specify all ICMP types.
- FromPort *int64 `locationName:"fromPort" type:"integer"`
-
- // The ID of the security group.
- GroupId *string `locationName:"groupId" type:"string" required:"true"`
-
- // A set of IP permissions. You can't specify a destination security group and
- // a CIDR IP address range.
- IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"`
-
- // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
- // Use -1 to specify all.
- IpProtocol *string `locationName:"ipProtocol" type:"string"`
-
- // The name of a destination security group. To revoke outbound access to a
- // destination security group, we recommend that you use a set of IP permissions
- // instead.
- SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"`
-
- // The AWS account number for a destination security group. To revoke outbound
- // access to a destination security group, we recommend that you use a set of
- // IP permissions instead.
- SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"`
-
- // The end of port range for the TCP and UDP protocols, or an ICMP code number.
- // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
- ToPort *int64 `locationName:"toPort" type:"integer"`
-
- metadataRevokeSecurityGroupEgressInput `json:"-" xml:"-"`
-}
-
-type metadataRevokeSecurityGroupEgressInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RevokeSecurityGroupEgressInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RevokeSecurityGroupEgressInput) GoString() string {
- return s.String()
-}
-
-type RevokeSecurityGroupEgressOutput struct {
- metadataRevokeSecurityGroupEgressOutput `json:"-" xml:"-"`
-}
-
-type metadataRevokeSecurityGroupEgressOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RevokeSecurityGroupEgressOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RevokeSecurityGroupEgressOutput) GoString() string {
- return s.String()
-}
-
-type RevokeSecurityGroupIngressInput struct {
- // The CIDR IP address range. You can't specify this parameter when specifying
- // a source security group.
- CidrIp *string `type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // The start of port range for the TCP and UDP protocols, or an ICMP type number.
- // For the ICMP type number, use -1 to specify all ICMP types.
- FromPort *int64 `type:"integer"`
-
- // The ID of the security group. Required for a security group in a nondefault
- // VPC.
- GroupId *string `type:"string"`
-
- // [EC2-Classic, default VPC] The name of the security group.
- GroupName *string `type:"string"`
-
- // A set of IP permissions. You can't specify a source security group and a
- // CIDR IP address range.
- IpPermissions []*IpPermission `locationNameList:"item" type:"list"`
-
- // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
- // Use -1 to specify all.
- IpProtocol *string `type:"string"`
-
- // [EC2-Classic, default VPC] The name of the source security group. You can't
- // specify this parameter in combination with the following parameters: the
- // CIDR IP address range, the start of the port range, the IP protocol, and
- // the end of the port range. For EC2-VPC, the source security group must be
- // in the same VPC.
- SourceSecurityGroupName *string `type:"string"`
-
- // [EC2-Classic, default VPC] The AWS account ID of the source security group.
- // For EC2-VPC, the source security group must be in the same VPC. You can't
- // specify this parameter in combination with the following parameters: the
- // CIDR IP address range, the IP protocol, the start of the port range, and
- // the end of the port range. To revoke a specific rule for an IP protocol and
- // port range, use a set of IP permissions instead.
- SourceSecurityGroupOwnerId *string `type:"string"`
-
- // The end of port range for the TCP and UDP protocols, or an ICMP code number.
- // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
- ToPort *int64 `type:"integer"`
-
- metadataRevokeSecurityGroupIngressInput `json:"-" xml:"-"`
-}
-
-type metadataRevokeSecurityGroupIngressInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RevokeSecurityGroupIngressInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RevokeSecurityGroupIngressInput) GoString() string {
- return s.String()
-}
-
-type RevokeSecurityGroupIngressOutput struct {
- metadataRevokeSecurityGroupIngressOutput `json:"-" xml:"-"`
-}
-
-type metadataRevokeSecurityGroupIngressOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RevokeSecurityGroupIngressOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RevokeSecurityGroupIngressOutput) GoString() string {
- return s.String()
-}
-
-// Describes a route in a route table.
-type Route struct {
- // The CIDR block used for the destination match.
- DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"`
-
- // The prefix of the AWS service.
- DestinationPrefixListId *string `locationName:"destinationPrefixListId" type:"string"`
-
- // The ID of a gateway attached to your VPC.
- GatewayId *string `locationName:"gatewayId" type:"string"`
-
- // The ID of a NAT instance in your VPC.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The AWS account ID of the owner of the instance.
- InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"`
-
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
-
- // Describes how the route was created.
- //
- // CreateRouteTable indicates that route was automatically created when the
- // route table was created. CreateRoute indicates that the route was manually
- // added to the route table. EnableVgwRoutePropagation indicates that the route
- // was propagated by route propagation.
- Origin *string `locationName:"origin" type:"string" enum:"RouteOrigin"`
-
- // The state of the route. The blackhole state indicates that the route's target
- // isn't available (for example, the specified gateway isn't attached to the
- // VPC, or the specified NAT instance has been terminated).
- State *string `locationName:"state" type:"string" enum:"RouteState"`
-
- // The ID of the VPC peering connection.
- VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"`
-
- metadataRoute `json:"-" xml:"-"`
-}
-
-type metadataRoute struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Route) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Route) GoString() string {
- return s.String()
-}
-
-// Describes a route table.
-type RouteTable struct {
- // The associations between the route table and one or more subnets.
- Associations []*RouteTableAssociation `locationName:"associationSet" locationNameList:"item" type:"list"`
-
- // Any virtual private gateway (VGW) propagating routes.
- PropagatingVgws []*PropagatingVgw `locationName:"propagatingVgwSet" locationNameList:"item" type:"list"`
-
- // The ID of the route table.
- RouteTableId *string `locationName:"routeTableId" type:"string"`
-
- // The routes in the route table.
- Routes []*Route `locationName:"routeSet" locationNameList:"item" type:"list"`
-
- // Any tags assigned to the route table.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataRouteTable `json:"-" xml:"-"`
-}
-
-type metadataRouteTable struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RouteTable) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RouteTable) GoString() string {
- return s.String()
-}
-
-// Describes an association between a route table and a subnet.
-type RouteTableAssociation struct {
- // Indicates whether this is the main route table.
- Main *bool `locationName:"main" type:"boolean"`
-
- // The ID of the association between a route table and a subnet.
- RouteTableAssociationId *string `locationName:"routeTableAssociationId" type:"string"`
-
- // The ID of the route table.
- RouteTableId *string `locationName:"routeTableId" type:"string"`
-
- // The ID of the subnet. A subnet ID is not returned for an implicit association.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- metadataRouteTableAssociation `json:"-" xml:"-"`
-}
-
-type metadataRouteTableAssociation struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RouteTableAssociation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RouteTableAssociation) GoString() string {
- return s.String()
-}
-
-type RunInstancesInput struct {
- // Reserved.
- AdditionalInfo *string `locationName:"additionalInfo" type:"string"`
-
- // The block device mapping.
- BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"`
-
- // Unique, case-sensitive identifier you provide to ensure the idempotency of
- // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
- //
- // Constraints: Maximum 64 ASCII characters
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // If you set this parameter to true, you can't terminate the instance using
- // the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this
- // parameter to true and then later want to be able to terminate the instance,
- // you must first change the value of the disableApiTermination attribute to
- // false using ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
- // to terminate, you can terminate the instance by running the shutdown command
- // from the instance.
- //
- // Default: false
- DisableApiTermination *bool `locationName:"disableApiTermination" type:"boolean"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Indicates whether the instance is optimized for EBS I/O. This optimization
- // provides dedicated throughput to Amazon EBS and an optimized configuration
- // stack to provide optimal EBS I/O performance. This optimization isn't available
- // with all instance types. Additional usage charges apply when using an EBS-optimized
- // instance.
- //
- // Default: false
- EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
-
- // The IAM instance profile.
- IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
-
- // The ID of the AMI, which you can get by calling DescribeImages.
- ImageId *string `type:"string" required:"true"`
-
- // Indicates whether an instance stops or terminates when you initiate shutdown
- // from the instance (using the operating system command for system shutdown).
- //
- // Default: stop
- InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"`
-
- // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- //
- // Default: m1.small
- InstanceType *string `type:"string" enum:"InstanceType"`
-
- // The ID of the kernel.
- //
- // We recommend that you use PV-GRUB instead of kernels and RAM disks. For
- // more information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- KernelId *string `type:"string"`
-
- // The name of the key pair. You can create a key pair using CreateKeyPair or
- // ImportKeyPair.
- //
- // If you do not specify a key pair, you can't connect to the instance unless
- // you choose an AMI that is configured to allow users another way to log in.
- KeyName *string `type:"string"`
-
- // The maximum number of instances to launch. If you specify more instances
- // than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches
- // the largest possible number of instances above MinCount.
- //
- // Constraints: Between 1 and the maximum number you're allowed for the specified
- // instance type. For more information about the default limits, and how to
- // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2)
- // in the Amazon EC2 General FAQ.
- MaxCount *int64 `type:"integer" required:"true"`
-
- // The minimum number of instances to launch. If you specify a minimum that
- // is more instances than Amazon EC2 can launch in the target Availability Zone,
- // Amazon EC2 launches no instances.
- //
- // Constraints: Between 1 and the maximum number you're allowed for the specified
- // instance type. For more information about the default limits, and how to
- // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2)
- // in the Amazon EC2 General FAQ.
- MinCount *int64 `type:"integer" required:"true"`
-
- // The monitoring for the instance.
- Monitoring *RunInstancesMonitoringEnabled `type:"structure"`
-
- // One or more network interfaces.
- NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterface" locationNameList:"item" type:"list"`
-
- // The placement for the instance.
- Placement *Placement `type:"structure"`
-
- // [EC2-VPC] The primary IP address. You must specify a value from the IP address
- // range of the subnet.
- //
- // Only one private IP address can be designated as primary. Therefore, you
- // can't specify this parameter if PrivateIpAddresses.n.Primary is set to true
- // and PrivateIpAddresses.n.PrivateIpAddress is set to an IP address.
- //
- // Default: We select an IP address from the IP address range of the subnet.
- PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
-
- // The ID of the RAM disk.
- //
- // We recommend that you use PV-GRUB instead of kernels and RAM disks. For
- // more information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- RamdiskId *string `type:"string"`
-
- // One or more security group IDs. You can create a security group using CreateSecurityGroup.
- //
- // Default: Amazon EC2 uses the default security group.
- SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
-
- // [EC2-Classic, default VPC] One or more security group names. For a nondefault
- // VPC, you must use security group IDs instead.
- //
- // Default: Amazon EC2 uses the default security group.
- SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"`
-
- // [EC2-VPC] The ID of the subnet to launch the instance into.
- SubnetId *string `type:"string"`
-
- // The Base64-encoded MIME user data for the instances.
- UserData *string `type:"string"`
-
- metadataRunInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataRunInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RunInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RunInstancesInput) GoString() string {
- return s.String()
-}
-
-// Describes the monitoring for the instance.
-type RunInstancesMonitoringEnabled struct {
- // Indicates whether monitoring is enabled for the instance.
- Enabled *bool `locationName:"enabled" type:"boolean" required:"true"`
-
- metadataRunInstancesMonitoringEnabled `json:"-" xml:"-"`
-}
-
-type metadataRunInstancesMonitoringEnabled struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s RunInstancesMonitoringEnabled) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RunInstancesMonitoringEnabled) GoString() string {
- return s.String()
-}
-
-// Describes the storage parameters for S3 and S3 buckets for an instance store-backed
-// AMI.
-type S3Storage struct {
- // The access key ID of the owner of the bucket. Before you specify a value
- // for your access key ID, review and follow the guidance in Best Practices
- // for Managing AWS Access Keys (http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html).
- AWSAccessKeyId *string `type:"string"`
-
- // The bucket in which to store the AMI. You can specify a bucket that you already
- // own or a new bucket that Amazon EC2 creates on your behalf. If you specify
- // a bucket that belongs to someone else, Amazon EC2 returns an error.
- Bucket *string `locationName:"bucket" type:"string"`
-
- // The beginning of the file name of the AMI.
- Prefix *string `locationName:"prefix" type:"string"`
-
- // A Base64-encoded Amazon S3 upload policy that gives Amazon EC2 permission
- // to upload items into Amazon S3 on your behalf.
- UploadPolicy []byte `locationName:"uploadPolicy" type:"blob"`
-
- // The signature of the Base64 encoded JSON document.
- UploadPolicySignature *string `locationName:"uploadPolicySignature" type:"string"`
-
- metadataS3Storage `json:"-" xml:"-"`
-}
-
-type metadataS3Storage struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s S3Storage) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s S3Storage) GoString() string {
- return s.String()
-}
-
-// Describes a security group
-type SecurityGroup struct {
- // A description of the security group.
- Description *string `locationName:"groupDescription" type:"string"`
-
- // The ID of the security group.
- GroupId *string `locationName:"groupId" type:"string"`
-
- // The name of the security group.
- GroupName *string `locationName:"groupName" type:"string"`
-
- // One or more inbound rules associated with the security group.
- IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"`
-
- // [EC2-VPC] One or more outbound rules associated with the security group.
- IpPermissionsEgress []*IpPermission `locationName:"ipPermissionsEgress" locationNameList:"item" type:"list"`
-
- // The AWS account ID of the owner of the security group.
- OwnerId *string `locationName:"ownerId" type:"string"`
-
- // Any tags assigned to the security group.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // [EC2-VPC] The ID of the VPC for the security group.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataSecurityGroup `json:"-" xml:"-"`
-}
-
-type metadataSecurityGroup struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SecurityGroup) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SecurityGroup) GoString() string {
- return s.String()
-}
-
-// Describes a snapshot.
-type Snapshot struct {
- // The data encryption key identifier for the snapshot. This value is a unique
- // identifier that corresponds to the data encryption key that was used to encrypt
- // the original volume or snapshot copy. Because data encryption keys are inherited
- // by volumes created from snapshots, and vice versa, if snapshots share the
- // same data encryption key identifier, then they belong to the same volume/snapshot
- // lineage. This parameter is only returned by the DescribeSnapshots API operation.
- DataEncryptionKeyId *string `locationName:"dataEncryptionKeyId" type:"string"`
-
- // The description for the snapshot.
- Description *string `locationName:"description" type:"string"`
-
- // Indicates whether the snapshot is encrypted.
- Encrypted *bool `locationName:"encrypted" type:"boolean"`
-
- // The full ARN of the AWS Key Management Service (AWS KMS) customer master
- // key (CMK) that was used to protect the volume encryption key for the parent
- // volume.
- KmsKeyId *string `locationName:"kmsKeyId" type:"string"`
-
- // The AWS account alias (for example, amazon, self) or AWS account ID that
- // owns the snapshot.
- OwnerAlias *string `locationName:"ownerAlias" type:"string"`
-
- // The AWS account ID of the EBS snapshot owner.
- OwnerId *string `locationName:"ownerId" type:"string"`
-
- // The progress of the snapshot, as a percentage.
- Progress *string `locationName:"progress" type:"string"`
-
- // The ID of the snapshot. Each snapshot receives a unique identifier when it
- // is created.
- SnapshotId *string `locationName:"snapshotId" type:"string"`
-
- // The time stamp when the snapshot was initiated.
- StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // The snapshot state.
- State *string `locationName:"status" type:"string" enum:"SnapshotState"`
-
- // Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy
- // operation fails (for example, if the proper AWS Key Management Service (AWS
- // KMS) permissions are not obtained) this field displays error state details
- // to help you diagnose why the error occurred. This parameter is only returned
- // by the DescribeSnapshots API operation.
- StateMessage *string `locationName:"statusMessage" type:"string"`
-
- // Any tags assigned to the snapshot.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the volume that was used to create the snapshot.
- VolumeId *string `locationName:"volumeId" type:"string"`
-
- // The size of the volume, in GiB.
- VolumeSize *int64 `locationName:"volumeSize" type:"integer"`
-
- metadataSnapshot `json:"-" xml:"-"`
-}
-
-type metadataSnapshot struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Snapshot) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Snapshot) GoString() string {
- return s.String()
-}
-
-// Describes the snapshot created from the imported disk.
-type SnapshotDetail struct {
- // A description for the snapshot.
- Description *string `locationName:"description" type:"string"`
-
- // The block device mapping for the snapshot.
- DeviceName *string `locationName:"deviceName" type:"string"`
-
- // The size of the disk in the snapshot, in GiB.
- DiskImageSize *float64 `locationName:"diskImageSize" type:"double"`
-
- // The format of the disk image from which the snapshot is created.
- Format *string `locationName:"format" type:"string"`
-
- // The percentage of progress for the task.
- Progress *string `locationName:"progress" type:"string"`
-
- // The snapshot ID of the disk being imported.
- SnapshotId *string `locationName:"snapshotId" type:"string"`
-
- // A brief status of the snapshot creation.
- Status *string `locationName:"status" type:"string"`
-
- // A detailed status message for the snapshot creation.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- // The URL used to access the disk image.
- Url *string `locationName:"url" type:"string"`
-
- // Describes the S3 bucket for the disk image.
- UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"`
-
- metadataSnapshotDetail `json:"-" xml:"-"`
-}
-
-type metadataSnapshotDetail struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SnapshotDetail) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SnapshotDetail) GoString() string {
- return s.String()
-}
-
-// The disk container object for the import snapshot request.
-type SnapshotDiskContainer struct {
- // The description of the disk image being imported.
- Description *string `type:"string"`
-
- // The format of the disk image being imported.
- //
- // Valid values: RAW | VHD | VMDK | OVA
- Format *string `type:"string"`
-
- // The URL to the Amazon S3-based disk image being imported. It can either be
- // a https URL (https://..) or an Amazon S3 URL (s3://..).
- Url *string `type:"string"`
-
- // Describes the S3 bucket for the disk image.
- UserBucket *UserBucket `type:"structure"`
-
- metadataSnapshotDiskContainer `json:"-" xml:"-"`
-}
-
-type metadataSnapshotDiskContainer struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SnapshotDiskContainer) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SnapshotDiskContainer) GoString() string {
- return s.String()
-}
-
-// Details about the import snapshot task.
-type SnapshotTaskDetail struct {
- // The description of the snapshot.
- Description *string `locationName:"description" type:"string"`
-
- // The size of the disk in the snapshot, in GiB.
- DiskImageSize *float64 `locationName:"diskImageSize" type:"double"`
-
- // The format of the disk image from which the snapshot is created.
- Format *string `locationName:"format" type:"string"`
-
- // The percentage of completion for the import snapshot task.
- Progress *string `locationName:"progress" type:"string"`
-
- // The snapshot ID of the disk being imported.
- SnapshotId *string `locationName:"snapshotId" type:"string"`
-
- // A brief status for the import snapshot task.
- Status *string `locationName:"status" type:"string"`
-
- // A detailed status message for the import snapshot task.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- // The URL of the disk image from which the snapshot is created.
- Url *string `locationName:"url" type:"string"`
-
- // The S3 bucket for the disk image.
- UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"`
-
- metadataSnapshotTaskDetail `json:"-" xml:"-"`
-}
-
-type metadataSnapshotTaskDetail struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SnapshotTaskDetail) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SnapshotTaskDetail) GoString() string {
- return s.String()
-}
-
-// Describes the data feed for a Spot instance.
-type SpotDatafeedSubscription struct {
- // The Amazon S3 bucket where the Spot instance data feed is located.
- Bucket *string `locationName:"bucket" type:"string"`
-
- // The fault codes for the Spot instance request, if any.
- Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"`
-
- // The AWS account ID of the account.
- OwnerId *string `locationName:"ownerId" type:"string"`
-
- // The prefix that is prepended to data feed files.
- Prefix *string `locationName:"prefix" type:"string"`
-
- // The state of the Spot instance data feed subscription.
- State *string `locationName:"state" type:"string" enum:"DatafeedSubscriptionState"`
-
- metadataSpotDatafeedSubscription `json:"-" xml:"-"`
-}
-
-type metadataSpotDatafeedSubscription struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotDatafeedSubscription) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotDatafeedSubscription) GoString() string {
- return s.String()
-}
-
-// Describes the launch specification for one or more Spot instances.
-type SpotFleetLaunchSpecification struct {
- // Deprecated.
- AddressingType *string `locationName:"addressingType" type:"string"`
-
- // One or more block device mapping entries.
- BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
-
- // Indicates whether the instances are optimized for EBS I/O. This optimization
- // provides dedicated throughput to Amazon EBS and an optimized configuration
- // stack to provide optimal EBS I/O performance. This optimization isn't available
- // with all instance types. Additional usage charges apply when using an EBS
- // Optimized instance.
- //
- // Default: false
- EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
-
- // The IAM instance profile.
- IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
-
- // The ID of the AMI.
- ImageId *string `locationName:"imageId" type:"string"`
-
- // The instance type.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // The ID of the kernel.
- KernelId *string `locationName:"kernelId" type:"string"`
-
- // The name of the key pair.
- KeyName *string `locationName:"keyName" type:"string"`
-
- // Enable or disable monitoring for the instances.
- Monitoring *SpotFleetMonitoring `locationName:"monitoring" type:"structure"`
-
- // One or more network interfaces.
- NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
-
- // The placement information.
- Placement *SpotPlacement `locationName:"placement" type:"structure"`
-
- // The ID of the RAM disk.
- RamdiskId *string `locationName:"ramdiskId" type:"string"`
-
- // One or more security groups. When requesting instances in a VPC, you must
- // specify the IDs of the security groups. When requesting instances in EC2-Classic,
- // you can specify the names or the IDs of the security groups.
- SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
-
- // The bid price per unit hour for the specified instance type. If this value
- // is not specified, the default is the Spot bid price specified for the fleet.
- // To determine the bid price per unit hour, divide the Spot bid price by the
- // value of WeightedCapacity.
- SpotPrice *string `locationName:"spotPrice" type:"string"`
-
- // The ID of the subnet in which to launch the instances.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- // The Base64-encoded MIME user data to make available to the instances.
- UserData *string `locationName:"userData" type:"string"`
-
- // The number of units provided by the specified instance type. These are the
- // same units that you chose to set the target capacity in terms (instances
- // or a performance characteristic such as vCPUs, memory, or I/O).
- //
- // If the target capacity divided by this value is not a whole number, we round
- // the number of instances to the next whole number. If this value is not specified,
- // the default is 1.
- WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"`
-
- metadataSpotFleetLaunchSpecification `json:"-" xml:"-"`
-}
-
-type metadataSpotFleetLaunchSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotFleetLaunchSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotFleetLaunchSpecification) GoString() string {
- return s.String()
-}
-
-// Describes whether monitoring is enabled.
-type SpotFleetMonitoring struct {
- // Enables monitoring for the instance.
- //
- // Default: false
- Enabled *bool `locationName:"enabled" type:"boolean"`
-
- metadataSpotFleetMonitoring `json:"-" xml:"-"`
-}
-
-type metadataSpotFleetMonitoring struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotFleetMonitoring) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotFleetMonitoring) GoString() string {
- return s.String()
-}
-
-// Describes a Spot fleet request.
-type SpotFleetRequestConfig struct {
- // The creation date and time of the request.
- CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601" required:"true"`
-
- // Information about the configuration of the Spot fleet request.
- SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"`
-
- // The ID of the Spot fleet request.
- SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
-
- // The state of the Spot fleet request.
- SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
-
- metadataSpotFleetRequestConfig `json:"-" xml:"-"`
-}
-
-type metadataSpotFleetRequestConfig struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotFleetRequestConfig) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotFleetRequestConfig) GoString() string {
- return s.String()
-}
-
-// Describes the configuration of a Spot fleet request.
-type SpotFleetRequestConfigData struct {
- // Indicates how to allocate the target capacity across the Spot pools specified
- // by the Spot fleet request. The default is lowestPrice.
- AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"`
-
- // A unique, case-sensitive identifier you provide to ensure idempotency of
- // your listings. This helps avoid duplicate listings. For more information,
- // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
- ClientToken *string `locationName:"clientToken" type:"string"`
-
- // Indicates whether running Spot instances should be terminated if the target
- // capacity of the Spot fleet request is decreased below the current size of
- // the Spot fleet.
- ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"`
-
- // Grants the Spot fleet permission to terminate Spot instances on your behalf
- // when you cancel its Spot fleet request using CancelSpotFleetRequests or when
- // the Spot fleet request expires, if you set terminateInstancesWithExpiration.
- IamFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"`
-
- // Information about the launch specifications for the Spot fleet request.
- LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" min:"1" type:"list" required:"true"`
-
- // The bid price per unit hour.
- SpotPrice *string `locationName:"spotPrice" type:"string" required:"true"`
-
- // The number of units to request. You can choose to set the target capacity
- // in terms of instances or a performance characteristic that is important to
- // your application workload, such as vCPUs, memory, or I/O.
- TargetCapacity *int64 `locationName:"targetCapacity" type:"integer" required:"true"`
-
- // Indicates whether running Spot instances should be terminated when the Spot
- // fleet request expires.
- TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"`
-
- // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- // The default is to start fulfilling the request immediately.
- ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"`
-
- // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- // At this point, no new Spot instance requests are placed or enabled to fulfill
- // the request.
- ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataSpotFleetRequestConfigData `json:"-" xml:"-"`
-}
-
-type metadataSpotFleetRequestConfigData struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotFleetRequestConfigData) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotFleetRequestConfigData) GoString() string {
- return s.String()
-}
-
-// Describes a Spot instance request.
-type SpotInstanceRequest struct {
- // If you specified a duration and your Spot instance request was fulfilled,
- // this is the fixed hourly price in effect for the Spot instance while it runs.
- ActualBlockHourlyPrice *string `locationName:"actualBlockHourlyPrice" type:"string"`
-
- // The Availability Zone group. If you specify the same Availability Zone group
- // for all Spot instance requests, all Spot instances are launched in the same
- // Availability Zone.
- AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"`
-
- // The duration for the Spot instance, in minutes.
- BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"`
-
- // The date and time when the Spot instance request was created, in UTC format
- // (for example, YYYY-MM-DDTHH:MM:SSZ).
- CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // The fault codes for the Spot instance request, if any.
- Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"`
-
- // The instance ID, if an instance has been launched to fulfill the Spot instance
- // request.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The instance launch group. Launch groups are Spot instances that launch together
- // and terminate together.
- LaunchGroup *string `locationName:"launchGroup" type:"string"`
-
- // Additional information for launching instances.
- LaunchSpecification *LaunchSpecification `locationName:"launchSpecification" type:"structure"`
-
- // The Availability Zone in which the bid is launched.
- LaunchedAvailabilityZone *string `locationName:"launchedAvailabilityZone" type:"string"`
-
- // The product description associated with the Spot instance.
- ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
-
- // The ID of the Spot instance request.
- SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"`
-
- // The maximum hourly price (bid) for the Spot instance launched to fulfill
- // the request.
- SpotPrice *string `locationName:"spotPrice" type:"string"`
-
- // The state of the Spot instance request. Spot bid status information can help
- // you track your Spot instance requests. For more information, see Spot Bid
- // Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- State *string `locationName:"state" type:"string" enum:"SpotInstanceState"`
-
- // The status code and status message describing the Spot instance request.
- Status *SpotInstanceStatus `locationName:"status" type:"structure"`
-
- // Any tags assigned to the resource.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The Spot instance request type.
- Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"`
-
- // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- // The request becomes active at this date and time.
- ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"`
-
- // The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- // If this is a one-time request, it remains active until all instances launch,
- // the request is canceled, or this date is reached. If the request is persistent,
- // it remains active until it is canceled or this date is reached.
- ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataSpotInstanceRequest `json:"-" xml:"-"`
-}
-
-type metadataSpotInstanceRequest struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotInstanceRequest) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotInstanceRequest) GoString() string {
- return s.String()
-}
-
-// Describes a Spot instance state change.
-type SpotInstanceStateFault struct {
- // The reason code for the Spot instance state change.
- Code *string `locationName:"code" type:"string"`
-
- // The message for the Spot instance state change.
- Message *string `locationName:"message" type:"string"`
-
- metadataSpotInstanceStateFault `json:"-" xml:"-"`
-}
-
-type metadataSpotInstanceStateFault struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotInstanceStateFault) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotInstanceStateFault) GoString() string {
- return s.String()
-}
-
-// Describes the status of a Spot instance request.
-type SpotInstanceStatus struct {
- // The status code. For a list of status codes, see Spot Bid Status Codes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand)
- // in the Amazon Elastic Compute Cloud User Guide.
- Code *string `locationName:"code" type:"string"`
-
- // The description for the status code.
- Message *string `locationName:"message" type:"string"`
-
- // The date and time of the most recent status update, in UTC format (for example,
- // YYYY-MM-DDTHH:MM:SSZ).
- UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataSpotInstanceStatus `json:"-" xml:"-"`
-}
-
-type metadataSpotInstanceStatus struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotInstanceStatus) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotInstanceStatus) GoString() string {
- return s.String()
-}
-
-// Describes Spot instance placement.
-type SpotPlacement struct {
- // The Availability Zone.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The name of the placement group (for cluster instances).
- GroupName *string `locationName:"groupName" type:"string"`
-
- metadataSpotPlacement `json:"-" xml:"-"`
-}
-
-type metadataSpotPlacement struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotPlacement) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotPlacement) GoString() string {
- return s.String()
-}
-
-// Describes the maximum hourly price (bid) for any Spot instance launched to
-// fulfill the request.
-type SpotPrice struct {
- // The Availability Zone.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The instance type.
- InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
-
- // A general description of the AMI.
- ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
-
- // The maximum price (bid) that you are willing to pay for a Spot instance.
- SpotPrice *string `locationName:"spotPrice" type:"string"`
-
- // The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataSpotPrice `json:"-" xml:"-"`
-}
-
-type metadataSpotPrice struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s SpotPrice) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SpotPrice) GoString() string {
- return s.String()
-}
-
-type StartInstancesInput struct {
- // Reserved.
- AdditionalInfo *string `locationName:"additionalInfo" type:"string"`
-
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more instance IDs.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
-
- metadataStartInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataStartInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s StartInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StartInstancesInput) GoString() string {
- return s.String()
-}
-
-type StartInstancesOutput struct {
- // Information about one or more started instances.
- StartingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"`
-
- metadataStartInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataStartInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s StartInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StartInstancesOutput) GoString() string {
- return s.String()
-}
-
-// Describes a state change.
-type StateReason struct {
- // The reason code for the state change.
- Code *string `locationName:"code" type:"string"`
-
- // The message for the state change.
- //
- // Server.SpotInstanceTermination: A Spot Instance was terminated due to an
- // increase in the market price.
- //
- // Server.InternalError: An internal error occurred during instance launch,
- // resulting in termination.
- //
- // Server.InsufficientInstanceCapacity: There was insufficient instance capacity
- // to satisfy the launch request.
- //
- // Client.InternalError: A client error caused the instance to terminate on
- // launch.
- //
- // Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown
- // -h command from the instance.
- //
- // Client.UserInitiatedShutdown: The instance was shut down using the Amazon
- // EC2 API.
- //
- // Client.VolumeLimitExceeded: The volume limit was exceeded.
- //
- // Client.InvalidSnapshot.NotFound: The specified snapshot was not found.
- Message *string `locationName:"message" type:"string"`
-
- metadataStateReason `json:"-" xml:"-"`
-}
-
-type metadataStateReason struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s StateReason) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StateReason) GoString() string {
- return s.String()
-}
-
-type StopInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // Forces the instances to stop. The instances do not have an opportunity to
- // flush file system caches or file system metadata. If you use this option,
- // you must perform file system check and repair procedures. This option is
- // not recommended for Windows instances.
- //
- // Default: false
- Force *bool `locationName:"force" type:"boolean"`
-
- // One or more instance IDs.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
-
- metadataStopInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataStopInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s StopInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StopInstancesInput) GoString() string {
- return s.String()
-}
-
-type StopInstancesOutput struct {
- // Information about one or more stopped instances.
- StoppingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"`
-
- metadataStopInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataStopInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s StopInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StopInstancesOutput) GoString() string {
- return s.String()
-}
-
-// Describes the storage location for an instance store-backed AMI.
-type Storage struct {
- // An Amazon S3 storage location.
- S3 *S3Storage `type:"structure"`
-
- metadataStorage `json:"-" xml:"-"`
-}
-
-type metadataStorage struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Storage) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Storage) GoString() string {
- return s.String()
-}
-
-// Describes a subnet.
-type Subnet struct {
- // The Availability Zone of the subnet.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The number of unused IP addresses in the subnet. Note that the IP addresses
- // for any stopped instances are considered unavailable.
- AvailableIpAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"`
-
- // The CIDR block assigned to the subnet.
- CidrBlock *string `locationName:"cidrBlock" type:"string"`
-
- // Indicates whether this is the default subnet for the Availability Zone.
- DefaultForAz *bool `locationName:"defaultForAz" type:"boolean"`
-
- // Indicates whether instances launched in this subnet receive a public IP address.
- MapPublicIpOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"`
-
- // The current state of the subnet.
- State *string `locationName:"state" type:"string" enum:"SubnetState"`
-
- // The ID of the subnet.
- SubnetId *string `locationName:"subnetId" type:"string"`
-
- // Any tags assigned to the subnet.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the VPC the subnet is in.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataSubnet `json:"-" xml:"-"`
-}
-
-type metadataSubnet struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Subnet) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Subnet) GoString() string {
- return s.String()
-}
-
-// Describes a tag.
-type Tag struct {
- // The key of the tag.
- //
- // Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode
- // characters. May not begin with aws:
- Key *string `locationName:"key" type:"string"`
-
- // The value of the tag.
- //
- // Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode
- // characters.
- Value *string `locationName:"value" type:"string"`
-
- metadataTag `json:"-" xml:"-"`
-}
-
-type metadataTag struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Tag) GoString() string {
- return s.String()
-}
-
-// Describes a tag.
-type TagDescription struct {
- // The tag key.
- Key *string `locationName:"key" type:"string"`
-
- // The ID of the resource. For example, ami-1a2b3c4d.
- ResourceId *string `locationName:"resourceId" type:"string"`
-
- // The resource type.
- ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"`
-
- // The tag value.
- Value *string `locationName:"value" type:"string"`
-
- metadataTagDescription `json:"-" xml:"-"`
-}
-
-type metadataTagDescription struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s TagDescription) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TagDescription) GoString() string {
- return s.String()
-}
-
-type TerminateInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more instance IDs.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
-
- metadataTerminateInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataTerminateInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s TerminateInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TerminateInstancesInput) GoString() string {
- return s.String()
-}
-
-type TerminateInstancesOutput struct {
- // Information about one or more terminated instances.
- TerminatingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"`
-
- metadataTerminateInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataTerminateInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s TerminateInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TerminateInstancesOutput) GoString() string {
- return s.String()
-}
-
-type UnassignPrivateIpAddressesInput struct {
- // The ID of the network interface.
- NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"`
-
- // The secondary private IP addresses to unassign from the network interface.
- // You can specify this option multiple times to unassign more than one IP address.
- PrivateIpAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list" required:"true"`
-
- metadataUnassignPrivateIpAddressesInput `json:"-" xml:"-"`
-}
-
-type metadataUnassignPrivateIpAddressesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UnassignPrivateIpAddressesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UnassignPrivateIpAddressesInput) GoString() string {
- return s.String()
-}
-
-type UnassignPrivateIpAddressesOutput struct {
- metadataUnassignPrivateIpAddressesOutput `json:"-" xml:"-"`
-}
-
-type metadataUnassignPrivateIpAddressesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UnassignPrivateIpAddressesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UnassignPrivateIpAddressesOutput) GoString() string {
- return s.String()
-}
-
-type UnmonitorInstancesInput struct {
- // Checks whether you have the required permissions for the action, without
- // actually making the request, and provides an error response. If you have
- // the required permissions, the error response is DryRunOperation. Otherwise,
- // it is UnauthorizedOperation.
- DryRun *bool `locationName:"dryRun" type:"boolean"`
-
- // One or more instance IDs.
- InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
-
- metadataUnmonitorInstancesInput `json:"-" xml:"-"`
-}
-
-type metadataUnmonitorInstancesInput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UnmonitorInstancesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UnmonitorInstancesInput) GoString() string {
- return s.String()
-}
-
-type UnmonitorInstancesOutput struct {
- // Monitoring information for one or more instances.
- InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"`
-
- metadataUnmonitorInstancesOutput `json:"-" xml:"-"`
-}
-
-type metadataUnmonitorInstancesOutput struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UnmonitorInstancesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UnmonitorInstancesOutput) GoString() string {
- return s.String()
-}
-
-// Information about items that were not successfully processed in a batch call.
-type UnsuccessfulItem struct {
- // Information about the error.
- Error *UnsuccessfulItemError `locationName:"error" type:"structure" required:"true"`
-
- // The ID of the resource.
- ResourceId *string `locationName:"resourceId" type:"string"`
-
- metadataUnsuccessfulItem `json:"-" xml:"-"`
-}
-
-type metadataUnsuccessfulItem struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UnsuccessfulItem) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UnsuccessfulItem) GoString() string {
- return s.String()
-}
-
-// Information about the error that occurred. For more information about errors,
-// see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html).
-type UnsuccessfulItemError struct {
- // The error code.
- Code *string `locationName:"code" type:"string" required:"true"`
-
- // The error message accompanying the error code.
- Message *string `locationName:"message" type:"string" required:"true"`
-
- metadataUnsuccessfulItemError `json:"-" xml:"-"`
-}
-
-type metadataUnsuccessfulItemError struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UnsuccessfulItemError) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UnsuccessfulItemError) GoString() string {
- return s.String()
-}
-
-// Describes the S3 bucket for the disk image.
-type UserBucket struct {
- // The name of the S3 bucket where the disk image is located.
- S3Bucket *string `type:"string"`
-
- // The key for the disk image.
- S3Key *string `type:"string"`
-
- metadataUserBucket `json:"-" xml:"-"`
-}
-
-type metadataUserBucket struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UserBucket) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UserBucket) GoString() string {
- return s.String()
-}
-
-// Describes the S3 bucket for the disk image.
-type UserBucketDetails struct {
- // The S3 bucket from which the disk image was created.
- S3Bucket *string `locationName:"s3Bucket" type:"string"`
-
- // The key from which the disk image was created.
- S3Key *string `locationName:"s3Key" type:"string"`
-
- metadataUserBucketDetails `json:"-" xml:"-"`
-}
-
-type metadataUserBucketDetails struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UserBucketDetails) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UserBucketDetails) GoString() string {
- return s.String()
-}
-
-// Describes the user data to be made available to an instance.
-type UserData struct {
- // The Base64-encoded MIME user data for the instance.
- Data *string `locationName:"data" type:"string"`
-
- metadataUserData `json:"-" xml:"-"`
-}
-
-type metadataUserData struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UserData) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UserData) GoString() string {
- return s.String()
-}
-
-// Describes a security group and AWS account ID pair.
-type UserIdGroupPair struct {
- // The ID of the security group.
- GroupId *string `locationName:"groupId" type:"string"`
-
- // The name of the security group. In a request, use this parameter for a security
- // group in EC2-Classic or a default VPC only. For a security group in a nondefault
- // VPC, use GroupId.
- GroupName *string `locationName:"groupName" type:"string"`
-
- // The ID of an AWS account. EC2-Classic only.
- UserId *string `locationName:"userId" type:"string"`
-
- metadataUserIdGroupPair `json:"-" xml:"-"`
-}
-
-type metadataUserIdGroupPair struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s UserIdGroupPair) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UserIdGroupPair) GoString() string {
- return s.String()
-}
-
-// Describes telemetry for a VPN tunnel.
-type VgwTelemetry struct {
- // The number of accepted routes.
- AcceptedRouteCount *int64 `locationName:"acceptedRouteCount" type:"integer"`
-
- // The date and time of the last change in status.
- LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp" timestampFormat:"iso8601"`
-
- // The Internet-routable IP address of the virtual private gateway's outside
- // interface.
- OutsideIpAddress *string `locationName:"outsideIpAddress" type:"string"`
-
- // The status of the VPN tunnel.
- Status *string `locationName:"status" type:"string" enum:"TelemetryStatus"`
-
- // If an error occurs, a description of the error.
- StatusMessage *string `locationName:"statusMessage" type:"string"`
-
- metadataVgwTelemetry `json:"-" xml:"-"`
-}
-
-type metadataVgwTelemetry struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VgwTelemetry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VgwTelemetry) GoString() string {
- return s.String()
-}
-
-// Describes a volume.
-type Volume struct {
- // Information about the volume attachments.
- Attachments []*VolumeAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"`
-
- // The Availability Zone for the volume.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The time stamp when volume creation was initiated.
- CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // Indicates whether the volume will be encrypted.
- Encrypted *bool `locationName:"encrypted" type:"boolean"`
-
- // The number of I/O operations per second (IOPS) that the volume supports.
- // For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that
- // are provisioned for the volume. For General Purpose (SSD) volumes, this represents
- // the baseline performance of the volume and the rate at which the volume accumulates
- // I/O credits for bursting. For more information on General Purpose (SSD) baseline
- // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
- // in the Amazon Elastic Compute Cloud User Guide.
- //
- // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and
- // 3 to 10000 for General Purpose (SSD) volumes.
- //
- // Condition: This parameter is required for requests to create io1 volumes;
- // it is not used in requests to create standard or gp2 volumes.
- Iops *int64 `locationName:"iops" type:"integer"`
-
- // The full ARN of the AWS Key Management Service (AWS KMS) customer master
- // key (CMK) that was used to protect the volume encryption key for the volume.
- KmsKeyId *string `locationName:"kmsKeyId" type:"string"`
-
- // The size of the volume, in GiBs.
- Size *int64 `locationName:"size" type:"integer"`
-
- // The snapshot from which the volume was created, if applicable.
- SnapshotId *string `locationName:"snapshotId" type:"string"`
-
- // The volume state.
- State *string `locationName:"status" type:"string" enum:"VolumeState"`
-
- // Any tags assigned to the volume.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the volume.
- VolumeId *string `locationName:"volumeId" type:"string"`
-
- // The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for
- // Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.
- VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"`
-
- metadataVolume `json:"-" xml:"-"`
-}
-
-type metadataVolume struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Volume) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Volume) GoString() string {
- return s.String()
-}
-
-// Describes volume attachment details.
-type VolumeAttachment struct {
- // The time stamp when the attachment initiated.
- AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // Indicates whether the EBS volume is deleted on instance termination.
- DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
-
- // The device name.
- Device *string `locationName:"device" type:"string"`
-
- // The ID of the instance.
- InstanceId *string `locationName:"instanceId" type:"string"`
-
- // The attachment state of the volume.
- State *string `locationName:"status" type:"string" enum:"VolumeAttachmentState"`
-
- // The ID of the volume.
- VolumeId *string `locationName:"volumeId" type:"string"`
-
- metadataVolumeAttachment `json:"-" xml:"-"`
-}
-
-type metadataVolumeAttachment struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VolumeAttachment) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VolumeAttachment) GoString() string {
- return s.String()
-}
-
-// Describes an EBS volume.
-type VolumeDetail struct {
- // The size of the volume, in GiB.
- Size *int64 `locationName:"size" type:"long" required:"true"`
-
- metadataVolumeDetail `json:"-" xml:"-"`
-}
-
-type metadataVolumeDetail struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VolumeDetail) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VolumeDetail) GoString() string {
- return s.String()
-}
-
-// Describes a volume status operation code.
-type VolumeStatusAction struct {
- // The code identifying the operation, for example, enable-volume-io.
- Code *string `locationName:"code" type:"string"`
-
- // A description of the operation.
- Description *string `locationName:"description" type:"string"`
-
- // The ID of the event associated with this operation.
- EventId *string `locationName:"eventId" type:"string"`
-
- // The event type associated with this operation.
- EventType *string `locationName:"eventType" type:"string"`
-
- metadataVolumeStatusAction `json:"-" xml:"-"`
-}
-
-type metadataVolumeStatusAction struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VolumeStatusAction) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VolumeStatusAction) GoString() string {
- return s.String()
-}
-
-// Describes a volume status.
-type VolumeStatusDetails struct {
- // The name of the volume status.
- Name *string `locationName:"name" type:"string" enum:"VolumeStatusName"`
-
- // The intended status of the volume status.
- Status *string `locationName:"status" type:"string"`
-
- metadataVolumeStatusDetails `json:"-" xml:"-"`
-}
-
-type metadataVolumeStatusDetails struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VolumeStatusDetails) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VolumeStatusDetails) GoString() string {
- return s.String()
-}
-
-// Describes a volume status event.
-type VolumeStatusEvent struct {
- // A description of the event.
- Description *string `locationName:"description" type:"string"`
-
- // The ID of this event.
- EventId *string `locationName:"eventId" type:"string"`
-
- // The type of this event.
- EventType *string `locationName:"eventType" type:"string"`
-
- // The latest end time of the event.
- NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"iso8601"`
-
- // The earliest start time of the event.
- NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"iso8601"`
-
- metadataVolumeStatusEvent `json:"-" xml:"-"`
-}
-
-type metadataVolumeStatusEvent struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VolumeStatusEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VolumeStatusEvent) GoString() string {
- return s.String()
-}
-
-// Describes the status of a volume.
-type VolumeStatusInfo struct {
- // The details of the volume status.
- Details []*VolumeStatusDetails `locationName:"details" locationNameList:"item" type:"list"`
-
- // The status of the volume.
- Status *string `locationName:"status" type:"string" enum:"VolumeStatusInfoStatus"`
-
- metadataVolumeStatusInfo `json:"-" xml:"-"`
-}
-
-type metadataVolumeStatusInfo struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VolumeStatusInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VolumeStatusInfo) GoString() string {
- return s.String()
-}
-
-// Describes the volume status.
-type VolumeStatusItem struct {
- // The details of the operation.
- Actions []*VolumeStatusAction `locationName:"actionsSet" locationNameList:"item" type:"list"`
-
- // The Availability Zone of the volume.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // A list of events associated with the volume.
- Events []*VolumeStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"`
-
- // The volume ID.
- VolumeId *string `locationName:"volumeId" type:"string"`
-
- // The volume status.
- VolumeStatus *VolumeStatusInfo `locationName:"volumeStatus" type:"structure"`
-
- metadataVolumeStatusItem `json:"-" xml:"-"`
-}
-
-type metadataVolumeStatusItem struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VolumeStatusItem) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VolumeStatusItem) GoString() string {
- return s.String()
-}
-
-// Describes a VPC.
-type Vpc struct {
- // The CIDR block for the VPC.
- CidrBlock *string `locationName:"cidrBlock" type:"string"`
-
- // The ID of the set of DHCP options you've associated with the VPC (or default
- // if the default options are associated with the VPC).
- DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"`
-
- // The allowed tenancy of instances launched into the VPC.
- InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
-
- // Indicates whether the VPC is the default VPC.
- IsDefault *bool `locationName:"isDefault" type:"boolean"`
-
- // The current state of the VPC.
- State *string `locationName:"state" type:"string" enum:"VpcState"`
-
- // Any tags assigned to the VPC.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataVpc `json:"-" xml:"-"`
-}
-
-type metadataVpc struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s Vpc) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Vpc) GoString() string {
- return s.String()
-}
-
-// Describes an attachment between a virtual private gateway and a VPC.
-type VpcAttachment struct {
- // The current state of the attachment.
- State *string `locationName:"state" type:"string" enum:"AttachmentStatus"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataVpcAttachment `json:"-" xml:"-"`
-}
-
-type metadataVpcAttachment struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpcAttachment) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpcAttachment) GoString() string {
- return s.String()
-}
-
-// Describes whether a VPC is enabled for ClassicLink.
-type VpcClassicLink struct {
- // Indicates whether the VPC is enabled for ClassicLink.
- ClassicLinkEnabled *bool `locationName:"classicLinkEnabled" type:"boolean"`
-
- // Any tags assigned to the VPC.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataVpcClassicLink `json:"-" xml:"-"`
-}
-
-type metadataVpcClassicLink struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpcClassicLink) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpcClassicLink) GoString() string {
- return s.String()
-}
-
-// Describes a VPC endpoint.
-type VpcEndpoint struct {
- // The date and time the VPC endpoint was created.
- CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"`
-
- // The policy document associated with the endpoint.
- PolicyDocument *string `locationName:"policyDocument" type:"string"`
-
- // One or more route tables associated with the endpoint.
- RouteTableIds []*string `locationName:"routeTableIdSet" locationNameList:"item" type:"list"`
-
- // The name of the AWS service to which the endpoint is associated.
- ServiceName *string `locationName:"serviceName" type:"string"`
-
- // The state of the VPC endpoint.
- State *string `locationName:"state" type:"string" enum:"State"`
-
- // The ID of the VPC endpoint.
- VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"`
-
- // The ID of the VPC to which the endpoint is associated.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataVpcEndpoint `json:"-" xml:"-"`
-}
-
-type metadataVpcEndpoint struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpcEndpoint) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpcEndpoint) GoString() string {
- return s.String()
-}
-
-// Describes a VPC peering connection.
-type VpcPeeringConnection struct {
- // The information of the peer VPC.
- AccepterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"accepterVpcInfo" type:"structure"`
-
- // The time that an unaccepted VPC peering connection will expire.
- ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp" timestampFormat:"iso8601"`
-
- // The information of the requester VPC.
- RequesterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"requesterVpcInfo" type:"structure"`
-
- // The status of the VPC peering connection.
- Status *VpcPeeringConnectionStateReason `locationName:"status" type:"structure"`
-
- // Any tags assigned to the resource.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The ID of the VPC peering connection.
- VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"`
-
- metadataVpcPeeringConnection `json:"-" xml:"-"`
-}
-
-type metadataVpcPeeringConnection struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpcPeeringConnection) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpcPeeringConnection) GoString() string {
- return s.String()
-}
-
-// Describes the status of a VPC peering connection.
-type VpcPeeringConnectionStateReason struct {
- // The status of the VPC peering connection.
- Code *string `locationName:"code" type:"string" enum:"VpcPeeringConnectionStateReasonCode"`
-
- // A message that provides more information about the status, if applicable.
- Message *string `locationName:"message" type:"string"`
-
- metadataVpcPeeringConnectionStateReason `json:"-" xml:"-"`
-}
-
-type metadataVpcPeeringConnectionStateReason struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpcPeeringConnectionStateReason) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpcPeeringConnectionStateReason) GoString() string {
- return s.String()
-}
-
-// Describes a VPC in a VPC peering connection.
-type VpcPeeringConnectionVpcInfo struct {
- // The CIDR block for the VPC.
- CidrBlock *string `locationName:"cidrBlock" type:"string"`
-
- // The AWS account ID of the VPC owner.
- OwnerId *string `locationName:"ownerId" type:"string"`
-
- // The ID of the VPC.
- VpcId *string `locationName:"vpcId" type:"string"`
-
- metadataVpcPeeringConnectionVpcInfo `json:"-" xml:"-"`
-}
-
-type metadataVpcPeeringConnectionVpcInfo struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpcPeeringConnectionVpcInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpcPeeringConnectionVpcInfo) GoString() string {
- return s.String()
-}
-
-// Describes a VPN connection.
-type VpnConnection struct {
- // The configuration information for the VPN connection's customer gateway (in
- // the native XML format). This element is always present in the CreateVpnConnection
- // response; however, it's present in the DescribeVpnConnections response only
- // if the VPN connection is in the pending or available state.
- CustomerGatewayConfiguration *string `locationName:"customerGatewayConfiguration" type:"string"`
-
- // The ID of the customer gateway at your end of the VPN connection.
- CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"`
-
- // The VPN connection options.
- Options *VpnConnectionOptions `locationName:"options" type:"structure"`
-
- // The static routes associated with the VPN connection.
- Routes []*VpnStaticRoute `locationName:"routes" locationNameList:"item" type:"list"`
-
- // The current state of the VPN connection.
- State *string `locationName:"state" type:"string" enum:"VpnState"`
-
- // Any tags assigned to the VPN connection.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The type of VPN connection.
- Type *string `locationName:"type" type:"string" enum:"GatewayType"`
-
- // Information about the VPN tunnel.
- VgwTelemetry []*VgwTelemetry `locationName:"vgwTelemetry" locationNameList:"item" type:"list"`
-
- // The ID of the VPN connection.
- VpnConnectionId *string `locationName:"vpnConnectionId" type:"string"`
-
- // The ID of the virtual private gateway at the AWS side of the VPN connection.
- VpnGatewayId *string `locationName:"vpnGatewayId" type:"string"`
-
- metadataVpnConnection `json:"-" xml:"-"`
-}
-
-type metadataVpnConnection struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpnConnection) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpnConnection) GoString() string {
- return s.String()
-}
-
-// Describes VPN connection options.
-type VpnConnectionOptions struct {
- // Indicates whether the VPN connection uses static routes only. Static routes
- // must be used for devices that don't support BGP.
- StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"`
-
- metadataVpnConnectionOptions `json:"-" xml:"-"`
-}
-
-type metadataVpnConnectionOptions struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpnConnectionOptions) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpnConnectionOptions) GoString() string {
- return s.String()
-}
-
-// Describes VPN connection options.
-type VpnConnectionOptionsSpecification struct {
- // Indicates whether the VPN connection uses static routes only. Static routes
- // must be used for devices that don't support BGP.
- StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"`
-
- metadataVpnConnectionOptionsSpecification `json:"-" xml:"-"`
-}
-
-type metadataVpnConnectionOptionsSpecification struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpnConnectionOptionsSpecification) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpnConnectionOptionsSpecification) GoString() string {
- return s.String()
-}
-
-// Describes a virtual private gateway.
-type VpnGateway struct {
- // The Availability Zone where the virtual private gateway was created.
- AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
-
- // The current state of the virtual private gateway.
- State *string `locationName:"state" type:"string" enum:"VpnState"`
-
- // Any tags assigned to the virtual private gateway.
- Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
-
- // The type of VPN connection the virtual private gateway supports.
- Type *string `locationName:"type" type:"string" enum:"GatewayType"`
-
- // Any VPCs attached to the virtual private gateway.
- VpcAttachments []*VpcAttachment `locationName:"attachments" locationNameList:"item" type:"list"`
-
- // The ID of the virtual private gateway.
- VpnGatewayId *string `locationName:"vpnGatewayId" type:"string"`
-
- metadataVpnGateway `json:"-" xml:"-"`
-}
-
-type metadataVpnGateway struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpnGateway) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpnGateway) GoString() string {
- return s.String()
-}
-
-// Describes a static route for a VPN connection.
-type VpnStaticRoute struct {
- // The CIDR block associated with the local subnet of the customer data center.
- DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"`
-
- // Indicates how the routes were provided.
- Source *string `locationName:"source" type:"string" enum:"VpnStaticRouteSource"`
-
- // The current state of the static route.
- State *string `locationName:"state" type:"string" enum:"VpnState"`
-
- metadataVpnStaticRoute `json:"-" xml:"-"`
-}
-
-type metadataVpnStaticRoute struct {
- SDKShapeTraits bool `type:"structure"`
-}
-
-// String returns the string representation
-func (s VpnStaticRoute) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VpnStaticRoute) GoString() string {
- return s.String()
-}
-
-const (
- // @enum AccountAttributeName
- AccountAttributeNameSupportedPlatforms = "supported-platforms"
- // @enum AccountAttributeName
- AccountAttributeNameDefaultVpc = "default-vpc"
-)
-
-const (
- // @enum AllocationStrategy
- AllocationStrategyLowestPrice = "lowestPrice"
- // @enum AllocationStrategy
- AllocationStrategyDiversified = "diversified"
-)
-
-const (
- // @enum ArchitectureValues
- ArchitectureValuesI386 = "i386"
- // @enum ArchitectureValues
- ArchitectureValuesX8664 = "x86_64"
-)
-
-const (
- // @enum AttachmentStatus
- AttachmentStatusAttaching = "attaching"
- // @enum AttachmentStatus
- AttachmentStatusAttached = "attached"
- // @enum AttachmentStatus
- AttachmentStatusDetaching = "detaching"
- // @enum AttachmentStatus
- AttachmentStatusDetached = "detached"
-)
-
-const (
- // @enum AvailabilityZoneState
- AvailabilityZoneStateAvailable = "available"
- // @enum AvailabilityZoneState
- AvailabilityZoneStateInformation = "information"
- // @enum AvailabilityZoneState
- AvailabilityZoneStateImpaired = "impaired"
- // @enum AvailabilityZoneState
- AvailabilityZoneStateUnavailable = "unavailable"
-)
-
-const (
- // @enum BatchState
- BatchStateSubmitted = "submitted"
- // @enum BatchState
- BatchStateActive = "active"
- // @enum BatchState
- BatchStateCancelled = "cancelled"
- // @enum BatchState
- BatchStateFailed = "failed"
- // @enum BatchState
- BatchStateCancelledRunning = "cancelled_running"
- // @enum BatchState
- BatchStateCancelledTerminating = "cancelled_terminating"
- // @enum BatchState
- BatchStateModifying = "modifying"
-)
-
-const (
- // @enum BundleTaskState
- BundleTaskStatePending = "pending"
- // @enum BundleTaskState
- BundleTaskStateWaitingForShutdown = "waiting-for-shutdown"
- // @enum BundleTaskState
- BundleTaskStateBundling = "bundling"
- // @enum BundleTaskState
- BundleTaskStateStoring = "storing"
- // @enum BundleTaskState
- BundleTaskStateCancelling = "cancelling"
- // @enum BundleTaskState
- BundleTaskStateComplete = "complete"
- // @enum BundleTaskState
- BundleTaskStateFailed = "failed"
-)
-
-const (
- // @enum CancelBatchErrorCode
- CancelBatchErrorCodeFleetRequestIdDoesNotExist = "fleetRequestIdDoesNotExist"
- // @enum CancelBatchErrorCode
- CancelBatchErrorCodeFleetRequestIdMalformed = "fleetRequestIdMalformed"
- // @enum CancelBatchErrorCode
- CancelBatchErrorCodeFleetRequestNotInCancellableState = "fleetRequestNotInCancellableState"
- // @enum CancelBatchErrorCode
- CancelBatchErrorCodeUnexpectedError = "unexpectedError"
-)
-
-const (
- // @enum CancelSpotInstanceRequestState
- CancelSpotInstanceRequestStateActive = "active"
- // @enum CancelSpotInstanceRequestState
- CancelSpotInstanceRequestStateOpen = "open"
- // @enum CancelSpotInstanceRequestState
- CancelSpotInstanceRequestStateClosed = "closed"
- // @enum CancelSpotInstanceRequestState
- CancelSpotInstanceRequestStateCancelled = "cancelled"
- // @enum CancelSpotInstanceRequestState
- CancelSpotInstanceRequestStateCompleted = "completed"
-)
-
-const (
- // @enum ContainerFormat
- ContainerFormatOva = "ova"
-)
-
-const (
- // @enum ConversionTaskState
- ConversionTaskStateActive = "active"
- // @enum ConversionTaskState
- ConversionTaskStateCancelling = "cancelling"
- // @enum ConversionTaskState
- ConversionTaskStateCancelled = "cancelled"
- // @enum ConversionTaskState
- ConversionTaskStateCompleted = "completed"
-)
-
-const (
- // @enum CurrencyCodeValues
- CurrencyCodeValuesUsd = "USD"
-)
-
-const (
- // @enum DatafeedSubscriptionState
- DatafeedSubscriptionStateActive = "Active"
- // @enum DatafeedSubscriptionState
- DatafeedSubscriptionStateInactive = "Inactive"
-)
-
-const (
- // @enum DeviceType
- DeviceTypeEbs = "ebs"
- // @enum DeviceType
- DeviceTypeInstanceStore = "instance-store"
-)
-
-const (
- // @enum DiskImageFormat
- DiskImageFormatVmdk = "VMDK"
- // @enum DiskImageFormat
- DiskImageFormatRaw = "RAW"
- // @enum DiskImageFormat
- DiskImageFormatVhd = "VHD"
-)
-
-const (
- // @enum DomainType
- DomainTypeVpc = "vpc"
- // @enum DomainType
- DomainTypeStandard = "standard"
-)
-
-const (
- // @enum EventCode
- EventCodeInstanceReboot = "instance-reboot"
- // @enum EventCode
- EventCodeSystemReboot = "system-reboot"
- // @enum EventCode
- EventCodeSystemMaintenance = "system-maintenance"
- // @enum EventCode
- EventCodeInstanceRetirement = "instance-retirement"
- // @enum EventCode
- EventCodeInstanceStop = "instance-stop"
-)
-
-const (
- // @enum EventType
- EventTypeInstanceChange = "instanceChange"
- // @enum EventType
- EventTypeFleetRequestChange = "fleetRequestChange"
- // @enum EventType
- EventTypeError = "error"
-)
-
-const (
- // @enum ExcessCapacityTerminationPolicy
- ExcessCapacityTerminationPolicyNoTermination = "noTermination"
- // @enum ExcessCapacityTerminationPolicy
- ExcessCapacityTerminationPolicyDefault = "default"
-)
-
-const (
- // @enum ExportEnvironment
- ExportEnvironmentCitrix = "citrix"
- // @enum ExportEnvironment
- ExportEnvironmentVmware = "vmware"
- // @enum ExportEnvironment
- ExportEnvironmentMicrosoft = "microsoft"
-)
-
-const (
- // @enum ExportTaskState
- ExportTaskStateActive = "active"
- // @enum ExportTaskState
- ExportTaskStateCancelling = "cancelling"
- // @enum ExportTaskState
- ExportTaskStateCancelled = "cancelled"
- // @enum ExportTaskState
- ExportTaskStateCompleted = "completed"
-)
-
-const (
- // @enum FlowLogsResourceType
- FlowLogsResourceTypeVpc = "VPC"
- // @enum FlowLogsResourceType
- FlowLogsResourceTypeSubnet = "Subnet"
- // @enum FlowLogsResourceType
- FlowLogsResourceTypeNetworkInterface = "NetworkInterface"
-)
-
-const (
- // @enum GatewayType
- GatewayTypeIpsec1 = "ipsec.1"
-)
-
-const (
- // @enum HypervisorType
- HypervisorTypeOvm = "ovm"
- // @enum HypervisorType
- HypervisorTypeXen = "xen"
-)
-
-const (
- // @enum ImageAttributeName
- ImageAttributeNameDescription = "description"
- // @enum ImageAttributeName
- ImageAttributeNameKernel = "kernel"
- // @enum ImageAttributeName
- ImageAttributeNameRamdisk = "ramdisk"
- // @enum ImageAttributeName
- ImageAttributeNameLaunchPermission = "launchPermission"
- // @enum ImageAttributeName
- ImageAttributeNameProductCodes = "productCodes"
- // @enum ImageAttributeName
- ImageAttributeNameBlockDeviceMapping = "blockDeviceMapping"
- // @enum ImageAttributeName
- ImageAttributeNameSriovNetSupport = "sriovNetSupport"
-)
-
-const (
- // @enum ImageState
- ImageStatePending = "pending"
- // @enum ImageState
- ImageStateAvailable = "available"
- // @enum ImageState
- ImageStateInvalid = "invalid"
- // @enum ImageState
- ImageStateDeregistered = "deregistered"
- // @enum ImageState
- ImageStateTransient = "transient"
- // @enum ImageState
- ImageStateFailed = "failed"
- // @enum ImageState
- ImageStateError = "error"
-)
-
-const (
- // @enum ImageTypeValues
- ImageTypeValuesMachine = "machine"
- // @enum ImageTypeValues
- ImageTypeValuesKernel = "kernel"
- // @enum ImageTypeValues
- ImageTypeValuesRamdisk = "ramdisk"
-)
-
-const (
- // @enum InstanceAttributeName
- InstanceAttributeNameInstanceType = "instanceType"
- // @enum InstanceAttributeName
- InstanceAttributeNameKernel = "kernel"
- // @enum InstanceAttributeName
- InstanceAttributeNameRamdisk = "ramdisk"
- // @enum InstanceAttributeName
- InstanceAttributeNameUserData = "userData"
- // @enum InstanceAttributeName
- InstanceAttributeNameDisableApiTermination = "disableApiTermination"
- // @enum InstanceAttributeName
- InstanceAttributeNameInstanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior"
- // @enum InstanceAttributeName
- InstanceAttributeNameRootDeviceName = "rootDeviceName"
- // @enum InstanceAttributeName
- InstanceAttributeNameBlockDeviceMapping = "blockDeviceMapping"
- // @enum InstanceAttributeName
- InstanceAttributeNameProductCodes = "productCodes"
- // @enum InstanceAttributeName
- InstanceAttributeNameSourceDestCheck = "sourceDestCheck"
- // @enum InstanceAttributeName
- InstanceAttributeNameGroupSet = "groupSet"
- // @enum InstanceAttributeName
- InstanceAttributeNameEbsOptimized = "ebsOptimized"
- // @enum InstanceAttributeName
- InstanceAttributeNameSriovNetSupport = "sriovNetSupport"
-)
-
-const (
- // @enum InstanceLifecycleType
- InstanceLifecycleTypeSpot = "spot"
-)
-
-const (
- // @enum InstanceStateName
- InstanceStateNamePending = "pending"
- // @enum InstanceStateName
- InstanceStateNameRunning = "running"
- // @enum InstanceStateName
- InstanceStateNameShuttingDown = "shutting-down"
- // @enum InstanceStateName
- InstanceStateNameTerminated = "terminated"
- // @enum InstanceStateName
- InstanceStateNameStopping = "stopping"
- // @enum InstanceStateName
- InstanceStateNameStopped = "stopped"
-)
-
-const (
- // @enum InstanceType
- InstanceTypeT1Micro = "t1.micro"
- // @enum InstanceType
- InstanceTypeM1Small = "m1.small"
- // @enum InstanceType
- InstanceTypeM1Medium = "m1.medium"
- // @enum InstanceType
- InstanceTypeM1Large = "m1.large"
- // @enum InstanceType
- InstanceTypeM1Xlarge = "m1.xlarge"
- // @enum InstanceType
- InstanceTypeM3Medium = "m3.medium"
- // @enum InstanceType
- InstanceTypeM3Large = "m3.large"
- // @enum InstanceType
- InstanceTypeM3Xlarge = "m3.xlarge"
- // @enum InstanceType
- InstanceTypeM32xlarge = "m3.2xlarge"
- // @enum InstanceType
- InstanceTypeM4Large = "m4.large"
- // @enum InstanceType
- InstanceTypeM4Xlarge = "m4.xlarge"
- // @enum InstanceType
- InstanceTypeM42xlarge = "m4.2xlarge"
- // @enum InstanceType
- InstanceTypeM44xlarge = "m4.4xlarge"
- // @enum InstanceType
- InstanceTypeM410xlarge = "m4.10xlarge"
- // @enum InstanceType
- InstanceTypeT2Micro = "t2.micro"
- // @enum InstanceType
- InstanceTypeT2Small = "t2.small"
- // @enum InstanceType
- InstanceTypeT2Medium = "t2.medium"
- // @enum InstanceType
- InstanceTypeT2Large = "t2.large"
- // @enum InstanceType
- InstanceTypeM2Xlarge = "m2.xlarge"
- // @enum InstanceType
- InstanceTypeM22xlarge = "m2.2xlarge"
- // @enum InstanceType
- InstanceTypeM24xlarge = "m2.4xlarge"
- // @enum InstanceType
- InstanceTypeCr18xlarge = "cr1.8xlarge"
- // @enum InstanceType
- InstanceTypeI2Xlarge = "i2.xlarge"
- // @enum InstanceType
- InstanceTypeI22xlarge = "i2.2xlarge"
- // @enum InstanceType
- InstanceTypeI24xlarge = "i2.4xlarge"
- // @enum InstanceType
- InstanceTypeI28xlarge = "i2.8xlarge"
- // @enum InstanceType
- InstanceTypeHi14xlarge = "hi1.4xlarge"
- // @enum InstanceType
- InstanceTypeHs18xlarge = "hs1.8xlarge"
- // @enum InstanceType
- InstanceTypeC1Medium = "c1.medium"
- // @enum InstanceType
- InstanceTypeC1Xlarge = "c1.xlarge"
- // @enum InstanceType
- InstanceTypeC3Large = "c3.large"
- // @enum InstanceType
- InstanceTypeC3Xlarge = "c3.xlarge"
- // @enum InstanceType
- InstanceTypeC32xlarge = "c3.2xlarge"
- // @enum InstanceType
- InstanceTypeC34xlarge = "c3.4xlarge"
- // @enum InstanceType
- InstanceTypeC38xlarge = "c3.8xlarge"
- // @enum InstanceType
- InstanceTypeC4Large = "c4.large"
- // @enum InstanceType
- InstanceTypeC4Xlarge = "c4.xlarge"
- // @enum InstanceType
- InstanceTypeC42xlarge = "c4.2xlarge"
- // @enum InstanceType
- InstanceTypeC44xlarge = "c4.4xlarge"
- // @enum InstanceType
- InstanceTypeC48xlarge = "c4.8xlarge"
- // @enum InstanceType
- InstanceTypeCc14xlarge = "cc1.4xlarge"
- // @enum InstanceType
- InstanceTypeCc28xlarge = "cc2.8xlarge"
- // @enum InstanceType
- InstanceTypeG22xlarge = "g2.2xlarge"
- // @enum InstanceType
- InstanceTypeCg14xlarge = "cg1.4xlarge"
- // @enum InstanceType
- InstanceTypeR3Large = "r3.large"
- // @enum InstanceType
- InstanceTypeR3Xlarge = "r3.xlarge"
- // @enum InstanceType
- InstanceTypeR32xlarge = "r3.2xlarge"
- // @enum InstanceType
- InstanceTypeR34xlarge = "r3.4xlarge"
- // @enum InstanceType
- InstanceTypeR38xlarge = "r3.8xlarge"
- // @enum InstanceType
- InstanceTypeD2Xlarge = "d2.xlarge"
- // @enum InstanceType
- InstanceTypeD22xlarge = "d2.2xlarge"
- // @enum InstanceType
- InstanceTypeD24xlarge = "d2.4xlarge"
- // @enum InstanceType
- InstanceTypeD28xlarge = "d2.8xlarge"
-)
-
-const (
- // @enum ListingState
- ListingStateAvailable = "available"
- // @enum ListingState
- ListingStateSold = "sold"
- // @enum ListingState
- ListingStateCancelled = "cancelled"
- // @enum ListingState
- ListingStatePending = "pending"
-)
-
-const (
- // @enum ListingStatus
- ListingStatusActive = "active"
- // @enum ListingStatus
- ListingStatusPending = "pending"
- // @enum ListingStatus
- ListingStatusCancelled = "cancelled"
- // @enum ListingStatus
- ListingStatusClosed = "closed"
-)
-
-const (
- // @enum MonitoringState
- MonitoringStateDisabled = "disabled"
- // @enum MonitoringState
- MonitoringStateDisabling = "disabling"
- // @enum MonitoringState
- MonitoringStateEnabled = "enabled"
- // @enum MonitoringState
- MonitoringStatePending = "pending"
-)
-
-const (
- // @enum MoveStatus
- MoveStatusMovingToVpc = "movingToVpc"
- // @enum MoveStatus
- MoveStatusRestoringToClassic = "restoringToClassic"
-)
-
-const (
- // @enum NetworkInterfaceAttribute
- NetworkInterfaceAttributeDescription = "description"
- // @enum NetworkInterfaceAttribute
- NetworkInterfaceAttributeGroupSet = "groupSet"
- // @enum NetworkInterfaceAttribute
- NetworkInterfaceAttributeSourceDestCheck = "sourceDestCheck"
- // @enum NetworkInterfaceAttribute
- NetworkInterfaceAttributeAttachment = "attachment"
-)
-
-const (
- // @enum NetworkInterfaceStatus
- NetworkInterfaceStatusAvailable = "available"
- // @enum NetworkInterfaceStatus
- NetworkInterfaceStatusAttaching = "attaching"
- // @enum NetworkInterfaceStatus
- NetworkInterfaceStatusInUse = "in-use"
- // @enum NetworkInterfaceStatus
- NetworkInterfaceStatusDetaching = "detaching"
-)
-
-const (
- // @enum OfferingTypeValues
- OfferingTypeValuesHeavyUtilization = "Heavy Utilization"
- // @enum OfferingTypeValues
- OfferingTypeValuesMediumUtilization = "Medium Utilization"
- // @enum OfferingTypeValues
- OfferingTypeValuesLightUtilization = "Light Utilization"
- // @enum OfferingTypeValues
- OfferingTypeValuesNoUpfront = "No Upfront"
- // @enum OfferingTypeValues
- OfferingTypeValuesPartialUpfront = "Partial Upfront"
- // @enum OfferingTypeValues
- OfferingTypeValuesAllUpfront = "All Upfront"
-)
-
-const (
- // @enum OperationType
- OperationTypeAdd = "add"
- // @enum OperationType
- OperationTypeRemove = "remove"
-)
-
-const (
- // @enum PermissionGroup
- PermissionGroupAll = "all"
-)
-
-const (
- // @enum PlacementGroupState
- PlacementGroupStatePending = "pending"
- // @enum PlacementGroupState
- PlacementGroupStateAvailable = "available"
- // @enum PlacementGroupState
- PlacementGroupStateDeleting = "deleting"
- // @enum PlacementGroupState
- PlacementGroupStateDeleted = "deleted"
-)
-
-const (
- // @enum PlacementStrategy
- PlacementStrategyCluster = "cluster"
-)
-
-const (
- // @enum PlatformValues
- PlatformValuesWindows = "Windows"
-)
-
-const (
- // @enum ProductCodeValues
- ProductCodeValuesDevpay = "devpay"
- // @enum ProductCodeValues
- ProductCodeValuesMarketplace = "marketplace"
-)
-
-const (
- // @enum RIProductDescription
- RIProductDescriptionLinuxUnix = "Linux/UNIX"
- // @enum RIProductDescription
- RIProductDescriptionLinuxUnixamazonVpc = "Linux/UNIX (Amazon VPC)"
- // @enum RIProductDescription
- RIProductDescriptionWindows = "Windows"
- // @enum RIProductDescription
- RIProductDescriptionWindowsAmazonVpc = "Windows (Amazon VPC)"
-)
-
-const (
- // @enum RecurringChargeFrequency
- RecurringChargeFrequencyHourly = "Hourly"
-)
-
-const (
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesInstanceStuckInState = "instance-stuck-in-state"
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesUnresponsive = "unresponsive"
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesNotAcceptingCredentials = "not-accepting-credentials"
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesPasswordNotAvailable = "password-not-available"
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesPerformanceNetwork = "performance-network"
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesPerformanceInstanceStore = "performance-instance-store"
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesPerformanceEbsVolume = "performance-ebs-volume"
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesPerformanceOther = "performance-other"
- // @enum ReportInstanceReasonCodes
- ReportInstanceReasonCodesOther = "other"
-)
-
-const (
- // @enum ReportStatusType
- ReportStatusTypeOk = "ok"
- // @enum ReportStatusType
- ReportStatusTypeImpaired = "impaired"
-)
-
-const (
- // @enum ReservedInstanceState
- ReservedInstanceStatePaymentPending = "payment-pending"
- // @enum ReservedInstanceState
- ReservedInstanceStateActive = "active"
- // @enum ReservedInstanceState
- ReservedInstanceStatePaymentFailed = "payment-failed"
- // @enum ReservedInstanceState
- ReservedInstanceStateRetired = "retired"
-)
-
-const (
- // @enum ResetImageAttributeName
- ResetImageAttributeNameLaunchPermission = "launchPermission"
-)
-
-const (
- // @enum ResourceType
- ResourceTypeCustomerGateway = "customer-gateway"
- // @enum ResourceType
- ResourceTypeDhcpOptions = "dhcp-options"
- // @enum ResourceType
- ResourceTypeImage = "image"
- // @enum ResourceType
- ResourceTypeInstance = "instance"
- // @enum ResourceType
- ResourceTypeInternetGateway = "internet-gateway"
- // @enum ResourceType
- ResourceTypeNetworkAcl = "network-acl"
- // @enum ResourceType
- ResourceTypeNetworkInterface = "network-interface"
- // @enum ResourceType
- ResourceTypeReservedInstances = "reserved-instances"
- // @enum ResourceType
- ResourceTypeRouteTable = "route-table"
- // @enum ResourceType
- ResourceTypeSnapshot = "snapshot"
- // @enum ResourceType
- ResourceTypeSpotInstancesRequest = "spot-instances-request"
- // @enum ResourceType
- ResourceTypeSubnet = "subnet"
- // @enum ResourceType
- ResourceTypeSecurityGroup = "security-group"
- // @enum ResourceType
- ResourceTypeVolume = "volume"
- // @enum ResourceType
- ResourceTypeVpc = "vpc"
- // @enum ResourceType
- ResourceTypeVpnConnection = "vpn-connection"
- // @enum ResourceType
- ResourceTypeVpnGateway = "vpn-gateway"
-)
-
-const (
- // @enum RouteOrigin
- RouteOriginCreateRouteTable = "CreateRouteTable"
- // @enum RouteOrigin
- RouteOriginCreateRoute = "CreateRoute"
- // @enum RouteOrigin
- RouteOriginEnableVgwRoutePropagation = "EnableVgwRoutePropagation"
-)
-
-const (
- // @enum RouteState
- RouteStateActive = "active"
- // @enum RouteState
- RouteStateBlackhole = "blackhole"
-)
-
-const (
- // @enum RuleAction
- RuleActionAllow = "allow"
- // @enum RuleAction
- RuleActionDeny = "deny"
-)
-
-const (
- // @enum ShutdownBehavior
- ShutdownBehaviorStop = "stop"
- // @enum ShutdownBehavior
- ShutdownBehaviorTerminate = "terminate"
-)
-
-const (
- // @enum SnapshotAttributeName
- SnapshotAttributeNameProductCodes = "productCodes"
- // @enum SnapshotAttributeName
- SnapshotAttributeNameCreateVolumePermission = "createVolumePermission"
-)
-
-const (
- // @enum SnapshotState
- SnapshotStatePending = "pending"
- // @enum SnapshotState
- SnapshotStateCompleted = "completed"
- // @enum SnapshotState
- SnapshotStateError = "error"
-)
-
-const (
- // @enum SpotInstanceState
- SpotInstanceStateOpen = "open"
- // @enum SpotInstanceState
- SpotInstanceStateActive = "active"
- // @enum SpotInstanceState
- SpotInstanceStateClosed = "closed"
- // @enum SpotInstanceState
- SpotInstanceStateCancelled = "cancelled"
- // @enum SpotInstanceState
- SpotInstanceStateFailed = "failed"
-)
-
-const (
- // @enum SpotInstanceType
- SpotInstanceTypeOneTime = "one-time"
- // @enum SpotInstanceType
- SpotInstanceTypePersistent = "persistent"
-)
-
-const (
- // @enum State
- StatePending = "Pending"
- // @enum State
- StateAvailable = "Available"
- // @enum State
- StateDeleting = "Deleting"
- // @enum State
- StateDeleted = "Deleted"
-)
-
-const (
- // @enum Status
- StatusMoveInProgress = "MoveInProgress"
- // @enum Status
- StatusInVpc = "InVpc"
- // @enum Status
- StatusInClassic = "InClassic"
-)
-
-const (
- // @enum StatusName
- StatusNameReachability = "reachability"
-)
-
-const (
- // @enum StatusType
- StatusTypePassed = "passed"
- // @enum StatusType
- StatusTypeFailed = "failed"
- // @enum StatusType
- StatusTypeInsufficientData = "insufficient-data"
- // @enum StatusType
- StatusTypeInitializing = "initializing"
-)
-
-const (
- // @enum SubnetState
- SubnetStatePending = "pending"
- // @enum SubnetState
- SubnetStateAvailable = "available"
-)
-
-const (
- // @enum SummaryStatus
- SummaryStatusOk = "ok"
- // @enum SummaryStatus
- SummaryStatusImpaired = "impaired"
- // @enum SummaryStatus
- SummaryStatusInsufficientData = "insufficient-data"
- // @enum SummaryStatus
- SummaryStatusNotApplicable = "not-applicable"
- // @enum SummaryStatus
- SummaryStatusInitializing = "initializing"
-)
-
-const (
- // @enum TelemetryStatus
- TelemetryStatusUp = "UP"
- // @enum TelemetryStatus
- TelemetryStatusDown = "DOWN"
-)
-
-const (
- // @enum Tenancy
- TenancyDefault = "default"
- // @enum Tenancy
- TenancyDedicated = "dedicated"
-)
-
-const (
- // @enum TrafficType
- TrafficTypeAccept = "ACCEPT"
- // @enum TrafficType
- TrafficTypeReject = "REJECT"
- // @enum TrafficType
- TrafficTypeAll = "ALL"
-)
-
-const (
- // @enum VirtualizationType
- VirtualizationTypeHvm = "hvm"
- // @enum VirtualizationType
- VirtualizationTypeParavirtual = "paravirtual"
-)
-
-const (
- // @enum VolumeAttachmentState
- VolumeAttachmentStateAttaching = "attaching"
- // @enum VolumeAttachmentState
- VolumeAttachmentStateAttached = "attached"
- // @enum VolumeAttachmentState
- VolumeAttachmentStateDetaching = "detaching"
- // @enum VolumeAttachmentState
- VolumeAttachmentStateDetached = "detached"
-)
-
-const (
- // @enum VolumeAttributeName
- VolumeAttributeNameAutoEnableIo = "autoEnableIO"
- // @enum VolumeAttributeName
- VolumeAttributeNameProductCodes = "productCodes"
-)
-
-const (
- // @enum VolumeState
- VolumeStateCreating = "creating"
- // @enum VolumeState
- VolumeStateAvailable = "available"
- // @enum VolumeState
- VolumeStateInUse = "in-use"
- // @enum VolumeState
- VolumeStateDeleting = "deleting"
- // @enum VolumeState
- VolumeStateDeleted = "deleted"
- // @enum VolumeState
- VolumeStateError = "error"
-)
-
-const (
- // @enum VolumeStatusInfoStatus
- VolumeStatusInfoStatusOk = "ok"
- // @enum VolumeStatusInfoStatus
- VolumeStatusInfoStatusImpaired = "impaired"
- // @enum VolumeStatusInfoStatus
- VolumeStatusInfoStatusInsufficientData = "insufficient-data"
-)
-
-const (
- // @enum VolumeStatusName
- VolumeStatusNameIoEnabled = "io-enabled"
- // @enum VolumeStatusName
- VolumeStatusNameIoPerformance = "io-performance"
-)
-
-const (
- // @enum VolumeType
- VolumeTypeStandard = "standard"
- // @enum VolumeType
- VolumeTypeIo1 = "io1"
- // @enum VolumeType
- VolumeTypeGp2 = "gp2"
-)
-
-const (
- // @enum VpcAttributeName
- VpcAttributeNameEnableDnsSupport = "enableDnsSupport"
- // @enum VpcAttributeName
- VpcAttributeNameEnableDnsHostnames = "enableDnsHostnames"
-)
-
-const (
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodeInitiatingRequest = "initiating-request"
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodePendingAcceptance = "pending-acceptance"
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodeActive = "active"
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodeDeleted = "deleted"
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodeRejected = "rejected"
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodeFailed = "failed"
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodeExpired = "expired"
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodeProvisioning = "provisioning"
- // @enum VpcPeeringConnectionStateReasonCode
- VpcPeeringConnectionStateReasonCodeDeleting = "deleting"
-)
-
-const (
- // @enum VpcState
- VpcStatePending = "pending"
- // @enum VpcState
- VpcStateAvailable = "available"
-)
-
-const (
- // @enum VpnState
- VpnStatePending = "pending"
- // @enum VpnState
- VpnStateAvailable = "available"
- // @enum VpnState
- VpnStateDeleting = "deleting"
- // @enum VpnState
- VpnStateDeleted = "deleted"
-)
-
-const (
- // @enum VpnStaticRouteSource
- VpnStaticRouteSourceStatic = "Static"
-)
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go
deleted file mode 100644
index 195d9b55b8d..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package ec2_test
-
-import (
- "io/ioutil"
- "net/url"
- "testing"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/unit"
- "github.com/aws/aws-sdk-go/service/ec2"
- "github.com/stretchr/testify/assert"
-)
-
-func TestCopySnapshotPresignedURL(t *testing.T) {
- svc := ec2.New(unit.Session, &aws.Config{Region: aws.String("us-west-2")})
-
- assert.NotPanics(t, func() {
- // Doesn't panic on nil input
- req, _ := svc.CopySnapshotRequest(nil)
- req.Sign()
- })
-
- req, _ := svc.CopySnapshotRequest(&ec2.CopySnapshotInput{
- SourceRegion: aws.String("us-west-1"),
- SourceSnapshotId: aws.String("snap-id"),
- })
- req.Sign()
-
- b, _ := ioutil.ReadAll(req.HTTPRequest.Body)
- q, _ := url.ParseQuery(string(b))
- u, _ := url.QueryUnescape(q.Get("PresignedUrl"))
- assert.Equal(t, "us-west-2", q.Get("DestinationRegion"))
- assert.Equal(t, "us-west-1", q.Get("SourceRegion"))
- assert.Regexp(t, `^https://ec2\.us-west-1\.amazonaws\.com/.+&DestinationRegion=us-west-2`, u)
-}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go
deleted file mode 100644
index 86557fc15d0..00000000000
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go
+++ /dev/null
@@ -1,5188 +0,0 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-package ec2_test
-
-import (
- "bytes"
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/ec2"
-)
-
-var _ time.Duration
-var _ bytes.Buffer
-
-func ExampleEC2_AcceptVpcPeeringConnection() {
- svc := ec2.New(session.New())
-
- params := &ec2.AcceptVpcPeeringConnectionInput{
- DryRun: aws.Bool(true),
- VpcPeeringConnectionId: aws.String("String"),
- }
- resp, err := svc.AcceptVpcPeeringConnection(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AllocateAddress() {
- svc := ec2.New(session.New())
-
- params := &ec2.AllocateAddressInput{
- Domain: aws.String("DomainType"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.AllocateAddress(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AssignPrivateIpAddresses() {
- svc := ec2.New(session.New())
-
- params := &ec2.AssignPrivateIpAddressesInput{
- NetworkInterfaceId: aws.String("String"), // Required
- AllowReassignment: aws.Bool(true),
- PrivateIpAddresses: []*string{
- aws.String("String"), // Required
- // More values...
- },
- SecondaryPrivateIpAddressCount: aws.Int64(1),
- }
- resp, err := svc.AssignPrivateIpAddresses(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AssociateAddress() {
- svc := ec2.New(session.New())
-
- params := &ec2.AssociateAddressInput{
- AllocationId: aws.String("String"),
- AllowReassociation: aws.Bool(true),
- DryRun: aws.Bool(true),
- InstanceId: aws.String("String"),
- NetworkInterfaceId: aws.String("String"),
- PrivateIpAddress: aws.String("String"),
- PublicIp: aws.String("String"),
- }
- resp, err := svc.AssociateAddress(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AssociateDhcpOptions() {
- svc := ec2.New(session.New())
-
- params := &ec2.AssociateDhcpOptionsInput{
- DhcpOptionsId: aws.String("String"), // Required
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.AssociateDhcpOptions(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AssociateRouteTable() {
- svc := ec2.New(session.New())
-
- params := &ec2.AssociateRouteTableInput{
- RouteTableId: aws.String("String"), // Required
- SubnetId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.AssociateRouteTable(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AttachClassicLinkVpc() {
- svc := ec2.New(session.New())
-
- params := &ec2.AttachClassicLinkVpcInput{
- Groups: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- InstanceId: aws.String("String"), // Required
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.AttachClassicLinkVpc(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AttachInternetGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.AttachInternetGatewayInput{
- InternetGatewayId: aws.String("String"), // Required
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.AttachInternetGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AttachNetworkInterface() {
- svc := ec2.New(session.New())
-
- params := &ec2.AttachNetworkInterfaceInput{
- DeviceIndex: aws.Int64(1), // Required
- InstanceId: aws.String("String"), // Required
- NetworkInterfaceId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.AttachNetworkInterface(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AttachVolume() {
- svc := ec2.New(session.New())
-
- params := &ec2.AttachVolumeInput{
- Device: aws.String("String"), // Required
- InstanceId: aws.String("String"), // Required
- VolumeId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.AttachVolume(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AttachVpnGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.AttachVpnGatewayInput{
- VpcId: aws.String("String"), // Required
- VpnGatewayId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.AttachVpnGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AuthorizeSecurityGroupEgress() {
- svc := ec2.New(session.New())
-
- params := &ec2.AuthorizeSecurityGroupEgressInput{
- GroupId: aws.String("String"), // Required
- CidrIp: aws.String("String"),
- DryRun: aws.Bool(true),
- FromPort: aws.Int64(1),
- IpPermissions: []*ec2.IpPermission{
- { // Required
- FromPort: aws.Int64(1),
- IpProtocol: aws.String("String"),
- IpRanges: []*ec2.IpRange{
- { // Required
- CidrIp: aws.String("String"),
- },
- // More values...
- },
- PrefixListIds: []*ec2.PrefixListId{
- { // Required
- PrefixListId: aws.String("String"),
- },
- // More values...
- },
- ToPort: aws.Int64(1),
- UserIdGroupPairs: []*ec2.UserIdGroupPair{
- { // Required
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- },
- // More values...
- },
- IpProtocol: aws.String("String"),
- SourceSecurityGroupName: aws.String("String"),
- SourceSecurityGroupOwnerId: aws.String("String"),
- ToPort: aws.Int64(1),
- }
- resp, err := svc.AuthorizeSecurityGroupEgress(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_AuthorizeSecurityGroupIngress() {
- svc := ec2.New(session.New())
-
- params := &ec2.AuthorizeSecurityGroupIngressInput{
- CidrIp: aws.String("String"),
- DryRun: aws.Bool(true),
- FromPort: aws.Int64(1),
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- IpPermissions: []*ec2.IpPermission{
- { // Required
- FromPort: aws.Int64(1),
- IpProtocol: aws.String("String"),
- IpRanges: []*ec2.IpRange{
- { // Required
- CidrIp: aws.String("String"),
- },
- // More values...
- },
- PrefixListIds: []*ec2.PrefixListId{
- { // Required
- PrefixListId: aws.String("String"),
- },
- // More values...
- },
- ToPort: aws.Int64(1),
- UserIdGroupPairs: []*ec2.UserIdGroupPair{
- { // Required
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- },
- // More values...
- },
- IpProtocol: aws.String("String"),
- SourceSecurityGroupName: aws.String("String"),
- SourceSecurityGroupOwnerId: aws.String("String"),
- ToPort: aws.Int64(1),
- }
- resp, err := svc.AuthorizeSecurityGroupIngress(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_BundleInstance() {
- svc := ec2.New(session.New())
-
- params := &ec2.BundleInstanceInput{
- InstanceId: aws.String("String"), // Required
- Storage: &ec2.Storage{ // Required
- S3: &ec2.S3Storage{
- AWSAccessKeyId: aws.String("String"),
- Bucket: aws.String("String"),
- Prefix: aws.String("String"),
- UploadPolicy: []byte("PAYLOAD"),
- UploadPolicySignature: aws.String("String"),
- },
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.BundleInstance(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CancelBundleTask() {
- svc := ec2.New(session.New())
-
- params := &ec2.CancelBundleTaskInput{
- BundleId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CancelBundleTask(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CancelConversionTask() {
- svc := ec2.New(session.New())
-
- params := &ec2.CancelConversionTaskInput{
- ConversionTaskId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- ReasonMessage: aws.String("String"),
- }
- resp, err := svc.CancelConversionTask(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CancelExportTask() {
- svc := ec2.New(session.New())
-
- params := &ec2.CancelExportTaskInput{
- ExportTaskId: aws.String("String"), // Required
- }
- resp, err := svc.CancelExportTask(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CancelImportTask() {
- svc := ec2.New(session.New())
-
- params := &ec2.CancelImportTaskInput{
- CancelReason: aws.String("String"),
- DryRun: aws.Bool(true),
- ImportTaskId: aws.String("String"),
- }
- resp, err := svc.CancelImportTask(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CancelReservedInstancesListing() {
- svc := ec2.New(session.New())
-
- params := &ec2.CancelReservedInstancesListingInput{
- ReservedInstancesListingId: aws.String("String"), // Required
- }
- resp, err := svc.CancelReservedInstancesListing(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CancelSpotFleetRequests() {
- svc := ec2.New(session.New())
-
- params := &ec2.CancelSpotFleetRequestsInput{
- SpotFleetRequestIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- TerminateInstances: aws.Bool(true), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CancelSpotFleetRequests(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CancelSpotInstanceRequests() {
- svc := ec2.New(session.New())
-
- params := &ec2.CancelSpotInstanceRequestsInput{
- SpotInstanceRequestIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CancelSpotInstanceRequests(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ConfirmProductInstance() {
- svc := ec2.New(session.New())
-
- params := &ec2.ConfirmProductInstanceInput{
- InstanceId: aws.String("String"), // Required
- ProductCode: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ConfirmProductInstance(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CopyImage() {
- svc := ec2.New(session.New())
-
- params := &ec2.CopyImageInput{
- Name: aws.String("String"), // Required
- SourceImageId: aws.String("String"), // Required
- SourceRegion: aws.String("String"), // Required
- ClientToken: aws.String("String"),
- Description: aws.String("String"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CopyImage(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CopySnapshot() {
- svc := ec2.New(session.New())
-
- params := &ec2.CopySnapshotInput{
- SourceRegion: aws.String("String"), // Required
- SourceSnapshotId: aws.String("String"), // Required
- Description: aws.String("String"),
- DestinationRegion: aws.String("String"),
- DryRun: aws.Bool(true),
- Encrypted: aws.Bool(true),
- KmsKeyId: aws.String("String"),
- PresignedUrl: aws.String("String"),
- }
- resp, err := svc.CopySnapshot(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateCustomerGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateCustomerGatewayInput{
- BgpAsn: aws.Int64(1), // Required
- PublicIp: aws.String("String"), // Required
- Type: aws.String("GatewayType"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateCustomerGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateDhcpOptions() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateDhcpOptionsInput{
- DhcpConfigurations: []*ec2.NewDhcpConfiguration{ // Required
- { // Required
- Key: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateDhcpOptions(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateFlowLogs() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateFlowLogsInput{
- DeliverLogsPermissionArn: aws.String("String"), // Required
- LogGroupName: aws.String("String"), // Required
- ResourceIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- ResourceType: aws.String("FlowLogsResourceType"), // Required
- TrafficType: aws.String("TrafficType"), // Required
- ClientToken: aws.String("String"),
- }
- resp, err := svc.CreateFlowLogs(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateImage() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateImageInput{
- InstanceId: aws.String("String"), // Required
- Name: aws.String("String"), // Required
- BlockDeviceMappings: []*ec2.BlockDeviceMapping{
- { // Required
- DeviceName: aws.String("String"),
- Ebs: &ec2.EbsBlockDevice{
- DeleteOnTermination: aws.Bool(true),
- Encrypted: aws.Bool(true),
- Iops: aws.Int64(1),
- SnapshotId: aws.String("String"),
- VolumeSize: aws.Int64(1),
- VolumeType: aws.String("VolumeType"),
- },
- NoDevice: aws.String("String"),
- VirtualName: aws.String("String"),
- },
- // More values...
- },
- Description: aws.String("String"),
- DryRun: aws.Bool(true),
- NoReboot: aws.Bool(true),
- }
- resp, err := svc.CreateImage(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateInstanceExportTask() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateInstanceExportTaskInput{
- InstanceId: aws.String("String"), // Required
- Description: aws.String("String"),
- ExportToS3Task: &ec2.ExportToS3TaskSpecification{
- ContainerFormat: aws.String("ContainerFormat"),
- DiskImageFormat: aws.String("DiskImageFormat"),
- S3Bucket: aws.String("String"),
- S3Prefix: aws.String("String"),
- },
- TargetEnvironment: aws.String("ExportEnvironment"),
- }
- resp, err := svc.CreateInstanceExportTask(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateInternetGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateInternetGatewayInput{
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateInternetGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateKeyPair() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateKeyPairInput{
- KeyName: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateKeyPair(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateNetworkAcl() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateNetworkAclInput{
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateNetworkAcl(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateNetworkAclEntry() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateNetworkAclEntryInput{
- CidrBlock: aws.String("String"), // Required
- Egress: aws.Bool(true), // Required
- NetworkAclId: aws.String("String"), // Required
- Protocol: aws.String("String"), // Required
- RuleAction: aws.String("RuleAction"), // Required
- RuleNumber: aws.Int64(1), // Required
- DryRun: aws.Bool(true),
- IcmpTypeCode: &ec2.IcmpTypeCode{
- Code: aws.Int64(1),
- Type: aws.Int64(1),
- },
- PortRange: &ec2.PortRange{
- From: aws.Int64(1),
- To: aws.Int64(1),
- },
- }
- resp, err := svc.CreateNetworkAclEntry(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateNetworkInterface() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateNetworkInterfaceInput{
- SubnetId: aws.String("String"), // Required
- Description: aws.String("String"),
- DryRun: aws.Bool(true),
- Groups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- PrivateIpAddress: aws.String("String"),
- PrivateIpAddresses: []*ec2.PrivateIpAddressSpecification{
- { // Required
- PrivateIpAddress: aws.String("String"), // Required
- Primary: aws.Bool(true),
- },
- // More values...
- },
- SecondaryPrivateIpAddressCount: aws.Int64(1),
- }
- resp, err := svc.CreateNetworkInterface(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreatePlacementGroup() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreatePlacementGroupInput{
- GroupName: aws.String("String"), // Required
- Strategy: aws.String("PlacementStrategy"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreatePlacementGroup(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateReservedInstancesListing() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateReservedInstancesListingInput{
- ClientToken: aws.String("String"), // Required
- InstanceCount: aws.Int64(1), // Required
- PriceSchedules: []*ec2.PriceScheduleSpecification{ // Required
- { // Required
- CurrencyCode: aws.String("CurrencyCodeValues"),
- Price: aws.Float64(1.0),
- Term: aws.Int64(1),
- },
- // More values...
- },
- ReservedInstancesId: aws.String("String"), // Required
- }
- resp, err := svc.CreateReservedInstancesListing(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateRoute() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateRouteInput{
- DestinationCidrBlock: aws.String("String"), // Required
- RouteTableId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- GatewayId: aws.String("String"),
- InstanceId: aws.String("String"),
- NetworkInterfaceId: aws.String("String"),
- VpcPeeringConnectionId: aws.String("String"),
- }
- resp, err := svc.CreateRoute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateRouteTable() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateRouteTableInput{
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateRouteTable(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateSecurityGroup() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateSecurityGroupInput{
- Description: aws.String("String"), // Required
- GroupName: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- VpcId: aws.String("String"),
- }
- resp, err := svc.CreateSecurityGroup(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateSnapshot() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateSnapshotInput{
- VolumeId: aws.String("String"), // Required
- Description: aws.String("String"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateSnapshot(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateSpotDatafeedSubscription() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateSpotDatafeedSubscriptionInput{
- Bucket: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- Prefix: aws.String("String"),
- }
- resp, err := svc.CreateSpotDatafeedSubscription(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateSubnet() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateSubnetInput{
- CidrBlock: aws.String("String"), // Required
- VpcId: aws.String("String"), // Required
- AvailabilityZone: aws.String("String"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateSubnet(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateTags() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateTagsInput{
- Resources: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- Tags: []*ec2.Tag{ // Required
- { // Required
- Key: aws.String("String"),
- Value: aws.String("String"),
- },
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateTags(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateVolume() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateVolumeInput{
- AvailabilityZone: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- Encrypted: aws.Bool(true),
- Iops: aws.Int64(1),
- KmsKeyId: aws.String("String"),
- Size: aws.Int64(1),
- SnapshotId: aws.String("String"),
- VolumeType: aws.String("VolumeType"),
- }
- resp, err := svc.CreateVolume(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateVpc() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateVpcInput{
- CidrBlock: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- InstanceTenancy: aws.String("Tenancy"),
- }
- resp, err := svc.CreateVpc(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateVpcEndpoint() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateVpcEndpointInput{
- ServiceName: aws.String("String"), // Required
- VpcId: aws.String("String"), // Required
- ClientToken: aws.String("String"),
- DryRun: aws.Bool(true),
- PolicyDocument: aws.String("String"),
- RouteTableIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.CreateVpcEndpoint(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateVpcPeeringConnection() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateVpcPeeringConnectionInput{
- DryRun: aws.Bool(true),
- PeerOwnerId: aws.String("String"),
- PeerVpcId: aws.String("String"),
- VpcId: aws.String("String"),
- }
- resp, err := svc.CreateVpcPeeringConnection(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateVpnConnection() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateVpnConnectionInput{
- CustomerGatewayId: aws.String("String"), // Required
- Type: aws.String("String"), // Required
- VpnGatewayId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- Options: &ec2.VpnConnectionOptionsSpecification{
- StaticRoutesOnly: aws.Bool(true),
- },
- }
- resp, err := svc.CreateVpnConnection(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateVpnConnectionRoute() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateVpnConnectionRouteInput{
- DestinationCidrBlock: aws.String("String"), // Required
- VpnConnectionId: aws.String("String"), // Required
- }
- resp, err := svc.CreateVpnConnectionRoute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_CreateVpnGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.CreateVpnGatewayInput{
- Type: aws.String("GatewayType"), // Required
- AvailabilityZone: aws.String("String"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.CreateVpnGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteCustomerGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteCustomerGatewayInput{
- CustomerGatewayId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteCustomerGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteDhcpOptions() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteDhcpOptionsInput{
- DhcpOptionsId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteDhcpOptions(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteFlowLogs() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteFlowLogsInput{
- FlowLogIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DeleteFlowLogs(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteInternetGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteInternetGatewayInput{
- InternetGatewayId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteInternetGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteKeyPair() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteKeyPairInput{
- KeyName: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteKeyPair(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteNetworkAcl() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteNetworkAclInput{
- NetworkAclId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteNetworkAcl(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteNetworkAclEntry() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteNetworkAclEntryInput{
- Egress: aws.Bool(true), // Required
- NetworkAclId: aws.String("String"), // Required
- RuleNumber: aws.Int64(1), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteNetworkAclEntry(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteNetworkInterface() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteNetworkInterfaceInput{
- NetworkInterfaceId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteNetworkInterface(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeletePlacementGroup() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeletePlacementGroupInput{
- GroupName: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeletePlacementGroup(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteRoute() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteRouteInput{
- DestinationCidrBlock: aws.String("String"), // Required
- RouteTableId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteRoute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteRouteTable() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteRouteTableInput{
- RouteTableId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteRouteTable(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteSecurityGroup() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteSecurityGroupInput{
- DryRun: aws.Bool(true),
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- }
- resp, err := svc.DeleteSecurityGroup(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteSnapshot() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteSnapshotInput{
- SnapshotId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteSnapshot(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteSpotDatafeedSubscription() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteSpotDatafeedSubscriptionInput{
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteSpotDatafeedSubscription(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteSubnet() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteSubnetInput{
- SubnetId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteSubnet(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteTags() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteTagsInput{
- Resources: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- Tags: []*ec2.Tag{
- { // Required
- Key: aws.String("String"),
- Value: aws.String("String"),
- },
- // More values...
- },
- }
- resp, err := svc.DeleteTags(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteVolume() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteVolumeInput{
- VolumeId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteVolume(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteVpc() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteVpcInput{
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteVpc(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteVpcEndpoints() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteVpcEndpointsInput{
- VpcEndpointIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteVpcEndpoints(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteVpcPeeringConnection() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteVpcPeeringConnectionInput{
- VpcPeeringConnectionId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteVpcPeeringConnection(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteVpnConnection() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteVpnConnectionInput{
- VpnConnectionId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteVpnConnection(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteVpnConnectionRoute() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteVpnConnectionRouteInput{
- DestinationCidrBlock: aws.String("String"), // Required
- VpnConnectionId: aws.String("String"), // Required
- }
- resp, err := svc.DeleteVpnConnectionRoute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeleteVpnGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeleteVpnGatewayInput{
- VpnGatewayId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeleteVpnGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DeregisterImage() {
- svc := ec2.New(session.New())
-
- params := &ec2.DeregisterImageInput{
- ImageId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DeregisterImage(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeAccountAttributes() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeAccountAttributesInput{
- AttributeNames: []*string{
- aws.String("AccountAttributeName"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DescribeAccountAttributes(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeAddresses() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeAddressesInput{
- AllocationIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- PublicIps: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeAddresses(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeAvailabilityZones() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeAvailabilityZonesInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- ZoneNames: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeAvailabilityZones(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeBundleTasks() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeBundleTasksInput{
- BundleIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- }
- resp, err := svc.DescribeBundleTasks(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeClassicLinkInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeClassicLinkInstancesInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- InstanceIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeClassicLinkInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeConversionTasks() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeConversionTasksInput{
- ConversionTaskIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- }
- resp, err := svc.DescribeConversionTasks(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeCustomerGateways() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeCustomerGatewaysInput{
- CustomerGatewayIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- }
- resp, err := svc.DescribeCustomerGateways(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeDhcpOptions() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeDhcpOptionsInput{
- DhcpOptionsIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- }
- resp, err := svc.DescribeDhcpOptions(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeExportTasks() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeExportTasksInput{
- ExportTaskIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeExportTasks(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeFlowLogs() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeFlowLogsInput{
- Filter: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- FlowLogIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeFlowLogs(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeImageAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeImageAttributeInput{
- Attribute: aws.String("ImageAttributeName"), // Required
- ImageId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DescribeImageAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeImages() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeImagesInput{
- DryRun: aws.Bool(true),
- ExecutableUsers: []*string{
- aws.String("String"), // Required
- // More values...
- },
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- ImageIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- Owners: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeImages(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeImportImageTasks() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeImportImageTasksInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- ImportTaskIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeImportImageTasks(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeImportSnapshotTasks() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeImportSnapshotTasksInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- ImportTaskIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeImportSnapshotTasks(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeInstanceAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeInstanceAttributeInput{
- Attribute: aws.String("InstanceAttributeName"), // Required
- InstanceId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DescribeInstanceAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeInstanceStatus() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeInstanceStatusInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- IncludeAllInstances: aws.Bool(true),
- InstanceIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeInstanceStatus(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeInstancesInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- InstanceIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeInternetGateways() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeInternetGatewaysInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- InternetGatewayIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeInternetGateways(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeKeyPairs() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeKeyPairsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- KeyNames: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeKeyPairs(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeMovingAddresses() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeMovingAddressesInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- PublicIps: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeMovingAddresses(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeNetworkAcls() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeNetworkAclsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- NetworkAclIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeNetworkAcls(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeNetworkInterfaceAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeNetworkInterfaceAttributeInput{
- NetworkInterfaceId: aws.String("String"), // Required
- Attribute: aws.String("NetworkInterfaceAttribute"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DescribeNetworkInterfaceAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeNetworkInterfaces() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeNetworkInterfacesInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- NetworkInterfaceIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeNetworkInterfaces(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribePlacementGroups() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribePlacementGroupsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- GroupNames: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribePlacementGroups(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribePrefixLists() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribePrefixListsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- PrefixListIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribePrefixLists(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeRegions() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeRegionsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- RegionNames: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeRegions(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeReservedInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeReservedInstancesInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- OfferingType: aws.String("OfferingTypeValues"),
- ReservedInstancesIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeReservedInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeReservedInstancesListings() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeReservedInstancesListingsInput{
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- ReservedInstancesId: aws.String("String"),
- ReservedInstancesListingId: aws.String("String"),
- }
- resp, err := svc.DescribeReservedInstancesListings(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeReservedInstancesModifications() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeReservedInstancesModificationsInput{
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- NextToken: aws.String("String"),
- ReservedInstancesModificationIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeReservedInstancesModifications(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeReservedInstancesOfferings() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeReservedInstancesOfferingsInput{
- AvailabilityZone: aws.String("String"),
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- IncludeMarketplace: aws.Bool(true),
- InstanceTenancy: aws.String("Tenancy"),
- InstanceType: aws.String("InstanceType"),
- MaxDuration: aws.Int64(1),
- MaxInstanceCount: aws.Int64(1),
- MaxResults: aws.Int64(1),
- MinDuration: aws.Int64(1),
- NextToken: aws.String("String"),
- OfferingType: aws.String("OfferingTypeValues"),
- ProductDescription: aws.String("RIProductDescription"),
- ReservedInstancesOfferingIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeReservedInstancesOfferings(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeRouteTables() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeRouteTablesInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- RouteTableIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeRouteTables(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSecurityGroups() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSecurityGroupsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- GroupIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- GroupNames: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeSecurityGroups(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSnapshotAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSnapshotAttributeInput{
- Attribute: aws.String("SnapshotAttributeName"), // Required
- SnapshotId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DescribeSnapshotAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSnapshots() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSnapshotsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- OwnerIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- RestorableByUserIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- SnapshotIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeSnapshots(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSpotDatafeedSubscription() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSpotDatafeedSubscriptionInput{
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DescribeSpotDatafeedSubscription(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSpotFleetInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSpotFleetInstancesInput{
- SpotFleetRequestId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeSpotFleetInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSpotFleetRequestHistory() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSpotFleetRequestHistoryInput{
- SpotFleetRequestId: aws.String("String"), // Required
- StartTime: aws.Time(time.Now()), // Required
- DryRun: aws.Bool(true),
- EventType: aws.String("EventType"),
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeSpotFleetRequestHistory(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSpotFleetRequests() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSpotFleetRequestsInput{
- DryRun: aws.Bool(true),
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- SpotFleetRequestIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeSpotFleetRequests(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSpotInstanceRequests() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSpotInstanceRequestsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- SpotInstanceRequestIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeSpotInstanceRequests(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSpotPriceHistory() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSpotPriceHistoryInput{
- AvailabilityZone: aws.String("String"),
- DryRun: aws.Bool(true),
- EndTime: aws.Time(time.Now()),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- InstanceTypes: []*string{
- aws.String("InstanceType"), // Required
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- ProductDescriptions: []*string{
- aws.String("String"), // Required
- // More values...
- },
- StartTime: aws.Time(time.Now()),
- }
- resp, err := svc.DescribeSpotPriceHistory(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeSubnets() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeSubnetsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- SubnetIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeSubnets(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeTags() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeTagsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeTags(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVolumeAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVolumeAttributeInput{
- VolumeId: aws.String("String"), // Required
- Attribute: aws.String("VolumeAttributeName"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DescribeVolumeAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVolumeStatus() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVolumeStatusInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- VolumeIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeVolumeStatus(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVolumes() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVolumesInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- VolumeIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeVolumes(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVpcAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVpcAttributeInput{
- VpcId: aws.String("String"), // Required
- Attribute: aws.String("VpcAttributeName"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DescribeVpcAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVpcClassicLink() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVpcClassicLinkInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- VpcIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeVpcClassicLink(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVpcEndpointServices() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVpcEndpointServicesInput{
- DryRun: aws.Bool(true),
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- }
- resp, err := svc.DescribeVpcEndpointServices(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVpcEndpoints() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVpcEndpointsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- MaxResults: aws.Int64(1),
- NextToken: aws.String("String"),
- VpcEndpointIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeVpcEndpoints(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVpcPeeringConnections() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVpcPeeringConnectionsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- VpcPeeringConnectionIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeVpcPeeringConnections(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVpcs() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVpcsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- VpcIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeVpcs(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVpnConnections() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVpnConnectionsInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- VpnConnectionIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeVpnConnections(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DescribeVpnGateways() {
- svc := ec2.New(session.New())
-
- params := &ec2.DescribeVpnGatewaysInput{
- DryRun: aws.Bool(true),
- Filters: []*ec2.Filter{
- { // Required
- Name: aws.String("String"),
- Values: []*string{
- aws.String("String"), // Required
- // More values...
- },
- },
- // More values...
- },
- VpnGatewayIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.DescribeVpnGateways(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DetachClassicLinkVpc() {
- svc := ec2.New(session.New())
-
- params := &ec2.DetachClassicLinkVpcInput{
- InstanceId: aws.String("String"), // Required
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DetachClassicLinkVpc(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DetachInternetGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.DetachInternetGatewayInput{
- InternetGatewayId: aws.String("String"), // Required
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DetachInternetGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DetachNetworkInterface() {
- svc := ec2.New(session.New())
-
- params := &ec2.DetachNetworkInterfaceInput{
- AttachmentId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- Force: aws.Bool(true),
- }
- resp, err := svc.DetachNetworkInterface(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DetachVolume() {
- svc := ec2.New(session.New())
-
- params := &ec2.DetachVolumeInput{
- VolumeId: aws.String("String"), // Required
- Device: aws.String("String"),
- DryRun: aws.Bool(true),
- Force: aws.Bool(true),
- InstanceId: aws.String("String"),
- }
- resp, err := svc.DetachVolume(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DetachVpnGateway() {
- svc := ec2.New(session.New())
-
- params := &ec2.DetachVpnGatewayInput{
- VpcId: aws.String("String"), // Required
- VpnGatewayId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DetachVpnGateway(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DisableVgwRoutePropagation() {
- svc := ec2.New(session.New())
-
- params := &ec2.DisableVgwRoutePropagationInput{
- GatewayId: aws.String("String"), // Required
- RouteTableId: aws.String("String"), // Required
- }
- resp, err := svc.DisableVgwRoutePropagation(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DisableVpcClassicLink() {
- svc := ec2.New(session.New())
-
- params := &ec2.DisableVpcClassicLinkInput{
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DisableVpcClassicLink(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DisassociateAddress() {
- svc := ec2.New(session.New())
-
- params := &ec2.DisassociateAddressInput{
- AssociationId: aws.String("String"),
- DryRun: aws.Bool(true),
- PublicIp: aws.String("String"),
- }
- resp, err := svc.DisassociateAddress(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_DisassociateRouteTable() {
- svc := ec2.New(session.New())
-
- params := &ec2.DisassociateRouteTableInput{
- AssociationId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.DisassociateRouteTable(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_EnableVgwRoutePropagation() {
- svc := ec2.New(session.New())
-
- params := &ec2.EnableVgwRoutePropagationInput{
- GatewayId: aws.String("String"), // Required
- RouteTableId: aws.String("String"), // Required
- }
- resp, err := svc.EnableVgwRoutePropagation(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_EnableVolumeIO() {
- svc := ec2.New(session.New())
-
- params := &ec2.EnableVolumeIOInput{
- VolumeId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.EnableVolumeIO(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_EnableVpcClassicLink() {
- svc := ec2.New(session.New())
-
- params := &ec2.EnableVpcClassicLinkInput{
- VpcId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.EnableVpcClassicLink(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_GetConsoleOutput() {
- svc := ec2.New(session.New())
-
- params := &ec2.GetConsoleOutputInput{
- InstanceId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.GetConsoleOutput(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_GetPasswordData() {
- svc := ec2.New(session.New())
-
- params := &ec2.GetPasswordDataInput{
- InstanceId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.GetPasswordData(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ImportImage() {
- svc := ec2.New(session.New())
-
- params := &ec2.ImportImageInput{
- Architecture: aws.String("String"),
- ClientData: &ec2.ClientData{
- Comment: aws.String("String"),
- UploadEnd: aws.Time(time.Now()),
- UploadSize: aws.Float64(1.0),
- UploadStart: aws.Time(time.Now()),
- },
- ClientToken: aws.String("String"),
- Description: aws.String("String"),
- DiskContainers: []*ec2.ImageDiskContainer{
- { // Required
- Description: aws.String("String"),
- DeviceName: aws.String("String"),
- Format: aws.String("String"),
- SnapshotId: aws.String("String"),
- Url: aws.String("String"),
- UserBucket: &ec2.UserBucket{
- S3Bucket: aws.String("String"),
- S3Key: aws.String("String"),
- },
- },
- // More values...
- },
- DryRun: aws.Bool(true),
- Hypervisor: aws.String("String"),
- LicenseType: aws.String("String"),
- Platform: aws.String("String"),
- RoleName: aws.String("String"),
- }
- resp, err := svc.ImportImage(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ImportInstance() {
- svc := ec2.New(session.New())
-
- params := &ec2.ImportInstanceInput{
- Platform: aws.String("PlatformValues"), // Required
- Description: aws.String("String"),
- DiskImages: []*ec2.DiskImage{
- { // Required
- Description: aws.String("String"),
- Image: &ec2.DiskImageDetail{
- Bytes: aws.Int64(1), // Required
- Format: aws.String("DiskImageFormat"), // Required
- ImportManifestUrl: aws.String("String"), // Required
- },
- Volume: &ec2.VolumeDetail{
- Size: aws.Int64(1), // Required
- },
- },
- // More values...
- },
- DryRun: aws.Bool(true),
- LaunchSpecification: &ec2.ImportInstanceLaunchSpecification{
- AdditionalInfo: aws.String("String"),
- Architecture: aws.String("ArchitectureValues"),
- GroupIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- GroupNames: []*string{
- aws.String("String"), // Required
- // More values...
- },
- InstanceInitiatedShutdownBehavior: aws.String("ShutdownBehavior"),
- InstanceType: aws.String("InstanceType"),
- Monitoring: aws.Bool(true),
- Placement: &ec2.Placement{
- AvailabilityZone: aws.String("String"),
- GroupName: aws.String("String"),
- Tenancy: aws.String("Tenancy"),
- },
- PrivateIpAddress: aws.String("String"),
- SubnetId: aws.String("String"),
- UserData: &ec2.UserData{
- Data: aws.String("String"),
- },
- },
- }
- resp, err := svc.ImportInstance(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ImportKeyPair() {
- svc := ec2.New(session.New())
-
- params := &ec2.ImportKeyPairInput{
- KeyName: aws.String("String"), // Required
- PublicKeyMaterial: []byte("PAYLOAD"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ImportKeyPair(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ImportSnapshot() {
- svc := ec2.New(session.New())
-
- params := &ec2.ImportSnapshotInput{
- ClientData: &ec2.ClientData{
- Comment: aws.String("String"),
- UploadEnd: aws.Time(time.Now()),
- UploadSize: aws.Float64(1.0),
- UploadStart: aws.Time(time.Now()),
- },
- ClientToken: aws.String("String"),
- Description: aws.String("String"),
- DiskContainer: &ec2.SnapshotDiskContainer{
- Description: aws.String("String"),
- Format: aws.String("String"),
- Url: aws.String("String"),
- UserBucket: &ec2.UserBucket{
- S3Bucket: aws.String("String"),
- S3Key: aws.String("String"),
- },
- },
- DryRun: aws.Bool(true),
- RoleName: aws.String("String"),
- }
- resp, err := svc.ImportSnapshot(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ImportVolume() {
- svc := ec2.New(session.New())
-
- params := &ec2.ImportVolumeInput{
- AvailabilityZone: aws.String("String"), // Required
- Image: &ec2.DiskImageDetail{ // Required
- Bytes: aws.Int64(1), // Required
- Format: aws.String("DiskImageFormat"), // Required
- ImportManifestUrl: aws.String("String"), // Required
- },
- Volume: &ec2.VolumeDetail{ // Required
- Size: aws.Int64(1), // Required
- },
- Description: aws.String("String"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ImportVolume(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifyImageAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifyImageAttributeInput{
- ImageId: aws.String("String"), // Required
- Attribute: aws.String("String"),
- Description: &ec2.AttributeValue{
- Value: aws.String("String"),
- },
- DryRun: aws.Bool(true),
- LaunchPermission: &ec2.LaunchPermissionModifications{
- Add: []*ec2.LaunchPermission{
- { // Required
- Group: aws.String("PermissionGroup"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- Remove: []*ec2.LaunchPermission{
- { // Required
- Group: aws.String("PermissionGroup"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- },
- OperationType: aws.String("OperationType"),
- ProductCodes: []*string{
- aws.String("String"), // Required
- // More values...
- },
- UserGroups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- UserIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- Value: aws.String("String"),
- }
- resp, err := svc.ModifyImageAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifyInstanceAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifyInstanceAttributeInput{
- InstanceId: aws.String("String"), // Required
- Attribute: aws.String("InstanceAttributeName"),
- BlockDeviceMappings: []*ec2.InstanceBlockDeviceMappingSpecification{
- { // Required
- DeviceName: aws.String("String"),
- Ebs: &ec2.EbsInstanceBlockDeviceSpecification{
- DeleteOnTermination: aws.Bool(true),
- VolumeId: aws.String("String"),
- },
- NoDevice: aws.String("String"),
- VirtualName: aws.String("String"),
- },
- // More values...
- },
- DisableApiTermination: &ec2.AttributeBooleanValue{
- Value: aws.Bool(true),
- },
- DryRun: aws.Bool(true),
- EbsOptimized: &ec2.AttributeBooleanValue{
- Value: aws.Bool(true),
- },
- Groups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- InstanceInitiatedShutdownBehavior: &ec2.AttributeValue{
- Value: aws.String("String"),
- },
- InstanceType: &ec2.AttributeValue{
- Value: aws.String("String"),
- },
- Kernel: &ec2.AttributeValue{
- Value: aws.String("String"),
- },
- Ramdisk: &ec2.AttributeValue{
- Value: aws.String("String"),
- },
- SourceDestCheck: &ec2.AttributeBooleanValue{
- Value: aws.Bool(true),
- },
- SriovNetSupport: &ec2.AttributeValue{
- Value: aws.String("String"),
- },
- UserData: &ec2.BlobAttributeValue{
- Value: []byte("PAYLOAD"),
- },
- Value: aws.String("String"),
- }
- resp, err := svc.ModifyInstanceAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifyNetworkInterfaceAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifyNetworkInterfaceAttributeInput{
- NetworkInterfaceId: aws.String("String"), // Required
- Attachment: &ec2.NetworkInterfaceAttachmentChanges{
- AttachmentId: aws.String("String"),
- DeleteOnTermination: aws.Bool(true),
- },
- Description: &ec2.AttributeValue{
- Value: aws.String("String"),
- },
- DryRun: aws.Bool(true),
- Groups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- SourceDestCheck: &ec2.AttributeBooleanValue{
- Value: aws.Bool(true),
- },
- }
- resp, err := svc.ModifyNetworkInterfaceAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifyReservedInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifyReservedInstancesInput{
- ReservedInstancesIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- TargetConfigurations: []*ec2.ReservedInstancesConfiguration{ // Required
- { // Required
- AvailabilityZone: aws.String("String"),
- InstanceCount: aws.Int64(1),
- InstanceType: aws.String("InstanceType"),
- Platform: aws.String("String"),
- },
- // More values...
- },
- ClientToken: aws.String("String"),
- }
- resp, err := svc.ModifyReservedInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifySnapshotAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifySnapshotAttributeInput{
- SnapshotId: aws.String("String"), // Required
- Attribute: aws.String("SnapshotAttributeName"),
- CreateVolumePermission: &ec2.CreateVolumePermissionModifications{
- Add: []*ec2.CreateVolumePermission{
- { // Required
- Group: aws.String("PermissionGroup"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- Remove: []*ec2.CreateVolumePermission{
- { // Required
- Group: aws.String("PermissionGroup"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- },
- DryRun: aws.Bool(true),
- GroupNames: []*string{
- aws.String("String"), // Required
- // More values...
- },
- OperationType: aws.String("OperationType"),
- UserIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.ModifySnapshotAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifySpotFleetRequest() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifySpotFleetRequestInput{
- SpotFleetRequestId: aws.String("String"), // Required
- ExcessCapacityTerminationPolicy: aws.String("ExcessCapacityTerminationPolicy"),
- TargetCapacity: aws.Int64(1),
- }
- resp, err := svc.ModifySpotFleetRequest(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifySubnetAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifySubnetAttributeInput{
- SubnetId: aws.String("String"), // Required
- MapPublicIpOnLaunch: &ec2.AttributeBooleanValue{
- Value: aws.Bool(true),
- },
- }
- resp, err := svc.ModifySubnetAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifyVolumeAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifyVolumeAttributeInput{
- VolumeId: aws.String("String"), // Required
- AutoEnableIO: &ec2.AttributeBooleanValue{
- Value: aws.Bool(true),
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ModifyVolumeAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifyVpcAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifyVpcAttributeInput{
- VpcId: aws.String("String"), // Required
- EnableDnsHostnames: &ec2.AttributeBooleanValue{
- Value: aws.Bool(true),
- },
- EnableDnsSupport: &ec2.AttributeBooleanValue{
- Value: aws.Bool(true),
- },
- }
- resp, err := svc.ModifyVpcAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ModifyVpcEndpoint() {
- svc := ec2.New(session.New())
-
- params := &ec2.ModifyVpcEndpointInput{
- VpcEndpointId: aws.String("String"), // Required
- AddRouteTableIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- PolicyDocument: aws.String("String"),
- RemoveRouteTableIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- ResetPolicy: aws.Bool(true),
- }
- resp, err := svc.ModifyVpcEndpoint(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_MonitorInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.MonitorInstancesInput{
- InstanceIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.MonitorInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_MoveAddressToVpc() {
- svc := ec2.New(session.New())
-
- params := &ec2.MoveAddressToVpcInput{
- PublicIp: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.MoveAddressToVpc(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_PurchaseReservedInstancesOffering() {
- svc := ec2.New(session.New())
-
- params := &ec2.PurchaseReservedInstancesOfferingInput{
- InstanceCount: aws.Int64(1), // Required
- ReservedInstancesOfferingId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- LimitPrice: &ec2.ReservedInstanceLimitPrice{
- Amount: aws.Float64(1.0),
- CurrencyCode: aws.String("CurrencyCodeValues"),
- },
- }
- resp, err := svc.PurchaseReservedInstancesOffering(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RebootInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.RebootInstancesInput{
- InstanceIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.RebootInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RegisterImage() {
- svc := ec2.New(session.New())
-
- params := &ec2.RegisterImageInput{
- Name: aws.String("String"), // Required
- Architecture: aws.String("ArchitectureValues"),
- BlockDeviceMappings: []*ec2.BlockDeviceMapping{
- { // Required
- DeviceName: aws.String("String"),
- Ebs: &ec2.EbsBlockDevice{
- DeleteOnTermination: aws.Bool(true),
- Encrypted: aws.Bool(true),
- Iops: aws.Int64(1),
- SnapshotId: aws.String("String"),
- VolumeSize: aws.Int64(1),
- VolumeType: aws.String("VolumeType"),
- },
- NoDevice: aws.String("String"),
- VirtualName: aws.String("String"),
- },
- // More values...
- },
- Description: aws.String("String"),
- DryRun: aws.Bool(true),
- ImageLocation: aws.String("String"),
- KernelId: aws.String("String"),
- RamdiskId: aws.String("String"),
- RootDeviceName: aws.String("String"),
- SriovNetSupport: aws.String("String"),
- VirtualizationType: aws.String("String"),
- }
- resp, err := svc.RegisterImage(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RejectVpcPeeringConnection() {
- svc := ec2.New(session.New())
-
- params := &ec2.RejectVpcPeeringConnectionInput{
- VpcPeeringConnectionId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.RejectVpcPeeringConnection(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ReleaseAddress() {
- svc := ec2.New(session.New())
-
- params := &ec2.ReleaseAddressInput{
- AllocationId: aws.String("String"),
- DryRun: aws.Bool(true),
- PublicIp: aws.String("String"),
- }
- resp, err := svc.ReleaseAddress(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ReplaceNetworkAclAssociation() {
- svc := ec2.New(session.New())
-
- params := &ec2.ReplaceNetworkAclAssociationInput{
- AssociationId: aws.String("String"), // Required
- NetworkAclId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ReplaceNetworkAclAssociation(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ReplaceNetworkAclEntry() {
- svc := ec2.New(session.New())
-
- params := &ec2.ReplaceNetworkAclEntryInput{
- CidrBlock: aws.String("String"), // Required
- Egress: aws.Bool(true), // Required
- NetworkAclId: aws.String("String"), // Required
- Protocol: aws.String("String"), // Required
- RuleAction: aws.String("RuleAction"), // Required
- RuleNumber: aws.Int64(1), // Required
- DryRun: aws.Bool(true),
- IcmpTypeCode: &ec2.IcmpTypeCode{
- Code: aws.Int64(1),
- Type: aws.Int64(1),
- },
- PortRange: &ec2.PortRange{
- From: aws.Int64(1),
- To: aws.Int64(1),
- },
- }
- resp, err := svc.ReplaceNetworkAclEntry(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ReplaceRoute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ReplaceRouteInput{
- DestinationCidrBlock: aws.String("String"), // Required
- RouteTableId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- GatewayId: aws.String("String"),
- InstanceId: aws.String("String"),
- NetworkInterfaceId: aws.String("String"),
- VpcPeeringConnectionId: aws.String("String"),
- }
- resp, err := svc.ReplaceRoute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ReplaceRouteTableAssociation() {
- svc := ec2.New(session.New())
-
- params := &ec2.ReplaceRouteTableAssociationInput{
- AssociationId: aws.String("String"), // Required
- RouteTableId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ReplaceRouteTableAssociation(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ReportInstanceStatus() {
- svc := ec2.New(session.New())
-
- params := &ec2.ReportInstanceStatusInput{
- Instances: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- ReasonCodes: []*string{ // Required
- aws.String("ReportInstanceReasonCodes"), // Required
- // More values...
- },
- Status: aws.String("ReportStatusType"), // Required
- Description: aws.String("String"),
- DryRun: aws.Bool(true),
- EndTime: aws.Time(time.Now()),
- StartTime: aws.Time(time.Now()),
- }
- resp, err := svc.ReportInstanceStatus(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RequestSpotFleet() {
- svc := ec2.New(session.New())
-
- params := &ec2.RequestSpotFleetInput{
- SpotFleetRequestConfig: &ec2.SpotFleetRequestConfigData{ // Required
- IamFleetRole: aws.String("String"), // Required
- LaunchSpecifications: []*ec2.SpotFleetLaunchSpecification{ // Required
- { // Required
- AddressingType: aws.String("String"),
- BlockDeviceMappings: []*ec2.BlockDeviceMapping{
- { // Required
- DeviceName: aws.String("String"),
- Ebs: &ec2.EbsBlockDevice{
- DeleteOnTermination: aws.Bool(true),
- Encrypted: aws.Bool(true),
- Iops: aws.Int64(1),
- SnapshotId: aws.String("String"),
- VolumeSize: aws.Int64(1),
- VolumeType: aws.String("VolumeType"),
- },
- NoDevice: aws.String("String"),
- VirtualName: aws.String("String"),
- },
- // More values...
- },
- EbsOptimized: aws.Bool(true),
- IamInstanceProfile: &ec2.IamInstanceProfileSpecification{
- Arn: aws.String("String"),
- Name: aws.String("String"),
- },
- ImageId: aws.String("String"),
- InstanceType: aws.String("InstanceType"),
- KernelId: aws.String("String"),
- KeyName: aws.String("String"),
- Monitoring: &ec2.SpotFleetMonitoring{
- Enabled: aws.Bool(true),
- },
- NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{
- { // Required
- AssociatePublicIpAddress: aws.Bool(true),
- DeleteOnTermination: aws.Bool(true),
- Description: aws.String("String"),
- DeviceIndex: aws.Int64(1),
- Groups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- NetworkInterfaceId: aws.String("String"),
- PrivateIpAddress: aws.String("String"),
- PrivateIpAddresses: []*ec2.PrivateIpAddressSpecification{
- { // Required
- PrivateIpAddress: aws.String("String"), // Required
- Primary: aws.Bool(true),
- },
- // More values...
- },
- SecondaryPrivateIpAddressCount: aws.Int64(1),
- SubnetId: aws.String("String"),
- },
- // More values...
- },
- Placement: &ec2.SpotPlacement{
- AvailabilityZone: aws.String("String"),
- GroupName: aws.String("String"),
- },
- RamdiskId: aws.String("String"),
- SecurityGroups: []*ec2.GroupIdentifier{
- { // Required
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- },
- // More values...
- },
- SpotPrice: aws.String("String"),
- SubnetId: aws.String("String"),
- UserData: aws.String("String"),
- WeightedCapacity: aws.Float64(1.0),
- },
- // More values...
- },
- SpotPrice: aws.String("String"), // Required
- TargetCapacity: aws.Int64(1), // Required
- AllocationStrategy: aws.String("AllocationStrategy"),
- ClientToken: aws.String("String"),
- ExcessCapacityTerminationPolicy: aws.String("ExcessCapacityTerminationPolicy"),
- TerminateInstancesWithExpiration: aws.Bool(true),
- ValidFrom: aws.Time(time.Now()),
- ValidUntil: aws.Time(time.Now()),
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.RequestSpotFleet(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RequestSpotInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.RequestSpotInstancesInput{
- SpotPrice: aws.String("String"), // Required
- AvailabilityZoneGroup: aws.String("String"),
- BlockDurationMinutes: aws.Int64(1),
- ClientToken: aws.String("String"),
- DryRun: aws.Bool(true),
- InstanceCount: aws.Int64(1),
- LaunchGroup: aws.String("String"),
- LaunchSpecification: &ec2.RequestSpotLaunchSpecification{
- AddressingType: aws.String("String"),
- BlockDeviceMappings: []*ec2.BlockDeviceMapping{
- { // Required
- DeviceName: aws.String("String"),
- Ebs: &ec2.EbsBlockDevice{
- DeleteOnTermination: aws.Bool(true),
- Encrypted: aws.Bool(true),
- Iops: aws.Int64(1),
- SnapshotId: aws.String("String"),
- VolumeSize: aws.Int64(1),
- VolumeType: aws.String("VolumeType"),
- },
- NoDevice: aws.String("String"),
- VirtualName: aws.String("String"),
- },
- // More values...
- },
- EbsOptimized: aws.Bool(true),
- IamInstanceProfile: &ec2.IamInstanceProfileSpecification{
- Arn: aws.String("String"),
- Name: aws.String("String"),
- },
- ImageId: aws.String("String"),
- InstanceType: aws.String("InstanceType"),
- KernelId: aws.String("String"),
- KeyName: aws.String("String"),
- Monitoring: &ec2.RunInstancesMonitoringEnabled{
- Enabled: aws.Bool(true), // Required
- },
- NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{
- { // Required
- AssociatePublicIpAddress: aws.Bool(true),
- DeleteOnTermination: aws.Bool(true),
- Description: aws.String("String"),
- DeviceIndex: aws.Int64(1),
- Groups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- NetworkInterfaceId: aws.String("String"),
- PrivateIpAddress: aws.String("String"),
- PrivateIpAddresses: []*ec2.PrivateIpAddressSpecification{
- { // Required
- PrivateIpAddress: aws.String("String"), // Required
- Primary: aws.Bool(true),
- },
- // More values...
- },
- SecondaryPrivateIpAddressCount: aws.Int64(1),
- SubnetId: aws.String("String"),
- },
- // More values...
- },
- Placement: &ec2.SpotPlacement{
- AvailabilityZone: aws.String("String"),
- GroupName: aws.String("String"),
- },
- RamdiskId: aws.String("String"),
- SecurityGroupIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- SecurityGroups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- SubnetId: aws.String("String"),
- UserData: aws.String("String"),
- },
- Type: aws.String("SpotInstanceType"),
- ValidFrom: aws.Time(time.Now()),
- ValidUntil: aws.Time(time.Now()),
- }
- resp, err := svc.RequestSpotInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ResetImageAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ResetImageAttributeInput{
- Attribute: aws.String("ResetImageAttributeName"), // Required
- ImageId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ResetImageAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ResetInstanceAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ResetInstanceAttributeInput{
- Attribute: aws.String("InstanceAttributeName"), // Required
- InstanceId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ResetInstanceAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ResetNetworkInterfaceAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ResetNetworkInterfaceAttributeInput{
- NetworkInterfaceId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- SourceDestCheck: aws.String("String"),
- }
- resp, err := svc.ResetNetworkInterfaceAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_ResetSnapshotAttribute() {
- svc := ec2.New(session.New())
-
- params := &ec2.ResetSnapshotAttributeInput{
- Attribute: aws.String("SnapshotAttributeName"), // Required
- SnapshotId: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.ResetSnapshotAttribute(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RestoreAddressToClassic() {
- svc := ec2.New(session.New())
-
- params := &ec2.RestoreAddressToClassicInput{
- PublicIp: aws.String("String"), // Required
- DryRun: aws.Bool(true),
- }
- resp, err := svc.RestoreAddressToClassic(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RevokeSecurityGroupEgress() {
- svc := ec2.New(session.New())
-
- params := &ec2.RevokeSecurityGroupEgressInput{
- GroupId: aws.String("String"), // Required
- CidrIp: aws.String("String"),
- DryRun: aws.Bool(true),
- FromPort: aws.Int64(1),
- IpPermissions: []*ec2.IpPermission{
- { // Required
- FromPort: aws.Int64(1),
- IpProtocol: aws.String("String"),
- IpRanges: []*ec2.IpRange{
- { // Required
- CidrIp: aws.String("String"),
- },
- // More values...
- },
- PrefixListIds: []*ec2.PrefixListId{
- { // Required
- PrefixListId: aws.String("String"),
- },
- // More values...
- },
- ToPort: aws.Int64(1),
- UserIdGroupPairs: []*ec2.UserIdGroupPair{
- { // Required
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- },
- // More values...
- },
- IpProtocol: aws.String("String"),
- SourceSecurityGroupName: aws.String("String"),
- SourceSecurityGroupOwnerId: aws.String("String"),
- ToPort: aws.Int64(1),
- }
- resp, err := svc.RevokeSecurityGroupEgress(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RevokeSecurityGroupIngress() {
- svc := ec2.New(session.New())
-
- params := &ec2.RevokeSecurityGroupIngressInput{
- CidrIp: aws.String("String"),
- DryRun: aws.Bool(true),
- FromPort: aws.Int64(1),
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- IpPermissions: []*ec2.IpPermission{
- { // Required
- FromPort: aws.Int64(1),
- IpProtocol: aws.String("String"),
- IpRanges: []*ec2.IpRange{
- { // Required
- CidrIp: aws.String("String"),
- },
- // More values...
- },
- PrefixListIds: []*ec2.PrefixListId{
- { // Required
- PrefixListId: aws.String("String"),
- },
- // More values...
- },
- ToPort: aws.Int64(1),
- UserIdGroupPairs: []*ec2.UserIdGroupPair{
- { // Required
- GroupId: aws.String("String"),
- GroupName: aws.String("String"),
- UserId: aws.String("String"),
- },
- // More values...
- },
- },
- // More values...
- },
- IpProtocol: aws.String("String"),
- SourceSecurityGroupName: aws.String("String"),
- SourceSecurityGroupOwnerId: aws.String("String"),
- ToPort: aws.Int64(1),
- }
- resp, err := svc.RevokeSecurityGroupIngress(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_RunInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.RunInstancesInput{
- ImageId: aws.String("String"), // Required
- MaxCount: aws.Int64(1), // Required
- MinCount: aws.Int64(1), // Required
- AdditionalInfo: aws.String("String"),
- BlockDeviceMappings: []*ec2.BlockDeviceMapping{
- { // Required
- DeviceName: aws.String("String"),
- Ebs: &ec2.EbsBlockDevice{
- DeleteOnTermination: aws.Bool(true),
- Encrypted: aws.Bool(true),
- Iops: aws.Int64(1),
- SnapshotId: aws.String("String"),
- VolumeSize: aws.Int64(1),
- VolumeType: aws.String("VolumeType"),
- },
- NoDevice: aws.String("String"),
- VirtualName: aws.String("String"),
- },
- // More values...
- },
- ClientToken: aws.String("String"),
- DisableApiTermination: aws.Bool(true),
- DryRun: aws.Bool(true),
- EbsOptimized: aws.Bool(true),
- IamInstanceProfile: &ec2.IamInstanceProfileSpecification{
- Arn: aws.String("String"),
- Name: aws.String("String"),
- },
- InstanceInitiatedShutdownBehavior: aws.String("ShutdownBehavior"),
- InstanceType: aws.String("InstanceType"),
- KernelId: aws.String("String"),
- KeyName: aws.String("String"),
- Monitoring: &ec2.RunInstancesMonitoringEnabled{
- Enabled: aws.Bool(true), // Required
- },
- NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{
- { // Required
- AssociatePublicIpAddress: aws.Bool(true),
- DeleteOnTermination: aws.Bool(true),
- Description: aws.String("String"),
- DeviceIndex: aws.Int64(1),
- Groups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- NetworkInterfaceId: aws.String("String"),
- PrivateIpAddress: aws.String("String"),
- PrivateIpAddresses: []*ec2.PrivateIpAddressSpecification{
- { // Required
- PrivateIpAddress: aws.String("String"), // Required
- Primary: aws.Bool(true),
- },
- // More values...
- },
- SecondaryPrivateIpAddressCount: aws.Int64(1),
- SubnetId: aws.String("String"),
- },
- // More values...
- },
- Placement: &ec2.Placement{
- AvailabilityZone: aws.String("String"),
- GroupName: aws.String("String"),
- Tenancy: aws.String("Tenancy"),
- },
- PrivateIpAddress: aws.String("String"),
- RamdiskId: aws.String("String"),
- SecurityGroupIds: []*string{
- aws.String("String"), // Required
- // More values...
- },
- SecurityGroups: []*string{
- aws.String("String"), // Required
- // More values...
- },
- SubnetId: aws.String("String"),
- UserData: aws.String("String"),
- }
- resp, err := svc.RunInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_StartInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.StartInstancesInput{
- InstanceIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- AdditionalInfo: aws.String("String"),
- DryRun: aws.Bool(true),
- }
- resp, err := svc.StartInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_StopInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.StopInstancesInput{
- InstanceIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- Force: aws.Bool(true),
- }
- resp, err := svc.StopInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_TerminateInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.TerminateInstancesInput{
- InstanceIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.TerminateInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_UnassignPrivateIpAddresses() {
- svc := ec2.New(session.New())
-
- params := &ec2.UnassignPrivateIpAddressesInput{
- NetworkInterfaceId: aws.String("String"), // Required
- PrivateIpAddresses: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- }
- resp, err := svc.UnassignPrivateIpAddresses(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-
-func ExampleEC2_UnmonitorInstances() {
- svc := ec2.New(session.New())
-
- params := &ec2.UnmonitorInstancesInput{
- InstanceIds: []*string{ // Required
- aws.String("String"), // Required
- // More values...
- },
- DryRun: aws.Bool(true),
- }
- resp, err := svc.UnmonitorInstances(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
diff --git a/Godeps/_workspace/src/github.com/franela/goreq/.gitignore b/Godeps/_workspace/src/github.com/franela/goreq/.gitignore
deleted file mode 100644
index 131fc16fbbc..00000000000
--- a/Godeps/_workspace/src/github.com/franela/goreq/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-
-src
diff --git a/Godeps/_workspace/src/github.com/franela/goreq/.travis.yml b/Godeps/_workspace/src/github.com/franela/goreq/.travis.yml
deleted file mode 100644
index d5041b4961f..00000000000
--- a/Godeps/_workspace/src/github.com/franela/goreq/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: go
-go:
- - 1.5.3
- - tip
-notifications:
- email:
- - ionathan@gmail.com
- - marcosnils@gmail.com
diff --git a/Godeps/_workspace/src/github.com/franela/goreq/Makefile b/Godeps/_workspace/src/github.com/franela/goreq/Makefile
deleted file mode 100644
index 0f04d6572df..00000000000
--- a/Godeps/_workspace/src/github.com/franela/goreq/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-test:
- go get -v -d -t ./...
- go test -v
diff --git a/Godeps/_workspace/src/github.com/franela/goreq/README.md b/Godeps/_workspace/src/github.com/franela/goreq/README.md
deleted file mode 100644
index b6a0bfd2e1f..00000000000
--- a/Godeps/_workspace/src/github.com/franela/goreq/README.md
+++ /dev/null
@@ -1,444 +0,0 @@
-[](https://travis-ci.org/franela/goreq)
-[](https://godoc.org/github.com/franela/goreq)
-
-GoReq
-=======
-
-Simple and sane HTTP request library for Go language.
-
-
-
-**Table of Contents**
-
-- [Why GoReq?](#user-content-why-goreq)
-- [How do I install it?](#user-content-how-do-i-install-it)
-- [What can I do with it?](#user-content-what-can-i-do-with-it)
- - [Making requests with different methods](#user-content-making-requests-with-different-methods)
- - [GET](#user-content-get)
- - [Tags](#user-content-tags)
- - [POST](#user-content-post)
- - [Sending payloads in the Body](#user-content-sending-payloads-in-the-body)
- - [Specifiying request headers](#user-content-specifiying-request-headers)
- - [Sending Cookies](#cookie-support)
- - [Setting timeouts](#user-content-setting-timeouts)
- - [Using the Response and Error](#user-content-using-the-response-and-error)
- - [Receiving JSON](#user-content-receiving-json)
- - [Sending/Receiving Compressed Payloads](#user-content-sendingreceiving-compressed-payloads)
- - [Using gzip compression:](#user-content-using-gzip-compression)
- - [Using deflate compression:](#user-content-using-deflate-compression)
- - [Using compressed responses:](#user-content-using-compressed-responses)
- - [Proxy](#proxy)
- - [Debugging requests](#debug)
- - [Getting raw Request & Response](#getting-raw-request--response)
- - [TODO:](#user-content-todo)
-
-
-
-Why GoReq?
-==========
-
-Go has very nice native libraries that allows you to do lots of cool things. But sometimes those libraries are too low level, which means that to do a simple thing, like an HTTP Request, it takes some time. And if you want to do something as simple as adding a timeout to a request, you will end up writing several lines of code.
-
-This is why we think GoReq is useful. Because you can do all your HTTP requests in a very simple and comprehensive way, while enabling you to do more advanced stuff by giving you access to the native API.
-
-How do I install it?
-====================
-
-```bash
-go get github.com/franela/goreq
-```
-
-What can I do with it?
-======================
-
-## Making requests with different methods
-
-#### GET
-```go
-res, err := goreq.Request{ Uri: "http://www.google.com" }.Do()
-```
-
-GoReq default method is GET.
-
-You can also set value to GET method easily
-
-```go
-type Item struct {
- Limit int
- Skip int
- Fields string
-}
-
-item := Item {
- Limit: 3,
- Skip: 5,
- Fields: "Value",
-}
-
-res, err := goreq.Request{
- Uri: "http://localhost:3000/",
- QueryString: item,
-}.Do()
-```
-The sample above will send `http://localhost:3000/?limit=3&skip=5&fields=Value`
-
-Alternatively the `url` tag can be used in struct fields to customize encoding properties
-
-```go
-type Item struct {
- TheLimit int `url:"the_limit"`
- TheSkip string `url:"the_skip,omitempty"`
- TheFields string `url:"-"`
-}
-
-item := Item {
- TheLimit: 3,
- TheSkip: "",
- TheFields: "Value",
-}
-
-res, err := goreq.Request{
- Uri: "http://localhost:3000/",
- QueryString: item,
-}.Do()
-```
-The sample above will send `http://localhost:3000/?the_limit=3`
-
-
-QueryString also support url.Values
-
-```go
-item := url.Values{}
-item.Set("Limit", 3)
-item.Add("Field", "somefield")
-item.Add("Field", "someotherfield")
-
-res, err := goreq.Request{
- Uri: "http://localhost:3000/",
- QueryString: item,
-}.Do()
-```
-
-The sample above will send `http://localhost:3000/?limit=3&field=somefield&field=someotherfield`
-
-### Tags
-
-Struct field `url` tag is mainly used as the request parameter name.
-Tags can be comma separated multiple values, 1st value is for naming and rest has special meanings.
-
-- special tag for 1st value
- - `-`: value is ignored if set this
-
-- special tag for rest 2nd value
- - `omitempty`: zero-value is ignored if set this
- - `squash`: the fields of embedded struct is used for parameter
-
-#### Tag Examples
-
-```go
-type Place struct {
- Country string `url:"country"`
- City string `url:"city"`
- ZipCode string `url:"zipcode,omitempty"`
-}
-
-type Person struct {
- Place `url:",squash"`
-
- FirstName string `url:"first_name"`
- LastName string `url:"last_name"`
- Age string `url:"age,omitempty"`
- Password string `url:"-"`
-}
-
-johnbull := Person{
- Place: Place{ // squash the embedded struct value
- Country: "UK",
- City: "London",
- ZipCode: "SW1",
- },
- FirstName: "John",
- LastName: "Doe",
- Age: "35",
- Password: "my-secret", // ignored for parameter
-}
-
-goreq.Request{
- Uri: "http://localhost/",
- QueryString: johnbull,
-}.Do()
-// => `http://localhost/?first_name=John&last_name=Doe&age=35&country=UK&city=London&zip_code=SW1`
-
-
-// age and zipcode will be ignored because of `omitempty`
-// but firstname isn't.
-samurai := Person{
- Place: Place{ // squash the embedded struct value
- Country: "Japan",
- City: "Tokyo",
- },
- LastName: "Yagyu",
-}
-
-goreq.Request{
- Uri: "http://localhost/",
- QueryString: samurai,
-}.Do()
-// => `http://localhost/?first_name=&last_name=yagyu&country=Japan&city=Tokyo`
-```
-
-
-#### POST
-
-```go
-res, err := goreq.Request{ Method: "POST", Uri: "http://www.google.com" }.Do()
-```
-
-## Sending payloads in the Body
-
-You can send ```string```, ```Reader``` or ```interface{}``` in the body. The first two will be sent as text. The last one will be marshalled to JSON, if possible.
-
-```go
-type Item struct {
- Id int
- Name string
-}
-
-item := Item{ Id: 1111, Name: "foobar" }
-
-res, err := goreq.Request{
- Method: "POST",
- Uri: "http://www.google.com",
- Body: item,
-}.Do()
-```
-
-## Specifiying request headers
-
-We think that most of the times the request headers that you use are: ```Host```, ```Content-Type```, ```Accept``` and ```User-Agent```. This is why we decided to make it very easy to set these headers.
-
-```go
-res, err := goreq.Request{
- Uri: "http://www.google.com",
- Host: "foobar.com",
- Accept: "application/json",
- ContentType: "application/json",
- UserAgent: "goreq",
-}.Do()
-```
-
-But sometimes you need to set other headers. You can still do it.
-
-```go
-req := goreq.Request{ Uri: "http://www.google.com" }
-
-req.AddHeader("X-Custom", "somevalue")
-
-req.Do()
-```
-
-Alternatively you can use the `WithHeader` function to keep the syntax short
-
-```go
-res, err = goreq.Request{ Uri: "http://www.google.com" }.WithHeader("X-Custom", "somevalue").Do()
-```
-
-## Cookie support
-
-Cookies can be either set at the request level by sending a [CookieJar](http://golang.org/pkg/net/http/cookiejar/) in the `CookieJar` request field
-or you can use goreq's one-liner WithCookie method as shown below
-
-```go
-res, err := goreq.Request{
- Uri: "http://www.google.com",
-}.
-WithCookie(&http.Cookie{Name: "c1", Value: "v1"}).
-Do()
-```
-
-## Setting timeouts
-
-GoReq supports 2 kind of timeouts. A general connection timeout and a request specific one. By default the connection timeout is of 1 second. There is no default for request timeout, which means it will wait forever.
-
-You can change the connection timeout doing:
-
-```go
-goreq.SetConnectTimeout(100 * time.Millisecond)
-```
-
-And specify the request timeout doing:
-
-```go
-res, err := goreq.Request{
- Uri: "http://www.google.com",
- Timeout: 500 * time.Millisecond,
-}.Do()
-```
-
-## Using the Response and Error
-
-GoReq will always return 2 values: a ```Response``` and an ```Error```.
-If ```Error``` is not ```nil``` it means that an error happened while doing the request and you shouldn't use the ```Response``` in any way.
-You can check what happened by getting the error message:
-
-```go
-fmt.Println(err.Error())
-```
-And to make it easy to know if it was a timeout error, you can ask the error or return it:
-
-```go
-if serr, ok := err.(*goreq.Error); ok {
- if serr.Timeout() {
- ...
- }
-}
-return err
-```
-
-If you don't get an error, you can safely use the ```Response```.
-
-```go
-res.Uri // return final URL location of the response (fulfilled after redirect was made)
-res.StatusCode // return the status code of the response
-res.Body // gives you access to the body
-res.Body.ToString() // will return the body as a string
-res.Header.Get("Content-Type") // gives you access to all the response headers
-```
-Remember that you should **always** close `res.Body` if it's not `nil`
-
-## Receiving JSON
-
-GoReq will help you to receive and unmarshal JSON.
-
-```go
-type Item struct {
- Id int
- Name string
-}
-
-var item Item
-
-res.Body.FromJsonTo(&item)
-```
-
-## Sending/Receiving Compressed Payloads
-GoReq supports gzip, deflate and zlib compression of requests' body and transparent decompression of responses provided they have a correct `Content-Encoding` header.
-
-#####Using gzip compression:
-```go
-res, err := goreq.Request{
- Method: "POST",
- Uri: "http://www.google.com",
- Body: item,
- Compression: goreq.Gzip(),
-}.Do()
-```
-#####Using deflate/zlib compression:
-```go
-res, err := goreq.Request{
- Method: "POST",
- Uri: "http://www.google.com",
- Body: item,
- Compression: goreq.Deflate(),
-}.Do()
-```
-#####Using compressed responses:
-If servers replies a correct and matching `Content-Encoding` header (gzip requires `Content-Encoding: gzip` and deflate `Content-Encoding: deflate`) goreq transparently decompresses the response so the previous example should always work:
-```go
-type Item struct {
- Id int
- Name string
-}
-res, err := goreq.Request{
- Method: "POST",
- Uri: "http://www.google.com",
- Body: item,
- Compression: goreq.Gzip(),
-}.Do()
-var item Item
-res.Body.FromJsonTo(&item)
-```
-If no `Content-Encoding` header is replied by the server GoReq will return the crude response.
-
-## Proxy
-If you need to use a proxy for your requests GoReq supports the standard `http_proxy` env variable as well as manually setting the proxy for each request
-
-```go
-res, err := goreq.Request{
- Method: "GET",
- Proxy: "http://myproxy:myproxyport",
- Uri: "http://www.google.com",
-}.Do()
-```
-
-### Proxy basic auth is also supported
-
-```go
-res, err := goreq.Request{
- Method: "GET",
- Proxy: "http://user:pass@myproxy:myproxyport",
- Uri: "http://www.google.com",
-}.Do()
-```
-
-## Debug
-If you need to debug your http requests, it can print the http request detail.
-
-```go
-res, err := goreq.Request{
- Method: "GET",
- Uri: "http://www.google.com",
- Compression: goreq.Gzip(),
- ShowDebug: true,
-}.Do()
-fmt.Println(res, err)
-```
-
-and it will print the log:
-```
-GET / HTTP/1.1
-Host: www.google.com
-Accept:
-Accept-Encoding: gzip
-Content-Encoding: gzip
-Content-Type:
-```
-
-
-### Getting raw Request & Response
-
-To get the Request:
-
-```go
-req := goreq.Request{
- Host: "foobar.com",
-}
-
-//req.Request will return a new instance of an http.Request so you can safely use it for something else
-request, _ := req.NewRequest()
-
-```
-
-
-To get the Response:
-
-```go
-res, err := goreq.Request{
- Method: "GET",
- Uri: "http://www.google.com",
- Compression: goreq.Gzip(),
- ShowDebug: true,
-}.Do()
-
-// res.Response will contain the original http.Response structure
-fmt.Println(res.Response, err)
-```
-
-
-
-
-TODO:
------
-
-We do have a couple of [issues](https://github.com/franela/goreq/issues) pending we'll be addressing soon. But feel free to
-contribute and send us PRs (with tests please :smile:).
diff --git a/Godeps/_workspace/src/github.com/franela/goreq/goreq.go b/Godeps/_workspace/src/github.com/franela/goreq/goreq.go
deleted file mode 100644
index ffa5ea82200..00000000000
--- a/Godeps/_workspace/src/github.com/franela/goreq/goreq.go
+++ /dev/null
@@ -1,491 +0,0 @@
-package goreq
-
-import (
- "bufio"
- "bytes"
- "compress/gzip"
- "compress/zlib"
- "crypto/tls"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "log"
- "net"
- "net/http"
- "net/http/httputil"
- "net/url"
- "reflect"
- "strings"
- "time"
-)
-
-type itimeout interface {
- Timeout() bool
-}
-type Request struct {
- headers []headerTuple
- cookies []*http.Cookie
- Method string
- Uri string
- Body interface{}
- QueryString interface{}
- Timeout time.Duration
- ContentType string
- Accept string
- Host string
- UserAgent string
- Insecure bool
- MaxRedirects int
- RedirectHeaders bool
- Proxy string
- Compression *compression
- BasicAuthUsername string
- BasicAuthPassword string
- CookieJar http.CookieJar
- ShowDebug bool
- OnBeforeRequest func(goreq *Request, httpreq *http.Request)
-}
-
-type compression struct {
- writer func(buffer io.Writer) (io.WriteCloser, error)
- reader func(buffer io.Reader) (io.ReadCloser, error)
- ContentEncoding string
-}
-
-type Response struct {
- *http.Response
- Uri string
- Body *Body
- req *http.Request
-}
-
-func (r Response) CancelRequest() {
- cancelRequest(DefaultTransport, r.req)
-
-}
-
-func cancelRequest(transport interface{}, r *http.Request) {
- if tp, ok := transport.(transportRequestCanceler); ok {
- tp.CancelRequest(r)
- }
-}
-
-type headerTuple struct {
- name string
- value string
-}
-
-type Body struct {
- reader io.ReadCloser
- compressedReader io.ReadCloser
-}
-
-type Error struct {
- timeout bool
- Err error
-}
-
-type transportRequestCanceler interface {
- CancelRequest(*http.Request)
-}
-
-func (e *Error) Timeout() bool {
- return e.timeout
-}
-
-func (e *Error) Error() string {
- return e.Err.Error()
-}
-
-func (b *Body) Read(p []byte) (int, error) {
- if b.compressedReader != nil {
- return b.compressedReader.Read(p)
- }
- return b.reader.Read(p)
-}
-
-func (b *Body) Close() error {
- err := b.reader.Close()
- if b.compressedReader != nil {
- return b.compressedReader.Close()
- }
- return err
-}
-
-func (b *Body) FromJsonTo(o interface{}) error {
- return json.NewDecoder(b).Decode(o)
-}
-
-func (b *Body) ToString() (string, error) {
- body, err := ioutil.ReadAll(b)
- if err != nil {
- return "", err
- }
- return string(body), nil
-}
-
-func Gzip() *compression {
- reader := func(buffer io.Reader) (io.ReadCloser, error) {
- return gzip.NewReader(buffer)
- }
- writer := func(buffer io.Writer) (io.WriteCloser, error) {
- return gzip.NewWriter(buffer), nil
- }
- return &compression{writer: writer, reader: reader, ContentEncoding: "gzip"}
-}
-
-func Deflate() *compression {
- reader := func(buffer io.Reader) (io.ReadCloser, error) {
- return zlib.NewReader(buffer)
- }
- writer := func(buffer io.Writer) (io.WriteCloser, error) {
- return zlib.NewWriter(buffer), nil
- }
- return &compression{writer: writer, reader: reader, ContentEncoding: "deflate"}
-}
-
-func Zlib() *compression {
- return Deflate()
-}
-
-func paramParse(query interface{}) (string, error) {
- switch query.(type) {
- case url.Values:
- return query.(url.Values).Encode(), nil
- case *url.Values:
- return query.(*url.Values).Encode(), nil
- default:
- var v = &url.Values{}
- err := paramParseStruct(v, query)
- return v.Encode(), err
- }
-}
-
-func paramParseStruct(v *url.Values, query interface{}) error {
- var (
- s = reflect.ValueOf(query)
- t = reflect.TypeOf(query)
- )
- for t.Kind() == reflect.Ptr || t.Kind() == reflect.Interface {
- s = s.Elem()
- t = s.Type()
- }
-
- if t.Kind() != reflect.Struct {
- return errors.New("Can not parse QueryString.")
- }
-
- for i := 0; i < t.NumField(); i++ {
- var name string
-
- field := s.Field(i)
- typeField := t.Field(i)
-
- if !field.CanInterface() {
- continue
- }
-
- urlTag := typeField.Tag.Get("url")
- if urlTag == "-" {
- continue
- }
-
- name, opts := parseTag(urlTag)
-
- var omitEmpty, squash bool
- omitEmpty = opts.Contains("omitempty")
- squash = opts.Contains("squash")
-
- if squash {
- err := paramParseStruct(v, field.Interface())
- if err != nil {
- return err
- }
- continue
- }
-
- if urlTag == "" {
- name = strings.ToLower(typeField.Name)
- }
-
- if val := fmt.Sprintf("%v", field.Interface()); !(omitEmpty && len(val) == 0) {
- v.Add(name, val)
- }
- }
- return nil
-}
-
-func prepareRequestBody(b interface{}) (io.Reader, error) {
- switch b.(type) {
- case string:
- // treat is as text
- return strings.NewReader(b.(string)), nil
- case io.Reader:
- // treat is as text
- return b.(io.Reader), nil
- case []byte:
- //treat as byte array
- return bytes.NewReader(b.([]byte)), nil
- case nil:
- return nil, nil
- default:
- // try to jsonify it
- j, err := json.Marshal(b)
- if err == nil {
- return bytes.NewReader(j), nil
- }
- return nil, err
- }
-}
-
-var DefaultDialer = &net.Dialer{Timeout: 1000 * time.Millisecond}
-var DefaultTransport http.RoundTripper = &http.Transport{Dial: DefaultDialer.Dial, Proxy: http.ProxyFromEnvironment}
-var DefaultClient = &http.Client{Transport: DefaultTransport}
-
-var proxyTransport http.RoundTripper
-var proxyClient *http.Client
-
-func SetConnectTimeout(duration time.Duration) {
- DefaultDialer.Timeout = duration
-}
-
-func (r *Request) AddHeader(name string, value string) {
- if r.headers == nil {
- r.headers = []headerTuple{}
- }
- r.headers = append(r.headers, headerTuple{name: name, value: value})
-}
-
-func (r Request) WithHeader(name string, value string) Request {
- r.AddHeader(name, value)
- return r
-}
-
-func (r *Request) AddCookie(c *http.Cookie) {
- r.cookies = append(r.cookies, c)
-}
-
-func (r Request) WithCookie(c *http.Cookie) Request {
- r.AddCookie(c)
- return r
-
-}
-
-func (r Request) Do() (*Response, error) {
- var client = DefaultClient
- var transport = DefaultTransport
- var resUri string
- var redirectFailed bool
-
- r.Method = valueOrDefault(r.Method, "GET")
-
- // use a client with a cookie jar if necessary. We create a new client not
- // to modify the default one.
- if r.CookieJar != nil {
- client = &http.Client{
- Transport: transport,
- Jar: r.CookieJar,
- }
- }
-
- if r.Proxy != "" {
- proxyUrl, err := url.Parse(r.Proxy)
- if err != nil {
- // proxy address is in a wrong format
- return nil, &Error{Err: err}
- }
-
- //If jar is specified new client needs to be built
- if proxyTransport == nil || client.Jar != nil {
- proxyTransport = &http.Transport{Dial: DefaultDialer.Dial, Proxy: http.ProxyURL(proxyUrl)}
- proxyClient = &http.Client{Transport: proxyTransport, Jar: client.Jar}
- } else if proxyTransport, ok := proxyTransport.(*http.Transport); ok {
- proxyTransport.Proxy = http.ProxyURL(proxyUrl)
- }
- transport = proxyTransport
- client = proxyClient
- }
-
- client.CheckRedirect = func(req *http.Request, via []*http.Request) error {
-
- if len(via) > r.MaxRedirects {
- redirectFailed = true
- return errors.New("Error redirecting. MaxRedirects reached")
- }
-
- resUri = req.URL.String()
-
- //By default Golang will not redirect request headers
- // https://code.google.com/p/go/issues/detail?id=4800&q=request%20header
- if r.RedirectHeaders {
- for key, val := range via[0].Header {
- req.Header[key] = val
- }
- }
- return nil
- }
-
- if transport, ok := transport.(*http.Transport); ok {
- if r.Insecure {
- if transport.TLSClientConfig != nil {
- transport.TLSClientConfig.InsecureSkipVerify = true
- } else {
- transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
- }
- } else if transport.TLSClientConfig != nil {
- // the default TLS client (when transport.TLSClientConfig==nil) is
- // already set to verify, so do nothing in that case
- transport.TLSClientConfig.InsecureSkipVerify = false
- }
- }
-
- req, err := r.NewRequest()
-
- if err != nil {
- // we couldn't parse the URL.
- return nil, &Error{Err: err}
- }
-
- timeout := false
- if r.Timeout > 0 {
- client.Timeout = r.Timeout
- }
-
- if r.ShowDebug {
- dump, err := httputil.DumpRequest(req, true)
- if err != nil {
- log.Println(err)
- }
- log.Println(string(dump))
- }
-
- if r.OnBeforeRequest != nil {
- r.OnBeforeRequest(&r, req)
- }
- res, err := client.Do(req)
-
- if err != nil {
- if !timeout {
- if t, ok := err.(itimeout); ok {
- timeout = t.Timeout()
- }
- if ue, ok := err.(*url.Error); ok {
- if t, ok := ue.Err.(itimeout); ok {
- timeout = t.Timeout()
- }
- }
- }
-
- var response *Response
- //If redirect fails we still want to return response data
- if redirectFailed {
- if res != nil {
- response = &Response{res, resUri, &Body{reader: res.Body}, req}
- } else {
- response = &Response{res, resUri, nil, req}
- }
- }
-
- //If redirect fails and we haven't set a redirect count we shouldn't return an error
- if redirectFailed && r.MaxRedirects == 0 {
- return response, nil
- }
-
- return response, &Error{timeout: timeout, Err: err}
- }
-
- if r.Compression != nil && strings.Contains(res.Header.Get("Content-Encoding"), r.Compression.ContentEncoding) {
- compressedReader, err := r.Compression.reader(res.Body)
- if err != nil {
- return nil, &Error{Err: err}
- }
- return &Response{res, resUri, &Body{reader: res.Body, compressedReader: compressedReader}, req}, nil
- }
-
- return &Response{res, resUri, &Body{reader: res.Body}, req}, nil
-}
-
-func (r Request) addHeaders(headersMap http.Header) {
- if len(r.UserAgent) > 0 {
- headersMap.Add("User-Agent", r.UserAgent)
- }
- if r.Accept != "" {
- headersMap.Add("Accept", r.Accept)
- }
- if r.ContentType != "" {
- headersMap.Add("Content-Type", r.ContentType)
- }
-}
-
-func (r Request) NewRequest() (*http.Request, error) {
-
- b, e := prepareRequestBody(r.Body)
- if e != nil {
- // there was a problem marshaling the body
- return nil, &Error{Err: e}
- }
-
- if r.QueryString != nil {
- param, e := paramParse(r.QueryString)
- if e != nil {
- return nil, &Error{Err: e}
- }
- r.Uri = r.Uri + "?" + param
- }
-
- var bodyReader io.Reader
- if b != nil && r.Compression != nil {
- buffer := bytes.NewBuffer([]byte{})
- readBuffer := bufio.NewReader(b)
- writer, err := r.Compression.writer(buffer)
- if err != nil {
- return nil, &Error{Err: err}
- }
- _, e = readBuffer.WriteTo(writer)
- writer.Close()
- if e != nil {
- return nil, &Error{Err: e}
- }
- bodyReader = buffer
- } else {
- bodyReader = b
- }
-
- req, err := http.NewRequest(r.Method, r.Uri, bodyReader)
- if err != nil {
- return nil, err
- }
- // add headers to the request
- req.Host = r.Host
-
- r.addHeaders(req.Header)
- if r.Compression != nil {
- req.Header.Add("Content-Encoding", r.Compression.ContentEncoding)
- req.Header.Add("Accept-Encoding", r.Compression.ContentEncoding)
- }
- if r.headers != nil {
- for _, header := range r.headers {
- req.Header.Add(header.name, header.value)
- }
- }
-
- //use basic auth if required
- if r.BasicAuthUsername != "" {
- req.SetBasicAuth(r.BasicAuthUsername, r.BasicAuthPassword)
- }
-
- for _, c := range r.cookies {
- req.AddCookie(c)
- }
- return req, nil
-}
-
-// Return value if nonempty, def otherwise.
-func valueOrDefault(value, def string) string {
- if value != "" {
- return value
- }
- return def
-}
diff --git a/Godeps/_workspace/src/github.com/franela/goreq/tags.go b/Godeps/_workspace/src/github.com/franela/goreq/tags.go
deleted file mode 100644
index ffe8789d394..00000000000
--- a/Godeps/_workspace/src/github.com/franela/goreq/tags.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package goreq
-
-import (
- "strings"
- "unicode"
-)
-
-// tagOptions is the string following a comma in a struct field's "json"
-// tag, or the empty string. It does not include the leading comma.
-type tagOptions string
-
-// parseTag splits a struct field's json tag into its name and
-// comma-separated options.
-func parseTag(tag string) (string, tagOptions) {
- if idx := strings.Index(tag, ","); idx != -1 {
- return tag[:idx], tagOptions(tag[idx+1:])
- }
- return tag, tagOptions("")
-}
-
-// Contains reports whether a comma-separated list of options
-// contains a particular substr flag. substr must be surrounded by a
-// string boundary or commas.
-func (o tagOptions) Contains(optionName string) bool {
- if len(o) == 0 {
- return false
- }
- s := string(o)
- for s != "" {
- var next string
- i := strings.Index(s, ",")
- if i >= 0 {
- s, next = s[:i], s[i+1:]
- }
- if s == optionName {
- return true
- }
- s = next
- }
- return false
-}
-
-func isValidTag(s string) bool {
- if s == "" {
- return false
- }
- for _, c := range s {
- switch {
- case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c):
- // Backslash and quote chars are reserved, but
- // otherwise any punctuation chars are allowed
- // in a tag name.
- default:
- if !unicode.IsLetter(c) && !unicode.IsDigit(c) {
- return false
- }
- }
- }
- return true
-}
diff --git a/Godeps/_workspace/src/github.com/go-ini/ini/ini.go b/Godeps/_workspace/src/github.com/go-ini/ini/ini.go
deleted file mode 100644
index 1fee789a1d6..00000000000
--- a/Godeps/_workspace/src/github.com/go-ini/ini/ini.go
+++ /dev/null
@@ -1,1226 +0,0 @@
-// Copyright 2014 Unknwon
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-// Package ini provides INI file read and write functionality in Go.
-package ini
-
-import (
- "bufio"
- "bytes"
- "errors"
- "fmt"
- "io"
- "os"
- "regexp"
- "runtime"
- "strconv"
- "strings"
- "sync"
- "time"
-)
-
-const (
- DEFAULT_SECTION = "DEFAULT"
- // Maximum allowed depth when recursively substituing variable names.
- _DEPTH_VALUES = 99
-
- _VERSION = "1.6.0"
-)
-
-func Version() string {
- return _VERSION
-}
-
-var (
- LineBreak = "\n"
-
- // Variable regexp pattern: %(variable)s
- varPattern = regexp.MustCompile(`%\(([^\)]+)\)s`)
-
- // Write spaces around "=" to look better.
- PrettyFormat = true
-)
-
-func init() {
- if runtime.GOOS == "windows" {
- LineBreak = "\r\n"
- }
-}
-
-func inSlice(str string, s []string) bool {
- for _, v := range s {
- if str == v {
- return true
- }
- }
- return false
-}
-
-// dataSource is a interface that returns file content.
-type dataSource interface {
- ReadCloser() (io.ReadCloser, error)
-}
-
-type sourceFile struct {
- name string
-}
-
-func (s sourceFile) ReadCloser() (_ io.ReadCloser, err error) {
- return os.Open(s.name)
-}
-
-type bytesReadCloser struct {
- reader io.Reader
-}
-
-func (rc *bytesReadCloser) Read(p []byte) (n int, err error) {
- return rc.reader.Read(p)
-}
-
-func (rc *bytesReadCloser) Close() error {
- return nil
-}
-
-type sourceData struct {
- data []byte
-}
-
-func (s *sourceData) ReadCloser() (io.ReadCloser, error) {
- return &bytesReadCloser{bytes.NewReader(s.data)}, nil
-}
-
-// ____ __.
-// | |/ _|____ ___.__.
-// | <_/ __ < | |
-// | | \ ___/\___ |
-// |____|__ \___ > ____|
-// \/ \/\/
-
-// Key represents a key under a section.
-type Key struct {
- s *Section
- Comment string
- name string
- value string
- isAutoIncr bool
-}
-
-// Name returns name of key.
-func (k *Key) Name() string {
- return k.name
-}
-
-// Value returns raw value of key for performance purpose.
-func (k *Key) Value() string {
- return k.value
-}
-
-// String returns string representation of value.
-func (k *Key) String() string {
- val := k.value
- if strings.Index(val, "%") == -1 {
- return val
- }
-
- for i := 0; i < _DEPTH_VALUES; i++ {
- vr := varPattern.FindString(val)
- if len(vr) == 0 {
- break
- }
-
- // Take off leading '%(' and trailing ')s'.
- noption := strings.TrimLeft(vr, "%(")
- noption = strings.TrimRight(noption, ")s")
-
- // Search in the same section.
- nk, err := k.s.GetKey(noption)
- if err != nil {
- // Search again in default section.
- nk, _ = k.s.f.Section("").GetKey(noption)
- }
-
- // Substitute by new value and take off leading '%(' and trailing ')s'.
- val = strings.Replace(val, vr, nk.value, -1)
- }
- return val
-}
-
-// Validate accepts a validate function which can
-// return modifed result as key value.
-func (k *Key) Validate(fn func(string) string) string {
- return fn(k.String())
-}
-
-// parseBool returns the boolean value represented by the string.
-//
-// It accepts 1, t, T, TRUE, true, True, YES, yes, Yes, ON, on, On,
-// 0, f, F, FALSE, false, False, NO, no, No, OFF, off, Off.
-// Any other value returns an error.
-func parseBool(str string) (value bool, err error) {
- switch str {
- case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "ON", "on", "On":
- return true, nil
- case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "OFF", "off", "Off":
- return false, nil
- }
- return false, fmt.Errorf("parsing \"%s\": invalid syntax", str)
-}
-
-// Bool returns bool type value.
-func (k *Key) Bool() (bool, error) {
- return parseBool(k.String())
-}
-
-// Float64 returns float64 type value.
-func (k *Key) Float64() (float64, error) {
- return strconv.ParseFloat(k.String(), 64)
-}
-
-// Int returns int type value.
-func (k *Key) Int() (int, error) {
- return strconv.Atoi(k.String())
-}
-
-// Int64 returns int64 type value.
-func (k *Key) Int64() (int64, error) {
- return strconv.ParseInt(k.String(), 10, 64)
-}
-
-// Uint returns uint type valued.
-func (k *Key) Uint() (uint, error) {
- u, e := strconv.ParseUint(k.String(), 10, 64)
- return uint(u), e
-}
-
-// Uint64 returns uint64 type value.
-func (k *Key) Uint64() (uint64, error) {
- return strconv.ParseUint(k.String(), 10, 64)
-}
-
-// Duration returns time.Duration type value.
-func (k *Key) Duration() (time.Duration, error) {
- return time.ParseDuration(k.String())
-}
-
-// TimeFormat parses with given format and returns time.Time type value.
-func (k *Key) TimeFormat(format string) (time.Time, error) {
- return time.Parse(format, k.String())
-}
-
-// Time parses with RFC3339 format and returns time.Time type value.
-func (k *Key) Time() (time.Time, error) {
- return k.TimeFormat(time.RFC3339)
-}
-
-// MustString returns default value if key value is empty.
-func (k *Key) MustString(defaultVal string) string {
- val := k.String()
- if len(val) == 0 {
- return defaultVal
- }
- return val
-}
-
-// MustBool always returns value without error,
-// it returns false if error occurs.
-func (k *Key) MustBool(defaultVal ...bool) bool {
- val, err := k.Bool()
- if len(defaultVal) > 0 && err != nil {
- return defaultVal[0]
- }
- return val
-}
-
-// MustFloat64 always returns value without error,
-// it returns 0.0 if error occurs.
-func (k *Key) MustFloat64(defaultVal ...float64) float64 {
- val, err := k.Float64()
- if len(defaultVal) > 0 && err != nil {
- return defaultVal[0]
- }
- return val
-}
-
-// MustInt always returns value without error,
-// it returns 0 if error occurs.
-func (k *Key) MustInt(defaultVal ...int) int {
- val, err := k.Int()
- if len(defaultVal) > 0 && err != nil {
- return defaultVal[0]
- }
- return val
-}
-
-// MustInt64 always returns value without error,
-// it returns 0 if error occurs.
-func (k *Key) MustInt64(defaultVal ...int64) int64 {
- val, err := k.Int64()
- if len(defaultVal) > 0 && err != nil {
- return defaultVal[0]
- }
- return val
-}
-
-// MustUint always returns value without error,
-// it returns 0 if error occurs.
-func (k *Key) MustUint(defaultVal ...uint) uint {
- val, err := k.Uint()
- if len(defaultVal) > 0 && err != nil {
- return defaultVal[0]
- }
- return val
-}
-
-// MustUint64 always returns value without error,
-// it returns 0 if error occurs.
-func (k *Key) MustUint64(defaultVal ...uint64) uint64 {
- val, err := k.Uint64()
- if len(defaultVal) > 0 && err != nil {
- return defaultVal[0]
- }
- return val
-}
-
-// MustDuration always returns value without error,
-// it returns zero value if error occurs.
-func (k *Key) MustDuration(defaultVal ...time.Duration) time.Duration {
- val, err := k.Duration()
- if len(defaultVal) > 0 && err != nil {
- return defaultVal[0]
- }
- return val
-}
-
-// MustTimeFormat always parses with given format and returns value without error,
-// it returns zero value if error occurs.
-func (k *Key) MustTimeFormat(format string, defaultVal ...time.Time) time.Time {
- val, err := k.TimeFormat(format)
- if len(defaultVal) > 0 && err != nil {
- return defaultVal[0]
- }
- return val
-}
-
-// MustTime always parses with RFC3339 format and returns value without error,
-// it returns zero value if error occurs.
-func (k *Key) MustTime(defaultVal ...time.Time) time.Time {
- return k.MustTimeFormat(time.RFC3339, defaultVal...)
-}
-
-// In always returns value without error,
-// it returns default value if error occurs or doesn't fit into candidates.
-func (k *Key) In(defaultVal string, candidates []string) string {
- val := k.String()
- for _, cand := range candidates {
- if val == cand {
- return val
- }
- }
- return defaultVal
-}
-
-// InFloat64 always returns value without error,
-// it returns default value if error occurs or doesn't fit into candidates.
-func (k *Key) InFloat64(defaultVal float64, candidates []float64) float64 {
- val := k.MustFloat64()
- for _, cand := range candidates {
- if val == cand {
- return val
- }
- }
- return defaultVal
-}
-
-// InInt always returns value without error,
-// it returns default value if error occurs or doesn't fit into candidates.
-func (k *Key) InInt(defaultVal int, candidates []int) int {
- val := k.MustInt()
- for _, cand := range candidates {
- if val == cand {
- return val
- }
- }
- return defaultVal
-}
-
-// InInt64 always returns value without error,
-// it returns default value if error occurs or doesn't fit into candidates.
-func (k *Key) InInt64(defaultVal int64, candidates []int64) int64 {
- val := k.MustInt64()
- for _, cand := range candidates {
- if val == cand {
- return val
- }
- }
- return defaultVal
-}
-
-// InUint always returns value without error,
-// it returns default value if error occurs or doesn't fit into candidates.
-func (k *Key) InUint(defaultVal uint, candidates []uint) uint {
- val := k.MustUint()
- for _, cand := range candidates {
- if val == cand {
- return val
- }
- }
- return defaultVal
-}
-
-// InUint64 always returns value without error,
-// it returns default value if error occurs or doesn't fit into candidates.
-func (k *Key) InUint64(defaultVal uint64, candidates []uint64) uint64 {
- val := k.MustUint64()
- for _, cand := range candidates {
- if val == cand {
- return val
- }
- }
- return defaultVal
-}
-
-// InTimeFormat always parses with given format and returns value without error,
-// it returns default value if error occurs or doesn't fit into candidates.
-func (k *Key) InTimeFormat(format string, defaultVal time.Time, candidates []time.Time) time.Time {
- val := k.MustTimeFormat(format)
- for _, cand := range candidates {
- if val == cand {
- return val
- }
- }
- return defaultVal
-}
-
-// InTime always parses with RFC3339 format and returns value without error,
-// it returns default value if error occurs or doesn't fit into candidates.
-func (k *Key) InTime(defaultVal time.Time, candidates []time.Time) time.Time {
- return k.InTimeFormat(time.RFC3339, defaultVal, candidates)
-}
-
-// RangeFloat64 checks if value is in given range inclusively,
-// and returns default value if it's not.
-func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 {
- val := k.MustFloat64()
- if val < min || val > max {
- return defaultVal
- }
- return val
-}
-
-// RangeInt checks if value is in given range inclusively,
-// and returns default value if it's not.
-func (k *Key) RangeInt(defaultVal, min, max int) int {
- val := k.MustInt()
- if val < min || val > max {
- return defaultVal
- }
- return val
-}
-
-// RangeInt64 checks if value is in given range inclusively,
-// and returns default value if it's not.
-func (k *Key) RangeInt64(defaultVal, min, max int64) int64 {
- val := k.MustInt64()
- if val < min || val > max {
- return defaultVal
- }
- return val
-}
-
-// RangeTimeFormat checks if value with given format is in given range inclusively,
-// and returns default value if it's not.
-func (k *Key) RangeTimeFormat(format string, defaultVal, min, max time.Time) time.Time {
- val := k.MustTimeFormat(format)
- if val.Unix() < min.Unix() || val.Unix() > max.Unix() {
- return defaultVal
- }
- return val
-}
-
-// RangeTime checks if value with RFC3339 format is in given range inclusively,
-// and returns default value if it's not.
-func (k *Key) RangeTime(defaultVal, min, max time.Time) time.Time {
- return k.RangeTimeFormat(time.RFC3339, defaultVal, min, max)
-}
-
-// Strings returns list of string devide by given delimiter.
-func (k *Key) Strings(delim string) []string {
- str := k.String()
- if len(str) == 0 {
- return []string{}
- }
-
- vals := strings.Split(str, delim)
- for i := range vals {
- vals[i] = strings.TrimSpace(vals[i])
- }
- return vals
-}
-
-// Float64s returns list of float64 devide by given delimiter.
-func (k *Key) Float64s(delim string) []float64 {
- strs := k.Strings(delim)
- vals := make([]float64, len(strs))
- for i := range strs {
- vals[i], _ = strconv.ParseFloat(strs[i], 64)
- }
- return vals
-}
-
-// Ints returns list of int devide by given delimiter.
-func (k *Key) Ints(delim string) []int {
- strs := k.Strings(delim)
- vals := make([]int, len(strs))
- for i := range strs {
- vals[i], _ = strconv.Atoi(strs[i])
- }
- return vals
-}
-
-// Int64s returns list of int64 devide by given delimiter.
-func (k *Key) Int64s(delim string) []int64 {
- strs := k.Strings(delim)
- vals := make([]int64, len(strs))
- for i := range strs {
- vals[i], _ = strconv.ParseInt(strs[i], 10, 64)
- }
- return vals
-}
-
-// Uints returns list of uint devide by given delimiter.
-func (k *Key) Uints(delim string) []uint {
- strs := k.Strings(delim)
- vals := make([]uint, len(strs))
- for i := range strs {
- u, _ := strconv.ParseUint(strs[i], 10, 64)
- vals[i] = uint(u)
- }
- return vals
-}
-
-// Uint64s returns list of uint64 devide by given delimiter.
-func (k *Key) Uint64s(delim string) []uint64 {
- strs := k.Strings(delim)
- vals := make([]uint64, len(strs))
- for i := range strs {
- vals[i], _ = strconv.ParseUint(strs[i], 10, 64)
- }
- return vals
-}
-
-// TimesFormat parses with given format and returns list of time.Time devide by given delimiter.
-func (k *Key) TimesFormat(format, delim string) []time.Time {
- strs := k.Strings(delim)
- vals := make([]time.Time, len(strs))
- for i := range strs {
- vals[i], _ = time.Parse(format, strs[i])
- }
- return vals
-}
-
-// Times parses with RFC3339 format and returns list of time.Time devide by given delimiter.
-func (k *Key) Times(delim string) []time.Time {
- return k.TimesFormat(time.RFC3339, delim)
-}
-
-// SetValue changes key value.
-func (k *Key) SetValue(v string) {
- k.value = v
-}
-
-// _________ __ .__
-// / _____/ ____ _____/ |_|__| ____ ____
-// \_____ \_/ __ \_/ ___\ __\ |/ _ \ / \
-// / \ ___/\ \___| | | ( <_> ) | \
-// /_______ /\___ >\___ >__| |__|\____/|___| /
-// \/ \/ \/ \/
-
-// Section represents a config section.
-type Section struct {
- f *File
- Comment string
- name string
- keys map[string]*Key
- keyList []string
- keysHash map[string]string
-}
-
-func newSection(f *File, name string) *Section {
- return &Section{f, "", name, make(map[string]*Key), make([]string, 0, 10), make(map[string]string)}
-}
-
-// Name returns name of Section.
-func (s *Section) Name() string {
- return s.name
-}
-
-// NewKey creates a new key to given section.
-func (s *Section) NewKey(name, val string) (*Key, error) {
- if len(name) == 0 {
- return nil, errors.New("error creating new key: empty key name")
- }
-
- if s.f.BlockMode {
- s.f.lock.Lock()
- defer s.f.lock.Unlock()
- }
-
- if inSlice(name, s.keyList) {
- s.keys[name].value = val
- return s.keys[name], nil
- }
-
- s.keyList = append(s.keyList, name)
- s.keys[name] = &Key{s, "", name, val, false}
- s.keysHash[name] = val
- return s.keys[name], nil
-}
-
-// GetKey returns key in section by given name.
-func (s *Section) GetKey(name string) (*Key, error) {
- // FIXME: change to section level lock?
- if s.f.BlockMode {
- s.f.lock.RLock()
- }
- key := s.keys[name]
- if s.f.BlockMode {
- s.f.lock.RUnlock()
- }
-
- if key == nil {
- // Check if it is a child-section.
- sname := s.name
- for {
- if i := strings.LastIndex(sname, "."); i > -1 {
- sname = sname[:i]
- sec, err := s.f.GetSection(sname)
- if err != nil {
- continue
- }
- return sec.GetKey(name)
- } else {
- break
- }
- }
- return nil, fmt.Errorf("error when getting key of section '%s': key '%s' not exists", s.name, name)
- }
- return key, nil
-}
-
-// Key assumes named Key exists in section and returns a zero-value when not.
-func (s *Section) Key(name string) *Key {
- key, err := s.GetKey(name)
- if err != nil {
- // It's OK here because the only possible error is empty key name,
- // but if it's empty, this piece of code won't be executed.
- key, _ = s.NewKey(name, "")
- return key
- }
- return key
-}
-
-// Keys returns list of keys of section.
-func (s *Section) Keys() []*Key {
- keys := make([]*Key, len(s.keyList))
- for i := range s.keyList {
- keys[i] = s.Key(s.keyList[i])
- }
- return keys
-}
-
-// KeyStrings returns list of key names of section.
-func (s *Section) KeyStrings() []string {
- list := make([]string, len(s.keyList))
- copy(list, s.keyList)
- return list
-}
-
-// KeysHash returns keys hash consisting of names and values.
-func (s *Section) KeysHash() map[string]string {
- if s.f.BlockMode {
- s.f.lock.RLock()
- defer s.f.lock.RUnlock()
- }
-
- hash := map[string]string{}
- for key, value := range s.keysHash {
- hash[key] = value
- }
- return hash
-}
-
-// DeleteKey deletes a key from section.
-func (s *Section) DeleteKey(name string) {
- if s.f.BlockMode {
- s.f.lock.Lock()
- defer s.f.lock.Unlock()
- }
-
- for i, k := range s.keyList {
- if k == name {
- s.keyList = append(s.keyList[:i], s.keyList[i+1:]...)
- delete(s.keys, name)
- return
- }
- }
-}
-
-// ___________.__.__
-// \_ _____/|__| | ____
-// | __) | | | _/ __ \
-// | \ | | |_\ ___/
-// \___ / |__|____/\___ >
-// \/ \/
-
-// File represents a combination of a or more INI file(s) in memory.
-type File struct {
- // Should make things safe, but sometimes doesn't matter.
- BlockMode bool
- // Make sure data is safe in multiple goroutines.
- lock sync.RWMutex
-
- // Allow combination of multiple data sources.
- dataSources []dataSource
- // Actual data is stored here.
- sections map[string]*Section
-
- // To keep data in order.
- sectionList []string
-
- NameMapper
-}
-
-// newFile initializes File object with given data sources.
-func newFile(dataSources []dataSource) *File {
- return &File{
- BlockMode: true,
- dataSources: dataSources,
- sections: make(map[string]*Section),
- sectionList: make([]string, 0, 10),
- }
-}
-
-func parseDataSource(source interface{}) (dataSource, error) {
- switch s := source.(type) {
- case string:
- return sourceFile{s}, nil
- case []byte:
- return &sourceData{s}, nil
- default:
- return nil, fmt.Errorf("error parsing data source: unknown type '%s'", s)
- }
-}
-
-// Load loads and parses from INI data sources.
-// Arguments can be mixed of file name with string type, or raw data in []byte.
-func Load(source interface{}, others ...interface{}) (_ *File, err error) {
- sources := make([]dataSource, len(others)+1)
- sources[0], err = parseDataSource(source)
- if err != nil {
- return nil, err
- }
- for i := range others {
- sources[i+1], err = parseDataSource(others[i])
- if err != nil {
- return nil, err
- }
- }
- f := newFile(sources)
- return f, f.Reload()
-}
-
-// Empty returns an empty file object.
-func Empty() *File {
- // Ignore error here, we sure our data is good.
- f, _ := Load([]byte(""))
- return f
-}
-
-// NewSection creates a new section.
-func (f *File) NewSection(name string) (*Section, error) {
- if len(name) == 0 {
- return nil, errors.New("error creating new section: empty section name")
- }
-
- if f.BlockMode {
- f.lock.Lock()
- defer f.lock.Unlock()
- }
-
- if inSlice(name, f.sectionList) {
- return f.sections[name], nil
- }
-
- f.sectionList = append(f.sectionList, name)
- f.sections[name] = newSection(f, name)
- return f.sections[name], nil
-}
-
-// NewSections creates a list of sections.
-func (f *File) NewSections(names ...string) (err error) {
- for _, name := range names {
- if _, err = f.NewSection(name); err != nil {
- return err
- }
- }
- return nil
-}
-
-// GetSection returns section by given name.
-func (f *File) GetSection(name string) (*Section, error) {
- if len(name) == 0 {
- name = DEFAULT_SECTION
- }
-
- if f.BlockMode {
- f.lock.RLock()
- defer f.lock.RUnlock()
- }
-
- sec := f.sections[name]
- if sec == nil {
- return nil, fmt.Errorf("error when getting section: section '%s' not exists", name)
- }
- return sec, nil
-}
-
-// Section assumes named section exists and returns a zero-value when not.
-func (f *File) Section(name string) *Section {
- sec, err := f.GetSection(name)
- if err != nil {
- // Note: It's OK here because the only possible error is empty section name,
- // but if it's empty, this piece of code won't be executed.
- sec, _ = f.NewSection(name)
- return sec
- }
- return sec
-}
-
-// Section returns list of Section.
-func (f *File) Sections() []*Section {
- sections := make([]*Section, len(f.sectionList))
- for i := range f.sectionList {
- sections[i] = f.Section(f.sectionList[i])
- }
- return sections
-}
-
-// SectionStrings returns list of section names.
-func (f *File) SectionStrings() []string {
- list := make([]string, len(f.sectionList))
- copy(list, f.sectionList)
- return list
-}
-
-// DeleteSection deletes a section.
-func (f *File) DeleteSection(name string) {
- if f.BlockMode {
- f.lock.Lock()
- defer f.lock.Unlock()
- }
-
- if len(name) == 0 {
- name = DEFAULT_SECTION
- }
-
- for i, s := range f.sectionList {
- if s == name {
- f.sectionList = append(f.sectionList[:i], f.sectionList[i+1:]...)
- delete(f.sections, name)
- return
- }
- }
-}
-
-func cutComment(str string) string {
- i := strings.Index(str, "#")
- if i == -1 {
- return str
- }
- return str[:i]
-}
-
-func checkMultipleLines(buf *bufio.Reader, line, val, valQuote string) (string, error) {
- isEnd := false
- for {
- next, err := buf.ReadString('\n')
- if err != nil {
- if err != io.EOF {
- return "", err
- }
- isEnd = true
- }
- pos := strings.LastIndex(next, valQuote)
- if pos > -1 {
- val += next[:pos]
- break
- }
- val += next
- if isEnd {
- return "", fmt.Errorf("error parsing line: missing closing key quote from '%s' to '%s'", line, next)
- }
- }
- return val, nil
-}
-
-func checkContinuationLines(buf *bufio.Reader, val string) (string, bool, error) {
- isEnd := false
- for {
- valLen := len(val)
- if valLen == 0 || val[valLen-1] != '\\' {
- break
- }
- val = val[:valLen-1]
-
- next, err := buf.ReadString('\n')
- if err != nil {
- if err != io.EOF {
- return "", isEnd, err
- }
- isEnd = true
- }
-
- next = strings.TrimSpace(next)
- if len(next) == 0 {
- break
- }
- val += next
- }
- return val, isEnd, nil
-}
-
-// parse parses data through an io.Reader.
-func (f *File) parse(reader io.Reader) error {
- buf := bufio.NewReader(reader)
-
- // Handle BOM-UTF8.
- // http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding
- mask, err := buf.Peek(3)
- if err == nil && len(mask) >= 3 && mask[0] == 239 && mask[1] == 187 && mask[2] == 191 {
- buf.Read(mask)
- }
-
- count := 1
- comments := ""
- isEnd := false
-
- section, err := f.NewSection(DEFAULT_SECTION)
- if err != nil {
- return err
- }
-
- for {
- line, err := buf.ReadString('\n')
- line = strings.TrimSpace(line)
- length := len(line)
-
- // Check error and ignore io.EOF just for a moment.
- if err != nil {
- if err != io.EOF {
- return fmt.Errorf("error reading next line: %v", err)
- }
- // The last line of file could be an empty line.
- if length == 0 {
- break
- }
- isEnd = true
- }
-
- // Skip empty lines.
- if length == 0 {
- continue
- }
-
- switch {
- case line[0] == '#' || line[0] == ';': // Comments.
- if len(comments) == 0 {
- comments = line
- } else {
- comments += LineBreak + line
- }
- continue
- case line[0] == '[' && line[length-1] == ']': // New sction.
- section, err = f.NewSection(strings.TrimSpace(line[1 : length-1]))
- if err != nil {
- return err
- }
-
- if len(comments) > 0 {
- section.Comment = comments
- comments = ""
- }
- // Reset counter.
- count = 1
- continue
- }
-
- // Other possibilities.
- var (
- i int
- keyQuote string
- kname string
- valQuote string
- val string
- )
-
- // Key name surrounded by quotes.
- if line[0] == '"' {
- if length > 6 && line[0:3] == `"""` {
- keyQuote = `"""`
- } else {
- keyQuote = `"`
- }
- } else if line[0] == '`' {
- keyQuote = "`"
- }
- if len(keyQuote) > 0 {
- qLen := len(keyQuote)
- pos := strings.Index(line[qLen:], keyQuote)
- if pos == -1 {
- return fmt.Errorf("error parsing line: missing closing key quote: %s", line)
- }
- pos = pos + qLen
- i = strings.IndexAny(line[pos:], "=:")
- if i < 0 {
- return fmt.Errorf("error parsing line: key-value delimiter not found: %s", line)
- } else if i == pos {
- return fmt.Errorf("error parsing line: key is empty: %s", line)
- }
- i = i + pos
- kname = line[qLen:pos] // Just keep spaces inside quotes.
- } else {
- i = strings.IndexAny(line, "=:")
- if i < 0 {
- return fmt.Errorf("error parsing line: key-value delimiter not found: %s", line)
- } else if i == 0 {
- return fmt.Errorf("error parsing line: key is empty: %s", line)
- }
- kname = strings.TrimSpace(line[0:i])
- }
-
- isAutoIncr := false
- // Auto increment.
- if kname == "-" {
- isAutoIncr = true
- kname = "#" + fmt.Sprint(count)
- count++
- }
-
- lineRight := strings.TrimSpace(line[i+1:])
- lineRightLength := len(lineRight)
- firstChar := ""
- if lineRightLength >= 2 {
- firstChar = lineRight[0:1]
- }
- if firstChar == "`" {
- valQuote = "`"
- } else if firstChar == `"` {
- if lineRightLength >= 3 && lineRight[0:3] == `"""` {
- valQuote = `"""`
- } else {
- valQuote = `"`
- }
- } else if firstChar == `'` {
- valQuote = `'`
- }
-
- if len(valQuote) > 0 {
- qLen := len(valQuote)
- pos := strings.LastIndex(lineRight[qLen:], valQuote)
- // For multiple-line value check.
- if pos == -1 {
- if valQuote == `"` || valQuote == `'` {
- return fmt.Errorf("error parsing line: single quote does not allow multiple-line value: %s", line)
- }
-
- val = lineRight[qLen:] + "\n"
- val, err = checkMultipleLines(buf, line, val, valQuote)
- if err != nil {
- return err
- }
- } else {
- val = lineRight[qLen : pos+qLen]
- }
- } else {
- val = strings.TrimSpace(cutComment(lineRight))
- val, isEnd, err = checkContinuationLines(buf, val)
- if err != nil {
- return err
- }
- }
-
- k, err := section.NewKey(kname, val)
- if err != nil {
- return err
- }
- k.isAutoIncr = isAutoIncr
- if len(comments) > 0 {
- k.Comment = comments
- comments = ""
- }
-
- if isEnd {
- break
- }
- }
- return nil
-}
-
-func (f *File) reload(s dataSource) error {
- r, err := s.ReadCloser()
- if err != nil {
- return err
- }
- defer r.Close()
-
- return f.parse(r)
-}
-
-// Reload reloads and parses all data sources.
-func (f *File) Reload() (err error) {
- for _, s := range f.dataSources {
- if err = f.reload(s); err != nil {
- return err
- }
- }
- return nil
-}
-
-// Append appends one or more data sources and reloads automatically.
-func (f *File) Append(source interface{}, others ...interface{}) error {
- ds, err := parseDataSource(source)
- if err != nil {
- return err
- }
- f.dataSources = append(f.dataSources, ds)
- for _, s := range others {
- ds, err = parseDataSource(s)
- if err != nil {
- return err
- }
- f.dataSources = append(f.dataSources, ds)
- }
- return f.Reload()
-}
-
-// WriteToIndent writes file content into io.Writer with given value indention.
-func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err error) {
- equalSign := "="
- if PrettyFormat {
- equalSign = " = "
- }
-
- // Use buffer to make sure target is safe until finish encoding.
- buf := bytes.NewBuffer(nil)
- for i, sname := range f.sectionList {
- sec := f.Section(sname)
- if len(sec.Comment) > 0 {
- if sec.Comment[0] != '#' && sec.Comment[0] != ';' {
- sec.Comment = "; " + sec.Comment
- }
- if _, err = buf.WriteString(sec.Comment + LineBreak); err != nil {
- return 0, err
- }
- }
-
- if i > 0 {
- if _, err = buf.WriteString("[" + sname + "]" + LineBreak); err != nil {
- return 0, err
- }
- } else {
- // Write nothing if default section is empty.
- if len(sec.keyList) == 0 {
- continue
- }
- }
-
- for _, kname := range sec.keyList {
- key := sec.Key(kname)
- if len(key.Comment) > 0 {
- if len(indent) > 0 && sname != DEFAULT_SECTION {
- buf.WriteString(indent)
- }
- if key.Comment[0] != '#' && key.Comment[0] != ';' {
- key.Comment = "; " + key.Comment
- }
- if _, err = buf.WriteString(key.Comment + LineBreak); err != nil {
- return 0, err
- }
- }
-
- if len(indent) > 0 && sname != DEFAULT_SECTION {
- buf.WriteString(indent)
- }
-
- switch {
- case key.isAutoIncr:
- kname = "-"
- case strings.Contains(kname, "`") || strings.Contains(kname, `"`):
- kname = `"""` + kname + `"""`
- case strings.Contains(kname, `=`) || strings.Contains(kname, `:`):
- kname = "`" + kname + "`"
- }
-
- val := key.value
- // In case key value contains "\n", "`" or "\"".
- if strings.Contains(val, "\n") || strings.Contains(val, "`") || strings.Contains(val, `"`) ||
- strings.Contains(val, "#") {
- val = `"""` + val + `"""`
- }
- if _, err = buf.WriteString(kname + equalSign + val + LineBreak); err != nil {
- return 0, err
- }
- }
-
- // Put a line between sections.
- if _, err = buf.WriteString(LineBreak); err != nil {
- return 0, err
- }
- }
-
- return buf.WriteTo(w)
-}
-
-// WriteTo writes file content into io.Writer.
-func (f *File) WriteTo(w io.Writer) (int64, error) {
- return f.WriteToIndent(w, "")
-}
-
-// SaveToIndent writes content to file system with given value indention.
-func (f *File) SaveToIndent(filename, indent string) error {
- // Note: Because we are truncating with os.Create,
- // so it's safer to save to a temporary file location and rename afte done.
- tmpPath := filename + "." + strconv.Itoa(time.Now().Nanosecond()) + ".tmp"
- defer os.Remove(tmpPath)
-
- fw, err := os.Create(tmpPath)
- if err != nil {
- return err
- }
-
- if _, err = f.WriteToIndent(fw, indent); err != nil {
- fw.Close()
- return err
- }
- fw.Close()
-
- // Remove old file and rename the new one.
- os.Remove(filename)
- return os.Rename(tmpPath, filename)
-}
-
-// SaveTo writes content to file system.
-func (f *File) SaveTo(filename string) error {
- return f.SaveToIndent(filename, "")
-}
diff --git a/Godeps/_workspace/src/github.com/go-ini/ini/ini_test.go b/Godeps/_workspace/src/github.com/go-ini/ini/ini_test.go
deleted file mode 100644
index 82ff36dd236..00000000000
--- a/Godeps/_workspace/src/github.com/go-ini/ini/ini_test.go
+++ /dev/null
@@ -1,512 +0,0 @@
-// Copyright 2014 Unknwon
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package ini
-
-import (
- "fmt"
- "strings"
- "testing"
- "time"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func Test_Version(t *testing.T) {
- Convey("Get version", t, func() {
- So(Version(), ShouldEqual, _VERSION)
- })
-}
-
-const _CONF_DATA = `
-; Package name
-NAME = ini
-; Package version
-VERSION = v1
-; Package import path
-IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s
-
-# Information about package author
-# Bio can be written in multiple lines.
-[author]
-NAME = Unknwon # Succeeding comment
-E-MAIL = fake@localhost
-GITHUB = https://github.com/%(NAME)s
-BIO = """Gopher.
-Coding addict.
-Good man.
-""" # Succeeding comment
-
-[package]
-CLONE_URL = https://%(IMPORT_PATH)s
-
-[package.sub]
-UNUSED_KEY = should be deleted
-
-[features]
--: Support read/write comments of keys and sections
--: Support auto-increment of key names
--: Support load multiple files to overwrite key values
-
-[types]
-STRING = str
-BOOL = true
-BOOL_FALSE = false
-FLOAT64 = 1.25
-INT = 10
-TIME = 2015-01-01T20:17:05Z
-DURATION = 2h45m
-UINT = 3
-
-[array]
-STRINGS = en, zh, de
-FLOAT64S = 1.1, 2.2, 3.3
-INTS = 1, 2, 3
-UINTS = 1, 2, 3
-TIMES = 2015-01-01T20:17:05Z,2015-01-01T20:17:05Z,2015-01-01T20:17:05Z
-
-[note]
-empty_lines = next line is empty\
-
-[advance]
-value with quotes = "some value"
-value quote2 again = 'some value'
-true = """"2+3=5""""
-"1+1=2" = true
-"""6+1=7""" = true
-"""` + "`" + `5+5` + "`" + `""" = 10
-""""6+6"""" = 12
-` + "`" + `7-2=4` + "`" + ` = false
-ADDRESS = ` + "`" + `404 road,
-NotFound, State, 50000` + "`" + `
-
-two_lines = how about \
- continuation lines?
-lots_of_lines = 1 \
- 2 \
- 3 \
- 4 \
-`
-
-func Test_Load(t *testing.T) {
- Convey("Load from data sources", t, func() {
-
- Convey("Load with empty data", func() {
- So(Empty(), ShouldNotBeNil)
- })
-
- Convey("Load with multiple data sources", func() {
- cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini")
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
- })
- })
-
- Convey("Bad load process", t, func() {
-
- Convey("Load from invalid data sources", func() {
- _, err := Load(_CONF_DATA)
- So(err, ShouldNotBeNil)
-
- _, err = Load("testdata/404.ini")
- So(err, ShouldNotBeNil)
-
- _, err = Load(1)
- So(err, ShouldNotBeNil)
-
- _, err = Load([]byte(""), 1)
- So(err, ShouldNotBeNil)
- })
-
- Convey("Load with empty section name", func() {
- _, err := Load([]byte("[]"))
- So(err, ShouldNotBeNil)
- })
-
- Convey("Load with bad keys", func() {
- _, err := Load([]byte(`"""name`))
- So(err, ShouldNotBeNil)
-
- _, err = Load([]byte(`"""name"""`))
- So(err, ShouldNotBeNil)
-
- _, err = Load([]byte(`""=1`))
- So(err, ShouldNotBeNil)
-
- _, err = Load([]byte(`=`))
- So(err, ShouldNotBeNil)
-
- _, err = Load([]byte(`name`))
- So(err, ShouldNotBeNil)
- })
-
- Convey("Load with bad values", func() {
- _, err := Load([]byte(`name="""Unknwon`))
- So(err, ShouldNotBeNil)
-
- _, err = Load([]byte(`key = "value`))
- So(err, ShouldNotBeNil)
- })
- })
-}
-
-func Test_Values(t *testing.T) {
- Convey("Test getting and setting values", t, func() {
- cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini")
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
-
- Convey("Get values in default section", func() {
- sec := cfg.Section("")
- So(sec, ShouldNotBeNil)
- So(sec.Key("NAME").Value(), ShouldEqual, "ini")
- So(sec.Key("NAME").String(), ShouldEqual, "ini")
- So(sec.Key("NAME").Validate(func(in string) string {
- return in
- }), ShouldEqual, "ini")
- So(sec.Key("NAME").Comment, ShouldEqual, "; Package name")
- So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "gopkg.in/ini.v1")
- })
-
- Convey("Get values in non-default section", func() {
- sec := cfg.Section("author")
- So(sec, ShouldNotBeNil)
- So(sec.Key("NAME").String(), ShouldEqual, "Unknwon")
- So(sec.Key("GITHUB").String(), ShouldEqual, "https://github.com/Unknwon")
-
- sec = cfg.Section("package")
- So(sec, ShouldNotBeNil)
- So(sec.Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1")
- })
-
- Convey("Get auto-increment key names", func() {
- keys := cfg.Section("features").Keys()
- for i, k := range keys {
- So(k.Name(), ShouldEqual, fmt.Sprintf("#%d", i+1))
- }
- })
-
- Convey("Get overwrite value", func() {
- So(cfg.Section("author").Key("E-MAIL").String(), ShouldEqual, "u@gogs.io")
- })
-
- Convey("Get sections", func() {
- sections := cfg.Sections()
- for i, name := range []string{DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "advance"} {
- So(sections[i].Name(), ShouldEqual, name)
- }
- })
-
- Convey("Get parent section value", func() {
- So(cfg.Section("package.sub").Key("CLONE_URL").String(), ShouldEqual, "https://gopkg.in/ini.v1")
- })
-
- Convey("Get multiple line value", func() {
- So(cfg.Section("author").Key("BIO").String(), ShouldEqual, "Gopher.\nCoding addict.\nGood man.\n")
- })
-
- Convey("Get values with type", func() {
- sec := cfg.Section("types")
- v1, err := sec.Key("BOOL").Bool()
- So(err, ShouldBeNil)
- So(v1, ShouldBeTrue)
-
- v1, err = sec.Key("BOOL_FALSE").Bool()
- So(err, ShouldBeNil)
- So(v1, ShouldBeFalse)
-
- v2, err := sec.Key("FLOAT64").Float64()
- So(err, ShouldBeNil)
- So(v2, ShouldEqual, 1.25)
-
- v3, err := sec.Key("INT").Int()
- So(err, ShouldBeNil)
- So(v3, ShouldEqual, 10)
-
- v4, err := sec.Key("INT").Int64()
- So(err, ShouldBeNil)
- So(v4, ShouldEqual, 10)
-
- v5, err := sec.Key("UINT").Uint()
- So(err, ShouldBeNil)
- So(v5, ShouldEqual, 3)
-
- v6, err := sec.Key("UINT").Uint64()
- So(err, ShouldBeNil)
- So(v6, ShouldEqual, 3)
-
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- v7, err := sec.Key("TIME").Time()
- So(err, ShouldBeNil)
- So(v7.String(), ShouldEqual, t.String())
-
- Convey("Must get values with type", func() {
- So(sec.Key("STRING").MustString("404"), ShouldEqual, "str")
- So(sec.Key("BOOL").MustBool(), ShouldBeTrue)
- So(sec.Key("FLOAT64").MustFloat64(), ShouldEqual, 1.25)
- So(sec.Key("INT").MustInt(), ShouldEqual, 10)
- So(sec.Key("INT").MustInt64(), ShouldEqual, 10)
- So(sec.Key("UINT").MustUint(), ShouldEqual, 3)
- So(sec.Key("UINT").MustUint64(), ShouldEqual, 3)
- So(sec.Key("TIME").MustTime().String(), ShouldEqual, t.String())
-
- dur, err := time.ParseDuration("2h45m")
- So(err, ShouldBeNil)
- So(sec.Key("DURATION").MustDuration().Seconds(), ShouldEqual, dur.Seconds())
-
- Convey("Must get values with default value", func() {
- So(sec.Key("STRING_404").MustString("404"), ShouldEqual, "404")
- So(sec.Key("BOOL_404").MustBool(true), ShouldBeTrue)
- So(sec.Key("FLOAT64_404").MustFloat64(2.5), ShouldEqual, 2.5)
- So(sec.Key("INT_404").MustInt(15), ShouldEqual, 15)
- So(sec.Key("INT_404").MustInt64(15), ShouldEqual, 15)
- So(sec.Key("UINT_404").MustUint(6), ShouldEqual, 6)
- So(sec.Key("UINT_404").MustUint64(6), ShouldEqual, 6)
-
- t, err := time.Parse(time.RFC3339, "2014-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- So(sec.Key("TIME_404").MustTime(t).String(), ShouldEqual, t.String())
-
- So(sec.Key("DURATION_404").MustDuration(dur).Seconds(), ShouldEqual, dur.Seconds())
- })
- })
- })
-
- Convey("Get value with candidates", func() {
- sec := cfg.Section("types")
- So(sec.Key("STRING").In("", []string{"str", "arr", "types"}), ShouldEqual, "str")
- So(sec.Key("FLOAT64").InFloat64(0, []float64{1.25, 2.5, 3.75}), ShouldEqual, 1.25)
- So(sec.Key("INT").InInt(0, []int{10, 20, 30}), ShouldEqual, 10)
- So(sec.Key("INT").InInt64(0, []int64{10, 20, 30}), ShouldEqual, 10)
- So(sec.Key("UINT").InUint(0, []uint{3, 6, 9}), ShouldEqual, 3)
- So(sec.Key("UINT").InUint64(0, []uint64{3, 6, 9}), ShouldEqual, 3)
-
- zt, err := time.Parse(time.RFC3339, "0001-01-01T01:00:00Z")
- So(err, ShouldBeNil)
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- So(sec.Key("TIME").InTime(zt, []time.Time{t, time.Now(), time.Now().Add(1 * time.Second)}).String(), ShouldEqual, t.String())
-
- Convey("Get value with candidates and default value", func() {
- So(sec.Key("STRING_404").In("str", []string{"str", "arr", "types"}), ShouldEqual, "str")
- So(sec.Key("FLOAT64_404").InFloat64(1.25, []float64{1.25, 2.5, 3.75}), ShouldEqual, 1.25)
- So(sec.Key("INT_404").InInt(10, []int{10, 20, 30}), ShouldEqual, 10)
- So(sec.Key("INT64_404").InInt64(10, []int64{10, 20, 30}), ShouldEqual, 10)
- So(sec.Key("UINT_404").InUint(3, []uint{3, 6, 9}), ShouldEqual, 3)
- So(sec.Key("UINT_404").InUint64(3, []uint64{3, 6, 9}), ShouldEqual, 3)
- So(sec.Key("TIME_404").InTime(t, []time.Time{time.Now(), time.Now(), time.Now().Add(1 * time.Second)}).String(), ShouldEqual, t.String())
- })
- })
-
- Convey("Get values in range", func() {
- sec := cfg.Section("types")
- So(sec.Key("FLOAT64").RangeFloat64(0, 1, 2), ShouldEqual, 1.25)
- So(sec.Key("INT").RangeInt(0, 10, 20), ShouldEqual, 10)
- So(sec.Key("INT").RangeInt64(0, 10, 20), ShouldEqual, 10)
-
- minT, err := time.Parse(time.RFC3339, "0001-01-01T01:00:00Z")
- So(err, ShouldBeNil)
- midT, err := time.Parse(time.RFC3339, "2013-01-01T01:00:00Z")
- So(err, ShouldBeNil)
- maxT, err := time.Parse(time.RFC3339, "9999-01-01T01:00:00Z")
- So(err, ShouldBeNil)
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- So(sec.Key("TIME").RangeTime(t, minT, maxT).String(), ShouldEqual, t.String())
-
- Convey("Get value in range with default value", func() {
- So(sec.Key("FLOAT64").RangeFloat64(5, 0, 1), ShouldEqual, 5)
- So(sec.Key("INT").RangeInt(7, 0, 5), ShouldEqual, 7)
- So(sec.Key("INT").RangeInt64(7, 0, 5), ShouldEqual, 7)
- So(sec.Key("TIME").RangeTime(t, minT, midT).String(), ShouldEqual, t.String())
- })
- })
-
- Convey("Get values into slice", func() {
- sec := cfg.Section("array")
- So(strings.Join(sec.Key("STRINGS").Strings(","), ","), ShouldEqual, "en,zh,de")
- So(len(sec.Key("STRINGS_404").Strings(",")), ShouldEqual, 0)
-
- vals1 := sec.Key("FLOAT64S").Float64s(",")
- for i, v := range []float64{1.1, 2.2, 3.3} {
- So(vals1[i], ShouldEqual, v)
- }
-
- vals2 := sec.Key("INTS").Ints(",")
- for i, v := range []int{1, 2, 3} {
- So(vals2[i], ShouldEqual, v)
- }
-
- vals3 := sec.Key("INTS").Int64s(",")
- for i, v := range []int64{1, 2, 3} {
- So(vals3[i], ShouldEqual, v)
- }
-
- vals4 := sec.Key("UINTS").Uints(",")
- for i, v := range []uint{1, 2, 3} {
- So(vals4[i], ShouldEqual, v)
- }
-
- vals5 := sec.Key("UINTS").Uint64s(",")
- for i, v := range []uint64{1, 2, 3} {
- So(vals5[i], ShouldEqual, v)
- }
-
- t, err := time.Parse(time.RFC3339, "2015-01-01T20:17:05Z")
- So(err, ShouldBeNil)
- vals6 := sec.Key("TIMES").Times(",")
- for i, v := range []time.Time{t, t, t} {
- So(vals6[i].String(), ShouldEqual, v.String())
- }
- })
-
- Convey("Get key hash", func() {
- cfg.Section("").KeysHash()
- })
-
- Convey("Set key value", func() {
- k := cfg.Section("author").Key("NAME")
- k.SetValue("无闻")
- So(k.String(), ShouldEqual, "无闻")
- })
-
- Convey("Get key strings", func() {
- So(strings.Join(cfg.Section("types").KeyStrings(), ","), ShouldEqual, "STRING,BOOL,BOOL_FALSE,FLOAT64,INT,TIME,DURATION,UINT")
- })
-
- Convey("Delete a key", func() {
- cfg.Section("package.sub").DeleteKey("UNUSED_KEY")
- _, err := cfg.Section("package.sub").GetKey("UNUSED_KEY")
- So(err, ShouldNotBeNil)
- })
-
- Convey("Get section strings", func() {
- So(strings.Join(cfg.SectionStrings(), ","), ShouldEqual, "DEFAULT,author,package,package.sub,features,types,array,note,advance")
- })
-
- Convey("Delete a section", func() {
- cfg.DeleteSection("")
- So(cfg.SectionStrings()[0], ShouldNotEqual, DEFAULT_SECTION)
- })
-
- Convey("Create new sections", func() {
- cfg.NewSections("test", "test2")
- _, err := cfg.GetSection("test")
- So(err, ShouldBeNil)
- _, err = cfg.GetSection("test2")
- So(err, ShouldBeNil)
- })
- })
-
- Convey("Test getting and setting bad values", t, func() {
- cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini")
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
-
- Convey("Create new key with empty name", func() {
- k, err := cfg.Section("").NewKey("", "")
- So(err, ShouldNotBeNil)
- So(k, ShouldBeNil)
- })
-
- Convey("Create new section with empty name", func() {
- s, err := cfg.NewSection("")
- So(err, ShouldNotBeNil)
- So(s, ShouldBeNil)
- })
-
- Convey("Create new sections with empty name", func() {
- So(cfg.NewSections(""), ShouldNotBeNil)
- })
-
- Convey("Get section that not exists", func() {
- s, err := cfg.GetSection("404")
- So(err, ShouldNotBeNil)
- So(s, ShouldBeNil)
-
- s = cfg.Section("404")
- So(s, ShouldNotBeNil)
- })
- })
-}
-
-func Test_File_Append(t *testing.T) {
- Convey("Append data sources", t, func() {
- cfg, err := Load([]byte(""))
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
-
- So(cfg.Append([]byte(""), []byte("")), ShouldBeNil)
-
- Convey("Append bad data sources", func() {
- So(cfg.Append(1), ShouldNotBeNil)
- So(cfg.Append([]byte(""), 1), ShouldNotBeNil)
- })
- })
-}
-
-func Test_File_SaveTo(t *testing.T) {
- Convey("Save file", t, func() {
- cfg, err := Load([]byte(_CONF_DATA), "testdata/conf.ini")
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
-
- cfg.Section("").Key("NAME").Comment = "Package name"
- cfg.Section("author").Comment = `Information about package author
-# Bio can be written in multiple lines.`
- cfg.Section("advanced").Key("val w/ pound").SetValue("my#password")
- So(cfg.SaveTo("testdata/conf_out.ini"), ShouldBeNil)
-
- cfg.Section("author").Key("NAME").Comment = "This is author name"
- So(cfg.SaveToIndent("testdata/conf_out.ini", "\t"), ShouldBeNil)
- })
-}
-
-func Benchmark_Key_Value(b *testing.B) {
- c, _ := Load([]byte(_CONF_DATA))
- for i := 0; i < b.N; i++ {
- c.Section("").Key("NAME").Value()
- }
-}
-
-func Benchmark_Key_String(b *testing.B) {
- c, _ := Load([]byte(_CONF_DATA))
- for i := 0; i < b.N; i++ {
- c.Section("").Key("NAME").String()
- }
-}
-
-func Benchmark_Key_Value_NonBlock(b *testing.B) {
- c, _ := Load([]byte(_CONF_DATA))
- c.BlockMode = false
- for i := 0; i < b.N; i++ {
- c.Section("").Key("NAME").Value()
- }
-}
-
-func Benchmark_Key_String_NonBlock(b *testing.B) {
- c, _ := Load([]byte(_CONF_DATA))
- c.BlockMode = false
- for i := 0; i < b.N; i++ {
- c.Section("").Key("NAME").String()
- }
-}
-
-func Benchmark_Key_SetValue(b *testing.B) {
- c, _ := Load([]byte(_CONF_DATA))
- for i := 0; i < b.N; i++ {
- c.Section("").Key("NAME").SetValue("10")
- }
-}
diff --git a/Godeps/_workspace/src/github.com/go-ini/ini/struct_test.go b/Godeps/_workspace/src/github.com/go-ini/ini/struct_test.go
deleted file mode 100644
index d865ad78eb7..00000000000
--- a/Godeps/_workspace/src/github.com/go-ini/ini/struct_test.go
+++ /dev/null
@@ -1,239 +0,0 @@
-// Copyright 2014 Unknwon
-//
-// Licensed under the Apache License, Version 2.0 (the "License"): you may
-// not use this file except in compliance with the License. You may obtain
-// a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-
-package ini
-
-import (
- "strings"
- "testing"
- "time"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-type testNested struct {
- Cities []string `delim:"|"`
- Visits []time.Time
- Note string
- Unused int `ini:"-"`
-}
-
-type testEmbeded struct {
- GPA float64
-}
-
-type testStruct struct {
- Name string `ini:"NAME"`
- Age int
- Male bool
- Money float64
- Born time.Time
- Time time.Duration `ini:"Duration"`
- Others testNested
- *testEmbeded `ini:"grade"`
- Unused int `ini:"-"`
- Unsigned uint
-}
-
-const _CONF_DATA_STRUCT = `
-NAME = Unknwon
-Age = 21
-Male = true
-Money = 1.25
-Born = 1993-10-07T20:17:05Z
-Duration = 2h45m
-Unsigned = 3
-
-[Others]
-Cities = HangZhou|Boston
-Visits = 1993-10-07T20:17:05Z, 1993-10-07T20:17:05Z
-Note = Hello world!
-
-[grade]
-GPA = 2.8
-
-[foo.bar]
-Here = there
-When = then
-`
-
-type unsupport struct {
- Byte byte
-}
-
-type unsupport2 struct {
- Others struct {
- Cities byte
- }
-}
-
-type unsupport3 struct {
- Cities byte
-}
-
-type unsupport4 struct {
- *unsupport3 `ini:"Others"`
-}
-
-type defaultValue struct {
- Name string
- Age int
- Male bool
- Money float64
- Born time.Time
- Cities []string
-}
-
-type fooBar struct {
- Here, When string
-}
-
-const _INVALID_DATA_CONF_STRUCT = `
-Name =
-Age = age
-Male = 123
-Money = money
-Born = nil
-Cities =
-`
-
-func Test_Struct(t *testing.T) {
- Convey("Map to struct", t, func() {
- Convey("Map file to struct", func() {
- ts := new(testStruct)
- So(MapTo(ts, []byte(_CONF_DATA_STRUCT)), ShouldBeNil)
-
- So(ts.Name, ShouldEqual, "Unknwon")
- So(ts.Age, ShouldEqual, 21)
- So(ts.Male, ShouldBeTrue)
- So(ts.Money, ShouldEqual, 1.25)
- So(ts.Unsigned, ShouldEqual, 3)
-
- t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z")
- So(err, ShouldBeNil)
- So(ts.Born.String(), ShouldEqual, t.String())
-
- dur, err := time.ParseDuration("2h45m")
- So(err, ShouldBeNil)
- So(ts.Time.Seconds(), ShouldEqual, dur.Seconds())
-
- So(strings.Join(ts.Others.Cities, ","), ShouldEqual, "HangZhou,Boston")
- So(ts.Others.Visits[0].String(), ShouldEqual, t.String())
- So(ts.Others.Note, ShouldEqual, "Hello world!")
- So(ts.testEmbeded.GPA, ShouldEqual, 2.8)
- })
-
- Convey("Map section to struct", func() {
- foobar := new(fooBar)
- f, err := Load([]byte(_CONF_DATA_STRUCT))
- So(err, ShouldBeNil)
-
- So(f.Section("foo.bar").MapTo(foobar), ShouldBeNil)
- So(foobar.Here, ShouldEqual, "there")
- So(foobar.When, ShouldEqual, "then")
- })
-
- Convey("Map to non-pointer struct", func() {
- cfg, err := Load([]byte(_CONF_DATA_STRUCT))
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
-
- So(cfg.MapTo(testStruct{}), ShouldNotBeNil)
- })
-
- Convey("Map to unsupported type", func() {
- cfg, err := Load([]byte(_CONF_DATA_STRUCT))
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
-
- cfg.NameMapper = func(raw string) string {
- if raw == "Byte" {
- return "NAME"
- }
- return raw
- }
- So(cfg.MapTo(&unsupport{}), ShouldNotBeNil)
- So(cfg.MapTo(&unsupport2{}), ShouldNotBeNil)
- So(cfg.MapTo(&unsupport4{}), ShouldNotBeNil)
- })
-
- Convey("Map from invalid data source", func() {
- So(MapTo(&testStruct{}, "hi"), ShouldNotBeNil)
- })
-
- Convey("Map to wrong types and gain default values", func() {
- cfg, err := Load([]byte(_INVALID_DATA_CONF_STRUCT))
- So(err, ShouldBeNil)
-
- t, err := time.Parse(time.RFC3339, "1993-10-07T20:17:05Z")
- So(err, ShouldBeNil)
- dv := &defaultValue{"Joe", 10, true, 1.25, t, []string{"HangZhou", "Boston"}}
- So(cfg.MapTo(dv), ShouldBeNil)
- So(dv.Name, ShouldEqual, "Joe")
- So(dv.Age, ShouldEqual, 10)
- So(dv.Male, ShouldBeTrue)
- So(dv.Money, ShouldEqual, 1.25)
- So(dv.Born.String(), ShouldEqual, t.String())
- So(strings.Join(dv.Cities, ","), ShouldEqual, "HangZhou,Boston")
- })
- })
-
- Convey("Reflect from struct", t, func() {
- type Embeded struct {
- Dates []time.Time `delim:"|"`
- Places []string
- None []int
- }
- type Author struct {
- Name string `ini:"NAME"`
- Male bool
- Age int
- GPA float64
- NeverMind string `ini:"-"`
- *Embeded `ini:"infos"`
- }
- a := &Author{"Unknwon", true, 21, 2.8, "",
- &Embeded{
- []time.Time{time.Now(), time.Now()},
- []string{"HangZhou", "Boston"},
- []int{},
- }}
- cfg := Empty()
- So(ReflectFrom(cfg, a), ShouldBeNil)
- cfg.SaveTo("testdata/conf_reflect.ini")
-
- Convey("Reflect from non-point struct", func() {
- So(ReflectFrom(cfg, Author{}), ShouldNotBeNil)
- })
- })
-}
-
-type testMapper struct {
- PackageName string
-}
-
-func Test_NameGetter(t *testing.T) {
- Convey("Test name mappers", t, func() {
- So(MapToWithMapper(&testMapper{}, TitleUnderscore, []byte("packag_name=ini")), ShouldBeNil)
-
- cfg, err := Load([]byte("PACKAGE_NAME=ini"))
- So(err, ShouldBeNil)
- So(cfg, ShouldNotBeNil)
-
- cfg.NameMapper = AllCapsUnderscore
- tg := new(testMapper)
- So(cfg.MapTo(tg), ShouldBeNil)
- So(tg.PackageName, ShouldEqual, "ini")
- })
-}
diff --git a/Godeps/_workspace/src/github.com/go-ini/ini/testdata/conf.ini b/Godeps/_workspace/src/github.com/go-ini/ini/testdata/conf.ini
deleted file mode 100644
index 2ed0ac1d3ac..00000000000
--- a/Godeps/_workspace/src/github.com/go-ini/ini/testdata/conf.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[author]
-E-MAIL = u@gogs.io
\ No newline at end of file
diff --git a/Godeps/_workspace/src/github.com/go-xorm/xorm/docs/images/cache_design.png b/Godeps/_workspace/src/github.com/go-xorm/xorm/docs/images/cache_design.png
deleted file mode 100644
index 11ce817663c..00000000000
Binary files a/Godeps/_workspace/src/github.com/go-xorm/xorm/docs/images/cache_design.png and /dev/null differ
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/LICENSE b/Godeps/_workspace/src/github.com/grafana/grafana-cli/LICENSE
deleted file mode 100644
index 8dada3edaf5..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright {yyyy} {name of copyright owner}
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/command_line.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/command_line.go
deleted file mode 100644
index edbdc03d7c2..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/command_line.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package commands
-
-import (
- "github.com/codegangsta/cli"
-)
-
-type CommandLine interface {
- ShowHelp()
- ShowVersion()
- Application() *cli.App
- Args() cli.Args
- Bool(name string) bool
- Int(name string) int
- String(name string) string
- StringSlice(name string) []string
- GlobalString(name string) string
- FlagNames() (names []string)
- Generic(name string) interface{}
-}
-
-type contextCommandLine struct {
- *cli.Context
-}
-
-func (c *contextCommandLine) ShowHelp() {
- cli.ShowCommandHelp(c.Context, c.Command.Name)
-}
-
-func (c *contextCommandLine) ShowVersion() {
- cli.ShowVersion(c.Context)
-}
-
-func (c *contextCommandLine) Application() *cli.App {
- return c.App
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commands.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commands.go
deleted file mode 100644
index e72a1e45ff6..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commands.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package commands
-
-import (
- "github.com/codegangsta/cli"
- "github.com/grafana/grafana-cli/pkg/log"
-)
-
-func runCommand(command func(commandLine CommandLine) error) func(context *cli.Context) {
- return func(context *cli.Context) {
-
- cmd := &contextCommandLine{context}
- if err := command(cmd); err != nil {
- log.Errorf("%v\n\n", err)
-
- cmd.ShowHelp()
- } else {
- log.Info("Restart grafana after installing plugins . \n")
- }
- }
-}
-
-var Commands = []cli.Command{
- {
- Name: "install",
- Usage: "installs stuff",
- Action: runCommand(installCommand),
- }, {
- Name: "list-remote",
- Usage: "list remote available plugins",
- Action: runCommand(listremoteCommand),
- }, {
- Name: "upgrade",
- Usage: "upgrades one plugin",
- Action: runCommand(upgradeCommand),
- }, {
- Name: "upgrade-all",
- Usage: "upgrades all your installed plugins",
- Action: runCommand(upgradeAllCommand),
- }, {
- Name: "ls",
- Usage: "list all installed plugins",
- Action: runCommand(lsCommand),
- }, {
- Name: "remove",
- Usage: "removes stuff",
- Action: runCommand(removeCommand),
- },
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commandstest/fake_commandLine.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commandstest/fake_commandLine.go
deleted file mode 100644
index 4a070b5a192..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commandstest/fake_commandLine.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package commandstest
-
-import (
- "github.com/codegangsta/cli"
-)
-
-type FakeFlagger struct {
- Data map[string]interface{}
-}
-
-type FakeCommandLine struct {
- LocalFlags, GlobalFlags *FakeFlagger
- HelpShown, VersionShown bool
- CliArgs []string
-}
-
-func (ff FakeFlagger) String(key string) string {
- if value, ok := ff.Data[key]; ok {
- return value.(string)
- }
- return ""
-}
-
-func (ff FakeFlagger) StringSlice(key string) []string {
- if value, ok := ff.Data[key]; ok {
- return value.([]string)
- }
- return []string{}
-}
-
-func (ff FakeFlagger) Int(key string) int {
- if value, ok := ff.Data[key]; ok {
- return value.(int)
- }
- return 0
-}
-
-func (ff FakeFlagger) Bool(key string) bool {
- if value, ok := ff.Data[key]; ok {
- return value.(bool)
- }
- return false
-}
-
-func (fcli *FakeCommandLine) String(key string) string {
- return fcli.LocalFlags.String(key)
-}
-
-func (fcli *FakeCommandLine) StringSlice(key string) []string {
- return fcli.LocalFlags.StringSlice(key)
-}
-
-func (fcli *FakeCommandLine) Int(key string) int {
- return fcli.LocalFlags.Int(key)
-}
-
-func (fcli *FakeCommandLine) Bool(key string) bool {
- if fcli.LocalFlags == nil {
- return false
- }
- return fcli.LocalFlags.Bool(key)
-}
-
-func (fcli *FakeCommandLine) GlobalString(key string) string {
- return fcli.GlobalFlags.String(key)
-}
-
-func (fcli *FakeCommandLine) Generic(name string) interface{} {
- return fcli.LocalFlags.Data[name]
-}
-
-func (fcli *FakeCommandLine) FlagNames() []string {
- flagNames := []string{}
- for key := range fcli.LocalFlags.Data {
- flagNames = append(flagNames, key)
- }
-
- return flagNames
-}
-
-func (fcli *FakeCommandLine) ShowHelp() {
- fcli.HelpShown = true
-}
-
-func (fcli *FakeCommandLine) Application() *cli.App {
- return cli.NewApp()
-}
-
-func (fcli *FakeCommandLine) Args() cli.Args {
- return fcli.CliArgs
-}
-
-func (fcli *FakeCommandLine) ShowVersion() {
- fcli.VersionShown = true
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commandstest/fake_ioutil.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commandstest/fake_ioutil.go
deleted file mode 100644
index e6715a5ea77..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/commandstest/fake_ioutil.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package commandstest
-
-import (
- "os"
- "time"
-)
-
-type FakeIoUtil struct {
- FakeReadDir []os.FileInfo
- FakeIsDirectory bool
-}
-
-func (util *FakeIoUtil) Stat(path string) (os.FileInfo, error) {
- return FakeFileInfo{IsDirectory: util.FakeIsDirectory}, nil
-}
-
-func (util *FakeIoUtil) RemoveAll(path string) error {
- return nil
-}
-
-func (util *FakeIoUtil) ReadDir(path string) ([]os.FileInfo, error) {
- return util.FakeReadDir, nil
-}
-
-func (i *FakeIoUtil) ReadFile(filename string) ([]byte, error) {
- return make([]byte, 0), nil
-}
-
-type FakeFileInfo struct {
- IsDirectory bool
-}
-
-func (ffi FakeFileInfo) IsDir() bool {
- return ffi.IsDirectory
-}
-
-func (ffi FakeFileInfo) Size() int64 {
- return 1
-}
-
-func (ffi FakeFileInfo) Mode() os.FileMode {
- return 0777
-}
-
-func (ffi FakeFileInfo) Name() string {
- return ""
-}
-
-func (ffi FakeFileInfo) ModTime() time.Time {
- return time.Time{}
-}
-
-func (ffi FakeFileInfo) Sys() interface{} {
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/install_command.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/install_command.go
deleted file mode 100644
index f8807d66108..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/install_command.go
+++ /dev/null
@@ -1,146 +0,0 @@
-package commands
-
-import (
- "archive/zip"
- "bytes"
- "errors"
- "github.com/grafana/grafana-cli/pkg/log"
- m "github.com/grafana/grafana-cli/pkg/models"
- services "github.com/grafana/grafana-cli/pkg/services"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "path"
- "regexp"
-)
-
-func validateInput(c CommandLine, pluginFolder string) error {
- arg := c.Args().First()
- if arg == "" {
- return errors.New("please specify plugin to install")
- }
-
- pluginDir := c.GlobalString("path")
- if pluginDir == "" {
- return errors.New("missing path flag")
- }
-
- fileinfo, err := os.Stat(pluginDir)
- if err != nil && !fileinfo.IsDir() {
- return errors.New("path is not a directory")
- }
-
- return nil
-}
-
-func installCommand(c CommandLine) error {
- pluginFolder := c.GlobalString("path")
- if err := validateInput(c, pluginFolder); err != nil {
- return err
- }
-
- pluginToInstall := c.Args().First()
- version := c.Args().Get(1)
-
- log.Infof("version: %v\n", version)
-
- return InstallPlugin(pluginToInstall, pluginFolder, version)
-}
-
-func InstallPlugin(pluginName, pluginFolder, version string) error {
- plugin, err := services.GetPlugin(pluginName)
- if err != nil {
- return err
- }
-
- v, err := SelectVersion(plugin, version)
- if err != nil {
- return err
- }
-
- url := v.Url
- commit := v.Commit
-
- downloadURL := url + "/archive/" + commit + ".zip"
-
- log.Infof("installing %v @ %v\n", plugin.Id, version)
- log.Infof("from url: %v\n", downloadURL)
- log.Infof("on commit: %v\n", commit)
- log.Infof("into: %v\n", pluginFolder)
-
- err = downloadFile(plugin.Id, pluginFolder, downloadURL)
- if err == nil {
- log.Info("Installed %s successfully ✔\n", plugin.Id)
- }
-
- res := services.ReadPlugin(pluginFolder, pluginName)
-
- for _, v := range res.Dependency.Plugins {
- log.Infof("Depends on %s install!\n", v.Id)
-
- //Todo: uncomment this code once the repo is more correct.
- //InstallPlugin(v.Id, pluginFolder, "")
- }
-
- return err
-}
-
-func SelectVersion(plugin m.Plugin, version string) (m.Version, error) {
- if version == "" {
- return plugin.Versions[0], nil
- }
-
- for _, v := range plugin.Versions {
- if v.Version == version {
- return v, nil
- }
- }
-
- return m.Version{}, errors.New("Could not find the version your looking for")
-}
-
-func RemoveGitBuildFromname(pluginname, filename string) string {
- r := regexp.MustCompile("^[a-zA-Z0-9_.-]*/")
- return r.ReplaceAllString(filename, pluginname+"/")
-}
-
-func downloadFile(pluginName, filepath, url string) (err error) {
- resp, err := http.Get(url)
- if err != nil {
- return err
- }
- defer resp.Body.Close()
-
- body, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- return err
- }
-
- r, err := zip.NewReader(bytes.NewReader(body), resp.ContentLength)
- if err != nil {
- return err
- }
- for _, zf := range r.File {
- newfile := path.Join(filepath, RemoveGitBuildFromname(pluginName, zf.Name))
-
- if zf.FileInfo().IsDir() {
- os.Mkdir(newfile, 0777)
- } else {
- dst, err := os.Create(newfile)
- if err != nil {
- log.Errorf("%v", err)
- }
- defer dst.Close()
- src, err := zf.Open()
- if err != nil {
- log.Errorf("%v", err)
- }
- defer src.Close()
-
- io.Copy(dst, src)
- }
- }
-
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/listremote_command.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/listremote_command.go
deleted file mode 100644
index 9dc1af204c9..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/listremote_command.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package commands
-
-import (
- "github.com/grafana/grafana-cli/pkg/log"
- "github.com/grafana/grafana-cli/pkg/services"
-)
-
-func listremoteCommand(c CommandLine) error {
- plugin, err := services.ListAllPlugins()
-
- if err != nil {
- return err
- }
-
- for _, i := range plugin.Plugins {
- log.Infof("id: %v version:\n", i.Id)
- }
-
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/ls_command.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/ls_command.go
deleted file mode 100644
index 7965f74de27..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/ls_command.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package commands
-
-import (
- "errors"
- "github.com/grafana/grafana-cli/pkg/log"
- m "github.com/grafana/grafana-cli/pkg/models"
- s "github.com/grafana/grafana-cli/pkg/services"
-)
-
-var getPlugins func(path string) []m.InstalledPlugin
-
-var GetStat m.IoUtil
-
-func init() {
- getPlugins = s.GetLocalPlugins
- GetStat = s.IoUtil
-}
-
-func validateCommand(pluginDir string) error {
- if pluginDir == "" {
- return errors.New("missing path flag")
- }
-
- log.Info("plugindir: " + pluginDir + "\n")
- pluginDirInfo, err := GetStat.Stat(pluginDir)
-
- if err != nil {
- return errors.New("missing path flag")
- }
-
- if pluginDirInfo.IsDir() == false {
- return errors.New("plugin path is not a directory")
- }
-
- return nil
-}
-
-func lsCommand(c CommandLine) error {
- pluginDir := c.GlobalString("path")
- if err := validateCommand(pluginDir); err != nil {
- return err
- }
-
- for _, plugin := range getPlugins(pluginDir) {
- log.Infof("plugin: %s @ %s \n", plugin.Name, plugin.Info.Version)
- }
-
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/remove_command.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/remove_command.go
deleted file mode 100644
index 4a25d04404e..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/remove_command.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package commands
-
-import (
- "errors"
- "github.com/grafana/grafana-cli/pkg/log"
- m "github.com/grafana/grafana-cli/pkg/models"
- services "github.com/grafana/grafana-cli/pkg/services"
-)
-
-var getPluginss func(path string) []m.InstalledPlugin = services.GetLocalPlugins
-var removePlugin func(pluginPath, id string) error = services.RemoveInstalledPlugin
-
-func removeCommand(c CommandLine) error {
- pluginPath := c.GlobalString("path")
- localPlugins := getPluginss(pluginPath)
-
- log.Info("remove!\n")
-
- plugin := c.Args().First()
- log.Info("plugin: " + plugin + "\n")
- if plugin == "" {
- return errors.New("Missing which plugin parameter")
- }
-
- log.Infof("plugins : \n%v\n", localPlugins)
-
- for _, p := range localPlugins {
- log.Infof("is %s == %s ? %v", p.Id, c.Args().First(), p.Id == c.Args().First())
- if p.Id == c.Args().First() {
- removePlugin(pluginPath, p.Id)
- }
- }
-
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/upgrade_all_command.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/upgrade_all_command.go
deleted file mode 100644
index 97454769e62..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/upgrade_all_command.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package commands
-
-import (
- "github.com/grafana/grafana-cli/pkg/log"
- m "github.com/grafana/grafana-cli/pkg/models"
- services "github.com/grafana/grafana-cli/pkg/services"
- "github.com/hashicorp/go-version"
-)
-
-func ShouldUpgrade(installed string, remote m.Plugin) bool {
- installedVersion, err1 := version.NewVersion(installed)
-
- if err1 != nil {
- return false
- }
-
- for _, v := range remote.Versions {
- remoteVersion, err2 := version.NewVersion(v.Version)
-
- if err2 == nil {
- if installedVersion.LessThan(remoteVersion) {
- return true
- }
- }
- }
-
- return false
-}
-
-func upgradeAllCommand(c CommandLine) error {
- pluginDir := c.GlobalString("path")
-
- localPlugins := services.GetLocalPlugins(pluginDir)
-
- remotePlugins, err := services.ListAllPlugins()
-
- if err != nil {
- return err
- }
-
- pluginsToUpgrade := make([]m.InstalledPlugin, 0)
-
- for _, localPlugin := range localPlugins {
- for _, remotePlugin := range remotePlugins.Plugins {
- if localPlugin.Id == remotePlugin.Id {
- if ShouldUpgrade(localPlugin.Info.Version, remotePlugin) {
- pluginsToUpgrade = append(pluginsToUpgrade, localPlugin)
- }
- }
- }
- }
-
- for _, p := range pluginsToUpgrade {
- log.Infof("lets upgrade %v \n", p)
-
- services.RemoveInstalledPlugin(pluginDir, p.Id)
- InstallPlugin(p.Id, pluginDir, "")
- }
-
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/upgrade_command.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/upgrade_command.go
deleted file mode 100644
index df9581b3dc3..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/commands/upgrade_command.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package commands
-
-import (
- "errors"
-)
-
-func upgradeCommand(c CommandLine) error {
- return errors.New("Not yet Implemented")
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/log/log.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/log/log.go
deleted file mode 100644
index c8222d60c81..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/log/log.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package log
-
-import (
- "fmt"
-)
-
-var (
- debugmode = false
-)
-
-func Debug(args ...interface{}) {
- if debugmode {
- fmt.Print(args...)
- }
-}
-
-func Debugf(fmtString string, args ...interface{}) {
- if debugmode {
- fmt.Printf(fmtString, args...)
- }
-}
-
-func Error(args ...interface{}) {
- fmt.Print(args...)
-}
-
-func Errorf(fmtString string, args ...interface{}) {
- fmt.Printf(fmtString, args...)
-}
-
-func Info(args ...interface{}) {
- fmt.Print(args...)
-}
-
-func Infof(fmtString string, args ...interface{}) {
- fmt.Printf(fmtString, args...)
-}
-
-func Warn(args ...interface{}) {
- fmt.Print(args...)
-}
-
-func Warnf(fmtString string, args ...interface{}) {
- fmt.Printf(fmtString, args...)
-}
-
-func SetDebug(value bool) {
- debugmode = value
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/models/model.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/models/model.go
deleted file mode 100644
index 3a39c5fbe65..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/models/model.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package models
-
-import (
- "os"
-)
-
-type InstalledPlugin struct {
- Id string `json:"id"`
- Name string `json:"name"`
- Type string `json:"type"`
-
- Info PluginInfo `json:"info"`
- Dependency Dependency `json:"dependencies"`
-}
-
-type Dependency struct {
- GrafanaVersion string `json:"grafanaVersion"`
- Plugins []Plugin `json:"plugins"`
-}
-
-type PluginInfo struct {
- Version string `json:"version"`
- Updated string `json:"updated"`
-}
-
-type Plugin struct {
- Id string `json:"id"`
- Category string `json:"category"`
- Versions []Version `json:"versions"`
-}
-
-type Version struct {
- Commit string `json:"commit"`
- Url string `json:"url"`
- Version string `json:"version"`
-}
-
-type PluginRepo struct {
- Plugins []Plugin `json:"plugins"`
- Version string `json:"version"`
-}
-
-type IoUtil interface {
- Stat(path string) (os.FileInfo, error)
- RemoveAll(path string) error
- ReadDir(path string) ([]os.FileInfo, error)
- ReadFile(filename string) ([]byte, error)
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/services/io_util.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/services/io_util.go
deleted file mode 100644
index 5a7cd187575..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/services/io_util.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package services
-
-import (
- m "github.com/grafana/grafana-cli/pkg/models"
- "io/ioutil"
- "os"
-)
-
-var IoUtil m.IoUtil = IoUtilImp{}
-
-type IoUtilImp struct {
-}
-
-func (i IoUtilImp) Stat(path string) (os.FileInfo, error) {
- return os.Stat(path)
-}
-
-func (i IoUtilImp) RemoveAll(path string) error {
- return os.RemoveAll(path)
-}
-
-func (i IoUtilImp) ReadDir(path string) ([]os.FileInfo, error) {
- return ioutil.ReadDir(path)
-}
-
-func (i IoUtilImp) ReadFile(filename string) ([]byte, error) {
- return ioutil.ReadFile(filename)
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/services/services.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/services/services.go
deleted file mode 100644
index 9e5b65f5e84..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/services/services.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package services
-
-import (
- "encoding/json"
- "errors"
- "github.com/franela/goreq"
- m "github.com/grafana/grafana-cli/pkg/models"
- "path"
-)
-
-var IoHelper m.IoUtil = IoUtilImp{}
-
-func ListAllPlugins() (m.PluginRepo, error) {
- res, _ := goreq.Request{Uri: "https://raw.githubusercontent.com/grafana/grafana-plugin-repository/master/repo.json"}.Do()
-
- var resp m.PluginRepo
- err := res.Body.FromJsonTo(&resp)
- if err != nil {
- return m.PluginRepo{}, errors.New("Could not load plugin data")
- }
-
- return resp, nil
-}
-
-func ReadPlugin(pluginDir, pluginName string) m.InstalledPlugin {
- pluginDataPath := path.Join(pluginDir, pluginName, "plugin.json")
- pluginData, _ := IoHelper.ReadFile(pluginDataPath)
-
- res := m.InstalledPlugin{}
- json.Unmarshal(pluginData, &res)
-
- if res.Info.Version == "" {
- res.Info.Version = "0.0.0"
- }
-
- if res.Id == "" {
- res.Id = res.Name
- }
-
- return res
-}
-
-func GetLocalPlugins(pluginDir string) []m.InstalledPlugin {
- result := make([]m.InstalledPlugin, 0)
- files, _ := IoHelper.ReadDir(pluginDir)
- for _, f := range files {
- res := ReadPlugin(pluginDir, f.Name())
- result = append(result, res)
- }
-
- return result
-}
-
-func RemoveInstalledPlugin(pluginPath, id string) error {
- return IoHelper.RemoveAll(path.Join(pluginPath, id))
-}
-
-func GetPlugin(id string) (m.Plugin, error) {
- resp, err := ListAllPlugins()
- if err != nil {
- }
-
- for _, i := range resp.Plugins {
- if i.Id == id {
- return i, nil
- }
- }
-
- return m.Plugin{}, errors.New("could not find plugin named \"" + id + "\"")
-}
diff --git a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/version/version.go b/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/version/version.go
deleted file mode 100644
index 2a0eddf9859..00000000000
--- a/Godeps/_workspace/src/github.com/grafana/grafana-cli/pkg/version/version.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package version
-
-var (
- Version = "0.0.2"
-)
diff --git a/Godeps/_workspace/src/github.com/mattn/go-sqlite3/error_test.go b/Godeps/_workspace/src/github.com/mattn/go-sqlite3/error_test.go
deleted file mode 100644
index 1ccbe5bf858..00000000000
--- a/Godeps/_workspace/src/github.com/mattn/go-sqlite3/error_test.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright (C) 2014 Yasuhiro Matsumoto .
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package sqlite3
-
-import (
- "database/sql"
- "io/ioutil"
- "os"
- "path"
- "testing"
-)
-
-func TestSimpleError(t *testing.T) {
- e := ErrError.Error()
- if e != "SQL logic error or missing database" {
- t.Error("wrong error code:" + e)
- }
-}
-
-func TestCorruptDbErrors(t *testing.T) {
- dirName, err := ioutil.TempDir("", "sqlite3")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(dirName)
-
- dbFileName := path.Join(dirName, "test.db")
- f, err := os.Create(dbFileName)
- if err != nil {
- t.Error(err)
- }
- f.Write([]byte{1, 2, 3, 4, 5})
- f.Close()
-
- db, err := sql.Open("sqlite3", dbFileName)
- if err == nil {
- _, err = db.Exec("drop table foo")
- }
-
- sqliteErr := err.(Error)
- if sqliteErr.Code != ErrNotADB {
- t.Error("wrong error code for corrupted DB")
- }
- if err.Error() == "" {
- t.Error("wrong error string for corrupted DB")
- }
- db.Close()
-}
-
-func TestSqlLogicErrors(t *testing.T) {
- dirName, err := ioutil.TempDir("", "sqlite3")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(dirName)
-
- dbFileName := path.Join(dirName, "test.db")
- db, err := sql.Open("sqlite3", dbFileName)
- if err != nil {
- t.Error(err)
- }
- defer db.Close()
-
- _, err = db.Exec("CREATE TABLE Foo (id INTEGER PRIMARY KEY)")
- if err != nil {
- t.Error(err)
- }
-
- const expectedErr = "table Foo already exists"
- _, err = db.Exec("CREATE TABLE Foo (id INTEGER PRIMARY KEY)")
- if err.Error() != expectedErr {
- t.Errorf("Unexpected error: %s, expected %s", err.Error(), expectedErr)
- }
-
-}
-
-func TestExtendedErrorCodes_ForeignKey(t *testing.T) {
- dirName, err := ioutil.TempDir("", "sqlite3-err")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(dirName)
-
- dbFileName := path.Join(dirName, "test.db")
- db, err := sql.Open("sqlite3", dbFileName)
- if err != nil {
- t.Error(err)
- }
- defer db.Close()
-
- _, err = db.Exec("PRAGMA foreign_keys=ON;")
- if err != nil {
- t.Errorf("PRAGMA foreign_keys=ON: %v", err)
- }
-
- _, err = db.Exec(`CREATE TABLE Foo (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- value INTEGER NOT NULL,
- ref INTEGER NULL REFERENCES Foo (id),
- UNIQUE(value)
- );`)
- if err != nil {
- t.Error(err)
- }
-
- _, err = db.Exec("INSERT INTO Foo (ref, value) VALUES (100, 100);")
- if err == nil {
- t.Error("No error!")
- } else {
- sqliteErr := err.(Error)
- if sqliteErr.Code != ErrConstraint {
- t.Errorf("Wrong basic error code: %d != %d",
- sqliteErr.Code, ErrConstraint)
- }
- if sqliteErr.ExtendedCode != ErrConstraintForeignKey {
- t.Errorf("Wrong extended error code: %d != %d",
- sqliteErr.ExtendedCode, ErrConstraintForeignKey)
- }
- }
-
-}
-
-func TestExtendedErrorCodes_NotNull(t *testing.T) {
- dirName, err := ioutil.TempDir("", "sqlite3-err")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(dirName)
-
- dbFileName := path.Join(dirName, "test.db")
- db, err := sql.Open("sqlite3", dbFileName)
- if err != nil {
- t.Error(err)
- }
- defer db.Close()
-
- _, err = db.Exec("PRAGMA foreign_keys=ON;")
- if err != nil {
- t.Errorf("PRAGMA foreign_keys=ON: %v", err)
- }
-
- _, err = db.Exec(`CREATE TABLE Foo (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- value INTEGER NOT NULL,
- ref INTEGER NULL REFERENCES Foo (id),
- UNIQUE(value)
- );`)
- if err != nil {
- t.Error(err)
- }
-
- res, err := db.Exec("INSERT INTO Foo (value) VALUES (100);")
- if err != nil {
- t.Fatalf("Creating first row: %v", err)
- }
-
- id, err := res.LastInsertId()
- if err != nil {
- t.Fatalf("Retrieving last insert id: %v", err)
- }
-
- _, err = db.Exec("INSERT INTO Foo (ref) VALUES (?);", id)
- if err == nil {
- t.Error("No error!")
- } else {
- sqliteErr := err.(Error)
- if sqliteErr.Code != ErrConstraint {
- t.Errorf("Wrong basic error code: %d != %d",
- sqliteErr.Code, ErrConstraint)
- }
- if sqliteErr.ExtendedCode != ErrConstraintNotNull {
- t.Errorf("Wrong extended error code: %d != %d",
- sqliteErr.ExtendedCode, ErrConstraintNotNull)
- }
- }
-
-}
-
-func TestExtendedErrorCodes_Unique(t *testing.T) {
- dirName, err := ioutil.TempDir("", "sqlite3-err")
- if err != nil {
- t.Fatal(err)
- }
- defer os.RemoveAll(dirName)
-
- dbFileName := path.Join(dirName, "test.db")
- db, err := sql.Open("sqlite3", dbFileName)
- if err != nil {
- t.Error(err)
- }
- defer db.Close()
-
- _, err = db.Exec("PRAGMA foreign_keys=ON;")
- if err != nil {
- t.Errorf("PRAGMA foreign_keys=ON: %v", err)
- }
-
- _, err = db.Exec(`CREATE TABLE Foo (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- value INTEGER NOT NULL,
- ref INTEGER NULL REFERENCES Foo (id),
- UNIQUE(value)
- );`)
- if err != nil {
- t.Error(err)
- }
-
- res, err := db.Exec("INSERT INTO Foo (value) VALUES (100);")
- if err != nil {
- t.Fatalf("Creating first row: %v", err)
- }
-
- id, err := res.LastInsertId()
- if err != nil {
- t.Fatalf("Retrieving last insert id: %v", err)
- }
-
- _, err = db.Exec("INSERT INTO Foo (ref, value) VALUES (?, 100);", id)
- if err == nil {
- t.Error("No error!")
- } else {
- sqliteErr := err.(Error)
- if sqliteErr.Code != ErrConstraint {
- t.Errorf("Wrong basic error code: %d != %d",
- sqliteErr.Code, ErrConstraint)
- }
- if sqliteErr.ExtendedCode != ErrConstraintUnique {
- t.Errorf("Wrong extended error code: %d != %d",
- sqliteErr.ExtendedCode, ErrConstraintUnique)
- }
- extended := sqliteErr.Code.Extend(3).Error()
- expected := "constraint failed"
- if extended != expected {
- t.Errorf("Wrong basic error code: %q != %q",
- extended, expected)
- }
- }
-
-}
diff --git a/Godeps/_workspace/src/github.com/mattn/go-sqlite3/sqlite3_fts3_test.go b/Godeps/_workspace/src/github.com/mattn/go-sqlite3/sqlite3_fts3_test.go
deleted file mode 100644
index a1cd2172d79..00000000000
--- a/Godeps/_workspace/src/github.com/mattn/go-sqlite3/sqlite3_fts3_test.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (C) 2015 Yasuhiro Matsumoto .
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package sqlite3
-
-import (
- "database/sql"
- "os"
- "testing"
-)
-
-func TestFTS3(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("DROP TABLE foo")
- _, err = db.Exec("CREATE VIRTUAL TABLE foo USING fts3(id INTEGER PRIMARY KEY, value TEXT)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- _, err = db.Exec("INSERT INTO foo(id, value) VALUES(?, ?)", 1, `今日の 晩御飯は 天麩羅よ`)
- if err != nil {
- t.Fatal("Failed to insert value:", err)
- }
-
- _, err = db.Exec("INSERT INTO foo(id, value) VALUES(?, ?)", 2, `今日は いい 天気だ`)
- if err != nil {
- t.Fatal("Failed to insert value:", err)
- }
-
- rows, err := db.Query("SELECT id, value FROM foo WHERE value MATCH '今日* 天*'")
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
- defer rows.Close()
-
- for rows.Next() {
- var id int
- var value string
-
- if err := rows.Scan(&id, &value); err != nil {
- t.Error("Unable to scan results:", err)
- continue
- }
-
- if id == 1 && value != `今日の 晩御飯は 天麩羅よ` {
- t.Error("Value for id 1 should be `今日の 晩御飯は 天麩羅よ`, but:", value)
- } else if id == 2 && value != `今日は いい 天気だ` {
- t.Error("Value for id 2 should be `今日は いい 天気だ`, but:", value)
- }
- }
-
- rows, err = db.Query("SELECT value FROM foo WHERE value MATCH '今日* 天麩羅*'")
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
- defer rows.Close()
-
- var value string
- if !rows.Next() {
- t.Fatal("Result should be only one")
- }
-
- if err := rows.Scan(&value); err != nil {
- t.Fatal("Unable to scan results:", err)
- }
-
- if value != `今日の 晩御飯は 天麩羅よ` {
- t.Fatal("Value should be `今日の 晩御飯は 天麩羅よ`, but:", value)
- }
-
- if rows.Next() {
- t.Fatal("Result should be only one")
- }
-}
diff --git a/Godeps/_workspace/src/github.com/mattn/go-sqlite3/sqlite3_test.go b/Godeps/_workspace/src/github.com/mattn/go-sqlite3/sqlite3_test.go
deleted file mode 100644
index aa8601181b5..00000000000
--- a/Godeps/_workspace/src/github.com/mattn/go-sqlite3/sqlite3_test.go
+++ /dev/null
@@ -1,947 +0,0 @@
-// Copyright (C) 2014 Yasuhiro Matsumoto .
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package sqlite3
-
-import (
- "crypto/rand"
- "database/sql"
- "encoding/hex"
- "net/url"
- "os"
- "path/filepath"
- "strings"
- "testing"
- "time"
-
- "github.com/mattn/go-sqlite3/sqlite3_test"
-)
-
-func TempFilename() string {
- randBytes := make([]byte, 16)
- rand.Read(randBytes)
- return filepath.Join(os.TempDir(), "foo"+hex.EncodeToString(randBytes)+".db")
-}
-
-func TestOpen(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("drop table foo")
- _, err = db.Exec("create table foo (id integer)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- if stat, err := os.Stat(tempFilename); err != nil || stat.IsDir() {
- t.Error("Failed to create ./foo.db")
- }
-}
-
-func TestClose(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
-
- _, err = db.Exec("drop table foo")
- _, err = db.Exec("create table foo (id integer)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- stmt, err := db.Prepare("select id from foo where id = ?")
- if err != nil {
- t.Fatal("Failed to select records:", err)
- }
-
- db.Close()
- _, err = stmt.Exec(1)
- if err == nil {
- t.Fatal("Failed to operate closed statement")
- }
-}
-
-func TestInsert(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("drop table foo")
- _, err = db.Exec("create table foo (id integer)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- res, err := db.Exec("insert into foo(id) values(123)")
- if err != nil {
- t.Fatal("Failed to insert record:", err)
- }
- affected, _ := res.RowsAffected()
- if affected != 1 {
- t.Fatalf("Expected %d for affected rows, but %d:", 1, affected)
- }
-
- rows, err := db.Query("select id from foo")
- if err != nil {
- t.Fatal("Failed to select records:", err)
- }
- defer rows.Close()
-
- rows.Next()
-
- var result int
- rows.Scan(&result)
- if result != 123 {
- t.Errorf("Fetched %q; expected %q", 123, result)
- }
-}
-
-func TestUpdate(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("drop table foo")
- _, err = db.Exec("create table foo (id integer)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- res, err := db.Exec("insert into foo(id) values(123)")
- if err != nil {
- t.Fatal("Failed to insert record:", err)
- }
- expected, err := res.LastInsertId()
- if err != nil {
- t.Fatal("Failed to get LastInsertId:", err)
- }
- affected, _ := res.RowsAffected()
- if err != nil {
- t.Fatal("Failed to get RowsAffected:", err)
- }
- if affected != 1 {
- t.Fatalf("Expected %d for affected rows, but %d:", 1, affected)
- }
-
- res, err = db.Exec("update foo set id = 234")
- if err != nil {
- t.Fatal("Failed to update record:", err)
- }
- lastId, err := res.LastInsertId()
- if err != nil {
- t.Fatal("Failed to get LastInsertId:", err)
- }
- if expected != lastId {
- t.Errorf("Expected %q for last Id, but %q:", expected, lastId)
- }
- affected, _ = res.RowsAffected()
- if err != nil {
- t.Fatal("Failed to get RowsAffected:", err)
- }
- if affected != 1 {
- t.Fatalf("Expected %d for affected rows, but %d:", 1, affected)
- }
-
- rows, err := db.Query("select id from foo")
- if err != nil {
- t.Fatal("Failed to select records:", err)
- }
- defer rows.Close()
-
- rows.Next()
-
- var result int
- rows.Scan(&result)
- if result != 234 {
- t.Errorf("Fetched %q; expected %q", 234, result)
- }
-}
-
-func TestDelete(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("drop table foo")
- _, err = db.Exec("create table foo (id integer)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- res, err := db.Exec("insert into foo(id) values(123)")
- if err != nil {
- t.Fatal("Failed to insert record:", err)
- }
- expected, err := res.LastInsertId()
- if err != nil {
- t.Fatal("Failed to get LastInsertId:", err)
- }
- affected, err := res.RowsAffected()
- if err != nil {
- t.Fatal("Failed to get RowsAffected:", err)
- }
- if affected != 1 {
- t.Errorf("Expected %d for cout of affected rows, but %q:", 1, affected)
- }
-
- res, err = db.Exec("delete from foo where id = 123")
- if err != nil {
- t.Fatal("Failed to delete record:", err)
- }
- lastId, err := res.LastInsertId()
- if err != nil {
- t.Fatal("Failed to get LastInsertId:", err)
- }
- if expected != lastId {
- t.Errorf("Expected %q for last Id, but %q:", expected, lastId)
- }
- affected, err = res.RowsAffected()
- if err != nil {
- t.Fatal("Failed to get RowsAffected:", err)
- }
- if affected != 1 {
- t.Errorf("Expected %d for cout of affected rows, but %q:", 1, affected)
- }
-
- rows, err := db.Query("select id from foo")
- if err != nil {
- t.Fatal("Failed to select records:", err)
- }
- defer rows.Close()
-
- if rows.Next() {
- t.Error("Fetched row but expected not rows")
- }
-}
-
-func TestBooleanRoundtrip(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("DROP TABLE foo")
- _, err = db.Exec("CREATE TABLE foo(id INTEGER, value BOOL)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- _, err = db.Exec("INSERT INTO foo(id, value) VALUES(1, ?)", true)
- if err != nil {
- t.Fatal("Failed to insert true value:", err)
- }
-
- _, err = db.Exec("INSERT INTO foo(id, value) VALUES(2, ?)", false)
- if err != nil {
- t.Fatal("Failed to insert false value:", err)
- }
-
- rows, err := db.Query("SELECT id, value FROM foo")
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
- defer rows.Close()
-
- for rows.Next() {
- var id int
- var value bool
-
- if err := rows.Scan(&id, &value); err != nil {
- t.Error("Unable to scan results:", err)
- continue
- }
-
- if id == 1 && !value {
- t.Error("Value for id 1 should be true, not false")
-
- } else if id == 2 && value {
- t.Error("Value for id 2 should be false, not true")
- }
- }
-}
-
-func TestTimestamp(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("DROP TABLE foo")
- _, err = db.Exec("CREATE TABLE foo(id INTEGER, ts timeSTAMP, dt DATETIME)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- timestamp1 := time.Date(2012, time.April, 6, 22, 50, 0, 0, time.UTC)
- timestamp2 := time.Date(2006, time.January, 2, 15, 4, 5, 123456789, time.UTC)
- timestamp3 := time.Date(2012, time.November, 4, 0, 0, 0, 0, time.UTC)
- tests := []struct {
- value interface{}
- expected time.Time
- }{
- {"nonsense", time.Time{}},
- {"0000-00-00 00:00:00", time.Time{}},
- {timestamp1, timestamp1},
- {timestamp1.Unix(), timestamp1},
- {timestamp1.UnixNano() / int64(time.Millisecond), timestamp1},
- {timestamp1.In(time.FixedZone("TEST", -7*3600)), timestamp1},
- {timestamp1.Format("2006-01-02 15:04:05.000"), timestamp1},
- {timestamp1.Format("2006-01-02T15:04:05.000"), timestamp1},
- {timestamp1.Format("2006-01-02 15:04:05"), timestamp1},
- {timestamp1.Format("2006-01-02T15:04:05"), timestamp1},
- {timestamp2, timestamp2},
- {"2006-01-02 15:04:05.123456789", timestamp2},
- {"2006-01-02T15:04:05.123456789", timestamp2},
- {"2012-11-04", timestamp3},
- {"2012-11-04 00:00", timestamp3},
- {"2012-11-04 00:00:00", timestamp3},
- {"2012-11-04 00:00:00.000", timestamp3},
- {"2012-11-04T00:00", timestamp3},
- {"2012-11-04T00:00:00", timestamp3},
- {"2012-11-04T00:00:00.000", timestamp3},
- }
- for i := range tests {
- _, err = db.Exec("INSERT INTO foo(id, ts, dt) VALUES(?, ?, ?)", i, tests[i].value, tests[i].value)
- if err != nil {
- t.Fatal("Failed to insert timestamp:", err)
- }
- }
-
- rows, err := db.Query("SELECT id, ts, dt FROM foo ORDER BY id ASC")
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
- defer rows.Close()
-
- seen := 0
- for rows.Next() {
- var id int
- var ts, dt time.Time
-
- if err := rows.Scan(&id, &ts, &dt); err != nil {
- t.Error("Unable to scan results:", err)
- continue
- }
- if id < 0 || id >= len(tests) {
- t.Error("Bad row id: ", id)
- continue
- }
- seen++
- if !tests[id].expected.Equal(ts) {
- t.Errorf("Timestamp value for id %v (%v) should be %v, not %v", id, tests[id].value, tests[id].expected, dt)
- }
- if !tests[id].expected.Equal(dt) {
- t.Errorf("Datetime value for id %v (%v) should be %v, not %v", id, tests[id].value, tests[id].expected, dt)
- }
- }
-
- if seen != len(tests) {
- t.Errorf("Expected to see %d rows", len(tests))
- }
-}
-
-func TestBoolean(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
-
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("CREATE TABLE foo(id INTEGER, fbool BOOLEAN)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- bool1 := true
- _, err = db.Exec("INSERT INTO foo(id, fbool) VALUES(1, ?)", bool1)
- if err != nil {
- t.Fatal("Failed to insert boolean:", err)
- }
-
- bool2 := false
- _, err = db.Exec("INSERT INTO foo(id, fbool) VALUES(2, ?)", bool2)
- if err != nil {
- t.Fatal("Failed to insert boolean:", err)
- }
-
- bool3 := "nonsense"
- _, err = db.Exec("INSERT INTO foo(id, fbool) VALUES(3, ?)", bool3)
- if err != nil {
- t.Fatal("Failed to insert nonsense:", err)
- }
-
- rows, err := db.Query("SELECT id, fbool FROM foo where fbool = ?", bool1)
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
- counter := 0
-
- var id int
- var fbool bool
-
- for rows.Next() {
- if err := rows.Scan(&id, &fbool); err != nil {
- t.Fatal("Unable to scan results:", err)
- }
- counter++
- }
-
- if counter != 1 {
- t.Fatalf("Expected 1 row but %v", counter)
- }
-
- if id != 1 && fbool != true {
- t.Fatalf("Value for id 1 should be %v, not %v", bool1, fbool)
- }
-
- rows, err = db.Query("SELECT id, fbool FROM foo where fbool = ?", bool2)
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
-
- counter = 0
-
- for rows.Next() {
- if err := rows.Scan(&id, &fbool); err != nil {
- t.Fatal("Unable to scan results:", err)
- }
- counter++
- }
-
- if counter != 1 {
- t.Fatalf("Expected 1 row but %v", counter)
- }
-
- if id != 2 && fbool != false {
- t.Fatalf("Value for id 2 should be %v, not %v", bool2, fbool)
- }
-
- // make sure "nonsense" triggered an error
- rows, err = db.Query("SELECT id, fbool FROM foo where id=?;", 3)
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
-
- rows.Next()
- err = rows.Scan(&id, &fbool)
- if err == nil {
- t.Error("Expected error from \"nonsense\" bool")
- }
-}
-
-func TestFloat32(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
-
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("CREATE TABLE foo(id INTEGER)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- _, err = db.Exec("INSERT INTO foo(id) VALUES(null)")
- if err != nil {
- t.Fatal("Failed to insert null:", err)
- }
-
- rows, err := db.Query("SELECT id FROM foo")
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
-
- if !rows.Next() {
- t.Fatal("Unable to query results:", err)
- }
-
- var id interface{}
- if err := rows.Scan(&id); err != nil {
- t.Fatal("Unable to scan results:", err)
- }
- if id != nil {
- t.Error("Expected nil but not")
- }
-}
-
-func TestNull(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
-
- defer os.Remove(tempFilename)
- defer db.Close()
-
- rows, err := db.Query("SELECT 3.141592")
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
-
- if !rows.Next() {
- t.Fatal("Unable to query results:", err)
- }
-
- var v interface{}
- if err := rows.Scan(&v); err != nil {
- t.Fatal("Unable to scan results:", err)
- }
- f, ok := v.(float64)
- if !ok {
- t.Error("Expected float but not")
- }
- if f != 3.141592 {
- t.Error("Expected 3.141592 but not")
- }
-}
-
-func TestTransaction(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
-
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("CREATE TABLE foo(id INTEGER)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- tx, err := db.Begin()
- if err != nil {
- t.Fatal("Failed to begin transaction:", err)
- }
-
- _, err = tx.Exec("INSERT INTO foo(id) VALUES(1)")
- if err != nil {
- t.Fatal("Failed to insert null:", err)
- }
-
- rows, err := tx.Query("SELECT id from foo")
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
-
- err = tx.Rollback()
- if err != nil {
- t.Fatal("Failed to rollback transaction:", err)
- }
-
- if rows.Next() {
- t.Fatal("Unable to query results:", err)
- }
-
- tx, err = db.Begin()
- if err != nil {
- t.Fatal("Failed to begin transaction:", err)
- }
-
- _, err = tx.Exec("INSERT INTO foo(id) VALUES(1)")
- if err != nil {
- t.Fatal("Failed to insert null:", err)
- }
-
- err = tx.Commit()
- if err != nil {
- t.Fatal("Failed to commit transaction:", err)
- }
-
- rows, err = tx.Query("SELECT id from foo")
- if err == nil {
- t.Fatal("Expected failure to query")
- }
-}
-
-func TestWAL(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
-
- defer os.Remove(tempFilename)
- defer db.Close()
- if _, err = db.Exec("PRAGMA journal_mode=WAL;"); err != nil {
- t.Fatal("Failed to Exec PRAGMA journal_mode:", err)
- }
- if _, err = db.Exec("PRAGMA locking_mode=EXCLUSIVE;"); err != nil {
- t.Fatal("Failed to Exec PRAGMA locking_mode:", err)
- }
- if _, err = db.Exec("CREATE TABLE test (id SERIAL, user TEXT NOT NULL, name TEXT NOT NULL);"); err != nil {
- t.Fatal("Failed to Exec CREATE TABLE:", err)
- }
- if _, err = db.Exec("INSERT INTO test (user, name) VALUES ('user','name');"); err != nil {
- t.Fatal("Failed to Exec INSERT:", err)
- }
-
- trans, err := db.Begin()
- if err != nil {
- t.Fatal("Failed to Begin:", err)
- }
- s, err := trans.Prepare("INSERT INTO test (user, name) VALUES (?, ?);")
- if err != nil {
- t.Fatal("Failed to Prepare:", err)
- }
-
- var count int
- if err = trans.QueryRow("SELECT count(user) FROM test;").Scan(&count); err != nil {
- t.Fatal("Failed to QueryRow:", err)
- }
- if _, err = s.Exec("bbbb", "aaaa"); err != nil {
- t.Fatal("Failed to Exec prepared statement:", err)
- }
- if err = s.Close(); err != nil {
- t.Fatal("Failed to Close prepared statement:", err)
- }
- if err = trans.Commit(); err != nil {
- t.Fatal("Failed to Commit:", err)
- }
-}
-
-func TestTimezoneConversion(t *testing.T) {
- zones := []string{"UTC", "US/Central", "US/Pacific", "Local"}
- for _, tz := range zones {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename+"?_loc="+url.QueryEscape(tz))
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec("DROP TABLE foo")
- _, err = db.Exec("CREATE TABLE foo(id INTEGER, ts TIMESTAMP, dt DATETIME)")
- if err != nil {
- t.Fatal("Failed to create table:", err)
- }
-
- loc, err := time.LoadLocation(tz)
- if err != nil {
- t.Fatal("Failed to load location:", err)
- }
-
- timestamp1 := time.Date(2012, time.April, 6, 22, 50, 0, 0, time.UTC)
- timestamp2 := time.Date(2006, time.January, 2, 15, 4, 5, 123456789, time.UTC)
- timestamp3 := time.Date(2012, time.November, 4, 0, 0, 0, 0, time.UTC)
- tests := []struct {
- value interface{}
- expected time.Time
- }{
- {"nonsense", time.Time{}.In(loc)},
- {"0000-00-00 00:00:00", time.Time{}.In(loc)},
- {timestamp1, timestamp1.In(loc)},
- {timestamp1.Unix(), timestamp1.In(loc)},
- {timestamp1.In(time.FixedZone("TEST", -7*3600)), timestamp1.In(loc)},
- {timestamp1.Format("2006-01-02 15:04:05.000"), timestamp1.In(loc)},
- {timestamp1.Format("2006-01-02T15:04:05.000"), timestamp1.In(loc)},
- {timestamp1.Format("2006-01-02 15:04:05"), timestamp1.In(loc)},
- {timestamp1.Format("2006-01-02T15:04:05"), timestamp1.In(loc)},
- {timestamp2, timestamp2.In(loc)},
- {"2006-01-02 15:04:05.123456789", timestamp2.In(loc)},
- {"2006-01-02T15:04:05.123456789", timestamp2.In(loc)},
- {"2012-11-04", timestamp3.In(loc)},
- {"2012-11-04 00:00", timestamp3.In(loc)},
- {"2012-11-04 00:00:00", timestamp3.In(loc)},
- {"2012-11-04 00:00:00.000", timestamp3.In(loc)},
- {"2012-11-04T00:00", timestamp3.In(loc)},
- {"2012-11-04T00:00:00", timestamp3.In(loc)},
- {"2012-11-04T00:00:00.000", timestamp3.In(loc)},
- }
- for i := range tests {
- _, err = db.Exec("INSERT INTO foo(id, ts, dt) VALUES(?, ?, ?)", i, tests[i].value, tests[i].value)
- if err != nil {
- t.Fatal("Failed to insert timestamp:", err)
- }
- }
-
- rows, err := db.Query("SELECT id, ts, dt FROM foo ORDER BY id ASC")
- if err != nil {
- t.Fatal("Unable to query foo table:", err)
- }
- defer rows.Close()
-
- seen := 0
- for rows.Next() {
- var id int
- var ts, dt time.Time
-
- if err := rows.Scan(&id, &ts, &dt); err != nil {
- t.Error("Unable to scan results:", err)
- continue
- }
- if id < 0 || id >= len(tests) {
- t.Error("Bad row id: ", id)
- continue
- }
- seen++
- if !tests[id].expected.Equal(ts) {
- t.Errorf("Timestamp value for id %v (%v) should be %v, not %v", id, tests[id].value, tests[id].expected, ts)
- }
- if !tests[id].expected.Equal(dt) {
- t.Errorf("Datetime value for id %v (%v) should be %v, not %v", id, tests[id].value, tests[id].expected, dt)
- }
- if tests[id].expected.Location().String() != ts.Location().String() {
- t.Errorf("Location for id %v (%v) should be %v, not %v", id, tests[id].value, tests[id].expected.Location().String(), ts.Location().String())
- }
- if tests[id].expected.Location().String() != dt.Location().String() {
- t.Errorf("Location for id %v (%v) should be %v, not %v", id, tests[id].value, tests[id].expected.Location().String(), dt.Location().String())
- }
- }
-
- if seen != len(tests) {
- t.Errorf("Expected to see %d rows", len(tests))
- }
- }
-}
-
-func TestSuite(t *testing.T) {
- db, err := sql.Open("sqlite3", ":memory:")
- if err != nil {
- t.Fatal(err)
- }
- defer db.Close()
-
- sqlite3_test.RunTests(t, db, sqlite3_test.SQLITE)
-}
-
-// TODO: Execer & Queryer currently disabled
-// https://github.com/mattn/go-sqlite3/issues/82
-func TestExecer(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec(`
- create table foo (id integer); -- one comment
- insert into foo(id) values(?);
- insert into foo(id) values(?);
- insert into foo(id) values(?); -- another comment
- `, 1, 2, 3)
- if err != nil {
- t.Error("Failed to call db.Exec:", err)
- }
-}
-
-func TestQueryer(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec(`
- create table foo (id integer);
- `)
- if err != nil {
- t.Error("Failed to call db.Query:", err)
- }
-
- rows, err := db.Query(`
- insert into foo(id) values(?);
- insert into foo(id) values(?);
- insert into foo(id) values(?);
- select id from foo order by id;
- `, 3, 2, 1)
- if err != nil {
- t.Error("Failed to call db.Query:", err)
- }
- defer rows.Close()
- n := 1
- if rows != nil {
- for rows.Next() {
- var id int
- err = rows.Scan(&id)
- if err != nil {
- t.Error("Failed to db.Query:", err)
- }
- if id != n {
- t.Error("Failed to db.Query: not matched results")
- }
- }
- }
-}
-
-func TestStress(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- db.Exec("CREATE TABLE foo (id int);")
- db.Exec("INSERT INTO foo VALUES(1);")
- db.Exec("INSERT INTO foo VALUES(2);")
- db.Close()
-
- for i := 0; i < 10000; i++ {
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
-
- for j := 0; j < 3; j++ {
- rows, err := db.Query("select * from foo where id=1;")
- if err != nil {
- t.Error("Failed to call db.Query:", err)
- }
- for rows.Next() {
- var i int
- if err := rows.Scan(&i); err != nil {
- t.Errorf("Scan failed: %v\n", err)
- }
- }
- if err := rows.Err(); err != nil {
- t.Errorf("Post-scan failed: %v\n", err)
- }
- rows.Close()
- }
- db.Close()
- }
-}
-
-func TestDateTimeLocal(t *testing.T) {
- zone := "Asia/Tokyo"
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename+"?_loc="+zone)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- db.Exec("CREATE TABLE foo (dt datetime);")
- db.Exec("INSERT INTO foo VALUES('2015-03-05 15:16:17');")
-
- row := db.QueryRow("select * from foo")
- var d time.Time
- err = row.Scan(&d)
- if err != nil {
- t.Fatal("Failed to scan datetime:", err)
- }
- if d.Hour() == 15 || !strings.Contains(d.String(), "JST") {
- t.Fatal("Result should have timezone", d)
- }
- db.Close()
-
- db, err = sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
-
- row = db.QueryRow("select * from foo")
- err = row.Scan(&d)
- if err != nil {
- t.Fatal("Failed to scan datetime:", err)
- }
- if d.UTC().Hour() != 15 || !strings.Contains(d.String(), "UTC") {
- t.Fatalf("Result should not have timezone %v %v", zone, d.String())
- }
-
- _, err = db.Exec("DELETE FROM foo")
- if err != nil {
- t.Fatal("Failed to delete table:", err)
- }
- dt, err := time.Parse("2006/1/2 15/4/5 -0700 MST", "2015/3/5 15/16/17 +0900 JST")
- if err != nil {
- t.Fatal("Failed to parse datetime:", err)
- }
- db.Exec("INSERT INTO foo VALUES(?);", dt)
-
- db.Close()
- db, err = sql.Open("sqlite3", tempFilename+"?_loc="+zone)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
-
- row = db.QueryRow("select * from foo")
- err = row.Scan(&d)
- if err != nil {
- t.Fatal("Failed to scan datetime:", err)
- }
- if d.Hour() != 15 || !strings.Contains(d.String(), "JST") {
- t.Fatalf("Result should have timezone %v %v", zone, d.String())
- }
-}
-
-func TestVersion(t *testing.T) {
- s, n, id := Version()
- if s == "" || n == 0 || id == "" {
- t.Errorf("Version failed %q, %d, %q\n", s, n, id)
- }
-}
-
-func TestNumberNamedParams(t *testing.T) {
- tempFilename := TempFilename()
- db, err := sql.Open("sqlite3", tempFilename)
- if err != nil {
- t.Fatal("Failed to open database:", err)
- }
- defer os.Remove(tempFilename)
- defer db.Close()
-
- _, err = db.Exec(`
- create table foo (id integer, name text, extra text);
- `)
- if err != nil {
- t.Error("Failed to call db.Query:", err)
- }
-
- _, err = db.Exec(`insert into foo(id, name, extra) values($1, $2, $2)`, 1, "foo")
- if err != nil {
- t.Error("Failed to call db.Exec:", err)
- }
-
- row := db.QueryRow(`select id, extra from foo where id = $1 and extra = $2`, 1, "foo")
- if row == nil {
- t.Error("Failed to call db.QueryRow")
- }
- var id int
- var extra string
- err = row.Scan(&id, &extra)
- if err != nil {
- t.Error("Failed to db.Scan:", err)
- }
- if id != 1 || extra != "foo" {
- t.Error("Failed to db.QueryRow: not matched results")
- }
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/assertions.goconvey b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/assertions.goconvey
deleted file mode 100644
index 8a7f1b6671a..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/assertions.goconvey
+++ /dev/null
@@ -1,3 +0,0 @@
-#ignore
--timeout=1s
--coverpkg=github.com/smartystreets/goconvey/convey/assertions,github.com/smartystreets/goconvey/convey/assertions/oglematchers
\ No newline at end of file
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/collections_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/collections_test.go
deleted file mode 100644
index 25612bd7670..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/collections_test.go
+++ /dev/null
@@ -1,103 +0,0 @@
-package assertions
-
-import (
- "fmt"
- "testing"
- "time"
-)
-
-func TestShouldContain(t *testing.T) {
- fail(t, so([]int{}, ShouldContain), "This assertion requires exactly 1 comparison values (you provided 0).")
- fail(t, so([]int{}, ShouldContain, 1, 2, 3), "This assertion requires exactly 1 comparison values (you provided 3).")
-
- fail(t, so(Thing1{}, ShouldContain, 1), "You must provide a valid container (was assertions.Thing1)!")
- fail(t, so(nil, ShouldContain, 1), "You must provide a valid container (was )!")
- fail(t, so([]int{1}, ShouldContain, 2), "Expected the container ([]int) to contain: '2' (but it didn't)!")
-
- pass(t, so([]int{1}, ShouldContain, 1))
- pass(t, so([]int{1, 2, 3}, ShouldContain, 2))
-}
-
-func TestShouldNotContain(t *testing.T) {
- fail(t, so([]int{}, ShouldNotContain), "This assertion requires exactly 1 comparison values (you provided 0).")
- fail(t, so([]int{}, ShouldNotContain, 1, 2, 3), "This assertion requires exactly 1 comparison values (you provided 3).")
-
- fail(t, so(Thing1{}, ShouldNotContain, 1), "You must provide a valid container (was assertions.Thing1)!")
- fail(t, so(nil, ShouldNotContain, 1), "You must provide a valid container (was )!")
-
- fail(t, so([]int{1}, ShouldNotContain, 1), "Expected the container ([]int) NOT to contain: '1' (but it did)!")
- fail(t, so([]int{1, 2, 3}, ShouldNotContain, 2), "Expected the container ([]int) NOT to contain: '2' (but it did)!")
-
- pass(t, so([]int{1}, ShouldNotContain, 2))
-}
-
-func TestShouldBeIn(t *testing.T) {
- fail(t, so(4, ShouldBeIn), shouldHaveProvidedCollectionMembers)
-
- container := []int{1, 2, 3, 4}
- pass(t, so(4, ShouldBeIn, container))
- pass(t, so(4, ShouldBeIn, 1, 2, 3, 4))
-
- fail(t, so(4, ShouldBeIn, 1, 2, 3), "Expected '4' to be in the container ([]interface {}, but it wasn't)!")
- fail(t, so(4, ShouldBeIn, []int{1, 2, 3}), "Expected '4' to be in the container ([]int, but it wasn't)!")
-}
-
-func TestShouldNotBeIn(t *testing.T) {
- fail(t, so(4, ShouldNotBeIn), shouldHaveProvidedCollectionMembers)
-
- container := []int{1, 2, 3, 4}
- pass(t, so(42, ShouldNotBeIn, container))
- pass(t, so(42, ShouldNotBeIn, 1, 2, 3, 4))
-
- fail(t, so(2, ShouldNotBeIn, 1, 2, 3), "Expected '2' NOT to be in the container ([]interface {}, but it was)!")
- fail(t, so(2, ShouldNotBeIn, []int{1, 2, 3}), "Expected '2' NOT to be in the container ([]int, but it was)!")
-}
-
-func TestShouldBeEmpty(t *testing.T) {
- fail(t, so(1, ShouldBeEmpty, 2, 3), "This assertion requires exactly 0 comparison values (you provided 2).")
-
- pass(t, so([]int{}, ShouldBeEmpty)) // empty slice
- pass(t, so([]interface{}{}, ShouldBeEmpty)) // empty slice
- pass(t, so(map[string]int{}, ShouldBeEmpty)) // empty map
- pass(t, so("", ShouldBeEmpty)) // empty string
- pass(t, so(&[]int{}, ShouldBeEmpty)) // pointer to empty slice
- pass(t, so(&[0]int{}, ShouldBeEmpty)) // pointer to empty array
- pass(t, so(nil, ShouldBeEmpty)) // nil
- pass(t, so(make(chan string), ShouldBeEmpty)) // empty channel
-
- fail(t, so([]int{1}, ShouldBeEmpty), "Expected [1] to be empty (but it wasn't)!") // non-empty slice
- fail(t, so([]interface{}{1}, ShouldBeEmpty), "Expected [1] to be empty (but it wasn't)!") // non-empty slice
- fail(t, so(map[string]int{"hi": 0}, ShouldBeEmpty), "Expected map[hi:0] to be empty (but it wasn't)!") // non-empty map
- fail(t, so("hi", ShouldBeEmpty), "Expected hi to be empty (but it wasn't)!") // non-empty string
- fail(t, so(&[]int{1}, ShouldBeEmpty), "Expected &[1] to be empty (but it wasn't)!") // pointer to non-empty slice
- fail(t, so(&[1]int{1}, ShouldBeEmpty), "Expected &[1] to be empty (but it wasn't)!") // pointer to non-empty array
- c := make(chan int, 1) // non-empty channel
- go func() { c <- 1 }()
- time.Sleep(time.Millisecond)
- fail(t, so(c, ShouldBeEmpty), fmt.Sprintf("Expected %+v to be empty (but it wasn't)!", c))
-}
-
-func TestShouldNotBeEmpty(t *testing.T) {
- fail(t, so(1, ShouldNotBeEmpty, 2, 3), "This assertion requires exactly 0 comparison values (you provided 2).")
-
- fail(t, so([]int{}, ShouldNotBeEmpty), "Expected [] to NOT be empty (but it was)!") // empty slice
- fail(t, so([]interface{}{}, ShouldNotBeEmpty), "Expected [] to NOT be empty (but it was)!") // empty slice
- fail(t, so(map[string]int{}, ShouldNotBeEmpty), "Expected map[] to NOT be empty (but it was)!") // empty map
- fail(t, so("", ShouldNotBeEmpty), "Expected to NOT be empty (but it was)!") // empty string
- fail(t, so(&[]int{}, ShouldNotBeEmpty), "Expected &[] to NOT be empty (but it was)!") // pointer to empty slice
- fail(t, so(&[0]int{}, ShouldNotBeEmpty), "Expected &[] to NOT be empty (but it was)!") // pointer to empty array
- fail(t, so(nil, ShouldNotBeEmpty), "Expected to NOT be empty (but it was)!") // nil
- c := make(chan int, 0) // non-empty channel
- fail(t, so(c, ShouldNotBeEmpty), fmt.Sprintf("Expected %+v to NOT be empty (but it was)!", c)) // empty channel
-
- pass(t, so([]int{1}, ShouldNotBeEmpty)) // non-empty slice
- pass(t, so([]interface{}{1}, ShouldNotBeEmpty)) // non-empty slice
- pass(t, so(map[string]int{"hi": 0}, ShouldNotBeEmpty)) // non-empty map
- pass(t, so("hi", ShouldNotBeEmpty)) // non-empty string
- pass(t, so(&[]int{1}, ShouldNotBeEmpty)) // pointer to non-empty slice
- pass(t, so(&[1]int{1}, ShouldNotBeEmpty)) // pointer to non-empty array
- c = make(chan int, 1)
- go func() { c <- 1 }()
- time.Sleep(time.Millisecond)
- pass(t, so(c, ShouldNotBeEmpty))
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/doc.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/doc.go
deleted file mode 100644
index 7bbd628eef2..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/doc.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Package assertions contains the implementations for all assertions which
-// are referenced in the convey package for use with the So(...) method.
-package assertions
-
-// This function is not used by the goconvey library. It's actually a convenience method
-// for running assertions on arbitrary arguments outside of any testing context, like for
-// application logging. It allows you to perform assertion-like behavior (and get nicely
-// formatted messages detailing discrepancies) but without the probram blowing up or panicking.
-// All that is required is to import this package and call `So` with one of the assertions
-// exported by this package as the second parameter.
-// The first return parameter is a boolean indicating if the assertion was true. The second
-// return parameter is the well-formatted message showing why an assertion was incorrect, or
-// blank if the assertion was correct.
-//
-// Example:
-//
-// if ok, message := So(x, ShouldBeGreaterThan, y); !ok {
-// log.Println(message)
-// }
-//
-func So(actual interface{}, assert assertion, expected ...interface{}) (bool, string) {
- serializer = noop
-
- if result := so(actual, assert, expected...); len(result) == 0 {
- return true, result
- } else {
- return false, result
- }
-}
-
-// so is like So, except that it only returns the string message, which is blank if the
-// assertion passed. Used to facilitate testing.
-func so(actual interface{}, assert func(interface{}, ...interface{}) string, expected ...interface{}) string {
- return assert(actual, expected...)
-}
-
-// assertion is an alias for a function with a signature that the So()
-// function can handle. Any future or custom assertions should conform to this
-// method signature. The return value should be an empty string if the assertion
-// passes and a well-formed failure message if not.
-type assertion func(actual interface{}, expected ...interface{}) string
-
-////////////////////////////////////////////////////////////////////////////
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/equality_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/equality_test.go
deleted file mode 100644
index ee3939712fc..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/equality_test.go
+++ /dev/null
@@ -1,267 +0,0 @@
-package assertions
-
-import (
- "fmt"
- "reflect"
- "testing"
-)
-
-func TestShouldEqual(t *testing.T) {
- serializer = newFakeSerializer()
-
- fail(t, so(1, ShouldEqual), "This assertion requires exactly 1 comparison values (you provided 0).")
- fail(t, so(1, ShouldEqual, 1, 2), "This assertion requires exactly 1 comparison values (you provided 2).")
- fail(t, so(1, ShouldEqual, 1, 2, 3), "This assertion requires exactly 1 comparison values (you provided 3).")
-
- pass(t, so(1, ShouldEqual, 1))
- fail(t, so(1, ShouldEqual, 2), "2|1|Expected: '2' Actual: '1' (Should be equal)")
-
- pass(t, so(true, ShouldEqual, true))
- fail(t, so(true, ShouldEqual, false), "false|true|Expected: 'false' Actual: 'true' (Should be equal)")
-
- pass(t, so("hi", ShouldEqual, "hi"))
- fail(t, so("hi", ShouldEqual, "bye"), "bye|hi|Expected: 'bye' Actual: 'hi' (Should be equal)")
-
- pass(t, so(42, ShouldEqual, uint(42)))
-
- fail(t, so(Thing1{"hi"}, ShouldEqual, Thing1{}), "{}|{hi}|Expected: '{}' Actual: '{hi}' (Should be equal)")
- fail(t, so(Thing1{"hi"}, ShouldEqual, Thing1{"hi"}), "{hi}|{hi}|Expected: '{hi}' Actual: '{hi}' (Should be equal)")
- fail(t, so(&Thing1{"hi"}, ShouldEqual, &Thing1{"hi"}), "&{hi}|&{hi}|Expected: '&{hi}' Actual: '&{hi}' (Should be equal)")
-
- fail(t, so(Thing1{}, ShouldEqual, Thing2{}), "{}|{}|Expected: '{}' Actual: '{}' (Should be equal)")
-}
-
-func TestShouldNotEqual(t *testing.T) {
- fail(t, so(1, ShouldNotEqual), "This assertion requires exactly 1 comparison values (you provided 0).")
- fail(t, so(1, ShouldNotEqual, 1, 2), "This assertion requires exactly 1 comparison values (you provided 2).")
- fail(t, so(1, ShouldNotEqual, 1, 2, 3), "This assertion requires exactly 1 comparison values (you provided 3).")
-
- pass(t, so(1, ShouldNotEqual, 2))
- fail(t, so(1, ShouldNotEqual, 1), "Expected '1' to NOT equal '1' (but it did)!")
-
- pass(t, so(true, ShouldNotEqual, false))
- fail(t, so(true, ShouldNotEqual, true), "Expected 'true' to NOT equal 'true' (but it did)!")
-
- pass(t, so("hi", ShouldNotEqual, "bye"))
- fail(t, so("hi", ShouldNotEqual, "hi"), "Expected 'hi' to NOT equal 'hi' (but it did)!")
-
- pass(t, so(&Thing1{"hi"}, ShouldNotEqual, &Thing1{"hi"}))
- pass(t, so(Thing1{"hi"}, ShouldNotEqual, Thing1{"hi"}))
- pass(t, so(Thing1{}, ShouldNotEqual, Thing1{}))
- pass(t, so(Thing1{}, ShouldNotEqual, Thing2{}))
-}
-
-func TestShouldAlmostEqual(t *testing.T) {
- fail(t, so(1, ShouldAlmostEqual), "This assertion requires exactly one comparison value and an optional delta (you provided neither)")
- fail(t, so(1, ShouldAlmostEqual, 1, 2, 3), "This assertion requires exactly one comparison value and an optional delta (you provided more values)")
-
- // with the default delta
- pass(t, so(1, ShouldAlmostEqual, .99999999999999))
- pass(t, so(1.3612499999999996, ShouldAlmostEqual, 1.36125))
- pass(t, so(0.7285312499999999, ShouldAlmostEqual, 0.72853125))
- fail(t, so(1, ShouldAlmostEqual, .99), "Expected '1' to almost equal '0.99' (but it didn't)!")
-
- // with a different delta
- pass(t, so(100.0, ShouldAlmostEqual, 110.0, 10.0))
- fail(t, so(100.0, ShouldAlmostEqual, 111.0, 10.5), "Expected '100' to almost equal '111' (but it didn't)!")
-
- // ints should work
- pass(t, so(100, ShouldAlmostEqual, 100.0))
- fail(t, so(100, ShouldAlmostEqual, 99.0), "Expected '100' to almost equal '99' (but it didn't)!")
-
- // float32 should work
- pass(t, so(float64(100.0), ShouldAlmostEqual, float32(100.0)))
- fail(t, so(float32(100.0), ShouldAlmostEqual, 99.0, float32(0.1)), "Expected '100' to almost equal '99' (but it didn't)!")
-}
-
-func TestShouldNotAlmostEqual(t *testing.T) {
- fail(t, so(1, ShouldNotAlmostEqual), "This assertion requires exactly one comparison value and an optional delta (you provided neither)")
- fail(t, so(1, ShouldNotAlmostEqual, 1, 2, 3), "This assertion requires exactly one comparison value and an optional delta (you provided more values)")
-
- // with the default delta
- fail(t, so(1, ShouldNotAlmostEqual, .99999999999999), "Expected '1' to NOT almost equal '0.99999999999999' (but it did)!")
- fail(t, so(1.3612499999999996, ShouldNotAlmostEqual, 1.36125), "Expected '1.3612499999999996' to NOT almost equal '1.36125' (but it did)!")
- pass(t, so(1, ShouldNotAlmostEqual, .99))
-
- // with a different delta
- fail(t, so(100.0, ShouldNotAlmostEqual, 110.0, 10.0), "Expected '100' to NOT almost equal '110' (but it did)!")
- pass(t, so(100.0, ShouldNotAlmostEqual, 111.0, 10.5))
-
- // ints should work
- fail(t, so(100, ShouldNotAlmostEqual, 100.0), "Expected '100' to NOT almost equal '100' (but it did)!")
- pass(t, so(100, ShouldNotAlmostEqual, 99.0))
-
- // float32 should work
- fail(t, so(float64(100.0), ShouldNotAlmostEqual, float32(100.0)), "Expected '100' to NOT almost equal '100' (but it did)!")
- pass(t, so(float32(100.0), ShouldNotAlmostEqual, 99.0, float32(0.1)))
-}
-
-func TestShouldResemble(t *testing.T) {
- serializer = newFakeSerializer()
-
- fail(t, so(Thing1{"hi"}, ShouldResemble), "This assertion requires exactly 1 comparison values (you provided 0).")
- fail(t, so(Thing1{"hi"}, ShouldResemble, Thing1{"hi"}, Thing1{"hi"}), "This assertion requires exactly 1 comparison values (you provided 2).")
-
- pass(t, so(Thing1{"hi"}, ShouldResemble, Thing1{"hi"}))
- fail(t, so(Thing1{"hi"}, ShouldResemble, Thing1{"bye"}), "{bye}|{hi}|Expected: 'assertions.Thing1{a:\"bye\"}' Actual: 'assertions.Thing1{a:\"hi\"}' (Should resemble)!")
-
- var (
- a []int
- b []int = []int{}
- )
-
- fail(t, so(a, ShouldResemble, b), "[]|[]|Expected: '[]int{}' Actual: '[]int(nil)' (Should resemble)!")
- fail(t, so(2, ShouldResemble, 1), "1|2|Expected: '1' Actual: '2' (Should resemble)!")
-
- fail(t, so(StringStringMapAlias{"hi": "bye"}, ShouldResemble, map[string]string{"hi": "bye"}),
- "map[hi:bye]|map[hi:bye]|Expected: 'map[string]string{\"hi\":\"bye\"}' Actual: 'assertions.StringStringMapAlias{\"hi\":\"bye\"}' (Should resemble)!")
- fail(t, so(StringSliceAlias{"hi", "bye"}, ShouldResemble, []string{"hi", "bye"}),
- "[hi bye]|[hi bye]|Expected: '[]string{\"hi\", \"bye\"}' Actual: 'assertions.StringSliceAlias{\"hi\", \"bye\"}' (Should resemble)!")
-
- // some types come out looking the same when represented with "%#v" so we show type mismatch info:
- fail(t, so(StringAlias("hi"), ShouldResemble, "hi"), "hi|hi|Expected: '\"hi\"' Actual: '\"hi\"' (Type mismatch: 'string' vs 'assertions.StringAlias')!")
- fail(t, so(IntAlias(42), ShouldResemble, 42), "42|42|Expected: '42' Actual: '42' (Type mismatch: 'int' vs 'assertions.IntAlias')!")
-}
-
-func TestShouldNotResemble(t *testing.T) {
- fail(t, so(Thing1{"hi"}, ShouldNotResemble), "This assertion requires exactly 1 comparison values (you provided 0).")
- fail(t, so(Thing1{"hi"}, ShouldNotResemble, Thing1{"hi"}, Thing1{"hi"}), "This assertion requires exactly 1 comparison values (you provided 2).")
-
- pass(t, so(Thing1{"hi"}, ShouldNotResemble, Thing1{"bye"}))
- fail(t, so(Thing1{"hi"}, ShouldNotResemble, Thing1{"hi"}),
- "Expected 'assertions.Thing1{a:\"hi\"}' to NOT resemble 'assertions.Thing1{a:\"hi\"}' (but it did)!")
-
- pass(t, so(map[string]string{"hi": "bye"}, ShouldResemble, map[string]string{"hi": "bye"}))
- pass(t, so(IntAlias(42), ShouldNotResemble, 42))
-
- pass(t, so(StringSliceAlias{"hi", "bye"}, ShouldNotResemble, []string{"hi", "bye"}))
-}
-
-func TestShouldPointTo(t *testing.T) {
- serializer = newFakeSerializer()
-
- t1 := &Thing1{}
- t2 := t1
- t3 := &Thing1{}
-
- pointer1 := reflect.ValueOf(t1).Pointer()
- pointer3 := reflect.ValueOf(t3).Pointer()
-
- fail(t, so(t1, ShouldPointTo), "This assertion requires exactly 1 comparison values (you provided 0).")
- fail(t, so(t1, ShouldPointTo, t2, t3), "This assertion requires exactly 1 comparison values (you provided 2).")
-
- pass(t, so(t1, ShouldPointTo, t2))
- fail(t, so(t1, ShouldPointTo, t3), fmt.Sprintf(
- "%v|%v|Expected '&{a:}' (address: '%v') and '&{a:}' (address: '%v') to be the same address (but their weren't)!",
- pointer3, pointer1, pointer1, pointer3))
-
- t4 := Thing1{}
- t5 := t4
-
- fail(t, so(t4, ShouldPointTo, t5), "Both arguments should be pointers (the first was not)!")
- fail(t, so(&t4, ShouldPointTo, t5), "Both arguments should be pointers (the second was not)!")
- fail(t, so(nil, ShouldPointTo, nil), "Both arguments should be pointers (the first was nil)!")
- fail(t, so(&t4, ShouldPointTo, nil), "Both arguments should be pointers (the second was nil)!")
-}
-
-func TestShouldNotPointTo(t *testing.T) {
- t1 := &Thing1{}
- t2 := t1
- t3 := &Thing1{}
-
- pointer1 := reflect.ValueOf(t1).Pointer()
-
- fail(t, so(t1, ShouldNotPointTo), "This assertion requires exactly 1 comparison values (you provided 0).")
- fail(t, so(t1, ShouldNotPointTo, t2, t3), "This assertion requires exactly 1 comparison values (you provided 2).")
-
- pass(t, so(t1, ShouldNotPointTo, t3))
- fail(t, so(t1, ShouldNotPointTo, t2), fmt.Sprintf("Expected '&{a:}' and '&{a:}' to be different references (but they matched: '%v')!", pointer1))
-
- t4 := Thing1{}
- t5 := t4
-
- fail(t, so(t4, ShouldNotPointTo, t5), "Both arguments should be pointers (the first was not)!")
- fail(t, so(&t4, ShouldNotPointTo, t5), "Both arguments should be pointers (the second was not)!")
- fail(t, so(nil, ShouldNotPointTo, nil), "Both arguments should be pointers (the first was nil)!")
- fail(t, so(&t4, ShouldNotPointTo, nil), "Both arguments should be pointers (the second was nil)!")
-}
-
-func TestShouldBeNil(t *testing.T) {
- fail(t, so(nil, ShouldBeNil, nil, nil, nil), "This assertion requires exactly 0 comparison values (you provided 3).")
- fail(t, so(nil, ShouldBeNil, nil), "This assertion requires exactly 0 comparison values (you provided 1).")
-
- pass(t, so(nil, ShouldBeNil))
- fail(t, so(1, ShouldBeNil), "Expected: nil Actual: '1'")
-
- var thing Thinger
- pass(t, so(thing, ShouldBeNil))
- thing = &Thing{}
- fail(t, so(thing, ShouldBeNil), "Expected: nil Actual: '&{}'")
-
- var thingOne *Thing1
- pass(t, so(thingOne, ShouldBeNil))
-
- var nilSlice []int = nil
- pass(t, so(nilSlice, ShouldBeNil))
-
- var nilMap map[string]string = nil
- pass(t, so(nilMap, ShouldBeNil))
-
- var nilChannel chan int = nil
- pass(t, so(nilChannel, ShouldBeNil))
-
- var nilFunc func() = nil
- pass(t, so(nilFunc, ShouldBeNil))
-
- var nilInterface interface{} = nil
- pass(t, so(nilInterface, ShouldBeNil))
-}
-
-func TestShouldNotBeNil(t *testing.T) {
- fail(t, so(nil, ShouldNotBeNil, nil, nil, nil), "This assertion requires exactly 0 comparison values (you provided 3).")
- fail(t, so(nil, ShouldNotBeNil, nil), "This assertion requires exactly 0 comparison values (you provided 1).")
-
- fail(t, so(nil, ShouldNotBeNil), "Expected '' to NOT be nil (but it was)!")
- pass(t, so(1, ShouldNotBeNil))
-
- var thing Thinger
- fail(t, so(thing, ShouldNotBeNil), "Expected '' to NOT be nil (but it was)!")
- thing = &Thing{}
- pass(t, so(thing, ShouldNotBeNil))
-}
-
-func TestShouldBeTrue(t *testing.T) {
- fail(t, so(true, ShouldBeTrue, 1, 2, 3), "This assertion requires exactly 0 comparison values (you provided 3).")
- fail(t, so(true, ShouldBeTrue, 1), "This assertion requires exactly 0 comparison values (you provided 1).")
-
- fail(t, so(false, ShouldBeTrue), "Expected: true Actual: false")
- fail(t, so(1, ShouldBeTrue), "Expected: true Actual: 1")
- pass(t, so(true, ShouldBeTrue))
-}
-
-func TestShouldBeFalse(t *testing.T) {
- fail(t, so(false, ShouldBeFalse, 1, 2, 3), "This assertion requires exactly 0 comparison values (you provided 3).")
- fail(t, so(false, ShouldBeFalse, 1), "This assertion requires exactly 0 comparison values (you provided 1).")
-
- fail(t, so(true, ShouldBeFalse), "Expected: false Actual: true")
- fail(t, so(1, ShouldBeFalse), "Expected: false Actual: 1")
- pass(t, so(false, ShouldBeFalse))
-}
-
-func TestShouldBeZeroValue(t *testing.T) {
- serializer = newFakeSerializer()
-
- fail(t, so(0, ShouldBeZeroValue, 1, 2, 3), "This assertion requires exactly 0 comparison values (you provided 3).")
- fail(t, so(false, ShouldBeZeroValue, true), "This assertion requires exactly 0 comparison values (you provided 1).")
-
- fail(t, so(1, ShouldBeZeroValue), "0|1|'1' should have been the zero value") //"Expected: (zero value) Actual: 1")
- fail(t, so(true, ShouldBeZeroValue), "false|true|'true' should have been the zero value") //"Expected: (zero value) Actual: true")
- fail(t, so("123", ShouldBeZeroValue), "|123|'123' should have been the zero value") //"Expected: (zero value) Actual: 123")
- fail(t, so(" ", ShouldBeZeroValue), "| |' ' should have been the zero value") //"Expected: (zero value) Actual: ")
- fail(t, so([]string{"Nonempty"}, ShouldBeZeroValue), "[]|[Nonempty]|'[Nonempty]' should have been the zero value") //"Expected: (zero value) Actual: [Nonempty]")
- fail(t, so(struct{ a string }{a: "asdf"}, ShouldBeZeroValue), "{}|{asdf}|'{a:asdf}' should have been the zero value")
- pass(t, so(0, ShouldBeZeroValue))
- pass(t, so(false, ShouldBeZeroValue))
- pass(t, so("", ShouldBeZeroValue))
- pass(t, so(struct{}{}, ShouldBeZeroValue))
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/init.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/init.go
deleted file mode 100644
index 753bcc7daa7..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/init.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package assertions
-
-var (
- serializer Serializer = newSerializer()
- noop Serializer = new(noopSerializer)
-)
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/.gitignore b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/.gitignore
deleted file mode 100644
index dd8fc7468f4..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-*.6
-6.out
-_obj/
-_test/
-_testmain.go
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/all_of_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/all_of_test.go
deleted file mode 100644
index 4655f2e7389..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/all_of_test.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2011 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- "errors"
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type allOfFakeMatcher struct {
- desc string
- err error
-}
-
-func (m *allOfFakeMatcher) Matches(c interface{}) error {
- return m.err
-}
-
-func (m *allOfFakeMatcher) Description() string {
- return m.desc
-}
-
-type AllOfTest struct {
-}
-
-func init() { RegisterTestSuite(&AllOfTest{}) }
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *AllOfTest) DescriptionWithEmptySet() {
- m := AllOf()
- ExpectEq("is anything", m.Description())
-}
-
-func (t *AllOfTest) DescriptionWithOneMatcher() {
- m := AllOf(&allOfFakeMatcher{"taco", errors.New("")})
- ExpectEq("taco", m.Description())
-}
-
-func (t *AllOfTest) DescriptionWithMultipleMatchers() {
- m := AllOf(
- &allOfFakeMatcher{"taco", errors.New("")},
- &allOfFakeMatcher{"burrito", errors.New("")},
- &allOfFakeMatcher{"enchilada", errors.New("")})
-
- ExpectEq("taco, and burrito, and enchilada", m.Description())
-}
-
-func (t *AllOfTest) EmptySet() {
- m := AllOf()
- err := m.Matches(17)
-
- ExpectEq(nil, err)
-}
-
-func (t *AllOfTest) OneMatcherReturnsFatalErrorAndSomeOthersFail() {
- m := AllOf(
- &allOfFakeMatcher{"", errors.New("")},
- &allOfFakeMatcher{"", NewFatalError("taco")},
- &allOfFakeMatcher{"", errors.New("")},
- &allOfFakeMatcher{"", nil})
-
- err := m.Matches(17)
-
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(Equals("taco")))
-}
-
-func (t *AllOfTest) OneMatcherReturnsNonFatalAndOthersSayTrue() {
- m := AllOf(
- &allOfFakeMatcher{"", nil},
- &allOfFakeMatcher{"", errors.New("taco")},
- &allOfFakeMatcher{"", nil})
-
- err := m.Matches(17)
-
- ExpectFalse(isFatal(err))
- ExpectThat(err, Error(Equals("taco")))
-}
-
-func (t *AllOfTest) AllMatchersSayTrue() {
- m := AllOf(
- &allOfFakeMatcher{"", nil},
- &allOfFakeMatcher{"", nil},
- &allOfFakeMatcher{"", nil})
-
- err := m.Matches(17)
-
- ExpectEq(nil, err)
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/any_of_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/any_of_test.go
deleted file mode 100644
index b73e101285a..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/any_of_test.go
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright 2011 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- "errors"
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type fakeAnyOfMatcher struct {
- desc string
- err error
-}
-
-func (m *fakeAnyOfMatcher) Matches(c interface{}) error {
- return m.err
-}
-
-func (m *fakeAnyOfMatcher) Description() string {
- return m.desc
-}
-
-type AnyOfTest struct {
-}
-
-func init() { RegisterTestSuite(&AnyOfTest{}) }
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *AnyOfTest) EmptySet() {
- matcher := AnyOf()
-
- err := matcher.Matches(0)
- ExpectThat(err, Error(Equals("")))
-}
-
-func (t *AnyOfTest) OneTrue() {
- matcher := AnyOf(
- &fakeAnyOfMatcher{"", NewFatalError("foo")},
- 17,
- &fakeAnyOfMatcher{"", errors.New("foo")},
- &fakeAnyOfMatcher{"", nil},
- &fakeAnyOfMatcher{"", errors.New("foo")},
- )
-
- err := matcher.Matches(0)
- ExpectEq(nil, err)
-}
-
-func (t *AnyOfTest) OneEqual() {
- matcher := AnyOf(
- &fakeAnyOfMatcher{"", NewFatalError("foo")},
- &fakeAnyOfMatcher{"", errors.New("foo")},
- 13,
- "taco",
- 19,
- &fakeAnyOfMatcher{"", errors.New("foo")},
- )
-
- err := matcher.Matches("taco")
- ExpectEq(nil, err)
-}
-
-func (t *AnyOfTest) OneFatal() {
- matcher := AnyOf(
- &fakeAnyOfMatcher{"", errors.New("foo")},
- 17,
- &fakeAnyOfMatcher{"", NewFatalError("taco")},
- &fakeAnyOfMatcher{"", errors.New("foo")},
- )
-
- err := matcher.Matches(0)
- ExpectThat(err, Error(Equals("taco")))
-}
-
-func (t *AnyOfTest) AllFalseAndNotEqual() {
- matcher := AnyOf(
- &fakeAnyOfMatcher{"", errors.New("foo")},
- 17,
- &fakeAnyOfMatcher{"", errors.New("foo")},
- 19,
- )
-
- err := matcher.Matches(0)
- ExpectThat(err, Error(Equals("")))
-}
-
-func (t *AnyOfTest) DescriptionForEmptySet() {
- matcher := AnyOf()
- ExpectEq("or()", matcher.Description())
-}
-
-func (t *AnyOfTest) DescriptionForNonEmptySet() {
- matcher := AnyOf(
- &fakeAnyOfMatcher{"taco", nil},
- "burrito",
- &fakeAnyOfMatcher{"enchilada", nil},
- )
-
- ExpectEq("or(taco, burrito, enchilada)", matcher.Description())
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/any_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/any_test.go
deleted file mode 100644
index e0492b82773..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/any_test.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2011 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type AnyTest struct {
-}
-
-func init() { RegisterTestSuite(&AnyTest{}) }
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *AnyTest) Description() {
- m := Any()
- ExpectEq("is anything", m.Description())
-}
-
-func (t *AnyTest) Matches() {
- var err error
- m := Any()
-
- err = m.Matches(nil)
- ExpectEq(nil, err)
-
- err = m.Matches(17)
- ExpectEq(nil, err)
-
- err = m.Matches("taco")
- ExpectEq(nil, err)
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/contains_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/contains_test.go
deleted file mode 100644
index c61cd886c6c..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/contains_test.go
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright 2012 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type ContainsTest struct{}
-
-func init() { RegisterTestSuite(&ContainsTest{}) }
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *ContainsTest) WrongTypeCandidates() {
- m := Contains("")
- ExpectEq("contains: ", m.Description())
-
- var err error
-
- // Nil candidate
- err = m.Matches(nil)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("array")))
- ExpectThat(err, Error(HasSubstr("slice")))
-
- // String candidate
- err = m.Matches("")
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("array")))
- ExpectThat(err, Error(HasSubstr("slice")))
-
- // Map candidate
- err = m.Matches(make(map[string]string))
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("array")))
- ExpectThat(err, Error(HasSubstr("slice")))
-}
-
-func (t *ContainsTest) NilArgument() {
- m := Contains(nil)
- ExpectEq("contains: is nil", m.Description())
-
- var c interface{}
- var err error
-
- // Empty array of pointers
- c = [...]*int{}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Empty slice of pointers
- c = []*int{}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-empty array of integers
- c = [...]int{17, 0, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-empty slice of integers
- c = []int{17, 0, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-matching array of pointers
- c = [...]*int{new(int), new(int)}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-matching slice of pointers
- c = []*int{new(int), new(int)}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Matching array of pointers
- c = [...]*int{new(int), nil, new(int)}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Matching slice of pointers
- c = []*int{new(int), nil, new(int)}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-matching slice of pointers from matching array
- someArray := [...]*int{new(int), nil, new(int)}
- c = someArray[0:1]
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-}
-
-func (t *ContainsTest) StringArgument() {
- m := Contains("taco")
- ExpectEq("contains: taco", m.Description())
-
- var c interface{}
- var err error
-
- // Non-matching array of strings
- c = [...]string{"burrito", "enchilada"}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-matching slice of strings
- c = []string{"burrito", "enchilada"}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Matching array of strings
- c = [...]string{"burrito", "taco", "enchilada"}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Matching slice of strings
- c = []string{"burrito", "taco", "enchilada"}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-matching slice of strings from matching array
- someArray := [...]string{"burrito", "taco", "enchilada"}
- c = someArray[0:1]
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-}
-
-func (t *ContainsTest) IntegerArgument() {
- m := Contains(int(17))
- ExpectEq("contains: 17", m.Description())
-
- var c interface{}
- var err error
-
- // Non-matching array of integers
- c = [...]int{13, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-matching slice of integers
- c = []int{13, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Matching array of integers
- c = [...]int{13, 17, 19}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Matching slice of integers
- c = []int{13, 17, 19}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-matching slice of integers from matching array
- someArray := [...]int{13, 17, 19}
- c = someArray[0:1]
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-matching array of floats
- c = [...]float32{13, 17.5, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-matching slice of floats
- c = []float32{13, 17.5, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Matching array of floats
- c = [...]float32{13, 17, 19}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Matching slice of floats
- c = []float32{13, 17, 19}
- err = m.Matches(c)
- ExpectEq(nil, err)
-}
-
-func (t *ContainsTest) MatcherArgument() {
- m := Contains(HasSubstr("ac"))
- ExpectEq("contains: has substring \"ac\"", m.Description())
-
- var c interface{}
- var err error
-
- // Non-matching array of strings
- c = [...]string{"burrito", "enchilada"}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Non-matching slice of strings
- c = []string{"burrito", "enchilada"}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Matching array of strings
- c = [...]string{"burrito", "taco", "enchilada"}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Matching slice of strings
- c = []string{"burrito", "taco", "enchilada"}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-matching slice of strings from matching array
- someArray := [...]string{"burrito", "taco", "enchilada"}
- c = someArray[0:1]
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/deep_equals_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/deep_equals_test.go
deleted file mode 100644
index 640bb0e19d1..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/deep_equals_test.go
+++ /dev/null
@@ -1,344 +0,0 @@
-// Copyright 2012 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- "bytes"
- "testing"
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type DeepEqualsTest struct{}
-
-func init() { RegisterTestSuite(&DeepEqualsTest{}) }
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *DeepEqualsTest) WrongTypeCandidateWithScalarValue() {
- var x int = 17
- m := DeepEquals(x)
-
- var err error
-
- // Nil candidate.
- err = m.Matches(nil)
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("")))
-
- // Int alias candidate.
- type intAlias int
- err = m.Matches(intAlias(x))
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("intAlias")))
-
- // String candidate.
- err = m.Matches("taco")
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("string")))
-
- // Byte slice candidate.
- err = m.Matches([]byte{})
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("[]uint8")))
-
- // Other slice candidate.
- err = m.Matches([]uint16{})
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("[]uint16")))
-
- // Unsigned int candidate.
- err = m.Matches(uint(17))
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("uint")))
-}
-
-func (t *DeepEqualsTest) WrongTypeCandidateWithByteSliceValue() {
- x := []byte{}
- m := DeepEquals(x)
-
- var err error
-
- // Nil candidate.
- err = m.Matches(nil)
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("")))
-
- // String candidate.
- err = m.Matches("taco")
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("string")))
-
- // Slice candidate with wrong value type.
- err = m.Matches([]uint16{})
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("[]uint16")))
-}
-
-func (t *DeepEqualsTest) WrongTypeCandidateWithOtherSliceValue() {
- x := []uint16{}
- m := DeepEquals(x)
-
- var err error
-
- // Nil candidate.
- err = m.Matches(nil)
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("")))
-
- // String candidate.
- err = m.Matches("taco")
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("string")))
-
- // Byte slice candidate with wrong value type.
- err = m.Matches([]byte{})
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("[]uint8")))
-
- // Other slice candidate with wrong value type.
- err = m.Matches([]uint32{})
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("[]uint32")))
-}
-
-func (t *DeepEqualsTest) WrongTypeCandidateWithNilLiteralValue() {
- m := DeepEquals(nil)
-
- var err error
-
- // String candidate.
- err = m.Matches("taco")
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("string")))
-
- // Nil byte slice candidate.
- err = m.Matches([]byte(nil))
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("[]uint8")))
-
- // Nil other slice candidate.
- err = m.Matches([]uint16(nil))
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("type")))
- ExpectThat(err, Error(HasSubstr("[]uint16")))
-}
-
-func (t *DeepEqualsTest) NilLiteralValue() {
- m := DeepEquals(nil)
- ExpectEq("deep equals: ", m.Description())
-
- var c interface{}
- var err error
-
- // Nil literal candidate.
- c = nil
- err = m.Matches(c)
- ExpectEq(nil, err)
-}
-
-func (t *DeepEqualsTest) IntValue() {
- m := DeepEquals(int(17))
- ExpectEq("deep equals: 17", m.Description())
-
- var c interface{}
- var err error
-
- // Matching int.
- c = int(17)
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-matching int.
- c = int(18)
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-}
-
-func (t *DeepEqualsTest) ByteSliceValue() {
- x := []byte{17, 19}
- m := DeepEquals(x)
- ExpectEq("deep equals: [17 19]", m.Description())
-
- var c []byte
- var err error
-
- // Matching.
- c = make([]byte, len(x))
- AssertEq(len(x), copy(c, x))
-
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Nil slice.
- c = []byte(nil)
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("which is nil")))
-
- // Prefix.
- AssertGt(len(x), 1)
- c = make([]byte, len(x)-1)
- AssertEq(len(x)-1, copy(c, x))
-
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Suffix.
- c = make([]byte, len(x)+1)
- AssertEq(len(x), copy(c, x))
-
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-}
-
-func (t *DeepEqualsTest) OtherSliceValue() {
- x := []uint16{17, 19}
- m := DeepEquals(x)
- ExpectEq("deep equals: [17 19]", m.Description())
-
- var c []uint16
- var err error
-
- // Matching.
- c = make([]uint16, len(x))
- AssertEq(len(x), copy(c, x))
-
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Nil slice.
- c = []uint16(nil)
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("which is nil")))
-
- // Prefix.
- AssertGt(len(x), 1)
- c = make([]uint16, len(x)-1)
- AssertEq(len(x)-1, copy(c, x))
-
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-
- // Suffix.
- c = make([]uint16, len(x)+1)
- AssertEq(len(x), copy(c, x))
-
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-}
-
-func (t *DeepEqualsTest) NilByteSliceValue() {
- x := []byte(nil)
- m := DeepEquals(x)
- ExpectEq("deep equals: ", m.Description())
-
- var c []byte
- var err error
-
- // Nil slice.
- c = []byte(nil)
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-nil slice.
- c = []byte{}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-}
-
-func (t *DeepEqualsTest) NilOtherSliceValue() {
- x := []uint16(nil)
- m := DeepEquals(x)
- ExpectEq("deep equals: ", m.Description())
-
- var c []uint16
- var err error
-
- // Nil slice.
- c = []uint16(nil)
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-nil slice.
- c = []uint16{}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("")))
-}
-
-////////////////////////////////////////////////////////////////////////
-// Benchmarks
-////////////////////////////////////////////////////////////////////////
-
-func benchmarkWithSize(b *testing.B, size int) {
- b.StopTimer()
- buf := bytes.Repeat([]byte{0x01}, size)
- bufCopy := make([]byte, size)
- copy(bufCopy, buf)
-
- matcher := DeepEquals(buf)
- b.StartTimer()
-
- for i := 0; i < b.N; i++ {
- matcher.Matches(bufCopy)
- }
-
- b.SetBytes(int64(size))
-}
-
-func BenchmarkShortByteSlice(b *testing.B) {
- benchmarkWithSize(b, 256)
-}
-
-func BenchmarkLongByteSlice(b *testing.B) {
- benchmarkWithSize(b, 1<<24)
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/elements_are_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/elements_are_test.go
deleted file mode 100644
index cfc645489cd..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/elements_are_test.go
+++ /dev/null
@@ -1,208 +0,0 @@
-// Copyright 2012 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type ElementsAreTest struct {
-}
-
-func init() { RegisterTestSuite(&ElementsAreTest{}) }
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *ElementsAreTest) EmptySet() {
- m := ElementsAre()
- ExpectEq("elements are: []", m.Description())
-
- var c []interface{}
- var err error
-
- // No candidates.
- c = []interface{}{}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // One candidate.
- c = []interface{}{17}
- err = m.Matches(c)
- ExpectThat(err, Error(HasSubstr("length 1")))
-}
-
-func (t *ElementsAreTest) OneMatcher() {
- m := ElementsAre(LessThan(17))
- ExpectEq("elements are: [less than 17]", m.Description())
-
- var c []interface{}
- var err error
-
- // No candidates.
- c = []interface{}{}
- err = m.Matches(c)
- ExpectThat(err, Error(HasSubstr("length 0")))
-
- // Matching candidate.
- c = []interface{}{16}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-matching candidate.
- c = []interface{}{19}
- err = m.Matches(c)
- ExpectNe(nil, err)
-
- // Two candidates.
- c = []interface{}{17, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(HasSubstr("length 2")))
-}
-
-func (t *ElementsAreTest) OneValue() {
- m := ElementsAre(17)
- ExpectEq("elements are: [17]", m.Description())
-
- var c []interface{}
- var err error
-
- // No candidates.
- c = []interface{}{}
- err = m.Matches(c)
- ExpectThat(err, Error(HasSubstr("length 0")))
-
- // Matching int.
- c = []interface{}{int(17)}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Matching float.
- c = []interface{}{float32(17)}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // Non-matching candidate.
- c = []interface{}{19}
- err = m.Matches(c)
- ExpectNe(nil, err)
-
- // Two candidates.
- c = []interface{}{17, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(HasSubstr("length 2")))
-}
-
-func (t *ElementsAreTest) MultipleElements() {
- m := ElementsAre("taco", LessThan(17))
- ExpectEq("elements are: [taco, less than 17]", m.Description())
-
- var c []interface{}
- var err error
-
- // One candidate.
- c = []interface{}{17}
- err = m.Matches(c)
- ExpectThat(err, Error(HasSubstr("length 1")))
-
- // Both matching.
- c = []interface{}{"taco", 16}
- err = m.Matches(c)
- ExpectEq(nil, err)
-
- // First non-matching.
- c = []interface{}{"burrito", 16}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("whose element 0 doesn't match")))
-
- // Second non-matching.
- c = []interface{}{"taco", 17}
- err = m.Matches(c)
- ExpectThat(err, Error(Equals("whose element 1 doesn't match")))
-
- // Three candidates.
- c = []interface{}{"taco", 17, 19}
- err = m.Matches(c)
- ExpectThat(err, Error(HasSubstr("length 3")))
-}
-
-func (t *ElementsAreTest) ArrayCandidates() {
- m := ElementsAre("taco", LessThan(17))
-
- var err error
-
- // One candidate.
- err = m.Matches([1]interface{}{"taco"})
- ExpectThat(err, Error(HasSubstr("length 1")))
-
- // Both matching.
- err = m.Matches([2]interface{}{"taco", 16})
- ExpectEq(nil, err)
-
- // First non-matching.
- err = m.Matches([2]interface{}{"burrito", 16})
- ExpectThat(err, Error(Equals("whose element 0 doesn't match")))
-}
-
-func (t *ElementsAreTest) WrongTypeCandidate() {
- m := ElementsAre("taco")
-
- var err error
-
- // String candidate.
- err = m.Matches("taco")
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("array")))
- ExpectThat(err, Error(HasSubstr("slice")))
-
- // Map candidate.
- err = m.Matches(map[string]string{})
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("array")))
- ExpectThat(err, Error(HasSubstr("slice")))
-
- // Nil candidate.
- err = m.Matches(nil)
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(HasSubstr("array")))
- ExpectThat(err, Error(HasSubstr("slice")))
-}
-
-func (t *ElementsAreTest) PropagatesFatality() {
- m := ElementsAre(LessThan(17))
- ExpectEq("elements are: [less than 17]", m.Description())
-
- var c []interface{}
- var err error
-
- // Non-fatal error.
- c = []interface{}{19}
- err = m.Matches(c)
- AssertNe(nil, err)
- ExpectFalse(isFatal(err))
-
- // Fatal error.
- c = []interface{}{"taco"}
- err = m.Matches(c)
- AssertNe(nil, err)
- ExpectTrue(isFatal(err))
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/equals_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/equals_test.go
deleted file mode 100644
index 1b2b66ec57d..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/equals_test.go
+++ /dev/null
@@ -1,3785 +0,0 @@
-// Copyright 2011 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- "fmt"
- "math"
- "unsafe"
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-var someInt int = -17
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type EqualsTest struct {
-}
-
-func init() { RegisterTestSuite(&EqualsTest{}) }
-
-type equalsTestCase struct {
- candidate interface{}
- expectedResult bool
- shouldBeFatal bool
- expectedError string
-}
-
-func (t *EqualsTest) checkTestCases(matcher Matcher, cases []equalsTestCase) {
- for i, c := range cases {
- err := matcher.Matches(c.candidate)
- ExpectEq(c.expectedResult, (err == nil), "Result for case %d: %v", i, c)
-
- if err == nil {
- continue
- }
-
- _, isFatal := err.(*FatalError)
- ExpectEq(c.shouldBeFatal, isFatal, "Fatality for case %d: %v", i, c)
-
- ExpectThat(err, Error(Equals(c.expectedError)), "Case %d: %v", i, c)
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-// nil
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) EqualsNil() {
- matcher := Equals(nil)
- ExpectEq("is nil", matcher.Description())
-
- cases := []equalsTestCase{
- // Legal types
- equalsTestCase{nil, true, false, ""},
- equalsTestCase{chan int(nil), true, false, ""},
- equalsTestCase{(func())(nil), true, false, ""},
- equalsTestCase{interface{}(nil), true, false, ""},
- equalsTestCase{map[int]int(nil), true, false, ""},
- equalsTestCase{(*int)(nil), true, false, ""},
- equalsTestCase{[]int(nil), true, false, ""},
-
- equalsTestCase{make(chan int), false, false, ""},
- equalsTestCase{func() {}, false, false, ""},
- equalsTestCase{map[int]int{}, false, false, ""},
- equalsTestCase{&someInt, false, false, ""},
- equalsTestCase{[]int{}, false, false, ""},
-
- // Illegal types
- equalsTestCase{17, false, true, "which cannot be compared to nil"},
- equalsTestCase{int8(17), false, true, "which cannot be compared to nil"},
- equalsTestCase{uintptr(17), false, true, "which cannot be compared to nil"},
- equalsTestCase{[...]int{}, false, true, "which cannot be compared to nil"},
- equalsTestCase{"taco", false, true, "which cannot be compared to nil"},
- equalsTestCase{equalsTestCase{}, false, true, "which cannot be compared to nil"},
- equalsTestCase{unsafe.Pointer(&someInt), false, true, "which cannot be compared to nil"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// Integer literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeIntegerLiteral() {
- // -2^30
- matcher := Equals(-1073741824)
- ExpectEq("-1073741824", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -1073741824.
- equalsTestCase{-1073741824, true, false, ""},
- equalsTestCase{-1073741824.0, true, false, ""},
- equalsTestCase{-1073741824 + 0i, true, false, ""},
- equalsTestCase{int(-1073741824), true, false, ""},
- equalsTestCase{int32(-1073741824), true, false, ""},
- equalsTestCase{int64(-1073741824), true, false, ""},
- equalsTestCase{float32(-1073741824), true, false, ""},
- equalsTestCase{float64(-1073741824), true, false, ""},
- equalsTestCase{complex64(-1073741824), true, false, ""},
- equalsTestCase{complex128(-1073741824), true, false, ""},
- equalsTestCase{interface{}(int(-1073741824)), true, false, ""},
-
- // Values that would be -1073741824 in two's complement.
- equalsTestCase{uint((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint32((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint64((1 << 64) - 1073741824), false, false, ""},
-
- // Non-equal values of signed integer type.
- equalsTestCase{int(-1073741823), false, false, ""},
- equalsTestCase{int32(-1073741823), false, false, ""},
- equalsTestCase{int64(-1073741823), false, false, ""},
-
- // Non-equal values of other numeric types.
- equalsTestCase{float64(-1073741824.1), false, false, ""},
- equalsTestCase{float64(-1073741823.9), false, false, ""},
- equalsTestCase{complex128(-1073741823), false, false, ""},
- equalsTestCase{complex128(-1073741824 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveIntegerLiteral() {
- // 2^30
- matcher := Equals(1073741824)
- ExpectEq("1073741824", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 1073741824.
- equalsTestCase{1073741824, true, false, ""},
- equalsTestCase{1073741824.0, true, false, ""},
- equalsTestCase{1073741824 + 0i, true, false, ""},
- equalsTestCase{int(1073741824), true, false, ""},
- equalsTestCase{uint(1073741824), true, false, ""},
- equalsTestCase{int32(1073741824), true, false, ""},
- equalsTestCase{int64(1073741824), true, false, ""},
- equalsTestCase{uint32(1073741824), true, false, ""},
- equalsTestCase{uint64(1073741824), true, false, ""},
- equalsTestCase{float32(1073741824), true, false, ""},
- equalsTestCase{float64(1073741824), true, false, ""},
- equalsTestCase{complex64(1073741824), true, false, ""},
- equalsTestCase{complex128(1073741824), true, false, ""},
- equalsTestCase{interface{}(int(1073741824)), true, false, ""},
- equalsTestCase{interface{}(uint(1073741824)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(1073741823), false, false, ""},
- equalsTestCase{int32(1073741823), false, false, ""},
- equalsTestCase{int64(1073741823), false, false, ""},
- equalsTestCase{float64(1073741824.1), false, false, ""},
- equalsTestCase{float64(1073741823.9), false, false, ""},
- equalsTestCase{complex128(1073741823), false, false, ""},
- equalsTestCase{complex128(1073741824 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// Floating point literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeIntegralFloatingPointLiteral() {
- // -2^30
- matcher := Equals(-1073741824.0)
- ExpectEq("-1.073741824e+09", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -1073741824.
- equalsTestCase{-1073741824, true, false, ""},
- equalsTestCase{-1073741824.0, true, false, ""},
- equalsTestCase{-1073741824 + 0i, true, false, ""},
- equalsTestCase{int(-1073741824), true, false, ""},
- equalsTestCase{int32(-1073741824), true, false, ""},
- equalsTestCase{int64(-1073741824), true, false, ""},
- equalsTestCase{float32(-1073741824), true, false, ""},
- equalsTestCase{float64(-1073741824), true, false, ""},
- equalsTestCase{complex64(-1073741824), true, false, ""},
- equalsTestCase{complex128(-1073741824), true, false, ""},
- equalsTestCase{interface{}(int(-1073741824)), true, false, ""},
- equalsTestCase{interface{}(float64(-1073741824)), true, false, ""},
-
- // Values that would be -1073741824 in two's complement.
- equalsTestCase{uint((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint32((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint64((1 << 64) - 1073741824), false, false, ""},
-
- // Non-equal values of signed integer type.
- equalsTestCase{int(-1073741823), false, false, ""},
- equalsTestCase{int32(-1073741823), false, false, ""},
- equalsTestCase{int64(-1073741823), false, false, ""},
-
- // Non-equal values of other numeric types.
- equalsTestCase{float64(-1073741824.1), false, false, ""},
- equalsTestCase{float64(-1073741823.9), false, false, ""},
- equalsTestCase{complex128(-1073741823), false, false, ""},
- equalsTestCase{complex128(-1073741824 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveIntegralFloatingPointLiteral() {
- // 2^30
- matcher := Equals(1073741824.0)
- ExpectEq("1.073741824e+09", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 1073741824.
- equalsTestCase{1073741824, true, false, ""},
- equalsTestCase{1073741824.0, true, false, ""},
- equalsTestCase{1073741824 + 0i, true, false, ""},
- equalsTestCase{int(1073741824), true, false, ""},
- equalsTestCase{int32(1073741824), true, false, ""},
- equalsTestCase{int64(1073741824), true, false, ""},
- equalsTestCase{uint(1073741824), true, false, ""},
- equalsTestCase{uint32(1073741824), true, false, ""},
- equalsTestCase{uint64(1073741824), true, false, ""},
- equalsTestCase{float32(1073741824), true, false, ""},
- equalsTestCase{float64(1073741824), true, false, ""},
- equalsTestCase{complex64(1073741824), true, false, ""},
- equalsTestCase{complex128(1073741824), true, false, ""},
- equalsTestCase{interface{}(int(1073741824)), true, false, ""},
- equalsTestCase{interface{}(float64(1073741824)), true, false, ""},
-
- // Values that would be 1073741824 in two's complement.
- equalsTestCase{uint((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint32((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint64((1 << 64) - 1073741824), false, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(1073741823), false, false, ""},
- equalsTestCase{int32(1073741823), false, false, ""},
- equalsTestCase{int64(1073741823), false, false, ""},
- equalsTestCase{uint(1073741823), false, false, ""},
- equalsTestCase{uint32(1073741823), false, false, ""},
- equalsTestCase{uint64(1073741823), false, false, ""},
- equalsTestCase{float64(1073741824.1), false, false, ""},
- equalsTestCase{float64(1073741823.9), false, false, ""},
- equalsTestCase{complex128(1073741823), false, false, ""},
- equalsTestCase{complex128(1073741824 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NonIntegralFloatingPointLiteral() {
- matcher := Equals(17.1)
- ExpectEq("17.1", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 17.1.
- equalsTestCase{17.1, true, false, ""},
- equalsTestCase{17.1, true, false, ""},
- equalsTestCase{17.1 + 0i, true, false, ""},
- equalsTestCase{float32(17.1), true, false, ""},
- equalsTestCase{float64(17.1), true, false, ""},
- equalsTestCase{complex64(17.1), true, false, ""},
- equalsTestCase{complex128(17.1), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{17, false, false, ""},
- equalsTestCase{17.2, false, false, ""},
- equalsTestCase{18, false, false, ""},
- equalsTestCase{int(17), false, false, ""},
- equalsTestCase{int(18), false, false, ""},
- equalsTestCase{int32(17), false, false, ""},
- equalsTestCase{int64(17), false, false, ""},
- equalsTestCase{uint(17), false, false, ""},
- equalsTestCase{uint32(17), false, false, ""},
- equalsTestCase{uint64(17), false, false, ""},
- equalsTestCase{complex128(17.1 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// bool
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) False() {
- matcher := Equals(false)
- ExpectEq("false", matcher.Description())
-
- cases := []equalsTestCase{
- // bools
- equalsTestCase{false, true, false, ""},
- equalsTestCase{bool(false), true, false, ""},
-
- equalsTestCase{true, false, false, ""},
- equalsTestCase{bool(true), false, false, ""},
-
- // Other types.
- equalsTestCase{int(0), false, true, "which is not a bool"},
- equalsTestCase{int8(0), false, true, "which is not a bool"},
- equalsTestCase{int16(0), false, true, "which is not a bool"},
- equalsTestCase{int32(0), false, true, "which is not a bool"},
- equalsTestCase{int64(0), false, true, "which is not a bool"},
- equalsTestCase{uint(0), false, true, "which is not a bool"},
- equalsTestCase{uint8(0), false, true, "which is not a bool"},
- equalsTestCase{uint16(0), false, true, "which is not a bool"},
- equalsTestCase{uint32(0), false, true, "which is not a bool"},
- equalsTestCase{uint64(0), false, true, "which is not a bool"},
- equalsTestCase{uintptr(0), false, true, "which is not a bool"},
- equalsTestCase{[...]int{}, false, true, "which is not a bool"},
- equalsTestCase{make(chan int), false, true, "which is not a bool"},
- equalsTestCase{func() {}, false, true, "which is not a bool"},
- equalsTestCase{map[int]int{}, false, true, "which is not a bool"},
- equalsTestCase{&someInt, false, true, "which is not a bool"},
- equalsTestCase{[]int{}, false, true, "which is not a bool"},
- equalsTestCase{"taco", false, true, "which is not a bool"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a bool"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) True() {
- matcher := Equals(true)
- ExpectEq("true", matcher.Description())
-
- cases := []equalsTestCase{
- // bools
- equalsTestCase{true, true, false, ""},
- equalsTestCase{bool(true), true, false, ""},
-
- equalsTestCase{false, false, false, ""},
- equalsTestCase{bool(false), false, false, ""},
-
- // Other types.
- equalsTestCase{int(1), false, true, "which is not a bool"},
- equalsTestCase{int8(1), false, true, "which is not a bool"},
- equalsTestCase{int16(1), false, true, "which is not a bool"},
- equalsTestCase{int32(1), false, true, "which is not a bool"},
- equalsTestCase{int64(1), false, true, "which is not a bool"},
- equalsTestCase{uint(1), false, true, "which is not a bool"},
- equalsTestCase{uint8(1), false, true, "which is not a bool"},
- equalsTestCase{uint16(1), false, true, "which is not a bool"},
- equalsTestCase{uint32(1), false, true, "which is not a bool"},
- equalsTestCase{uint64(1), false, true, "which is not a bool"},
- equalsTestCase{uintptr(1), false, true, "which is not a bool"},
- equalsTestCase{[...]int{}, false, true, "which is not a bool"},
- equalsTestCase{make(chan int), false, true, "which is not a bool"},
- equalsTestCase{func() {}, false, true, "which is not a bool"},
- equalsTestCase{map[int]int{}, false, true, "which is not a bool"},
- equalsTestCase{&someInt, false, true, "which is not a bool"},
- equalsTestCase{[]int{}, false, true, "which is not a bool"},
- equalsTestCase{"taco", false, true, "which is not a bool"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a bool"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// int
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeInt() {
- // -2^30
- matcher := Equals(int(-1073741824))
- ExpectEq("-1073741824", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -1073741824.
- equalsTestCase{-1073741824, true, false, ""},
- equalsTestCase{-1073741824.0, true, false, ""},
- equalsTestCase{-1073741824 + 0i, true, false, ""},
- equalsTestCase{int(-1073741824), true, false, ""},
- equalsTestCase{int32(-1073741824), true, false, ""},
- equalsTestCase{int64(-1073741824), true, false, ""},
- equalsTestCase{float32(-1073741824), true, false, ""},
- equalsTestCase{float64(-1073741824), true, false, ""},
- equalsTestCase{complex64(-1073741824), true, false, ""},
- equalsTestCase{complex128(-1073741824), true, false, ""},
- equalsTestCase{interface{}(int(-1073741824)), true, false, ""},
-
- // Values that would be -1073741824 in two's complement.
- equalsTestCase{uint((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint32((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint64((1 << 64) - 1073741824), false, false, ""},
-
- // Non-equal values of signed integer type.
- equalsTestCase{int(-1073741823), false, false, ""},
- equalsTestCase{int32(-1073741823), false, false, ""},
- equalsTestCase{int64(-1073741823), false, false, ""},
-
- // Non-equal values of other numeric types.
- equalsTestCase{float64(-1073741824.1), false, false, ""},
- equalsTestCase{float64(-1073741823.9), false, false, ""},
- equalsTestCase{complex128(-1073741823), false, false, ""},
- equalsTestCase{complex128(-1073741824 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveInt() {
- // 2^30
- matcher := Equals(int(1073741824))
- ExpectEq("1073741824", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 1073741824.
- equalsTestCase{1073741824, true, false, ""},
- equalsTestCase{1073741824.0, true, false, ""},
- equalsTestCase{1073741824 + 0i, true, false, ""},
- equalsTestCase{int(1073741824), true, false, ""},
- equalsTestCase{uint(1073741824), true, false, ""},
- equalsTestCase{int32(1073741824), true, false, ""},
- equalsTestCase{int64(1073741824), true, false, ""},
- equalsTestCase{uint32(1073741824), true, false, ""},
- equalsTestCase{uint64(1073741824), true, false, ""},
- equalsTestCase{float32(1073741824), true, false, ""},
- equalsTestCase{float64(1073741824), true, false, ""},
- equalsTestCase{complex64(1073741824), true, false, ""},
- equalsTestCase{complex128(1073741824), true, false, ""},
- equalsTestCase{interface{}(int(1073741824)), true, false, ""},
- equalsTestCase{interface{}(uint(1073741824)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(1073741823), false, false, ""},
- equalsTestCase{int32(1073741823), false, false, ""},
- equalsTestCase{int64(1073741823), false, false, ""},
- equalsTestCase{float64(1073741824.1), false, false, ""},
- equalsTestCase{float64(1073741823.9), false, false, ""},
- equalsTestCase{complex128(1073741823), false, false, ""},
- equalsTestCase{complex128(1073741824 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// int8
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeInt8() {
- matcher := Equals(int8(-17))
- ExpectEq("-17", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -17.
- equalsTestCase{-17, true, false, ""},
- equalsTestCase{-17.0, true, false, ""},
- equalsTestCase{-17 + 0i, true, false, ""},
- equalsTestCase{int(-17), true, false, ""},
- equalsTestCase{int8(-17), true, false, ""},
- equalsTestCase{int16(-17), true, false, ""},
- equalsTestCase{int32(-17), true, false, ""},
- equalsTestCase{int64(-17), true, false, ""},
- equalsTestCase{float32(-17), true, false, ""},
- equalsTestCase{float64(-17), true, false, ""},
- equalsTestCase{complex64(-17), true, false, ""},
- equalsTestCase{complex128(-17), true, false, ""},
- equalsTestCase{interface{}(int(-17)), true, false, ""},
-
- // Values that would be -17 in two's complement.
- equalsTestCase{uint((1 << 32) - 17), false, false, ""},
- equalsTestCase{uint8((1 << 8) - 17), false, false, ""},
- equalsTestCase{uint16((1 << 16) - 17), false, false, ""},
- equalsTestCase{uint32((1 << 32) - 17), false, false, ""},
- equalsTestCase{uint64((1 << 64) - 17), false, false, ""},
-
- // Non-equal values of signed integer type.
- equalsTestCase{int(-16), false, false, ""},
- equalsTestCase{int8(-16), false, false, ""},
- equalsTestCase{int16(-16), false, false, ""},
- equalsTestCase{int32(-16), false, false, ""},
- equalsTestCase{int64(-16), false, false, ""},
-
- // Non-equal values of other numeric types.
- equalsTestCase{float32(-17.1), false, false, ""},
- equalsTestCase{float32(-16.9), false, false, ""},
- equalsTestCase{complex64(-16), false, false, ""},
- equalsTestCase{complex64(-17 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr((1 << 32) - 17), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{-17}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{-17}, false, true, "which is not numeric"},
- equalsTestCase{"-17", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) ZeroInt8() {
- matcher := Equals(int8(0))
- ExpectEq("0", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 0.
- equalsTestCase{0, true, false, ""},
- equalsTestCase{0.0, true, false, ""},
- equalsTestCase{0 + 0i, true, false, ""},
- equalsTestCase{int(0), true, false, ""},
- equalsTestCase{int8(0), true, false, ""},
- equalsTestCase{int16(0), true, false, ""},
- equalsTestCase{int32(0), true, false, ""},
- equalsTestCase{int64(0), true, false, ""},
- equalsTestCase{float32(0), true, false, ""},
- equalsTestCase{float64(0), true, false, ""},
- equalsTestCase{complex64(0), true, false, ""},
- equalsTestCase{complex128(0), true, false, ""},
- equalsTestCase{interface{}(int(0)), true, false, ""},
- equalsTestCase{uint(0), true, false, ""},
- equalsTestCase{uint8(0), true, false, ""},
- equalsTestCase{uint16(0), true, false, ""},
- equalsTestCase{uint32(0), true, false, ""},
- equalsTestCase{uint64(0), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(1), false, false, ""},
- equalsTestCase{int8(1), false, false, ""},
- equalsTestCase{int16(1), false, false, ""},
- equalsTestCase{int32(1), false, false, ""},
- equalsTestCase{int64(1), false, false, ""},
- equalsTestCase{float32(-0.1), false, false, ""},
- equalsTestCase{float32(0.1), false, false, ""},
- equalsTestCase{complex64(1), false, false, ""},
- equalsTestCase{complex64(0 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{0}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{0}, false, true, "which is not numeric"},
- equalsTestCase{"0", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveInt8() {
- matcher := Equals(int8(17))
- ExpectEq("17", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 17.
- equalsTestCase{17, true, false, ""},
- equalsTestCase{17.0, true, false, ""},
- equalsTestCase{17 + 0i, true, false, ""},
- equalsTestCase{int(17), true, false, ""},
- equalsTestCase{int8(17), true, false, ""},
- equalsTestCase{int16(17), true, false, ""},
- equalsTestCase{int32(17), true, false, ""},
- equalsTestCase{int64(17), true, false, ""},
- equalsTestCase{float32(17), true, false, ""},
- equalsTestCase{float64(17), true, false, ""},
- equalsTestCase{complex64(17), true, false, ""},
- equalsTestCase{complex128(17), true, false, ""},
- equalsTestCase{interface{}(int(17)), true, false, ""},
- equalsTestCase{uint(17), true, false, ""},
- equalsTestCase{uint8(17), true, false, ""},
- equalsTestCase{uint16(17), true, false, ""},
- equalsTestCase{uint32(17), true, false, ""},
- equalsTestCase{uint64(17), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(16), false, false, ""},
- equalsTestCase{int8(16), false, false, ""},
- equalsTestCase{int16(16), false, false, ""},
- equalsTestCase{int32(16), false, false, ""},
- equalsTestCase{int64(16), false, false, ""},
- equalsTestCase{float32(16.9), false, false, ""},
- equalsTestCase{float32(17.1), false, false, ""},
- equalsTestCase{complex64(16), false, false, ""},
- equalsTestCase{complex64(17 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(17), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{17}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{17}, false, true, "which is not numeric"},
- equalsTestCase{"17", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// int16
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeInt16() {
- matcher := Equals(int16(-32766))
- ExpectEq("-32766", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -32766.
- equalsTestCase{-32766, true, false, ""},
- equalsTestCase{-32766.0, true, false, ""},
- equalsTestCase{-32766 + 0i, true, false, ""},
- equalsTestCase{int(-32766), true, false, ""},
- equalsTestCase{int16(-32766), true, false, ""},
- equalsTestCase{int32(-32766), true, false, ""},
- equalsTestCase{int64(-32766), true, false, ""},
- equalsTestCase{float32(-32766), true, false, ""},
- equalsTestCase{float64(-32766), true, false, ""},
- equalsTestCase{complex64(-32766), true, false, ""},
- equalsTestCase{complex128(-32766), true, false, ""},
- equalsTestCase{interface{}(int(-32766)), true, false, ""},
-
- // Values that would be -32766 in two's complement.
- equalsTestCase{uint((1 << 32) - 32766), false, false, ""},
- equalsTestCase{uint16((1 << 16) - 32766), false, false, ""},
- equalsTestCase{uint32((1 << 32) - 32766), false, false, ""},
- equalsTestCase{uint64((1 << 64) - 32766), false, false, ""},
-
- // Non-equal values of signed integer type.
- equalsTestCase{int(-16), false, false, ""},
- equalsTestCase{int8(-16), false, false, ""},
- equalsTestCase{int16(-16), false, false, ""},
- equalsTestCase{int32(-16), false, false, ""},
- equalsTestCase{int64(-16), false, false, ""},
-
- // Non-equal values of other numeric types.
- equalsTestCase{float32(-32766.1), false, false, ""},
- equalsTestCase{float32(-32765.9), false, false, ""},
- equalsTestCase{complex64(-32766.1), false, false, ""},
- equalsTestCase{complex64(-32766 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr((1 << 32) - 32766), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{-32766}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{-32766}, false, true, "which is not numeric"},
- equalsTestCase{"-32766", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) ZeroInt16() {
- matcher := Equals(int16(0))
- ExpectEq("0", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 0.
- equalsTestCase{0, true, false, ""},
- equalsTestCase{0.0, true, false, ""},
- equalsTestCase{0 + 0i, true, false, ""},
- equalsTestCase{int(0), true, false, ""},
- equalsTestCase{int8(0), true, false, ""},
- equalsTestCase{int16(0), true, false, ""},
- equalsTestCase{int32(0), true, false, ""},
- equalsTestCase{int64(0), true, false, ""},
- equalsTestCase{float32(0), true, false, ""},
- equalsTestCase{float64(0), true, false, ""},
- equalsTestCase{complex64(0), true, false, ""},
- equalsTestCase{complex128(0), true, false, ""},
- equalsTestCase{interface{}(int(0)), true, false, ""},
- equalsTestCase{uint(0), true, false, ""},
- equalsTestCase{uint8(0), true, false, ""},
- equalsTestCase{uint16(0), true, false, ""},
- equalsTestCase{uint32(0), true, false, ""},
- equalsTestCase{uint64(0), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(1), false, false, ""},
- equalsTestCase{int8(1), false, false, ""},
- equalsTestCase{int16(1), false, false, ""},
- equalsTestCase{int32(1), false, false, ""},
- equalsTestCase{int64(1), false, false, ""},
- equalsTestCase{float32(-0.1), false, false, ""},
- equalsTestCase{float32(0.1), false, false, ""},
- equalsTestCase{complex64(1), false, false, ""},
- equalsTestCase{complex64(0 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{0}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{0}, false, true, "which is not numeric"},
- equalsTestCase{"0", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveInt16() {
- matcher := Equals(int16(32765))
- ExpectEq("32765", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 32765.
- equalsTestCase{32765, true, false, ""},
- equalsTestCase{32765.0, true, false, ""},
- equalsTestCase{32765 + 0i, true, false, ""},
- equalsTestCase{int(32765), true, false, ""},
- equalsTestCase{int16(32765), true, false, ""},
- equalsTestCase{int32(32765), true, false, ""},
- equalsTestCase{int64(32765), true, false, ""},
- equalsTestCase{float32(32765), true, false, ""},
- equalsTestCase{float64(32765), true, false, ""},
- equalsTestCase{complex64(32765), true, false, ""},
- equalsTestCase{complex128(32765), true, false, ""},
- equalsTestCase{interface{}(int(32765)), true, false, ""},
- equalsTestCase{uint(32765), true, false, ""},
- equalsTestCase{uint16(32765), true, false, ""},
- equalsTestCase{uint32(32765), true, false, ""},
- equalsTestCase{uint64(32765), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(32764), false, false, ""},
- equalsTestCase{int16(32764), false, false, ""},
- equalsTestCase{int32(32764), false, false, ""},
- equalsTestCase{int64(32764), false, false, ""},
- equalsTestCase{float32(32764.9), false, false, ""},
- equalsTestCase{float32(32765.1), false, false, ""},
- equalsTestCase{complex64(32765.9), false, false, ""},
- equalsTestCase{complex64(32765 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(32765), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{32765}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{32765}, false, true, "which is not numeric"},
- equalsTestCase{"32765", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// int32
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeInt32() {
- // -2^30
- matcher := Equals(int32(-1073741824))
- ExpectEq("-1073741824", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -1073741824.
- equalsTestCase{-1073741824, true, false, ""},
- equalsTestCase{-1073741824.0, true, false, ""},
- equalsTestCase{-1073741824 + 0i, true, false, ""},
- equalsTestCase{int(-1073741824), true, false, ""},
- equalsTestCase{int32(-1073741824), true, false, ""},
- equalsTestCase{int64(-1073741824), true, false, ""},
- equalsTestCase{float32(-1073741824), true, false, ""},
- equalsTestCase{float64(-1073741824), true, false, ""},
- equalsTestCase{complex64(-1073741824), true, false, ""},
- equalsTestCase{complex128(-1073741824), true, false, ""},
- equalsTestCase{interface{}(int(-1073741824)), true, false, ""},
-
- // Values that would be -1073741824 in two's complement.
- equalsTestCase{uint((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint32((1 << 32) - 1073741824), false, false, ""},
- equalsTestCase{uint64((1 << 64) - 1073741824), false, false, ""},
-
- // Non-equal values of signed integer type.
- equalsTestCase{int(-1073741823), false, false, ""},
- equalsTestCase{int32(-1073741823), false, false, ""},
- equalsTestCase{int64(-1073741823), false, false, ""},
-
- // Non-equal values of other numeric types.
- equalsTestCase{float64(-1073741824.1), false, false, ""},
- equalsTestCase{float64(-1073741823.9), false, false, ""},
- equalsTestCase{complex128(-1073741823), false, false, ""},
- equalsTestCase{complex128(-1073741824 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveInt32() {
- // 2^30
- matcher := Equals(int32(1073741824))
- ExpectEq("1073741824", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 1073741824.
- equalsTestCase{1073741824, true, false, ""},
- equalsTestCase{1073741824.0, true, false, ""},
- equalsTestCase{1073741824 + 0i, true, false, ""},
- equalsTestCase{int(1073741824), true, false, ""},
- equalsTestCase{uint(1073741824), true, false, ""},
- equalsTestCase{int32(1073741824), true, false, ""},
- equalsTestCase{int64(1073741824), true, false, ""},
- equalsTestCase{uint32(1073741824), true, false, ""},
- equalsTestCase{uint64(1073741824), true, false, ""},
- equalsTestCase{float32(1073741824), true, false, ""},
- equalsTestCase{float64(1073741824), true, false, ""},
- equalsTestCase{complex64(1073741824), true, false, ""},
- equalsTestCase{complex128(1073741824), true, false, ""},
- equalsTestCase{interface{}(int(1073741824)), true, false, ""},
- equalsTestCase{interface{}(uint(1073741824)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(1073741823), false, false, ""},
- equalsTestCase{int32(1073741823), false, false, ""},
- equalsTestCase{int64(1073741823), false, false, ""},
- equalsTestCase{float64(1073741824.1), false, false, ""},
- equalsTestCase{float64(1073741823.9), false, false, ""},
- equalsTestCase{complex128(1073741823), false, false, ""},
- equalsTestCase{complex128(1073741824 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// int64
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeInt64() {
- // -2^40
- matcher := Equals(int64(-1099511627776))
- ExpectEq("-1099511627776", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -1099511627776.
- equalsTestCase{-1099511627776.0, true, false, ""},
- equalsTestCase{-1099511627776 + 0i, true, false, ""},
- equalsTestCase{int64(-1099511627776), true, false, ""},
- equalsTestCase{float32(-1099511627776), true, false, ""},
- equalsTestCase{float64(-1099511627776), true, false, ""},
- equalsTestCase{complex64(-1099511627776), true, false, ""},
- equalsTestCase{complex128(-1099511627776), true, false, ""},
- equalsTestCase{interface{}(int64(-1099511627776)), true, false, ""},
-
- // Values that would be -1099511627776 in two's complement.
- equalsTestCase{uint64((1 << 64) - 1099511627776), false, false, ""},
-
- // Non-equal values of signed integer type.
- equalsTestCase{int64(-1099511627775), false, false, ""},
-
- // Non-equal values of other numeric types.
- equalsTestCase{float64(-1099511627776.1), false, false, ""},
- equalsTestCase{float64(-1099511627775.9), false, false, ""},
- equalsTestCase{complex128(-1099511627775), false, false, ""},
- equalsTestCase{complex128(-1099511627776 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveInt64() {
- // 2^40
- matcher := Equals(int64(1099511627776))
- ExpectEq("1099511627776", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 1099511627776.
- equalsTestCase{1099511627776.0, true, false, ""},
- equalsTestCase{1099511627776 + 0i, true, false, ""},
- equalsTestCase{int64(1099511627776), true, false, ""},
- equalsTestCase{uint64(1099511627776), true, false, ""},
- equalsTestCase{float32(1099511627776), true, false, ""},
- equalsTestCase{float64(1099511627776), true, false, ""},
- equalsTestCase{complex64(1099511627776), true, false, ""},
- equalsTestCase{complex128(1099511627776), true, false, ""},
- equalsTestCase{interface{}(int64(1099511627776)), true, false, ""},
- equalsTestCase{interface{}(uint64(1099511627776)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(1099511627775), false, false, ""},
- equalsTestCase{uint64(1099511627775), false, false, ""},
- equalsTestCase{float64(1099511627776.1), false, false, ""},
- equalsTestCase{float64(1099511627775.9), false, false, ""},
- equalsTestCase{complex128(1099511627775), false, false, ""},
- equalsTestCase{complex128(1099511627776 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Int64NotExactlyRepresentableBySinglePrecision() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := Equals(int64(kTwoTo25 + 1))
- ExpectEq("33554433", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{int64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 2), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 2), false, false, ""},
-
- // Single-precision floating point.
- equalsTestCase{float32(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{float32(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{complex64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{complex64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 3), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{float64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 2), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 2), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Int64NotExactlyRepresentableByDoublePrecision() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := Equals(int64(kTwoTo54 + 1))
- ExpectEq("18014398509481985", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo54 + 0), false, false, ""},
- equalsTestCase{int64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 2), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo54 + 0), false, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 2), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{float64(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 3), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{complex128(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 3), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// uint
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) SmallUint() {
- const kExpected = 17
- matcher := Equals(uint(kExpected))
- ExpectEq("17", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{17, true, false, ""},
- equalsTestCase{17.0, true, false, ""},
- equalsTestCase{17 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int8(kExpected), true, false, ""},
- equalsTestCase{int16(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint(kExpected), true, false, ""},
- equalsTestCase{uint8(kExpected), true, false, ""},
- equalsTestCase{uint16(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{kExpected + 1, false, false, ""},
- equalsTestCase{int(kExpected + 1), false, false, ""},
- equalsTestCase{int8(kExpected + 1), false, false, ""},
- equalsTestCase{int16(kExpected + 1), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint(kExpected + 1), false, false, ""},
- equalsTestCase{uint8(kExpected + 1), false, false, ""},
- equalsTestCase{uint16(kExpected + 1), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargeUint() {
- const kExpected = (1 << 16) + 17
- matcher := Equals(uint(kExpected))
- ExpectEq("65553", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{65553, true, false, ""},
- equalsTestCase{65553.0, true, false, ""},
- equalsTestCase{65553 + 0i, true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{int16(17), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint16(17), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) UintNotExactlyRepresentableBySinglePrecision() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := Equals(uint(kTwoTo25 + 1))
- ExpectEq("33554433", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{int64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 2), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 2), false, false, ""},
-
- // Single-precision floating point.
- equalsTestCase{float32(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{float32(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{complex64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{complex64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 3), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{float64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 2), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 2), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// uint8
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) SmallUint8() {
- const kExpected = 17
- matcher := Equals(uint8(kExpected))
- ExpectEq("17", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{17, true, false, ""},
- equalsTestCase{17.0, true, false, ""},
- equalsTestCase{17 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int8(kExpected), true, false, ""},
- equalsTestCase{int16(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint(kExpected), true, false, ""},
- equalsTestCase{uint8(kExpected), true, false, ""},
- equalsTestCase{uint16(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{kExpected + 1, false, false, ""},
- equalsTestCase{int(kExpected + 1), false, false, ""},
- equalsTestCase{int8(kExpected + 1), false, false, ""},
- equalsTestCase{int16(kExpected + 1), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint(kExpected + 1), false, false, ""},
- equalsTestCase{uint8(kExpected + 1), false, false, ""},
- equalsTestCase{uint16(kExpected + 1), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// uint16
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) SmallUint16() {
- const kExpected = 17
- matcher := Equals(uint16(kExpected))
- ExpectEq("17", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{17, true, false, ""},
- equalsTestCase{17.0, true, false, ""},
- equalsTestCase{17 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int8(kExpected), true, false, ""},
- equalsTestCase{int16(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint(kExpected), true, false, ""},
- equalsTestCase{uint8(kExpected), true, false, ""},
- equalsTestCase{uint16(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{kExpected + 1, false, false, ""},
- equalsTestCase{int(kExpected + 1), false, false, ""},
- equalsTestCase{int8(kExpected + 1), false, false, ""},
- equalsTestCase{int16(kExpected + 1), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint(kExpected + 1), false, false, ""},
- equalsTestCase{uint8(kExpected + 1), false, false, ""},
- equalsTestCase{uint16(kExpected + 1), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargeUint16() {
- const kExpected = (1 << 8) + 17
- matcher := Equals(uint16(kExpected))
- ExpectEq("273", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{273, true, false, ""},
- equalsTestCase{273.0, true, false, ""},
- equalsTestCase{273 + 0i, true, false, ""},
- equalsTestCase{int16(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint16(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{int8(17), false, false, ""},
- equalsTestCase{int16(kExpected + 1), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint8(17), false, false, ""},
- equalsTestCase{uint16(kExpected + 1), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// uint32
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) SmallUint32() {
- const kExpected = 17
- matcher := Equals(uint32(kExpected))
- ExpectEq("17", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{17, true, false, ""},
- equalsTestCase{17.0, true, false, ""},
- equalsTestCase{17 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int8(kExpected), true, false, ""},
- equalsTestCase{int16(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint(kExpected), true, false, ""},
- equalsTestCase{uint8(kExpected), true, false, ""},
- equalsTestCase{uint16(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{kExpected + 1, false, false, ""},
- equalsTestCase{int(kExpected + 1), false, false, ""},
- equalsTestCase{int8(kExpected + 1), false, false, ""},
- equalsTestCase{int16(kExpected + 1), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint(kExpected + 1), false, false, ""},
- equalsTestCase{uint8(kExpected + 1), false, false, ""},
- equalsTestCase{uint16(kExpected + 1), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargeUint32() {
- const kExpected = (1 << 16) + 17
- matcher := Equals(uint32(kExpected))
- ExpectEq("65553", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{65553, true, false, ""},
- equalsTestCase{65553.0, true, false, ""},
- equalsTestCase{65553 + 0i, true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{int16(17), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint16(17), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Uint32NotExactlyRepresentableBySinglePrecision() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := Equals(uint32(kTwoTo25 + 1))
- ExpectEq("33554433", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{int64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 2), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 2), false, false, ""},
-
- // Single-precision floating point.
- equalsTestCase{float32(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{float32(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{complex64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{complex64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 3), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{float64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 2), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 2), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// uint64
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) SmallUint64() {
- const kExpected = 17
- matcher := Equals(uint64(kExpected))
- ExpectEq("17", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{17, true, false, ""},
- equalsTestCase{17.0, true, false, ""},
- equalsTestCase{17 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int8(kExpected), true, false, ""},
- equalsTestCase{int16(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint(kExpected), true, false, ""},
- equalsTestCase{uint8(kExpected), true, false, ""},
- equalsTestCase{uint16(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{kExpected + 1, false, false, ""},
- equalsTestCase{int(kExpected + 1), false, false, ""},
- equalsTestCase{int8(kExpected + 1), false, false, ""},
- equalsTestCase{int16(kExpected + 1), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint(kExpected + 1), false, false, ""},
- equalsTestCase{uint8(kExpected + 1), false, false, ""},
- equalsTestCase{uint16(kExpected + 1), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargeUint64() {
- const kExpected = (1 << 32) + 17
- matcher := Equals(uint64(kExpected))
- ExpectEq("4294967313", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{4294967313.0, true, false, ""},
- equalsTestCase{4294967313 + 0i, true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric types.
- equalsTestCase{int(17), false, false, ""},
- equalsTestCase{int32(17), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint(17), false, false, ""},
- equalsTestCase{uint32(17), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected + 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 1), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Uint64NotExactlyRepresentableBySinglePrecision() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := Equals(uint64(kTwoTo25 + 1))
- ExpectEq("33554433", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{int64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 2), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 2), false, false, ""},
-
- // Single-precision floating point.
- equalsTestCase{float32(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{float32(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{complex64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{complex64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 3), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{float64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 2), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo25 + 0), false, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 2), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Uint64NotExactlyRepresentableByDoublePrecision() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := Equals(uint64(kTwoTo54 + 1))
- ExpectEq("18014398509481985", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo54 + 0), false, false, ""},
- equalsTestCase{int64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 2), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo54 + 0), false, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 2), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{float64(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 3), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{complex128(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 3), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// uintptr
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NilUintptr() {
- var ptr1 uintptr
- var ptr2 uintptr
-
- matcher := Equals(ptr1)
- ExpectEq("0", matcher.Description())
-
- cases := []equalsTestCase{
- // uintptrs
- equalsTestCase{ptr1, true, false, ""},
- equalsTestCase{ptr2, true, false, ""},
- equalsTestCase{uintptr(0), true, false, ""},
- equalsTestCase{uintptr(17), false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a uintptr"},
- equalsTestCase{bool(false), false, true, "which is not a uintptr"},
- equalsTestCase{int(0), false, true, "which is not a uintptr"},
- equalsTestCase{int8(0), false, true, "which is not a uintptr"},
- equalsTestCase{int16(0), false, true, "which is not a uintptr"},
- equalsTestCase{int32(0), false, true, "which is not a uintptr"},
- equalsTestCase{int64(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint8(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint16(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint32(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint64(0), false, true, "which is not a uintptr"},
- equalsTestCase{true, false, true, "which is not a uintptr"},
- equalsTestCase{[...]int{}, false, true, "which is not a uintptr"},
- equalsTestCase{make(chan int), false, true, "which is not a uintptr"},
- equalsTestCase{func() {}, false, true, "which is not a uintptr"},
- equalsTestCase{map[int]int{}, false, true, "which is not a uintptr"},
- equalsTestCase{&someInt, false, true, "which is not a uintptr"},
- equalsTestCase{[]int{}, false, true, "which is not a uintptr"},
- equalsTestCase{"taco", false, true, "which is not a uintptr"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a uintptr"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NonNilUintptr() {
- matcher := Equals(uintptr(17))
- ExpectEq("17", matcher.Description())
-
- cases := []equalsTestCase{
- // uintptrs
- equalsTestCase{uintptr(17), true, false, ""},
- equalsTestCase{uintptr(16), false, false, ""},
- equalsTestCase{uintptr(0), false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a uintptr"},
- equalsTestCase{bool(false), false, true, "which is not a uintptr"},
- equalsTestCase{int(0), false, true, "which is not a uintptr"},
- equalsTestCase{int8(0), false, true, "which is not a uintptr"},
- equalsTestCase{int16(0), false, true, "which is not a uintptr"},
- equalsTestCase{int32(0), false, true, "which is not a uintptr"},
- equalsTestCase{int64(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint8(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint16(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint32(0), false, true, "which is not a uintptr"},
- equalsTestCase{uint64(0), false, true, "which is not a uintptr"},
- equalsTestCase{true, false, true, "which is not a uintptr"},
- equalsTestCase{[...]int{}, false, true, "which is not a uintptr"},
- equalsTestCase{make(chan int), false, true, "which is not a uintptr"},
- equalsTestCase{func() {}, false, true, "which is not a uintptr"},
- equalsTestCase{map[int]int{}, false, true, "which is not a uintptr"},
- equalsTestCase{&someInt, false, true, "which is not a uintptr"},
- equalsTestCase{[]int{}, false, true, "which is not a uintptr"},
- equalsTestCase{"taco", false, true, "which is not a uintptr"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a uintptr"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// float32
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeIntegralFloat32() {
- matcher := Equals(float32(-32769))
- ExpectEq("-32769", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -32769.
- equalsTestCase{-32769.0, true, false, ""},
- equalsTestCase{-32769 + 0i, true, false, ""},
- equalsTestCase{int32(-32769), true, false, ""},
- equalsTestCase{int64(-32769), true, false, ""},
- equalsTestCase{float32(-32769), true, false, ""},
- equalsTestCase{float64(-32769), true, false, ""},
- equalsTestCase{complex64(-32769), true, false, ""},
- equalsTestCase{complex128(-32769), true, false, ""},
- equalsTestCase{interface{}(float32(-32769)), true, false, ""},
- equalsTestCase{interface{}(int64(-32769)), true, false, ""},
-
- // Values that would be -32769 in two's complement.
- equalsTestCase{uint64((1 << 64) - 32769), false, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(-32770), false, false, ""},
- equalsTestCase{float32(-32769.1), false, false, ""},
- equalsTestCase{float32(-32768.9), false, false, ""},
- equalsTestCase{float64(-32769.1), false, false, ""},
- equalsTestCase{float64(-32768.9), false, false, ""},
- equalsTestCase{complex128(-32768), false, false, ""},
- equalsTestCase{complex128(-32769 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NegativeNonIntegralFloat32() {
- matcher := Equals(float32(-32769.1))
- ExpectEq("-32769.1", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of -32769.1.
- equalsTestCase{-32769.1, true, false, ""},
- equalsTestCase{-32769.1 + 0i, true, false, ""},
- equalsTestCase{float32(-32769.1), true, false, ""},
- equalsTestCase{float64(-32769.1), true, false, ""},
- equalsTestCase{complex64(-32769.1), true, false, ""},
- equalsTestCase{complex128(-32769.1), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int32(-32769), false, false, ""},
- equalsTestCase{int32(-32770), false, false, ""},
- equalsTestCase{int64(-32769), false, false, ""},
- equalsTestCase{int64(-32770), false, false, ""},
- equalsTestCase{float32(-32769.2), false, false, ""},
- equalsTestCase{float32(-32769.0), false, false, ""},
- equalsTestCase{float64(-32769.2), false, false, ""},
- equalsTestCase{complex128(-32769.1 + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargeNegativeFloat32() {
- const kExpected = -1 * (1 << 65)
- matcher := Equals(float32(kExpected))
- ExpectEq("-3.689349e+19", matcher.Description())
-
- floatExpected := float32(kExpected)
- castedInt := int64(floatExpected)
-
- cases := []equalsTestCase{
- // Equal values of numeric type.
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{castedInt, false, false, ""},
- equalsTestCase{int64(0), false, false, ""},
- equalsTestCase{int64(math.MinInt64), false, false, ""},
- equalsTestCase{int64(math.MaxInt64), false, false, ""},
- equalsTestCase{float32(kExpected / 2), false, false, ""},
- equalsTestCase{float64(kExpected / 2), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) ZeroFloat32() {
- matcher := Equals(float32(0))
- ExpectEq("0", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of zero.
- equalsTestCase{0.0, true, false, ""},
- equalsTestCase{0 + 0i, true, false, ""},
- equalsTestCase{int(0), true, false, ""},
- equalsTestCase{int8(0), true, false, ""},
- equalsTestCase{int16(0), true, false, ""},
- equalsTestCase{int32(0), true, false, ""},
- equalsTestCase{int64(0), true, false, ""},
- equalsTestCase{uint(0), true, false, ""},
- equalsTestCase{uint8(0), true, false, ""},
- equalsTestCase{uint16(0), true, false, ""},
- equalsTestCase{uint32(0), true, false, ""},
- equalsTestCase{uint64(0), true, false, ""},
- equalsTestCase{float32(0), true, false, ""},
- equalsTestCase{float64(0), true, false, ""},
- equalsTestCase{complex64(0), true, false, ""},
- equalsTestCase{complex128(0), true, false, ""},
- equalsTestCase{interface{}(float32(0)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(1), false, false, ""},
- equalsTestCase{int64(-1), false, false, ""},
- equalsTestCase{float32(1), false, false, ""},
- equalsTestCase{float32(-1), false, false, ""},
- equalsTestCase{complex128(0 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveIntegralFloat32() {
- matcher := Equals(float32(32769))
- ExpectEq("32769", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 32769.
- equalsTestCase{32769.0, true, false, ""},
- equalsTestCase{32769 + 0i, true, false, ""},
- equalsTestCase{int(32769), true, false, ""},
- equalsTestCase{int32(32769), true, false, ""},
- equalsTestCase{int64(32769), true, false, ""},
- equalsTestCase{uint(32769), true, false, ""},
- equalsTestCase{uint32(32769), true, false, ""},
- equalsTestCase{uint64(32769), true, false, ""},
- equalsTestCase{float32(32769), true, false, ""},
- equalsTestCase{float64(32769), true, false, ""},
- equalsTestCase{complex64(32769), true, false, ""},
- equalsTestCase{complex128(32769), true, false, ""},
- equalsTestCase{interface{}(float32(32769)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(32770), false, false, ""},
- equalsTestCase{uint64(32770), false, false, ""},
- equalsTestCase{float32(32769.1), false, false, ""},
- equalsTestCase{float32(32768.9), false, false, ""},
- equalsTestCase{float64(32769.1), false, false, ""},
- equalsTestCase{float64(32768.9), false, false, ""},
- equalsTestCase{complex128(32768), false, false, ""},
- equalsTestCase{complex128(32769 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveNonIntegralFloat32() {
- matcher := Equals(float32(32769.1))
- ExpectEq("32769.1", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 32769.1.
- equalsTestCase{32769.1, true, false, ""},
- equalsTestCase{32769.1 + 0i, true, false, ""},
- equalsTestCase{float32(32769.1), true, false, ""},
- equalsTestCase{float64(32769.1), true, false, ""},
- equalsTestCase{complex64(32769.1), true, false, ""},
- equalsTestCase{complex128(32769.1), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int32(32769), false, false, ""},
- equalsTestCase{int32(32770), false, false, ""},
- equalsTestCase{uint64(32769), false, false, ""},
- equalsTestCase{uint64(32770), false, false, ""},
- equalsTestCase{float32(32769.2), false, false, ""},
- equalsTestCase{float32(32769.0), false, false, ""},
- equalsTestCase{float64(32769.2), false, false, ""},
- equalsTestCase{complex128(32769.1 + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargePositiveFloat32() {
- const kExpected = 1 << 65
- matcher := Equals(float32(kExpected))
- ExpectEq("3.689349e+19", matcher.Description())
-
- floatExpected := float32(kExpected)
- castedInt := uint64(floatExpected)
-
- cases := []equalsTestCase{
- // Equal values of numeric type.
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{castedInt, false, false, ""},
- equalsTestCase{int64(0), false, false, ""},
- equalsTestCase{int64(math.MinInt64), false, false, ""},
- equalsTestCase{int64(math.MaxInt64), false, false, ""},
- equalsTestCase{uint64(0), false, false, ""},
- equalsTestCase{uint64(math.MaxUint64), false, false, ""},
- equalsTestCase{float32(kExpected / 2), false, false, ""},
- equalsTestCase{float64(kExpected / 2), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Float32AboveExactIntegerRange() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := Equals(float32(kTwoTo25 + 1))
- ExpectEq("3.3554432e+07", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{int64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{uint64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 3), false, false, ""},
-
- // Single-precision floating point.
- equalsTestCase{float32(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{float32(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{complex64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{complex64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 3), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{float64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{complex128(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 3), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// float64
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeIntegralFloat64() {
- const kExpected = -(1 << 50)
- matcher := Equals(float64(kExpected))
- ExpectEq("-1.125899906842624e+15", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{-1125899906842624.0, true, false, ""},
- equalsTestCase{-1125899906842624.0 + 0i, true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
- equalsTestCase{interface{}(float64(kExpected)), true, false, ""},
-
- // Values that would be kExpected in two's complement.
- equalsTestCase{uint64((1 << 64) + kExpected), false, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float32(kExpected + (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.5), false, false, ""},
- equalsTestCase{float64(kExpected + 0.5), false, false, ""},
- equalsTestCase{complex128(kExpected - 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NegativeNonIntegralFloat64() {
- const kTwoTo50 = 1 << 50
- const kExpected = -kTwoTo50 - 0.25
-
- matcher := Equals(float64(kExpected))
- ExpectEq("-1.1258999068426242e+15", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{kExpected, true, false, ""},
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(-kTwoTo50), false, false, ""},
- equalsTestCase{int64(-kTwoTo50 - 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.25), false, false, ""},
- equalsTestCase{float64(kExpected + 0.25), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargeNegativeFloat64() {
- const kExpected = -1 * (1 << 65)
- matcher := Equals(float64(kExpected))
- ExpectEq("-3.6893488147419103e+19", matcher.Description())
-
- floatExpected := float64(kExpected)
- castedInt := int64(floatExpected)
-
- cases := []equalsTestCase{
- // Equal values of numeric type.
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{castedInt, false, false, ""},
- equalsTestCase{int64(0), false, false, ""},
- equalsTestCase{int64(math.MinInt64), false, false, ""},
- equalsTestCase{int64(math.MaxInt64), false, false, ""},
- equalsTestCase{float32(kExpected / 2), false, false, ""},
- equalsTestCase{float64(kExpected / 2), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) ZeroFloat64() {
- matcher := Equals(float64(0))
- ExpectEq("0", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of zero.
- equalsTestCase{0.0, true, false, ""},
- equalsTestCase{0 + 0i, true, false, ""},
- equalsTestCase{int(0), true, false, ""},
- equalsTestCase{int8(0), true, false, ""},
- equalsTestCase{int16(0), true, false, ""},
- equalsTestCase{int32(0), true, false, ""},
- equalsTestCase{int64(0), true, false, ""},
- equalsTestCase{uint(0), true, false, ""},
- equalsTestCase{uint8(0), true, false, ""},
- equalsTestCase{uint16(0), true, false, ""},
- equalsTestCase{uint32(0), true, false, ""},
- equalsTestCase{uint64(0), true, false, ""},
- equalsTestCase{float32(0), true, false, ""},
- equalsTestCase{float64(0), true, false, ""},
- equalsTestCase{complex64(0), true, false, ""},
- equalsTestCase{complex128(0), true, false, ""},
- equalsTestCase{interface{}(float32(0)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(1), false, false, ""},
- equalsTestCase{int64(-1), false, false, ""},
- equalsTestCase{float32(1), false, false, ""},
- equalsTestCase{float32(-1), false, false, ""},
- equalsTestCase{complex128(0 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveIntegralFloat64() {
- const kExpected = 1 << 50
- matcher := Equals(float64(kExpected))
- ExpectEq("1.125899906842624e+15", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 32769.
- equalsTestCase{1125899906842624.0, true, false, ""},
- equalsTestCase{1125899906842624.0 + 0i, true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
- equalsTestCase{interface{}(float64(kExpected)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float32(kExpected + (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.5), false, false, ""},
- equalsTestCase{float64(kExpected + 0.5), false, false, ""},
- equalsTestCase{complex128(kExpected - 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveNonIntegralFloat64() {
- const kTwoTo50 = 1 << 50
- const kExpected = kTwoTo50 + 0.25
- matcher := Equals(float64(kExpected))
- ExpectEq("1.1258999068426242e+15", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{kExpected, true, false, ""},
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(kTwoTo50), false, false, ""},
- equalsTestCase{int64(kTwoTo50 - 1), false, false, ""},
- equalsTestCase{float64(kExpected - 0.25), false, false, ""},
- equalsTestCase{float64(kExpected + 0.25), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargePositiveFloat64() {
- const kExpected = 1 << 65
- matcher := Equals(float64(kExpected))
- ExpectEq("3.6893488147419103e+19", matcher.Description())
-
- floatExpected := float64(kExpected)
- castedInt := uint64(floatExpected)
-
- cases := []equalsTestCase{
- // Equal values of numeric type.
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{castedInt, false, false, ""},
- equalsTestCase{int64(0), false, false, ""},
- equalsTestCase{int64(math.MinInt64), false, false, ""},
- equalsTestCase{int64(math.MaxInt64), false, false, ""},
- equalsTestCase{uint64(0), false, false, ""},
- equalsTestCase{uint64(math.MaxUint64), false, false, ""},
- equalsTestCase{float32(kExpected / 2), false, false, ""},
- equalsTestCase{float64(kExpected / 2), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Float64AboveExactIntegerRange() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := Equals(float64(kTwoTo54 + 1))
- ExpectEq("1.8014398509481984e+16", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{int64(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 3), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{uint64(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 3), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{float64(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 3), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{complex128(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 3), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// complex64
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeIntegralComplex64() {
- const kExpected = -32769
- matcher := Equals(complex64(kExpected))
- ExpectEq("(-32769+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{-32769.0, true, false, ""},
- equalsTestCase{-32769.0 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
- equalsTestCase{interface{}(float64(kExpected)), true, false, ""},
-
- // Values that would be kExpected in two's complement.
- equalsTestCase{uint32((1 << 32) + kExpected), false, false, ""},
- equalsTestCase{uint64((1 << 64) + kExpected), false, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float32(kExpected + (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.5), false, false, ""},
- equalsTestCase{float64(kExpected + 0.5), false, false, ""},
- equalsTestCase{complex64(kExpected - 1), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected - 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NegativeNonIntegralComplex64() {
- const kTwoTo20 = 1 << 20
- const kExpected = -kTwoTo20 - 0.25
-
- matcher := Equals(complex64(kExpected))
- ExpectEq("(-1.0485762e+06+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{kExpected, true, false, ""},
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(-kTwoTo20), false, false, ""},
- equalsTestCase{int(-kTwoTo20 - 1), false, false, ""},
- equalsTestCase{int32(-kTwoTo20), false, false, ""},
- equalsTestCase{int32(-kTwoTo20 - 1), false, false, ""},
- equalsTestCase{int64(-kTwoTo20), false, false, ""},
- equalsTestCase{int64(-kTwoTo20 - 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.25), false, false, ""},
- equalsTestCase{float64(kExpected + 0.25), false, false, ""},
- equalsTestCase{complex64(kExpected - 0.75), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected - 0.75), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargeNegativeComplex64() {
- const kExpected = -1 * (1 << 65)
- matcher := Equals(complex64(kExpected))
- ExpectEq("(-3.689349e+19+0i)", matcher.Description())
-
- floatExpected := float64(kExpected)
- castedInt := int64(floatExpected)
-
- cases := []equalsTestCase{
- // Equal values of numeric type.
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{castedInt, false, false, ""},
- equalsTestCase{int64(0), false, false, ""},
- equalsTestCase{int64(math.MinInt64), false, false, ""},
- equalsTestCase{int64(math.MaxInt64), false, false, ""},
- equalsTestCase{float32(kExpected / 2), false, false, ""},
- equalsTestCase{float64(kExpected / 2), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) ZeroComplex64() {
- matcher := Equals(complex64(0))
- ExpectEq("(0+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of zero.
- equalsTestCase{0.0, true, false, ""},
- equalsTestCase{0 + 0i, true, false, ""},
- equalsTestCase{int(0), true, false, ""},
- equalsTestCase{int8(0), true, false, ""},
- equalsTestCase{int16(0), true, false, ""},
- equalsTestCase{int32(0), true, false, ""},
- equalsTestCase{int64(0), true, false, ""},
- equalsTestCase{uint(0), true, false, ""},
- equalsTestCase{uint8(0), true, false, ""},
- equalsTestCase{uint16(0), true, false, ""},
- equalsTestCase{uint32(0), true, false, ""},
- equalsTestCase{uint64(0), true, false, ""},
- equalsTestCase{float32(0), true, false, ""},
- equalsTestCase{float64(0), true, false, ""},
- equalsTestCase{complex64(0), true, false, ""},
- equalsTestCase{complex128(0), true, false, ""},
- equalsTestCase{interface{}(float32(0)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(1), false, false, ""},
- equalsTestCase{int64(-1), false, false, ""},
- equalsTestCase{float32(1), false, false, ""},
- equalsTestCase{float32(-1), false, false, ""},
- equalsTestCase{float64(1), false, false, ""},
- equalsTestCase{float64(-1), false, false, ""},
- equalsTestCase{complex64(0 + 2i), false, false, ""},
- equalsTestCase{complex128(0 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveIntegralComplex64() {
- const kExpected = 1 << 20
- matcher := Equals(complex64(kExpected))
- ExpectEq("(1.048576e+06+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 32769.
- equalsTestCase{1048576.0, true, false, ""},
- equalsTestCase{1048576.0 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
- equalsTestCase{interface{}(float64(kExpected)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(kExpected + 1), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint(kExpected + 1), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float32(kExpected + (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.5), false, false, ""},
- equalsTestCase{float64(kExpected + 0.5), false, false, ""},
- equalsTestCase{complex128(kExpected - 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveNonIntegralComplex64() {
- const kTwoTo20 = 1 << 20
- const kExpected = kTwoTo20 + 0.25
- matcher := Equals(complex64(kExpected))
- ExpectEq("(1.0485762e+06+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{kExpected, true, false, ""},
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(kTwoTo20), false, false, ""},
- equalsTestCase{int64(kTwoTo20 - 1), false, false, ""},
- equalsTestCase{uint64(kTwoTo20), false, false, ""},
- equalsTestCase{uint64(kTwoTo20 - 1), false, false, ""},
- equalsTestCase{float32(kExpected - 1), false, false, ""},
- equalsTestCase{float32(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected - 0.25), false, false, ""},
- equalsTestCase{float64(kExpected + 0.25), false, false, ""},
- equalsTestCase{complex64(kExpected - 1), false, false, ""},
- equalsTestCase{complex64(kExpected - 1i), false, false, ""},
- equalsTestCase{complex128(kExpected - 1), false, false, ""},
- equalsTestCase{complex128(kExpected - 1i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargePositiveComplex64() {
- const kExpected = 1 << 65
- matcher := Equals(complex64(kExpected))
- ExpectEq("(3.689349e+19+0i)", matcher.Description())
-
- floatExpected := float64(kExpected)
- castedInt := uint64(floatExpected)
-
- cases := []equalsTestCase{
- // Equal values of numeric type.
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{castedInt, false, false, ""},
- equalsTestCase{int64(0), false, false, ""},
- equalsTestCase{int64(math.MinInt64), false, false, ""},
- equalsTestCase{int64(math.MaxInt64), false, false, ""},
- equalsTestCase{uint64(0), false, false, ""},
- equalsTestCase{uint64(math.MaxUint64), false, false, ""},
- equalsTestCase{float32(kExpected / 2), false, false, ""},
- equalsTestCase{float64(kExpected / 2), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Complex64AboveExactIntegerRange() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := Equals(complex64(kTwoTo25 + 1))
- ExpectEq("(3.3554432e+07+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{int64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{int64(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{uint64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{uint64(kTwoTo25 + 3), false, false, ""},
-
- // Single-precision floating point.
- equalsTestCase{float32(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{float32(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{float32(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{complex64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{complex64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{complex64(kTwoTo25 + 3), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{float64(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{float64(kTwoTo25 + 3), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo25 - 2), false, false, ""},
- equalsTestCase{complex128(kTwoTo25 - 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 0), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 2), true, false, ""},
- equalsTestCase{complex128(kTwoTo25 + 3), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Complex64WithNonZeroImaginaryPart() {
- const kRealPart = 17
- const kImagPart = 0.25i
- const kExpected = kRealPart + kImagPart
- matcher := Equals(complex64(kExpected))
- ExpectEq("(17+0.25i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{kExpected, true, false, ""},
- equalsTestCase{kRealPart + kImagPart, true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(kRealPart), false, false, ""},
- equalsTestCase{int8(kRealPart), false, false, ""},
- equalsTestCase{int16(kRealPart), false, false, ""},
- equalsTestCase{int32(kRealPart), false, false, ""},
- equalsTestCase{int64(kRealPart), false, false, ""},
- equalsTestCase{uint(kRealPart), false, false, ""},
- equalsTestCase{uint8(kRealPart), false, false, ""},
- equalsTestCase{uint16(kRealPart), false, false, ""},
- equalsTestCase{uint32(kRealPart), false, false, ""},
- equalsTestCase{uint64(kRealPart), false, false, ""},
- equalsTestCase{float32(kRealPart), false, false, ""},
- equalsTestCase{float64(kRealPart), false, false, ""},
- equalsTestCase{complex64(kRealPart), false, false, ""},
- equalsTestCase{complex64(kRealPart + kImagPart + 0.5), false, false, ""},
- equalsTestCase{complex64(kRealPart + kImagPart + 0.5i), false, false, ""},
- equalsTestCase{complex128(kRealPart), false, false, ""},
- equalsTestCase{complex128(kRealPart + kImagPart + 0.5), false, false, ""},
- equalsTestCase{complex128(kRealPart + kImagPart + 0.5i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// complex128
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NegativeIntegralComplex128() {
- const kExpected = -32769
- matcher := Equals(complex128(kExpected))
- ExpectEq("(-32769+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{-32769.0, true, false, ""},
- equalsTestCase{-32769.0 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
- equalsTestCase{interface{}(float64(kExpected)), true, false, ""},
-
- // Values that would be kExpected in two's complement.
- equalsTestCase{uint32((1 << 32) + kExpected), false, false, ""},
- equalsTestCase{uint64((1 << 64) + kExpected), false, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float32(kExpected + (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.5), false, false, ""},
- equalsTestCase{float64(kExpected + 0.5), false, false, ""},
- equalsTestCase{complex64(kExpected - 1), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected - 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NegativeNonIntegralComplex128() {
- const kTwoTo20 = 1 << 20
- const kExpected = -kTwoTo20 - 0.25
-
- matcher := Equals(complex128(kExpected))
- ExpectEq("(-1.04857625e+06+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{kExpected, true, false, ""},
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(-kTwoTo20), false, false, ""},
- equalsTestCase{int(-kTwoTo20 - 1), false, false, ""},
- equalsTestCase{int32(-kTwoTo20), false, false, ""},
- equalsTestCase{int32(-kTwoTo20 - 1), false, false, ""},
- equalsTestCase{int64(-kTwoTo20), false, false, ""},
- equalsTestCase{int64(-kTwoTo20 - 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.25), false, false, ""},
- equalsTestCase{float64(kExpected + 0.25), false, false, ""},
- equalsTestCase{complex64(kExpected - 0.75), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected - 0.75), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargeNegativeComplex128() {
- const kExpected = -1 * (1 << 65)
- matcher := Equals(complex128(kExpected))
- ExpectEq("(-3.6893488147419103e+19+0i)", matcher.Description())
-
- floatExpected := float64(kExpected)
- castedInt := int64(floatExpected)
-
- cases := []equalsTestCase{
- // Equal values of numeric type.
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{castedInt, false, false, ""},
- equalsTestCase{int64(0), false, false, ""},
- equalsTestCase{int64(math.MinInt64), false, false, ""},
- equalsTestCase{int64(math.MaxInt64), false, false, ""},
- equalsTestCase{float32(kExpected / 2), false, false, ""},
- equalsTestCase{float64(kExpected / 2), false, false, ""},
- equalsTestCase{complex64(kExpected + 2i), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) ZeroComplex128() {
- matcher := Equals(complex128(0))
- ExpectEq("(0+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of zero.
- equalsTestCase{0.0, true, false, ""},
- equalsTestCase{0 + 0i, true, false, ""},
- equalsTestCase{int(0), true, false, ""},
- equalsTestCase{int8(0), true, false, ""},
- equalsTestCase{int16(0), true, false, ""},
- equalsTestCase{int32(0), true, false, ""},
- equalsTestCase{int64(0), true, false, ""},
- equalsTestCase{uint(0), true, false, ""},
- equalsTestCase{uint8(0), true, false, ""},
- equalsTestCase{uint16(0), true, false, ""},
- equalsTestCase{uint32(0), true, false, ""},
- equalsTestCase{uint64(0), true, false, ""},
- equalsTestCase{float32(0), true, false, ""},
- equalsTestCase{float64(0), true, false, ""},
- equalsTestCase{complex64(0), true, false, ""},
- equalsTestCase{complex128(0), true, false, ""},
- equalsTestCase{interface{}(float32(0)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(1), false, false, ""},
- equalsTestCase{int64(-1), false, false, ""},
- equalsTestCase{float32(1), false, false, ""},
- equalsTestCase{float32(-1), false, false, ""},
- equalsTestCase{float64(1), false, false, ""},
- equalsTestCase{float64(-1), false, false, ""},
- equalsTestCase{complex64(0 + 2i), false, false, ""},
- equalsTestCase{complex128(0 + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveIntegralComplex128() {
- const kExpected = 1 << 20
- matcher := Equals(complex128(kExpected))
- ExpectEq("(1.048576e+06+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of 32769.
- equalsTestCase{1048576.0, true, false, ""},
- equalsTestCase{1048576.0 + 0i, true, false, ""},
- equalsTestCase{int(kExpected), true, false, ""},
- equalsTestCase{int32(kExpected), true, false, ""},
- equalsTestCase{int64(kExpected), true, false, ""},
- equalsTestCase{uint(kExpected), true, false, ""},
- equalsTestCase{uint32(kExpected), true, false, ""},
- equalsTestCase{uint64(kExpected), true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
- equalsTestCase{interface{}(float64(kExpected)), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(kExpected + 1), false, false, ""},
- equalsTestCase{int32(kExpected + 1), false, false, ""},
- equalsTestCase{int64(kExpected + 1), false, false, ""},
- equalsTestCase{uint(kExpected + 1), false, false, ""},
- equalsTestCase{uint32(kExpected + 1), false, false, ""},
- equalsTestCase{uint64(kExpected + 1), false, false, ""},
- equalsTestCase{float32(kExpected - (1 << 30)), false, false, ""},
- equalsTestCase{float32(kExpected + (1 << 30)), false, false, ""},
- equalsTestCase{float64(kExpected - 0.5), false, false, ""},
- equalsTestCase{float64(kExpected + 0.5), false, false, ""},
- equalsTestCase{complex128(kExpected - 1), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
-
- // Non-numeric types.
- equalsTestCase{uintptr(0), false, true, "which is not numeric"},
- equalsTestCase{true, false, true, "which is not numeric"},
- equalsTestCase{[...]int{}, false, true, "which is not numeric"},
- equalsTestCase{make(chan int), false, true, "which is not numeric"},
- equalsTestCase{func() {}, false, true, "which is not numeric"},
- equalsTestCase{map[int]int{}, false, true, "which is not numeric"},
- equalsTestCase{&someInt, false, true, "which is not numeric"},
- equalsTestCase{[]int{}, false, true, "which is not numeric"},
- equalsTestCase{"taco", false, true, "which is not numeric"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not numeric"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) PositiveNonIntegralComplex128() {
- const kTwoTo20 = 1 << 20
- const kExpected = kTwoTo20 + 0.25
- matcher := Equals(complex128(kExpected))
- ExpectEq("(1.04857625e+06+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{kExpected, true, false, ""},
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int64(kTwoTo20), false, false, ""},
- equalsTestCase{int64(kTwoTo20 - 1), false, false, ""},
- equalsTestCase{uint64(kTwoTo20), false, false, ""},
- equalsTestCase{uint64(kTwoTo20 - 1), false, false, ""},
- equalsTestCase{float32(kExpected - 1), false, false, ""},
- equalsTestCase{float32(kExpected + 1), false, false, ""},
- equalsTestCase{float64(kExpected - 0.25), false, false, ""},
- equalsTestCase{float64(kExpected + 0.25), false, false, ""},
- equalsTestCase{complex64(kExpected - 1), false, false, ""},
- equalsTestCase{complex64(kExpected - 1i), false, false, ""},
- equalsTestCase{complex128(kExpected - 1), false, false, ""},
- equalsTestCase{complex128(kExpected - 1i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) LargePositiveComplex128() {
- const kExpected = 1 << 65
- matcher := Equals(complex128(kExpected))
- ExpectEq("(3.6893488147419103e+19+0i)", matcher.Description())
-
- floatExpected := float64(kExpected)
- castedInt := uint64(floatExpected)
-
- cases := []equalsTestCase{
- // Equal values of numeric type.
- equalsTestCase{kExpected + 0i, true, false, ""},
- equalsTestCase{float32(kExpected), true, false, ""},
- equalsTestCase{float64(kExpected), true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{castedInt, false, false, ""},
- equalsTestCase{int64(0), false, false, ""},
- equalsTestCase{int64(math.MinInt64), false, false, ""},
- equalsTestCase{int64(math.MaxInt64), false, false, ""},
- equalsTestCase{uint64(0), false, false, ""},
- equalsTestCase{uint64(math.MaxUint64), false, false, ""},
- equalsTestCase{float32(kExpected / 2), false, false, ""},
- equalsTestCase{float64(kExpected / 2), false, false, ""},
- equalsTestCase{complex128(kExpected + 2i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Complex128AboveExactIntegerRange() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := Equals(complex128(kTwoTo54 + 1))
- ExpectEq("(1.8014398509481984e+16+0i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Integers.
- equalsTestCase{int64(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{int64(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{int64(kTwoTo54 + 3), false, false, ""},
-
- equalsTestCase{uint64(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{uint64(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{uint64(kTwoTo54 + 3), false, false, ""},
-
- // Double-precision floating point.
- equalsTestCase{float64(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{float64(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{float64(kTwoTo54 + 3), false, false, ""},
-
- equalsTestCase{complex128(kTwoTo54 - 2), false, false, ""},
- equalsTestCase{complex128(kTwoTo54 - 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 0), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 1), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 2), true, false, ""},
- equalsTestCase{complex128(kTwoTo54 + 3), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) Complex128WithNonZeroImaginaryPart() {
- const kRealPart = 17
- const kImagPart = 0.25i
- const kExpected = kRealPart + kImagPart
- matcher := Equals(complex128(kExpected))
- ExpectEq("(17+0.25i)", matcher.Description())
-
- cases := []equalsTestCase{
- // Various types of the expected value.
- equalsTestCase{kExpected, true, false, ""},
- equalsTestCase{kRealPart + kImagPart, true, false, ""},
- equalsTestCase{complex64(kExpected), true, false, ""},
- equalsTestCase{complex128(kExpected), true, false, ""},
-
- // Non-equal values of numeric type.
- equalsTestCase{int(kRealPart), false, false, ""},
- equalsTestCase{int8(kRealPart), false, false, ""},
- equalsTestCase{int16(kRealPart), false, false, ""},
- equalsTestCase{int32(kRealPart), false, false, ""},
- equalsTestCase{int64(kRealPart), false, false, ""},
- equalsTestCase{uint(kRealPart), false, false, ""},
- equalsTestCase{uint8(kRealPart), false, false, ""},
- equalsTestCase{uint16(kRealPart), false, false, ""},
- equalsTestCase{uint32(kRealPart), false, false, ""},
- equalsTestCase{uint64(kRealPart), false, false, ""},
- equalsTestCase{float32(kRealPart), false, false, ""},
- equalsTestCase{float64(kRealPart), false, false, ""},
- equalsTestCase{complex64(kRealPart), false, false, ""},
- equalsTestCase{complex64(kRealPart + kImagPart + 0.5), false, false, ""},
- equalsTestCase{complex64(kRealPart + kImagPart + 0.5i), false, false, ""},
- equalsTestCase{complex128(kRealPart), false, false, ""},
- equalsTestCase{complex128(kRealPart + kImagPart + 0.5), false, false, ""},
- equalsTestCase{complex128(kRealPart + kImagPart + 0.5i), false, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// array
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) Array() {
- var someArray [3]int
- f := func() { Equals(someArray) }
- ExpectThat(f, Panics(HasSubstr("unsupported kind array")))
-}
-
-////////////////////////////////////////////////////////////////////////
-// chan
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NilChan() {
- var nilChan1 chan int
- var nilChan2 chan int
- var nilChan3 chan uint
- var nonNilChan1 chan int = make(chan int)
- var nonNilChan2 chan uint = make(chan uint)
-
- matcher := Equals(nilChan1)
- ExpectEq("", matcher.Description())
-
- cases := []equalsTestCase{
- // int channels
- equalsTestCase{nilChan1, true, false, ""},
- equalsTestCase{nilChan2, true, false, ""},
- equalsTestCase{nonNilChan1, false, false, ""},
-
- // uint channels
- equalsTestCase{nilChan3, false, true, "which is not a chan int"},
- equalsTestCase{nonNilChan2, false, true, "which is not a chan int"},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a chan int"},
- equalsTestCase{bool(false), false, true, "which is not a chan int"},
- equalsTestCase{int(0), false, true, "which is not a chan int"},
- equalsTestCase{int8(0), false, true, "which is not a chan int"},
- equalsTestCase{int16(0), false, true, "which is not a chan int"},
- equalsTestCase{int32(0), false, true, "which is not a chan int"},
- equalsTestCase{int64(0), false, true, "which is not a chan int"},
- equalsTestCase{uint(0), false, true, "which is not a chan int"},
- equalsTestCase{uint8(0), false, true, "which is not a chan int"},
- equalsTestCase{uint16(0), false, true, "which is not a chan int"},
- equalsTestCase{uint32(0), false, true, "which is not a chan int"},
- equalsTestCase{uint64(0), false, true, "which is not a chan int"},
- equalsTestCase{true, false, true, "which is not a chan int"},
- equalsTestCase{[...]int{}, false, true, "which is not a chan int"},
- equalsTestCase{func() {}, false, true, "which is not a chan int"},
- equalsTestCase{map[int]int{}, false, true, "which is not a chan int"},
- equalsTestCase{&someInt, false, true, "which is not a chan int"},
- equalsTestCase{[]int{}, false, true, "which is not a chan int"},
- equalsTestCase{"taco", false, true, "which is not a chan int"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a chan int"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NonNilChan() {
- var nilChan1 chan int
- var nilChan2 chan uint
- var nonNilChan1 chan int = make(chan int)
- var nonNilChan2 chan int = make(chan int)
- var nonNilChan3 chan uint = make(chan uint)
-
- matcher := Equals(nonNilChan1)
- ExpectEq(fmt.Sprintf("%v", nonNilChan1), matcher.Description())
-
- cases := []equalsTestCase{
- // int channels
- equalsTestCase{nonNilChan1, true, false, ""},
- equalsTestCase{nonNilChan2, false, false, ""},
- equalsTestCase{nilChan1, false, false, ""},
-
- // uint channels
- equalsTestCase{nilChan2, false, true, "which is not a chan int"},
- equalsTestCase{nonNilChan3, false, true, "which is not a chan int"},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a chan int"},
- equalsTestCase{bool(false), false, true, "which is not a chan int"},
- equalsTestCase{int(0), false, true, "which is not a chan int"},
- equalsTestCase{int8(0), false, true, "which is not a chan int"},
- equalsTestCase{int16(0), false, true, "which is not a chan int"},
- equalsTestCase{int32(0), false, true, "which is not a chan int"},
- equalsTestCase{int64(0), false, true, "which is not a chan int"},
- equalsTestCase{uint(0), false, true, "which is not a chan int"},
- equalsTestCase{uint8(0), false, true, "which is not a chan int"},
- equalsTestCase{uint16(0), false, true, "which is not a chan int"},
- equalsTestCase{uint32(0), false, true, "which is not a chan int"},
- equalsTestCase{uint64(0), false, true, "which is not a chan int"},
- equalsTestCase{true, false, true, "which is not a chan int"},
- equalsTestCase{[...]int{}, false, true, "which is not a chan int"},
- equalsTestCase{func() {}, false, true, "which is not a chan int"},
- equalsTestCase{map[int]int{}, false, true, "which is not a chan int"},
- equalsTestCase{&someInt, false, true, "which is not a chan int"},
- equalsTestCase{[]int{}, false, true, "which is not a chan int"},
- equalsTestCase{"taco", false, true, "which is not a chan int"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a chan int"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) ChanDirection() {
- var chan1 chan<- int
- var chan2 <-chan int
- var chan3 chan int
-
- matcher := Equals(chan1)
- ExpectEq(fmt.Sprintf("%v", chan1), matcher.Description())
-
- cases := []equalsTestCase{
- equalsTestCase{chan1, true, false, ""},
- equalsTestCase{chan2, false, true, "which is not a chan<- int"},
- equalsTestCase{chan3, false, true, "which is not a chan<- int"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// func
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) Functions() {
- func1 := func() {}
- func2 := func() {}
- func3 := func(x int) {}
-
- matcher := Equals(func1)
- ExpectEq(fmt.Sprintf("%v", func1), matcher.Description())
-
- cases := []equalsTestCase{
- // Functions.
- equalsTestCase{func1, true, false, ""},
- equalsTestCase{func2, false, false, ""},
- equalsTestCase{func3, false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a function"},
- equalsTestCase{bool(false), false, true, "which is not a function"},
- equalsTestCase{int(0), false, true, "which is not a function"},
- equalsTestCase{int8(0), false, true, "which is not a function"},
- equalsTestCase{int16(0), false, true, "which is not a function"},
- equalsTestCase{int32(0), false, true, "which is not a function"},
- equalsTestCase{int64(0), false, true, "which is not a function"},
- equalsTestCase{uint(0), false, true, "which is not a function"},
- equalsTestCase{uint8(0), false, true, "which is not a function"},
- equalsTestCase{uint16(0), false, true, "which is not a function"},
- equalsTestCase{uint32(0), false, true, "which is not a function"},
- equalsTestCase{uint64(0), false, true, "which is not a function"},
- equalsTestCase{true, false, true, "which is not a function"},
- equalsTestCase{[...]int{}, false, true, "which is not a function"},
- equalsTestCase{map[int]int{}, false, true, "which is not a function"},
- equalsTestCase{&someInt, false, true, "which is not a function"},
- equalsTestCase{[]int{}, false, true, "which is not a function"},
- equalsTestCase{"taco", false, true, "which is not a function"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a function"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// map
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NilMap() {
- var nilMap1 map[int]int
- var nilMap2 map[int]int
- var nilMap3 map[int]uint
- var nonNilMap1 map[int]int = make(map[int]int)
- var nonNilMap2 map[int]uint = make(map[int]uint)
-
- matcher := Equals(nilMap1)
- ExpectEq("map[]", matcher.Description())
-
- cases := []equalsTestCase{
- // Correct type.
- equalsTestCase{nilMap1, true, false, ""},
- equalsTestCase{nilMap2, true, false, ""},
- equalsTestCase{nilMap3, true, false, ""},
- equalsTestCase{nonNilMap1, false, false, ""},
- equalsTestCase{nonNilMap2, false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a map"},
- equalsTestCase{bool(false), false, true, "which is not a map"},
- equalsTestCase{int(0), false, true, "which is not a map"},
- equalsTestCase{int8(0), false, true, "which is not a map"},
- equalsTestCase{int16(0), false, true, "which is not a map"},
- equalsTestCase{int32(0), false, true, "which is not a map"},
- equalsTestCase{int64(0), false, true, "which is not a map"},
- equalsTestCase{uint(0), false, true, "which is not a map"},
- equalsTestCase{uint8(0), false, true, "which is not a map"},
- equalsTestCase{uint16(0), false, true, "which is not a map"},
- equalsTestCase{uint32(0), false, true, "which is not a map"},
- equalsTestCase{uint64(0), false, true, "which is not a map"},
- equalsTestCase{true, false, true, "which is not a map"},
- equalsTestCase{[...]int{}, false, true, "which is not a map"},
- equalsTestCase{func() {}, false, true, "which is not a map"},
- equalsTestCase{&someInt, false, true, "which is not a map"},
- equalsTestCase{[]int{}, false, true, "which is not a map"},
- equalsTestCase{"taco", false, true, "which is not a map"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a map"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NonNilMap() {
- var nilMap1 map[int]int
- var nilMap2 map[int]uint
- var nonNilMap1 map[int]int = make(map[int]int)
- var nonNilMap2 map[int]int = make(map[int]int)
- var nonNilMap3 map[int]uint = make(map[int]uint)
-
- matcher := Equals(nonNilMap1)
- ExpectEq("map[]", matcher.Description())
-
- cases := []equalsTestCase{
- // Correct type.
- equalsTestCase{nonNilMap1, true, false, ""},
- equalsTestCase{nonNilMap2, false, false, ""},
- equalsTestCase{nonNilMap3, false, false, ""},
- equalsTestCase{nilMap1, false, false, ""},
- equalsTestCase{nilMap2, false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a map"},
- equalsTestCase{bool(false), false, true, "which is not a map"},
- equalsTestCase{int(0), false, true, "which is not a map"},
- equalsTestCase{int8(0), false, true, "which is not a map"},
- equalsTestCase{int16(0), false, true, "which is not a map"},
- equalsTestCase{int32(0), false, true, "which is not a map"},
- equalsTestCase{int64(0), false, true, "which is not a map"},
- equalsTestCase{uint(0), false, true, "which is not a map"},
- equalsTestCase{uint8(0), false, true, "which is not a map"},
- equalsTestCase{uint16(0), false, true, "which is not a map"},
- equalsTestCase{uint32(0), false, true, "which is not a map"},
- equalsTestCase{uint64(0), false, true, "which is not a map"},
- equalsTestCase{true, false, true, "which is not a map"},
- equalsTestCase{[...]int{}, false, true, "which is not a map"},
- equalsTestCase{func() {}, false, true, "which is not a map"},
- equalsTestCase{&someInt, false, true, "which is not a map"},
- equalsTestCase{[]int{}, false, true, "which is not a map"},
- equalsTestCase{"taco", false, true, "which is not a map"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a map"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// Pointers
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NilPointer() {
- var someInt int = 17
- var someUint uint = 17
-
- var nilInt1 *int
- var nilInt2 *int
- var nilUint *uint
- var nonNilInt *int = &someInt
- var nonNilUint *uint = &someUint
-
- matcher := Equals(nilInt1)
- ExpectEq("", matcher.Description())
-
- cases := []equalsTestCase{
- // Correct type.
- equalsTestCase{nilInt1, true, false, ""},
- equalsTestCase{nilInt2, true, false, ""},
- equalsTestCase{nonNilInt, false, false, ""},
-
- // Incorrect type.
- equalsTestCase{nilUint, false, true, "which is not a *int"},
- equalsTestCase{nonNilUint, false, true, "which is not a *int"},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a *int"},
- equalsTestCase{bool(false), false, true, "which is not a *int"},
- equalsTestCase{int(0), false, true, "which is not a *int"},
- equalsTestCase{int8(0), false, true, "which is not a *int"},
- equalsTestCase{int16(0), false, true, "which is not a *int"},
- equalsTestCase{int32(0), false, true, "which is not a *int"},
- equalsTestCase{int64(0), false, true, "which is not a *int"},
- equalsTestCase{uint(0), false, true, "which is not a *int"},
- equalsTestCase{uint8(0), false, true, "which is not a *int"},
- equalsTestCase{uint16(0), false, true, "which is not a *int"},
- equalsTestCase{uint32(0), false, true, "which is not a *int"},
- equalsTestCase{uint64(0), false, true, "which is not a *int"},
- equalsTestCase{true, false, true, "which is not a *int"},
- equalsTestCase{[...]int{}, false, true, "which is not a *int"},
- equalsTestCase{func() {}, false, true, "which is not a *int"},
- equalsTestCase{map[int]int{}, false, true, "which is not a *int"},
- equalsTestCase{[]int{}, false, true, "which is not a *int"},
- equalsTestCase{"taco", false, true, "which is not a *int"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a *int"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NonNilPointer() {
- var someInt int = 17
- var someOtherInt int = 17
- var someUint uint = 17
-
- var nilInt *int
- var nilUint *uint
- var nonNilInt1 *int = &someInt
- var nonNilInt2 *int = &someOtherInt
- var nonNilUint *uint = &someUint
-
- matcher := Equals(nonNilInt1)
- ExpectEq(fmt.Sprintf("%v", nonNilInt1), matcher.Description())
-
- cases := []equalsTestCase{
- // Correct type.
- equalsTestCase{nonNilInt1, true, false, ""},
- equalsTestCase{nonNilInt2, false, false, ""},
- equalsTestCase{nilInt, false, false, ""},
-
- // Incorrect type.
- equalsTestCase{nilUint, false, true, "which is not a *int"},
- equalsTestCase{nonNilUint, false, true, "which is not a *int"},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a *int"},
- equalsTestCase{bool(false), false, true, "which is not a *int"},
- equalsTestCase{int(0), false, true, "which is not a *int"},
- equalsTestCase{int8(0), false, true, "which is not a *int"},
- equalsTestCase{int16(0), false, true, "which is not a *int"},
- equalsTestCase{int32(0), false, true, "which is not a *int"},
- equalsTestCase{int64(0), false, true, "which is not a *int"},
- equalsTestCase{uint(0), false, true, "which is not a *int"},
- equalsTestCase{uint8(0), false, true, "which is not a *int"},
- equalsTestCase{uint16(0), false, true, "which is not a *int"},
- equalsTestCase{uint32(0), false, true, "which is not a *int"},
- equalsTestCase{uint64(0), false, true, "which is not a *int"},
- equalsTestCase{true, false, true, "which is not a *int"},
- equalsTestCase{[...]int{}, false, true, "which is not a *int"},
- equalsTestCase{func() {}, false, true, "which is not a *int"},
- equalsTestCase{map[int]int{}, false, true, "which is not a *int"},
- equalsTestCase{[]int{}, false, true, "which is not a *int"},
- equalsTestCase{"taco", false, true, "which is not a *int"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a *int"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// Slices
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NilSlice() {
- var nilInt1 []int
- var nilInt2 []int
- var nilUint []uint
-
- var nonNilInt []int = make([]int, 0)
- var nonNilUint []uint = make([]uint, 0)
-
- matcher := Equals(nilInt1)
- ExpectEq("[]", matcher.Description())
-
- cases := []equalsTestCase{
- // Correct type.
- equalsTestCase{nilInt1, true, false, ""},
- equalsTestCase{nilInt2, true, false, ""},
- equalsTestCase{nonNilInt, false, false, ""},
-
- // Incorrect type.
- equalsTestCase{nilUint, false, true, "which is not a []int"},
- equalsTestCase{nonNilUint, false, true, "which is not a []int"},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a []int"},
- equalsTestCase{bool(false), false, true, "which is not a []int"},
- equalsTestCase{int(0), false, true, "which is not a []int"},
- equalsTestCase{int8(0), false, true, "which is not a []int"},
- equalsTestCase{int16(0), false, true, "which is not a []int"},
- equalsTestCase{int32(0), false, true, "which is not a []int"},
- equalsTestCase{int64(0), false, true, "which is not a []int"},
- equalsTestCase{uint(0), false, true, "which is not a []int"},
- equalsTestCase{uint8(0), false, true, "which is not a []int"},
- equalsTestCase{uint16(0), false, true, "which is not a []int"},
- equalsTestCase{uint32(0), false, true, "which is not a []int"},
- equalsTestCase{uint64(0), false, true, "which is not a []int"},
- equalsTestCase{true, false, true, "which is not a []int"},
- equalsTestCase{[...]int{}, false, true, "which is not a []int"},
- equalsTestCase{func() {}, false, true, "which is not a []int"},
- equalsTestCase{map[int]int{}, false, true, "which is not a []int"},
- equalsTestCase{"taco", false, true, "which is not a []int"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a []int"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NonNilSlice() {
- nonNil := make([]int, 0)
- f := func() { Equals(nonNil) }
- ExpectThat(f, Panics(HasSubstr("non-nil slice")))
-}
-
-////////////////////////////////////////////////////////////////////////
-// string
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) String() {
- partial := "taco"
- expected := fmt.Sprintf("%s%d", partial, 1)
-
- matcher := Equals(expected)
- ExpectEq("taco1", matcher.Description())
-
- type stringAlias string
-
- cases := []equalsTestCase{
- // Correct types.
- equalsTestCase{"taco1", true, false, ""},
- equalsTestCase{"taco" + "1", true, false, ""},
- equalsTestCase{expected, true, false, ""},
- equalsTestCase{stringAlias("taco1"), true, false, ""},
-
- equalsTestCase{"", false, false, ""},
- equalsTestCase{"taco", false, false, ""},
- equalsTestCase{"taco1\x00", false, false, ""},
- equalsTestCase{"taco2", false, false, ""},
- equalsTestCase{stringAlias("taco2"), false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a string"},
- equalsTestCase{bool(false), false, true, "which is not a string"},
- equalsTestCase{int(0), false, true, "which is not a string"},
- equalsTestCase{int8(0), false, true, "which is not a string"},
- equalsTestCase{int16(0), false, true, "which is not a string"},
- equalsTestCase{int32(0), false, true, "which is not a string"},
- equalsTestCase{int64(0), false, true, "which is not a string"},
- equalsTestCase{uint(0), false, true, "which is not a string"},
- equalsTestCase{uint8(0), false, true, "which is not a string"},
- equalsTestCase{uint16(0), false, true, "which is not a string"},
- equalsTestCase{uint32(0), false, true, "which is not a string"},
- equalsTestCase{uint64(0), false, true, "which is not a string"},
- equalsTestCase{true, false, true, "which is not a string"},
- equalsTestCase{[...]int{}, false, true, "which is not a string"},
- equalsTestCase{func() {}, false, true, "which is not a string"},
- equalsTestCase{map[int]int{}, false, true, "which is not a string"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a string"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) StringAlias() {
- type stringAlias string
-
- matcher := Equals(stringAlias("taco"))
- ExpectEq("taco", matcher.Description())
-
- cases := []equalsTestCase{
- // Correct types.
- equalsTestCase{stringAlias("taco"), true, false, ""},
- equalsTestCase{"taco", true, false, ""},
-
- equalsTestCase{"burrito", false, false, ""},
- equalsTestCase{stringAlias("burrito"), false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a string"},
- equalsTestCase{bool(false), false, true, "which is not a string"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// struct
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) Struct() {
- type someStruct struct{ foo uint }
- f := func() { Equals(someStruct{17}) }
- ExpectThat(f, Panics(HasSubstr("unsupported kind struct")))
-}
-
-////////////////////////////////////////////////////////////////////////
-// unsafe.Pointer
-////////////////////////////////////////////////////////////////////////
-
-func (t *EqualsTest) NilUnsafePointer() {
- someInt := int(17)
-
- var nilPtr1 unsafe.Pointer
- var nilPtr2 unsafe.Pointer
- var nonNilPtr unsafe.Pointer = unsafe.Pointer(&someInt)
-
- matcher := Equals(nilPtr1)
- ExpectEq("", matcher.Description())
-
- cases := []equalsTestCase{
- // Correct type.
- equalsTestCase{nilPtr1, true, false, ""},
- equalsTestCase{nilPtr2, true, false, ""},
- equalsTestCase{nonNilPtr, false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{bool(false), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int8(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int16(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int32(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int64(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint8(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint16(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint32(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint64(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uintptr(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{true, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{[...]int{}, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{make(chan int), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{func() {}, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{map[int]int{}, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{&someInt, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{[]int{}, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{"taco", false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a unsafe.Pointer"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *EqualsTest) NonNilUnsafePointer() {
- someInt := int(17)
- someOtherInt := int(17)
-
- var nilPtr unsafe.Pointer
- var nonNilPtr1 unsafe.Pointer = unsafe.Pointer(&someInt)
- var nonNilPtr2 unsafe.Pointer = unsafe.Pointer(&someOtherInt)
-
- matcher := Equals(nonNilPtr1)
- ExpectEq(fmt.Sprintf("%v", nonNilPtr1), matcher.Description())
-
- cases := []equalsTestCase{
- // Correct type.
- equalsTestCase{nonNilPtr1, true, false, ""},
- equalsTestCase{nonNilPtr2, false, false, ""},
- equalsTestCase{nilPtr, false, false, ""},
-
- // Other types.
- equalsTestCase{0, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{bool(false), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int8(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int16(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int32(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{int64(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint8(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint16(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint32(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uint64(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{uintptr(0), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{true, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{[...]int{}, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{make(chan int), false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{func() {}, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{map[int]int{}, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{&someInt, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{[]int{}, false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{"taco", false, true, "which is not a unsafe.Pointer"},
- equalsTestCase{equalsTestCase{}, false, true, "which is not a unsafe.Pointer"},
- }
-
- t.checkTestCases(matcher, cases)
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/error_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/error_test.go
deleted file mode 100644
index 31eb685e8d6..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/error_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2011 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- "errors"
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type ErrorTest struct {
- matcherCalled bool
- suppliedCandidate interface{}
- wrappedError error
-
- matcher Matcher
-}
-
-func init() { RegisterTestSuite(&ErrorTest{}) }
-
-func (t *ErrorTest) SetUp(i *TestInfo) {
- wrapped := &fakeMatcher{
- func(c interface{}) error {
- t.matcherCalled = true
- t.suppliedCandidate = c
- return t.wrappedError
- },
- "is foo",
- }
-
- t.matcher = Error(wrapped)
-}
-
-func isFatal(err error) bool {
- _, isFatal := err.(*FatalError)
- return isFatal
-}
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *ErrorTest) Description() {
- ExpectThat(t.matcher.Description(), Equals("error is foo"))
-}
-
-func (t *ErrorTest) CandidateIsNil() {
- err := t.matcher.Matches(nil)
-
- ExpectThat(t.matcherCalled, Equals(false))
- ExpectThat(err.Error(), Equals("which is not an error"))
- ExpectTrue(isFatal(err))
-}
-
-func (t *ErrorTest) CandidateIsString() {
- err := t.matcher.Matches("taco")
-
- ExpectThat(t.matcherCalled, Equals(false))
- ExpectThat(err.Error(), Equals("which is not an error"))
- ExpectTrue(isFatal(err))
-}
-
-func (t *ErrorTest) CallsWrappedMatcher() {
- candidate := errors.New("taco")
- t.matcher.Matches(candidate)
-
- ExpectThat(t.matcherCalled, Equals(true))
- ExpectThat(t.suppliedCandidate, Equals("taco"))
-}
-
-func (t *ErrorTest) ReturnsWrappedMatcherResult() {
- t.wrappedError = errors.New("burrito")
- err := t.matcher.Matches(errors.New(""))
- ExpectThat(err, Equals(t.wrappedError))
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/greater_or_equal_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/greater_or_equal_test.go
deleted file mode 100644
index e2fe137f42e..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/greater_or_equal_test.go
+++ /dev/null
@@ -1,1059 +0,0 @@
-// Copyright 2011 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- "math"
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type GreaterOrEqualTest struct {
-}
-
-func init() { RegisterTestSuite(&GreaterOrEqualTest{}) }
-
-type geTestCase struct {
- candidate interface{}
- expectedResult bool
- shouldBeFatal bool
- expectedError string
-}
-
-func (t *GreaterOrEqualTest) checkTestCases(matcher Matcher, cases []geTestCase) {
- for i, c := range cases {
- err := matcher.Matches(c.candidate)
-
- ExpectThat(
- (err == nil),
- Equals(c.expectedResult),
- "Case %d (candidate %v)",
- i,
- c.candidate)
-
- if err == nil {
- continue
- }
-
- _, isFatal := err.(*FatalError)
- ExpectEq(
- c.shouldBeFatal,
- isFatal,
- "Case %d (candidate %v)",
- i,
- c.candidate)
-
- ExpectThat(
- err,
- Error(Equals(c.expectedError)),
- "Case %d (candidate %v)",
- i,
- c.candidate)
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-// Integer literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterOrEqualTest) IntegerCandidateBadTypes() {
- matcher := GreaterOrEqual(int(-150))
-
- cases := []geTestCase{
- geTestCase{true, false, true, "which is not comparable"},
- geTestCase{uintptr(17), false, true, "which is not comparable"},
- geTestCase{complex64(-151), false, true, "which is not comparable"},
- geTestCase{complex128(-151), false, true, "which is not comparable"},
- geTestCase{[...]int{-151}, false, true, "which is not comparable"},
- geTestCase{make(chan int), false, true, "which is not comparable"},
- geTestCase{func() {}, false, true, "which is not comparable"},
- geTestCase{map[int]int{}, false, true, "which is not comparable"},
- geTestCase{&geTestCase{}, false, true, "which is not comparable"},
- geTestCase{make([]int, 0), false, true, "which is not comparable"},
- geTestCase{"-151", false, true, "which is not comparable"},
- geTestCase{geTestCase{}, false, true, "which is not comparable"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) FloatCandidateBadTypes() {
- matcher := GreaterOrEqual(float32(-150))
-
- cases := []geTestCase{
- geTestCase{true, false, true, "which is not comparable"},
- geTestCase{uintptr(17), false, true, "which is not comparable"},
- geTestCase{complex64(-151), false, true, "which is not comparable"},
- geTestCase{complex128(-151), false, true, "which is not comparable"},
- geTestCase{[...]int{-151}, false, true, "which is not comparable"},
- geTestCase{make(chan int), false, true, "which is not comparable"},
- geTestCase{func() {}, false, true, "which is not comparable"},
- geTestCase{map[int]int{}, false, true, "which is not comparable"},
- geTestCase{&geTestCase{}, false, true, "which is not comparable"},
- geTestCase{make([]int, 0), false, true, "which is not comparable"},
- geTestCase{"-151", false, true, "which is not comparable"},
- geTestCase{geTestCase{}, false, true, "which is not comparable"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) StringCandidateBadTypes() {
- matcher := GreaterOrEqual("17")
-
- cases := []geTestCase{
- geTestCase{true, false, true, "which is not comparable"},
- geTestCase{int(0), false, true, "which is not comparable"},
- geTestCase{int8(0), false, true, "which is not comparable"},
- geTestCase{int16(0), false, true, "which is not comparable"},
- geTestCase{int32(0), false, true, "which is not comparable"},
- geTestCase{int64(0), false, true, "which is not comparable"},
- geTestCase{uint(0), false, true, "which is not comparable"},
- geTestCase{uint8(0), false, true, "which is not comparable"},
- geTestCase{uint16(0), false, true, "which is not comparable"},
- geTestCase{uint32(0), false, true, "which is not comparable"},
- geTestCase{uint64(0), false, true, "which is not comparable"},
- geTestCase{uintptr(17), false, true, "which is not comparable"},
- geTestCase{float32(0), false, true, "which is not comparable"},
- geTestCase{float64(0), false, true, "which is not comparable"},
- geTestCase{complex64(-151), false, true, "which is not comparable"},
- geTestCase{complex128(-151), false, true, "which is not comparable"},
- geTestCase{[...]int{-151}, false, true, "which is not comparable"},
- geTestCase{make(chan int), false, true, "which is not comparable"},
- geTestCase{func() {}, false, true, "which is not comparable"},
- geTestCase{map[int]int{}, false, true, "which is not comparable"},
- geTestCase{&geTestCase{}, false, true, "which is not comparable"},
- geTestCase{make([]int, 0), false, true, "which is not comparable"},
- geTestCase{geTestCase{}, false, true, "which is not comparable"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) BadArgument() {
- panicked := false
-
- defer func() {
- ExpectThat(panicked, Equals(true))
- }()
-
- defer func() {
- if r := recover(); r != nil {
- panicked = true
- }
- }()
-
- GreaterOrEqual(complex128(0))
-}
-
-////////////////////////////////////////////////////////////////////////
-// Integer literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterOrEqualTest) NegativeIntegerLiteral() {
- matcher := GreaterOrEqual(-150)
- desc := matcher.Description()
- expectedDesc := "greater than or equal to -150"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-(1 << 30), false, false, ""},
- geTestCase{-151, false, false, ""},
- geTestCase{-150, true, false, ""},
- geTestCase{0, true, false, ""},
- geTestCase{17, true, false, ""},
-
- geTestCase{int(-(1 << 30)), false, false, ""},
- geTestCase{int(-151), false, false, ""},
- geTestCase{int(-150), true, false, ""},
- geTestCase{int(0), true, false, ""},
- geTestCase{int(17), true, false, ""},
-
- geTestCase{int8(-127), true, false, ""},
- geTestCase{int8(0), true, false, ""},
- geTestCase{int8(17), true, false, ""},
-
- geTestCase{int16(-(1 << 14)), false, false, ""},
- geTestCase{int16(-151), false, false, ""},
- geTestCase{int16(-150), true, false, ""},
- geTestCase{int16(0), true, false, ""},
- geTestCase{int16(17), true, false, ""},
-
- geTestCase{int32(-(1 << 30)), false, false, ""},
- geTestCase{int32(-151), false, false, ""},
- geTestCase{int32(-150), true, false, ""},
- geTestCase{int32(0), true, false, ""},
- geTestCase{int32(17), true, false, ""},
-
- geTestCase{int64(-(1 << 30)), false, false, ""},
- geTestCase{int64(-151), false, false, ""},
- geTestCase{int64(-150), true, false, ""},
- geTestCase{int64(0), true, false, ""},
- geTestCase{int64(17), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint((1 << 32) - 151), true, false, ""},
- geTestCase{uint(0), true, false, ""},
- geTestCase{uint(17), true, false, ""},
-
- geTestCase{uint8(0), true, false, ""},
- geTestCase{uint8(17), true, false, ""},
- geTestCase{uint8(253), true, false, ""},
-
- geTestCase{uint16((1 << 16) - 151), true, false, ""},
- geTestCase{uint16(0), true, false, ""},
- geTestCase{uint16(17), true, false, ""},
-
- geTestCase{uint32((1 << 32) - 151), true, false, ""},
- geTestCase{uint32(0), true, false, ""},
- geTestCase{uint32(17), true, false, ""},
-
- geTestCase{uint64((1 << 64) - 151), true, false, ""},
- geTestCase{uint64(0), true, false, ""},
- geTestCase{uint64(17), true, false, ""},
-
- // Floating point.
- geTestCase{float32(-(1 << 30)), false, false, ""},
- geTestCase{float32(-151), false, false, ""},
- geTestCase{float32(-150.1), false, false, ""},
- geTestCase{float32(-150), true, false, ""},
- geTestCase{float32(-149.9), true, false, ""},
- geTestCase{float32(0), true, false, ""},
- geTestCase{float32(17), true, false, ""},
- geTestCase{float32(160), true, false, ""},
-
- geTestCase{float64(-(1 << 30)), false, false, ""},
- geTestCase{float64(-151), false, false, ""},
- geTestCase{float64(-150.1), false, false, ""},
- geTestCase{float64(-150), true, false, ""},
- geTestCase{float64(-149.9), true, false, ""},
- geTestCase{float64(0), true, false, ""},
- geTestCase{float64(17), true, false, ""},
- geTestCase{float64(160), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) ZeroIntegerLiteral() {
- matcher := GreaterOrEqual(0)
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 0"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-(1 << 30), false, false, ""},
- geTestCase{-1, false, false, ""},
- geTestCase{0, true, false, ""},
- geTestCase{1, true, false, ""},
- geTestCase{17, true, false, ""},
- geTestCase{(1 << 30), true, false, ""},
-
- geTestCase{int(-(1 << 30)), false, false, ""},
- geTestCase{int(-1), false, false, ""},
- geTestCase{int(0), true, false, ""},
- geTestCase{int(1), true, false, ""},
- geTestCase{int(17), true, false, ""},
-
- geTestCase{int8(-1), false, false, ""},
- geTestCase{int8(0), true, false, ""},
- geTestCase{int8(1), true, false, ""},
-
- geTestCase{int16(-(1 << 14)), false, false, ""},
- geTestCase{int16(-1), false, false, ""},
- geTestCase{int16(0), true, false, ""},
- geTestCase{int16(1), true, false, ""},
- geTestCase{int16(17), true, false, ""},
-
- geTestCase{int32(-(1 << 30)), false, false, ""},
- geTestCase{int32(-1), false, false, ""},
- geTestCase{int32(0), true, false, ""},
- geTestCase{int32(1), true, false, ""},
- geTestCase{int32(17), true, false, ""},
-
- geTestCase{int64(-(1 << 30)), false, false, ""},
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(0), true, false, ""},
- geTestCase{int64(1), true, false, ""},
- geTestCase{int64(17), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint((1 << 32) - 1), true, false, ""},
- geTestCase{uint(0), true, false, ""},
- geTestCase{uint(17), true, false, ""},
-
- geTestCase{uint8(0), true, false, ""},
- geTestCase{uint8(17), true, false, ""},
- geTestCase{uint8(253), true, false, ""},
-
- geTestCase{uint16((1 << 16) - 1), true, false, ""},
- geTestCase{uint16(0), true, false, ""},
- geTestCase{uint16(17), true, false, ""},
-
- geTestCase{uint32((1 << 32) - 1), true, false, ""},
- geTestCase{uint32(0), true, false, ""},
- geTestCase{uint32(17), true, false, ""},
-
- geTestCase{uint64((1 << 64) - 1), true, false, ""},
- geTestCase{uint64(0), true, false, ""},
- geTestCase{uint64(17), true, false, ""},
-
- // Floating point.
- geTestCase{float32(-(1 << 30)), false, false, ""},
- geTestCase{float32(-1), false, false, ""},
- geTestCase{float32(-0.1), false, false, ""},
- geTestCase{float32(-0.0), true, false, ""},
- geTestCase{float32(0), true, false, ""},
- geTestCase{float32(0.1), true, false, ""},
- geTestCase{float32(17), true, false, ""},
- geTestCase{float32(160), true, false, ""},
-
- geTestCase{float64(-(1 << 30)), false, false, ""},
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(-0.1), false, false, ""},
- geTestCase{float64(-0), true, false, ""},
- geTestCase{float64(0), true, false, ""},
- geTestCase{float64(17), true, false, ""},
- geTestCase{float64(160), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) PositiveIntegerLiteral() {
- matcher := GreaterOrEqual(150)
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 150"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-1, false, false, ""},
- geTestCase{149, false, false, ""},
- geTestCase{150, true, false, ""},
- geTestCase{151, true, false, ""},
-
- geTestCase{int(-1), false, false, ""},
- geTestCase{int(149), false, false, ""},
- geTestCase{int(150), true, false, ""},
- geTestCase{int(151), true, false, ""},
-
- geTestCase{int8(-1), false, false, ""},
- geTestCase{int8(0), false, false, ""},
- geTestCase{int8(17), false, false, ""},
- geTestCase{int8(127), false, false, ""},
-
- geTestCase{int16(-1), false, false, ""},
- geTestCase{int16(149), false, false, ""},
- geTestCase{int16(150), true, false, ""},
- geTestCase{int16(151), true, false, ""},
-
- geTestCase{int32(-1), false, false, ""},
- geTestCase{int32(149), false, false, ""},
- geTestCase{int32(150), true, false, ""},
- geTestCase{int32(151), true, false, ""},
-
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(149), false, false, ""},
- geTestCase{int64(150), true, false, ""},
- geTestCase{int64(151), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint(0), false, false, ""},
- geTestCase{uint(149), false, false, ""},
- geTestCase{uint(150), true, false, ""},
- geTestCase{uint(151), true, false, ""},
-
- geTestCase{uint8(0), false, false, ""},
- geTestCase{uint8(127), false, false, ""},
-
- geTestCase{uint16(0), false, false, ""},
- geTestCase{uint16(149), false, false, ""},
- geTestCase{uint16(150), true, false, ""},
- geTestCase{uint16(151), true, false, ""},
-
- geTestCase{uint32(0), false, false, ""},
- geTestCase{uint32(149), false, false, ""},
- geTestCase{uint32(150), true, false, ""},
- geTestCase{uint32(151), true, false, ""},
-
- geTestCase{uint64(0), false, false, ""},
- geTestCase{uint64(149), false, false, ""},
- geTestCase{uint64(150), true, false, ""},
- geTestCase{uint64(151), true, false, ""},
-
- // Floating point.
- geTestCase{float32(-1), false, false, ""},
- geTestCase{float32(149), false, false, ""},
- geTestCase{float32(149.9), false, false, ""},
- geTestCase{float32(150), true, false, ""},
- geTestCase{float32(150.1), true, false, ""},
- geTestCase{float32(151), true, false, ""},
-
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(149), false, false, ""},
- geTestCase{float64(149.9), false, false, ""},
- geTestCase{float64(150), true, false, ""},
- geTestCase{float64(150.1), true, false, ""},
- geTestCase{float64(151), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// Float literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterOrEqualTest) NegativeFloatLiteral() {
- matcher := GreaterOrEqual(-150.1)
- desc := matcher.Description()
- expectedDesc := "greater than or equal to -150.1"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-(1 << 30), false, false, ""},
- geTestCase{-151, false, false, ""},
- geTestCase{-150, true, false, ""},
- geTestCase{0, true, false, ""},
- geTestCase{17, true, false, ""},
-
- geTestCase{int(-(1 << 30)), false, false, ""},
- geTestCase{int(-151), false, false, ""},
- geTestCase{int(-150), true, false, ""},
- geTestCase{int(0), true, false, ""},
- geTestCase{int(17), true, false, ""},
-
- geTestCase{int8(-127), true, false, ""},
- geTestCase{int8(0), true, false, ""},
- geTestCase{int8(17), true, false, ""},
-
- geTestCase{int16(-(1 << 14)), false, false, ""},
- geTestCase{int16(-151), false, false, ""},
- geTestCase{int16(-150), true, false, ""},
- geTestCase{int16(0), true, false, ""},
- geTestCase{int16(17), true, false, ""},
-
- geTestCase{int32(-(1 << 30)), false, false, ""},
- geTestCase{int32(-151), false, false, ""},
- geTestCase{int32(-150), true, false, ""},
- geTestCase{int32(0), true, false, ""},
- geTestCase{int32(17), true, false, ""},
-
- geTestCase{int64(-(1 << 30)), false, false, ""},
- geTestCase{int64(-151), false, false, ""},
- geTestCase{int64(-150), true, false, ""},
- geTestCase{int64(0), true, false, ""},
- geTestCase{int64(17), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint((1 << 32) - 151), true, false, ""},
- geTestCase{uint(0), true, false, ""},
- geTestCase{uint(17), true, false, ""},
-
- geTestCase{uint8(0), true, false, ""},
- geTestCase{uint8(17), true, false, ""},
- geTestCase{uint8(253), true, false, ""},
-
- geTestCase{uint16((1 << 16) - 151), true, false, ""},
- geTestCase{uint16(0), true, false, ""},
- geTestCase{uint16(17), true, false, ""},
-
- geTestCase{uint32((1 << 32) - 151), true, false, ""},
- geTestCase{uint32(0), true, false, ""},
- geTestCase{uint32(17), true, false, ""},
-
- geTestCase{uint64((1 << 64) - 151), true, false, ""},
- geTestCase{uint64(0), true, false, ""},
- geTestCase{uint64(17), true, false, ""},
-
- // Floating point.
- geTestCase{float32(-(1 << 30)), false, false, ""},
- geTestCase{float32(-151), false, false, ""},
- geTestCase{float32(-150.2), false, false, ""},
- geTestCase{float32(-150.1), true, false, ""},
- geTestCase{float32(-150), true, false, ""},
- geTestCase{float32(0), true, false, ""},
- geTestCase{float32(17), true, false, ""},
- geTestCase{float32(160), true, false, ""},
-
- geTestCase{float64(-(1 << 30)), false, false, ""},
- geTestCase{float64(-151), false, false, ""},
- geTestCase{float64(-150.2), false, false, ""},
- geTestCase{float64(-150.1), true, false, ""},
- geTestCase{float64(-150), true, false, ""},
- geTestCase{float64(0), true, false, ""},
- geTestCase{float64(17), true, false, ""},
- geTestCase{float64(160), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) PositiveFloatLiteral() {
- matcher := GreaterOrEqual(149.9)
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 149.9"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-1, false, false, ""},
- geTestCase{149, false, false, ""},
- geTestCase{150, true, false, ""},
- geTestCase{151, true, false, ""},
-
- geTestCase{int(-1), false, false, ""},
- geTestCase{int(149), false, false, ""},
- geTestCase{int(150), true, false, ""},
- geTestCase{int(151), true, false, ""},
-
- geTestCase{int8(-1), false, false, ""},
- geTestCase{int8(0), false, false, ""},
- geTestCase{int8(17), false, false, ""},
- geTestCase{int8(127), false, false, ""},
-
- geTestCase{int16(-1), false, false, ""},
- geTestCase{int16(149), false, false, ""},
- geTestCase{int16(150), true, false, ""},
- geTestCase{int16(151), true, false, ""},
-
- geTestCase{int32(-1), false, false, ""},
- geTestCase{int32(149), false, false, ""},
- geTestCase{int32(150), true, false, ""},
- geTestCase{int32(151), true, false, ""},
-
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(149), false, false, ""},
- geTestCase{int64(150), true, false, ""},
- geTestCase{int64(151), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint(0), false, false, ""},
- geTestCase{uint(149), false, false, ""},
- geTestCase{uint(150), true, false, ""},
- geTestCase{uint(151), true, false, ""},
-
- geTestCase{uint8(0), false, false, ""},
- geTestCase{uint8(127), false, false, ""},
-
- geTestCase{uint16(0), false, false, ""},
- geTestCase{uint16(149), false, false, ""},
- geTestCase{uint16(150), true, false, ""},
- geTestCase{uint16(151), true, false, ""},
-
- geTestCase{uint32(0), false, false, ""},
- geTestCase{uint32(149), false, false, ""},
- geTestCase{uint32(150), true, false, ""},
- geTestCase{uint32(151), true, false, ""},
-
- geTestCase{uint64(0), false, false, ""},
- geTestCase{uint64(149), false, false, ""},
- geTestCase{uint64(150), true, false, ""},
- geTestCase{uint64(151), true, false, ""},
-
- // Floating point.
- geTestCase{float32(-1), false, false, ""},
- geTestCase{float32(149), false, false, ""},
- geTestCase{float32(149.8), false, false, ""},
- geTestCase{float32(149.9), true, false, ""},
- geTestCase{float32(150), true, false, ""},
- geTestCase{float32(151), true, false, ""},
-
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(149), false, false, ""},
- geTestCase{float64(149.8), false, false, ""},
- geTestCase{float64(149.9), true, false, ""},
- geTestCase{float64(150), true, false, ""},
- geTestCase{float64(151), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// Subtle cases
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterOrEqualTest) Int64NotExactlyRepresentableBySinglePrecision() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := GreaterOrEqual(int64(kTwoTo25 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 33554433"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-1, false, false, ""},
- geTestCase{kTwoTo25 + 0, false, false, ""},
- geTestCase{kTwoTo25 + 1, true, false, ""},
- geTestCase{kTwoTo25 + 2, true, false, ""},
-
- geTestCase{int(-1), false, false, ""},
- geTestCase{int(kTwoTo25 + 0), false, false, ""},
- geTestCase{int(kTwoTo25 + 1), true, false, ""},
- geTestCase{int(kTwoTo25 + 2), true, false, ""},
-
- geTestCase{int8(-1), false, false, ""},
- geTestCase{int8(127), false, false, ""},
-
- geTestCase{int16(-1), false, false, ""},
- geTestCase{int16(0), false, false, ""},
- geTestCase{int16(32767), false, false, ""},
-
- geTestCase{int32(-1), false, false, ""},
- geTestCase{int32(kTwoTo25 + 0), false, false, ""},
- geTestCase{int32(kTwoTo25 + 1), true, false, ""},
- geTestCase{int32(kTwoTo25 + 2), true, false, ""},
-
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(kTwoTo25 + 0), false, false, ""},
- geTestCase{int64(kTwoTo25 + 1), true, false, ""},
- geTestCase{int64(kTwoTo25 + 2), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint(0), false, false, ""},
- geTestCase{uint(kTwoTo25 + 0), false, false, ""},
- geTestCase{uint(kTwoTo25 + 1), true, false, ""},
- geTestCase{uint(kTwoTo25 + 2), true, false, ""},
-
- geTestCase{uint8(0), false, false, ""},
- geTestCase{uint8(255), false, false, ""},
-
- geTestCase{uint16(0), false, false, ""},
- geTestCase{uint16(65535), false, false, ""},
-
- geTestCase{uint32(0), false, false, ""},
- geTestCase{uint32(kTwoTo25 + 0), false, false, ""},
- geTestCase{uint32(kTwoTo25 + 1), true, false, ""},
- geTestCase{uint32(kTwoTo25 + 2), true, false, ""},
-
- geTestCase{uint64(0), false, false, ""},
- geTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- geTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- geTestCase{uint64(kTwoTo25 + 2), true, false, ""},
-
- // Floating point.
- geTestCase{float32(-1), false, false, ""},
- geTestCase{float32(kTwoTo25 - 2), false, false, ""},
- geTestCase{float32(kTwoTo25 - 1), true, false, ""},
- geTestCase{float32(kTwoTo25 + 0), true, false, ""},
- geTestCase{float32(kTwoTo25 + 1), true, false, ""},
- geTestCase{float32(kTwoTo25 + 2), true, false, ""},
- geTestCase{float32(kTwoTo25 + 3), true, false, ""},
-
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(kTwoTo25 - 2), false, false, ""},
- geTestCase{float64(kTwoTo25 - 1), false, false, ""},
- geTestCase{float64(kTwoTo25 + 0), false, false, ""},
- geTestCase{float64(kTwoTo25 + 1), true, false, ""},
- geTestCase{float64(kTwoTo25 + 2), true, false, ""},
- geTestCase{float64(kTwoTo25 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) Int64NotExactlyRepresentableByDoublePrecision() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := GreaterOrEqual(int64(kTwoTo54 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 18014398509481985"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-1, false, false, ""},
- geTestCase{1 << 30, false, false, ""},
-
- geTestCase{int(-1), false, false, ""},
- geTestCase{int(math.MaxInt32), false, false, ""},
-
- geTestCase{int8(-1), false, false, ""},
- geTestCase{int8(127), false, false, ""},
-
- geTestCase{int16(-1), false, false, ""},
- geTestCase{int16(0), false, false, ""},
- geTestCase{int16(32767), false, false, ""},
-
- geTestCase{int32(-1), false, false, ""},
- geTestCase{int32(math.MaxInt32), false, false, ""},
-
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(kTwoTo54 - 1), false, false, ""},
- geTestCase{int64(kTwoTo54 + 0), false, false, ""},
- geTestCase{int64(kTwoTo54 + 1), true, false, ""},
- geTestCase{int64(kTwoTo54 + 2), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint(0), false, false, ""},
- geTestCase{uint(math.MaxUint32), false, false, ""},
-
- geTestCase{uint8(0), false, false, ""},
- geTestCase{uint8(255), false, false, ""},
-
- geTestCase{uint16(0), false, false, ""},
- geTestCase{uint16(65535), false, false, ""},
-
- geTestCase{uint32(0), false, false, ""},
- geTestCase{uint32(math.MaxUint32), false, false, ""},
-
- geTestCase{uint64(0), false, false, ""},
- geTestCase{uint64(kTwoTo54 - 1), false, false, ""},
- geTestCase{uint64(kTwoTo54 + 0), false, false, ""},
- geTestCase{uint64(kTwoTo54 + 1), true, false, ""},
- geTestCase{uint64(kTwoTo54 + 2), true, false, ""},
-
- // Floating point.
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(kTwoTo54 - 2), false, false, ""},
- geTestCase{float64(kTwoTo54 - 1), true, false, ""},
- geTestCase{float64(kTwoTo54 + 0), true, false, ""},
- geTestCase{float64(kTwoTo54 + 1), true, false, ""},
- geTestCase{float64(kTwoTo54 + 2), true, false, ""},
- geTestCase{float64(kTwoTo54 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) Uint64NotExactlyRepresentableBySinglePrecision() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := GreaterOrEqual(uint64(kTwoTo25 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 33554433"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-1, false, false, ""},
- geTestCase{kTwoTo25 + 0, false, false, ""},
- geTestCase{kTwoTo25 + 1, true, false, ""},
- geTestCase{kTwoTo25 + 2, true, false, ""},
-
- geTestCase{int(-1), false, false, ""},
- geTestCase{int(kTwoTo25 + 0), false, false, ""},
- geTestCase{int(kTwoTo25 + 1), true, false, ""},
- geTestCase{int(kTwoTo25 + 2), true, false, ""},
-
- geTestCase{int8(-1), false, false, ""},
- geTestCase{int8(127), false, false, ""},
-
- geTestCase{int16(-1), false, false, ""},
- geTestCase{int16(0), false, false, ""},
- geTestCase{int16(32767), false, false, ""},
-
- geTestCase{int32(-1), false, false, ""},
- geTestCase{int32(kTwoTo25 + 0), false, false, ""},
- geTestCase{int32(kTwoTo25 + 1), true, false, ""},
- geTestCase{int32(kTwoTo25 + 2), true, false, ""},
-
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(kTwoTo25 + 0), false, false, ""},
- geTestCase{int64(kTwoTo25 + 1), true, false, ""},
- geTestCase{int64(kTwoTo25 + 2), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint(0), false, false, ""},
- geTestCase{uint(kTwoTo25 + 0), false, false, ""},
- geTestCase{uint(kTwoTo25 + 1), true, false, ""},
- geTestCase{uint(kTwoTo25 + 2), true, false, ""},
-
- geTestCase{uint8(0), false, false, ""},
- geTestCase{uint8(255), false, false, ""},
-
- geTestCase{uint16(0), false, false, ""},
- geTestCase{uint16(65535), false, false, ""},
-
- geTestCase{uint32(0), false, false, ""},
- geTestCase{uint32(kTwoTo25 + 0), false, false, ""},
- geTestCase{uint32(kTwoTo25 + 1), true, false, ""},
- geTestCase{uint32(kTwoTo25 + 2), true, false, ""},
-
- geTestCase{uint64(0), false, false, ""},
- geTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- geTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- geTestCase{uint64(kTwoTo25 + 2), true, false, ""},
-
- // Floating point.
- geTestCase{float32(-1), false, false, ""},
- geTestCase{float32(kTwoTo25 - 2), false, false, ""},
- geTestCase{float32(kTwoTo25 - 1), true, false, ""},
- geTestCase{float32(kTwoTo25 + 0), true, false, ""},
- geTestCase{float32(kTwoTo25 + 1), true, false, ""},
- geTestCase{float32(kTwoTo25 + 2), true, false, ""},
- geTestCase{float32(kTwoTo25 + 3), true, false, ""},
-
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(kTwoTo25 - 2), false, false, ""},
- geTestCase{float64(kTwoTo25 - 1), false, false, ""},
- geTestCase{float64(kTwoTo25 + 0), false, false, ""},
- geTestCase{float64(kTwoTo25 + 1), true, false, ""},
- geTestCase{float64(kTwoTo25 + 2), true, false, ""},
- geTestCase{float64(kTwoTo25 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) Uint64NotExactlyRepresentableByDoublePrecision() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := GreaterOrEqual(uint64(kTwoTo54 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 18014398509481985"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{-1, false, false, ""},
- geTestCase{1 << 30, false, false, ""},
-
- geTestCase{int(-1), false, false, ""},
- geTestCase{int(math.MaxInt32), false, false, ""},
-
- geTestCase{int8(-1), false, false, ""},
- geTestCase{int8(127), false, false, ""},
-
- geTestCase{int16(-1), false, false, ""},
- geTestCase{int16(0), false, false, ""},
- geTestCase{int16(32767), false, false, ""},
-
- geTestCase{int32(-1), false, false, ""},
- geTestCase{int32(math.MaxInt32), false, false, ""},
-
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(kTwoTo54 - 1), false, false, ""},
- geTestCase{int64(kTwoTo54 + 0), false, false, ""},
- geTestCase{int64(kTwoTo54 + 1), true, false, ""},
- geTestCase{int64(kTwoTo54 + 2), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint(0), false, false, ""},
- geTestCase{uint(math.MaxUint32), false, false, ""},
-
- geTestCase{uint8(0), false, false, ""},
- geTestCase{uint8(255), false, false, ""},
-
- geTestCase{uint16(0), false, false, ""},
- geTestCase{uint16(65535), false, false, ""},
-
- geTestCase{uint32(0), false, false, ""},
- geTestCase{uint32(math.MaxUint32), false, false, ""},
-
- geTestCase{uint64(0), false, false, ""},
- geTestCase{uint64(kTwoTo54 - 1), false, false, ""},
- geTestCase{uint64(kTwoTo54 + 0), false, false, ""},
- geTestCase{uint64(kTwoTo54 + 1), true, false, ""},
- geTestCase{uint64(kTwoTo54 + 2), true, false, ""},
-
- // Floating point.
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(kTwoTo54 - 2), false, false, ""},
- geTestCase{float64(kTwoTo54 - 1), true, false, ""},
- geTestCase{float64(kTwoTo54 + 0), true, false, ""},
- geTestCase{float64(kTwoTo54 + 1), true, false, ""},
- geTestCase{float64(kTwoTo54 + 2), true, false, ""},
- geTestCase{float64(kTwoTo54 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) Float32AboveExactIntegerRange() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := GreaterOrEqual(float32(kTwoTo25 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 3.3554432e+07"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(kTwoTo25 - 2), false, false, ""},
- geTestCase{int64(kTwoTo25 - 1), true, false, ""},
- geTestCase{int64(kTwoTo25 + 0), true, false, ""},
- geTestCase{int64(kTwoTo25 + 1), true, false, ""},
- geTestCase{int64(kTwoTo25 + 2), true, false, ""},
- geTestCase{int64(kTwoTo25 + 3), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint64(0), false, false, ""},
- geTestCase{uint64(kTwoTo25 - 2), false, false, ""},
- geTestCase{uint64(kTwoTo25 - 1), true, false, ""},
- geTestCase{uint64(kTwoTo25 + 0), true, false, ""},
- geTestCase{uint64(kTwoTo25 + 1), true, false, ""},
- geTestCase{uint64(kTwoTo25 + 2), true, false, ""},
- geTestCase{uint64(kTwoTo25 + 3), true, false, ""},
-
- // Floating point.
- geTestCase{float32(-1), false, false, ""},
- geTestCase{float32(kTwoTo25 - 2), false, false, ""},
- geTestCase{float32(kTwoTo25 - 1), true, false, ""},
- geTestCase{float32(kTwoTo25 + 0), true, false, ""},
- geTestCase{float32(kTwoTo25 + 1), true, false, ""},
- geTestCase{float32(kTwoTo25 + 2), true, false, ""},
- geTestCase{float32(kTwoTo25 + 3), true, false, ""},
-
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(kTwoTo25 - 2), false, false, ""},
- geTestCase{float64(kTwoTo25 - 1), true, false, ""},
- geTestCase{float64(kTwoTo25 + 0), true, false, ""},
- geTestCase{float64(kTwoTo25 + 1), true, false, ""},
- geTestCase{float64(kTwoTo25 + 2), true, false, ""},
- geTestCase{float64(kTwoTo25 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) Float64AboveExactIntegerRange() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := GreaterOrEqual(float64(kTwoTo54 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than or equal to 1.8014398509481984e+16"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- // Signed integers.
- geTestCase{int64(-1), false, false, ""},
- geTestCase{int64(kTwoTo54 - 2), false, false, ""},
- geTestCase{int64(kTwoTo54 - 1), true, false, ""},
- geTestCase{int64(kTwoTo54 + 0), true, false, ""},
- geTestCase{int64(kTwoTo54 + 1), true, false, ""},
- geTestCase{int64(kTwoTo54 + 2), true, false, ""},
- geTestCase{int64(kTwoTo54 + 3), true, false, ""},
-
- // Unsigned integers.
- geTestCase{uint64(0), false, false, ""},
- geTestCase{uint64(kTwoTo54 - 2), false, false, ""},
- geTestCase{uint64(kTwoTo54 - 1), true, false, ""},
- geTestCase{uint64(kTwoTo54 + 0), true, false, ""},
- geTestCase{uint64(kTwoTo54 + 1), true, false, ""},
- geTestCase{uint64(kTwoTo54 + 2), true, false, ""},
- geTestCase{uint64(kTwoTo54 + 3), true, false, ""},
-
- // Floating point.
- geTestCase{float64(-1), false, false, ""},
- geTestCase{float64(kTwoTo54 - 2), false, false, ""},
- geTestCase{float64(kTwoTo54 - 1), true, false, ""},
- geTestCase{float64(kTwoTo54 + 0), true, false, ""},
- geTestCase{float64(kTwoTo54 + 1), true, false, ""},
- geTestCase{float64(kTwoTo54 + 2), true, false, ""},
- geTestCase{float64(kTwoTo54 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// String literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterOrEqualTest) EmptyString() {
- matcher := GreaterOrEqual("")
- desc := matcher.Description()
- expectedDesc := "greater than or equal to \"\""
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- geTestCase{"", true, false, ""},
- geTestCase{"\x00", true, false, ""},
- geTestCase{"a", true, false, ""},
- geTestCase{"foo", true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) SingleNullByte() {
- matcher := GreaterOrEqual("\x00")
- desc := matcher.Description()
- expectedDesc := "greater than or equal to \"\x00\""
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- geTestCase{"", false, false, ""},
- geTestCase{"\x00", true, false, ""},
- geTestCase{"a", true, false, ""},
- geTestCase{"foo", true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterOrEqualTest) LongerString() {
- matcher := GreaterOrEqual("foo\x00")
- desc := matcher.Description()
- expectedDesc := "greater than or equal to \"foo\x00\""
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []geTestCase{
- geTestCase{"", false, false, ""},
- geTestCase{"\x00", false, false, ""},
- geTestCase{"bar", false, false, ""},
- geTestCase{"foo", false, false, ""},
- geTestCase{"foo\x00", true, false, ""},
- geTestCase{"fooa", true, false, ""},
- geTestCase{"qux", true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/greater_than_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/greater_than_test.go
deleted file mode 100644
index 19c7567fd98..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/greater_than_test.go
+++ /dev/null
@@ -1,1079 +0,0 @@
-// Copyright 2011 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- "math"
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type GreaterThanTest struct {
-}
-
-func init() { RegisterTestSuite(&GreaterThanTest{}) }
-
-type gtTestCase struct {
- candidate interface{}
- expectedResult bool
- shouldBeFatal bool
- expectedError string
-}
-
-func (t *GreaterThanTest) checkTestCases(matcher Matcher, cases []gtTestCase) {
- for i, c := range cases {
- err := matcher.Matches(c.candidate)
-
- ExpectThat(
- (err == nil),
- Equals(c.expectedResult),
- "Case %d (candidate %v)",
- i,
- c.candidate)
-
- if err == nil {
- continue
- }
-
- _, isFatal := err.(*FatalError)
- ExpectEq(
- c.shouldBeFatal,
- isFatal,
- "Case %d (candidate %v)",
- i,
- c.candidate)
-
- ExpectThat(
- err,
- Error(Equals(c.expectedError)),
- "Case %d (candidate %v)",
- i,
- c.candidate)
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-// Integer literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterThanTest) IntegerCandidateBadTypes() {
- matcher := GreaterThan(int(-150))
-
- cases := []gtTestCase{
- gtTestCase{true, false, true, "which is not comparable"},
- gtTestCase{uintptr(17), false, true, "which is not comparable"},
- gtTestCase{complex64(-151), false, true, "which is not comparable"},
- gtTestCase{complex128(-151), false, true, "which is not comparable"},
- gtTestCase{[...]int{-151}, false, true, "which is not comparable"},
- gtTestCase{make(chan int), false, true, "which is not comparable"},
- gtTestCase{func() {}, false, true, "which is not comparable"},
- gtTestCase{map[int]int{}, false, true, "which is not comparable"},
- gtTestCase{>TestCase{}, false, true, "which is not comparable"},
- gtTestCase{make([]int, 0), false, true, "which is not comparable"},
- gtTestCase{"-151", false, true, "which is not comparable"},
- gtTestCase{gtTestCase{}, false, true, "which is not comparable"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) FloatCandidateBadTypes() {
- matcher := GreaterThan(float32(-150))
-
- cases := []gtTestCase{
- gtTestCase{true, false, true, "which is not comparable"},
- gtTestCase{uintptr(17), false, true, "which is not comparable"},
- gtTestCase{complex64(-151), false, true, "which is not comparable"},
- gtTestCase{complex128(-151), false, true, "which is not comparable"},
- gtTestCase{[...]int{-151}, false, true, "which is not comparable"},
- gtTestCase{make(chan int), false, true, "which is not comparable"},
- gtTestCase{func() {}, false, true, "which is not comparable"},
- gtTestCase{map[int]int{}, false, true, "which is not comparable"},
- gtTestCase{>TestCase{}, false, true, "which is not comparable"},
- gtTestCase{make([]int, 0), false, true, "which is not comparable"},
- gtTestCase{"-151", false, true, "which is not comparable"},
- gtTestCase{gtTestCase{}, false, true, "which is not comparable"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) StringCandidateBadTypes() {
- matcher := GreaterThan("17")
-
- cases := []gtTestCase{
- gtTestCase{true, false, true, "which is not comparable"},
- gtTestCase{int(0), false, true, "which is not comparable"},
- gtTestCase{int8(0), false, true, "which is not comparable"},
- gtTestCase{int16(0), false, true, "which is not comparable"},
- gtTestCase{int32(0), false, true, "which is not comparable"},
- gtTestCase{int64(0), false, true, "which is not comparable"},
- gtTestCase{uint(0), false, true, "which is not comparable"},
- gtTestCase{uint8(0), false, true, "which is not comparable"},
- gtTestCase{uint16(0), false, true, "which is not comparable"},
- gtTestCase{uint32(0), false, true, "which is not comparable"},
- gtTestCase{uint64(0), false, true, "which is not comparable"},
- gtTestCase{uintptr(17), false, true, "which is not comparable"},
- gtTestCase{float32(0), false, true, "which is not comparable"},
- gtTestCase{float64(0), false, true, "which is not comparable"},
- gtTestCase{complex64(-151), false, true, "which is not comparable"},
- gtTestCase{complex128(-151), false, true, "which is not comparable"},
- gtTestCase{[...]int{-151}, false, true, "which is not comparable"},
- gtTestCase{make(chan int), false, true, "which is not comparable"},
- gtTestCase{func() {}, false, true, "which is not comparable"},
- gtTestCase{map[int]int{}, false, true, "which is not comparable"},
- gtTestCase{>TestCase{}, false, true, "which is not comparable"},
- gtTestCase{make([]int, 0), false, true, "which is not comparable"},
- gtTestCase{gtTestCase{}, false, true, "which is not comparable"},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) BadArgument() {
- panicked := false
-
- defer func() {
- ExpectThat(panicked, Equals(true))
- }()
-
- defer func() {
- if r := recover(); r != nil {
- panicked = true
- }
- }()
-
- GreaterThan(complex128(0))
-}
-
-////////////////////////////////////////////////////////////////////////
-// Integer literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterThanTest) NegativeIntegerLiteral() {
- matcher := GreaterThan(-150)
- desc := matcher.Description()
- expectedDesc := "greater than -150"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-(1 << 30), false, false, ""},
- gtTestCase{-151, false, false, ""},
- gtTestCase{-150, false, false, ""},
- gtTestCase{-149, true, false, ""},
- gtTestCase{0, true, false, ""},
- gtTestCase{17, true, false, ""},
-
- gtTestCase{int(-(1 << 30)), false, false, ""},
- gtTestCase{int(-151), false, false, ""},
- gtTestCase{int(-150), false, false, ""},
- gtTestCase{int(-149), true, false, ""},
- gtTestCase{int(0), true, false, ""},
- gtTestCase{int(17), true, false, ""},
-
- gtTestCase{int8(-127), true, false, ""},
- gtTestCase{int8(0), true, false, ""},
- gtTestCase{int8(17), true, false, ""},
-
- gtTestCase{int16(-(1 << 14)), false, false, ""},
- gtTestCase{int16(-151), false, false, ""},
- gtTestCase{int16(-150), false, false, ""},
- gtTestCase{int16(-149), true, false, ""},
- gtTestCase{int16(0), true, false, ""},
- gtTestCase{int16(17), true, false, ""},
-
- gtTestCase{int32(-(1 << 30)), false, false, ""},
- gtTestCase{int32(-151), false, false, ""},
- gtTestCase{int32(-150), false, false, ""},
- gtTestCase{int32(-149), true, false, ""},
- gtTestCase{int32(0), true, false, ""},
- gtTestCase{int32(17), true, false, ""},
-
- gtTestCase{int64(-(1 << 30)), false, false, ""},
- gtTestCase{int64(-151), false, false, ""},
- gtTestCase{int64(-150), false, false, ""},
- gtTestCase{int64(-149), true, false, ""},
- gtTestCase{int64(0), true, false, ""},
- gtTestCase{int64(17), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint((1 << 32) - 151), true, false, ""},
- gtTestCase{uint(0), true, false, ""},
- gtTestCase{uint(17), true, false, ""},
-
- gtTestCase{uint8(0), true, false, ""},
- gtTestCase{uint8(17), true, false, ""},
- gtTestCase{uint8(253), true, false, ""},
-
- gtTestCase{uint16((1 << 16) - 151), true, false, ""},
- gtTestCase{uint16(0), true, false, ""},
- gtTestCase{uint16(17), true, false, ""},
-
- gtTestCase{uint32((1 << 32) - 151), true, false, ""},
- gtTestCase{uint32(0), true, false, ""},
- gtTestCase{uint32(17), true, false, ""},
-
- gtTestCase{uint64((1 << 64) - 151), true, false, ""},
- gtTestCase{uint64(0), true, false, ""},
- gtTestCase{uint64(17), true, false, ""},
-
- // Floating point.
- gtTestCase{float32(-(1 << 30)), false, false, ""},
- gtTestCase{float32(-151), false, false, ""},
- gtTestCase{float32(-150.1), false, false, ""},
- gtTestCase{float32(-150), false, false, ""},
- gtTestCase{float32(-149.9), true, false, ""},
- gtTestCase{float32(0), true, false, ""},
- gtTestCase{float32(17), true, false, ""},
- gtTestCase{float32(160), true, false, ""},
-
- gtTestCase{float64(-(1 << 30)), false, false, ""},
- gtTestCase{float64(-151), false, false, ""},
- gtTestCase{float64(-150.1), false, false, ""},
- gtTestCase{float64(-150), false, false, ""},
- gtTestCase{float64(-149.9), true, false, ""},
- gtTestCase{float64(0), true, false, ""},
- gtTestCase{float64(17), true, false, ""},
- gtTestCase{float64(160), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) ZeroIntegerLiteral() {
- matcher := GreaterThan(0)
- desc := matcher.Description()
- expectedDesc := "greater than 0"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-(1 << 30), false, false, ""},
- gtTestCase{-1, false, false, ""},
- gtTestCase{0, false, false, ""},
- gtTestCase{1, true, false, ""},
- gtTestCase{17, true, false, ""},
- gtTestCase{(1 << 30), true, false, ""},
-
- gtTestCase{int(-(1 << 30)), false, false, ""},
- gtTestCase{int(-1), false, false, ""},
- gtTestCase{int(0), false, false, ""},
- gtTestCase{int(1), true, false, ""},
- gtTestCase{int(17), true, false, ""},
-
- gtTestCase{int8(-1), false, false, ""},
- gtTestCase{int8(0), false, false, ""},
- gtTestCase{int8(1), true, false, ""},
-
- gtTestCase{int16(-(1 << 14)), false, false, ""},
- gtTestCase{int16(-1), false, false, ""},
- gtTestCase{int16(0), false, false, ""},
- gtTestCase{int16(1), true, false, ""},
- gtTestCase{int16(17), true, false, ""},
-
- gtTestCase{int32(-(1 << 30)), false, false, ""},
- gtTestCase{int32(-1), false, false, ""},
- gtTestCase{int32(0), false, false, ""},
- gtTestCase{int32(1), true, false, ""},
- gtTestCase{int32(17), true, false, ""},
-
- gtTestCase{int64(-(1 << 30)), false, false, ""},
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(0), false, false, ""},
- gtTestCase{int64(1), true, false, ""},
- gtTestCase{int64(17), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint((1 << 32) - 1), true, false, ""},
- gtTestCase{uint(0), false, false, ""},
- gtTestCase{uint(1), true, false, ""},
- gtTestCase{uint(17), true, false, ""},
-
- gtTestCase{uint8(0), false, false, ""},
- gtTestCase{uint8(1), true, false, ""},
- gtTestCase{uint8(17), true, false, ""},
- gtTestCase{uint8(253), true, false, ""},
-
- gtTestCase{uint16((1 << 16) - 1), true, false, ""},
- gtTestCase{uint16(0), false, false, ""},
- gtTestCase{uint16(1), true, false, ""},
- gtTestCase{uint16(17), true, false, ""},
-
- gtTestCase{uint32((1 << 32) - 1), true, false, ""},
- gtTestCase{uint32(0), false, false, ""},
- gtTestCase{uint32(1), true, false, ""},
- gtTestCase{uint32(17), true, false, ""},
-
- gtTestCase{uint64((1 << 64) - 1), true, false, ""},
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(1), true, false, ""},
- gtTestCase{uint64(17), true, false, ""},
-
- // Floating point.
- gtTestCase{float32(-(1 << 30)), false, false, ""},
- gtTestCase{float32(-1), false, false, ""},
- gtTestCase{float32(-0.1), false, false, ""},
- gtTestCase{float32(-0.0), false, false, ""},
- gtTestCase{float32(0), false, false, ""},
- gtTestCase{float32(0.1), true, false, ""},
- gtTestCase{float32(17), true, false, ""},
- gtTestCase{float32(160), true, false, ""},
-
- gtTestCase{float64(-(1 << 30)), false, false, ""},
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(-0.1), false, false, ""},
- gtTestCase{float64(-0), false, false, ""},
- gtTestCase{float64(0), false, false, ""},
- gtTestCase{float64(0.1), true, false, ""},
- gtTestCase{float64(17), true, false, ""},
- gtTestCase{float64(160), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) PositiveIntegerLiteral() {
- matcher := GreaterThan(150)
- desc := matcher.Description()
- expectedDesc := "greater than 150"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-1, false, false, ""},
- gtTestCase{149, false, false, ""},
- gtTestCase{150, false, false, ""},
- gtTestCase{151, true, false, ""},
-
- gtTestCase{int(-1), false, false, ""},
- gtTestCase{int(149), false, false, ""},
- gtTestCase{int(150), false, false, ""},
- gtTestCase{int(151), true, false, ""},
-
- gtTestCase{int8(-1), false, false, ""},
- gtTestCase{int8(0), false, false, ""},
- gtTestCase{int8(17), false, false, ""},
- gtTestCase{int8(127), false, false, ""},
-
- gtTestCase{int16(-1), false, false, ""},
- gtTestCase{int16(149), false, false, ""},
- gtTestCase{int16(150), false, false, ""},
- gtTestCase{int16(151), true, false, ""},
-
- gtTestCase{int32(-1), false, false, ""},
- gtTestCase{int32(149), false, false, ""},
- gtTestCase{int32(150), false, false, ""},
- gtTestCase{int32(151), true, false, ""},
-
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(149), false, false, ""},
- gtTestCase{int64(150), false, false, ""},
- gtTestCase{int64(151), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint(0), false, false, ""},
- gtTestCase{uint(149), false, false, ""},
- gtTestCase{uint(150), false, false, ""},
- gtTestCase{uint(151), true, false, ""},
-
- gtTestCase{uint8(0), false, false, ""},
- gtTestCase{uint8(127), false, false, ""},
-
- gtTestCase{uint16(0), false, false, ""},
- gtTestCase{uint16(149), false, false, ""},
- gtTestCase{uint16(150), false, false, ""},
- gtTestCase{uint16(151), true, false, ""},
-
- gtTestCase{uint32(0), false, false, ""},
- gtTestCase{uint32(149), false, false, ""},
- gtTestCase{uint32(150), false, false, ""},
- gtTestCase{uint32(151), true, false, ""},
-
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(149), false, false, ""},
- gtTestCase{uint64(150), false, false, ""},
- gtTestCase{uint64(151), true, false, ""},
-
- // Floating point.
- gtTestCase{float32(-1), false, false, ""},
- gtTestCase{float32(149), false, false, ""},
- gtTestCase{float32(149.9), false, false, ""},
- gtTestCase{float32(150), false, false, ""},
- gtTestCase{float32(150.1), true, false, ""},
- gtTestCase{float32(151), true, false, ""},
-
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(149), false, false, ""},
- gtTestCase{float64(149.9), false, false, ""},
- gtTestCase{float64(150), false, false, ""},
- gtTestCase{float64(150.1), true, false, ""},
- gtTestCase{float64(151), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// Float literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterThanTest) NegativeFloatLiteral() {
- matcher := GreaterThan(-150.1)
- desc := matcher.Description()
- expectedDesc := "greater than -150.1"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-(1 << 30), false, false, ""},
- gtTestCase{-151, false, false, ""},
- gtTestCase{-150.1, false, false, ""},
- gtTestCase{-150, true, false, ""},
- gtTestCase{-149, true, false, ""},
- gtTestCase{0, true, false, ""},
- gtTestCase{17, true, false, ""},
-
- gtTestCase{int(-(1 << 30)), false, false, ""},
- gtTestCase{int(-151), false, false, ""},
- gtTestCase{int(-150), true, false, ""},
- gtTestCase{int(-149), true, false, ""},
- gtTestCase{int(0), true, false, ""},
- gtTestCase{int(17), true, false, ""},
-
- gtTestCase{int8(-127), true, false, ""},
- gtTestCase{int8(0), true, false, ""},
- gtTestCase{int8(17), true, false, ""},
-
- gtTestCase{int16(-(1 << 14)), false, false, ""},
- gtTestCase{int16(-151), false, false, ""},
- gtTestCase{int16(-150), true, false, ""},
- gtTestCase{int16(-149), true, false, ""},
- gtTestCase{int16(0), true, false, ""},
- gtTestCase{int16(17), true, false, ""},
-
- gtTestCase{int32(-(1 << 30)), false, false, ""},
- gtTestCase{int32(-151), false, false, ""},
- gtTestCase{int32(-150), true, false, ""},
- gtTestCase{int32(-149), true, false, ""},
- gtTestCase{int32(0), true, false, ""},
- gtTestCase{int32(17), true, false, ""},
-
- gtTestCase{int64(-(1 << 30)), false, false, ""},
- gtTestCase{int64(-151), false, false, ""},
- gtTestCase{int64(-150), true, false, ""},
- gtTestCase{int64(-149), true, false, ""},
- gtTestCase{int64(0), true, false, ""},
- gtTestCase{int64(17), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint((1 << 32) - 151), true, false, ""},
- gtTestCase{uint(0), true, false, ""},
- gtTestCase{uint(17), true, false, ""},
-
- gtTestCase{uint8(0), true, false, ""},
- gtTestCase{uint8(17), true, false, ""},
- gtTestCase{uint8(253), true, false, ""},
-
- gtTestCase{uint16((1 << 16) - 151), true, false, ""},
- gtTestCase{uint16(0), true, false, ""},
- gtTestCase{uint16(17), true, false, ""},
-
- gtTestCase{uint32((1 << 32) - 151), true, false, ""},
- gtTestCase{uint32(0), true, false, ""},
- gtTestCase{uint32(17), true, false, ""},
-
- gtTestCase{uint64((1 << 64) - 151), true, false, ""},
- gtTestCase{uint64(0), true, false, ""},
- gtTestCase{uint64(17), true, false, ""},
-
- // Floating point.
- gtTestCase{float32(-(1 << 30)), false, false, ""},
- gtTestCase{float32(-151), false, false, ""},
- gtTestCase{float32(-150.2), false, false, ""},
- gtTestCase{float32(-150.1), false, false, ""},
- gtTestCase{float32(-150), true, false, ""},
- gtTestCase{float32(0), true, false, ""},
- gtTestCase{float32(17), true, false, ""},
- gtTestCase{float32(160), true, false, ""},
-
- gtTestCase{float64(-(1 << 30)), false, false, ""},
- gtTestCase{float64(-151), false, false, ""},
- gtTestCase{float64(-150.2), false, false, ""},
- gtTestCase{float64(-150.1), false, false, ""},
- gtTestCase{float64(-150), true, false, ""},
- gtTestCase{float64(0), true, false, ""},
- gtTestCase{float64(17), true, false, ""},
- gtTestCase{float64(160), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) PositiveFloatLiteral() {
- matcher := GreaterThan(149.9)
- desc := matcher.Description()
- expectedDesc := "greater than 149.9"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-1, false, false, ""},
- gtTestCase{149, false, false, ""},
- gtTestCase{149.9, false, false, ""},
- gtTestCase{150, true, false, ""},
- gtTestCase{151, true, false, ""},
-
- gtTestCase{int(-1), false, false, ""},
- gtTestCase{int(149), false, false, ""},
- gtTestCase{int(150), true, false, ""},
- gtTestCase{int(151), true, false, ""},
-
- gtTestCase{int8(-1), false, false, ""},
- gtTestCase{int8(0), false, false, ""},
- gtTestCase{int8(17), false, false, ""},
- gtTestCase{int8(127), false, false, ""},
-
- gtTestCase{int16(-1), false, false, ""},
- gtTestCase{int16(149), false, false, ""},
- gtTestCase{int16(150), true, false, ""},
- gtTestCase{int16(151), true, false, ""},
-
- gtTestCase{int32(-1), false, false, ""},
- gtTestCase{int32(149), false, false, ""},
- gtTestCase{int32(150), true, false, ""},
- gtTestCase{int32(151), true, false, ""},
-
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(149), false, false, ""},
- gtTestCase{int64(150), true, false, ""},
- gtTestCase{int64(151), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint(0), false, false, ""},
- gtTestCase{uint(149), false, false, ""},
- gtTestCase{uint(150), true, false, ""},
- gtTestCase{uint(151), true, false, ""},
-
- gtTestCase{uint8(0), false, false, ""},
- gtTestCase{uint8(127), false, false, ""},
-
- gtTestCase{uint16(0), false, false, ""},
- gtTestCase{uint16(149), false, false, ""},
- gtTestCase{uint16(150), true, false, ""},
- gtTestCase{uint16(151), true, false, ""},
-
- gtTestCase{uint32(0), false, false, ""},
- gtTestCase{uint32(149), false, false, ""},
- gtTestCase{uint32(150), true, false, ""},
- gtTestCase{uint32(151), true, false, ""},
-
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(149), false, false, ""},
- gtTestCase{uint64(150), true, false, ""},
- gtTestCase{uint64(151), true, false, ""},
-
- // Floating point.
- gtTestCase{float32(-1), false, false, ""},
- gtTestCase{float32(149), false, false, ""},
- gtTestCase{float32(149.8), false, false, ""},
- gtTestCase{float32(149.9), false, false, ""},
- gtTestCase{float32(150), true, false, ""},
- gtTestCase{float32(151), true, false, ""},
-
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(149), false, false, ""},
- gtTestCase{float64(149.8), false, false, ""},
- gtTestCase{float64(149.9), false, false, ""},
- gtTestCase{float64(150), true, false, ""},
- gtTestCase{float64(151), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// Subtle cases
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterThanTest) Int64NotExactlyRepresentableBySinglePrecision() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := GreaterThan(int64(kTwoTo25 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than 33554433"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-1, false, false, ""},
- gtTestCase{kTwoTo25 + 0, false, false, ""},
- gtTestCase{kTwoTo25 + 1, false, false, ""},
- gtTestCase{kTwoTo25 + 2, true, false, ""},
-
- gtTestCase{int(-1), false, false, ""},
- gtTestCase{int(kTwoTo25 + 0), false, false, ""},
- gtTestCase{int(kTwoTo25 + 1), false, false, ""},
- gtTestCase{int(kTwoTo25 + 2), true, false, ""},
-
- gtTestCase{int8(-1), false, false, ""},
- gtTestCase{int8(127), false, false, ""},
-
- gtTestCase{int16(-1), false, false, ""},
- gtTestCase{int16(0), false, false, ""},
- gtTestCase{int16(32767), false, false, ""},
-
- gtTestCase{int32(-1), false, false, ""},
- gtTestCase{int32(kTwoTo25 + 0), false, false, ""},
- gtTestCase{int32(kTwoTo25 + 1), false, false, ""},
- gtTestCase{int32(kTwoTo25 + 2), true, false, ""},
-
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 2), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint(0), false, false, ""},
- gtTestCase{uint(kTwoTo25 + 0), false, false, ""},
- gtTestCase{uint(kTwoTo25 + 1), false, false, ""},
- gtTestCase{uint(kTwoTo25 + 2), true, false, ""},
-
- gtTestCase{uint8(0), false, false, ""},
- gtTestCase{uint8(255), false, false, ""},
-
- gtTestCase{uint16(0), false, false, ""},
- gtTestCase{uint16(65535), false, false, ""},
-
- gtTestCase{uint32(0), false, false, ""},
- gtTestCase{uint32(kTwoTo25 + 0), false, false, ""},
- gtTestCase{uint32(kTwoTo25 + 1), false, false, ""},
- gtTestCase{uint32(kTwoTo25 + 2), true, false, ""},
-
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 2), true, false, ""},
-
- // Floating point.
- gtTestCase{float32(-1), false, false, ""},
- gtTestCase{float32(kTwoTo25 - 2), false, false, ""},
- gtTestCase{float32(kTwoTo25 - 1), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 0), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 1), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 2), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 3), true, false, ""},
-
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(kTwoTo25 - 2), false, false, ""},
- gtTestCase{float64(kTwoTo25 - 1), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 2), true, false, ""},
- gtTestCase{float64(kTwoTo25 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) Int64NotExactlyRepresentableByDoublePrecision() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := GreaterThan(int64(kTwoTo54 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than 18014398509481985"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-1, false, false, ""},
- gtTestCase{1 << 30, false, false, ""},
-
- gtTestCase{int(-1), false, false, ""},
- gtTestCase{int(math.MaxInt32), false, false, ""},
-
- gtTestCase{int8(-1), false, false, ""},
- gtTestCase{int8(127), false, false, ""},
-
- gtTestCase{int16(-1), false, false, ""},
- gtTestCase{int16(0), false, false, ""},
- gtTestCase{int16(32767), false, false, ""},
-
- gtTestCase{int32(-1), false, false, ""},
- gtTestCase{int32(math.MaxInt32), false, false, ""},
-
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 2), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint(0), false, false, ""},
- gtTestCase{uint(math.MaxUint32), false, false, ""},
-
- gtTestCase{uint8(0), false, false, ""},
- gtTestCase{uint8(255), false, false, ""},
-
- gtTestCase{uint16(0), false, false, ""},
- gtTestCase{uint16(65535), false, false, ""},
-
- gtTestCase{uint32(0), false, false, ""},
- gtTestCase{uint32(math.MaxUint32), false, false, ""},
-
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 2), true, false, ""},
-
- // Floating point.
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(kTwoTo54 - 2), false, false, ""},
- gtTestCase{float64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 2), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) Uint64NotExactlyRepresentableBySinglePrecision() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := GreaterThan(uint64(kTwoTo25 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than 33554433"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-1, false, false, ""},
- gtTestCase{kTwoTo25 + 0, false, false, ""},
- gtTestCase{kTwoTo25 + 1, false, false, ""},
- gtTestCase{kTwoTo25 + 2, true, false, ""},
-
- gtTestCase{int(-1), false, false, ""},
- gtTestCase{int(kTwoTo25 + 0), false, false, ""},
- gtTestCase{int(kTwoTo25 + 1), false, false, ""},
- gtTestCase{int(kTwoTo25 + 2), true, false, ""},
-
- gtTestCase{int8(-1), false, false, ""},
- gtTestCase{int8(127), false, false, ""},
-
- gtTestCase{int16(-1), false, false, ""},
- gtTestCase{int16(0), false, false, ""},
- gtTestCase{int16(32767), false, false, ""},
-
- gtTestCase{int32(-1), false, false, ""},
- gtTestCase{int32(kTwoTo25 + 0), false, false, ""},
- gtTestCase{int32(kTwoTo25 + 1), false, false, ""},
- gtTestCase{int32(kTwoTo25 + 2), true, false, ""},
-
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 2), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint(0), false, false, ""},
- gtTestCase{uint(kTwoTo25 + 0), false, false, ""},
- gtTestCase{uint(kTwoTo25 + 1), false, false, ""},
- gtTestCase{uint(kTwoTo25 + 2), true, false, ""},
-
- gtTestCase{uint8(0), false, false, ""},
- gtTestCase{uint8(255), false, false, ""},
-
- gtTestCase{uint16(0), false, false, ""},
- gtTestCase{uint16(65535), false, false, ""},
-
- gtTestCase{uint32(0), false, false, ""},
- gtTestCase{uint32(kTwoTo25 + 0), false, false, ""},
- gtTestCase{uint32(kTwoTo25 + 1), false, false, ""},
- gtTestCase{uint32(kTwoTo25 + 2), true, false, ""},
-
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 2), true, false, ""},
-
- // Floating point.
- gtTestCase{float32(-1), false, false, ""},
- gtTestCase{float32(kTwoTo25 - 2), false, false, ""},
- gtTestCase{float32(kTwoTo25 - 1), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 0), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 1), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 2), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 3), true, false, ""},
-
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(kTwoTo25 - 2), false, false, ""},
- gtTestCase{float64(kTwoTo25 - 1), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 2), true, false, ""},
- gtTestCase{float64(kTwoTo25 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) Uint64NotExactlyRepresentableByDoublePrecision() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := GreaterThan(uint64(kTwoTo54 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than 18014398509481985"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{-1, false, false, ""},
- gtTestCase{1 << 30, false, false, ""},
-
- gtTestCase{int(-1), false, false, ""},
- gtTestCase{int(math.MaxInt32), false, false, ""},
-
- gtTestCase{int8(-1), false, false, ""},
- gtTestCase{int8(127), false, false, ""},
-
- gtTestCase{int16(-1), false, false, ""},
- gtTestCase{int16(0), false, false, ""},
- gtTestCase{int16(32767), false, false, ""},
-
- gtTestCase{int32(-1), false, false, ""},
- gtTestCase{int32(math.MaxInt32), false, false, ""},
-
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 2), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint(0), false, false, ""},
- gtTestCase{uint(math.MaxUint32), false, false, ""},
-
- gtTestCase{uint8(0), false, false, ""},
- gtTestCase{uint8(255), false, false, ""},
-
- gtTestCase{uint16(0), false, false, ""},
- gtTestCase{uint16(65535), false, false, ""},
-
- gtTestCase{uint32(0), false, false, ""},
- gtTestCase{uint32(math.MaxUint32), false, false, ""},
-
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 2), true, false, ""},
-
- // Floating point.
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(kTwoTo54 - 2), false, false, ""},
- gtTestCase{float64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 2), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) Float32AboveExactIntegerRange() {
- // Single-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^25-1, 2^25+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo25 = 1 << 25
- matcher := GreaterThan(float32(kTwoTo25 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than 3.3554432e+07"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(kTwoTo25 - 2), false, false, ""},
- gtTestCase{int64(kTwoTo25 - 1), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 2), false, false, ""},
- gtTestCase{int64(kTwoTo25 + 3), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(kTwoTo25 - 2), false, false, ""},
- gtTestCase{uint64(kTwoTo25 - 1), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 2), false, false, ""},
- gtTestCase{uint64(kTwoTo25 + 3), true, false, ""},
-
- // Floating point.
- gtTestCase{float32(-1), false, false, ""},
- gtTestCase{float32(kTwoTo25 - 2), false, false, ""},
- gtTestCase{float32(kTwoTo25 - 1), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 0), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 1), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 2), false, false, ""},
- gtTestCase{float32(kTwoTo25 + 3), true, false, ""},
-
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(kTwoTo25 - 2), false, false, ""},
- gtTestCase{float64(kTwoTo25 - 1), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 0), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 1), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 2), false, false, ""},
- gtTestCase{float64(kTwoTo25 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) Float64AboveExactIntegerRange() {
- // Double-precision floats don't have enough bits to represent the integers
- // near this one distinctly, so [2^54-1, 2^54+2] all receive the same value
- // and should be treated as equivalent when floats are in the mix.
- const kTwoTo54 = 1 << 54
- matcher := GreaterThan(float64(kTwoTo54 + 1))
-
- desc := matcher.Description()
- expectedDesc := "greater than 1.8014398509481984e+16"
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- // Signed integers.
- gtTestCase{int64(-1), false, false, ""},
- gtTestCase{int64(kTwoTo54 - 2), false, false, ""},
- gtTestCase{int64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 2), false, false, ""},
- gtTestCase{int64(kTwoTo54 + 3), true, false, ""},
-
- // Unsigned integers.
- gtTestCase{uint64(0), false, false, ""},
- gtTestCase{uint64(kTwoTo54 - 2), false, false, ""},
- gtTestCase{uint64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 2), false, false, ""},
- gtTestCase{uint64(kTwoTo54 + 3), true, false, ""},
-
- // Floating point.
- gtTestCase{float64(-1), false, false, ""},
- gtTestCase{float64(kTwoTo54 - 2), false, false, ""},
- gtTestCase{float64(kTwoTo54 - 1), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 0), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 1), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 2), false, false, ""},
- gtTestCase{float64(kTwoTo54 + 3), true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-////////////////////////////////////////////////////////////////////////
-// String literals
-////////////////////////////////////////////////////////////////////////
-
-func (t *GreaterThanTest) EmptyString() {
- matcher := GreaterThan("")
- desc := matcher.Description()
- expectedDesc := "greater than \"\""
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- gtTestCase{"", false, false, ""},
- gtTestCase{"\x00", true, false, ""},
- gtTestCase{"a", true, false, ""},
- gtTestCase{"foo", true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) SingleNullByte() {
- matcher := GreaterThan("\x00")
- desc := matcher.Description()
- expectedDesc := "greater than \"\x00\""
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- gtTestCase{"", false, false, ""},
- gtTestCase{"\x00", false, false, ""},
- gtTestCase{"\x00\x00", true, false, ""},
- gtTestCase{"a", true, false, ""},
- gtTestCase{"foo", true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
-
-func (t *GreaterThanTest) LongerString() {
- matcher := GreaterThan("foo\x00")
- desc := matcher.Description()
- expectedDesc := "greater than \"foo\x00\""
-
- ExpectThat(desc, Equals(expectedDesc))
-
- cases := []gtTestCase{
- gtTestCase{"", false, false, ""},
- gtTestCase{"\x00", false, false, ""},
- gtTestCase{"bar", false, false, ""},
- gtTestCase{"foo", false, false, ""},
- gtTestCase{"foo\x00", false, false, ""},
- gtTestCase{"foo\x00\x00", true, false, ""},
- gtTestCase{"fooa", true, false, ""},
- gtTestCase{"qux", true, false, ""},
- }
-
- t.checkTestCases(matcher, cases)
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/has_substr_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/has_substr_test.go
deleted file mode 100644
index be9f317006b..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/has_substr_test.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2011 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type HasSubstrTest struct {
-}
-
-func init() { RegisterTestSuite(&HasSubstrTest{}) }
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *HasSubstrTest) Description() {
- matcher := HasSubstr("taco")
- ExpectThat(matcher.Description(), Equals("has substring \"taco\""))
-}
-
-func (t *HasSubstrTest) CandidateIsNil() {
- matcher := HasSubstr("")
- err := matcher.Matches(nil)
-
- ExpectThat(err, Error(Equals("which is not a string")))
- ExpectTrue(isFatal(err))
-}
-
-func (t *HasSubstrTest) CandidateIsInteger() {
- matcher := HasSubstr("")
- err := matcher.Matches(17)
-
- ExpectThat(err, Error(Equals("which is not a string")))
- ExpectTrue(isFatal(err))
-}
-
-func (t *HasSubstrTest) CandidateIsByteSlice() {
- matcher := HasSubstr("")
- err := matcher.Matches([]byte{17})
-
- ExpectThat(err, Error(Equals("which is not a string")))
- ExpectTrue(isFatal(err))
-}
-
-func (t *HasSubstrTest) CandidateDoesntHaveSubstring() {
- matcher := HasSubstr("taco")
- err := matcher.Matches("tac")
-
- ExpectThat(err, Error(Equals("")))
- ExpectFalse(isFatal(err))
-}
-
-func (t *HasSubstrTest) CandidateEqualsArg() {
- matcher := HasSubstr("taco")
- err := matcher.Matches("taco")
-
- ExpectThat(err, Equals(nil))
-}
-
-func (t *HasSubstrTest) CandidateHasProperSubstring() {
- matcher := HasSubstr("taco")
- err := matcher.Matches("burritos and tacos")
-
- ExpectThat(err, Equals(nil))
-}
-
-func (t *HasSubstrTest) EmptyStringIsAlwaysSubString() {
- matcher := HasSubstr("")
- err := matcher.Matches("asdf")
-
- ExpectThat(err, Equals(nil))
-}
diff --git a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/identical_to_test.go b/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/identical_to_test.go
deleted file mode 100644
index 19236671437..00000000000
--- a/Godeps/_workspace/src/github.com/smartystreets/goconvey/convey/assertions/oglematchers/identical_to_test.go
+++ /dev/null
@@ -1,849 +0,0 @@
-// Copyright 2012 Aaron Jacobs. All Rights Reserved.
-// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package oglematchers_test
-
-import (
- "fmt"
- "io"
- "unsafe"
- . "github.com/smartystreets/goconvey/convey/assertions/oglematchers"
- . "github.com/smartystreets/goconvey/convey/assertions/ogletest"
-)
-
-////////////////////////////////////////////////////////////////////////
-// Helpers
-////////////////////////////////////////////////////////////////////////
-
-type IdenticalToTest struct {
-}
-
-func init() { RegisterTestSuite(&IdenticalToTest{}) }
-
-////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////
-
-func (t *IdenticalToTest) TypesNotIdentical() {
- var m Matcher
- var err error
-
- type intAlias int
-
- // Type alias expected value
- m = IdenticalTo(intAlias(17))
- err = m.Matches(int(17))
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(Equals("which is of type int")))
-
- // Type alias candidate
- m = IdenticalTo(int(17))
- err = m.Matches(intAlias(17))
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(Equals("which is of type oglematchers_test.intAlias")))
-
- // int and uint
- m = IdenticalTo(int(17))
- err = m.Matches(uint(17))
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(Equals("which is of type uint")))
-}
-
-func (t *IdenticalToTest) PredeclaredNilIdentifier() {
- var m Matcher
- var err error
-
- // Nil literal
- m = IdenticalTo(nil)
- err = m.Matches(nil)
- ExpectEq(nil, err)
-
- // Zero interface var (which is the same as above since IdenticalTo takes an
- // interface{} as an arg)
- var nilReader io.Reader
- var nilWriter io.Writer
-
- m = IdenticalTo(nilReader)
- err = m.Matches(nilWriter)
- ExpectEq(nil, err)
-
- // Typed nil value.
- m = IdenticalTo(nil)
- err = m.Matches((chan int)(nil))
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(Equals("which is of type chan int")))
-
- // Non-nil value.
- m = IdenticalTo(nil)
- err = m.Matches("taco")
- ExpectTrue(isFatal(err))
- ExpectThat(err, Error(Equals("which is of type string")))
-}
-
-func (t *IdenticalToTest) Slices() {
- var m Matcher
- var err error
-
- // Nil expected value
- m = IdenticalTo(([]int)(nil))
- ExpectEq("identical to <[]int> []", m.Description())
-
- err = m.Matches(([]int)(nil))
- ExpectEq(nil, err)
-
- err = m.Matches([]int{})
- ExpectThat(err, Error(Equals("which is not an identical reference")))
-
- // Non-nil expected value
- o1 := make([]int, 1)
- o2 := make([]int, 1)
- m = IdenticalTo(o1)
- ExpectEq(fmt.Sprintf("identical to <[]int> %v", o1), m.Description())
-
- err = m.Matches(o1)
- ExpectEq(nil, err)
-
- err = m.Matches(o2)
- ExpectThat(err, Error(Equals("which is not an identical reference")))
-}
-
-func (t *IdenticalToTest) Maps() {
- var m Matcher
- var err error
-
- // Nil expected value
- m = IdenticalTo((map[int]int)(nil))
- ExpectEq("identical to
-
+
### Dashboard Links & Navigation
@@ -33,7 +39,7 @@ To support better navigation between dashboards, it's now possible to create cus
panels to appropriate Dashboards. You also have the ability to create flexible top-level links on any
given dashboard thanks to the new dashboard navigation bar feature.
-
+
Dashboard links can be added under dashboard settings. Either defined as static URLs with a custom icon or as dynamic
dashboard links or dropdowns based on custom dashboard search query. These links appear in the same
@@ -82,7 +88,7 @@ The Viewer role has been modified in Grafana 2.1 so that users assigned this rol
Grafana 2.1 now comes with full support for InfluxDB 0.9. There is a new query editor designed from scratch
for the new features InfluxDB 0.9 enables.
-
+
@@ -110,15 +116,15 @@ Define series color using regex rule. This is useful when you have templated gra
that change depending selected template variables. Using a regex style override rule you could
for example make all series that contain the word **CPU** `red` and assigned to the second y axis.
-
+
New series style override, negative-y transform and stack groups. Negative y transform is
very useful if you want to plot a series on the negative y scale without affecting the legend values like min or max or
the values shown in the hover tooltip.
-
+
-
+
### Singlestat Panel
Now support string values. Useful for time series database like InfluxDB that supports
diff --git a/docs/sources/guides/whats-new-in-v2-5.md b/docs/sources/guides/whats-new-in-v2-5.md
index f02d0d43fd0..93cdd59cb50 100644
--- a/docs/sources/guides/whats-new-in-v2-5.md
+++ b/docs/sources/guides/whats-new-in-v2-5.md
@@ -1,8 +1,14 @@
----
-page_title: What's New in Grafana v2.5
-page_description: What's new in Grafana v2.5
-page_keywords: grafana, new, changes, features, documentation
----
++++
+title = "What's New in Grafana v2.5"
+description = "Feature & improvement highlights for Grafana v2.5"
+keywords = ["grafana", "new", "documentation", "2.5"]
+type = "docs"
+[menu.docs]
+name = "Version 2.5"
+identifier = "v2.5"
+parent = "whatsnew"
+weight = 9
++++
# What's new in Grafana v2.5
@@ -12,7 +18,7 @@ fixes and enhancements to all areas of Grafana, like new Data Sources, a new and
resize handles and improved InfluxDB and OpenTSDB support.
### New time range controls
-
+
A new timepicker with room for more quick ranges as well as new types of relative ranges, like `Today`,
`The day so far` and `This day last week`. Also an improved time & calendar picker that now works
@@ -20,7 +26,7 @@ correctly in UTC mode.
### Elasticsearch
-
+
This release brings a fully featured query editor for Elasticsearch. You will now be able to visualize
@@ -40,7 +46,7 @@ Try the new Elasticsearch query editor on the [play.grafana.org](http://play.gra
### CloudWatch
-
+
Grafana 2.5 ships with a new CloudWatch datasource that will allow you to query and visualize CloudWatch
metrics directly from Grafana.
@@ -51,14 +57,14 @@ metrics directly from Grafana.
### Prometheus
-
+
Grafana 2.5 ships with a new Prometheus datasource that will allow you to query and visualize data
stored in Prometheus.
### Mix different data sources
-
+
In previous releases you have been able to mix different data sources on the same dashboard. In v2.5 you
will be able to mix then on the same graph! You can enable this by selecting the built in `-- Mixed --` data source.
@@ -67,12 +73,12 @@ to plot metrics from different Graphite servers on the same Graph or plot data f
data from Prometheus. Mixing different data sources on the same graph works for any data source, even custom ones.
### Panel Resize handles
-
+
This release adds resize handles to the the bottom right corners of panels making is easy to resize both width and height.
### User invites
-
+
This version also brings some new features for user management.
diff --git a/docs/sources/guides/whats-new-in-v2-6.md b/docs/sources/guides/whats-new-in-v2-6.md
index ac644ad44af..0b1e6688e60 100644
--- a/docs/sources/guides/whats-new-in-v2-6.md
+++ b/docs/sources/guides/whats-new-in-v2-6.md
@@ -1,8 +1,14 @@
----
-page_title: What's New in Grafana v2.6
-page_description: What's new in Grafana v2.6
-page_keywords: grafana, new, changes, features, documentation, table
----
++++
+title = "What's New in Grafana v2.6"
+description = "Feature & improvement highlights for Grafana v2.6"
+keywords = ["grafana", "new", "documentation", "2.6"]
+type = "docs"
+[menu.docs]
+name = "Version 2.6"
+identifier = "v2.6"
+parent = "whatsnew"
+weight = 7
++++
# What's new in Grafana v2.6
@@ -11,7 +17,7 @@ The release includes a new Table panel, a new InfluxDB query editor, support for
support for multiple Cloudwatch credentials.
## Table Panel
-
+
The new table panel is very flexible, supporting both multiple modes for time series as well as for
table, annotation and raw JSON data. It also provides date formating and value formating and coloring options.
@@ -21,7 +27,7 @@ table, annotation and raw JSON data. It also provides date formating and value f
In the most simple mode you can turn time series to rows. This means you get a `Time`, `Metric` and a `Value` column.
Where `Metric` is the name of the time series.
-
+
### Table Transform
Above you see the options tab for the **Table Panel**. The most important option is the `To Table Transform`.
@@ -34,7 +40,7 @@ The column styles allow you control how dates and numbers are formatted.
This transform allows you to take multiple time series and group them by time. Which will result in a `Time` column
and a column for each time series.
-
+
In the screenshot above you can see how the same time series query as in the previous example can be transformed into
a different table by changing the `To Table Transform` to `Time series to columns`.
@@ -43,7 +49,7 @@ a different table by changing the `To Table Transform` to `Time series to colum
This transform works very similar to the legend values in the Graph panel. Each series gets its own row. In the Options
tab you can select which aggregations you want using the plus button the Columns section.
-
+
You have to think about how accurate the aggregations will be. It depends on what aggregation is used in the time series query,
how many data points are fetched, etc. The time series aggregations are calculated by Grafana after aggregation is performed
@@ -53,38 +59,39 @@ by the time series database.
If you want to show documents from Elasticsearch pick `Raw Document` as the first metric.
-
+
This in combination with the `JSON Data` table transform will allow you to pick which fields in the document
you want to show in the table.
-
+
### Elasticsearch aggregations
You can also make Elasticsearch aggregation queries without a `Date Histogram`. This allows you to
use Elasticsearch metric aggregations to get accurate aggregations for the selected time range.
-
+
### Annotations
The table can also show any annotations you have enabled in the dashboard.
-
+
## The New InfluxDB Editor
The new InfluxDB editor is a lot more flexible and powerful. It supports nested functions, like `derivative`.
It also uses the same technique as the Graphite query editor in that it presents nested functions as chain of function
transformations. It tries to simplify and unify the complicated nature of InfluxDB's query language.
-
+
In the `SELECT` row you can specify what fields and functions you want to use. If you have a
group by time you need an aggregation function. Some functions like derivative require an aggregation function.
The editor tries simplify and unify this part of the query. For example:
-
+
+
The above will generate the following InfluxDB `SELECT` clause:
@@ -103,7 +110,7 @@ You can remove the group by by clicking on the `tag` and then click on the x ico
The new editor also allows you to remove group by time and select `raw` table data. Which is very useful
in combination with the new Table panel to show raw log data stored in InfluxDB.
-
+
## Pipeline metrics
@@ -111,7 +118,7 @@ If you have Elasticsearch 2.x and Grafana 2.6 or above then you can use pipeline
**Moving Average** and **Derivative**. Elasticsearch pipeline metrics require another metric to be based on. Use the eye icon next to the metric
to hide metrics from appearing in the graph.
-
+
## Changelog
For a detailed list and link to github issues for everything included in the 2.6 release please
diff --git a/docs/sources/guides/whats-new-in-v2.md b/docs/sources/guides/whats-new-in-v2.md
index 9e87ab55e6e..bd92128a12e 100644
--- a/docs/sources/guides/whats-new-in-v2.md
+++ b/docs/sources/guides/whats-new-in-v2.md
@@ -1,8 +1,14 @@
----
-page_title: What's New in Grafana v2.0
-page_description: What's new in Grafana v2.0
-page_keywords: grafana, new, changes, features, documentation
----
++++
+title = "What's New in Grafana v2.0"
+description = "Feature & improvement highlights for Grafana v2.0"
+keywords = ["grafana", "new", "documentation", "2.0"]
+type = "docs"
+[menu.docs]
+name = "Version 2.0"
+identifier = "v2.0"
+parent = "whatsnew"
+weight = 11
++++
# What's New in Grafana v2.0
@@ -49,7 +55,7 @@ even zoom in). Also they are fast to load as they aren't actually connected to a
They're a great way to communicate about a particular incident with specific people who aren't Users of your Grafana instance. You can also use them to show off your dashboards over the Internet.
-
+
### Publish snapshots
@@ -61,11 +67,11 @@ Either way, anyone with the link (and access to your Grafana instance for local
In Grafana v2.x you can now override the relative time range for individual panels, causing them to be different than what is selected in the Dashboard time picker in the upper right. You can also add a time shift to individual panels. This allows you to show metrics from different time periods or days at the same time.
-
+
You control these overrides in panel editor mode and the new tab `Time Range`.
-
+
When you zoom or change the Dashboard time to a custom absolute time range, all panel overrides will be disabled. The panel relative time override is only active when the dashboard time is also relative. The panel timeshift override however is always active, even when the dashboard time is absolute.
@@ -90,7 +96,7 @@ This feature makes it easy to include interactive visualizations from your Grafa
The top header has gotten a major streamlining in Grafana V2.0.
-
+
1. `Side menubar toggle` Toggle the side menubar on or off. This allows you to focus on the data presented on the Dashboard. The side menubar provides access to features unrelated to a Dashboard such as Users, Organizations, and Data Sources.
2. `Dashboard dropdown` The main dropdown shows you which Dashboard you are currently viewing, and allows you to easily switch to a new Dashboard. From here you can also create a new Dashboard, Import existing Dashboards, and manage the Playlist.
@@ -115,7 +121,7 @@ You can easily collapse or re-open the side menubar at any time by clicking the
## New search view & starring dashboards
-
+
The dashboard search view has gotten a big overhaul. You can now see and filter by which dashboard you have personally starred.
@@ -124,11 +130,11 @@ The dashboard search view has gotten a big overhaul. You can now see and filter
The Graph panel now supports 3 logarithmic scales, `log base 10`, `log base 32`, `log base 1024`. Logarithmic y-axis scales are very useful when rendering many series of different order of magnitude on the same scale (eg.
latency, network traffic, and storage)
-
+
## Dashlist panel
-
+
The dashlist is a new panel in Grafana v2.0. It allows you to show your personal starred dashboards, as well as do custom searches based on search strings or tags.
@@ -147,7 +153,7 @@ In addition, connections to Data Sources can be better controlled and secured, a
A commonly reported problem has been graphs dipping to zero at the the end, because metric data for the last interval has yet to be written to the Data Source. These graphs then "self correct" once the data comes in, but can look deceiving or alarming at times.
You can avoid this problem by adding a `now delay` in `Dashboard Settings` > `Time Picker` tab. This new feature will cause Grafana to ignore the most recent data up to the set delay.
-
+
The delay that may be necessary depends on how much latency you have in your collection pipeline.
@@ -155,7 +161,7 @@ The delay that may be necessary depends on how much latency you have in your col
Grafana v2.0 protects Users from accidentally overwriting each others Dashboard changes. Similar protections are in place if you try to create a new Dashboard with the same name as an existing one.
-
+
These protections are only the first step; we will be building out additional capabilities around dashboard versioning and management in future versions of Grafana.
@@ -171,6 +177,6 @@ Grafana now supports server-side PNG rendering. From the Panel share dialog you
> **Note** This requires that your Data Source is accessible from your Grafana instance.
-
+
diff --git a/docs/sources/guides/whats-new-in-v3-1.md b/docs/sources/guides/whats-new-in-v3-1.md
new file mode 100644
index 00000000000..236e77ea266
--- /dev/null
+++ b/docs/sources/guides/whats-new-in-v3-1.md
@@ -0,0 +1,73 @@
++++
+title = "What's New in Grafana v3.1"
+description = "Feature & improvement highlights for Grafana v3.1"
+keywords = ["grafana", "new", "documentation", "3.1"]
+type = "docs"
+[menu.docs]
+name = "Version 3.1"
+identifier = "v3.1"
+parent = "whatsnew"
+weight = 1
++++
+
+# What's New in Grafana v3.1
+
+## Dashboard Export & Import
+
+The export feature is now accessed from the share menu.
+
+
+
+Dashboards exported from Grafana 3.1 are now more portable and easier for others to import than before.
+The export process extracts information data source types used by panels and adds these to a new `inputs`
+section in the dashboard json. So when you or another person tries to import the dashboard they will be asked to
+select data source and optional metrix prefix options.
+
+
+
+The above screenshot shows the new import modal that gives you 3 options for how to import a dashboard.
+One notable new addition here is the ability to import directly from Dashboards shared on [Grafana.net](https://grafana.net).
+
+The next step in the import process:
+
+
+
+Here you can change the name of the dashboard and also pick what data sources you want the dashboard to use. The above screenshot
+shows a CollectD dashboard for Graphite that requires a metric prefix be specified.
+
+## Discover Dashboards
+
+On [Grafana.net](https://grafana.net) you can now browse & search for dashboards. We have already added a few but
+more are being uploaded every day. To import a dashboard just copy the dashboard url and head back to Grafana,
+then Dashboard Search -> Import -> Paste Grafana.net Dashboard URL.
+
+
+
+## Constant template variables
+
+We added a new template variable named constant that makes it easier to share and export dashboard that have custom prefixes.
+
+## Dashboard Urls
+Having current time range and template variable value always sync with the URL makes it possible to always copy your current
+Grafana url to share with a colleague without having to use the Share modal.
+
+## Internal metrics
+
+Do you want metrics about viewing metrics? Ofc you do! In this release we added support for sending metrics about Grafana to graphite.
+You can configure interval and server in the config file.
+
+## Logging
+
+Switched logging framework to log15 to enable key value per logging and filtering based on different log levels.
+Its now possible to configure different log levels for different modules.
+
+### Breaking changes
+- **Logging** format have been changed to improve log filtering.
+- **Graphite PNG** Graphite PNG support dropped from Graph panel (use Grafana native PNG instead).
+- **Migration** No longer possible to migrate dashboards from 1.x (Stored in ES or Influx 0.8).
+
+## CHANGELOG
+
+For a detailed list and link to github issues for everything included
+in the 3.1 release please view the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md)
+file.
diff --git a/docs/sources/guides/whats-new-in-v3.md b/docs/sources/guides/whats-new-in-v3.md
new file mode 100644
index 00000000000..32912754fe9
--- /dev/null
+++ b/docs/sources/guides/whats-new-in-v3.md
@@ -0,0 +1,229 @@
++++
+title = "What's New in Grafana v3.0"
+description = "Feature & improvement highlights for Grafana v3.0"
+keywords = ["grafana", "new", "documentation", "3.0"]
+type = "docs"
+[menu.docs]
+name = "Version 3.0"
+identifier = "v3.0"
+parent = "whatsnew"
+weight = 2
++++
+
+# What's New in Grafana v3.0
+
+## Commercial Support
+
+Commercial Support subscriptions for Grafana are now [generally available](https://grafana.net/support/plans/).
+
+Raintank is committed to a 100% open-source strategy for Grafana. We
+do not want to go down the “open core” route. If your organization
+finds Grafana valuable, please consider purchasing a subscription. Get
+direct support, bug fixes, and training from the core Grafana team.
+
+## Plugins
+
+With the popularity of Grafana continuing to accelerate, it has been
+challenging to keep up with all the requests for new features, new
+panels, new data sources, and new functionality. Saying “no” so often
+has been frustrating, especially for an open source project with such
+a vibrant community.
+
+The team felt that it was time to dramatically improve extensibility
+through plugin support. Grafana 3.0 comes with a completely revamped
+plugin SDK / API.
+
+We’ve refactored our **Data Source** plugin architecture and added
+two new plugin types:
+
+* **Panel** plugins let you add new panel types for your Dashboards.
+* **App** plugins bundle **Panels** plugins, **Data Sources** plugins,
+Dashboards, and Grafana **Pages**. Apps are a great way to provide an
+entire experience right within Grafana.
+
+## Grafana.net
+
+
+
+[Grafana.net](https://grafana.net) offers a central repository where the community can come together to discover, create and
+share plugins (data sources, panels, apps) and dashboards.
+
+We are also working on a hosted Graphite-compatible data source that will be optimized for use with Grafana.
+It’ll be easy to combine your existing data source(s) with this OpenSaaS option. Finally, Grafana.net can
+also be a hub to manage all your Grafana instances. You’ll be able to monitor their health and availability,
+perform dashboard backups, and more.
+
+We are also working on a hosted Graphite-compatible Data Source that
+will be optimized for use with Grafana. It’ll be easy to combine your
+existing Data Source(s) with this OpenSaaS option.
+
+Finally, Grafana.net will also be a hub to manage all your Grafana
+instances. You’ll be able to monitor their health and availability,
+perform Dashboard backups, and more.
+
+Grafana.net will officially launch along with the stable version of
+Grafana 3.0, but check out the preview
+and sign up for an account in the meantime.
+
+
+## grafana-cli
+
+Grafana 3.0 comes with a new command line tool called grafana-cli. You
+can easily install plugins from Grafana.net with it. For
+example:
+
+```
+grafana-cli install grafana-pie-chart-panel
+```
+
+## Personalization & Preferences
+
+The home dashboard, timezone and theme can now be customized on Organization
+and user Profile level. Grafana can also track recently viewed dashboards, which
+can then be displayed in the dashboard list panel.
+
+## Improved Playlists
+
+You can now save Playlists, and start them by using a Playlist URL. If
+you update a running Playlist, it will update after its next cycle.
+
+This is powerful as it allows you to remote control Grafana. If you
+have a big TV display showing Grafana in your company lobby, create a
+playlist named Lobby, and start it on the computer connected to the
+Lobby TV.
+
+You can now change the Lobby playlist and have the dashboards shown in
+the Lobby update accordingly, automatically.
+
+The playlist does not even have to contain multiple Dashboards; you
+can use this feature to reload the whole Dashboard (and Grafana)
+periodically and remotely.
+
+You can also make Playlists dynamic by using Dashboard **tags** to
+define the Playlist.
+
+
+
+## Improved UI
+
+We’ve always tried to focus on a good looking, usable, and responsive
+UI. We’ve continued to pay a lot of attention to these areas in this
+release.
+
+Grafana 3.0 has a dramatically updated UI that not only looks better
+but also has a number of usability improvements. The side menu now
+works as a dropdown that you can pin to the side. The Organization /
+Profile / Sign out side menu links have been combined into an on hover
+slide out menu.
+
+In addition, all the forms and the layouts of all pages have been
+updated to look and flow better, and be much more consistent. There
+are literally hundreds of UI improvements and refinements.
+
+Here’s the new side menu in action:
+
+
+
+And here's the new look for Dashboard settings:
+
+
+
+Check out the Play
+Site to get a feel for some of the UI changes.
+
+## Improved Annotations
+
+It is now possible to define a link in each annotation. You can hover
+over the link and click the annotation text. This feature is very
+useful for linking to particular commits or tickets where more
+detailed information can be presented to the user.
+
+
+
+## Data source variables
+
+This has been a top requested feature for very long we are exited to finally provide
+this feature. You can now add a new `Data source` type variable. That will
+automatically be filled with instance names of your data sources.
+
+
+
+You can then use this variable as the panel data source:
+
+
+
+This will allow you to quickly change data source server and reuse the
+same dashboard for different instances of your metrics backend. For example
+you might have Graphite running in multiple data centers or environments.
+
+## Prometheus, InfluxDB, and OpenTSDB improvements
+
+All three of these popular included Data Sources have seen a variety
+of improvements in this release. Here are some highlights:
+
+### Prometheus
+
+The Prometheus Data Source now supports annotations.
+
+### InfluxDB
+
+You can now select the InfluxDB policy from the query editor.
+
+
+Grafana 3.0 also comes with support for InfluxDB 0.11 and InfluxDB 0.12.
+
+### OpenTSDB
+
+OpenTSDB 2.2 is better supported and now supports millisecond precision.
+
+## Breaking changes
+
+Dashboards from v2.6 are compatible; no manual updates should be necessary. There could
+be some edge case scenarios where dashboards using templating could stop working.
+If that is the case just enter the edit view for the template variable and hit Update button.
+This is due to a simplification of the variable format system where template variables are
+now stored without any formatting (glob/regex/etc), this is done on the fly when the
+variable is interpolated.
+
+* Plugin API: The plugin API has changed so if you are using a custom
+data source (or panel) they need to be updated as well.
+
+* InfluxDB 0.8: This data source is no longer included in releases,
+you can still install manually from [Grafana.net](http://grafana.net)
+
+* KairosDB: This data source has also no longer shipped with Grafana,
+you can install it manually from [Grafana.net](http://grafana.net)
+
+## Plugin showcase
+
+Discovering and installing plugins is very quick and easy with Grafana 3.0 and [Grafana.net](https://grafana.net). Here
+are a couple that I incurage you try!
+
+#### [Clock Panel](https://grafana.net/plugins/grafana-clock-panel)
+Support's both current time and count down mode.
+
+
+#### [Pie Chart Panel](https://grafana.net/plugins/grafana-piechart-panel)
+A simple pie chart panel is now available as an external plugin.
+
+
+#### [WorldPing App](https://grafana.net/plugins/raintank-worldping-app)
+This is full blown Grafana App that adds new panels, data sources and pages to give
+feature rich global performance monitoring directly from your on-prem Grafana.
+
+
+
+#### [Zabbix App](https://grafana.net/plugins/alexanderzobnin-zabbix-app)
+This app contains the already very pouplar Zabbix data source plugin, 2 dashboards and a triggers panel. It is
+created and maintained by [Alexander Zobnin](https://github.com/alexanderzobnin/grafana-zabbix).
+
+
+
+Checkout the full list of plugins on [Grafana.net](https://grafana.net/plugins)
+
+## CHANGELOG
+
+For a detailed list and link to github issues for everything included
+in the 3.0 release please view the
+[CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md)
+file.
diff --git a/docs/sources/guides/whats-new-in-v4-1.md b/docs/sources/guides/whats-new-in-v4-1.md
new file mode 100644
index 00000000000..b4e3b9f904c
--- /dev/null
+++ b/docs/sources/guides/whats-new-in-v4-1.md
@@ -0,0 +1,70 @@
++++
+title = "What's New in Grafana v4.1 beta"
+description = "Feature & improvement highlights for Grafana v4.1 beta"
+keywords = ["grafana", "new", "documentation", "4.1.0-beta1"]
+type = "docs"
+[menu.docs]
+name = "Version 4.1 beta"
+identifier = "v4.1"
+parent = "whatsnew"
+weight = -1
++++
+
+
+## Whats new in Grafana v4.1 beta
+- **Graph**: Support for shared tooltip on all graphs as you hover over one graph. [#1578](https://github.com/grafana/grafana/pull/1578), [#6274](https://github.com/grafana/grafana/pull/6274)
+- **Victorops**: Add VictorOps notification integration [#6411](https://github.com/grafana/grafana/issues/6411), thx [@ichekrygin](https://github.com/ichekrygin)
+- **Opsgenie**: Add OpsGenie notification integratiion [#6687](https://github.com/grafana/grafana/issues/6687), thx [@kylemcc](https://github.com/kylemcc)
+- **Cloudwatch**: Make it possible to specify access and secret key on the data source config page [#6697](https://github.com/grafana/grafana/issues/6697)
+- **Elasticsearch**: Added support for Elasticsearch 5.x [#5740](https://github.com/grafana/grafana/issues/5740), thx [@lpic10](https://github.com/lpic10)
+- **Panel**: Added help text for panels. [#4079](https://github.com/grafana/grafana/issues/4079), thx [@utkarshcmu](https://github.com/utkarshcmu)
+- [Full changelog](https://github.com/grafana/grafana/blob/master/CHANGELOG.md)
+
+### Shared tooltip
+
+{{< imgbox max-width="60%" img="/img/docs/v41/shared_tooltip.gif" caption="Shared tooltip" >}}
+
+Showing the tooltip on all panels at the same time has been a long standing request in Grafana and we are really happy to finally be able to release it.
+You can enable/disable the shared tooltip from the dashboard settings menu or cycle between default, shared tooltip and shared crosshair by pressing `CTRL + O` or `CMD + O`.
+
+
+
+### Help text for panel
+
+{{< imgbox max-width="60%" img="/img/docs/v41/helptext_for_panel_settings.png" caption="Hovering help text" >}}
+
+You can set a help text in the general tab on any panel. The help text is using Markdown to enable better formating and linking to other sites that can provide more information.
+
+
+
+{{< imgbox max-width="60%" img="/img/docs/v41/helptext_hover.png" caption="Hovering help text" >}}
+
+Panels with a help text available have a little indicator in the top left corner. You can show the help text by hovering the icon.
+
+
+
+### Easier Cloudwatch configuration
+
+{{< imgbox max-width="60%" img="/img/docs/v41/cloudwatch_settings.png" caption="Cloudwatch configuration" >}}
+
+In Grafana 4.1.0 you can configure your Cloudwatch data source with `access key` and `secret key` directly in the data source configuration page.
+This enables people to use the Cloudwatch data source without having access to the filesystem where Grafana is running.
+
+Once the `access key` and `secret key` have been saved the user will no longer be able to view them.
+
+
+## Upgrade & Breaking changes
+
+Elasticsearch 1.x is no longer supported. Please upgrade to Elasticsearch 2.x or 5.x. Otherwise Grafana 4.1.0-beta1 contains no breaking changes.
+
+## Changelog
+
+Checkout the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) file for a complete list
+of new features, changes, and bug fixes.
+
+## Download
+
+Head to [v4.1 download page](/download/4_1_0/) for download links & instructions.
+
+## Thanks
+A big thanks to all the Grafana users who contribute by submitting PRs, bug reports & feedback!
diff --git a/docs/sources/guides/whats-new-in-v4.md b/docs/sources/guides/whats-new-in-v4.md
new file mode 100644
index 00000000000..71a5c0251da
--- /dev/null
+++ b/docs/sources/guides/whats-new-in-v4.md
@@ -0,0 +1,180 @@
++++
+title = "What's New in Grafana v4.0"
+description = "Feature & improvement highlights for Grafana v4.0"
+keywords = ["grafana", "new", "documentation", "4.0"]
+type = "docs"
+[menu.docs]
+name = "Version 4.0 (Latest)"
+identifier = "v4.0"
+parent = "whatsnew"
+weight = -1
++++
+
+# What's New in Grafana v4.0
+
+As usual this release contains a ton of minor new features, fixes and improved UX. But on top of the usual new goodies
+is a core new feature: Alerting! Read on below for a detailed description of what's new in v4.0.
+
+## Alerting
+
+{{< imgbox max-width="40%" img="/img/docs/v4/drag_handles_gif.gif" caption="Alerting overview" >}}
+
+Alerting is a really revolutionary feature for Grafana. It transforms Grafana from a
+visualization tool into a truly mission critical monitoring tool. The alert rules are very easy to
+configure using your existing graph panels and threshold levels can be set simply by dragging handles to
+the right side of the graph. The rules will continually be evaluated by grafana-server and
+notifications will be sent out when the rule conditions are met.
+
+This feature has been worked on for over a year with many iterations and rewrites
+just to make sure the foundations are really solid. We are really proud to finally release it!
+Since the alerting execution is processed in the backend all data source plugins are not supported.
+Right now Graphite, Prometheus, InfluxDB and OpenTSDB are supported. Elasticsearch is being worked
+on but will be not ready for v4 release.
+
+
+
+### Rules
+
+{{< imgbox max-width="40%" img="/img/docs/v4/alerting_conditions.png" caption="Alerting Conditions" >}}
+
+The rule config allows you to specify a name, how often the rule should be evaluated and a series
+of conditions that all need to be true for the alert to fire.
+
+Currently the only condition type that exists is a `Query` condition that allows you to
+specify a query letter, time range and an aggregation function. The letter refers to
+a query you already have added in the **Metrics** tab. The result from the
+query and the aggregation function is a single value that is then used in the threshold check.
+
+We plan to add other condition types in the future, like `Other Alert`, where you can include the state
+of another alert in your conditions, and `Time Of Day`.
+
+### Notifications
+
+{{< imgbox max-width="40%" img="/img/docs/v4/slack_notification.png" caption="Alerting Slack Notification" >}}
+
+Alerting would not be very useful if there was no way to send notifications when rules trigger and change state. You
+can setup notifications of different types. We currently have `Slack`, `PagerDuty`, `Email` and `Webhook` with more in the
+pipe that will be added during beta period. The notifications can then be added to your alert rules.
+If you have configured an external image store in the grafana.ini config file (s3 and webdav options available)
+you can get very rich notifications with an image of the graph and the metric
+values all included in the notification.
+
+### Annotations
+
+Alert state changes are recorded in a new annotation store that is built into Grafana. This store
+currently only supports storing annotations in Grafana's own internal database (mysql, postgres or sqlite).
+The Grafana annotation storage is currently only used for alert state changes but we hope to add the ability for users
+to add graph comments in the form of annotations directly from within Grafana in a future release.
+
+### Alert List Panel
+
+{{< imgbox max-width="30%" img="/img/docs/v4/alert_list_panel.png" caption="Alert List Panel" >}}
+
+This new panel allows you to show alert rules or a history of alert rule state changes. You can filter based on states your
+interested in. Very useful panel for overview style dashboards.
+
+
+
+## Ad-hoc filter variable
+
+{{< imgbox max-width="30%" img="/img/docs/v4/adhoc_filters.gif" caption="Ad-hoc filters variable" >}}
+
+This is a new and very different type of template variable. It will allow you to create new key/value filters on the fly.
+With autocomplete for both key and values. The filter condition will be automatically applied to all
+queries that use that data source. This feature opens up more exploratory dashboards. In the gif animation to the right
+you have a dashboard for Elasticsearch log data. It uses one query variable that allow you to quickly change how the data
+is grouped, and an interval variable for controlling the granularity of the time buckets. What was missing
+was a way to dynamically apply filters to the log query. With the `Ad-Hoc Filters` variable you can
+dynamically add filters to any log property!
+
+## UX Improvements
+
+We always try to bring some UX/UI refinements & polish in every release.
+
+### TV-mode & Kiosk mode
+
+
+
+
+
+ Grafana is so often used on wall mounted TVs that we figured a clean TV mode would be
+ really nice. In TV mode the top navbar, row & panel controls will all fade to transparent.
+
+
+
+ This happens automatically after one minute of user inactivity but can also be toggled manually
+ with the d v sequence shortcut. Any mouse movement or keyboard action will
+ restore navbar & controls.
+
+
+
+ Another feature is the kiosk mode. This can be enabled with d k
+ shortcut or by adding &kiosk to the URL when you load a dashboard.
+ In kiosk mode the navbar is completely hidden/removed from view.
+
+
+### New row menu & add panel experience
+
+{{< imgbox max-width="50%" img="/img/docs/v4/add_panel.gif" caption="Add Panel flow" >}}
+
+We spent a lot of time improving the dashboard building experience. Trying to make it both
+more efficient and easier for beginners. After many good but not great experiments
+with a `build mode` we eventually decided to just improve the green row menu and
+continue work on a `build mode` for a future release.
+
+The new row menu automatically slides out when you mouse over the edge of the row. You no longer need
+to hover over the small green icon and the click it to expand the row menu.
+
+There is some minor improvements to drag and drop behaviour. Now when dragging a panel from one row
+to another you will insert the panel and Grafana will automatically make room for it.
+When you drag a panel within a row you will simply reorder the panels.
+
+If you look at the animation to the right you can see that you can drag and drop a new panel. This is not
+required, you can also just click the panel type and it will be inserted at the end of the row
+automatically. Dragging a new panel has an advantage in that you can insert a new panel where ever you want
+not just at the end of the row.
+
+We plan to further improve dashboard building in the future with a more rich grid & layout system.
+
+### Keyboard shortcuts
+
+{{< imgbox max-width="40%" img="/img/docs/v4/shortcuts.png" caption="Shortcuts" >}}
+
+Grafana v4 introduces a number of really powerful keyboard shortcuts. You can now focus a panel
+by hovering over it with your mouse. With a panel focused you can simple hit `e` to toggle panel
+edit mode, or `v` to toggle fullscreen mode. `p r` removes the panel. `p s` opens share
+modal.
+
+Some nice navigation shortcuts are:
+
+- `g h` for go to home dashboard
+- `s s` open search with starred pre-selected
+- `s t` open search in tags list view
+
+
+
+## Upgrade & Breaking changes
+
+There are no breaking changes. Old dashboards and features should work the same. Grafana-server will automatically upgrade it's db
+schema on restart. It's advisable to do a backup of Grafana's database before updating.
+
+If your are using plugins make sure to update your plugins as some might not work perfectly v4.
+
+You can update plugins using grafana-cli
+
+ grafana-cli plugins update-all
+
+## Changelog
+
+Checkout the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) file for a complete list
+of new features, changes, and bug fixes.
+
diff --git a/docs/sources/http_api/admin.md b/docs/sources/http_api/admin.md
index ba1a0923861..2d15b19454c 100644
--- a/docs/sources/http_api/admin.md
+++ b/docs/sources/http_api/admin.md
@@ -1,11 +1,20 @@
-----
-page_title: Admin APIs
-page_description: Grafana Admin API Reference
-page_keywords: grafana, admin, http, api, documentation
----
++++
+title = "Admin HTTP API "
+description = "Grafana Admin HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "admin"]
+aliases = ["/http_api/admin/"]
+type = "docs"
+[menu.docs]
+name = "Admin"
+parent = "http_api"
++++
# Admin API
+The admin http API does not currently work with an api token. Api Token's are currently only linked to an organization and organization role. They cannot given
+the permission of server admin, only user's can be given that permission. So in order to use these API calls you will have to use basic auth and Grafana user
+with Grafana admin permission.
+
## Settings
`GET /api/admin/settings`
@@ -15,7 +24,6 @@ page_keywords: grafana, admin, http, api, documentation
GET /api/admin/settings
Accept: application/json
Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
**Example Response**:
@@ -171,7 +179,6 @@ page_keywords: grafana, admin, http, api, documentation
GET /api/admin/stats
Accept: application/json
Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
**Example Response**:
@@ -201,7 +208,6 @@ Create new user
POST /api/admin/users HTTP/1.1
Accept: application/json
Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"name":"User",
@@ -228,7 +234,6 @@ Change password for specific user
PUT /api/admin/users/2/password HTTP/1.1
Accept: application/json
Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
**Example Response**:
@@ -246,7 +251,6 @@ Change password for specific user
PUT /api/admin/users/2/permissions HTTP/1.1
Accept: application/json
Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
**Example Response**:
@@ -264,7 +268,6 @@ Change password for specific user
DELETE /api/admin/users/2 HTTP/1.1
Accept: application/json
Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
**Example Response**:
diff --git a/docs/sources/http_api/alerting.md b/docs/sources/http_api/alerting.md
new file mode 100644
index 00000000000..037176f39bf
--- /dev/null
+++ b/docs/sources/http_api/alerting.md
@@ -0,0 +1,216 @@
++++
+title = "Alerting HTTP API "
+description = "Grafana Alerting HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "alerting"]
+aliases = ["/http_api/alerting/"]
+type = "docs"
+[menu.docs]
+name = "Alerting"
+parent = "http_api"
++++
+
+
+# Alerting API
+
+You can use the Alerting API to get information about alerts and their states but this API cannot be used to modify the alert.
+To create new alerts or modify them you need to update the dashboard json that contains the alerts.
+
+This API can also be used to create, update and delete alert notifications.
+
+## Get alerts
+
+`GET /api/alerts/`
+
+**Example Request**:
+
+ GET /api/org HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+ [
+ {
+ "id": 1,
+ "dashboardId": 1,
+ "panelId": 1,
+ "name": "fire place sensor",
+ "message": "Someone is trying to break in through the fire place",
+ "state": "alerting",
+ "newStateDate": "2016-12-25",
+ "executionError": "",
+ "dashboardUri": "http://grafana.com/dashboard/db/sensors"
+ }
+ ]
+
+## Get one alert
+
+`GET /api/alerts/:id`
+
+**Example Request**:
+
+ GET /api/org HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+ {
+ "id": 1,
+ "dashboardId": 1,
+ "panelId": 1,
+ "name": "fire place sensor",
+ "message": "Someone is trying to break in through the fire place",
+ "state": "alerting",
+ "newStateDate": "2016-12-25",
+ "executionError": "",
+ "dashboardUri": "http://grafana.com/dashboard/db/sensors"
+ }
+
+
+## Pause alert
+
+`POST /api/alerts/:id/pause`
+
+**Example Request**:
+
+ GET /api/org HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+ {
+ "alertId": 1,
+ "paused: true
+ }
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+ {
+ "alertId": 1,
+ "state": "Paused",
+ "message": "alert paused"
+ }
+
+## Get alert notifications
+
+`GET /api/alert-notifications`
+
+**Example Request**:
+
+ GET /api/org HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+
+ {
+ "id": 1,
+ "name": "Team A",
+ "type": "email",
+ "isDefault": true,
+ "created": "2017-01-01 12:45",
+ "updated": "2017-01-01 12:45"
+ }
+
+## Create alert notification
+
+`POST /api/alerts-notifications`
+
+**Example Request**:
+
+ GET /api/org HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+ {
+ "name": "new alert notification", //Required
+ "type": "email", //Required
+ "isDefault": false,
+ "settings": {
+ "addresses: "carl@grafana.com;dev@grafana.com"
+ }
+ }
+
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+ {
+ "id": 1,
+ "name": "new alert notification",
+ "type": "email",
+ "isDefault": false,
+ "settings": { addresses: "carl@grafana.com;dev@grafana.com"} }
+ "created": "2017-01-01 12:34",
+ "updated": "2017-01-01 12:34"
+ }
+
+## Update alert notification
+
+`PUT /api/alerts-notifications/1`
+
+**Example Request**:
+
+ GET /api/org HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+ {
+ "id": 1,
+ "name": "new alert notification", //Required
+ "type": "email", //Required
+ "isDefault": false,
+ "settings": {
+ "addresses: "carl@grafana.com;dev@grafana.com"
+ }
+ }
+
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+ {
+ "id": 1,
+ "name": "new alert notification",
+ "type": "email",
+ "isDefault": false,
+ "settings": { addresses: "carl@grafana.com;dev@grafana.com"} }
+ "created": "2017-01-01 12:34",
+ "updated": "2017-01-01 12:34"
+ }
+
+## Delete alert notification
+
+`DELETE /api/alerts-notifications/1`
+
+**Example Request**:
+
+ GET /api/org HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+ {
+ "message": "Notification deleted"
+ }
diff --git a/docs/sources/http_api/auth.md b/docs/sources/http_api/auth.md
index df874d1653e..aaeda1105b1 100644
--- a/docs/sources/http_api/auth.md
+++ b/docs/sources/http_api/auth.md
@@ -1,8 +1,13 @@
-----
-page_title: Authentication API
-page_description: Grafana HTTP API Reference
-page_keywords: grafana, admin, http, api, documentation
----
++++
+title = "Authentication HTTP API "
+description = "Grafana Authentication HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "authentication"]
+aliases = ["/http_api/authentication/"]
+type = "docs"
+[menu.docs]
+name = "Authentication"
+parent = "http_api"
++++
# Authentication API
@@ -13,7 +18,7 @@ Currently you can authenticate via an `API Token` or via a `Session cookie` (acq
## Basic Auth
If basic auth is enabled (it is enabled by default) you can authenticate your HTTP request via
-standard basic auth.
+standard basic auth. Basic auth will also authenticate LDAP users.
curl example:
```
diff --git a/docs/sources/http_api/dashboard.md b/docs/sources/http_api/dashboard.md
index 68f6ab022cc..5e9891e0a89 100644
--- a/docs/sources/http_api/dashboard.md
+++ b/docs/sources/http_api/dashboard.md
@@ -1,8 +1,13 @@
-----
-page_title: Dashboard API
-page_description: Grafana Dashboard API Reference
-page_keywords: grafana, admin, http, api, documentation, dashboard
----
++++
+title = "Dashboard HTTP API "
+description = "Grafana Dashboard HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "dashboard"]
+aliases = ["/http_api/dashboard/"]
+type = "docs"
+[menu.docs]
+name = "Dashboard"
+parent = "http_api"
++++
# Dashboard API
@@ -96,7 +101,7 @@ Will return the dashboard given the dashboard slug. Slug is the url friendly ver
"isStarred": false,
"slug": "production-overview"
},
- "model": {
+ "dashboard": {
"id": null,
"title": "Production Overview",
"tags": [ "templated" ],
@@ -191,7 +196,7 @@ Will return the home dashboard.
`GET /api/dashboards/tags`
-Get all tabs of dashboards
+Get all tags of dashboards
**Example Request**:
diff --git a/docs/sources/http_api/data_source.md b/docs/sources/http_api/data_source.md
index 2a3c20e9af8..dd8cbc9aa74 100644
--- a/docs/sources/http_api/data_source.md
+++ b/docs/sources/http_api/data_source.md
@@ -1,8 +1,14 @@
-----
-page_title: Data source API
-page_description: Grafana Data source API Reference
-page_keywords: grafana, admin, http, api, documentation, datasource
----
++++
+title = "Data source HTTP API "
+description = "Grafana Data source HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "data source"]
+aliases = ["/http_api/datasource/"]
+type = "docs"
+[menu.docs]
+name = "Data source"
+parent = "http_api"
++++
+
# Data source API
@@ -152,7 +158,7 @@ page_keywords: grafana, admin, http, api, documentation, datasource
HTTP/1.1 200
Content-Type: application/json
- {"id":1,"message":"Datasource added"}
+ {"id":1,"message":"Datasource added", "name": "test_datasource"}
## Update an existing data source
@@ -187,7 +193,7 @@ page_keywords: grafana, admin, http, api, documentation, datasource
HTTP/1.1 200
Content-Type: application/json
- {"message":"Datasource updated"}
+ {"message":"Datasource updated", "id": 1, "name": "test_datasource"}
## Delete an existing data source
@@ -207,35 +213,6 @@ page_keywords: grafana, admin, http, api, documentation, datasource
{"message":"Data source deleted"}
-## Available data source types
-
-`GET /api/datasources/plugins`
-
-**Example Request**:
-
- GET /api/datasources/plugins HTTP/1.1
- Accept: application/json
- Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
-
-**Example Response**:
-
- HTTP/1.1 200
- Content-Type: application/json
-
- {
- "grafana":{
- "metrics":true,"module":"plugins/datasource/grafana/datasource",
- "name":"Grafana (for testing)",
- "partials":{
- "query":"app/plugins/datasource/grafana/partials/query.editor.html"
- },
- "pluginType":"datasource",
- "serviceName":"GrafanaDatasource",
- "type":"grafana"
- }
- }
-
## Data source proxy calls
`GET /api/datasources/proxy/:datasourceId/*`
diff --git a/docs/sources/http_api/index.md b/docs/sources/http_api/index.md
new file mode 100644
index 00000000000..9c5d0e7d49a
--- /dev/null
+++ b/docs/sources/http_api/index.md
@@ -0,0 +1,29 @@
++++
+title = "HTTP API"
+description = "Grafana HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "overview"]
+type = "docs"
+[menu.docs]
+name = "HTTP API"
+identifier = "http_api"
+weight = 9
++++
+
+
+# HTTP API Reference
+
+The Grafana backend exposes an HTTP API, the same API is used by the frontend to do everything from saving
+dashboards, creating users and updating data sources.
+
+## Supported HTTP APIs:
+
+
+* [Authentication API]({{< relref "auth.md" >}})
+* [Dashboard API]({{< relref "dashboard.md" >}})
+* [Data Source API]({{< relref "data_source.md" >}})
+* [Organisation API]({{< relref "org.md" >}})
+* [User API]({{< relref "user.md" >}})
+* [Admin API]({{< relref "admin.md" >}})
+* [Snapshot API]({{< relref "snapshot.md" >}})
+* [Preferences API]({{< relref "preferences.md" >}})
+* [Other API]({{< relref "other.md" >}})
diff --git a/docs/sources/http_api/org.md b/docs/sources/http_api/org.md
index adb5d5cd31e..72c995adedf 100644
--- a/docs/sources/http_api/org.md
+++ b/docs/sources/http_api/org.md
@@ -1,8 +1,14 @@
-----
-page_title: Organisation API
-page_description: Grafana Organisation API Reference
-page_keywords: grafana, admin, http, api, documentation, orgs, organisation
----
++++
+title = "Organisation HTTP API "
+description = "Grafana Organisation HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "organisation"]
+aliases = ["/http_api/organisation/"]
+type = "docs"
+[menu.docs]
+name = "Organisation"
+parent = "http_api"
++++
+
# Organisation API
@@ -85,6 +91,34 @@ page_keywords: grafana, admin, http, api, documentation, orgs, organisation
}
}
+## Create Organisation
+
+`POST /api/orgs`
+
+**Example Request**:
+
+ POST /api/orgs HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+ {
+ "name":"New Org."
+ }
+
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+
+ {
+ "orgId":"1",
+ "message":"Organization created"
+ }
+
+
+
## Update current Organisation
`PUT /api/org`
diff --git a/docs/sources/http_api/other.md b/docs/sources/http_api/other.md
index 8852b6ccb38..65d18f94ea4 100644
--- a/docs/sources/http_api/other.md
+++ b/docs/sources/http_api/other.md
@@ -1,8 +1,14 @@
-----
-page_title: Other APIs
-page_description: Grafana Other API Reference
-page_keywords: grafana, admin, http, api, documentation, dashboards
----
++++
+title = "Other HTTP API "
+description = "Grafana Other HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "other"]
+aliases = ["/http_api/other/"]
+type = "docs"
+[menu.docs]
+name = "Other"
+parent = "http_api"
++++
+
# Frontend Settings API
diff --git a/docs/sources/http_api/overview.md b/docs/sources/http_api/overview.md
deleted file mode 100644
index 8e7e2d60ad3..00000000000
--- a/docs/sources/http_api/overview.md
+++ /dev/null
@@ -1,21 +0,0 @@
-----
-page_title: HTTP API
-page_description: Grafana HTTP API Reference
-page_keywords: grafana, admin, http, api, documentation
----
-
-# HTTP API Reference
-
-The Grafana backend exposes an HTTP API, the same API is used by the frontend to do everything from saving
-dashboards, creating users and updating data sources.
-
-###Supported HTTP APIs:
-
-* [Authentication API](/http_api/auth/)
-* [Dashboard API](/http_api/dashboard/)
-* [Data Source API](/http_api/data_source/)
-* [Organisation API](/http_api/org/)
-* [User API](/http_api/user/)
-* [Admin API](/http_api/admin/)
-* [Snapshot API](/http_api/snapshot/)
-* [Other API](/http_api/other/)
diff --git a/docs/sources/http_api/preferences.md b/docs/sources/http_api/preferences.md
new file mode 100644
index 00000000000..a4b953cdaed
--- /dev/null
+++ b/docs/sources/http_api/preferences.md
@@ -0,0 +1,105 @@
++++
+title = "HTTP Preferences API "
+description = "Grafana HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "preferences"]
+aliases = ["/http_api/preferences/"]
+type = "docs"
+[menu.docs]
+name = "Preferences"
+parent = "http_api"
++++
+
+# User and Org Preferences API
+
+Keys:
+
+- **theme** - One of: ``light``, ``dark``, or an empty string for the default theme
+- **homeDashboardId** - The numerical ``:id`` of a favorited dashboard, default: ``0``
+- **timezone** - One of: ``utc``, ``browser``, or an empty string for the default
+
+Omitting a key will cause the current value to be replaced with the
+system default value.
+
+## Get Current User Prefs
+
+`GET /api/user/preferences`
+
+**Example Request**:
+
+ GET /api/user/preferences HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+
+ {"theme":"","homeDashboardId":0,"timezone":""}
+
+## Update Current User Prefs
+
+`PUT /api/user/preferences`
+
+**Example Request**:
+
+ PUT /api/user/preferences HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+ {
+ "theme": "",
+ "homeDashboardId":0,
+ "timezone":"utc"
+ }
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: text/plain; charset=utf-8
+
+ {"message":"Preferences updated"}
+
+## Get Current Org Prefs
+
+`GET /api/org/preferences`
+
+**Example Request**:
+
+ GET /api/org/preferences HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+
+ {"theme":"","homeDashboardId":0,"timezone":""}
+
+## Update Current Org Prefs
+
+`PUT /api/org/preferences`
+
+**Example Request**:
+
+ PUT /api/org/preferences HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+ {
+ "theme": "",
+ "homeDashboardId":0,
+ "timezone":"utc"
+ }
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: text/plain; charset=utf-8
+
+ {"message":"Preferences updated"}
diff --git a/docs/sources/http_api/snapshot.md b/docs/sources/http_api/snapshot.md
index 8f18c6ed81f..f0b8304cd24 100644
--- a/docs/sources/http_api/snapshot.md
+++ b/docs/sources/http_api/snapshot.md
@@ -1,8 +1,13 @@
-----
-page_title: Snapshot API
-page_description: Grafana Snapshot API Reference
-page_keywords: grafana, admin, http, api, documentation, snapshot, dashboard
----
++++
+title = "HTTP Snapshot API "
+description = "Grafana HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "snapshot"]
+aliases = ["/http_api/snapshot/"]
+type = "docs"
+[menu.docs]
+name = "Snapshot"
+parent = "http_api"
++++
# Snapshot API
diff --git a/docs/sources/http_api/user.md b/docs/sources/http_api/user.md
index aa870031ca2..734fbb4f934 100644
--- a/docs/sources/http_api/user.md
+++ b/docs/sources/http_api/user.md
@@ -1,10 +1,15 @@
-----
-page_title: User API
-page_description: Grafana User API Reference
-page_keywords: grafana, admin, http, api, documentation, user
----
++++
+title = "User HTTP API "
+description = "Grafana User HTTP API"
+keywords = ["grafana", "http", "documentation", "api", "user"]
+aliases = ["/http_api/user/"]
+type = "docs"
+[menu.docs]
+name = "Users"
+parent = "http_api"
++++
-# User API
+# User HTTP resources / actions
## Search Users
diff --git a/docs/sources/index.md b/docs/sources/index.md
index 83b7f44dd5b..0324bf888ad 100644
--- a/docs/sources/index.md
+++ b/docs/sources/index.md
@@ -1,37 +1,50 @@
----
-page_title: Grafana Installation
-page_description: Install guide for Grafana.
-page_keywords: grafana, installation, documentation
----
++++
+title = "Grafana Documentation Site"
+description = "Install guide for Grafana"
+keywords = ["grafana", "installation", "documentation"]
+type = "docs"
+[menu.docs]
+name = "Welcome to the Docs"
+identifier = "root"
+weight = -1
++++
-# Installation
+# Welcome to the Grafana Documentation
-Grafana is easily installed via a Debian/Ubuntu package (.deb), via
-Redhat/Centos package (.rpm) or manually via a tarball that contains all
-required files and binaries. If you can't find a package or binary for
-your platform, you might be able to build one yourself. Read the [build
-from source](../project/building_from_source) instructions for more
-information.
+Grafana is an open source metric analytics & visualization suite. It is most commonly used for
+visualizing time series data for infrastructure and application analytics but many use it in
+other domains including industrial sensors, home automation, weather, and process control.
-## Platforms
-- [Installing on Debian / Ubuntu](installation/debian.md)
-- [Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)](installation/rpm.md)
-- [Installing on Mac OS X](installation/mac.md)
-- [Installing on Windows](installation/windows.md)
-- [Installing on Docker](installation/docker.md)
-- [Installing using Provisioning (Chef, Puppet, Salt, Ansible, etc)](installation/provisioning.md)
-- [Nightly Builds](http://grafana.org/download/builds.html)
+## Installing Grafana
+- [Installing on Debian / Ubuntu](installation/debian)
+- [Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)](installation/rpm)
+- [Installing on Mac OS X](installation/mac)
+- [Installing on Windows](installation/windows)
+- [Installing on Docker](installation/docker)
+- [Installing using Provisioning (Chef, Puppet, Salt, Ansible, etc)](installation/provisioning)
+- [Nightly Builds](http://grafana.org/builds)
-## Configuration
+For other platforms Read the [build from source]({{< relref "project/building_from_source.md" >}})
+instructions for more information.
+
+## Configuring Grafana
The back-end web server has a number of configuration options. Go the
[Configuration](/installation/configuration) page for details on all
those options.
+
+## Getting started
+
+- [Getting Started](guides/getting_started)
+- [Basic Concepts](guides/basic_concepts)
+- [Screencasts](tutorials/screencasts)
+
## Data sources guides
-- [Graphite](datasources/graphite.md)
-- [Elasticsearch](datasources/elasticsearch.md)
-- [InfluxDB](datasources/influxdb.md)
-- [OpenTSDB](datasources/opentsdb.md)
+- [Graphite](datasources/graphite)
+- [Elasticsearch](datasources/elasticsearch)
+- [InfluxDB](datasources/influxdb)
+- [OpenTSDB](datasources/opentsdb)
+
diff --git a/docs/sources/installation/behind_proxy.md b/docs/sources/installation/behind_proxy.md
new file mode 100644
index 00000000000..46b70b5dc85
--- /dev/null
+++ b/docs/sources/installation/behind_proxy.md
@@ -0,0 +1,70 @@
++++
+title = "Running Grafana behind a reverse proxy"
+description = "Guide for running Grafana behind a reverse proxy"
+keywords = ["grafana", "nginx", "documentation", "haproxy", "reverse"]
+type = "docs"
+[menu.docs]
+name = "Running Grafana behind a reverse proxy"
+parent = "tutorials"
+weight = 1
++++
+
+
+# Running Grafana behind a reverse proxy
+
+It should be straight forward to get Grafana up and running behind a reverse proxy. But here are some things that you might run into.
+
+Links and redirects will not be rendered correctly unless you set the server.domain setting.
+```
+[server]
+domain = foo.bar
+```
+
+To use sub *path* ex `http://foo.bar/grafana` make sure to include `/grafana` in the end of root_url.
+Otherwise Grafana will not behave correctly. See example below.
+
+# Examples
+Here are some example configurations for running Grafana behind a reverse proxy.
+
+## Grafana configuration (ex http://foo.bar.com)
+```
+[server]
+domain = foo.bar
+```
+
+## Nginx configuration
+```
+server {
+ listen 80;
+ root /usr/share/nginx/www;
+ index index.html index.htm;
+
+ location / {
+ proxy_pass http://localhost:3000/;
+ }
+}
+```
+
+# Examples with **sub path** (ex http://foo.bar.com/grafana)
+
+## Grafana configuration with sub path
+```
+[server]
+domain = foo.bar
+root_url = %(protocol)s://%(domain)s:/grafana
+```
+
+## Nginx configuration with sub path
+```
+server {
+ listen 80;
+ root /usr/share/nginx/www;
+ index index.html index.htm;
+
+ location /grafana/ {
+ proxy_pass http://localhost:3000/;
+ }
+}
+```
+
+
diff --git a/docs/sources/installation/configuration.md b/docs/sources/installation/configuration.md
index cdc24dc7c59..157915e8950 100644
--- a/docs/sources/installation/configuration.md
+++ b/docs/sources/installation/configuration.md
@@ -1,8 +1,14 @@
----
-page_title: Configuration
-page_description: Configuration guide for Grafana.
-page_keywords: grafana, configuration, documentation
----
++++
+title = "Configuration"
+description = "Configuration Docs"
+keywords = ["grafana", "configuration", "documentation"]
+type = "docs"
+[menu.docs]
+name = "Configuration"
+identifier = "config"
+parent = "admin"
+weight = 1
++++
# Configuration
@@ -30,6 +36,9 @@ using environment variables using the syntax:
Where the section name is the text within the brackets. Everything
should be upper case, `.` should be replaced by `_`. For example, given these configuration settings:
+ # default section
+ instance_name = ${HOSTNAME}
+
[security]
admin_user = admin
@@ -39,11 +48,18 @@ should be upper case, `.` should be replaced by `_`. For example, given these co
Then you can override them using:
+ export GF_DEFAULT_INSTANCE_NAME=my-instance
export GF_SECURITY_ADMIN_USER=true
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
+## instance_name
+Set the name of the grafana-server instance. Used in logging and internal metrics and in
+clustering info. Defaults to: `${HOSTNAME}`, which will be replaced with
+environment variable `HOSTNAME`, if that is empty or does not exist Grafana will try to use
+system calls to get the machine name.
+
## [paths]
### data
@@ -70,7 +86,7 @@ The IP address to bind to. If empty will bind to all interfaces
The port to bind to, defaults to `3000`. To use port 80 you need to
either give the Grafana binary permission for example:
- $ sudo setcap 'cap_net_bind_service=+ep' /opt/grafana/current/grafana
+ $ sudo setcap 'cap_net_bind_service=+ep' /usr/sbin/grafana-server
Or redirect port 80 to the Grafana port using:
@@ -82,6 +98,8 @@ Another way is put a webserver like Nginx or Apache in front of Grafana and have
`http` or `https`
+> **Note** Grafana versions earlier than 3.0 are vulnerable to [POODLE](https://en.wikipedia.org/wiki/POODLE). So we strongly recommend to upgrade to 3.x or use a reverse proxy for ssl termination.
+
### domain
This setting is only used in as a part of the `root_url` setting (see below). Important if you
@@ -126,6 +144,10 @@ Grafana needs a database to store users and dashboards (and other
things). By default it is configured to use `sqlite3` which is an
embedded database (included in the main Grafana binary).
+### url
+Use either URL or or the other fields below to configure the database
+Example: `mysql://user:secret@host:port/database`
+
### type
Either `mysql`, `postgres` or `sqlite3`, it's your choice.
@@ -152,7 +174,7 @@ The database user (not applicable for `sqlite3`).
### password
-The database user's password (not applicable for `sqlite3`).
+The database user's password (not applicable for `sqlite3`). If the password contains `#` or `;` you have to wrap it with trippel quotes. Ex `"""#password;"""`
### ssl_mode
@@ -186,7 +208,7 @@ Defaults to `admin`.
### admin_password
-The password of the default Grafana admin. Defaults to `admin`.
+The password of the default Grafana admin. Set once on first-run. Defaults to `admin`.
### login_remember_days
@@ -226,7 +248,18 @@ organization to be created for that new user.
The role new users will be assigned for the main organization (if the
above setting is set to true). Defaults to `Viewer`, other valid
-options are `Admin` and `Editor`.
+options are `Admin` and `Editor` and `Read Only Editor`. e.g. :
+
+`auto_assign_org_role = Read Only Editor`
+
+
+
+
+## [auth]
+
+### disable_login_form
+
+Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false.
@@ -263,14 +296,16 @@ example:
[auth.github]
enabled = true
+ allow_sign_up = true
client_id = YOUR_GITHUB_APP_CLIENT_ID
client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
scopes = user:email
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
- api_url = https://api.github.com
+ api_url = https://api.github.com/user
allow_sign_up = false
team_ids =
+ allowed_organizations =
Restart the Grafana back-end. You should now see a GitHub login button
on the login page. You can now login or sign up with your GitHub
@@ -296,7 +331,25 @@ Grafana instance. For example:
team_ids = 150,300
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
- allow_sign_up = false
+ allow_sign_up = true
+
+### allowed_organizations
+
+Require an active organization membership for at least one of the given
+organizations on GitHub. If the authenticated user isn't a member of at least
+one of the organizations they will not be able to register or authenticate with
+your Grafana instance. For example
+
+ [auth.github]
+ enabled = true
+ client_id = YOUR_GITHUB_APP_CLIENT_ID
+ client_secret = YOUR_GITHUB_APP_CLIENT_SECRET
+ scopes = user:email,read:org
+ auth_url = https://github.com/login/oauth/authorize
+ token_url = https://github.com/login/oauth/access_token
+ allow_sign_up = true
+ # space-delimited organization names
+ allowed_organizations = github google
@@ -322,7 +375,7 @@ Secret. Specify these in the Grafana configuration file. For example:
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token
allowed_domains = mycompany.com mycompany.org
- allow_sign_up = false
+ allow_sign_up = true
Restart the Grafana back-end. You should now see a Google login button
on the login page. You can now login or sign up with your Google
@@ -333,6 +386,26 @@ You may allow users to sign-up via Google authentication by setting the
user successfully authenticating via Google authentication will be
automatically signed up.
+## [auth.generic_oauth]
+
+This option could be used if have your own oauth service.
+
+This callback URL must match the full HTTP address that you use in your
+browser to access Grafana, but with the prefix path of `/login/generic_oauth`.
+
+ [auth.generic_oauth]
+ enabled = true
+ client_id = YOUR_APP_CLIENT_ID
+ client_secret = YOUR_APP_CLIENT_SECRET
+ scopes =
+ auth_url =
+ token_url =
+ api_url =
+ allowed_domains = mycompany.com mycompany.org
+ allow_sign_up = true
+
+Set api_url to the resource that returns basic user info.
+
## [auth.basic]
@@ -348,7 +421,7 @@ Set to `true` to enable LDAP integration (default: `false`)
### config_file
Path to the LDAP specific configuration file (default: `/etc/grafana/ldap.toml`)
-> For details on LDAP Configuration, go to the [LDAP Integration](ldap.md) page.
+> For details on LDAP Configuration, go to the [LDAP Integration]({{< relref "ldap.md" >}}) page.
@@ -384,7 +457,7 @@ session provider you have configured.
- **mysql:** go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
- **postgres:** ex: user=a password=b host=localhost port=5432 dbname=c sslmode=disable
- **memcache:** ex: 127.0.0.1:11211
-- **redis:** ex: `addr=127.0.0.1:6379,pool_size=100,db=grafana`
+- **redis:** ex: `addr=127.0.0.1:6379,pool_size=100,prefix=grafana`
If you use MySQL or Postgres as the session store you need to create the
session table manually.
@@ -439,3 +512,112 @@ Grafana backend index those json dashboards which will make them appear in regul
### path
The full path to a directory containing your json dashboards.
+
+## [smtp]
+Email server settings.
+
+### enabled
+defaults to false
+
+### host
+defaults to localhost:25
+
+### user
+In case of SMTP auth, defaults to `empty`
+
+### password
+In case of SMTP auth, defaults to `empty`
+
+### cert_file
+File path to a cert file, defaults to `empty`
+
+### key_file
+File path to a key file, defaults to `empty`
+
+### skip_verify
+Verify SSL for smtp server? defaults to `false`
+
+### from_address
+Address used when sending out emails, defaults to `admin@grafana.localhost`
+
+## [log]
+
+### mode
+Either "console", "file", "syslog". Default is console and file
+Use space to separate multiple modes, e.g. "console file"
+
+### level
+Either "debug", "info", "warn", "error", "critical", default is "info"
+
+### filters
+optional settings to set different levels for specific loggers.
+Ex `filters = sqlstore:debug`
+
+## [metrics]
+
+### enabled
+Enable metrics reporting. defaults true. Available via HTTP API `/api/metrics`.
+
+### interval_seconds
+
+Flush/Write interval when sending metrics to external TSDB. Defaults to 10s.
+
+## [metrics.graphite]
+Include this section if you want to send internal Grafana metrics to Graphite.
+
+### address
+Format ``:port
+
+### prefix
+Graphite metric prefix. Defaults to `prod.grafana.%(instance_name)s.`
+
+## [snapshots]
+
+### external_enabled
+Set to false to disable external snapshot publish endpoint (default true)
+
+### external_snapshot_url
+Set root url to a Grafana instance where you want to publish external snapshots (defaults to https://snapshots-origin.raintank.io)
+
+### external_snapshot_name
+Set name for external snapshot button. Defaults to `Publish to snapshot.raintank.io`
+
+### remove expired snapshot
+Enabled to automatically remove expired snapshots
+
+### remove snapshots after 90 days
+Time to live for snapshots.
+
+## [external_image_storage]
+These options control how images should be made public so they can be shared on services like slack.
+
+### provider
+You can choose between (s3, webdav). If left empty Grafana will ignore the upload action.
+
+## [external_image_storage.s3]
+
+### bucket_url
+bucket url for s3. ex http://grafana.s3.amazonaws.com/
+
+### access_key
+access key. ex AAAAAAAAAAAAAAAAAAAA
+
+### secret_key
+secret key. ex AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+
+## [external_image_storage.webdav]
+
+### url
+Url to where Grafana will send PUT request with images
+
+### username
+basic auth username
+
+### password
+basic auth password
+
+## [alerting]
+
+### execute_alerts = true
+
+Makes it possible to turn off alert rule execution.
diff --git a/docs/sources/installation/debian.md b/docs/sources/installation/debian.md
index b5c72f3182c..da2358d14cd 100644
--- a/docs/sources/installation/debian.md
+++ b/docs/sources/installation/debian.md
@@ -1,34 +1,50 @@
----
-page_title: Installing on Debian / Ubuntu
-page_description: Grafana Installation guide for Debian / Ubuntu.
-page_keywords: grafana, installation, debian, ubuntu, guide
----
++++
+title = "Installing on Debian / Ubuntu"
+description = "Install guide for Grafana"
+keywords = ["grafana", "installation", "documentation"]
+type = "docs"
+aliases = ["/installation/installation/debian"]
+[menu.docs]
+name = "Installing on Ubuntu / Debian"
+identifier = "debian"
+parent = "installation"
+weight = 1
++++
# Installing on Debian / Ubuntu
-## Download
-
Description | Download
------------ | -------------
-.deb for Debian-based Linux | [grafana_2.6.0_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb)
+Stable for Debian-based Linux | [4.0.2 (x86-64 deb)](https://grafanarel.s3.amazonaws.com/builds/grafana_4.0.2-1481203731_amd64.deb)
+Latest beta for Debian-based Linux | [4.1.0-beta1 (x86-64 deb)](https://grafanarel.s3.amazonaws.com/builds/grafana_4.1.0-1482230757beta1_amd64.deb)
-## Install
+## Install Stable
- $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb
- $ sudo apt-get install -y adduser libfontconfig
- $ sudo dpkg -i grafana_2.6.0_amd64.deb
+```
+$ wget https://grafanarel.s3.amazonaws.com/builds/grafana_4.0.2-1481203731_amd64.deb
+$ sudo apt-get install -y adduser libfontconfig
+$ sudo dpkg -i grafana_4.0.2-1481203731_amd64.deb
+```
+
+## Install Latest Beta
+
+```
+$ wget https://grafanarel.s3.amazonaws.com/builds/grafana_4.1.0-1482230757beta1_amd64.deb
+$ sudo apt-get install -y adduser libfontconfig
+$ sudo dpkg -i grafana_4.1.0-1482230757beta1_amd64.deb
+```
## APT Repository
Add the following line to your `/etc/apt/sources.list` file.
- deb https://packagecloud.io/grafana/stable/debian/ wheezy main
+ deb https://packagecloud.io/grafana/stable/debian/ jessie main
Use the above line even if you are on Ubuntu or another Debian version.
There is also a testing repository if you want beta or release
candidates.
- deb https://packagecloud.io/grafana/testing/debian/ wheezy main
+ deb https://packagecloud.io/grafana/testing/debian/ jessie main
Then add the [Package Cloud](https://packagecloud.io/grafana) key. This
allows you to install signed packages.
@@ -68,7 +84,7 @@ is `3000` and default user and group is `admin`.
To configure the Grafana server to start at boot time:
- $ sudo update-rc.d grafana-server defaults 95 10
+ $ sudo update-rc.d grafana-server defaults
## Start the server (via systemd)
@@ -97,23 +113,24 @@ By default Grafana will log to `/var/log/grafana`
The default configuration specifies a sqlite3 database located at
`/var/lib/grafana/grafana.db`. Please backup this database before
-upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page](configuration.md#database).
+upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page]({{< relref "configuration.md#database" >}}).
## Configuration
The configuration file is located at `/etc/grafana/grafana.ini`. Go the
-[Configuration](/installation/configuration) page for details on all
+[Configuration]({{< relref "configuration.md" >}}) page for details on all
those options.
### Adding data sources
-- [Graphite](../datasources/graphite.md)
-- [InfluxDB](../datasources/influxdb.md)
-- [OpenTSDB](../datasources/opentsdb.md)
+- [Graphite]({{< relref "datasources/graphite.md" >}})
+- [InfluxDB]({{< relref "datasources/influxdb.md" >}})
+- [OpenTSDB]({{< relref "datasources/opentsdb.md" >}})
+- [Prometheus]({{< relref "datasources/prometheus.md" >}})
## Installing from binary tar file
-Download [the latest `.tar.gz` file](http://grafana.org/download/builds) and
+Download [the latest `.tar.gz` file](http://grafana.org/download) and
extract it. This will extract into a folder named after the version you
downloaded. This folder contains all files required to run Grafana. There are
no init scripts or install scripts in this package.
@@ -125,5 +142,3 @@ To configure Grafana add a configuration file named `custom.ini` to the
Start Grafana by executing `./bin/grafana-server web`. The `grafana-server`
binary needs the working directory to be the root install directory (where the
binary and the `public` folder is located).
-
-
diff --git a/docs/sources/installation/docker.md b/docs/sources/installation/docker.md
index 18dcf964450..85349dc58fb 100644
--- a/docs/sources/installation/docker.md
+++ b/docs/sources/installation/docker.md
@@ -1,17 +1,18 @@
----
-page_title: Installing using Docker
-page_description: Grafana Installation guide using Docker container
-page_keywords: grafana, installation, docker, container, guide
----
++++
+title = "Installing using Docker"
+description = "Installing Grafana using Docker guide"
+keywords = ["grafana", "configuration", "documentation", "docker"]
+type = "docs"
+[menu.docs]
+name = "Installing using Docker"
+identifier = "docker"
+parent = "installation"
+weight = 4
++++
# Installing using Docker
-> **2.0.2 -> 2.1.0 Upgrade NOTICE!**
-> The data and log paths were not correct in the previous image. The grafana database was placed by default in /usr/share/grafana/data instead of the correct path /var/lib/grafana. This means it was not in a dir that was marked as a volume. So if you remove the container it will remove the grafana database. So before updating make sure you copy the /usr/share/grafana/data path from inside the container to the host.
-
-## Install from official docker image
-
-Grafana has an official Docker container.
+Grafana is very easy to install and run using the offical docker container.
$ docker run -i -p 3000:3000 grafana/grafana
@@ -28,7 +29,7 @@ container:
$ docker run -d -p 3000:3000 \
-v /var/lib/grafana:/var/lib/grafana \
-e "GF_SECURITY_ADMIN_PASSWORD=secret" \
- grafana/grafana:develop
+ grafana/grafana
In the above example I map the data folder and sets a configuration option via
an `ENV` instruction.
@@ -36,6 +37,6 @@ an `ENV` instruction.
## Configuration
The back-end web server has a number of configuration options. Go the
-[Configuration](../installation/configuration.md) page for details on all
+[Configuration]({{< relref "configuration.md" >}}) page for details on all
those options.
diff --git a/docs/sources/installation/index.md b/docs/sources/installation/index.md
index 395c101a8e8..dc7fd9597a2 100644
--- a/docs/sources/installation/index.md
+++ b/docs/sources/installation/index.md
@@ -1,37 +1,22 @@
----
-page_title: Grafana Installation
-page_description: Install guide for Grafana.
-page_keywords: grafana, installation, documentation
----
++++
+title = "Installation"
+description = "Install guide for Grafana"
+keywords = ["grafana", "installation", "documentation"]
+type = "docs"
+aliases = ["installation/installation/"]
+[menu.docs]
+name = "Installation"
+identifier = "installation"
++++
-# Installation
+## Installing Grafana
-Grafana is easily installed via a Debian/Ubuntu package (.deb), via
-Redhat/Centos package (.rpm) or manually via a tarball that contains all
-required files and binaries. If you can't find a package or binary for
-your platform, you might be able to build one yourself. Read the [build
-from source](../project/building_from_source) instructions for more
-information.
-
-## Platforms
-- [Installing on Debian / Ubuntu](debian.md)
-- [Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)](rpm.md)
-- [Installing on Mac OS X](mac.md)
-- [Installing on Windows](windows.md)
-- [Installing on Docker](docker.md)
-- [Installing using Provisioning (Chef, Puppet, Salt, Ansible, etc)](provisioning.md)
-- [Nightly Builds](http://grafana.org/download/builds.html)
-
-## Configuration
-
-The back-end web server has a number of configuration options. Go the
-[Configuration](/installation/configuration) page for details on all
-those options.
-
-## Adding data sources
-
-- [Graphite](../datasources/graphite.md)
-- [InfluxDB](../datasources/influxdb.md)
-- [OpenTSDB](../datasources/opentsdb.md)
+- [Installing on Debian / Ubuntu](debian)
+- [Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)](rpm)
+- [Installing on Mac OS X](mac)
+- [Installing on Windows](windows)
+- [Installing on Docker](docker)
+- [Installing using Provisioning (Chef, Puppet, Salt, Ansible, etc)](provisioning)
+- [Nightly Builds](http://grafana.org/builds)
diff --git a/docs/sources/installation/ldap.md b/docs/sources/installation/ldap.md
index a5311fb4fa5..d8538182b68 100644
--- a/docs/sources/installation/ldap.md
+++ b/docs/sources/installation/ldap.md
@@ -1,17 +1,23 @@
----
-page_title: LDAP Integration
-page_description: LDAP Integration guide for Grafana.
-page_keywords: grafana, ldap, configuration, documentation, integration
----
++++
+title = "LDAP Authentication"
+description = "Grafana LDAP Authentication Guide "
+keywords = ["grafana", "configuration", "documentation", "ldap"]
+type = "docs"
+[menu.docs]
+name = "LDAP Authentication"
+identifier = "ldap"
+parent = "admin"
+weight = 2
++++
-# LDAP Integration
+# LDAP Authentication
Grafana (2.1 and newer) ships with a strong LDAP integration feature. The LDAP integration in Grafana allows your
Grafana users to login with their LDAP credentials. You can also specify mappings between LDAP
group memberships and Grafana Organization user roles.
## Configuration
-You turn on LDAP in the [main config file](../configuration/#authldap) as well as specify the path to the LDAP
+You turn on LDAP in the [main config file]({{< relref "configuration.md#auth-ldap" >}}) as well as specify the path to the LDAP
specific configuration file (default: `/etc/grafana/ldap.toml`).
### Example config
@@ -27,6 +33,8 @@ host = "127.0.0.1"
port = 389
# Set to true if ldap server supports TLS
use_ssl = false
+# Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
+start_tls = false
# set to true if you want to skip ssl cert validation
ssl_skip_verify = false
# set to the path to your root CA certificate or leave unset to use system defaults
@@ -35,6 +43,7 @@ ssl_skip_verify = false
# Search user bind dn
bind_dn = "cn=admin,dc=grafana,dc=org"
# Search user bind password
+# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
bind_password = 'grafana'
# User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
diff --git a/docs/sources/installation/mac.md b/docs/sources/installation/mac.md
index 7246033b640..912a16c66e8 100644
--- a/docs/sources/installation/mac.md
+++ b/docs/sources/installation/mac.md
@@ -1,13 +1,45 @@
----
-page_title: Installing on Mac OS X
-page_description: Grafana Installation guide for Mac OS X
-page_keywords: grafana, installation, mac, osx, guide
----
++++
+title = "Installing on Mac"
+description = "Installing Grafana on Mac"
+keywords = ["grafana", "configuration", "documentation", "mac", "homebrew", "osx"]
+type = "docs"
+[menu.docs]
+parent = "installation"
+weight = 4
++++
+
# Installing on Mac
-There is currently no binary build for Mac, but Grafana will happily build on Mac. Read the [build from
-source](/project/building_from_source) page for instructions on how to
-build it yourself.
+Installation can be done using [homebrew](http://brew.sh/)
+
+Install latest stable:
+
+```
+brew update
+brew install grafana
+```
+
+To start grafana look at the command printed after the homebrew install completes.
+
+To upgrade use the reinstall command
+
+```
+brew update
+brew reinstall grafana
+```
+
+-------------
+
+You can also install the latest unstable grafana from git:
+```
+brew install --HEAD grafana/grafana/grafana
+```
+
+To upgrade grafana if you've installed from HEAD:
+
+```
+brew reinstall --HEAD grafana/grafana/grafana
+```
diff --git a/docs/sources/installation/migrating_to2.md b/docs/sources/installation/migrating_to2.md
index 32e9c3371f3..e7e2e96b6ad 100644
--- a/docs/sources/installation/migrating_to2.md
+++ b/docs/sources/installation/migrating_to2.md
@@ -1,8 +1,17 @@
----
-page_title: Migrating from v1.x to 2.x
-page_description: Migration guide for Grafana v1.x to v2.x
-page_keywords: grafana, installation, migration, documentation
----
++++
+title = "Migrating from older versions"
+description = "Upgrading & Migrating Grafana from older versions"
+keywords = ["grafana", "configuration", "documentation", "migration"]
+type = "docs"
+[menu.docs]
+parent = "installation"
+weight = 10
++++
+
+# Migrating from older versions
+
+Normally new versions of Grafana are backward compatible. Any changes to database or dashboard schema will
+be automatically migrated when Grafana-server start up without any user action required.
# Migrating from v1.x to v2.x
@@ -20,8 +29,7 @@ migrate to Grafana 2.0.
## Adding Data sources
The `config.js` file has been deprecated. Data sources are now managed via
-the UI or [HTTP API](../http_api/overview.md). Manage your
-organizations data sources by clicking on the `Data Sources` menu on the
+the UI or HTTP API. Manage your organizations data sources by clicking on the `Data Sources` menu on the
side menu (which can be toggled via the Grafana icon in the upper left
of your browser).
@@ -53,7 +61,7 @@ sure your Elasticsearch data source is added. Specify the Elasticsearch
index name where your existing Grafana v1.x dashboards are stored
(the default is `grafana-dash`).
-
+
### Importing dashboards from InfluxDB
@@ -66,7 +74,7 @@ your Grafana v1.x dashboards are stored, the default is `grafana`.
Go to the `Dashboards` view and click on the dashboards search drop
down. Click the `Import` button at the bottom of the search drop down.
-
+
### Import view
@@ -74,7 +82,7 @@ In the Import view you find the section `Migrate dashboards`. Pick the
data source you added (from Elasticsearch or InfluxDB), and click the
`Import` button.
-
+
Your dashboards should be automatically imported into the Grafana 2.0
back-end.
diff --git a/docs/sources/installation/performance.md b/docs/sources/installation/performance.md
deleted file mode 100644
index f09686687ca..00000000000
--- a/docs/sources/installation/performance.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-page_title: Performance Tips
-page_description: Grafana performance tips
-page_keywords: grafana, performance, documentation
----
-
-# Performance tips
-
-## Graphite
-
-Graphite 0.9.14 adds a much needed feature to the JSON rendering API
-that is very important for Grafana. If you are experiencing slow load &
-rendering times for large time ranges then it is most likely caused by
-running Graphite 0.9.12 or lower.
-
-The latest version of Graphite adds a `maxDataPoints` parameter to the
-JSON render API. Without this feature Graphite can return hundreds of
-thousands of data points per graph, which can hang your browser. Be sure
-to upgrade to
-[0.9.14](http://graphite.readthedocs.org/en/latest/releases/0_9_14.html).
-
-
diff --git a/docs/sources/installation/provisioning.md b/docs/sources/installation/provisioning.md
index 2ec79d54741..513b469d4f9 100644
--- a/docs/sources/installation/provisioning.md
+++ b/docs/sources/installation/provisioning.md
@@ -1,20 +1,23 @@
----
-page_title: Provisioning
-page_description: Grafana provisioning
-page_keywords: grafana, provisioning, documentation
----
++++
+title = "Installing via provisioning tools"
+description = "Guide to install Grafana via provisioning tools like puppet & chef"
+keywords = ["grafana", "provisioning", "documentation", "puppet", "chef", "ansible"]
+type = "docs"
+[menu.docs]
+parent = "installation"
+weight = 8
++++
-# Provisioning
+
+# Installing via provisioning tools
Here are links for how to install Grafana (and some include Graphite or
InfluxDB as well) via a provisioning system. These are not maintained by
any core Grafana team member and might be out of date.
-Some of the linked cookbooks/manifests/etc. will install and configure Grafana 2.x, while some will only install the older Grafana 1.x versions. They've been broken apart below for your convenience.
-
### Puppet
-* [forge.puppetlabs.com/bfraser/grafana](https://forge.puppetlabs.com/bfraser/grafana) **Note:** The current version works with Grafana 2.x. To install older versions of Grafana use the 1.x series of releases.
+* [forge.puppetlabs.com/bfraser/grafana](https://forge.puppetlabs.com/bfraser/grafana)
### Ansible
@@ -25,6 +28,6 @@ Some of the linked cookbooks/manifests/etc. will install and configure Grafana 2
### Chef
-* [github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana) **Note:** The current version works with Grafana 2.x. To install older versions of Grafana use the 1.x series of releases.
+* [github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana)
* [github.com/Nordstrom/grafana2-cookbook](https://github.com/Nordstrom/grafana2-cookbook)
diff --git a/docs/sources/installation/rpm.md b/docs/sources/installation/rpm.md
index ec4f648e44b..ac182585a5d 100644
--- a/docs/sources/installation/rpm.md
+++ b/docs/sources/installation/rpm.md
@@ -1,33 +1,54 @@
----
-page_title: Installing on RPM-based Linux
-page_description: Grafana Installation guide for Centos, Fedora, OpenSuse, Redhat.
-page_keywords: grafana, installation, centos, fedora, opensuse, redhat, guide
----
++++
+title = "Installing on RPM-based Linux"
+description = "Grafana Installation guide for Centos, Fedora, OpenSuse, Redhat."
+keywords = ["grafana", "installation", "documentation", "centos", "fedora", "opensuse", "redhat"]
+aliases = ["installation/installation/rpm"]
+type = "docs"
+[menu.docs]
+name = "Installing on Centos / Redhat"
+identifier = "rpm"
+parent = "installation"
+weight = 2
++++
# Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)
-## Download
-
Description | Download
------------ | -------------
-.RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [grafana-2.6.0-1.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm)
+Stable for CentOS / Fedora / OpenSuse / Redhat Linux | [4.0.2 (x86-64 rpm)](https://grafanarel.s3.amazonaws.com/builds/grafana-4.0.2-1481203731.x86_64.rpm)
+Latest beta for CentOS / Fedora / OpenSuse / Redhat Linux | [4.1.0-beta1 (x86-64 rpm)](https://grafanarel.s3.amazonaws.com/builds/grafana-4.1.0-1482230757beta1.x86_64.rpm)
-## Install from package file
+## Install Stable
You can install Grafana using Yum directly.
- $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm
+ $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-4.0.2-1481203731.x86_64.rpm
Or install manually using `rpm`.
#### On CentOS / Fedora / Redhat:
$ sudo yum install initscripts fontconfig
- $ sudo rpm -Uvh grafana-2.6.0-1.x86_64.rpm
+ $ sudo rpm -Uvh grafana-4.0.2-1481203731.x86_64.rpm
#### On OpenSuse:
- $ sudo rpm -i --nodeps grafana-2.6.0-1.x86_64.rpm
+ $ sudo rpm -i --nodeps grafana-4.0.2-1481203731.x86_64.rpm
+
+## Or Install Latest Beta
+
+ $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-4.1.0-1482230757beta1.x86_64.rpm
+
+Or install manually using `rpm`.
+
+#### On CentOS / Fedora / Redhat:
+
+ $ sudo yum install initscripts fontconfig
+ $ sudo rpm -Uvh grafana-4.1.0-1482230757beta1.x86_64.rpm
+
+#### On OpenSuse:
+
+ $ sudo rpm -i --nodeps grafana-4.1.0-1482230757beta1.x86_64.rpm
## Install via YUM Repository
@@ -106,18 +127,46 @@ By default Grafana will log to `/var/log/grafana`
The default configuration specifies a sqlite3 database located at
`/var/lib/grafana/grafana.db`. Please backup this database before
-upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page](configuration.md#database).
+upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page]({{< relref "configuration.md#database" >}}).
## Configuration
The configuration file is located at `/etc/grafana/grafana.ini`. Go the
-[Configuration](/installation/configuration) page for details on all
+[Configuration]({{< relref "configuration.md" >}}) page for details on all
those options.
### Adding data sources
-- [Graphite](../datasources/graphite.md)
-- [InfluxDB](../datasources/influxdb.md)
-- [OpenTSDB](../datasources/opentsdb.md)
+- [Graphite]({{< relref "datasources/graphite.md" >}})
+- [InfluxDB]({{< relref "datasources/influxdb.md" >}})
+- [OpenTSDB]({{< relref "datasources/opentsdb.md" >}})
+- [Prometheus]({{< relref "datasources/prometheus.md" >}})
+### Server side image rendering
+
+Server side image (png) rendering is a feature that is optional but very useful when sharing visualizations,
+for example in alert notifications.
+
+If the image is missing text make sure you have font packages installed.
+
+```
+yum install fontconfig
+yum install freetype*
+yum install urw-fonts
+```
+
+## Installing from binary tar file
+
+Download [the latest `.tar.gz` file](http://grafana.org/download) and
+extract it. This will extract into a folder named after the version you
+downloaded. This folder contains all files required to run Grafana. There are
+no init scripts or install scripts in this package.
+
+To configure Grafana add a configuration file named `custom.ini` to the
+`conf` folder and override any of the settings defined in
+`conf/defaults.ini`.
+
+Start Grafana by executing `./bin/grafana-server web`. The `grafana-server`
+binary needs the working directory to be the root install directory (where the
+binary and the `public` folder is located).
diff --git a/docs/sources/installation/troubleshooting.md b/docs/sources/installation/troubleshooting.md
index 7a6865b9da1..6da8c4f64f8 100644
--- a/docs/sources/installation/troubleshooting.md
+++ b/docs/sources/installation/troubleshooting.md
@@ -1,6 +1,13 @@
-page_title: Troubleshooting
-page_description: Troubleshooting
-page_keywords: grafana, support, documentation
++++
+title = "Troubleshooting"
+description = "Guide to troubleshooting Grafana problems"
+keywords = ["grafana", "troubleshooting", "documentation", "guide"]
+type = "docs"
+[menu.docs]
+parent = "admin"
+weight = 8
++++
+
# Troubleshooting
@@ -16,7 +23,7 @@ with Grafana being unable to query Graphite, OpenTSDB or InfluxDB. You
might not be able to get metric name completion or the graph might show
an error like this:
-
+
For some types of errors, the `View details` link will show you error
details. For many types of HTTP connection errors, however, there is very
@@ -24,7 +31,7 @@ little information. The best way to troubleshoot these issues is use
the [Chrome developer tools](https://developer.chrome.com/devtools/index).
By pressing `F12` you can bring up the chrome dev tools.
-
+
There are two important tabs in the Chrome developer tools: `Network`
and `Console`. The `Console` tab will show you Javascript errors and
@@ -42,32 +49,10 @@ chrome console error, request and response information from the
### Inspecting Grafana metric requests
-
+
After opening the Chrome developer tools for the first time the
`Network` tab is empty. You will need to refresh the page to get
requests to show. For some type of errors, especially CORS-related,
there might not be a response at all.
-## Graphite connection issues
-
-If your Graphite web server is on another domain or IP address from your
-Grafana web server you will need to [setup
-CORS](../install/#graphite-server-config) (Cross Origin Resource
-Sharing).
-
-You know if you are having CORS-related issues if you get an error like
-this in the Chrome developer tools:
-
-
-
-If the request failed on method `OPTIONS` then you need to review your
-Graphite web server configuration.
-
-## Only blank white page
-
-When you load Grafana and all you get is a blank white page then you
-probably have a Javascript syntax error in `config.js`. In the Chrome
-developer tools console you will quickly identify the line of the syntax
-error.
-
diff --git a/docs/sources/installation/windows.md b/docs/sources/installation/windows.md
index 1bc2b5a2b92..639fb12155f 100644
--- a/docs/sources/installation/windows.md
+++ b/docs/sources/installation/windows.md
@@ -1,16 +1,20 @@
----
-page_title: Installing on Windows
-page_description: Grafana Installation guide for Windows
-page_keywords: grafana, installation, windows guide
----
++++
+title = "Installing on Windows"
+description = "Installing Grafana on Windows"
+keywords = ["grafana", "configuration", "documentation", "windows"]
+type = "docs"
+[menu.docs]
+parent = "installation"
+weight = 3
++++
+
# Installing on Windows
-## Download
-
Description | Download
------------ | -------------
-Zip package for Windows | [grafana.2.5.0.windows-x64.zip](https://grafanarel.s3.amazonaws.com/winbuilds/dist/grafana-2.5.0.windows-x64.zip)
+Latest stable package for Windows | [grafana.4.0.2.windows-x64.zip](https://grafanarel.s3.amazonaws.com/builds/grafana-4.0.2.windows-x64.zip)
+Latest beta package for Windows | [grafana.4.1.0-beta1.windows-x64.zip](https://grafanarel.s3.amazonaws.com/builds/grafana-4.1.0-beta1.windows-x64.zip)
## Configure
@@ -29,7 +33,7 @@ command line. If you want to run Grafana as windows service, download
[NSSM](https://nssm.cc/). It is very easy add Grafana as a Windows
service using that tool.
-Read more about the [configuration options](/installation/configuration).
+Read more about the [configuration options]({{< relref "configuration.md" >}}).
## Building on Windows
diff --git a/docs/sources/plugins/datasources.md b/docs/sources/plugins/datasources.md
index 3732948d527..9f04d11cdfc 100644
--- a/docs/sources/plugins/datasources.md
+++ b/docs/sources/plugins/datasources.md
@@ -1,9 +1,3 @@
----
-page_title: Plugin datasources
-page_description: Datasource plugins for Grafana
-page_keywords: grafana, plugins, documentation
----
-
# Datasources
@@ -43,7 +37,7 @@ The Datasource should contain the following functions.
```
query(options) //used by panels to get data
testDatasource() //used by datasource configuration page to make sure the connection is working
-annotationsQuery(options) // used dashboards to get annotations
+annotationsQuery(options) // used by dashboards to get annotations
metricFindQuery(options) // used by query editor to get metric suggestions.
```
diff --git a/docs/sources/plugins/development.md b/docs/sources/plugins/development.md
index e8b5c620732..9b2a3fb8668 100644
--- a/docs/sources/plugins/development.md
+++ b/docs/sources/plugins/development.md
@@ -1,16 +1,20 @@
----
-page_title: Plugin development guide
-page_description: Plugin development for Grafana
-page_keywords: grafana, plugins, documentation, development
----
++++
+title = "Developer Guide"
+type = "docs"
+aliases = ["/plugins/datasources/", "/plugins/apps/", "/plugins/panels/"]
+[menu.docs]
+name = "Developer Guide"
+parent = "plugins"
+weight = 5
++++
-# Plugin development
+# Developer Guide
From grafana 3.0 it's very easy to develop your own plugins and share them with other grafana users.
## Short version
-1. [Setup grafana](https://github.com/grafana/grafana/blob/master/DEVELOPMENT.md)
+1. [Setup grafana](http://docs.grafana.org/project/building_from_source/)
2. Clone an example plugin into ```/var/lib/grafana/plugins``` or `data/plugins` (relative to grafana git repo if your running development version from source dir)
3. Code away!
@@ -32,9 +36,10 @@ will be expected to export different things. You can find what's expected for [d
and [apps](./apps.md) plugins in the documentation.
## Start developing your plugin
-There are two ways that you can start developing a Grafana plugin.
-1. Setup a Grafana development environment. [(described here)](https://github.com/grafana/grafana/blob/master/DEVELOPMENT.md) and place your plugin in the ```data/plugins``` folder.
+There are three ways that you can start developing a Grafana plugin.
+
+1. Setup a Grafana development environment. [(described here)](http://docs.grafana.org/project/building_from_source/) and place your plugin in the ```data/plugins``` folder.
2. Install Grafana and place your plugin in the plugins directory which is set in your [config file](../installation/configuration.md). By default this is `/var/lib/grafana/plugins` on Linux systems.
3. Place your plugin directory anywhere you like and specify it grafana.ini.
@@ -45,8 +50,11 @@ the folder contains a subfolder named dist. In that case grafana will mount the
This makes it possible to have both built and src content in the same plugin git repo.
## Examples
+
We currently have three different examples that you can fork/download to get started developing your grafana plugin.
- [simple-json-datasource](https://github.com/grafana/simple-json-datasource) (small datasource plugin for querying json data from backends)
- - [piechart-panel](https://github.com/grafana/piechart-panel)
- [example-app](https://github.com/grafana/example-app)
+ - [clock-panel](https://github.com/grafana/clock-panel)
+ - [singlestat-panel](https://github.com/grafana/grafana/blob/master/public/app/plugins/panel/singlestat/module.ts)
+ - [piechart-panel](https://github.com/grafana/piechart-panel)
diff --git a/docs/sources/plugins/index.md b/docs/sources/plugins/index.md
index 156262a4ec1..217a01f9160 100644
--- a/docs/sources/plugins/index.md
+++ b/docs/sources/plugins/index.md
@@ -1,21 +1,24 @@
----
-page_title: Plugin overview
-page_description: Plugins for Grafana
-page_keywords: grafana, plugins, documentation
----
++++
+title = "Plugins"
+[menu.docs]
+name = "Plugins"
+identifier = "plugins"
+weight = 8
++++
+
# Plugins
From Grafana 3.0 not only datasource plugins are supported but also panel plugins and apps.
Having panels as plugins make it easy to create and add any kind of panel, to show your data
or improve your favorite dashboards. Apps is something new in Grafana that enables
-bundling of datasources, panels, dashboards and Grafana pages into a cohesive experiance.
+bundling of datasources, panels, dashboards and Grafana pages into a cohesive experience.
Grafana already have a strong community of contributors and plugin developers.
By making it easier to develop and install plugins we hope that the community
can grow even stronger and develop new plugins that we would never think about.
-You can discover available plugins on [Grafana.net](http://grafana.net)
+You can discover available plugins on [Grafana.net](https://grafana.net)
diff --git a/docs/sources/plugins/installation.md b/docs/sources/plugins/installation.md
index 0dada8b69a7..5880d18c0e3 100644
--- a/docs/sources/plugins/installation.md
+++ b/docs/sources/plugins/installation.md
@@ -1,15 +1,31 @@
----
-page_title: Plugin installation
-page_description: Plugin installation for Grafana
-page_keywords: grafana, plugins, documentation
----
++++
+title = "Installing Plugins"
+type = "docs"
+[menu.docs]
+parent = "plugins"
+weight = 1
++++
+
+# Grafana Plugins
+
+From Grafana 3.0+ not only are datasource plugins supported but also panel plugins and apps.
+Having panels as plugins make it easy to create and add any kind of panel, to show your data
+or improve your favorite dashboards. Apps is something new in Grafana that enables
+bundling of datasources, panels, dashboards and Grafana pages into a cohesive experience.
+
+Grafana already have a strong community of contributors and plugin developers.
+By making it easier to develop and install plugins we hope that the community
+can grow even stronger and develop new plugins that we would never think about.
+
+To discover plugins checkout the official [Plugin Repository](https://grafana.net/plugins).
# Installing plugins
The easiest way to install plugins is by using the CLI tool grafana-cli which is bundled with grafana. Before any modification take place after modifying plugins, grafana-server needs to be restarted.
### Grafana plugin directory
-On Linux systems the grafana-cli will assume that the grafana plugin directory is `/var/lib/grafana/plugins`. It's possible to override the directory which grafana-cli will operate on by specifying the --path flag. On Windows systems this parameter have to be specified for every call.
+
+On Linux systems the grafana-cli will assume that the grafana plugin directory is `/var/lib/grafana/plugins`. It's possible to override the directory which grafana-cli will operate on by specifying the --pluginsDir flag. On Windows systems this parameter have to be specified for every call.
### Grafana-cli commands
@@ -18,24 +34,29 @@ List available plugins
grafana-cli plugins list-remote
```
-Install a plugin type
+Install the latest version of a plugin
```
grafana-cli plugins install
```
+Install a specific version of a plugin
+```
+grafana-cli plugins install
+```
+
List installed plugins
```
grafana-cli plugins ls
```
-Upgrade all installed plugins
+Update all installed plugins
```
-grafana-cli plugins upgrade-all
+grafana-cli plugins update-all
```
-Upgrade one plugin
+Update one plugin
```
-grafana-cli plugins upgrade
+grafana-cli plugins update
```
Remove one plugin
diff --git a/docs/sources/plugins/panels.md b/docs/sources/plugins/panels.md
index 7182c3182a3..168d1320ca5 100644
--- a/docs/sources/plugins/panels.md
+++ b/docs/sources/plugins/panels.md
@@ -5,9 +5,18 @@ page_keywords: grafana, plugins, documentation
---
++++
+title = "Installing Plugins"
+type = "docs"
+[menu.docs]
+parent = "plugins"
+weight = 1
++++
+
+
# Panels
-Panels are the main bulding block of dashboards.
+Panels are the main building blocks of dashboards.
## Panel development
diff --git a/docs/sources/project/building_from_source.md b/docs/sources/project/building_from_source.md
index e4f35f0a49b..11ca2d5b719 100644
--- a/docs/sources/project/building_from_source.md
+++ b/docs/sources/project/building_from_source.md
@@ -1,8 +1,10 @@
----
-page_title: Building from source
-page_description: Building from source Grafana.
-page_keywords: grafana, build, contribute, documentation
----
++++
+title = "Building from source"
+type = "docs"
+[menu.docs]
+parent = "installation"
+weight = 5
++++
# Building Grafana from source
@@ -11,7 +13,7 @@ dev environment. Grafana ships with its own required backend server; also comple
## Dependencies
-- [Go 1.5](https://golang.org/dl/)
+- [Go 1.7.3](https://golang.org/dl/)
- [NodeJS](https://nodejs.org/download/)
## Get Code
@@ -24,9 +26,8 @@ go get github.com/grafana/grafana
## Building the backend
```
cd $GOPATH/src/github.com/grafana/grafana
-go run build.go setup # (only needed once to install godep)
-$GOPATH/bin/godep restore # (will pull down all golang lib dependencies in your current GOPATH)
-go run build.go build # (or 'go build .')
+go run build.go setup
+go run build.go build # (or 'go build ./pkg/cmd/grafana-server')
```
#### Building on Windows
@@ -39,13 +40,14 @@ To build less to css for the frontend you will need a recent version of node (v0
npm (v2.5.0) and grunt (v0.4.5). Run the following:
```
-npm install
+npm install -g yarn
+yarn install
npm install -g grunt-cli
grunt
```
## Recompile backend on source change
-To rebuild on source change (requires that you executed godep restore)
+To rebuild on source change
```
go get github.com/Unknwon/bra
bra run
@@ -63,9 +65,10 @@ If you built it with `go build .`, run `./grafana`
Open grafana in your browser (default [http://localhost:3000](http://localhost:3000)) and login with admin user (default user/pass = admin/admin).
## Developing for Grafana
-To add features, customize your config, etc, you'll need to rebuild on source change (requires that you executed [godep restore](#build-the-backend), as outlined above).
+To add features, customize your config, etc, you'll need to rebuild on source change.
```
go get github.com/Unknwon/bra
+
bra run
```
You'll also need to run `grunt watch` to watch for changes to the front-end.
@@ -89,6 +92,3 @@ Learn more about Grafana config options in the [Configuration section](/installa
## Create a pull requests
Please contribute to the Grafana project and submit a pull request! Build new features, write or update documentation, fix bugs and generally make Grafana even more awesome.
-
-Before or after you create a pull request, sign the [contributor license agreement](/project/cla.html).
-Together we can build amazing software faster.
diff --git a/docs/sources/reference/admin.md b/docs/sources/reference/admin.md
index 266fc998092..df396fed212 100644
--- a/docs/sources/reference/admin.md
+++ b/docs/sources/reference/admin.md
@@ -1,8 +1,13 @@
-----
-page_title: Administration
-page_description: Grafana Administration
-page_keywords: grafana, admin, administration, documentation
----
++++
+title = "Admin Roles"
+description = "Users & Organization permission and administration"
+keywords = ["grafana", "configuration", "documentation", "admin", "users", "permissions"]
+type = "docs"
+[menu.docs]
+name = "Admin Roles"
+parent = "admin"
+weight = 3
++++
# Administration
@@ -22,7 +27,7 @@ modify Organization details and options.
## Grafana Administrators
-
+
As a Grafana Administrator, you have complete access to any Organization or User in that instance of Grafana.
When performing actions as a Grafana admin, the sidebar will change it's appearance as below to indicate you are performing global server administration.
@@ -32,6 +37,6 @@ From the Grafana Server Admin page, you can access the System Info page which su
Organizations in Grafana are best suited for a **multi-tenant deployment**. In a multi-tenant deployment,
Organizations can be used to provide a full Grafana experience to different sets of users from a single Grafana instance,
-at the convenience of the Grafana Administrator.
+at the convenience of the Grafana Administrator.
-In most cases, a Grafana installation will only have **one** Organization. Since dashboards, data sources and other configuration items are not shared between organizations, there's no need to create multiple Organizations if you want all your users to have access to the same set of dashboards and data.
+In most cases, a Grafana installation will only have **one** Organization. Since dashboards, data sources and other configuration items are not shared between organizations, there's no need to create multiple Organizations if you want all your users to have access to the same set of dashboards and data.
diff --git a/docs/sources/reference/annotations.md b/docs/sources/reference/annotations.md
index 51852abcdf2..8f2170ba145 100644
--- a/docs/sources/reference/annotations.md
+++ b/docs/sources/reference/annotations.md
@@ -1,15 +1,19 @@
-----
-page_title: Annotations
-page_description: Annotations user guide
-page_keywords: grafana, annotations, guide, documentation
----
++++
+title = "Annotations"
+keywords = ["grafana", "annotations", "documentation", "guide"]
+type = "docs"
+[menu.docs]
+name = "Annotations"
+parent = "dashboard_features"
+weight = 2
++++
# Annotations
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
you can get title, tags, and text information for the event.
-
+
To add an annotation query click dashboard settings icon in top menu and select `Annotations` from the
dropdown. This will open the `Annotations` edit view. Click the `Add` tab to add a new annotation query.
@@ -24,7 +28,7 @@ Graphite supports two ways to query annotations.
- Graphite events query, use the `Graphite event tags` text input, specify an tag or wildcard (leave empty should also work)
## Elasticsearch annotations
-
+
Grafana can query any Elasticsearch index for annotation events. The index name can be the name of an alias or an index wildcard pattern.
You can leave the search query blank or specify a lucene query.
@@ -35,8 +39,16 @@ as the name for the fields that should be used for the annotation title, tags an
> **Note** The annotation timestamp field in elasticsearch need to be in UTC format.
## InfluxDB Annotations
-
+
For InfluxDB you need to enter a query like in the above screenshot. You need to have the ```where $timeFilter``` part.
If you only select one column you will not need to enter anything in the column mapping fields.
+## Prometheus Annotations
+
+
+
+Prometheus supports two ways to query annotations.
+
+- A regular metric query
+- A Prometheus query for pending and firing alerts (for details see [Inspecting alerts during runtime](https://prometheus.io/docs/alerting/rules/#inspecting-alerts-during-runtime))
diff --git a/docs/sources/reference/dashboard.md b/docs/sources/reference/dashboard.md
index 93adf5cd789..c1c574ce917 100644
--- a/docs/sources/reference/dashboard.md
+++ b/docs/sources/reference/dashboard.md
@@ -1,13 +1,15 @@
-----
-page_title: Dashboard JSON
-page_description: Dashboard JSON Reference
-page_keywords: grafana, dashboard, json, documentation
----
++++
+title = "JSON Model"
+keywords = ["grafana", "dashboard", "documentation", "json", "model"]
+type = "docs"
+[menu.docs]
+name = "JSON Model"
+parent = "dashboard_features"
+weight = 100
++++
# Dashboard JSON
-## Overview
-
A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from rows, panels, template variables, panel queries, etc.
To view the JSON of a dashboard, follow the steps mentioned below:
@@ -26,13 +28,12 @@ When a user creates a new dashboard, a new dashboard JSON object is initialized
{
"id": null,
"title": "New dashboard",
- "originalTitle": "New dashboard",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
- "sharedCrosshair": false,
+ "graphTooltip": 1,
"rows": [],
"time": {
"from": "now-6h",
@@ -59,13 +60,12 @@ Each field in the dashboard JSON is explained below with its usage:
| ---- | ----- |
| **id** | unique dashboard id, an integer |
| **title** | current title of dashboard |
-| **originalTitle** | title of dashboard when saved for the first time |
| **tags** | tags associated with dashboard, an array of strings |
| **style** | theme of dashboard, i.e. `dark` or `light` |
| **timezone** | timezone of dashboard, i.e. `utc` or `browser` |
| **editable** | whether a dashboard is editable or not |
| **hideControls** | whether row controls on the left in green are hidden or not |
-| **sharedCrosshair** | TODO |
+| **graphTooltip** | TODO |
| **rows** | row metadata, see [rows section](/docs/sources/reference/dashboard.md/#rows) for details |
| **time** | time range for dashboard, i.e. last 6 hours, last 7 days, etc |
| **timepicker** | timepicker metadata, see [timepicker section](/docs/sources/reference/dashboard.md/#timepicker) for details |
diff --git a/docs/sources/reference/dashlist.md b/docs/sources/reference/dashlist.md
index ea098541da2..5377c7c1941 100644
--- a/docs/sources/reference/dashlist.md
+++ b/docs/sources/reference/dashlist.md
@@ -1,29 +1,32 @@
-----
-page_title: Dashlist Panel
-page_description: Dashlist Panel Reference
-page_keywords: grafana, dashlist, panel, documentation
----
++++
+title = "Dashboard List"
+keywords = ["grafana", "dashboard list", "documentation", "panel", "dashlist"]
+type = "docs"
+[menu.docs]
+name = "Dashboard list"
+parent = "panels"
+weight = 4
++++
-# Dashlist Panel
-## Overview
+# Dashboard List Panel
-The dashboard list panel allows you to display dynamic links to other dashboards. The list can be configured to use starred dashboards, a search query and/or dashboard tags.
+The dashboard list panel allows you to display dynamic links to other dashboards. The list can be configured to use starred dashboards, a search query and/or dashboard tags.
-
+
> On each dashboard load, the dashlist panel will re-query the dashboard list, always providing the most up to date results.
## Mode: Starred Dashboards
-The `starred` dashboard selection displays starred dashboards, up to the number specified in the `Limit Number to` field, in alphabetical order. On dashboard load, the dashlist panel will re-query the favorites to appear in dashboard list panel, always providing the most up to date results.
+The `starred` dashboard selection displays starred dashboards, up to the number specified in the `Limit Number to` field, in alphabetical order. On dashboard load, the dashlist panel will re-query the favorites to appear in dashboard list panel, always providing the most up to date results.
-
+
## Mode: Search Dashboards
-The panel may be configured to search by either string query or tag(s). On dashboard load, the dashlist panel will re-query the dashboard list, always providing the most up to date results.
+The panel may be configured to search by either string query or tag(s). On dashboard load, the dashlist panel will re-query the dashboard list, always providing the most up to date results.
To configure dashboard list in this manner, select `search` from the Mode select box. When selected, the Search Options section will appear.
@@ -38,14 +41,14 @@ Limit number to | Specify the maximum number of dashboards
### Search by string
-To search by a string, enter a search query in the `Search Options: Query` field. Queries are case-insensitive, and partial values are accepted.
-
+To search by a string, enter a search query in the `Search Options: Query` field. Queries are case-insensitive, and partial values are accepted.
+
### Search by tag
-To search by one or more tags, enter your selection in the `Search Options: Tags:` field. Note that existing tags will not appear as you type, and *are* case sensitive. To see a list of existing tags, you can always return to the dashboard, open the Dashboard Picker at the top and click `tags` link in the search bar.
-
+To search by one or more tags, enter your selection in the `Search Options: Tags:` field. Note that existing tags will not appear as you type, and *are* case sensitive. To see a list of existing tags, you can always return to the dashboard, open the Dashboard Picker at the top and click `tags` link in the search bar.
+
-> When multiple tags and strings appear, the dashboard list will display those matching ALL conditions.
+> When multiple tags and strings appear, the dashboard list will display those matching ALL conditions.
diff --git a/docs/sources/reference/export_import.md b/docs/sources/reference/export_import.md
index e83c68401d4..bc05795c030 100644
--- a/docs/sources/reference/export_import.md
+++ b/docs/sources/reference/export_import.md
@@ -1,85 +1,109 @@
----
-page_title: Export & Import Guide
-page_description: Export & Import Guide for Grafana
-page_keywords: grafana, export, import, documentation
----
++++
+title = "Export & Import"
+keywords = ["grafana", "dashboard", "documentation", "export", "import"]
+type = "docs"
+[menu.docs]
+parent = "dashboard_features"
+weight = 8
++++
# Export and Import
+Grafana Dashboards can easily be exported and imported, either from the UI or from the HTTP API.
+
## Exporting a dashboard
-Dashboards are exported in Grafana JSON format, and contain everything you need (layout, variables, styles, data sources, queries, etc)to import the dashboard at a later time.
+Dashboards are exported in Grafana JSON format, and contain everything you need (layout, variables, styles, data sources, queries, etc)to import the dashboard at a later time.
-#### Export to file
+The export feature is accessed from the share menu.
-To export a dashboard, locate the settings menu within the desired dashboard and click the gear icon. The export option will always be available, and will open a browser save-as dialog window.
+
-
+### Making a dashboard portable
-#### Copy JSON
+If you want to export a dashboard for others to use then it could be a good idea to
+add template variables for things like a metric prefix (use constant variable) and server name.
-The raw JSON may be accessed directly from within the interface and copy/pasted into an editor of your choice to be saved later. To view this JSON, locate the settings menu within the desired dashboard and click the gear icon. The View JSON option will always be available, and will open the raw JSON in a text area. To copy the entire JSON file, click into the text area, the select all `CTRL`+`A` (PC, Linux) or `⌘`+`A` (Mac).
-
-
+A template variable of the type `Constant` will automatically be hidden in
+the dashboard, and will also be added as an required input when the dashboard is imported.
## Importing a dashboard
-Grafana 2.0 now has integrated dashboard storage engine that can be configured to use an internal sqlite3 database, MySQL, or Postgres. This eliminates the need to use Elasticsearch for dashboard storage for Graphite users. Grafana 2.0 does not support storing dashboards in InfluxDB.
+To import a dashboard open dashboard search and then hit the import button.
-The import view can be found at the Dashboard Picker dropdown, next to the New Dashboard and Playlist buttons.
+
-
+From here you can upload a dashboard json file, paste a [Grafana.net](https://grafana.net) dashboard
+url or paste dashboard json text directly into the text area.
+
-#### Import from a file
+In step 2 of the import process Grafana will let you change the name of the dashboard, pick what
+data source you want the dashboard to use and specify any metric prefixes (if the dashboard use any).
-To import a dashboard through a local JSON file, click the 'Choose file' button in the Import from File section. Note that JSON is not linted or validated prior during upload, so we recommend validating locally if you're editing. In a pinch, you can use http://jsonlint.com/, and if you are editing dashboard JSON frequently, there are linter plugins for popular text editors.
+## Discover dashboards on Grafana.net
+Find dashboards for common server applications at [Grafana.net/dashboards](https://grafana.net/dashboards).
-#### Importing dashboards from Elasticsearch
+
-Start by going to the `Data Sources` view (via the side menu), and make sure your Elasticsearch data source is added. Specify the Elasticsearch index name where your existing Grafana v1.x dashboards are stored (the default is `grafana-dash`).
+## Import & Sharing with Grafana 2.x or 3.0
-
+Dashboards on Grafana.net use a new feature in Grafana 3.1 that allows the import process
+to update each panel so that they are using a data source of your choosing. If you are running a
+Grafana version older than 3.1 then you might need to do some manual steps either
+before or after import in order for the dashboard to work properly.
-#### Importing dashboards from InfluxDB
+Dashboards exported from Grafana 3.1+ have a new json section `__inputs`
+that define what data sources and metric prefixes the dashboard uses.
-Start by going to the `Data Sources` view (via the side menu), and make sure your InfluxDB data source is added. Specify the database name where your Grafana v1.x dashboards are stored, the default is `grafana`.
+Example:
+```json
+{
+ "__inputs": [
+ {
+ "name": "DS_GRAPHITE",
+ "label": "graphite",
+ "description": "",
+ "type": "datasource",
+ "pluginId": "graphite",
+ "pluginName": "Graphite"
+ },
+ {
+ "name": "VAR_PREFIX",
+ "type": "constant",
+ "label": "prefix",
+ "value": "collectd",
+ "description": ""
+ }
+ ],
+}
-### Import view
+```
-In the Import view you find the section `Migrate dashboards`. Pick the data source you added (from Elasticsearch or InfluxDB), and click the `Import` button.
+These are then referenced in the dashboard panels like this:
-
+```json
+{
+ "rows": [
+ {
+ "panels": [
+ {
+ "type": "graph",
+ "datasource": "${DS_GRAPHITE}",
+ }
+ ]
+ }
+ ]
+}
+```
-Your dashboards should be automatically imported into the Grafana 2.0 back-end. Dashboards will no longer be stored in your previous Elasticsearch or InfluxDB databases.
+These inputs and their usage in data source properties are automatically added during export in Grafana 3.1.
+If you run an older version of Grafana and want to share a dashboard on Grafana.net you need to manually
+add the inputs and templatize the datasource properties like above.
+If you want to import a dashboard from Grafana.net into an older version of Grafana then you can either import
+it as usual and then update the data source option in the metrics tab so that the panel is using the correct
+data source. Another alternative is to open the json file in a a text editor and update the data source properties
+to value that matches a name of your data source.
-## Troubleshooting
-
-### Template variables could not be initialized.
-
-When importing a dashboard, keep an eye out for template variables in your JSON that may not exist in your instance of Grafana. For example,
-
- "templating": {
- "list": [
- {
- "allFormat": "glob",
- "current": {
- "tags": [],
- "text": "google_com + monkey_id_au",
- "value": [
- "google_com",
- "monkey_id_au"
- ]
- },
- "datasource": null,
-
-To resolve this, remove any unnecessary JSON that may be specific to the instance you are exporting from. In this case, we can remove the entire "current" section entirely, and Grafana will populate default.
-
- "templating": {
- "list": [
- {
- "allFormat": "glob",
- "datasource": null,
-
\ No newline at end of file
diff --git a/docs/sources/reference/graph.md b/docs/sources/reference/graph.md
index 9c2ab63fbaa..7fbebcfeb97 100644
--- a/docs/sources/reference/graph.md
+++ b/docs/sources/reference/graph.md
@@ -1,20 +1,24 @@
-----
-page_title: Graph Panel
-page_description: Graph Panel Reference
-page_keywords: grafana, graph, panel, documentation
----
++++
+title = "Graph Panel"
+keywords = ["grafana", "graph panel", "documentation", "guide", "graph"]
+type = "docs"
+[menu.docs]
+name = "Graph"
+parent = "panels"
+weight = 1
++++
# Graph Panel
The main panel in Grafana is simply named Graph. It provides a very rich set of graphing options.
-
+
Clicking the title for a panel exposes a menu. The `edit` option opens additional configuration
options for the panel.
## General
-
+
The general tab allows customization of a panel's appearance and menu options.
@@ -44,15 +48,9 @@ populate the template variable to a desired value from the link.
The metrics tab defines what series data and sources to render. Each datasource provides different
options.
-### Graphite
-
-### InfluxDB
-
-### OpenTSDB
-
## Axes & Grid
-
+
The Axes & Grid tab controls the display of axes, grids and legend.
@@ -67,9 +65,6 @@ The ``Left Y`` and ``Right Y`` can be customized using:
Axes can also be hidden by unchecking the appropriate box from `Show Axis`.
-Thresholds allow you to add arbitrary lines or sections to the graph to make it easier to see when
-the graph crosses a particular threshold.
-
### Legend
The legend hand be hidden by checking the ``Show`` checkbox. If it's shown, it can be
@@ -91,14 +86,20 @@ The legend values are calculated client side by Grafana and depend on what type
aggregation or point consolidation you metric query is using. All the above legend values cannot
be correct at the same time. For example if you plot a rate like requests/second, this is probably
using average as aggregator, then the Total in the legend will not represent the total number of requests.
-It is just the sum of all data data points received by Grafana.
+It is just the sum of all data points received by Grafana.
## Display styles
-
+
Display styles controls properties of the graph.
+### Thresholds
+
+Thresholds allow you to add arbitrary lines or sections to the graph to make it easier to see when
+the graph crosses a particular threshold.
+
+
### Chart Options
- ``Bar`` - Display values as a bar chart
@@ -140,4 +141,4 @@ a thicker line width to make it standout.
## Time range
-
+
diff --git a/docs/sources/reference/keyboard_shortcuts.md b/docs/sources/reference/keyboard_shortcuts.md
index 9947418ae5a..edd2e85f43b 100644
--- a/docs/sources/reference/keyboard_shortcuts.md
+++ b/docs/sources/reference/keyboard_shortcuts.md
@@ -1,7 +1,11 @@
-page_title: Keyboard Shortcuts
-page_description: Keyboard Shortcuts for Grafana
-page_keywords: grafana, export, import, documentation
----
++++
+title = "Keyboard shortcuts"
+keywords = ["grafana", "dashboard", "documentation", "shortcuts"]
+type = "docs"
+[menu.docs]
+parent = "dashboard_features"
+weight = 8
++++
# Keyboard Shortcuts
@@ -11,7 +15,7 @@ No mouse? No problem. Grafana has extensive keyboard shortcuts to allow you to n
Press `Shift`+`?` to open the keyboard shortcut dialog from anywhere within the dashboard views.
-
+
|Shortcut|Action|
diff --git a/docs/sources/reference/playlist.md b/docs/sources/reference/playlist.md
index 5d546b1a3df..359a5d8f3bd 100644
--- a/docs/sources/reference/playlist.md
+++ b/docs/sources/reference/playlist.md
@@ -1,8 +1,12 @@
----
-page_title: Playlist Guide
-page_description: Playlist guide for Grafana
-page_keywords: grafana, playlist, documentation
----
++++
+title = "Playlist"
+keywords = ["grafana", "dashboard", "documentation", "playlist"]
+type = "docs"
+[menu.docs]
+parent = "dashboard_features"
+weight = 4
++++
+
# Playlist
@@ -12,9 +16,9 @@ Since Grafana automatically scales Dashboards to any resolution they're perfect
## Creating a Playlist
-The Playlist feature can be accessed from Grafana's sidemenu. Click the 'Playlist' button from the sidemenu to access the Playlist functionality. When 'Playlist' button is clicked, playlist view will open up showing saved playlists and an option to create new playlists.
+{{< docs-imagebox img="img/docs/v3/playlist.png" max-width="25rem" >}}
-
+The Playlist feature can be accessed from Grafana's sidemenu, in the Dashboard submenu.
Click on "New Playlist" button to create a new playlist. Firstly, name your playlist and configure a time interval for Grafana to wait on a particular Dashboard before advancing to the next one on the Playlist.
diff --git a/docs/sources/reference/scripting.md b/docs/sources/reference/scripting.md
index d896a2c7650..551805b567a 100644
--- a/docs/sources/reference/scripting.md
+++ b/docs/sources/reference/scripting.md
@@ -1,8 +1,12 @@
-----
-page_title: Scripted dashboards
-page_description: Scripted dashboards
-page_keywords: grafana, scripted, guide, documentation
----
++++
+title = "Scripted Dashboards"
+keywords = ["grafana", "dashboard", "documentation", "scripted"]
+type = "docs"
+[menu.docs]
+parent = "dashboard_features"
+weight = 9
++++
+
# Scripted Dashboards
diff --git a/docs/sources/reference/search.md b/docs/sources/reference/search.md
index e2d6647229c..9fc4d47893c 100644
--- a/docs/sources/reference/search.md
+++ b/docs/sources/reference/search.md
@@ -1,54 +1,58 @@
-----
-page_title: Dashboard Search
-page_description: Dashboard Search in Grafana
-page_keywords: grafana, search, guide, documentation
----
++++
+title = "Search"
+keywords = ["grafana", "dashboard", "documentation", "search"]
+type = "docs"
+[menu.docs]
+parent = "dashboard_features"
+weight = 5
++++
+
# Dashboard Search
Dashboards can be searched by the dashboard name, filtered by one (or many) tags or filtered by starred status. The dashboard search is accessed through the dashboard picker, available in the dashboard top nav area.
-
+
1. `Dashboard Picker`: The Dashboard Picker is your primary navigation tool to move between dashboards. It is present on all dashboards, and open the Dashboard Search. The dashboard picker also doubles as the title of the current dashboard.
2. `Search Bar`: The search bar allows you to enter any string and search both database and file based dashboards in real-time.
-3. `Starred`: The starred link allows you to filter the list to display only starred dashboards.
-4. `Tags`: The tags filter allows you to filter the list by dashboard tags.
+3. `Starred`: The starred link allows you to filter the list to display only starred dashboards.
+4. `Tags`: The tags filter allows you to filter the list by dashboard tags.
When using only a keyboard, you can use your keyboard arrow keys to navigate the results, hit enter to open the selected dashboard.
## Find by dashboard name
-
+
-To search and load dashboards click the open folder icon in the header or use the shortcut `CTRL`+`F`. Begin typing any part of the desired dashboard names. Search will return results for for any partial string match in real-time, as you type.
+To search and load dashboards click the open folder icon in the header or use the shortcut `CTRL`+`F`. Begin typing any part of the desired dashboard names. Search will return results for for any partial string match in real-time, as you type.
Dashboard search is:
- Real-time
- *Not* case sensitive
-- Functional across stored *and* file based dashboards.
+- Functional across stored *and* file based dashboards.
## Filter by Tag(s)
Tags are a great way to organize your dashboards, especially as the number of dashboards grow. Tags can be added and managed in the dashboard `Settings`.
-To filter the dashboard list by tag, click on any tag appearing in the right column. The list may be further filtered by clicking on additional tags:
+To filter the dashboard list by tag, click on any tag appearing in the right column. The list may be further filtered by clicking on additional tags:
-
+
Alternately, to see a list of all available tags, click the tags link in the search bar. All tags will be shown, and when a tag is selected, the dashboard search will be instantly filtered:
-
+
When using only a keyboard: `tab` to focus on the *tags* link, `▼` down arrow key to find a tag and select with the `Enter` key.
-**Note**: When multiple tags are selected, Grafana will show dashboards that include **all**.
+**Note**: When multiple tags are selected, Grafana will show dashboards that include **all**.
## Filter by Starred
Starring is a great way to organize and find commonly used dashboards. To show only starred dashboards in the list, click the *starred* link in the search bar:
-
+
-When using only a keyboard: `tab` to focus on the *stars* link, `▼` down arrow key to find a tag and select with the `Enter` key.
\ No newline at end of file
+When using only a keyboard: `tab` to focus on the *stars* link, `▼` down arrow key to find a tag and select with the `Enter` key.
diff --git a/docs/sources/reference/sharing.md b/docs/sources/reference/sharing.md
index c20f4e5f67c..5210b2811df 100644
--- a/docs/sources/reference/sharing.md
+++ b/docs/sources/reference/sharing.md
@@ -1,8 +1,11 @@
-----
-page_title: Sharing
-page_description: Sharing
-page_keywords: grafana, sharing, guide, documentation
----
++++
+title = "Sharing"
+keywords = ["grafana", "dashboard", "documentation", "sharing"]
+type = "docs"
+[menu.docs]
+parent = "dashboard_features"
+weight = 6
++++
# Sharing features
Grafana provides a number of ways to share a dashboard or a specific panel to other users within your
@@ -19,7 +22,7 @@ A dashboard snapshot is an instant way to share an interactive dashboard publicl
(metric, template and annotation) and panel links, leaving only the visible metric data and series names embedded into your dashboard. Dashboard
snapshots can be accessed by anyone who has the link and can reach the URL.
-
+
### Publish snapshots
You can publish snapshots to you local instance or to [snapshot.raintank.io](http://snapshot.raintank.io). The later is a free service
diff --git a/docs/sources/reference/singlestat.md b/docs/sources/reference/singlestat.md
index 954bfeed8b7..ed0a956b7eb 100644
--- a/docs/sources/reference/singlestat.md
+++ b/docs/sources/reference/singlestat.md
@@ -1,12 +1,17 @@
-----
-page_title: Singlestat Panel
-page_description: Singlestat Panel Reference
-page_keywords: grafana, singlestat, panel, documentation
----
++++
+title = "Singlestat Panel"
+keywords = ["grafana", "dashboard", "documentation", "panels", "singlestat"]
+type = "docs"
+[menu.docs]
+name = "Singlestat"
+parent = "panels"
+weight = 2
++++
+
# Singlestat Panel
-
+
The Singlestat Panel allows you to show the one main summary stat of a SINGLE series. It reduces the series into a single number (by looking at the max, min, average, or sum of values in the series). Singlestat also provides thresholds to color the stat or the Panel background. It can also translate the single number into a text value, and show a sparkline summary of the series.
@@ -14,11 +19,19 @@ The Singlestat Panel allows you to show the one main summary stat of a SINGLE se
The singlestat panel has a normal query editor to allow you define your exact metric queries like many other Panels. Through the Options tab, you can access the Singlestat-specific functionality.
-
+
1. `Big Value`: Big Value refers to how we display the main stat for the Singlestat Panel. This is always a single value that is displayed in the Panel in between two strings, `Prefix` and `Suffix`. The single number is calculated by choosing a function (min,max,average,current,total) of your metric query. This functions reduces your query into a single numeric value.
2. `Font Size`: You can use this section to select the font size of the different texts in the Singlestat Panel, i.e. prefix, value and postfix.
-3. `Values`: The Value fields let you set the function (min, max, average, current, total) that your entire query is reduced into a single value with. You can also set the font size of the Value field and font-size (as a %) of the metric query that the Panel is configured with. This reduces the entire query into a single summary value that is displayed.
+3. `Values`: The Value fields let you set the function (min, max, average, current, total, first, delta, range) that your entire query is reduced into a single value with. You can also set the font size of the Value field and font-size (as a %) of the metric query that the Panel is configured with. This reduces the entire query into a single summary value that is displayed.
+ * `min` - The smallest value in the series
+ * `max` - The largest value in the series
+ * `average` - The average of all the non-null values in the series
+ * `current` - The last value in the series. If the series ends on null the previous value will be used.
+ * `total` - The sum of all the non-null values in the series
+ * `first` - The first value in the series
+ * `delta` - The total incremental increase (of a counter) in the series. An attempt is made to account for counter resets, but this will only be accurate for single instance metrics. Used to show total counter increase in time series.
+ * `range` - The difference between 'min' and 'max'. Useful the show the range of change for a gauge.
4. `Postfixes`: The Postfix fields let you define a custom label and font-size (as a %) to appear *after* the value
5. `Units`: Units are appended to the the Singlestat within the panel, and will respect the color and threshold settings for the value.
6. `Decimals`: The Decimal field allows you to override the automatic decimal precision, and set it explicitly.
@@ -27,19 +40,19 @@ The singlestat panel has a normal query editor to allow you define your exact me
The coloring options of the Singlestat Panel config allow you to dynamically change the colors based on the Singlestat value.
-
+
1. `Background`: This checkbox applies the configured thresholds and colors to the entirety of the Singlestat Panel background.
2. `Value`: This checkbox applies the configured thresholds and colors to the summary stat.
3. `Thresholds`: Change the background and value colors dynamically within the panel, depending on the Singlestat value. The threshold field accepts **2 comma-separated** values which represent 3 ranges that correspond to the three colors directly to the right. For example: if the thresholds are 70, 90 then the first color represents < 70, the second color represents between 70 and 90 and the third color represents > 90.
4. `Colors`: Select a color and opacity
-5. `Invert order`: This link toggles the threshold color order.For example: Green, Orange, Red () will become Red, Orange, Green ().
+5. `Invert order`: This link toggles the threshold color order.For example: Green, Orange, Red () will become Red, Orange, Green ().
### Spark Lines
Sparklines are a great way of seeing the historical data related to the summary stat, providing valuable context at a glance. Sparklines act differently than traditional Graph Panels and do not include x or y axis, coordinates, a legend, or ability to interact with the graph.
-
+
1. `Show`: The show checkbox will toggle whether the spark line is shown in the Panel. When unselected, only the Singlestat value will appear.
2. `Background`: Check if you want the sparklines to take up the full panel width, or uncheck if they should be below the main Singlestat value.
@@ -52,13 +65,13 @@ Sparklines are a great way of seeing the historical data related to the summary
Value to text mapping allows you to translate the value of the summary stat into explicit text. The text will respect all styling, thresholds and customization defined for the value. This can be useful to translate the number of the main Singlestat value into a context-specific human-readable word or message.
-
+
## Troubleshooting
### Multiple Series Error
-
+
Grafana 2.5 introduced stricter checking for multiple-series on singlestat panels. In previous versions, the panel logic did not verify that only a single series was used, and instead, displayed the first series encountered. Depending on your data source, this could have lead to inconsistent data being shown and/or a general confusion about which metric was being displayed.
diff --git a/docs/sources/reference/table_panel.md b/docs/sources/reference/table_panel.md
index a857be38357..249886e1f57 100644
--- a/docs/sources/reference/table_panel.md
+++ b/docs/sources/reference/table_panel.md
@@ -1,12 +1,17 @@
-----
-page_title: Table Panel
-page_description: Table Panel Reference
-page_keywords: grafana, table, panel, documentation
----
++++
+title = "Table Panel"
+keywords = ["grafana", "dashboard", "documentation", "panels", "table panel"]
+type = "docs"
+[menu.docs]
+name = "Table"
+parent = "panels"
+weight = 2
++++
+
# Table Panel
-
+
The new table panel is very flexible, supporting both multiple modes for time series as well as for
table, annotation and raw JSON data. It also provides date formatting and value formatting and coloring options.
@@ -17,7 +22,7 @@ To view table panels in action and test different configurations with sample dat
The table panel has many ways to manipulate your data for optimal presentation.
-
+
1. `Data`: Control how your query is transformed into a table.
2. `Table Display`: Table display options.
@@ -25,7 +30,7 @@ The table panel has many ways to manipulate your data for optimal presentation.
## Data to Table
-
+
The data section contains the **To Table Transform (1)**. This is the primary option for how your data/metric
query should be transformed into a table format. The **Columns (2)** option allows you to select what columns
@@ -33,38 +38,38 @@ you want in the table. Only applicable for some transforms.
### Time series to rows
-
+
In the most simple mode you can turn time series to rows. This means you get a `Time`, `Metric` and a `Value` column. Where `Metric` is the name of the time series.
### Time series to columns
-
+
This transform allows you to take multiple time series and group them by time. Which will result in the primary column being `Time` and a column for each time series.
### Time series aggregations
-
+
This table transformation will lay out your table into rows by metric, allowing columns of `Avg`, `Min`, `Max`, `Total`, `Current` and `Count`. More than one column can be added.
### Annotations
-
+
If you have annotations enabled in the dashboard you can have the table show them. If you configure this
mode then any queries you have in the metrics tab will be ignored.
### JSON Data
-
+
If you have an Elasticsearch **Raw Document** query or an Elasticsearch query without a `date histogram` use this
transform mode and pick the columns using the **Columns** section.
-
+
## Table Display
-
+
1. `Pagination (Page Size)`: The table display fields allow you to control The `Pagination` (page size) is the threshold at which the table rows will be broken into pages. For example, if your table had 95 records with a pagination value of 10, your table would be split across 9 pages.
2. `Scroll`: The `scroll bar` checkbox toggles the ability to scroll within the panel, when unchecked, the panel height will grow to display all rows.
@@ -75,7 +80,7 @@ transform mode and pick the columns using the **Columns** section.
The column styles allow you control how dates and numbers are formatted.
-
+
1. `Name or regex`: The Name or Regex field controls what columns the rule should be applied to. The regex or name filter will be matched against the column name not against column values.
2. `Type`: The three supported types of types are `Number`, `String` and `Date`.
diff --git a/docs/sources/reference/templating.md b/docs/sources/reference/templating.md
index e605af845ea..636cc62a0c8 100644
--- a/docs/sources/reference/templating.md
+++ b/docs/sources/reference/templating.md
@@ -1,15 +1,18 @@
-----
-page_title: Dashboard Templating
-page_description: Dashboard Templating
-page_keywords: grafana, templating, variables, guide, documentation
----
++++
+title = "Templating"
+keywords = ["grafana", "templating", "documentation", "guide"]
+type = "docs"
+[menu.docs]
+name = "Templating"
+parent = "dashboard_features"
+weight = 1
++++
-# Dashboard Templating
-
+# Templating
-## Overview
+
-Dashboard Templating allows you to make your Dashboards more interactive and dynamic.
+Dashboard Templating allows you to make your Dashboards more interactive and dynamic.
They’re one of the most powerful and most used features of Grafana, and they’ve recently gotten even more attention in Grafana 2.0 and Grafana 2.1.
@@ -40,13 +43,13 @@ You can utilize the special ** All ** value to allow the Dashboard user to query
#### Multi-select
As of Grafana 2.1, it is now possible to select a subset of Query Template variables (previously it was possible to select an individual value or 'All', not multiple values that were less than All). This is accomplished via the Multi-Select option. If enabled, the Dashboard user will be able to enable and disable individual variables.
-The Multi-Select functionality is taken a step further with the introduction of Multi-Select Tagging. This functionality allows you to group individual Template variables together under a Tag or Group name.
+The Multi-Select functionality is taken a step further with the introduction of Multi-Select Tagging. This functionality allows you to group individual Template variables together under a Tag or Group name.
-For example, if you were using Templating to list all 20 of your applications, you could use Multi-Select Tagging to group your applications by function or region or criticality, etc.
+For example, if you were using Templating to list all 20 of your applications, you could use Multi-Select Tagging to group your applications by function or region or criticality, etc.
> Note: Multi-Select Tagging functionality is currently experimental but is part of Grafana 2.1. To enable this feature click the enable icon when editing Template options for a particular variable.
-
+
Grafana gets the list of tags and the list of values in each tag by performing two queries on your metric namespace.
@@ -58,20 +61,19 @@ Note: a proof of concept shim that translates the metric query into a SQL call i
Once configured, Multi-Select Tagging provides a convenient way to group and your template variables, and slice your data in the exact way you want. The Tags can be seen on the right side of the template pull-down.
-
-
+
### Interval
Use the `Interval` type to create Template variables around time ranges (eg. `1m`,`1h`, `1d`). There is also a special `auto` option that will change depending on the current time range, you can specify how many times the current time range should be divided to calculate the current `auto` range.
-
+
### Custom
-Use the `Custom` type to manually create Template variables around explicit values that are hard-coded into the Dashboard, and not dependent on any Data Source. You can specify multiple Custom Template values by separating them with a comma.
+Use the `Custom` type to manually create Template variables around explicit values that are hard-coded into the Dashboard, and not dependent on any Data Source. You can specify multiple Custom Template values by separating them with a comma.
-## Utilizing Template Variables with Repeating Panels and Repeating Rows
+## Repeating Panels and Repeating Rows
Template Variables can be very useful to dynamically change what you're visualizing on a given panel. Sometimes, you might want to create entire new Panels (or Rows) based on what Template Variables have been selected. This is now possible in Grafana 2.1.
diff --git a/docs/sources/reference/timerange.md b/docs/sources/reference/timerange.md
index 2ab428622bc..a4d6fc62336 100644
--- a/docs/sources/reference/timerange.md
+++ b/docs/sources/reference/timerange.md
@@ -1,32 +1,37 @@
-----
-page_title: Time Range options
-page_description: Time range user guide
-page_keywords: grafana, time range, guide, documentation
----
++++
+title = "Time Range"
+keywords = ["grafana", "dashboard", "documentation", "time range"]
+type = "docs"
+[menu.docs]
+name = "Time Range"
+parent = "dashboard_features"
+weight = 7
++++
+
# Time Range Controls
Grafana provides numerous ways to manage the time ranges of the data being visualized, both at the Dashboard-level and the Panel-level.
-
+
In the top right, you have the master Dashboard time picker (it's in between the 'Zoom out' and the 'Refresh' links).
-1. `Current time range & refresh interval`: This shows the current dashboard time and refresh interval. It also acts as the menu button to toggle the time range controls.
-2. `Quick ranges`: Quick ranges are preset values to choose a relative time. At this time, quick ranges are not configurable, and will appear on every dashboard.
+1. `Current time range & refresh interval`: This shows the current dashboard time and refresh interval. It also acts as the menu button to toggle the time range controls.
+2. `Quick ranges`: Quick ranges are preset values to choose a relative time. At this time, quick ranges are not configurable, and will appear on every dashboard.
3. `Time range`: The time range section allows you to mix both explicit and relative ranges. The explicit time range format is `YYYY-MM-DD HH:MM:SS`
-4. `Refreshing every:` When enabled, auto-refresh will reload the dashboard at the specified time range. Auto-refresh is most commonly used with relative time ranges ending in `now`, so new data will appear when the dashboard refreshes.
+4. `Refreshing every:` When enabled, auto-refresh will reload the dashboard at the specified time range. Auto-refresh is most commonly used with relative time ranges ending in `now`, so new data will appear when the dashboard refreshes.
These settings apply to all Panels in the Dashboard (except those with Panel Time Overrides enabled)
## Time Units
-The following time units are supported: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `y (years)`. The minus operator allows you to step back in time, relative to now. If you wish to display the full period of the unit (day, week, month, etc...), append `/$unit` to the end.
+The following time units are supported: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `y (years)`. The minus operator allows you to step back in time, relative to now. If you wish to display the full period of the unit (day, week, month, etc...), append `/$unit` to the end.
Take a look at some examples to seen these concepts in practice:
-Example Relative Range | From: | To:
--------------- | ----- | ---
+Example Relative Range | From: | To:
+-------------- | ----- | ---
Last 5 minutes | `now-5m` | `now`
The day so far | `now/d` | `now`
This week | `now/w` | `now/w`
@@ -38,7 +43,7 @@ Previous Month | `now-1M/M` | `now-1M/M`
There are two settings available from the Dashboard Settings area, allowing customization of the auto-refresh intervals and the definition of `now`.
-
+
### Auto-Refresh Options
@@ -54,15 +59,15 @@ Users often ask, [when will then be now](https://www.youtube.com/watch?v=VeZ9HhH
You can override the relative time range for individual panels, causing them to be different than what is selected in the Dashboard time picker in the upper right. This allows you to show metrics from different time periods or days at the same time.
-
+
You control these overrides in panel editor mode and the tab `Time Range`.
-
+
When you zoom or change the Dashboard time to a custom absolute time range, all panel overrides will be disabled. The panel relative time override is only active when the dashboard time is also relative. The panel timeshift override is always active, even when the dashboard time is absolute.
The `Hide time override info` option allows you to hide the override info text that is by default shown in the
upper right of a panel when overridden time range options.
-Note: You can only override the dashboard time with relative time ranges. Absolute time ranges are not available.
+Note: You can only override the dashboard time with relative time ranges. Absolute time ranges are not available.
diff --git a/docs/sources/tutorials/hubot_howto.md b/docs/sources/tutorials/hubot_howto.md
index 85ebb3e7c85..17658fbaecd 100644
--- a/docs/sources/tutorials/hubot_howto.md
+++ b/docs/sources/tutorials/hubot_howto.md
@@ -1,9 +1,11 @@
----
-page_title: How To integrate Hubot and Grafana
-page_description: Hubot Grafana install guide
-page_keywords: grafana, tutorials, hubot, slack, hipchat, setup, install, config
-author: Torkel Ödegaard
----
++++
+title = "How To integrate Hubot and Grafana"
+type = "docs"
+keywords = ["grafana", "tutorials", "hubot", "slack", "hipchat", "setup", "install", "config"]
+[menu.docs]
+parent = "tutorials"
+weight = 10
++++
# How to integrate Hubot with Grafana
diff --git a/docs/sources/tutorials/index.md b/docs/sources/tutorials/index.md
index fd064ba5b15..cb11940c6dd 100644
--- a/docs/sources/tutorials/index.md
+++ b/docs/sources/tutorials/index.md
@@ -1,8 +1,9 @@
----
-page_title: Grafana Tutorials
-page_description: Tutorials
-page_keywords: grafana, tutorials
----
++++
+title = "Tutorials"
+[menu.docs]
+identifier = "tutorials"
+weight = 6
++++
# Tutorials
diff --git a/docs/sources/tutorials/screencasts.md b/docs/sources/tutorials/screencasts.md
new file mode 100644
index 00000000000..f92ead64d49
--- /dev/null
+++ b/docs/sources/tutorials/screencasts.md
@@ -0,0 +1,66 @@
++++
+title = "Screencasts"
+type = "docs"
+[menu.docs]
+identifier = "screencasts"
+parent = "guides"
+weight = 10
++++
+
+# Screencasts
+
+
+{{< screencast src="https://www.youtube.com/embed/sKNZMtoSHN4?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
+
+### Episode 7 - Beginners guide to building dashboards
+
+For newer users of Grafana, this screencast will familiarize you with the general UI and teach you how to build your first Dashboard.
+
+
+
+{{< screencast src="https://www.youtube.com/embed/9ZCMVNxUf6s?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
+
+### Episode 6 - Adding data sources, users & organizations
+
+Now that Grafana has been installed, learn about adding data sources and get a closer look at adding and managing Users and Organizations.
+
+
+
+{{< screencast src="https://www.youtube.com/embed/E-gMFv85FE8?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
+
+### Episode 5 - Installation & Configuration on Red Hat / CentOS
+
+This screencasts shows how to get Grafana 2.0 installed and configured quickly on RPM-based Linux operating systems.
+
+
+{{< screencast src="https://www.youtube.com/embed/JY22EBOR9hQ?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
+
+### Episode 4 - Installation & Configuration on Ubuntu / Debian
+
+Learn how to easily install the dependencies and packages to get Grafana 2.0 up and running on Ubuntu or Debian in just a few minutes.
+
+
+
+{{< screencast src="https://www.youtube.com/embed/FC13uhFRsVw?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
+
+### Episode 3 - Whats New In Grafana 2.0
+
+This screencast highlights many of the great new features that were included in the Grafana 2.0 release.
+
+
+
+{{< screencast src="//www.youtube.com/embed/FhNUrueWwOk?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
+### Episode 2 - Templated Graphite Queries
+
+The screencast focuses on Templating with the Graphite Data Source. Learn how to make dynamic and adaptable Dashboards for your Graphite metrics.
+
+
+
+{{< screencast src="//www.youtube.com/embed/mgcJPREl3CU?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
+### Episode 1 - Building Graphite Queries
+
+Learn how the Graphite Query Editor works, and how to use different graphing functions. There's also an introduction to graph display settings.
+
+
+
+
diff --git a/docs/sources/versions.html_fragment b/docs/sources/versions.html_fragment
index 0d62ee1e461..df6dbd4db7f 100644
--- a/docs/sources/versions.html_fragment
+++ b/docs/sources/versions.html_fragment
@@ -1,3 +1,4 @@
+
- Please click the following link to reset your password within [[.EmailCodeValidHours]] hours.
+ Please click the following link to reset your password within [[.EmailCodeValidHours]] hours.
- These system settings are defined in grafana.ini or grafana.custom.ini (or overriden in ENV variables).
+ These system settings are defined in grafana.ini or custom.ini (or overriden in ENV variables).
To change these you currently need to restart grafana.
@@ -46,82 +53,91 @@
label="Editable"
tooltip="Uncheck, then save and reload to disable all dashboard editing"
checked="dashboard.editable"
- label-class="width-10">
+ label-class="width-11">
-
-
-
+ label-class="width-11">
-
-
-
Rows settings
-
-
-
-
- Title
-
-
-
-
-
-
-
-
+
+
Panel Options
+
+
+
+
-
-
-
-
+
-
-
-
+
+
Rows settings
-
-
Dashboard info
-
-
- Last updated at:
- {{formatDate(dashboardMeta.updated)}}
-
-
- Last updated by:
- {{dashboardMeta.updatedBy}}
-
-
- Created at:
- {{formatDate(dashboardMeta.created)}}
-
-
- Created by:
- {{dashboardMeta.createdBy}}
-
-
- Current version:
- {{dashboardMeta.version}}
-
-
-
+
+
+
+ Title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Dashboard info
+
+
+ Last updated at:
+ {{dashboard.formatDate(dashboardMeta.updated)}}
+
+
+ Last updated by:
+ {{dashboardMeta.updatedBy}}
+
+
+ Created at:
+ {{dashboard.formatDate(dashboardMeta.created)}}
+