From 4f6010aa26de1c07800894514a331a8d2e5659c0 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Mon, 19 Jun 2017 16:21:33 +0200
Subject: [PATCH 001/122] ssh: Renamed ssh_disable_agent to
ssh_disable_agent_forwarding
Closes: #4941
---
communicator/ssh/communicator.go | 6 +-
fix/fixer.go | 2 +
fix/fixer_sshdisableagent.go | 50 +++++++++++
fix/fixer_sshdisableagent_test.go | 83 +++++++++++++++++++
helper/communicator/config.go | 34 ++++----
helper/communicator/step_connect_ssh.go | 10 +--
.../docs/templates/communicator.html.md | 4 +-
7 files changed, 162 insertions(+), 27 deletions(-)
create mode 100644 fix/fixer_sshdisableagent.go
create mode 100644 fix/fixer_sshdisableagent_test.go
diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go
index a6a7f9cf9..380ba4951 100644
--- a/communicator/ssh/communicator.go
+++ b/communicator/ssh/communicator.go
@@ -46,8 +46,8 @@ type Config struct {
// Pty, if true, will request a pty from the remote end.
Pty bool
- // DisableAgent, if true, will not forward the SSH agent.
- DisableAgent bool
+ // DisableAgentForwarding, if true, will not forward the SSH agent.
+ DisableAgentForwarding bool
// HandshakeTimeout limits the amount of time we'll wait to handshake before
// saying the connection failed.
@@ -327,7 +327,7 @@ func (c *comm) connectToAgent() {
return
}
- if c.config.DisableAgent {
+ if c.config.DisableAgentForwarding {
log.Printf("[INFO] SSH agent forwarding is disabled.")
return
}
diff --git a/fix/fixer.go b/fix/fixer.go
index 3c285c4be..2e55f4d69 100644
--- a/fix/fixer.go
+++ b/fix/fixer.go
@@ -29,6 +29,7 @@ func init() {
"parallels-headless": new(FixerParallelsHeadless),
"parallels-deprecations": new(FixerParallelsDeprecations),
"sshkeypath": new(FixerSSHKeyPath),
+ "sshdisableagent": new(FixerSSHDisableAgent),
"manifest-filename": new(FixerManifestFilename),
"amazon-shutdown_behavior": new(FixerAmazonShutdownBehavior),
}
@@ -43,6 +44,7 @@ func init() {
"parallels-headless",
"parallels-deprecations",
"sshkeypath",
+ "sshdisableagent",
"manifest-filename",
"amazon-shutdown_behavior",
}
diff --git a/fix/fixer_sshdisableagent.go b/fix/fixer_sshdisableagent.go
new file mode 100644
index 000000000..b399af52a
--- /dev/null
+++ b/fix/fixer_sshdisableagent.go
@@ -0,0 +1,50 @@
+package fix
+
+import (
+ "github.com/mitchellh/mapstructure"
+)
+
+// FixerSSHDisableAgent changes the "ssh_disable_agent" of a template
+// to "ssh_disable_agent_forwarding".
+type FixerSSHDisableAgent struct{}
+
+func (FixerSSHDisableAgent) Fix(input map[string]interface{}) (map[string]interface{}, error) {
+ // The type we'll decode into; we only care about builders
+ type template struct {
+ Builders []map[string]interface{}
+ }
+
+ // Decode the input into our structure, if we can
+ var tpl template
+ if err := mapstructure.Decode(input, &tpl); err != nil {
+ return nil, err
+ }
+
+ for _, builder := range tpl.Builders {
+ sshDisableAgentRaw, ok := builder["ssh_disable_agent"]
+ if !ok {
+ continue
+ }
+
+ sshDisableAgent, ok := sshDisableAgentRaw.(bool)
+ if !ok {
+ continue
+ }
+
+ // only assign to ssh_disable_agent_forwarding if it doesn't
+ // already exist; otherwise we'll just ignore ssh_disable_agent
+ _, sshDisableAgentIncluded := builder["ssh_disable_agent_forwarding"]
+ if !sshDisableAgentIncluded {
+ builder["ssh_disable_agent_forwarding"] = sshDisableAgent
+ }
+
+ delete(builder, "ssh_disable_agent")
+ }
+
+ input["builders"] = tpl.Builders
+ return input, nil
+}
+
+func (FixerSSHDisableAgent) Synopsis() string {
+ return `Updates builders using "ssh_disable_agent" to use "ssh_disable_agent_forwarding"`
+}
diff --git a/fix/fixer_sshdisableagent_test.go b/fix/fixer_sshdisableagent_test.go
new file mode 100644
index 000000000..c38f9c581
--- /dev/null
+++ b/fix/fixer_sshdisableagent_test.go
@@ -0,0 +1,83 @@
+package fix
+
+import (
+ "reflect"
+ "testing"
+)
+
+func TestFixerSSHDisableAgent_Impl(t *testing.T) {
+ var _ Fixer = new(FixerSSHDisableAgent)
+}
+
+func TestFixerSSHDisableAgent_Fix(t *testing.T) {
+ cases := []struct {
+ Input map[string]interface{}
+ Expected map[string]interface{}
+ }{
+ // No disable_agent field
+ {
+ Input: map[string]interface{}{
+ "type": "virtualbox",
+ },
+
+ Expected: map[string]interface{}{
+ "type": "virtualbox",
+ },
+ },
+
+ // disable_agent_forwarding without disable_agent
+ {
+ Input: map[string]interface{}{
+ "ssh_disable_agent_forwarding": true,
+ },
+
+ Expected: map[string]interface{}{
+ "ssh_disable_agent_forwarding": true,
+ },
+ },
+
+ // disable_agent without disable_agent_forwarding
+ {
+ Input: map[string]interface{}{
+ "ssh_disable_agent": true,
+ },
+
+ Expected: map[string]interface{}{
+ "ssh_disable_agent_forwarding": true,
+ },
+ },
+
+ // disable_agent and disable_agent_forwarding
+ {
+ Input: map[string]interface{}{
+ "ssh_disable_agent": true,
+ "ssh_disable_agent_forwarding": false,
+ },
+
+ Expected: map[string]interface{}{
+ "ssh_disable_agent_forwarding": false,
+ },
+ },
+ }
+
+ for _, tc := range cases {
+ var f FixerSSHDisableAgent
+
+ input := map[string]interface{}{
+ "builders": []map[string]interface{}{tc.Input},
+ }
+
+ expected := map[string]interface{}{
+ "builders": []map[string]interface{}{tc.Expected},
+ }
+
+ output, err := f.Fix(input)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
+
+ if !reflect.DeepEqual(output, expected) {
+ t.Fatalf("unexpected: %#v\nexpected: %#v\n", output, expected)
+ }
+ }
+}
diff --git a/helper/communicator/config.go b/helper/communicator/config.go
index a39262abb..243ca224d 100644
--- a/helper/communicator/config.go
+++ b/helper/communicator/config.go
@@ -16,23 +16,23 @@ type Config struct {
Type string `mapstructure:"communicator"`
// SSH
- SSHHost string `mapstructure:"ssh_host"`
- SSHPort int `mapstructure:"ssh_port"`
- SSHUsername string `mapstructure:"ssh_username"`
- SSHPassword string `mapstructure:"ssh_password"`
- SSHPrivateKey string `mapstructure:"ssh_private_key_file"`
- SSHPty bool `mapstructure:"ssh_pty"`
- SSHTimeout time.Duration `mapstructure:"ssh_timeout"`
- SSHAgentAuth bool `mapstructure:"ssh_agent_auth"`
- SSHDisableAgent bool `mapstructure:"ssh_disable_agent"`
- SSHHandshakeAttempts int `mapstructure:"ssh_handshake_attempts"`
- SSHBastionHost string `mapstructure:"ssh_bastion_host"`
- SSHBastionPort int `mapstructure:"ssh_bastion_port"`
- SSHBastionAgentAuth bool `mapstructure:"ssh_bastion_agent_auth"`
- SSHBastionUsername string `mapstructure:"ssh_bastion_username"`
- SSHBastionPassword string `mapstructure:"ssh_bastion_password"`
- SSHBastionPrivateKey string `mapstructure:"ssh_bastion_private_key_file"`
- SSHFileTransferMethod string `mapstructure:"ssh_file_transfer_method"`
+ SSHHost string `mapstructure:"ssh_host"`
+ SSHPort int `mapstructure:"ssh_port"`
+ SSHUsername string `mapstructure:"ssh_username"`
+ SSHPassword string `mapstructure:"ssh_password"`
+ SSHPrivateKey string `mapstructure:"ssh_private_key_file"`
+ SSHPty bool `mapstructure:"ssh_pty"`
+ SSHTimeout time.Duration `mapstructure:"ssh_timeout"`
+ SSHAgentAuth bool `mapstructure:"ssh_agent_auth"`
+ SSHDisableAgentForwarding bool `mapstructure:"ssh_disable_agent_forwarding"`
+ SSHHandshakeAttempts int `mapstructure:"ssh_handshake_attempts"`
+ SSHBastionHost string `mapstructure:"ssh_bastion_host"`
+ SSHBastionPort int `mapstructure:"ssh_bastion_port"`
+ SSHBastionAgentAuth bool `mapstructure:"ssh_bastion_agent_auth"`
+ SSHBastionUsername string `mapstructure:"ssh_bastion_username"`
+ SSHBastionPassword string `mapstructure:"ssh_bastion_password"`
+ SSHBastionPrivateKey string `mapstructure:"ssh_bastion_private_key_file"`
+ SSHFileTransferMethod string `mapstructure:"ssh_file_transfer_method"`
// WinRM
WinRMUser string `mapstructure:"winrm_username"`
diff --git a/helper/communicator/step_connect_ssh.go b/helper/communicator/step_connect_ssh.go
index 2daee1be6..669d52410 100644
--- a/helper/communicator/step_connect_ssh.go
+++ b/helper/communicator/step_connect_ssh.go
@@ -160,11 +160,11 @@ func (s *StepConnectSSH) waitForSSH(state multistep.StateBag, cancel <-chan stru
// Then we attempt to connect via SSH
config := &ssh.Config{
- Connection: connFunc,
- SSHConfig: sshConfig,
- Pty: s.Config.SSHPty,
- DisableAgent: s.Config.SSHDisableAgent,
- UseSftp: s.Config.SSHFileTransferMethod == "sftp",
+ Connection: connFunc,
+ SSHConfig: sshConfig,
+ Pty: s.Config.SSHPty,
+ DisableAgentForwarding: s.Config.SSHDisableAgentForwarding,
+ UseSftp: s.Config.SSHFileTransferMethod == "sftp",
}
log.Println("[INFO] Attempting SSH connection...")
diff --git a/website/source/docs/templates/communicator.html.md b/website/source/docs/templates/communicator.html.md
index 07d6229ed..07304f7d6 100644
--- a/website/source/docs/templates/communicator.html.md
+++ b/website/source/docs/templates/communicator.html.md
@@ -76,8 +76,8 @@ The SSH communicator has the following options:
- `ssh_bastion_username` (string) - The username to connect to the bastion
host.
-- `ssh_disable_agent` (boolean) - If true, SSH agent forwarding will be
- disabled. Defaults to false.
+- `ssh_disable_agent_forwarding` (boolean) - If true, SSH agent forwarding
+ will be disabled. Defaults to false.
- `ssh_file_transfer_method` (`scp` or `sftp`) - How to transfer files, Secure
copy (default) or SSH File Transfer Protocol.
From 17d3671601c9469208bbab65568e0383c5cd45cd Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Thu, 6 Jul 2017 09:26:44 -0700
Subject: [PATCH 002/122] make sure that flagVars is not a nil map
---
command/meta.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/command/meta.go b/command/meta.go
index b8dfdfbf5..187c364a3 100644
--- a/command/meta.go
+++ b/command/meta.go
@@ -120,6 +120,9 @@ func (m *Meta) FlagSet(n string, fs FlagSetFlags) *flag.FlagSet {
f.Var((*kvflag.Flag)(&m.flagVars), "var", "")
f.Var((*kvflag.FlagJSON)(&m.flagVars), "var-file", "")
}
+ if len(m.flagVars) == 0 {
+ m.flagVars = make(map[string]string)
+ }
// Create an io.Writer that writes to our Ui properly for errors.
// This is kind of a hack, but it does the job. Basically: create
From 337e7d88e66ca090a2e76301e0c3021e3c94f1c4 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Sun, 9 Jul 2017 21:50:20 +0200
Subject: [PATCH 003/122] post-processor/checksum: properly interpolate output
Fix a bug where "output" of checksum post-processor was not correctly
interpolating {{.BuilderType}}, {{.BuildName}}, and {{.ChecksumType}}.
---
post-processor/checksum/post-processor.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/post-processor/checksum/post-processor.go b/post-processor/checksum/post-processor.go
index 2ae6da164..70295c878 100644
--- a/post-processor/checksum/post-processor.go
+++ b/post-processor/checksum/post-processor.go
@@ -57,9 +57,10 @@ func getHash(t string) hash.Hash {
func (p *PostProcessor) Configure(raws ...interface{}) error {
err := config.Decode(&p.config, &config.DecodeOpts{
- Interpolate: true,
+ Interpolate: true,
+ InterpolateContext: &p.config.ctx,
InterpolateFilter: &interpolate.RenderFilter{
- Exclude: []string{},
+ Exclude: []string{"output"},
},
}, raws...)
if err != nil {
From 1d8e381b2a7ea0a406bf17c2b4bb146b07d418a5 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Mon, 10 Jul 2017 07:56:32 +0200
Subject: [PATCH 004/122] Updated CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7526e5832..c15273f57 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
* builder/googlecompute: Allow using URL's for network and subnetwork. [GH-5035]
### BUG FIXES:
+* post-processor/checksum: Fix interpolation of "output". [GH-5112]
* builder/hyperv: Verify membership in the group Hyper-V Administrators by SID not name. [GH-5022]
* builder/docker: Fix windows filepath in docker-toolbox call. [GH-4887]
* builder/amazon: Fix panic that happens if ami_block_device_mappings is empty. [GH-5059]
From eaccfce29e93270ead2271e4f91c257e1bbf0370 Mon Sep 17 00:00:00 2001
From: Matthew Aynalem
Date: Wed, 12 Jul 2017 15:03:06 -0700
Subject: [PATCH 005/122] move period outside of quotation marks designating an
attribute value.
---
website/source/docs/provisioners/file.html.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/website/source/docs/provisioners/file.html.md b/website/source/docs/provisioners/file.html.md
index d00927fae..75cdb8d8b 100644
--- a/website/source/docs/provisioners/file.html.md
+++ b/website/source/docs/provisioners/file.html.md
@@ -45,7 +45,7 @@ The available configuration options are listed below. All elements are required.
directories must already exist.
- `direction` (string) - The direction of the file transfer. This defaults to
- "upload." If it is set to "download" then the file "source" in the machine
+ "upload". If it is set to "download" then the file "source" in the machine
will be downloaded locally to "destination"
## Directory Uploads
From 44089b2f55864b6b9d9fe9d978e979ab22fca59b Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 07:11:30 +0200
Subject: [PATCH 006/122] cloudstack: Improved error reporting
Ensure that errors are shown when they happens.
---
.../cloudstack/step_configure_networking.go | 29 ++++++++++++++-----
builder/cloudstack/step_create_instance.go | 10 ++++++-
builder/cloudstack/step_create_template.go | 9 ++++--
builder/cloudstack/step_prepare_config.go | 10 +++++++
builder/cloudstack/step_shutdown_instance.go | 4 ++-
5 files changed, 51 insertions(+), 11 deletions(-)
diff --git a/builder/cloudstack/step_configure_networking.go b/builder/cloudstack/step_configure_networking.go
index b7161f281..48a3742ab 100644
--- a/builder/cloudstack/step_configure_networking.go
+++ b/builder/cloudstack/step_configure_networking.go
@@ -47,7 +47,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
// Retrieve the instance ID from the previously saved state.
instanceID, ok := state.Get("instance_id").(string)
if !ok || instanceID == "" {
- state.Put("error", fmt.Errorf("Could not retrieve instance_id from state!"))
+ err := fmt.Errorf("Could not retrieve instance_id from state!")
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -56,7 +58,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
cloudstack.WithProject(config.Project),
)
if err != nil {
- state.Put("error", fmt.Errorf("Failed to retrieve the network object: %s", err))
+ err := fmt.Errorf("Failed to retrieve the network object: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -79,7 +83,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
// Associate a new public IP address.
ipAddr, err := client.Address.AssociateIpAddress(p)
if err != nil {
- state.Put("error", fmt.Errorf("Failed to associate public IP address: %s", err))
+ err := fmt.Errorf("Failed to associate public IP address: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -107,7 +113,10 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
// Create the port forward.
forward, err := client.Firewall.CreatePortForwardingRule(p)
if err != nil {
- ui.Error(fmt.Sprintf("Failed to create port forward: %s", err))
+ err := fmt.Errorf("Failed to create port forward: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
}
// Store the port forward ID.
@@ -117,7 +126,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
ui.Message("Creating network ACL rule...")
if network.Aclid == "" {
- state.Put("error", fmt.Errorf("Failed to configure the firewall: no ACL connected to the VPC network"))
+ err := fmt.Errorf("Failed to configure the firewall: no ACL connected to the VPC network")
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -135,7 +146,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
// Create the network ACL rule.
aclRule, err := client.NetworkACL.CreateNetworkACL(p)
if err != nil {
- state.Put("error", fmt.Errorf("Failed to create network ACL rule: %s", err))
+ err := fmt.Errorf("Failed to create network ACL rule: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -154,7 +167,9 @@ func (s *stepSetupNetworking) Run(state multistep.StateBag) multistep.StepAction
fwRule, err := client.Firewall.CreateFirewallRule(p)
if err != nil {
- state.Put("error", fmt.Errorf("Failed to create firewall rule: %s", err))
+ err := fmt.Errorf("Failed to create firewall rule: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
diff --git a/builder/cloudstack/step_create_instance.go b/builder/cloudstack/step_create_instance.go
index 1693b654f..3cc3e5ac4 100644
--- a/builder/cloudstack/step_create_instance.go
+++ b/builder/cloudstack/step_create_instance.go
@@ -62,7 +62,9 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
// Retrieve the zone object.
zone, _, err := client.Zone.GetZoneByID(config.Zone)
if err != nil {
+ err := fmt.Errorf("Failed to get Zone by ID: %s - %s", config.Zone, err)
state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -80,7 +82,9 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
httpPort := state.Get("http_port").(uint)
httpIP, err := hostIP()
if err != nil {
+ err := fmt.Errorf("Failed to determine host IP: %s", err)
state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
common.SetHTTPIP(httpIP)
@@ -92,7 +96,9 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
ud, err := s.generateUserData(config.UserData, config.HTTPGetOnly)
if err != nil {
+ err := fmt.Errorf("Failed to interpolate user_data: %s", err)
state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -102,7 +108,9 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
// Create the new instance.
instance, err := client.VirtualMachine.DeployVirtualMachine(p)
if err != nil {
- state.Put("error", fmt.Errorf("Error creating new instance %s: %s", config.InstanceName, err))
+ err := fmt.Errorf("Error creating new instance %s: %s", config.InstanceName, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
diff --git a/builder/cloudstack/step_create_template.go b/builder/cloudstack/step_create_template.go
index 12f851802..18d6c1fb0 100644
--- a/builder/cloudstack/step_create_template.go
+++ b/builder/cloudstack/step_create_template.go
@@ -21,7 +21,9 @@ func (s *stepCreateTemplate) Run(state multistep.StateBag) multistep.StepAction
// Retrieve the instance ID from the previously saved state.
instanceID, ok := state.Get("instance_id").(string)
if !ok || instanceID == "" {
- state.Put("error", fmt.Errorf("Could not retrieve instance_id from state!"))
+ err := fmt.Errorf("Could not retrieve instance_id from state!")
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -51,6 +53,7 @@ func (s *stepCreateTemplate) Run(state multistep.StateBag) multistep.StepAction
volumeID, err := getRootVolumeID(client, instanceID)
if err != nil {
state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
@@ -60,7 +63,9 @@ func (s *stepCreateTemplate) Run(state multistep.StateBag) multistep.StepAction
ui.Message("Creating the new template...")
template, err := client.Template.CreateTemplate(p)
if err != nil {
- state.Put("error", fmt.Errorf("Error creating the new template %s: %s", config.TemplateName, err))
+ err := fmt.Errorf("Error creating the new template %s: %s", config.TemplateName, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
diff --git a/builder/cloudstack/step_prepare_config.go b/builder/cloudstack/step_prepare_config.go
index b1390b9da..80668cb8f 100644
--- a/builder/cloudstack/step_prepare_config.go
+++ b/builder/cloudstack/step_prepare_config.go
@@ -26,6 +26,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if config.Project != "" && !isUUID(config.Project) {
config.Project, _, err = client.Project.GetProjectID(config.Project)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"project", config.Project, err})
}
}
@@ -33,6 +34,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if config.UserDataFile != "" {
userdata, err := ioutil.ReadFile(config.UserDataFile)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, fmt.Errorf("problem reading user data file: %s", err))
}
config.UserData = string(userdata)
@@ -41,6 +43,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if !isUUID(config.Zone) {
config.Zone, _, err = client.Zone.GetZoneID(config.Zone)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"zone", config.Zone, err})
}
}
@@ -49,6 +52,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if config.DiskOffering != "" && !isUUID(config.DiskOffering) {
config.DiskOffering, _, err = client.DiskOffering.GetDiskOfferingID(config.DiskOffering)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"disk offering", config.DiskOffering, err})
}
}
@@ -66,6 +70,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
ipAddrs, err := client.Address.ListPublicIpAddresses(p)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"IP address", config.PublicIPAddress, err})
}
if err == nil && ipAddrs.Count != 1 {
@@ -79,6 +84,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if !isUUID(config.Network) {
config.Network, _, err = client.Network.GetNetworkID(config.Network, cloudstack.WithProject(config.Project))
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"network", config.Network, err})
}
}
@@ -86,6 +92,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if !isUUID(config.ServiceOffering) {
config.ServiceOffering, _, err = client.ServiceOffering.GetServiceOfferingID(config.ServiceOffering)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"service offering", config.ServiceOffering, err})
}
}
@@ -96,6 +103,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
} else {
config.instanceSource, _, err = client.ISO.GetIsoID(config.SourceISO, "executable", config.Zone)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"ISO", config.SourceISO, err})
}
}
@@ -107,6 +115,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
} else {
config.instanceSource, _, err = client.Template.GetTemplateID(config.SourceTemplate, "executable", config.Zone)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"template", config.SourceTemplate, err})
}
}
@@ -118,6 +127,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
types, err := client.GuestOS.ListOsTypes(p)
if err != nil {
+ ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"OS type", config.TemplateOS, err})
}
if err == nil && types.Count != 1 {
diff --git a/builder/cloudstack/step_shutdown_instance.go b/builder/cloudstack/step_shutdown_instance.go
index 638b0e58b..b090a5836 100644
--- a/builder/cloudstack/step_shutdown_instance.go
+++ b/builder/cloudstack/step_shutdown_instance.go
@@ -30,7 +30,9 @@ func (s *stepShutdownInstance) Run(state multistep.StateBag) multistep.StepActio
// Shutdown the virtual machine.
_, err := client.VirtualMachine.StopVirtualMachine(p)
if err != nil {
- state.Put("error", fmt.Errorf("Error shutting down instance %s: %s", config.InstanceName, err))
+ err := fmt.Errorf("Error shutting down instance %s: %s", config.InstanceName, err)
+ state.Put("error", err)
+ ui.Error(err.Error())
return multistep.ActionHalt
}
From 0d7c3ac1710de79d953bc84f6e961f9e498f6b82 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 07:32:41 +0200
Subject: [PATCH 007/122] cloudstack: Allow reading api_url, api_key, and
secret_key from env vars
If unset reads:
- `api_url` from `CLOUDSTACK_API_URL`
- `api_key` from `CLOUDSTACK_API_KEY`
- `secret_key` from `CLOUDSTACK_SECRET_KEY`
---
builder/cloudstack/config.go | 15 +++++++++++++++
website/source/docs/builders/cloudstack.html.md | 8 +++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/builder/cloudstack/config.go b/builder/cloudstack/config.go
index a7193adf2..e112d2526 100644
--- a/builder/cloudstack/config.go
+++ b/builder/cloudstack/config.go
@@ -79,6 +79,21 @@ func NewConfig(raws ...interface{}) (*Config, error) {
var errs *packer.MultiError
// Set some defaults.
+ if c.APIURL == "" {
+ // Default to environment variable for api_url, if it exists
+ c.APIURL = os.Getenv("CLOUDSTACK_API_URL")
+ }
+
+ if c.APIKey == "" {
+ // Default to environment variable for api_key, if it exists
+ c.APIKey = os.Getenv("CLOUDSTACK_API_KEY")
+ }
+
+ if c.SecretKey == "" {
+ // Default to environment variable for secret_key, if it exists
+ c.SecretKey = os.Getenv("CLOUDSTACK_SECRET_KEY")
+ }
+
if c.AsyncTimeout == 0 {
c.AsyncTimeout = 30 * time.Minute
}
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index f6a5fa9dd..6c952d274 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -34,8 +34,12 @@ builder.
### Required:
- `api_url` (string) - The CloudStack API endpoint we will connect to.
+ It can also be specified via environment variable `CLOUDSTACK_API_URL`,
+ if set.
-- `api_key` (string) - The API key used to sign all API requests.
+- `api_key` (string) - The API key used to sign all API requests. It
+ can also be specified via environment variable `CLOUDSTACK_API_KEY`,
+ if set.
- `cidr_list` (array) - List of CIDR's that will have access to the new
instance. This is needed in order for any provisioners to be able to
@@ -49,6 +53,8 @@ builder.
to.
- `secret_key` (string) - The secret key used to sign all API requests.
+ It can also be specified via environment variable `CLOUDSTACK_SECRET_KEY`,
+ if set.
- `service_offering` (string) - The name or ID of the service offering used
for the instance.
From ec01ffa91b5658f80be6b7756fffadf69fbe466e Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 07:58:45 +0200
Subject: [PATCH 008/122] cloudstack: Moved several settins to the optional
section
Moved `instance_name`, `template_name`, and `template_display_name` to the
optional section since the have default values.
---
.../source/docs/builders/cloudstack.html.md | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index f6a5fa9dd..b986cc7f1 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -42,9 +42,6 @@ builder.
connect to the instance. Usually this will be the NAT address of your
current location. Only required when `use_local_ip_address` is `false`.
-- `instance_name` (string) - The name of the instance. Defaults to
- "packer-UUID" where UUID is dynamically generated.
-
- `network` (string) - The name or ID of the network to connect the instance
to.
@@ -59,12 +56,6 @@ builder.
- `source_template` (string) - The name or ID of the template used as base
template for the instance. This option is mutual explusive with `source_iso`.
-- `template_name` (string) - The name of the new template. Defaults to
- "packer-{{timestamp}}" where timestamp will be the current time.
-
-- `template_display_text` (string) - The display text of the new template.
- Defaults to the `template_name`.
-
- `template_os` (string) - The name or ID of the template OS for the new
template that will be created.
@@ -111,6 +102,9 @@ builder.
access the instance. The SSH key pair is assumed to be already available
within CloudStack.
+- `instance_name` (string) - The name of the instance. Defaults to
+ "packer-UUID" where UUID is dynamically generated.
+
- `project` (string) - The name or ID of the project to deploy the instance to.
- `public_ip_address` (string) - The public IP address or it's ID used for
@@ -120,9 +114,15 @@ builder.
- `ssl_no_verify` (boolean) - Set to `true` to skip SSL verification. Defaults
to `false`.
+- `template_display_text` (string) - The display text of the new template.
+ Defaults to the `template_name`.
+
- `template_featured` (boolean) - Set to `true` to indicate that the template
is featured. Defaults to `false`.
+- `template_name` (string) - The name of the new template. Defaults to
+ "packer-{{timestamp}}" where timestamp will be the current time.
+
- `template_public` (boolean) - Set to `true` to indicate that the template is
available for all accounts. Defaults to `false`.
From e7320b526c7d4e7b24b965463ec5800a79ef5ab9 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 08:06:04 +0200
Subject: [PATCH 009/122] cloudstack: Added missing `ssh_username` to the
example
---
website/source/docs/builders/cloudstack.html.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index b986cc7f1..9248b3fe3 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -168,6 +168,8 @@ Here is a basic example.
"source_iso": "CentOS-7.0-1406-x86_64-Minimal",
"zone": "NL1",
+ "ssh_username": "root",
+
"template_name": "Centos7-x86_64-KVM-Packer",
"template_display_text": "Centos7-x86_64 KVM Packer",
"template_featured": true,
From bc5f277faf7ea877bd6aff1cb5e958fe74211034 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 09:33:41 +0200
Subject: [PATCH 010/122] cloudstack: add user_data_file to docs
---
website/source/docs/builders/cloudstack.html.md | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index 9248b3fe3..d33fb3763 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -135,7 +135,14 @@ builder.
- `template_scalable` (boolean) - Set to `true` to indicate that the template
contains tools to support dynamic scaling of VM cpu/memory. Defaults to `false`.
-- `user_data` (string) - User data to launch with the instance.
+- `user_data` (string) - User data to launch with the instance. This is a
+ [template engine](/docs/templates/engine.html) see _User Data_ bellow for more
+ details.
+
+- `user_data_file` (string) - Path to a file that will be used for the user
+ data when launching the instance. This file will be parsed as a
+ [template engine](/docs/templates/engine.html) see _User Data_ bellow for more
+ details.
- `use_local_ip_address` (boolean) - Set to `true` to indicate that the
provisioners should connect to the local IP address of the instance.
@@ -147,7 +154,7 @@ The available variables are:
- `HTTPIP` and `HTTPPort` - The IP and port, respectively of an HTTP server
that is started serving the directory specified by the `http_directory`
configuration parameter. If `http_directory` isn't specified, these will be
- blank!
+ blank.
## Basic Example
From a1a655bfd890859edd8eb868f31ecc6d5bcf7544 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 09:42:34 +0200
Subject: [PATCH 011/122] cloudstack: add note to source_iso
---
website/source/docs/builders/cloudstack.html.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index d33fb3763..b5bacb715 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -52,6 +52,7 @@ builder.
- `soure_iso` (string) - The name or ID of an ISO that will be mounted before
booting the instance. This option is mutual exclusive with `source_template`.
+ When then is used `disk_offering` and `hypervisor` is required.
- `source_template` (string) - The name or ID of the template used as base
template for the instance. This option is mutual explusive with `source_iso`.
From 7488d15cbf83d136115e85e40e6999ed871aa3d8 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 10:11:17 +0200
Subject: [PATCH 012/122] Updated CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c15273f57..c45b85c1f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
* postprocessor/atlas: Disallow pushing vagrant.box artifacts now that Vagrant cloud is live. [GH-4780]
* builder/cloudstack: Add support for using a HTTP server. [GH-5017]
* builder/cloudstack: Make expunge optional and improve logging output. [GH-5099]
+* builder/cloudstack: Allow reading api_url, api_key, and secret_key from env vars. [GH-5124]
* builder/googlecompute: Allow using URL's for network and subnetwork. [GH-5035]
### BUG FIXES:
From 62dac4a16827e25da12835e7ae6fa1c786ccc39f Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 11:09:21 +0200
Subject: [PATCH 013/122] cloudstack: some updates after review
---
builder/cloudstack/step_create_instance.go | 3 +--
builder/cloudstack/step_prepare_config.go | 11 +----------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/builder/cloudstack/step_create_instance.go b/builder/cloudstack/step_create_instance.go
index 3cc3e5ac4..3b624de3c 100644
--- a/builder/cloudstack/step_create_instance.go
+++ b/builder/cloudstack/step_create_instance.go
@@ -62,7 +62,7 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
// Retrieve the zone object.
zone, _, err := client.Zone.GetZoneByID(config.Zone)
if err != nil {
- err := fmt.Errorf("Failed to get Zone by ID: %s - %s", config.Zone, err)
+ err := fmt.Errorf("Failed to get zone %s by ID: %s", config.Zone, err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
@@ -96,7 +96,6 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
ud, err := s.generateUserData(config.UserData, config.HTTPGetOnly)
if err != nil {
- err := fmt.Errorf("Failed to interpolate user_data: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
diff --git a/builder/cloudstack/step_prepare_config.go b/builder/cloudstack/step_prepare_config.go
index 80668cb8f..af28a76a8 100644
--- a/builder/cloudstack/step_prepare_config.go
+++ b/builder/cloudstack/step_prepare_config.go
@@ -26,7 +26,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if config.Project != "" && !isUUID(config.Project) {
config.Project, _, err = client.Project.GetProjectID(config.Project)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"project", config.Project, err})
}
}
@@ -34,7 +33,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if config.UserDataFile != "" {
userdata, err := ioutil.ReadFile(config.UserDataFile)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, fmt.Errorf("problem reading user data file: %s", err))
}
config.UserData = string(userdata)
@@ -43,7 +41,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if !isUUID(config.Zone) {
config.Zone, _, err = client.Zone.GetZoneID(config.Zone)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"zone", config.Zone, err})
}
}
@@ -52,7 +49,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if config.DiskOffering != "" && !isUUID(config.DiskOffering) {
config.DiskOffering, _, err = client.DiskOffering.GetDiskOfferingID(config.DiskOffering)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"disk offering", config.DiskOffering, err})
}
}
@@ -70,7 +66,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
ipAddrs, err := client.Address.ListPublicIpAddresses(p)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"IP address", config.PublicIPAddress, err})
}
if err == nil && ipAddrs.Count != 1 {
@@ -84,7 +79,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if !isUUID(config.Network) {
config.Network, _, err = client.Network.GetNetworkID(config.Network, cloudstack.WithProject(config.Project))
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"network", config.Network, err})
}
}
@@ -92,7 +86,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
if !isUUID(config.ServiceOffering) {
config.ServiceOffering, _, err = client.ServiceOffering.GetServiceOfferingID(config.ServiceOffering)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"service offering", config.ServiceOffering, err})
}
}
@@ -103,7 +96,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
} else {
config.instanceSource, _, err = client.ISO.GetIsoID(config.SourceISO, "executable", config.Zone)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"ISO", config.SourceISO, err})
}
}
@@ -115,7 +107,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
} else {
config.instanceSource, _, err = client.Template.GetTemplateID(config.SourceTemplate, "executable", config.Zone)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"template", config.SourceTemplate, err})
}
}
@@ -127,7 +118,6 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
types, err := client.GuestOS.ListOsTypes(p)
if err != nil {
- ui.Error(err.Error())
errs = packer.MultiErrorAppend(errs, &retrieveErr{"OS type", config.TemplateOS, err})
}
if err == nil && types.Count != 1 {
@@ -144,6 +134,7 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
// nil interface.
if errs != nil && len(errs.Errors) > 0 {
state.Put("error", errs)
+ ui.Error(errs.Error())
return multistep.ActionHalt
}
From 89b9b4c456a59124a4e0f46789e0779ca0b39e1a Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 07:50:54 +0200
Subject: [PATCH 014/122] cloudstack: Add default cidr_list [ 0.0.0.0/0 ]
---
builder/cloudstack/config.go | 8 ++++----
builder/cloudstack/config_test.go | 2 +-
website/source/docs/builders/cloudstack.html.md | 11 +++++------
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/builder/cloudstack/config.go b/builder/cloudstack/config.go
index a7193adf2..c662a4571 100644
--- a/builder/cloudstack/config.go
+++ b/builder/cloudstack/config.go
@@ -83,6 +83,10 @@ func NewConfig(raws ...interface{}) (*Config, error) {
c.AsyncTimeout = 30 * time.Minute
}
+ if len(c.CIDRList) == 0 && !c.UseLocalIPAddress {
+ c.CIDRList = []string{"0.0.0.0/0"}
+ }
+
if c.InstanceName == "" {
c.InstanceName = fmt.Sprintf("packer-%s", uuid.TimeOrderedUUID())
}
@@ -114,10 +118,6 @@ func NewConfig(raws ...interface{}) (*Config, error) {
errs = packer.MultiErrorAppend(errs, errors.New("a secret_key must be specified"))
}
- if len(c.CIDRList) == 0 && !c.UseLocalIPAddress {
- errs = packer.MultiErrorAppend(errs, errors.New("a cidr_list must be specified"))
- }
-
if c.Network == "" {
errs = packer.MultiErrorAppend(errs, errors.New("a network must be specified"))
}
diff --git a/builder/cloudstack/config_test.go b/builder/cloudstack/config_test.go
index ea98ad70d..54fb3248a 100644
--- a/builder/cloudstack/config_test.go
+++ b/builder/cloudstack/config_test.go
@@ -38,7 +38,7 @@ func TestNewConfig(t *testing.T) {
"source_template": "d31e6af5-94a8-4756-abf3-6493c38db7e5",
},
Nullify: "cidr_list",
- Err: true,
+ Err: false,
},
"no_cidr_list_with_use_local_ip_address": {
Config: map[string]interface{}{
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index f6a5fa9dd..eeba7e3c9 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -37,11 +37,6 @@ builder.
- `api_key` (string) - The API key used to sign all API requests.
-- `cidr_list` (array) - List of CIDR's that will have access to the new
- instance. This is needed in order for any provisioners to be able to
- connect to the instance. Usually this will be the NAT address of your
- current location. Only required when `use_local_ip_address` is `false`.
-
- `instance_name` (string) - The name of the instance. Defaults to
"packer-UUID" where UUID is dynamically generated.
@@ -76,6 +71,11 @@ builder.
- `async_timeout` (int) - The time duration to wait for async calls to
finish. Defaults to 30m.
+- `cidr_list` (array) - List of CIDR's that will have access to the new
+ instance. This is needed in order for any provisioners to be able to
+ connect to the instance. Defaults to `[ "0.0.0.0/0" ]`. Only required
+ when `use_local_ip_address` is `false`.
+
- `disk_offering` (string) - The name or ID of the disk offering used for the
instance. This option is only available (and also required) when using
`source_iso`.
@@ -161,7 +161,6 @@ Here is a basic example.
"secret_key": "YOUR_SECRET_KEY",
"disk_offering": "Small - 20GB",
- "cidr_list": ["0.0.0.0/0"],
"hypervisor": "KVM",
"network": "management",
"service_offering": "small",
From 05baf851f56b62f32c26bfc399bb5cb3614eb434 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 11:15:46 +0200
Subject: [PATCH 015/122] Updated CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c45b85c1f..a1c26ea1c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
* builder/cloudstack: Add support for using a HTTP server. [GH-5017]
* builder/cloudstack: Make expunge optional and improve logging output. [GH-5099]
* builder/cloudstack: Allow reading api_url, api_key, and secret_key from env vars. [GH-5124]
+* builder/cloudstack: Add default cidr_list [ 0.0.0.0/0 ]. [GH-5125]
* builder/googlecompute: Allow using URL's for network and subnetwork. [GH-5035]
### BUG FIXES:
From 3184cfcc4ffc31832c838200d18fc1be261512f5 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 13:23:08 +0200
Subject: [PATCH 016/122] Updated CHANGELOG.md
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a1c26ea1c..369685b80 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,7 +15,7 @@
* builder/docker: Fix windows filepath in docker-toolbox call. [GH-4887]
* builder/amazon: Fix panic that happens if ami_block_device_mappings is empty. [GH-5059]
* builder/azure: Write private SSH to file in debug mode. [GH-5070] [GH-5074]
-* builder/cloudstack: Properly report back errors. [GH-5103]
+* builder/cloudstack: Properly report back errors. [GH-5103] [GH-5123]
* builder/parallels: Skip missing paths when looking for unnecessary files. [GH-5058]
* builder/vmware-esxi: Fix VNC port discovery default timeout. [GH-5051]
From 291d9ccaf11948e6e6c50f1d78ac387c33c10d2c Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 16:01:08 +0200
Subject: [PATCH 017/122] Updated after review
---
website/source/docs/builders/cloudstack.html.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index b5bacb715..b172e89a0 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -50,9 +50,9 @@ builder.
- `service_offering` (string) - The name or ID of the service offering used
for the instance.
-- `soure_iso` (string) - The name or ID of an ISO that will be mounted before
+- `source_iso` (string) - The name or ID of an ISO that will be mounted before
booting the instance. This option is mutual exclusive with `source_template`.
- When then is used `disk_offering` and `hypervisor` is required.
+ When using `source_iso`, both `disk_offering` and `hypervisor` are required.
- `source_template` (string) - The name or ID of the template used as base
template for the instance. This option is mutual explusive with `source_iso`.
From f47c41372e9b3da3cc7fc05ae8212762661b7d45 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Fri, 14 Jul 2017 21:25:20 +0200
Subject: [PATCH 018/122] cloudstack: Add support for ssh_agent_auth
---
builder/cloudstack/builder.go | 9 ++-
builder/cloudstack/ssh.go | 70 +++++++++++++------
builder/cloudstack/step_prepare_config.go | 9 +++
.../source/docs/builders/cloudstack.html.md | 7 ++
4 files changed, 69 insertions(+), 26 deletions(-)
diff --git a/builder/cloudstack/builder.go b/builder/cloudstack/builder.go
index 593065537..369fe0cc6 100644
--- a/builder/cloudstack/builder.go
+++ b/builder/cloudstack/builder.go
@@ -66,9 +66,12 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
},
&stepSetupNetworking{},
&communicator.StepConnect{
- Config: &b.config.Comm,
- Host: commHost,
- SSHConfig: sshConfig,
+ Config: &b.config.Comm,
+ Host: commHost,
+ SSHConfig: SSHConfig(
+ b.config.Comm.SSHAgentAuth,
+ b.config.Comm.SSHUsername,
+ b.config.Comm.SSHPassword),
},
&common.StepProvision{},
&stepShutdownInstance{},
diff --git a/builder/cloudstack/ssh.go b/builder/cloudstack/ssh.go
index 83243a407..ab350d053 100644
--- a/builder/cloudstack/ssh.go
+++ b/builder/cloudstack/ssh.go
@@ -2,12 +2,14 @@ package cloudstack
import (
"fmt"
- "io/ioutil"
+ "net"
+ "os"
packerssh "github.com/hashicorp/packer/communicator/ssh"
"github.com/mitchellh/multistep"
"github.com/xanzy/go-cloudstack/cloudstack"
"golang.org/x/crypto/ssh"
+ "golang.org/x/crypto/ssh/agent"
)
func commHost(state multistep.StateBag) (string, error) {
@@ -26,32 +28,54 @@ func commHost(state multistep.StateBag) (string, error) {
return config.hostAddress, nil
}
-func sshConfig(state multistep.StateBag) (*ssh.ClientConfig, error) {
- config := state.Get("config").(*Config)
+func SSHConfig(useAgent bool, username, password string) func(state multistep.StateBag) (*ssh.ClientConfig, error) {
+ return func(state multistep.StateBag) (*ssh.ClientConfig, error) {
+ if useAgent {
+ authSock := os.Getenv("SSH_AUTH_SOCK")
+ if authSock == "" {
+ return nil, fmt.Errorf("SSH_AUTH_SOCK is not set")
+ }
- clientConfig := &ssh.ClientConfig{
- User: config.Comm.SSHUsername,
- Auth: []ssh.AuthMethod{
- ssh.Password(config.Comm.SSHPassword),
- ssh.KeyboardInteractive(
- packerssh.PasswordKeyboardInteractive(config.Comm.SSHPassword)),
- },
- HostKeyCallback: ssh.InsecureIgnoreHostKey(),
- }
+ sshAgent, err := net.Dial("unix", authSock)
+ if err != nil {
+ return nil, fmt.Errorf("Cannot connect to SSH Agent socket %q: %s", authSock, err)
+ }
- if config.Comm.SSHPrivateKey != "" {
- privateKey, err := ioutil.ReadFile(config.Comm.SSHPrivateKey)
- if err != nil {
- return nil, fmt.Errorf("Error loading configured private key file: %s", err)
+ return &ssh.ClientConfig{
+ User: username,
+ Auth: []ssh.AuthMethod{
+ ssh.PublicKeysCallback(agent.NewClient(sshAgent).Signers),
+ },
+ HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+ }, nil
}
- signer, err := ssh.ParsePrivateKey(privateKey)
- if err != nil {
- return nil, fmt.Errorf("Error setting up SSH config: %s", err)
+ privateKey, hasKey := state.GetOk("privateKey")
+
+ if hasKey {
+ signer, err := ssh.ParsePrivateKey([]byte(privateKey.(string)))
+ if err != nil {
+ return nil, fmt.Errorf("Error setting up SSH config: %s", err)
+ }
+
+ return &ssh.ClientConfig{
+ User: username,
+ Auth: []ssh.AuthMethod{
+ ssh.PublicKeys(signer),
+ },
+ HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+ }, nil
+
+ } else {
+
+ return &ssh.ClientConfig{
+ User: username,
+ HostKeyCallback: ssh.InsecureIgnoreHostKey(),
+ Auth: []ssh.AuthMethod{
+ ssh.Password(password),
+ ssh.KeyboardInteractive(
+ packerssh.PasswordKeyboardInteractive(password)),
+ }}, nil
}
-
- clientConfig.Auth = []ssh.AuthMethod{ssh.PublicKeys(signer)}
}
-
- return clientConfig, nil
}
diff --git a/builder/cloudstack/step_prepare_config.go b/builder/cloudstack/step_prepare_config.go
index af28a76a8..de397308e 100644
--- a/builder/cloudstack/step_prepare_config.go
+++ b/builder/cloudstack/step_prepare_config.go
@@ -22,6 +22,15 @@ func (s *stepPrepareConfig) Run(state multistep.StateBag) multistep.StepAction {
var err error
var errs *packer.MultiError
+ if config.Comm.SSHPrivateKey != "" {
+ privateKey, err := ioutil.ReadFile(config.Comm.SSHPrivateKey)
+ if err != nil {
+ errs = packer.MultiErrorAppend(errs, fmt.Errorf("Error loading configured private key file: %s", err))
+ }
+
+ state.Put("privateKey", privateKey)
+ }
+
// First get the project and zone UUID's so we can use them in other calls when needed.
if config.Project != "" && !isUUID(config.Project) {
config.Project, _, err = client.Project.GetProjectID(config.Project)
diff --git a/website/source/docs/builders/cloudstack.html.md b/website/source/docs/builders/cloudstack.html.md
index d0a10fb88..a3f701eaf 100644
--- a/website/source/docs/builders/cloudstack.html.md
+++ b/website/source/docs/builders/cloudstack.html.md
@@ -123,6 +123,13 @@ builder.
connecting any provisioners to. If not provided, a temporary public IP
address will be associated and released during the Packer run.
+- `ssh_agent_auth` (boolean) - If true, the local SSH agent will be used to
+ authenticate connections to the source instance. No temporary keypair will
+ be created, and the values of `ssh_password` and `ssh_private_key_file` will
+ be ignored. To use this option with a key pair already configured in the source
+ image, leave the `keypair` blank. To associate an existing key pair
+ with the source instance, set the `keypair` field to the name of the key pair.
+
- `ssl_no_verify` (boolean) - Set to `true` to skip SSL verification. Defaults
to `false`.
From a2f7a65e350e769112e7c79d2ee264d912903189 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Fri, 14 Jul 2017 13:58:28 -0700
Subject: [PATCH 019/122] fix communicator tests
---
builder/docker/communicator_test.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/builder/docker/communicator_test.go b/builder/docker/communicator_test.go
index 908593a5e..0c98dbbb2 100644
--- a/builder/docker/communicator_test.go
+++ b/builder/docker/communicator_test.go
@@ -71,6 +71,7 @@ func TestUploadDownload(t *testing.T) {
upload,
download,
},
+ ProvisionerTypes: []string{"", ""},
},
}
hook := &packer.DispatchHook{Mapping: hooks}
@@ -161,6 +162,7 @@ func TestLargeDownload(t *testing.T) {
downloadCupcake,
downloadBigcake,
},
+ ProvisionerTypes: []string{"", "", ""},
},
}
hook := &packer.DispatchHook{Mapping: hooks}
From 987347c7d50bfac5ecd06ead266c9c59b113abac Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Fri, 14 Jul 2017 14:13:21 -0700
Subject: [PATCH 020/122] clarify docs for encrypt_boot
---
website/source/docs/builders/amazon-chroot.html.md | 3 ++-
website/source/docs/builders/amazon-ebs.html.md | 3 ++-
website/source/docs/builders/amazon-ebssurrogate.html.md | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/website/source/docs/builders/amazon-chroot.html.md b/website/source/docs/builders/amazon-chroot.html.md
index ee2629578..36c0cde1f 100644
--- a/website/source/docs/builders/amazon-chroot.html.md
+++ b/website/source/docs/builders/amazon-chroot.html.md
@@ -142,7 +142,8 @@ each category, the available configuration keys are alphabetized.
- `encrypt_boot` (boolean) - Instruct packer to automatically create a copy of the
AMI with an encrypted boot volume (discarding the initial unencrypted AMI in the
- process). Default `false`.
+ process). Packer will always run this operation, even if the base
+ AMI has an encrypted boot volume to start with. Default `false`.
- `kms_key_id` (string) - The ID of the KMS key to use for boot volume encryption.
This only applies to the main `region`, other regions where the AMI will be copied
diff --git a/website/source/docs/builders/amazon-ebs.html.md b/website/source/docs/builders/amazon-ebs.html.md
index f028d5d80..dffd6f6f9 100644
--- a/website/source/docs/builders/amazon-ebs.html.md
+++ b/website/source/docs/builders/amazon-ebs.html.md
@@ -179,7 +179,8 @@ builder.
- `encrypt_boot` (boolean) - Instruct packer to automatically create a copy of the
AMI with an encrypted boot volume (discarding the initial unencrypted AMI in the
- process). Default `false`.
+ process). Packer will always run this operation, even if the base
+ AMI has an encrypted boot volume to start with. Default `false`.
- `kms_key_id` (string) - The ID of the KMS key to use for boot volume encryption.
This only applies to the main `region`, other regions where the AMI will be copied
diff --git a/website/source/docs/builders/amazon-ebssurrogate.html.md b/website/source/docs/builders/amazon-ebssurrogate.html.md
index abe3cac8a..071af814a 100644
--- a/website/source/docs/builders/amazon-ebssurrogate.html.md
+++ b/website/source/docs/builders/amazon-ebssurrogate.html.md
@@ -172,7 +172,8 @@ builder.
- `encrypt_boot` (boolean) - Instruct packer to automatically create a copy of the
AMI with an encrypted boot volume (discarding the initial unencrypted AMI in the
- process). Default `false`.
+ process). Packer will always run this operation, even if the base
+ AMI has an encrypted boot volume to start with. Default `false`.
- `kms_key_id` (string) - The ID of the KMS key to use for boot volume encryption.
This only applies to the main `region`, other regions where the AMI will be copied
From d08e47a853d78180b62f9ab1419d88985894cdd0 Mon Sep 17 00:00:00 2001
From: Matthew Aynalem
Date: Sun, 16 Jul 2017 09:19:38 -0700
Subject: [PATCH 021/122] docs salt-masterless provisioner - move required
element out of optional elements section
---
.../source/docs/provisioners/salt-masterless.html.md | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/website/source/docs/provisioners/salt-masterless.html.md b/website/source/docs/provisioners/salt-masterless.html.md
index 91d1fe7cc..443f37561 100644
--- a/website/source/docs/provisioners/salt-masterless.html.md
+++ b/website/source/docs/provisioners/salt-masterless.html.md
@@ -28,7 +28,13 @@ The example below is fully functional.
## Configuration Reference
The reference of available configuration options is listed below. The only
-required argument is the path to your local salt state tree.
+required element is "local_state_tree".
+
+Required:
+
+- `local_state_tree` (string) - The path to your local [state
+ tree](http://docs.saltstack.com/ref/states/highstate.html#the-salt-state-tree).
+ This will be uploaded to the `remote_state_tree` on the remote.
Optional:
@@ -54,10 +60,6 @@ Optional:
roots](http://docs.saltstack.com/ref/configuration/master.html#pillar-configuration).
This will be uploaded to the `remote_pillar_roots` on the remote.
-- `local_state_tree` (string) - The path to your local [state
- tree](http://docs.saltstack.com/ref/states/highstate.html#the-salt-state-tree).
- This will be uploaded to the `remote_state_tree` on the remote.
-
- `custom_state` (string) - A state to be run instead of `state.highstate`.
Defaults to `state.highstate` if unspecified.
From 792977906f2f4234b4d3f9741292005bbef4a0b0 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Mon, 17 Jul 2017 18:42:03 +0200
Subject: [PATCH 022/122] Updated CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 369685b80..80770b798 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
* builder/cloudstack: Make expunge optional and improve logging output. [GH-5099]
* builder/cloudstack: Allow reading api_url, api_key, and secret_key from env vars. [GH-5124]
* builder/cloudstack: Add default cidr_list [ 0.0.0.0/0 ]. [GH-5125]
+* builder/cloudstack: Add support for ssh_agent_auth. [GH-5130]
* builder/googlecompute: Allow using URL's for network and subnetwork. [GH-5035]
### BUG FIXES:
From d48ad02fbb102e4e8320509eb60a72d6753d34c6 Mon Sep 17 00:00:00 2001
From: Miguel David
Date: Mon, 17 Jul 2017 18:23:13 +0100
Subject: [PATCH 023/122] Removed MAINTAINER from changes
Removed maintainer from changes array since "Stderr: Error response from daemon: maintainer is not a valid change command"
---
website/source/docs/builders/docker.html.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/website/source/docs/builders/docker.html.md b/website/source/docs/builders/docker.html.md
index 3b62a6f2f..c82765406 100644
--- a/website/source/docs/builders/docker.html.md
+++ b/website/source/docs/builders/docker.html.md
@@ -80,7 +80,6 @@ from ubuntu as an simple example:
"LABEL version=1.0",
"ONBUILD RUN date",
"CMD [\"nginx\", \"-g\", \"daemon off;\"]",
- "MAINTAINER Captain Kirk",
"ENTRYPOINT /var/www/start.sh"
]
}
From 3bfe4aacd9a5390da42d2d9afb6ffd33a01b2c48 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Mon, 17 Jul 2017 16:22:58 -0700
Subject: [PATCH 024/122] update changelog in prep for 1.0.3
---
CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++------------
1 file changed, 36 insertions(+), 12 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80770b798..be9fcd0d3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,24 +1,48 @@
-## (UNRELEASED)
+## 1.0.3 (July 17, 2017)
### IMRPOVEMENTS:
-* core: Experimental Android ARM support. [GH-5111]
-* postprocessor/atlas: Disallow pushing vagrant.box artifacts now that Vagrant cloud is live. [GH-4780]
-* builder/cloudstack: Add support for using a HTTP server. [GH-5017]
-* builder/cloudstack: Make expunge optional and improve logging output. [GH-5099]
-* builder/cloudstack: Allow reading api_url, api_key, and secret_key from env vars. [GH-5124]
+* builder/Azure: Update to latest Azure SDK, enabling support for managed
+ disks. [GH-4511]
* builder/cloudstack: Add default cidr_list [ 0.0.0.0/0 ]. [GH-5125]
* builder/cloudstack: Add support for ssh_agent_auth. [GH-5130]
-* builder/googlecompute: Allow using URL's for network and subnetwork. [GH-5035]
+* builder/cloudstack: Add support for using a HTTP server. [GH-5017]
+* builder/cloudstack: Allow reading api_url, api_key, and secret_key from env
+ vars. [GH-5124]
+* builder/cloudstack: Make expunge optional and improve logging output.
+ [GH-5099]
+* builder/googlecompute: Allow using URL's for network and subnetwork.
+ [GH-5035]
+* builder/hyperv: Add support for floppy_dirs with hyperv-iso builder.
+* builder/hyperv: Add support for override of system %temp% path.
+* core: Experimental Android ARM support. [GH-5111]
+* post-processor/atlas: Disallow packer push of vagrant.box artifacts to atlas.
+ [GH-4780]
+* postprocessor/atlas: Disallow pushing vagrant.box artifacts now that Vagrant
+ cloud is live. [GH-4780]
### BUG FIXES:
-* post-processor/checksum: Fix interpolation of "output". [GH-5112]
-* builder/hyperv: Verify membership in the group Hyper-V Administrators by SID not name. [GH-5022]
-* builder/docker: Fix windows filepath in docker-toolbox call. [GH-4887]
-* builder/amazon: Fix panic that happens if ami_block_device_mappings is empty. [GH-5059]
+* builder/amazon: Fix panic that happens if ami_block_device_mappings is empty.
+ [GH-5059]
* builder/azure: Write private SSH to file in debug mode. [GH-5070] [GH-5074]
* builder/cloudstack: Properly report back errors. [GH-5103] [GH-5123]
-* builder/parallels: Skip missing paths when looking for unnecessary files. [GH-5058]
+* builder/docker: Fix windows filepath in docker-toolbox call [GH-4887]
+* builder/docker: Fix windows filepath in docker-toolbox call. [GH-4887]
+* builder/hyperv: Use SID to verify membersip in Admin group, fixing for non-
+ english users. [GH-5022]
+* builder/hyperv: Verify membership in the group Hyper-V Administrators by SID
+ not name. [GH-5022]
+* builder/openstack: Update gophercloud version, fixing builds > 1 hr long.
+ [GH-5046]
+* builder/parallels: Skip missing paths when looking for unnecessary files.
+ [GH-5058]
* builder/vmware-esxi: Fix VNC port discovery default timeout. [GH-5051]
+* communicator/ssh: Add ProvisionerTypes to communicator tests, resolving panic
+ [GH-5116]
+* communicator/ssh: Resolve race condition that sometimes truncates ssh
+ provisioner stdout [GH-4719]
+* post-processor/checksum: Fix interpolation of "output". [GH-5112]
+* push: Push vars in packer config, not just those set from command line and in
+ var-file. [GH-4992]
## 1.0.2 (June 21, 2017)
From e6b809dc3229ac4dd9667f6832970effe8413c44 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Mon, 17 Jul 2017 16:24:21 -0700
Subject: [PATCH 025/122] update version to 1.0.3
---
version/version.go | 2 +-
website/config.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/version/version.go b/version/version.go
index 34863e0ad..1e179b245 100644
--- a/version/version.go
+++ b/version/version.go
@@ -14,7 +14,7 @@ const Version = "1.0.3"
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc.
-const VersionPrerelease = "dev"
+const VersionPrerelease = ""
func FormattedVersion() string {
var versionString bytes.Buffer
diff --git a/website/config.rb b/website/config.rb
index d0e359056..482309b3b 100644
--- a/website/config.rb
+++ b/website/config.rb
@@ -2,7 +2,7 @@ set :base_url, "https://www.packer.io/"
activate :hashicorp do |h|
h.name = "packer"
- h.version = "1.0.2"
+ h.version = "1.0.3"
h.github_slug = "hashicorp/packer"
h.website_root = "website"
end
From c0ddb4a044551f3c967ca36f612a33ce13e215f0 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Mon, 17 Jul 2017 16:55:09 -0700
Subject: [PATCH 026/122] Cut version 1.0.3
From ba3d4c8cd28c50e05fe6cff070642ef65346b720 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Mon, 17 Jul 2017 17:08:47 -0700
Subject: [PATCH 027/122] updating to dev version 1.0.4
---
version/version.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/version/version.go b/version/version.go
index 1e179b245..83d206c8b 100644
--- a/version/version.go
+++ b/version/version.go
@@ -9,12 +9,12 @@ import (
var GitCommit string
// The main version number that is being run at the moment.
-const Version = "1.0.3"
+const Version = "1.0.4"
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc.
-const VersionPrerelease = ""
+const VersionPrerelease = "dev"
func FormattedVersion() string {
var versionString bytes.Buffer
From 07decf99adc272a386e3a013846248810d9aa690 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Wed, 19 Jul 2017 10:28:13 -0700
Subject: [PATCH 028/122] quick patch to make ansible work again
---
packer/rpc/communicator.go | 2 --
1 file changed, 2 deletions(-)
diff --git a/packer/rpc/communicator.go b/packer/rpc/communicator.go
index 816e2c7d8..bb085bd49 100644
--- a/packer/rpc/communicator.go
+++ b/packer/rpc/communicator.go
@@ -71,10 +71,8 @@ func (c *communicator) Start(cmd *packer.RemoteCmd) (err error) {
var wg sync.WaitGroup
if cmd.Stdin != nil {
- wg.Add(1)
args.StdinStreamId = c.mux.NextId()
go func() {
- defer wg.Done()
serveSingleCopy("stdin", c.mux, args.StdinStreamId, nil, cmd.Stdin)
}()
}
From 62da0e76072061a165c28d3d9cc21391cf45ed25 Mon Sep 17 00:00:00 2001
From: zhuzhih2017
Date: Thu, 20 Jul 2017 11:13:59 +0800
Subject: [PATCH 029/122] fix keypair error for debug mode and increate the
wait time to avoid the timeout failure, add the more example
---
builder/alicloud/ecs/builder.go | 5 +-
builder/alicloud/ecs/step_attach_keypair.go | 7 +-
.../ecs/step_config_security_group.go | 4 +-
builder/alicloud/ecs/step_config_vpc.go | 2 +-
examples/alicloud/basic/alicloud.json | 6 +-
examples/alicloud/basic/alicloud_windows.json | 2 +-
.../basic/alicloud_with_data_disk.json | 4 +-
examples/alicloud/chef/alicloud.json | 2 +-
examples/alicloud/chef/chef.sh | 1 +
examples/alicloud/jenkins/alicloud.json | 31 +++++++++
examples/alicloud/jenkins/jenkins.sh | 48 +++++++++++++
examples/alicloud/local/centos.json | 60 ++++++++++++++++
.../alicloud/local/http/centos-6.8/ks.cfg | 69 +++++++++++++++++++
13 files changed, 226 insertions(+), 15 deletions(-)
create mode 100644 examples/alicloud/jenkins/alicloud.json
create mode 100644 examples/alicloud/jenkins/jenkins.sh
create mode 100644 examples/alicloud/local/centos.json
create mode 100644 examples/alicloud/local/http/centos-6.8/ks.cfg
diff --git a/builder/alicloud/ecs/builder.go b/builder/alicloud/ecs/builder.go
index af40c92fc..8650dc2d1 100644
--- a/builder/alicloud/ecs/builder.go
+++ b/builder/alicloud/ecs/builder.go
@@ -5,6 +5,7 @@ package ecs
import (
"log"
+ "fmt"
"github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/helper/communicator"
"github.com/hashicorp/packer/helper/config"
@@ -98,8 +99,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
PrivateKeyFile: b.config.Comm.SSHPrivateKey,
TemporaryKeyPairName: b.config.TemporaryKeyPairName,
SSHAgentAuth: b.config.Comm.SSHAgentAuth,
- //DebugKeyPath: b.config.Com
- RegionId: b.config.AlicloudRegion,
+ DebugKeyPath: fmt.Sprintf("ecs_%s.pem", b.config.PackerBuildName),
+ RegionId: b.config.AlicloudRegion,
},
}
if b.chooseNetworkType() == VpcNet {
diff --git a/builder/alicloud/ecs/step_attach_keypair.go b/builder/alicloud/ecs/step_attach_keypair.go
index 551c74cdf..9b14a2d88 100644
--- a/builder/alicloud/ecs/step_attach_keypair.go
+++ b/builder/alicloud/ecs/step_attach_keypair.go
@@ -7,6 +7,7 @@ import (
"github.com/denverdino/aliyungo/ecs"
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
+ "time"
)
type stepAttachKeyPar struct {
@@ -21,7 +22,7 @@ func (s *stepAttachKeyPar) Run(state multistep.StateBag) multistep.StepAction {
client := state.Get("client").(*ecs.Client)
config := state.Get("config").(Config)
instance := state.Get("instance").(*ecs.InstanceAttributesType)
- retry_times := 3
+ start := time.Now().Add(120 * time.Second)
for {
err := client.AttachKeyPair(&ecs.AttachKeyPairArgs{RegionId: common.Region(config.AlicloudRegion),
KeyPairName: keyPairName, InstanceIds: "[\"" + instance.InstanceId + "\"]"})
@@ -29,8 +30,8 @@ func (s *stepAttachKeyPar) Run(state multistep.StateBag) multistep.StepAction {
e, _ := err.(*common.Error)
if (!(e.Code == "MissingParameter" || e.Code == "DependencyViolation.WindowsInstance" ||
e.Code == "InvalidKeyPairName.NotFound" || e.Code == "InvalidRegionId.NotFound")) &&
- retry_times > 0 {
- retry_times = retry_times - 1
+ time.Now().Before(start) {
+ time.Sleep(5 * time.Second)
continue
}
err := fmt.Errorf("Error attaching keypair %s to instance %s : %s",
diff --git a/builder/alicloud/ecs/step_config_security_group.go b/builder/alicloud/ecs/step_config_security_group.go
index 6bfbb386a..4d6b14323 100644
--- a/builder/alicloud/ecs/step_config_security_group.go
+++ b/builder/alicloud/ecs/step_config_security_group.go
@@ -121,12 +121,12 @@ func (s *stepConfigAlicloudSecurityGroup) Cleanup(state multistep.StateBag) {
ui := state.Get("ui").(packer.Ui)
message(state, "security group")
- start := time.Now().Add(10 * time.Second)
+ start := time.Now().Add(120 * time.Second)
for {
if err := client.DeleteSecurityGroup(common.Region(s.RegionId), s.SecurityGroupId); err != nil {
e, _ := err.(*common.Error)
if e.Code == "DependencyViolation" && time.Now().Before(start) {
- time.Sleep(1 * time.Second)
+ time.Sleep(5 * time.Second)
continue
}
ui.Error(fmt.Sprintf("Failed to delete security group, it may still be around: %s", err))
diff --git a/builder/alicloud/ecs/step_config_vpc.go b/builder/alicloud/ecs/step_config_vpc.go
index 0dce325a4..926fc61a4 100644
--- a/builder/alicloud/ecs/step_config_vpc.go
+++ b/builder/alicloud/ecs/step_config_vpc.go
@@ -78,7 +78,7 @@ func (s *stepConfigAlicloudVPC) Cleanup(state multistep.StateBag) {
ui := state.Get("ui").(packer.Ui)
message(state, "VPC")
- start := time.Now().Add(10 * time.Second)
+ start := time.Now().Add(60 * time.Second)
for {
if err := client.DeleteVpc(s.VpcId); err != nil {
e, _ := err.(*common.Error)
diff --git a/examples/alicloud/basic/alicloud.json b/examples/alicloud/basic/alicloud.json
index 9c7384d98..d96cafa57 100644
--- a/examples/alicloud/basic/alicloud.json
+++ b/examples/alicloud/basic/alicloud.json
@@ -8,8 +8,8 @@
"access_key":"{{user `access_key`}}",
"secret_key":"{{user `secret_key`}}",
"region":"cn-beijing",
- "image_name":"packer_basi",
- "source_image":"ubuntu_16_0402_64_40G_base_20170222.vhd",
+ "image_name":"packer_basic",
+ "source_image":"centos_7_2_64_40G_base_20170222.vhd",
"ssh_username":"root",
"instance_type":"ecs.n1.tiny",
"io_optimized":"true"
@@ -18,7 +18,7 @@
"type": "shell",
"inline": [
"sleep 30",
- "apt-get update -yy"
+ "yum install redis.x86_64 -y"
]
}]
}
diff --git a/examples/alicloud/basic/alicloud_windows.json b/examples/alicloud/basic/alicloud_windows.json
index bb1f16773..6a530ef36 100644
--- a/examples/alicloud/basic/alicloud_windows.json
+++ b/examples/alicloud/basic/alicloud_windows.json
@@ -9,7 +9,7 @@
"secret_key":"{{user `secret_key`}}",
"region":"cn-beijing",
"image_name":"packer_test",
- "source_image":"win2012_64_datactr_r2_en_40G_alibase_20160622.vhd",
+ "source_image":"win2008r2_64_ent_sp1_zh-cn_40G_alibase_20170622.vhd",
"instance_type":"ecs.n1.tiny",
"io_optimized":"true",
"image_force_delete":"true",
diff --git a/examples/alicloud/basic/alicloud_with_data_disk.json b/examples/alicloud/basic/alicloud_with_data_disk.json
index 2d99af8fb..88412d98a 100644
--- a/examples/alicloud/basic/alicloud_with_data_disk.json
+++ b/examples/alicloud/basic/alicloud_with_data_disk.json
@@ -9,7 +9,7 @@
"secret_key":"{{user `secret_key`}}",
"region":"cn-beijing",
"image_name":"packer_with_data_disk",
- "source_image":"ubuntu_16_0402_64_40G_base_20170222.vhd",
+ "source_image":"centos_7_2_64_40G_base_20170222.vhd",
"ssh_username":"root",
"instance_type":"ecs.n1.tiny",
"io_optimized":"true",
@@ -19,7 +19,7 @@
"type": "shell",
"inline": [
"sleep 30",
- "apt-get update -yy"
+ "yum install redis.x86_64 -y"
]
}]
}
diff --git a/examples/alicloud/chef/alicloud.json b/examples/alicloud/chef/alicloud.json
index 8bfcfbc8b..c04e0600f 100644
--- a/examples/alicloud/chef/alicloud.json
+++ b/examples/alicloud/chef/alicloud.json
@@ -9,7 +9,7 @@
"secret_key":"{{user `secret_key`}}",
"region":"cn-beijing",
"image_name":"packer_chef2",
- "source_image":"ubuntu_14_0405_64_40G_base_20170222.vhd",
+ "source_image":"ubuntu_14_0405_64_40G_alibase_20170625.vhd",
"ssh_username":"root",
"instance_type":"ecs.n1.medium",
"io_optimized":"true",
diff --git a/examples/alicloud/chef/chef.sh b/examples/alicloud/chef/chef.sh
index 6d7ecac86..6d678b7cc 100644
--- a/examples/alicloud/chef/chef.sh
+++ b/examples/alicloud/chef/chef.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+#if the related deb pkg not found, please replace with it other avaiable repository url
HOSTNAME=`ifconfig eth1|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1`
if [ not $HOSTNAME ] ; then
HOSTNAME=`ifconfig eth0|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1`
diff --git a/examples/alicloud/jenkins/alicloud.json b/examples/alicloud/jenkins/alicloud.json
new file mode 100644
index 000000000..481c39b0a
--- /dev/null
+++ b/examples/alicloud/jenkins/alicloud.json
@@ -0,0 +1,31 @@
+{
+ "variables": {
+ "access_key": "{{env `ALICLOUD_ACCESS_KEY`}}",
+ "secret_key": "{{env `ALICLOUD_SECRET_KEY`}}"
+ },
+ "builders": [{
+ "type":"alicloud-ecs",
+ "access_key":"{{user `access_key`}}",
+ "secret_key":"{{user `secret_key`}}",
+ "region":"cn-beijing",
+ "image_name":"packer_jenkins",
+ "source_image":"ubuntu_14_0405_64_40G_alibase_20170625.vhd",
+ "ssh_username":"root",
+ "instance_type":"ecs.n1.medium",
+ "io_optimized":"true",
+ "image_force_delete":"true",
+ "ssh_password":"Test12345"
+ }],
+ "provisioners": [{
+ "type": "file",
+ "source": "examples/alicloud/jenkins/jenkins.sh",
+ "destination": "/root/"
+ },{
+ "type": "shell",
+ "inline": [
+ "cd /root/",
+ "chmod 755 jenkins.sh",
+ "./jenkins.sh"
+ ]
+ }]
+}
diff --git a/examples/alicloud/jenkins/jenkins.sh b/examples/alicloud/jenkins/jenkins.sh
new file mode 100644
index 000000000..af3eb51a3
--- /dev/null
+++ b/examples/alicloud/jenkins/jenkins.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+JENKINS_URL='http://mirrors.jenkins.io/war-stable/2.32.2/jenkins.war'
+
+TOMCAT_VERSION='7.0.77'
+TOMCAT_NAME="apache-tomcat-$TOMCAT_VERSION"
+TOMCAT_PACKAGE="$TOMCAT_NAME.tar.gz"
+TOMCAT_URL="http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v$TOMCAT_VERSION/bin/$TOMCAT_PACKAGE"
+TOMCAT_PATH="/opt/$TOMCAT_NAME"
+
+#install jdk
+if grep -Eqi "Ubuntu|Debian|Raspbian" /etc/issue || grep -Eq "Ubuntu|Debian|Raspbian" /etc/*-release; then
+ sudo apt-get update -y
+ sudo apt-get install -y openjdk-7-jdk
+elif grep -Eqi "CentOS|Fedora|Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "CentOS|Fedora|Red Hat Enterprise Linux Server" /etc/*-release; then
+ sudo yum update -y
+ sudo yum install -y openjdk-7-jdk
+else
+ echo "Unknown OS type."
+fi
+
+#install jenkins server
+mkdir ~/work
+cd ~/work
+
+#install tomcat
+wget $TOMCAT_URL
+tar -zxvf $TOMCAT_PACKAGE
+mv $TOMCAT_NAME /opt
+
+#install
+wget $JENKINS_URL
+mv jenkins.war $TOMCAT_PATH/webapps/
+
+#set emvironment
+echo "TOMCAT_PATH=\"$TOMCAT_PATH\"">>/etc/profile
+echo "JENKINS_HOME=\"$TOMCAT_PATH/webapps/jenkins\"">>/etc/profile
+echo PATH="\"\$PATH:\$TOMCAT_PATH:\$JENKINS_HOME\"">>/etc/profile
+. /etc/profile
+
+#start tomcat & jenkins
+$TOMCAT_PATH/bin/startup.sh
+
+#set start on boot
+sed -i "/#!\/bin\/sh/a$TOMCAT_PATH/bin/startup.sh" /etc/rc.local
+
+#clean
+rm -rf ~/work
diff --git a/examples/alicloud/local/centos.json b/examples/alicloud/local/centos.json
new file mode 100644
index 000000000..45c19b3dc
--- /dev/null
+++ b/examples/alicloud/local/centos.json
@@ -0,0 +1,60 @@
+{"variables": {
+ "box_basename": "centos-6.8",
+ "build_timestamp": "{{isotime \"20060102150405\"}}",
+ "cpus": "1",
+ "disk_size": "4096",
+ "git_revision": "__unknown_git_revision__",
+ "headless": "",
+ "http_proxy": "{{env `http_proxy`}}",
+ "https_proxy": "{{env `https_proxy`}}",
+ "iso_checksum": "0ca12fe5f28c2ceed4f4084b41ff8a0b",
+ "iso_checksum_type": "md5",
+ "iso_name": "CentOS-6.8-x86_64-minimal.iso",
+ "ks_path": "centos-6.8/ks.cfg",
+ "memory": "512",
+ "metadata": "floppy/dummy_metadata.json",
+ "mirror": "http://mirrors.aliyun.com/centos",
+ "mirror_directory": "6.8/isos/x86_64",
+ "name": "centos-6.8",
+ "no_proxy": "{{env `no_proxy`}}",
+ "template": "centos-6.8-x86_64",
+ "version": "2.1.TIMESTAMP"
+ },
+ "builders":[
+ {
+ "boot_command": [
+ " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "packer-{{user `template`}}-qemu",
+ "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "root",
+ "ssh_wait_timeout": "10000s",
+ "type": "qemu",
+ "vm_name": "{{ user `template` }}.raw",
+ "net_device": "virtio-net",
+ "disk_interface": "virtio",
+ "format": "raw"
+ }
+ ],
+"post-processors":[
+ {
+ "type":"alicloud-import",
+ "oss_bucket_name": "packer",
+ "image_name": "packer_import",
+ "image_os_type": "linux",
+ "image_platform": "CentOS",
+ "image_architecture": "x86_64",
+ "image_system_size": "40",
+ "region":"cn-beijing"
+ }
+ ]
+}
diff --git a/examples/alicloud/local/http/centos-6.8/ks.cfg b/examples/alicloud/local/http/centos-6.8/ks.cfg
new file mode 100644
index 000000000..90864b006
--- /dev/null
+++ b/examples/alicloud/local/http/centos-6.8/ks.cfg
@@ -0,0 +1,69 @@
+install
+cdrom
+lang en_US.UTF-8
+keyboard us
+network --bootproto=dhcp
+rootpw vagrant
+firewall --disabled
+selinux --permissive
+timezone UTC
+unsupported_hardware
+bootloader --location=mbr
+text
+skipx
+zerombr
+clearpart --all --initlabel
+autopart
+auth --enableshadow --passalgo=sha512 --kickstart
+firstboot --disabled
+reboot
+user --name=vagrant --plaintext --password vagrant
+key --skip
+
+%packages --nobase --ignoremissing --excludedocs
+# vagrant needs this to copy initial files via scp
+openssh-clients
+sudo
+kernel-headers
+kernel-devel
+gcc
+make
+perl
+wget
+nfs-utils
+-fprintd-pam
+-intltool
+
+# unnecessary firmware
+-aic94xx-firmware
+-atmel-firmware
+-b43-openfwwf
+-bfa-firmware
+-ipw2100-firmware
+-ipw2200-firmware
+-ivtv-firmware
+-iwl100-firmware
+-iwl1000-firmware
+-iwl3945-firmware
+-iwl4965-firmware
+-iwl5000-firmware
+-iwl5150-firmware
+-iwl6000-firmware
+-iwl6000g2a-firmware
+-iwl6050-firmware
+-libertas-usb8388-firmware
+-ql2100-firmware
+-ql2200-firmware
+-ql23xx-firmware
+-ql2400-firmware
+-ql2500-firmware
+-rt61pci-firmware
+-rt73usb-firmware
+-xorg-x11-drv-ati-firmware
+-zd1211-firmware
+
+%post
+# Force to set SELinux to a permissive mode
+sed -i -e 's/\(^SELINUX=\).*$/\1permissive/' /etc/selinux/config
+# sudo
+echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
From 8cf8079cadf4ea9ecd16f486f142e2f87712d399 Mon Sep 17 00:00:00 2001
From: zhuzhih2017
Date: Fri, 21 Jul 2017 07:44:32 +0800
Subject: [PATCH 030/122] rename variable name to avoid misunderstanding
---
builder/alicloud/ecs/step_attach_keypair.go | 4 ++--
builder/alicloud/ecs/step_config_security_group.go | 4 ++--
builder/alicloud/ecs/step_config_vpc.go | 4 ++--
builder/alicloud/ecs/step_config_vswitch.go | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/builder/alicloud/ecs/step_attach_keypair.go b/builder/alicloud/ecs/step_attach_keypair.go
index 9b14a2d88..a6cc01381 100644
--- a/builder/alicloud/ecs/step_attach_keypair.go
+++ b/builder/alicloud/ecs/step_attach_keypair.go
@@ -22,7 +22,7 @@ func (s *stepAttachKeyPar) Run(state multistep.StateBag) multistep.StepAction {
client := state.Get("client").(*ecs.Client)
config := state.Get("config").(Config)
instance := state.Get("instance").(*ecs.InstanceAttributesType)
- start := time.Now().Add(120 * time.Second)
+ timeoutPoint := time.Now().Add(120 * time.Second)
for {
err := client.AttachKeyPair(&ecs.AttachKeyPairArgs{RegionId: common.Region(config.AlicloudRegion),
KeyPairName: keyPairName, InstanceIds: "[\"" + instance.InstanceId + "\"]"})
@@ -30,7 +30,7 @@ func (s *stepAttachKeyPar) Run(state multistep.StateBag) multistep.StepAction {
e, _ := err.(*common.Error)
if (!(e.Code == "MissingParameter" || e.Code == "DependencyViolation.WindowsInstance" ||
e.Code == "InvalidKeyPairName.NotFound" || e.Code == "InvalidRegionId.NotFound")) &&
- time.Now().Before(start) {
+ time.Now().Before(timeoutPoint) {
time.Sleep(5 * time.Second)
continue
}
diff --git a/builder/alicloud/ecs/step_config_security_group.go b/builder/alicloud/ecs/step_config_security_group.go
index 4d6b14323..dc8c083b2 100644
--- a/builder/alicloud/ecs/step_config_security_group.go
+++ b/builder/alicloud/ecs/step_config_security_group.go
@@ -121,11 +121,11 @@ func (s *stepConfigAlicloudSecurityGroup) Cleanup(state multistep.StateBag) {
ui := state.Get("ui").(packer.Ui)
message(state, "security group")
- start := time.Now().Add(120 * time.Second)
+ timeoutPoint := time.Now().Add(120 * time.Second)
for {
if err := client.DeleteSecurityGroup(common.Region(s.RegionId), s.SecurityGroupId); err != nil {
e, _ := err.(*common.Error)
- if e.Code == "DependencyViolation" && time.Now().Before(start) {
+ if e.Code == "DependencyViolation" && time.Now().Before(timeoutPoint) {
time.Sleep(5 * time.Second)
continue
}
diff --git a/builder/alicloud/ecs/step_config_vpc.go b/builder/alicloud/ecs/step_config_vpc.go
index 926fc61a4..c4bdd59a3 100644
--- a/builder/alicloud/ecs/step_config_vpc.go
+++ b/builder/alicloud/ecs/step_config_vpc.go
@@ -78,13 +78,13 @@ func (s *stepConfigAlicloudVPC) Cleanup(state multistep.StateBag) {
ui := state.Get("ui").(packer.Ui)
message(state, "VPC")
- start := time.Now().Add(60 * time.Second)
+ timeoutPoint := time.Now().Add(60 * time.Second)
for {
if err := client.DeleteVpc(s.VpcId); err != nil {
e, _ := err.(*common.Error)
if (e.Code == "DependencyViolation.Instance" || e.Code == "DependencyViolation.RouteEntry" ||
e.Code == "DependencyViolation.VSwitch" ||
- e.Code == "DependencyViolation.SecurityGroup") && time.Now().Before(start) {
+ e.Code == "DependencyViolation.SecurityGroup") && time.Now().Before(timeoutPoint) {
time.Sleep(1 * time.Second)
continue
}
diff --git a/builder/alicloud/ecs/step_config_vswitch.go b/builder/alicloud/ecs/step_config_vswitch.go
index 0705fb45a..734647e07 100644
--- a/builder/alicloud/ecs/step_config_vswitch.go
+++ b/builder/alicloud/ecs/step_config_vswitch.go
@@ -130,13 +130,13 @@ func (s *stepConfigAlicloudVSwitch) Cleanup(state multistep.StateBag) {
client := state.Get("client").(*ecs.Client)
ui := state.Get("ui").(packer.Ui)
message(state, "vSwitch")
- start := time.Now().Add(10 * time.Second)
+ timeoutPoint := time.Now().Add(10 * time.Second)
for {
if err := client.DeleteVSwitch(s.VSwitchId); err != nil {
e, _ := err.(*common.Error)
if (e.Code == "IncorrectVSwitchStatus" || e.Code == "DependencyViolation" ||
e.Code == "DependencyViolation.HaVip" ||
- e.Code == "IncorretRouteEntryStatus") && time.Now().Before(start) {
+ e.Code == "IncorretRouteEntryStatus") && time.Now().Before(timeoutPoint) {
time.Sleep(1 * time.Second)
continue
}
From 0fe22d55d78033633c9ee82f82fe83518ff051e4 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Sat, 22 Jul 2017 08:14:27 +0200
Subject: [PATCH 031/122] amazon-ebs: docs: indentation fix
---
website/source/docs/builders/amazon-ebs.html.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/website/source/docs/builders/amazon-ebs.html.md b/website/source/docs/builders/amazon-ebs.html.md
index dffd6f6f9..0bdb3021c 100644
--- a/website/source/docs/builders/amazon-ebs.html.md
+++ b/website/source/docs/builders/amazon-ebs.html.md
@@ -446,8 +446,8 @@ images exist when this template is run:
"ssh_username": "ubuntu",
"ami_name": "packer-quick-start {{timestamp}}",
"tags": {
- "OS_Version": "Ubuntu",
- "Release": "Latest"
+ "OS_Version": "Ubuntu",
+ "Release": "Latest"
}
}
```
From e7b078538041517c3bab2f623ec890c2b54b55a6 Mon Sep 17 00:00:00 2001
From: Billie Cleek
Date: Sat, 22 Jul 2017 08:45:34 -0700
Subject: [PATCH 032/122] support default GOPATH
set GOPATH as an explicit Make variable instead of relying on the
environment variable so that contributors that use the default GOPATH
without setting the GOPATH environment variable can build the dev
target.
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index f86b30e06..d7f3578ec 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ GITBRANCH:=$(shell git symbolic-ref --short HEAD 2>/dev/null)
GOFMT_FILES?=$$(find . -not -path "./vendor/*" -name "*.go")
GOOS=$(shell go env GOOS)
GOARCH=$(shell go env GOARCH)
+GOPATH=$(shell go env GOPATH)
# Get the git commit
GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
From dcbf4d5f9a934f88b950bbb4625565f1df63c7a3 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Sun, 23 Jul 2017 07:47:53 +0200
Subject: [PATCH 033/122] digitalocean: docs: Added missing newline
---
website/source/docs/builders/digitalocean.html.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/website/source/docs/builders/digitalocean.html.md b/website/source/docs/builders/digitalocean.html.md
index f42186af4..7af506319 100644
--- a/website/source/docs/builders/digitalocean.html.md
+++ b/website/source/docs/builders/digitalocean.html.md
@@ -82,6 +82,7 @@ builder.
default state timeout is "6m".
- `user_data` (string) - User data to launch with the Droplet.
+
- `user_data_file` (string) - Path to a file that will be used for the user
data when launching the Droplet.
From b9d1fada258219023a7894adc49eb221b7c4455a Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Mon, 24 Jul 2017 13:27:31 -0700
Subject: [PATCH 034/122] go <= 1.6 are no longer supported
---
CONTRIBUTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b4025859e..acababe3f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -54,7 +54,7 @@ If you have never worked with Go before, you will have to complete the
following steps in order to be able to compile and test Packer. These instructions target POSIX-like environments (Mac OS X, Linux, Cygwin, etc.) so you may need to adjust them for Windows or other shells.
1. [Download](https://golang.org/dl) and install Go. The instructions below
- are for go 1.6. Earlier versions of Go are no longer supported.
+ are for go 1.7. Earlier versions of Go are no longer supported.
2. Set and export the `GOPATH` environment variable and update your `PATH`. For
example, you can add to your `.bash_profile`.
From 6d997d82e019e1c98475dc6261224f74deecbf6f Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Mon, 24 Jul 2017 14:24:28 -0700
Subject: [PATCH 035/122] preserve left-side whitespace in output
---
packer/communicator.go | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/packer/communicator.go b/packer/communicator.go
index ad6a9a5bd..7f01f76cb 100644
--- a/packer/communicator.go
+++ b/packer/communicator.go
@@ -5,6 +5,7 @@ import (
"os"
"strings"
"sync"
+ "unicode"
"github.com/mitchellh/iochan"
)
@@ -154,11 +155,11 @@ OutputLoop:
// Make sure we finish off stdout/stderr because we may have gotten
// a message from the exit channel before finishing these first.
for output := range stdoutCh {
- ui.Message(strings.TrimSpace(output))
+ ui.Message(r.cleanOutputLine(output))
}
for output := range stderrCh {
- ui.Message(strings.TrimSpace(output))
+ ui.Message(r.cleanOutputLine(output))
}
return nil
@@ -196,7 +197,7 @@ func (r *RemoteCmd) Wait() {
// UI output when we're reading from a remote command.
func (r *RemoteCmd) cleanOutputLine(line string) string {
// Trim surrounding whitespace
- line = strings.TrimSpace(line)
+ line = strings.TrimRightFunc(line, unicode.IsSpace)
// Trim up to the first carriage return, since that text would be
// lost anyways.
From 8a035ddb8a52706bfc37330f1c1786a5ed21567b Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Wed, 26 Jul 2017 07:26:59 +0200
Subject: [PATCH 036/122] parallels: Remove soon to be removed --vmtype flag
In the next release of Parallels Desktop for Mac Pro Ed. the prlctl createvm
command doen't support the --vmtype flag anymore.
---
builder/parallels/iso/step_create_vm.go | 1 -
1 file changed, 1 deletion(-)
diff --git a/builder/parallels/iso/step_create_vm.go b/builder/parallels/iso/step_create_vm.go
index 52cbf3fbf..b085e4485 100644
--- a/builder/parallels/iso/step_create_vm.go
+++ b/builder/parallels/iso/step_create_vm.go
@@ -27,7 +27,6 @@ func (s *stepCreateVM) Run(state multistep.StateBag) multistep.StepAction {
"create", name,
"--distribution", config.GuestOSType,
"--dst", config.OutputDir,
- "--vmtype", "vm",
"--no-hdd",
}
From b66bc549cde6597962e12b73775df9bff8518ab0 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Thu, 27 Jul 2017 06:53:16 +0200
Subject: [PATCH 037/122] Remove ssh_username` from builder docs
---
website/source/docs/builders/googlecompute.html.md | 2 +-
website/source/docs/builders/parallels-iso.html.md | 3 ---
website/source/docs/builders/parallels-pvm.html.md | 3 ---
website/source/docs/builders/qemu.html.md | 3 ---
website/source/docs/builders/virtualbox-iso.html.md | 6 ------
website/source/docs/builders/virtualbox-ovf.html.md | 3 ---
website/source/docs/builders/vmware-iso.html.md | 4 +---
website/source/docs/builders/vmware-vmx.html.md | 3 ---
8 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/website/source/docs/builders/googlecompute.html.md b/website/source/docs/builders/googlecompute.html.md
index 7fe6de1b7..cce0e41cb 100644
--- a/website/source/docs/builders/googlecompute.html.md
+++ b/website/source/docs/builders/googlecompute.html.md
@@ -281,7 +281,7 @@ the credentials provided in the builder config's `account_file`.
## Gotchas
-Centos and recent Debian images have root ssh access disabled by default. Set `ssh_username` to
+CentOS and recent Debian images have root ssh access disabled by default. Set `ssh_username` to
any user, which will be created by packer with sudo access.
The machine type must have a scratch disk, which means you can't use an
diff --git a/website/source/docs/builders/parallels-iso.html.md b/website/source/docs/builders/parallels-iso.html.md
index 14a484c97..f8649e3d7 100644
--- a/website/source/docs/builders/parallels-iso.html.md
+++ b/website/source/docs/builders/parallels-iso.html.md
@@ -85,9 +85,6 @@ builder.
and "other". This can be omitted only if `parallels_tools_mode`
is "disable".
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
diff --git a/website/source/docs/builders/parallels-pvm.html.md b/website/source/docs/builders/parallels-pvm.html.md
index 6a540b5b3..55edcd6ca 100644
--- a/website/source/docs/builders/parallels-pvm.html.md
+++ b/website/source/docs/builders/parallels-pvm.html.md
@@ -62,9 +62,6 @@ builder.
- `source_path` (string) - The path to a PVM directory that acts as the source
of this build.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
diff --git a/website/source/docs/builders/qemu.html.md b/website/source/docs/builders/qemu.html.md
index e297c0967..fec6f2888 100644
--- a/website/source/docs/builders/qemu.html.md
+++ b/website/source/docs/builders/qemu.html.md
@@ -109,9 +109,6 @@ Linux server and have not enabled X11 forwarding (`ssh -X`).
boot directly from it. When passing a path to an IMG or QCOW2 file, you
should set `disk_image` to "true".
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `accelerator` (string) - The accelerator type to use when running the VM.
diff --git a/website/source/docs/builders/virtualbox-iso.html.md b/website/source/docs/builders/virtualbox-iso.html.md
index 258f7ba90..b779aa781 100644
--- a/website/source/docs/builders/virtualbox-iso.html.md
+++ b/website/source/docs/builders/virtualbox-iso.html.md
@@ -77,12 +77,6 @@ builder.
This URL can be either an HTTP URL or a file URL (or path to a file). If
this is an HTTP URL, Packer will download it and cache it between runs.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
-- `ssh_password` (string) - The password to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
diff --git a/website/source/docs/builders/virtualbox-ovf.html.md b/website/source/docs/builders/virtualbox-ovf.html.md
index 5d6aa81fb..ad7654642 100644
--- a/website/source/docs/builders/virtualbox-ovf.html.md
+++ b/website/source/docs/builders/virtualbox-ovf.html.md
@@ -65,9 +65,6 @@ builder.
- `source_path` (string) - The path to an OVF or OVA file that acts as the
source of this build. It can also be a URL.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
diff --git a/website/source/docs/builders/vmware-iso.html.md b/website/source/docs/builders/vmware-iso.html.md
index 4098182de..478c1a0b0 100644
--- a/website/source/docs/builders/vmware-iso.html.md
+++ b/website/source/docs/builders/vmware-iso.html.md
@@ -42,6 +42,7 @@ self-install. Still, the example serves to show the basic configuration:
"iso_checksum": "af5f788aee1b32c4b2634734309cc9e9",
"iso_checksum_type": "md5",
"ssh_username": "packer",
+ "ssh_password": "packer",
"shutdown_command": "shutdown -P now"
}
```
@@ -80,9 +81,6 @@ builder.
This URL can be either an HTTP URL or a file URL (or path to a file). If
this is an HTTP URL, Packer will download it and cache it between runs.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
diff --git a/website/source/docs/builders/vmware-vmx.html.md b/website/source/docs/builders/vmware-vmx.html.md
index fb2fc2d86..198ec7557 100644
--- a/website/source/docs/builders/vmware-vmx.html.md
+++ b/website/source/docs/builders/vmware-vmx.html.md
@@ -56,9 +56,6 @@ builder.
- `source_path` (string) - Path to the source VMX file to clone.
-- `ssh_username` (string) - The username to use to SSH into the machine once
- the OS is installed.
-
### Optional:
- `boot_command` (array of strings) - This is an array of commands to type
From 97498f80bead98c6ab6a034768a982ca9979425f Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Wed, 26 Jul 2017 21:37:00 +0200
Subject: [PATCH 038/122] core: iso_checksum_url should strip query param
When iso_urls contains query parameters these should be stripped when
searching the content of iso_checksum_url for a maching checksum.
Closes #5176
---
common/iso_config.go | 12 +++++++++---
common/iso_config_test.go | 19 +++++++++++++++++++
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/common/iso_config.go b/common/iso_config.go
index 07f005f75..1ddb78d17 100644
--- a/common/iso_config.go
+++ b/common/iso_config.go
@@ -136,7 +136,13 @@ func (c *ISOConfig) Prepare(ctx *interpolate.Context) (warnings []string, errs [
}
func (c *ISOConfig) parseCheckSumFile(rd *bufio.Reader) error {
- errNotFound := fmt.Errorf("No checksum for %q found at: %s", filepath.Base(c.ISOUrls[0]), c.ISOChecksumURL)
+ u, err := url.Parse(c.ISOUrls[0])
+ if err != nil {
+ return err
+ }
+ filename := filepath.Base(u.Path)
+
+ errNotFound := fmt.Errorf("No checksum for %q found at: %s", filename, c.ISOChecksumURL)
for {
line, err := rd.ReadString('\n')
if err != nil && line == "" {
@@ -148,7 +154,7 @@ func (c *ISOConfig) parseCheckSumFile(rd *bufio.Reader) error {
}
if strings.ToLower(parts[0]) == c.ISOChecksumType {
// BSD-style checksum
- if parts[1] == fmt.Sprintf("(%s)", filepath.Base(c.ISOUrls[0])) {
+ if parts[1] == fmt.Sprintf("(%s)", filename) {
c.ISOChecksum = parts[3]
return nil
}
@@ -158,7 +164,7 @@ func (c *ISOConfig) parseCheckSumFile(rd *bufio.Reader) error {
// Binary mode
parts[1] = parts[1][1:]
}
- if parts[1] == filepath.Base(c.ISOUrls[0]) {
+ if parts[1] == filename {
c.ISOChecksum = parts[0]
return nil
}
diff --git a/common/iso_config_test.go b/common/iso_config_test.go
index 1c6a0fb13..7a5a0b026 100644
--- a/common/iso_config_test.go
+++ b/common/iso_config_test.go
@@ -152,6 +152,25 @@ func TestISOConfigPrepare_ISOChecksumURL(t *testing.T) {
t.Fatalf("should've found \"bar0\" got: %s", i.ISOChecksum)
}
+ // Test good - ISOChecksumURL GNU style with query parameters
+ i = testISOConfig()
+ i.ISOChecksum = ""
+ i.RawSingleISOUrl = "http://www.packer.io/the-OS.iso?stuff=boo"
+
+ cs_file, _ = ioutil.TempFile("", "packer-test-")
+ ioutil.WriteFile(cs_file.Name(), []byte(cs_gnu_style), 0666)
+ i.ISOChecksumURL = fmt.Sprintf("%s%s", filePrefix, cs_file.Name())
+ warns, err = i.Prepare(nil)
+ if len(warns) > 0 {
+ t.Fatalf("bad: %#v", warns)
+ }
+ if err != nil {
+ t.Fatalf("should not have error: %s", err)
+ }
+
+ if i.ISOChecksum != "bar0" {
+ t.Fatalf("should've found \"bar0\" got: %s", i.ISOChecksum)
+ }
}
func TestISOConfigPrepare_ISOChecksumType(t *testing.T) {
From eafaaa881f0c7848432c2731b7d0748f5f18ddb1 Mon Sep 17 00:00:00 2001
From: Tobias
Date: Thu, 27 Jul 2017 16:53:15 +0200
Subject: [PATCH 039/122] builder/hyperv/iso: missing InterpolateContext
---
builder/hyperv/iso/builder.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/builder/hyperv/iso/builder.go b/builder/hyperv/iso/builder.go
index e6c8d4d67..07c776d11 100644
--- a/builder/hyperv/iso/builder.go
+++ b/builder/hyperv/iso/builder.go
@@ -93,6 +93,7 @@ type Config struct {
func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
err := config.Decode(&b.config, &config.DecodeOpts{
Interpolate: true,
+ InterpolateContext: &b.config.ctx,
InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{
"boot_command",
From ffa8626f8b74671be49a6a253ec54cbb1edaaa57 Mon Sep 17 00:00:00 2001
From: Rickard von Essen
Date: Thu, 27 Jul 2017 21:21:24 +0200
Subject: [PATCH 040/122] Updated CHANGELOG.md
---
CHANGELOG.md | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index be9fcd0d3..e97673587 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,14 @@
+## UNRELEASED
+
+### IMPROVEMENTS:
+
+* builder/parallels: Remove soon to be removed --vmtype flag in createvm.
+ [GH-5172]
+
## 1.0.3 (July 17, 2017)
-### IMRPOVEMENTS:
-* builder/Azure: Update to latest Azure SDK, enabling support for managed
+### IMPROVEMENTS:
+* builder/azure: Update to latest Azure SDK, enabling support for managed
disks. [GH-4511]
* builder/cloudstack: Add default cidr_list [ 0.0.0.0/0 ]. [GH-5125]
* builder/cloudstack: Add support for ssh_agent_auth. [GH-5130]
From ab2993ac946664ab9969f1e48f3c756105bddf26 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Thu, 27 Jul 2017 13:02:59 -0700
Subject: [PATCH 041/122] update changelog
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e97673587..91224dce9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
* builder/parallels: Remove soon to be removed --vmtype flag in createvm.
[GH-5172]
+* builder/alicloud: Increase polling timeout. [GH-5148]
## 1.0.3 (July 17, 2017)
From b322f0ba22b9ea1c242205242ae466cf6aef44ec Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Thu, 27 Jul 2017 13:10:15 -0700
Subject: [PATCH 042/122] update changelog
---
CHANGELOG.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91224dce9..2b1508c8f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,9 +2,11 @@
### IMPROVEMENTS:
-* builder/parallels: Remove soon to be removed --vmtype flag in createvm.
- [GH-5172]
* builder/alicloud: Increase polling timeout. [GH-5148]
+* builder/parallels: Remove soon to be removed --vmtype flag in createvm.
+ [GH-5172]
+* core: Strip query parameters from ISO URLs when checking against a checksum
+ file. [GH-5181]
## 1.0.3 (July 17, 2017)
From 9876a28ea7aaee3763e425b07e8e484305ac2e84 Mon Sep 17 00:00:00 2001
From: Michael Kuzmin
Date: Fri, 28 Jul 2017 03:59:11 +0300
Subject: [PATCH 043/122] vmware: publish vm_name as artifact ID
---
builder/vmware/common/artifact.go | 8 +++++---
builder/vmware/common/artifact_test.go | 5 ++++-
builder/vmware/iso/artifact.go | 5 +++--
builder/vmware/iso/builder.go | 1 +
builder/vmware/vmx/builder.go | 2 +-
5 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/builder/vmware/common/artifact.go b/builder/vmware/common/artifact.go
index 48fcb8139..e0b3e875e 100644
--- a/builder/vmware/common/artifact.go
+++ b/builder/vmware/common/artifact.go
@@ -14,13 +14,14 @@ const BuilderId = "mitchellh.vmware"
// Artifact is the result of running the VMware builder, namely a set
// of files associated with the resulting machine.
type localArtifact struct {
+ id string
dir string
f []string
}
// NewLocalArtifact returns a VMware artifact containing the files
// in the given directory.
-func NewLocalArtifact(dir string) (packer.Artifact, error) {
+func NewLocalArtifact(id string, dir string) (packer.Artifact, error) {
files := make([]string, 0, 5)
visit := func(path string, info os.FileInfo, err error) error {
if err != nil {
@@ -37,6 +38,7 @@ func NewLocalArtifact(dir string) (packer.Artifact, error) {
}
return &localArtifact{
+ id: id,
dir: dir,
f: files,
}, nil
@@ -50,8 +52,8 @@ func (a *localArtifact) Files() []string {
return a.f
}
-func (*localArtifact) Id() string {
- return "VM"
+func (a *localArtifact) Id() string {
+ return a.id
}
func (a *localArtifact) String() string {
diff --git a/builder/vmware/common/artifact_test.go b/builder/vmware/common/artifact_test.go
index e081cc358..53b8364f1 100644
--- a/builder/vmware/common/artifact_test.go
+++ b/builder/vmware/common/artifact_test.go
@@ -29,7 +29,7 @@ func TestNewLocalArtifact(t *testing.T) {
t.Fatalf("err: %s", err)
}
- a, err := NewLocalArtifact(td)
+ a, err := NewLocalArtifact("vm1", td)
if err != nil {
t.Fatalf("err: %s", err)
}
@@ -37,6 +37,9 @@ func TestNewLocalArtifact(t *testing.T) {
if a.BuilderId() != BuilderId {
t.Fatalf("bad: %#v", a.BuilderId())
}
+ if a.Id() != "vm1" {
+ t.Fatalf("bad: %#v", a.Id())
+ }
if len(a.Files()) != 1 {
t.Fatalf("should length 1: %d", len(a.Files()))
}
diff --git a/builder/vmware/iso/artifact.go b/builder/vmware/iso/artifact.go
index d0e1a6d8b..a0c3ceace 100644
--- a/builder/vmware/iso/artifact.go
+++ b/builder/vmware/iso/artifact.go
@@ -8,6 +8,7 @@ import (
// of files associated with the resulting machine.
type Artifact struct {
builderId string
+ id string
dir OutputDir
f []string
}
@@ -20,8 +21,8 @@ func (a *Artifact) Files() []string {
return a.f
}
-func (*Artifact) Id() string {
- return "VM"
+func (a *Artifact) Id() string {
+ return a.id
}
func (a *Artifact) String() string {
diff --git a/builder/vmware/iso/builder.go b/builder/vmware/iso/builder.go
index 42038b96a..3567e26a2 100644
--- a/builder/vmware/iso/builder.go
+++ b/builder/vmware/iso/builder.go
@@ -349,6 +349,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
return &Artifact{
builderId: builderId,
+ id: b.config.VMName,
dir: dir,
f: files,
}, nil
diff --git a/builder/vmware/vmx/builder.go b/builder/vmware/vmx/builder.go
index c5c1f10b7..894c3488a 100644
--- a/builder/vmware/vmx/builder.go
+++ b/builder/vmware/vmx/builder.go
@@ -142,7 +142,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
return nil, errors.New("Build was halted.")
}
- return vmwcommon.NewLocalArtifact(b.config.OutputDir)
+ return vmwcommon.NewLocalArtifact(b.config.VMName, b.config.OutputDir)
}
// Cancel.
From 00797cc23b5b3ea81c8cac42bf1eced41ac3fefa Mon Sep 17 00:00:00 2001
From: Dan Isla
Date: Sat, 29 Jul 2017 08:20:58 -0700
Subject: [PATCH 044/122] Update to how zone is extracted from metadata
---
builder/googlecompute/startup.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/googlecompute/startup.go b/builder/googlecompute/startup.go
index a94c91141..687afec98 100644
--- a/builder/googlecompute/startup.go
+++ b/builder/googlecompute/startup.go
@@ -21,7 +21,7 @@ GetMetadata () {
echo "$(curl -f -H "Metadata-Flavor: Google" ${BASEMETADATAURL}/${1} 2> /dev/null)"
}
-ZONE=$(GetMetadata zone | grep -oP "[^/]*$")
+ZONE=$(basename $(GetMetadata zone))
SetMetadata () {
gcloud compute instances add-metadata ${HOSTNAME} --metadata ${1}=${2} --zone ${ZONE}
From 4cc8f25464d23eb319e46218b00133f83315cc4b Mon Sep 17 00:00:00 2001
From: Bengt Brodersen
Date: Mon, 31 Jul 2017 10:43:38 +0200
Subject: [PATCH 045/122] Update zsh completion, add file completion
---
contrib/zsh-completion/_packer | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/contrib/zsh-completion/_packer b/contrib/zsh-completion/_packer
index 6b26daa29..fa3797ab0 100644
--- a/contrib/zsh-completion/_packer
+++ b/contrib/zsh-completion/_packer
@@ -11,21 +11,23 @@ _packer_cmds=(
)
__build() {
- _arguments \
- '-debug[Debug mode enabled for builds]' \
- '-force[Force a build to continue if artifacts exist, deletes existing artifacts]' \
- '-machine-readable[Machine-readable output]' \
- '-except=[(foo,bar,baz) Build all builds other than these]' \
- '-only=[(foo,bar,baz) Only build the given builds by name]' \
- '-parallel=[(false) Disable parallelization (on by default)]' \
- '-var[("key=value") Variable for templates, can be used multiple times.]' \
- '-var-file=[(path) JSON file containing user variables.]'
+ _arguments \
+ '-debug[Debug mode enabled for builds]' \
+ '-force[Force a build to continue if artifacts exist, deletes existing artifacts]' \
+ '-machine-readable[Machine-readable output]' \
+ '-except=[(foo,bar,baz) Build all builds other than these]' \
+ '-only=[(foo,bar,baz) Only build the given builds by name]' \
+ '-parallel=[(false) Disable parallelization (on by default)]' \
+ '-var[("key=value") Variable for templates, can be used multiple times.]' \
+ '-var-file=[(path) JSON file containing user variables.]'
+ _files -g "*.json"
}
__inspect() {
_arguments \
'-machine-readable[Machine-readable output]'
+ _files -g "*.json"
}
__push() {
@@ -34,15 +36,17 @@ __push() {
'-token=[() Access token to use to upload.]' \
'-var[("key=value") Variable for templates, can be used multiple times.]' \
'-var-file=[(path) JSON file containing user variables.]'
+ _files -g "*.json"
}
__validate() {
- _arguments \
- '-syntax-only[Only check syntax. Do not verify config of the template.]' \
- '-except=[(foo,bar,baz) Validate all builds other than these]' \
- '-only=[(foo,bar,baz) Validate only these builds]' \
- '-var[("key=value") Variable for templates, can be used multiple times.]' \
- '-var-file=[(path) JSON file containing user variables.]'
+ _arguments \
+ '-syntax-only[Only check syntax. Do not verify config of the template.]' \
+ '-except=[(foo,bar,baz) Validate all builds other than these]' \
+ '-only=[(foo,bar,baz) Validate only these builds]' \
+ '-var[("key=value") Variable for templates, can be used multiple times.]' \
+ '-var-file=[(path) JSON file containing user variables.]'
+ _files -g "*.json"
}
From 42444e58e6bca930677802b3d9ab98add954f775 Mon Sep 17 00:00:00 2001
From: cstuntz
Date: Mon, 31 Jul 2017 11:38:30 -0700
Subject: [PATCH 046/122] Updating step_run_source_instance to add tags at
instance start instead of adding them to running instance
---
.../amazon/common/step_run_source_instance.go | 23 +-
builder/amazon/common/step_security_group.go | 42 +-
vendor/github.com/aws/aws-sdk-go/CHANGELOG.md | 826 +++
.../aws/aws-sdk-go/CHANGELOG_PENDING.md | 5 +
.../github.com/aws/aws-sdk-go/CONTRIBUTING.md | 5 +
vendor/github.com/aws/aws-sdk-go/Makefile | 9 +-
vendor/github.com/aws/aws-sdk-go/README.md | 451 +-
.../aws/aws-sdk-go/aws/client/client.go | 62 +-
.../aws-sdk-go/aws/client/default_retryer.go | 10 +-
.../aws/aws-sdk-go/aws/client/logger.go | 108 +
.../github.com/aws/aws-sdk-go/aws/config.go | 17 +-
.../github.com/aws/aws-sdk-go/aws/context.go | 71 +
.../aws/aws-sdk-go/aws/context_1_6.go | 41 +
.../aws/aws-sdk-go/aws/context_1_7.go | 9 +
.../aws-sdk-go/aws/corehandlers/handlers.go | 132 +-
.../aws/credentials/chain_provider.go | 14 +-
.../aws-sdk-go/aws/credentials/credentials.go | 33 +-
.../aws/credentials/env_provider.go | 1 +
.../shared_credentials_provider.go | 33 +-
.../stscreds/assume_role_provider.go | 2 +-
.../aws/aws-sdk-go/aws/defaults/defaults.go | 47 +-
.../aws-sdk-go/aws/defaults/shared_config.go | 27 +
vendor/github.com/aws/aws-sdk-go/aws/doc.go | 56 +
.../aws/aws-sdk-go/aws/endpoints/defaults.go | 345 +-
.../aws/aws-sdk-go/aws/endpoints/endpoints.go | 112 +-
.../aws/endpoints/v3model_codegen.go | 19 +-
.../aws/aws-sdk-go/aws/jsonvalue.go | 12 +
.../github.com/aws/aws-sdk-go/aws/logger.go | 4 +-
.../aws/request/connection_reset_error.go | 19 +
.../request/connection_reset_error_other.go | 11 +
.../aws/aws-sdk-go/aws/request/handlers.go | 97 +-
.../aws/aws-sdk-go/aws/request/request.go | 192 +-
.../aws/aws-sdk-go/aws/request/request_1_7.go | 22 +-
.../aws/aws-sdk-go/aws/request/request_1_8.go | 30 +-
.../aws-sdk-go/aws/request/request_context.go | 14 +
.../aws/request/request_context_1_6.go | 14 +
.../aws/request/request_pagination.go | 154 +-
.../aws/aws-sdk-go/aws/request/retryer.go | 99 +-
.../aws/request/timeout_read_closer.go | 94 +
.../aws/aws-sdk-go/aws/request/validation.go | 2 +-
.../aws/aws-sdk-go/aws/request/waiter.go | 295 +
.../aws/aws-sdk-go/aws/session/doc.go | 33 +-
.../aws/aws-sdk-go/aws/session/env_config.go | 56 +-
.../aws/aws-sdk-go/aws/session/session.go | 119 +-
.../aws-sdk-go/aws/session/shared_config.go | 2 +-
.../aws/aws-sdk-go/aws/signer/v4/options.go | 7 +
.../aws/aws-sdk-go/aws/signer/v4/v4.go | 59 +-
vendor/github.com/aws/aws-sdk-go/aws/url.go | 12 +
.../github.com/aws/aws-sdk-go/aws/url_1_7.go | 29 +
.../github.com/aws/aws-sdk-go/aws/version.go | 2 +-
vendor/github.com/aws/aws-sdk-go/doc.go | 405 ++
.../internal/shareddefaults/shared_config.go | 40 +
.../aws-sdk-go/private/endpoints/endpoints.go | 70 -
.../private/endpoints/endpoints.json | 78 -
.../private/endpoints/endpoints_map.go | 91 -
.../protocol/query/queryutil/queryutil.go | 7 +-
.../aws-sdk-go/private/protocol/rest/build.go | 46 +-
.../private/protocol/rest/unmarshal.go | 29 +-
.../private/protocol/xml/xmlutil/build.go | 1 -
.../private/protocol/xml/xmlutil/unmarshal.go | 7 +-
.../protocol/xml/xmlutil/xml_to_struct.go | 13 +-
.../aws/aws-sdk-go/private/waiter/waiter.go | 134 -
vendor/github.com/aws/aws-sdk-go/sdk.go | 7 -
.../aws/aws-sdk-go/service/ec2/api.go | 6299 +++++++++++++++--
.../aws/aws-sdk-go/service/ec2/doc.go | 83 +
.../aws/aws-sdk-go/service/ec2/errors.go | 2 +-
.../aws/aws-sdk-go/service/ec2/service.go | 15 +-
.../aws/aws-sdk-go/service/ec2/waiters.go | 1582 +++--
.../aws/aws-sdk-go/service/ecr/api.go | 438 +-
.../aws/aws-sdk-go/service/ecr/doc.go | 85 +
.../aws/aws-sdk-go/service/ecr/errors.go | 2 +-
.../aws/aws-sdk-go/service/ecr/service.go | 17 +-
.../aws/aws-sdk-go/service/s3/api.go | 2276 +++++-
.../aws-sdk-go/service/s3/bucket_location.go | 65 +-
.../aws-sdk-go/service/s3/customizations.go | 18 +
.../aws/aws-sdk-go/service/s3/doc.go | 78 +
.../aws/aws-sdk-go/service/s3/doc_custom.go | 109 +
.../aws/aws-sdk-go/service/s3/errors.go | 2 +-
.../service/s3/host_style_bucket.go | 13 +-
.../service/s3/s3iface/interface.go | 308 +-
.../aws-sdk-go/service/s3/s3manager/batch.go | 500 ++
.../service/s3/s3manager/bucket_region.go | 83 +
.../service/s3/s3manager/download.go | 204 +-
.../aws-sdk-go/service/s3/s3manager/upload.go | 174 +-
.../aws/aws-sdk-go/service/s3/service.go | 12 +-
.../aws/aws-sdk-go/service/s3/sse.go | 18 +-
.../aws-sdk-go/service/s3/unmarshal_error.go | 64 +-
.../aws/aws-sdk-go/service/s3/waiters.go | 207 +-
.../aws/aws-sdk-go/service/sts/api.go | 143 +-
.../aws/aws-sdk-go/service/sts/doc.go | 124 +
.../aws/aws-sdk-go/service/sts/errors.go | 2 +-
.../aws/aws-sdk-go/service/sts/service.go | 54 +-
vendor/vendor.json | 250 +-
93 files changed, 15321 insertions(+), 2712 deletions(-)
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/context.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/doc.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/url.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/doc.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go
delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json
delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go
delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/waiter/waiter.go
delete mode 100644 vendor/github.com/aws/aws-sdk-go/sdk.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go
create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go
index 1aecd75f5..2e024e40c 100644
--- a/builder/amazon/common/step_run_source_instance.go
+++ b/builder/amazon/common/step_run_source_instance.go
@@ -135,8 +135,22 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
}
var instanceId string
+ ec2Tags, err := ConvertToEC2Tags(s.Tags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
+ if err != nil {
+ err := fmt.Errorf("Error tagging source instance: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
if spotPrice == "" || spotPrice == "0" {
+
+ var runTag ec2.TagSpecification
+ runTag.SetResourceType("instance")
+ runTag.SetTags(ec2Tags)
+
+ runTags := []*ec2.TagSpecification{&runTag}
+
runOpts := &ec2.RunInstancesInput{
ImageId: &s.SourceAMI,
InstanceType: &s.InstanceType,
@@ -147,6 +161,7 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
BlockDeviceMappings: s.BlockDevices.BuildLaunchDevices(),
Placement: &ec2.Placement{AvailabilityZone: &s.AvailabilityZone},
EbsOptimized: &s.EbsOptimized,
+ TagSpecifications: runTags,
}
if keyName != "" {
@@ -283,14 +298,6 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
s.Tags["Name"] = "Packer Builder"
}
- ec2Tags, err := ConvertToEC2Tags(s.Tags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
- if err != nil {
- err := fmt.Errorf("Error tagging source instance: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
ReportTags(ui, ec2Tags)
// Retry creating tags for about 2.5 minutes
diff --git a/builder/amazon/common/step_security_group.go b/builder/amazon/common/step_security_group.go
index 7e4071370..fea1316ae 100644
--- a/builder/amazon/common/step_security_group.go
+++ b/builder/amazon/common/step_security_group.go
@@ -6,7 +6,7 @@ import (
"time"
"github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/private/waiter"
+ "github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/hashicorp/packer/common/uuid"
"github.com/hashicorp/packer/helper/communicator"
@@ -151,36 +151,42 @@ func (s *StepSecurityGroup) Cleanup(state multistep.StateBag) {
}
func waitUntilSecurityGroupExists(c *ec2.EC2, input *ec2.DescribeSecurityGroupsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeSecurityGroups",
- Delay: 15,
+ ctx := aws.BackgroundContext()
+ w := request.Waiter{
+ Name: "DescribeSecurityGroups",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch,
Argument: "length(SecurityGroups[]) > `0`",
Expected: true,
},
{
- State: "retry",
- Matcher: "error",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Argument: "",
Expected: "InvalidGroup.NotFound",
},
{
- State: "retry",
- Matcher: "error",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Argument: "",
Expected: "InvalidSecurityGroupID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *ec2.DescribeSecurityGroupsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSecurityGroupsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
-
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
index ed418aa1e..681429cd8 100644
--- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
@@ -1,3 +1,829 @@
+Release v1.10.14 (2017-07-20)
+===
+
+### Service Client Updates
+* `service/elasticmapreduce`: Updates service API and documentation
+ * Amazon EMR now includes the ability to use a custom Amazon Linux AMI and adjustable root volume size when launching a cluster.
+
+Release v1.10.13 (2017-07-19)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Update budget Management API's to list/create/update RI_UTILIZATION type budget. Update budget Management API's to support DAILY timeUnit for RI_UTILIZATION type budget.
+
+### SDK Enhancements
+* `service/s3`: Use interfaces assertions instead of ValuesAtPath for S3 field lookups. [#1401](https://github.com/aws/aws-sdk-go/pull/1401)
+ * Improves the performance across the board for all S3 API calls by removing the usage of `ValuesAtPath` being used for every S3 API call.
+
+### SDK Bugs
+* `aws/request`: waiter test bug
+ * waiters_test.go file would sometimes fail due to travis hiccups. This occurs because a test would sometimes fail the cancel check and succeed the timeout. However, the timeout check should never occur in that test. This fix introduces a new field that dictates how waiters will sleep.
+Release v1.10.12 (2017-07-17)
+===
+
+### Service Client Updates
+* `service/cognito-idp`: Updates service API and documentation
+* `service/lambda`: Updates service API and documentation
+ * Lambda@Edge lets you run code closer to your end users without provisioning or managing servers. With Lambda@Edge, your code runs in AWS edge locations, allowing you to respond to your end users at the lowest latency. Your code is triggered by Amazon CloudFront events, such as requests to and from origin servers and viewers, and it is ready to execute at every AWS edge location whenever a request for content is received. You just upload your Node.js code to AWS Lambda and Lambda takes care of everything required to run and scale your code with high availability. You only pay for the compute time you consume - there is no charge when your code is not running.
+
+Release v1.10.11 (2017-07-14)
+===
+
+### Service Client Updates
+* `service/discovery`: Updates service API and documentation
+ * Adding feature to the Export API for Discovery Service to allow filters for the export task to allow export based on per agent id.
+* `service/ec2`: Updates service API
+ * New EC2 GPU Graphics instance
+* `service/marketplacecommerceanalytics`: Updates service documentation
+ * Update to Documentation Model For New Report Cadence / Reformat of Docs
+
+Release v1.10.10 (2017-07-13)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Adds support for management of gateway responses.
+* `service/ec2`: Updates service API and documentation
+ * X-ENI (or Cross-Account ENI) is a new feature that allows the attachment or association of Elastic Network Interfaces (ENI) between VPCs in different AWS accounts located in the same availability zone. With this new capability, service providers and partners can deliver managed solutions in a variety of new architectural patterns where the provider and consumer of the service are in different AWS accounts.
+* `service/lex-models`: Updates service documentation
+
+Release v1.10.9 (2017-07-12)
+===
+
+### Service Client Updates
+* `service/autoscaling`: Updates service API and documentation
+ * Auto Scaling now supports a new type of scaling policy called target tracking scaling policies that you can use to set up dynamic scaling for your application.
+* `service/swf`: Updates service API, documentation, paginators, and examples
+ * Added support for attaching control data to Lambda tasks. Control data lets you attach arbitrary strings to your decisions and history events.
+
+Release v1.10.8 (2017-07-06)
+===
+
+### Service Client Updates
+* `service/ds`: Updates service API, documentation, and paginators
+ * You can now improve the resilience and performance of your Microsoft AD directory by deploying additional domain controllers. Added UpdateNumberofDomainControllers API that allows you to update the number of domain controllers you want for your directory, and DescribeDomainControllers API that allows you to describe the detailed information of each domain controller of your directory. Also added the 'DesiredNumberOfDomainControllers' field to the DescribeDirectories API output for Microsoft AD.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/kinesis`: Updates service API and documentation
+ * You can now encrypt your data at rest within an Amazon Kinesis Stream using server-side encryption. Server-side encryption via AWS KMS makes it easy for customers to meet strict data management requirements by encrypting their data at rest within the Amazon Kinesis Streams, a fully managed real-time data processing service.
+* `service/kms`: Updates service API and documentation
+ * This release of AWS Key Management Service introduces the ability to determine whether a key is AWS managed or customer managed.
+* `service/ssm`: Updates service API and documentation
+ * Amazon EC2 Systems Manager now expands Patching support to Amazon Linux, Red Hat and Ubuntu in addition to the already supported Windows Server.
+
+Release v1.10.7 (2017-07-05)
+===
+
+### Service Client Updates
+* `service/monitoring`: Updates service API and documentation
+ * We are excited to announce the availability of APIs and CloudFormation support for CloudWatch Dashboards. You can use the new dashboard APIs or CloudFormation templates to dynamically build and maintain dashboards to monitor your infrastructure and applications. There are four new dashboard APIs - PutDashboard, GetDashboard, DeleteDashboards, and ListDashboards APIs. PutDashboard is used to create a new dashboard or modify an existing one whereas GetDashboard is the API to get the details of a specific dashboard. ListDashboards and DeleteDashboards are used to get the names or delete multiple dashboards respectively. Getting started with dashboard APIs is similar to any other AWS APIs. The APIs can be accessed through AWS SDK or through CLI tools.
+* `service/route53`: Updates service API and documentation
+ * Bug fix for InvalidChangeBatch exception.
+
+### SDK Enhancements
+* `service/s3/s3manager`: adding cleanup function to batch objects [#1375](https://github.com/aws/aws-sdk-go/issues/1375)
+ * This enhancement will add an After field that will be called after each iteration of the batch operation.
+
+Release v1.10.6 (2017-06-30)
+===
+
+### Service Client Updates
+* `service/marketplacecommerceanalytics`: Updates service documentation
+ * Documentation updates for AWS Marketplace Commerce Analytics.
+* `service/s3`: Updates service API and documentation
+ * API Update for S3: Adding Object Tagging Header to MultipartUpload Initialization
+
+Release v1.10.5 (2017-06-29)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/events`: Updates service API and documentation
+ * CloudWatch Events now allows different AWS accounts to share events with each other through a new resource called event bus. Event buses accept events from AWS services, other AWS accounts and PutEvents API calls. Currently all AWS accounts have one default event bus. To send events to another account, customers simply write rules to match the events of interest and attach an event bus in the receiving account as the target to the rule. The PutTargets API has been updated to allow adding cross account event buses as targets. In addition, we have released two new APIs - PutPermission and RemovePermission - that enables customers to add/remove permissions to their default event bus.
+* `service/gamelift`: Updates service API and documentation
+ * Allow developers to download GameLift fleet creation logs to assist with debugging.
+* `service/ssm`: Updates service API and documentation
+ * Adding Resource Data Sync support to SSM Inventory. New APIs: * CreateResourceDataSync - creates a new resource data sync configuration, * ListResourceDataSync - lists existing resource data sync configurations, * DeleteResourceDataSync - deletes an existing resource data sync configuration.
+
+Release v1.10.4 (2017-06-27)
+===
+
+### Service Client Updates
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * Proper tagging of resources is critical to post-launch operations such as billing, cost allocation, and resource management. By using Service Catalog's TagOption Library, administrators can define a library of re-usable TagOptions that conform to company standards, and associate these with Service Catalog portfolios and products. Learn how to move your current tags to the new library, create new TagOptions, and view and associate your library items with portfolios and products. Understand how to ensure that the right tags are created on products launched through Service Catalog and how to provide users with defined selectable tags.
+
+### SDK Bugs
+* `aws/signer/v4`: checking length on `stripExcessSpaces` [#1372](https://github.com/aws/aws-sdk-go/issues/1372)
+ * Fixes a bug where `stripExcessSpaces` did not check length against the slice.
+ * Fixes: [#1371](https://github.com/aws/aws-sdk-go/issues/1371)
+Release v1.10.3 (2017-06-23)
+===
+
+### Service Client Updates
+* `service/lambda`: Updates service API and documentation
+ * The Lambda Invoke API will now throw new exception InvalidRuntimeException (status code 502) for invokes with deprecated runtimes.
+
+Release v1.10.2 (2017-06-22)
+===
+
+### Service Client Updates
+* `service/codepipeline`: Updates service API, documentation, and paginators
+ * A new API, ListPipelineExecutions, enables you to retrieve summary information about the most recent executions in a pipeline, including pipeline execution ID, status, start time, and last updated time. You can request information for a maximum of 100 executions. Pipeline execution data is available for the most recent 12 months of activity.
+* `service/dms`: Updates service API and documentation
+ * Added tagging for DMS certificates.
+* `service/elasticloadbalancing`: Updates service waiters
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lightsail`: Updates service API and documentation
+ * This release adds a new nextPageToken property to the result of the GetOperationsForResource API. Developers can now get the next set of items in a list by making subsequent calls to GetOperationsForResource API with the token from the previous call. This release also deprecates the nextPageCount property, which previously returned null (use the nextPageToken property instead). This release also deprecates the customImageName property on the CreateInstancesRequest class, which was previously ignored by the API.
+* `service/route53`: Updates service API and documentation
+ * This release reintroduces the HealthCheckInUse exception.
+
+Release v1.10.1 (2017-06-21)
+===
+
+### Service Client Updates
+* `service/dax`: Adds new service
+ * Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10x performance improvement - from milliseconds to microseconds - even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management.
+* `service/route53`: Updates service API and documentation
+ * Amazon Route 53 now supports multivalue answers in response to DNS queries, which lets you route traffic approximately randomly to multiple resources, such as web servers. Create one multivalue answer record for each resource and, optionally, associate an Amazon Route 53 health check with each record, and Amazon Route 53 responds to DNS queries with up to eight healthy records.
+* `service/ssm`: Updates service API, documentation, and paginators
+ * Adding hierarchy support to the SSM Parameter Store API. Added support tor tagging. New APIs: GetParameter - retrieves one parameter, DeleteParameters - deletes multiple parameters (max number 10), GetParametersByPath - retrieves parameters located in the hierarchy. Updated APIs: PutParameter - added ability to enforce parameter value by applying regex (AllowedPattern), DescribeParameters - modified to support Tag filtering.
+* `service/waf`: Updates service API and documentation
+ * You can now create, edit, update, and delete a new type of WAF rule with a rate tracking component.
+* `service/waf-regional`: Updates service API and documentation
+
+Release v1.10.0 (2017-06-20)
+===
+
+### Service Client Updates
+* `service/workdocs`: Updates service API and documentation
+ * This release provides a new API to retrieve the activities performed by WorkDocs users.
+
+### SDK Features
+* `aws/credentials/plugincreds`: Add support for Go plugin for credentials [#1320](https://github.com/aws/aws-sdk-go/pull/1320)
+ * Adds support for using plugins to retrieve credentials for API requests. This change adds a new package plugincreds under aws/credentials. See the `example/aws/credentials/plugincreds` folder in the SDK for example usage.
+
+Release v1.9.00 (2017-06-19)
+===
+
+### Service Client Updates
+* `service/organizations`: Updates service API and documentation
+ * Improvements to Exception Modeling
+
+### SDK Features
+* `service/s3/s3manager`: Adds batch operations to s3manager [#1333](https://github.com/aws/aws-sdk-go/pull/1333)
+ * Allows for batch upload, download, and delete of objects. Also adds the interface pattern to allow for easy traversal of objects. E.G `DownloadWithIterator`, `UploadWithIterator`, and `BatchDelete`. `BatchDelete` also contains a utility iterator using the `ListObjects` API to easily delete a list of objects.
+
+Release v1.8.44 (2017-06-16)
+===
+
+### Service Client Updates
+* `service/xray`: Updates service API, documentation, and paginators
+ * Add a response time histogram to the services in response of GetServiceGraph API.
+
+Release v1.8.43 (2017-06-15)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Adds API to describe Amazon FPGA Images (AFIs) available to customers, which includes public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions.
+* `service/ecs`: Updates service API and documentation
+ * Added support for cpu, memory, and memory reservation container overrides on the RunTask and StartTask APIs.
+* `service/iot`: Updates service API and documentation
+ * Revert the last release: remove CertificatePem from DescribeCertificate API.
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * Added ProvisioningArtifactSummaries to DescribeProductAsAdmin's output to show the provisioning artifacts belong to the product. Allow filtering by SourceProductId in SearchProductsAsAdmin for AWS Marketplace products. Added a verbose option to DescribeProvisioningArtifact to display the CloudFormation template used to create the provisioning artifact.Added DescribeProvisionedProduct API. Changed the type of ProvisionedProduct's Status to be distinct from Record's Status. New ProvisionedProduct's Status are AVAILABLE, UNDER_CHANGE, TAINTED, ERROR. Changed Record's Status set of values to CREATED, IN_PROGRESS, IN_PROGRESS_IN_ERROR, SUCCEEDED, FAILED.
+
+### SDK Bugs
+* `private/model/api`: Fix RESTXML support for XML Namespace [#1343](https://github.com/aws/aws-sdk-go/pull/1343)
+ * Fixes a bug with the SDK's generation of services using the REST XML protocol not annotating shape references with the XML Namespace attribute.
+ * Fixes [#1334](https://github.com/aws/aws-sdk-go/pull/1334)
+Release v1.8.42 (2017-06-14)
+===
+
+### Service Client Updates
+* `service/applicationautoscaling`: Updates service API and documentation
+* `service/clouddirectory`: Updates service documentation
+ * Documentation update for Cloud Directory
+
+Release v1.8.41 (2017-06-13)
+===
+
+### Service Client Updates
+* `service/configservice`: Updates service API
+
+Release v1.8.40 (2017-06-13)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service API and documentation
+ * API Update for RDS: this update enables copy-on-write, a new Aurora MySQL Compatible Edition feature that allows users to restore their database, and support copy of TDE enabled snapshot cross region.
+
+### SDK Bugs
+* `aws/request`: Fix NewErrParamMinLen to use correct ParamMinLenErrCode [#1336](https://github.com/aws/aws-sdk-go/issues/1336)
+ * Fixes the `NewErrParamMinLen` function returning the wrong error code. `ParamMinLenErrCode` should be returned not `ParamMinValueErrCode`.
+ * Fixes [#1335](https://github.com/aws/aws-sdk-go/issues/1335)
+Release v1.8.39 (2017-06-09)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/opsworks`: Updates service API and documentation
+ * Tagging Support for AWS OpsWorks Stacks
+
+Release v1.8.38 (2017-06-08)
+===
+
+### Service Client Updates
+* `service/iot`: Updates service API and documentation
+ * In addition to using certificate ID, AWS IoT customers can now obtain the description of a certificate with the certificate PEM.
+* `service/pinpoint`: Updates service API and documentation
+ * Starting today Amazon Pinpoint adds SMS Text and Email Messaging support in addition to Mobile Push Notifications, providing developers, product managers and marketers with multi-channel messaging capabilities to drive user engagement in their applications. Pinpoint also enables backend services and applications to message users directly and provides advanced user and app analytics to understand user behavior and messaging performance.
+* `service/rekognition`: Updates service API and documentation
+ * API Update for AmazonRekognition: Adding RecognizeCelebrities API
+
+Release v1.8.37 (2017-06-07)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Add support to APIs for privileged containers. This change would allow performing privileged operations like starting the Docker daemon inside builds possible in custom docker images.
+* `service/greengrass`: Adds new service
+ * AWS Greengrass is software that lets you run local compute, messaging, and device state synchronization for connected devices in a secure way. With AWS Greengrass, connected devices can run AWS Lambda functions, keep device data in sync, and communicate with other devices securely even when not connected to the Internet. Using AWS Lambda, Greengrass ensures your IoT devices can respond quickly to local events, operate with intermittent connections, and minimize the cost of transmitting IoT data to the cloud.
+
+Release v1.8.36 (2017-06-06)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service documentation
+ * Documentation update for AWS Certificate Manager.
+* `service/cloudfront`: Updates service documentation
+ * Doc update to fix incorrect prefix in S3OriginConfig
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/iot`: Updates service API
+ * Update client side validation for SalesForce action.
+
+Release v1.8.35 (2017-06-05)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * AppStream 2.0 Custom Security Groups allows you to easily control what network resources your streaming instances and images have access to. You can assign up to 5 security groups per Fleet to control the inbound and outbound network access to your streaming instances to specific IP ranges, network protocols, or ports.
+* `service/iot`: Updates service API, documentation, paginators, and examples
+ * Added Salesforce action to IoT Rules Engine.
+
+Release v1.8.34 (2017-06-02)
+===
+
+### Service Client Updates
+* `service/kinesisanalytics`: Updates service API, documentation, and paginators
+ * Kinesis Analytics publishes error messages CloudWatch logs in case of application misconfigurations
+* `service/workdocs`: Updates service API and documentation
+ * This release includes new APIs to manage tags and custom metadata on resources and also new APIs to add and retrieve comments at the document level.
+
+Release v1.8.33 (2017-06-01)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * AWS CodeDeploy has improved how it manages connections to GitHub accounts and repositories. You can now create and store up to 25 connections to GitHub accounts in order to associate AWS CodeDeploy applications with GitHub repositories. Each connection can support multiple repositories. You can create connections to up to 25 different GitHub accounts, or create more than one connection to a single account. The ListGitHubAccountTokenNames command has been introduced to retrieve the names of stored connections to GitHub accounts that you have created. The name of the connection to GitHub used for an AWS CodeDeploy application is also included in the ApplicationInfo structure. Two new fields, lastAttemptedDeployment and lastSuccessfulDeployment, have been added to DeploymentGroupInfo to improve the handling of deployment group information in the AWS CodeDeploy console. Information about these latest deployments can also be retrieved using the GetDeploymentGroup and BatchGetDeployment group requests. Also includes a region update (us-gov-west-1).
+* `service/cognitoidentityprovider`: Updates service API, documentation, and paginators
+* `service/elbv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lexmodelbuildingservice`: Updates service documentation and examples
+
+### SDK Enhancements
+* `aws/defaults`: Exports shared credentials and config default filenames used by the SDK. [#1308](https://github.com/aws/aws-sdk-go/pull/1308)
+ * Adds SharedCredentialsFilename and SharedConfigFilename functions to defaults package.
+
+### SDK Bugs
+* `aws/credentials`: Fixes shared credential provider's default filename on Windows. [#1308](https://github.com/aws/aws-sdk-go/pull/1308)
+ * The shared credentials provider would attempt to use the wrong filename on Windows if the `HOME` environment variable was defined.
+* `service/s3/s3manager`: service/s3/s3manager: Fix Downloader ignoring Range get parameter [#1311](https://github.com/aws/aws-sdk-go/pull/1311)
+ * Fixes the S3 Download Manager ignoring the GetObjectInput's Range parameter. If this parameter is provided it will force the downloader to fallback to a single GetObject request disabling concurrency and automatic part size gets.
+ * Fixes [#1296](https://github.com/aws/aws-sdk-go/issues/1296)
+Release v1.8.32 (2017-05-31)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service API and documentation
+ * Amazon RDS customers can now easily and quickly stop and start their DB instances.
+
+Release v1.8.31 (2017-05-30)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API, documentation, and paginators
+ * Cloud Directory has launched support for Typed Links, enabling customers to create object-to-object relationships that are not hierarchical in nature. Typed Links enable customers to quickly query for data along these relationships. Customers can also enforce referential integrity using Typed Links, ensuring data in use is not inadvertently deleted.
+* `service/s3`: Updates service paginators and examples
+ * New example snippets for Amazon S3.
+
+Release v1.8.30 (2017-05-25)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * Support added for persistent user storage, backed by S3.
+* `service/rekognition`: Updates service API and documentation
+ * Updated the CompareFaces API response to include orientation information, unmatched faces, landmarks, pose, and quality of the compared faces.
+
+Release v1.8.29 (2017-05-24)
+===
+
+### Service Client Updates
+* `service/iam`: Updates service API
+ * The unique ID and access key lengths were extended from 32 to 128
+* `service/storagegateway`: Updates service API and documentation
+ * Two Storage Gateway data types, Tape and TapeArchive, each have a new response element, TapeUsedInBytes. This element helps you manage your virtual tapes. By using TapeUsedInBytes, you can see the amount of data written to each virtual tape.
+* `service/sts`: Updates service API, documentation, and paginators
+ * The unique ID and access key lengths were extended from 32 to 128.
+
+Release v1.8.28 (2017-05-23)
+===
+
+### Service Client Updates
+* `service/databasemigrationservice`: Updates service API, documentation, paginators, and examples
+ * This release adds support for using Amazon S3 and Amazon DynamoDB as targets for database migration, and using MongoDB as a source for database migration. For more information, see the AWS Database Migration Service documentation.
+
+Release v1.8.27 (2017-05-22)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/resourcegroupstaggingapi`: Updates service API, documentation, and paginators
+ * You can now specify the number of resources returned per page in GetResources operation, as an optional parameter, to easily manage the list of resources returned by your queries.
+
+### SDK Bugs
+* `aws/request`: Add support for PUT temporary redirects (307) [#1283](https://github.com/aws/aws-sdk-go/issues/1283)
+ * Adds support for Go 1.8's GetBody function allowing the SDK's http request using PUT and POST methods to be redirected with temporary redirects with 307 status code.
+ * Fixes: [#1267](https://github.com/aws/aws-sdk-go/issues/1267)
+* `aws/request`: Add handling for retrying temporary errors during unmarshal [#1289](https://github.com/aws/aws-sdk-go/issues/1289)
+ * Adds support for retrying temporary errors that occur during unmarshaling of a request's response body.
+ * Fixes: [#1275](https://github.com/aws/aws-sdk-go/issues/1275)
+Release v1.8.26 (2017-05-18)
+===
+
+### Service Client Updates
+* `service/athena`: Adds new service
+ * This release adds support for Amazon Athena. Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. Athena is serverless, so there is no infrastructure to manage, and you pay only for the queries that you run.
+* `service/lightsail`: Updates service API, documentation, and paginators
+ * This release adds new APIs that make it easier to set network port configurations on Lightsail instances. Developers can now make a single request to both open and close public ports on an instance using the PutInstancePublicPorts operation.
+
+### SDK Bugs
+* `aws/request`: Fix logging from reporting wrong retry request errors #1281
+ * Fixes the SDK's retry request logging to report the the actual error that occurred, not a stubbed Unknown error message.
+ * Fixes the SDK's response logger to not output the response log multiple times per retry.
+Release v1.8.25 (2017-05-17)
+===
+
+### Service Client Updates
+* `service/autoscaling`: Updates service documentation, paginators, and examples
+ * Various Auto Scaling documentation updates
+* `service/cloudwatchevents`: Updates service documentation
+ * Various CloudWatch Events documentation updates.
+* `service/cloudwatchlogs`: Updates service documentation and paginators
+ * Various CloudWatch Logs documentation updates.
+* `service/polly`: Updates service API
+ * Amazon Polly adds new German voice "Vicki"
+
+Release v1.8.24 (2017-05-16)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * This release introduces the previousRevision field in the responses to the GetDeployment and BatchGetDeployments actions. previousRevision provides information about the application revision that was deployed to the deployment group before the most recent successful deployment. Also, the fileExistsBehavior parameter has been added for CreateDeployment action requests. In the past, if the AWS CodeDeploy agent detected files in a target location that weren't part of the application revision from the most recent successful deployment, it would fail the current deployment by default. This new parameter provides options for how the agent handles these files: fail the deployment, retain the content, or overwrite the content.
+* `service/gamelift`: Updates service API and documentation
+ * Allow developers to specify how metrics are grouped in CloudWatch for their GameLift fleets. Developers can also specify how many concurrent game sessions activate on a per-instance basis.
+* `service/inspector`: Updates service API, documentation, paginators, and examples
+ * Adds ability to produce an assessment report that includes detailed and comprehensive results of a specified assessment run.
+* `service/kms`: Updates service documentation
+ * Update documentation for KMS.
+
+Release v1.8.23 (2017-05-15)
+===
+
+### Service Client Updates
+* `service/ssm`: Updates service API and documentation
+ * UpdateAssociation API now supports updating document name and targets of an association. GetAutomationExecution API can return FailureDetails as an optional field to the StepExecution Object, which contains failure type, failure stage as well as other failure related information for a failed step.
+
+### SDK Enhancements
+* `aws/session`: SDK should be able to load multiple custom shared config files. [#1258](https://github.com/aws/aws-sdk-go/issues/1258)
+ * This change adds a `SharedConfigFiles` field to the `session.Options` type that allows you to specify the files, and their order, the SDK will use for loading shared configuration and credentials from when the `Session` is created. Use the `NewSessionWithOptions` Session constructor to specify these options. You'll also most likely want to enable support for the shared configuration file's additional attributes by setting `session.Option`'s `SharedConfigState` to `session.SharedConfigEnabled`.
+
+Release v1.8.22 (2017-05-11)
+===
+
+### Service Client Updates
+* `service/elb`: Updates service API, documentation, and paginators
+* `service/elbv2`: Updates service API and documentation
+* `service/lexmodelbuildingservice`: Updates service API and documentation
+* `service/organizations`: Updates service API, documentation, paginators, and examples
+ * AWS Organizations APIs that return an Account object now include the email address associated with the account’s root user.
+
+Release v1.8.21 (2017-05-09)
+===
+
+### Service Client Updates
+* `service/codestar`: Updates service documentation
+ * Updated documentation for AWS CodeStar.
+* `service/workspaces`: Updates service API, documentation, and paginators
+ * Doc-only Update for WorkSpaces
+
+Release v1.8.20 (2017-05-04)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service API, documentation, and paginators
+ * Exposes container instance registration time in ECS:DescribeContainerInstances.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/marketplaceentitlementservice`: Adds new service
+* `service/lambda`: Updates service API and documentation
+ * Support for UpdateFunctionCode DryRun option
+
+Release v1.8.19 (2017-04-28)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service waiters and paginators
+ * Adding back the removed waiters and paginators.
+
+Release v1.8.18 (2017-04-28)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service API, documentation, waiters, paginators, and examples
+ * API update for CloudFormation: New optional parameter ClientRequestToken which can be used as an idempotency token to safely retry certain operations as well as tagging StackEvents.
+* `service/rds`: Updates service API, documentation, and examples
+ * The DescribeDBClusterSnapshots API now returns a SourceDBClusterSnapshotArn field which identifies the source DB cluster snapshot of a copied snapshot.
+* `service/rekognition`: Updates service API
+ * Fix for missing file type check
+* `service/snowball`: Updates service API, documentation, and paginators
+ * The Snowball API has a new exception that can be thrown for list operation requests.
+* `service/sqs`: Updates service API, documentation, and paginators
+ * Adding server-side encryption (SSE) support to SQS by integrating with AWS KMS; adding new queue attributes to SQS CreateQueue, SetQueueAttributes and GetQueueAttributes APIs to support SSE.
+
+Release v1.8.17 (2017-04-26)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * With Amazon Relational Database Service (Amazon RDS) running MySQL or Amazon Aurora, you can now authenticate to your DB instance using IAM database authentication.
+
+Release v1.8.16 (2017-04-21)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API, documentation, and paginators
+ * The new feature named "Default Internet Access" will enable Internet access from AppStream 2.0 instances - image builders and fleet instances. Admins will check a flag either through AWS management console for AppStream 2.0 or through API while creating an image builder or while creating/updating a fleet.
+* `service/kinesis`: Updates service API, documentation, waiters, and paginators
+ * Adds a new waiter, StreamNotExists, to Kinesis.
+
+### SDK Enhancements
+* `aws/endpoints`: Add utilities improving endpoints lookup (#1218)
+ * Adds several utilities to the endpoints packages to make looking up partitions, regions, and services easier.
+ * Fixes #994
+
+### SDK Bugs
+* `private/protocol/xml/xmlutil`: Fix unmarshaling dropping errors (#1219)
+ * The XML unmarshaler would drop any serialization or body read error that occurred on the floor effectively hiding any errors that would occur.
+ * Fixes #1205
+Release v1.8.15 (2017-04-20)
+===
+
+### Service Client Updates
+* `service/devicefarm`: Updates service API and documentation
+ * API Update for AWS Device Farm: Support for Deals and Promotions
+* `service/directconnect`: Updates service documentation
+ * Documentation updates for AWS Direct Connect.
+* `service/elbv2`: Updates service waiters
+* `service/kms`: Updates service documentation and examples
+ * Doc-only update for Key Management Service (KMS): Update docs for GrantConstraints and GenerateRandom
+* `service/route53`: Updates service documentation
+ * Release notes: SDK documentation now includes examples for ChangeResourceRecordSets for all types of resource record set, such as weighted, alias, and failover.
+* `service/route53domains`: Updates service API, documentation, and paginators
+ * Adding examples and other documentation updates.
+
+### SDK Enhancements
+* `service/s3`: Add utilities to make getting a bucket's region easier (#1207)
+ * Adds two features which make it easier to get a bucket's region, `s3.NormalizeBucketLocation` and `s3manager.GetBucketRegion`.
+
+### SDK Bugs
+* `service/s3`: Fix HeadObject's incorrect documented error codes (#1213)
+ * The HeadObject's model incorrectly states that the operation can return the NoSuchKey error code.
+ * Fixes #1208
+
+Release v1.8.14 (2017-04-19)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Add support for "embed" property.
+* `service/codestar`: Adds new service
+ * AWS CodeStar is a cloud-based service for creating, managing, and working with software development projects on AWS. An AWS CodeStar project creates and integrates AWS services for your project development toolchain. AWS CodeStar also manages the permissions required for project users.
+* `service/ec2`: Updates service API and documentation
+ * Adds support for creating an Amazon FPGA Image (AFI) from a specified design checkpoint (DCP).
+* `service/iam`: Updates service API and documentation
+ * This changes introduces a new IAM role type, Service Linked Role, which works like a normal role but must be managed via services' control.
+* `service/lambda`: Updates service API and documentation
+ * Lambda integration with CloudDebugger service to enable customers to enable tracing for the Lambda functions and send trace information to the CloudDebugger service.
+* `service/lexmodelbuildingservice`: Adds new service
+* `service/polly`: Updates service API, documentation, and paginators
+ * API Update for Amazon Polly: Add support for speech marks
+* `service/rekognition`: Updates service API and documentation
+ * Given an image, the API detects explicit or suggestive adult content in the image and returns a list of corresponding labels with confidence scores, as well as a taxonomy (parent-child relation) for each label.
+
+Release v1.8.13 (2017-04-18)
+===
+
+### Service Client Updates
+* `service/lambda`: Updates service API and documentation
+ * You can use tags to group and filter your Lambda functions, making it easier to analyze them for billing allocation purposes. For more information, see Tagging Lambda Functions. You can now write or upgrade your Lambda functions using Python version 3.6. For more information, see Programming Model for Authoring Lambda Functions in Python. Note: Features will be rolled out in the US regions on 4/19.
+
+### SDK Enhancements
+* `aws/request`: add support for appengine's custom standard library (#1190)
+ * Remove syscall error checking on appengine platforms.
+
+Release v1.8.12 (2017-04-11)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * API Gateway request validators
+* `service/batch`: Updates service API and documentation
+ * API Update for AWS Batch: Customer provided AMI for MANAGED Compute Environment
+* `service/gamelift`: Updates service API and documentation
+ * Allows developers to utilize an improved workflow when calling our Queues API and introduces a new feature that allows developers to specify a maximum allowable latency per Queue.
+* `service/opsworks`: Updates service API, documentation, and paginators
+ * Cloudwatch Logs agent configuration can now be attached to OpsWorks Layers using CreateLayer and UpdateLayer. OpsWorks will then automatically install and manage the CloudWatch Logs agent on the instances part of the OpsWorks Layer.
+
+### SDK Bugs
+* `aws/client`: Fix clients polluting handler list (#1197)
+ * Fixes the clients potentially polluting the passed in handler list with the client's customizations. This change ensures every client always works with a clean copy of the request handlers and it cannot pollute the handlers back upstream.
+ * Fixes #1184
+* `aws/request`: Fix waiter error match condition (#1195)
+ * Fixes the waiters's matching overwriting the request's err, effectively ignoring the error condition. This broke waiters with the FailureWaiterState matcher state.
+Release v1.8.11 (2017-04-07)
+===
+
+### Service Client Updates
+* `service/redshift`: Updates service API, documentation, and paginators
+ * This update adds the GetClusterCredentials API which is used to get temporary login credentials to the cluster. AccountWithRestoreAccess now has a new member AccountAlias, this is the identifier of the AWS support account authorized to restore the specified snapshot. This is added to support the feature where the customer can share their snapshot with the Amazon Redshift Support Account without having to manually specify the AWS Redshift Service account ID on the AWS Console/API.
+
+Release v1.8.10 (2017-04-06)
+===
+
+### Service Client Updates
+* `service/elbv2`: Updates service documentation
+
+Release v1.8.9 (2017-04-05)
+===
+
+### Service Client Updates
+* `service/elasticache`: Updates service API, documentation, paginators, and examples
+ * ElastiCache added support for testing the Elasticache Multi-AZ feature with Automatic Failover.
+
+Release v1.8.8 (2017-04-04)
+===
+
+### Service Client Updates
+* `service/cloudwatch`: Updates service API, documentation, and paginators
+ * Amazon Web Services announced the immediate availability of two additional alarm configuration rules for Amazon CloudWatch Alarms. The first rule is for configuring missing data treatment. Customers have the options to treat missing data as alarm threshold breached, alarm threshold not breached, maintain alarm state and the current default treatment. The second rule is for alarms based on percentiles metrics that can trigger unnecassarily if the percentile is calculated from a small number of samples. The new rule can treat percentiles with low sample counts as same as missing data. If the first rule is enabled, the same treatment will be applied when an alarm encounters a percentile with low sample counts.
+
+Release v1.8.7 (2017-04-03)
+===
+
+### Service Client Updates
+* `service/lexruntimeservice`: Updates service API and documentation
+ * Adds support to PostContent for speech input
+
+### SDK Enhancements
+* `aws/request`: Improve handler copy, push back, push front performance (#1171)
+ * Minor optimization to the handler list's handling of copying and pushing request handlers to the handler list.
+* Update codegen header to use Go std wording (#1172)
+ * Go recently accepted the proposal for standard generated file header wording in, https://golang.org/s/generatedcode.
+
+### SDK Bugs
+* `service/dynamodb`: Fix DynamoDB using custom retryer (#1170)
+ * Fixes (#1139) the DynamoDB service client clobbering any custom retryer that was passed into the service client or Session's config.
+Release v1.8.6 (2017-04-01)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * ListObjectAttributes now supports filtering by facet.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.8.5 (2017-03-30)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service waiters and paginators
+ * Adding paginators for ListExports and ListImports
+* `service/cloudfront`: Adds new service
+ * Amazon CloudFront now supports user configurable HTTP Read and Keep-Alive Idle Timeouts for your Custom Origin Servers
+* `service/configservice`: Updates service documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/resourcegroupstaggingapi`: Adds new service
+* `service/storagegateway`: Updates service API and documentation
+ * File gateway mode in AWS Storage gateway provides access to objects in S3 as files on a Network File System (NFS) mount point. Once a file share is created, any changes made externally to the S3 bucket will not be reflected by the gateway. Using the cache refresh feature in this update, the customer can trigger an on-demand scan of the keys in their S3 bucket and refresh the file namespace cached on the gateway. It takes as an input the fileShare ARN and refreshes the cache for only that file share. Additionally there is new functionality on file gateway that allows you configure what squash options they would like on their file share, this allows a customer to configure their gateway to not squash root permissions. This can be done by setting options in NfsOptions for CreateNfsFileShare and UpdateNfsFileShare APIs.
+
+Release v1.8.4 (2017-03-28)
+===
+
+### Service Client Updates
+* `service/batch`: Updates service API, documentation, and paginators
+ * Customers can now provide a retryStrategy as part of the RegisterJobDefinition and SubmitJob API calls. The retryStrategy object has a number value for attempts. This is the number of non successful executions before a job is considered FAILED. In addition, the JobDetail object now has an attempts field and shows all execution attempts.
+* `service/ec2`: Updates service API and documentation
+ * Customers can now tag their Amazon EC2 Instances and Amazon EBS Volumes at
+ the time of their creation. You can do this from the EC2 Instance launch
+ wizard or through the RunInstances or CreateVolume APIs. By tagging
+ resources at the time of creation, you can eliminate the need to run custom
+ tagging scripts after resource creation. In addition, you can now set
+ resource-level permissions on the CreateVolume, CreateTags, DeleteTags, and
+ the RunInstances APIs. This allows you to implement stronger security
+ policies by giving you more granular control over which users and groups
+ have access to these APIs. You can also enforce the use of tagging and
+ control what tag keys and values are set on your resources. When you combine
+ tag usage and resource-level IAM policies together, you can ensure your
+ instances and volumes are properly secured upon creation and achieve more
+ accurate cost allocation reporting. These new features are provided at no
+ additional cost.
+
+### SDK Enhancements
+* `aws/request`: Add retry support for RequestTimeoutException (#1158)
+ * Adds support for retrying RequestTimeoutException error code that is returned by some services.
+
+### SDK Bugs
+* `private/model/api`: Fix Waiter and Paginators panic on nil param inputs (#1157)
+ * Corrects the code generation for Paginators and waiters that caused a panic if nil input parameters were used with the operations.
+Release v1.8.3 (2017-03-27)
+===
+
+## Service Client Updates
+* `service/ssm`: Updates service API, documentation, and paginators
+ * Updated validation rules for SendCommand and RegisterTaskWithMaintenanceWindow APIs.
+Release v1.8.2 (2017-03-24)
+===
+
+Service Client Updates
+---
+* `service/applicationautoscaling`: Updates service API, documentation, and paginators
+ * Application AutoScaling is launching support for a new target resource (AppStream 2.0 Fleets) as a scalable target.
+* `service/cloudtrail`: Updates service API and documentation
+ * Doc-only Update for CloudTrail: Add required parameters for GetEventSelectors and PutEventSelectors
+
+Release v1.8.1 (2017-03-23)
+===
+
+Service Client Updates
+---
+* `service/applicationdiscoveryservice`: Updates service API, documentation, and paginators
+ * Adds export configuration options to the AWS Discovery Service API.
+* `service/elbv2`: Updates waiters
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lambda`: Updates service API and paginators
+ * Adds support for new runtime Node.js v6.10 for AWS Lambda service
+
+Release v1.8.0 (2017-03-22)
+===
+
+Service Client Updates
+---
+* `service/codebuild`: Updates service documentation
+* `service/directconnect`: Updates service API
+ * Deprecated DescribeConnectionLoa, DescribeInterconnectLoa, AllocateConnectionOnInterconnect and DescribeConnectionsOnInterconnect operations in favor of DescribeLoa, DescribeLoa, AllocateHostedConnection and DescribeHostedConnections respectively.
+* `service/marketplacecommerceanalytics`: Updates service API, documentation, and paginators
+ * This update adds a new data set, us_sales_and_use_tax_records, which enables AWS Marketplace sellers to programmatically access to their U.S. Sales and Use Tax report data.
+* `service/pinpoint`: Updates service API and documentation
+ * Amazon Pinpoint User Segmentation
+ * Added ability to segment endpoints by user attributes in addition to endpoint attributes. Amazon Pinpoint Event Stream Preview
+ * Added functionality to publish raw app analytics and campaign events data as events streams to Kinesis and Kinesis Firehose
+ * The feature provides developers with increased flexibility of exporting raw events to S3, Redshift, Elasticsearch using a Kinesis Firehose stream or enable real time event processing use cases using a Kinesis stream
+* `service/rekognition`: Updates service documentation.
+
+SDK Features
+---
+* `aws/request`: Add support for context.Context to SDK API operation requests (#1132)
+ * Adds support for context.Context to the SDK by adding `WithContext` methods for each API operation, Paginators and Waiters. e.g `PutObjectWithContext`. This change also adds the ability to provide request functional options to the method calls instead of requiring you to use the `Request` API operation method (e.g `PutObjectRequest`).
+ * Adds a `Complete` Request handler list that will be called ever time a request is completed. This includes both success and failure. Complete will only be called once per API operation request.
+ * `private/waiter` package moved from the private group to `aws/request/waiter` and made publicly available.
+ * Adds Context support to all API operations, Waiters(WaitUntil) and Paginators(Pages) methods.
+ * Adds Context support for s3manager and s3crypto clients.
+
+SDK Enhancements
+---
+* `aws/signer/v4`: Adds support for unsigned payload signer config (#1130)
+ * Adds configuration option to the v4.Signer to specify the request's body should not be signed. This will only correclty function on services that support unsigned payload. e.g. S3, Glacier.
+
+SDK Bug Fixes
+---
+* `service/s3`: Fix S3 HostID to be available in S3 request error message (#1131)
+ * Adds a new type s3.RequestFailure which exposes the S3 HostID value from a S3 API operation response. This is helpful when you have an error with S3, and need to contact support. Both RequestID and HostID are needed.
+* `private/model/api`: Do not return a link if uid is empty (#1133)
+ * Fixes SDK's doc generation to not generate API reference doc links if the SDK us unable to create a valid link.
+* `aws/request`: Optimization to handler list copy to prevent multiple alloc calls. (#1134)
+Release v1.7.9 (2017-03-13)
+===
+
+Service Client Updates
+---
+* `service/devicefarm`: Updates service API, documentation, paginators, and examples
+ * Network shaping allows users to simulate network connections and conditions while testing their Android, iOS, and web apps with AWS Device Farm.
+* `service/cloudwatchevents`: Updates service API, documentation, and examples
+
+SDK Enhancement
+===
+* `aws/session`: Add support for side loaded CA bundles (#1117)
+ * Adds supports for side loading Certificate Authority bundle files to the SDK using AWS_CA_BUNDLE environment variable or CustomCABundle session option.
+* `service/s3/s3crypto`: Add support for AES/CBC/PKCS5Padding (#1124)
+
+SDK Bug
+===
+* `service/rds`: Fixing issue when not providing `SourceRegion` on cross
+region operations (#1127)
+* `service/rds`: Enables cross region for `CopyDBClusterSnapshot` and
+`CreateDBCluster` (#1128)
+
+Release v1.7.8 (2017-03-10)
+===
+
+Service Client Updates
+---
+* `service/codedeploy`: Updates service paginators
+ * Add paginators for Codedeploy
+* `service/emr`: Updates service API, documentation, and paginators
+ * This release includes support for instance fleets in Amazon EMR.
+
+Release v1.7.7 (2017-03-09)
+===
+
+Service Client Updates
+---
+* `service/apigateway`: Updates service API, documentation, and paginators
+ * API Gateway has added support for ACM certificates on custom domain names. Both Amazon-issued certificates and uploaded third-part certificates are supported.
+* `service/clouddirectory`: Updates service API, documentation, and paginators
+ * Introduces a new Cloud Directory API that enables you to retrieve all available parent paths for any type of object (a node, leaf node, policy node, and index node) in a hierarchy.
+
+Release v1.7.6 (2017-03-09)
+===
+
+Service Client Updates
+---
+* `service/organizations`: Updates service documentation and examples
+ * Doc-only Update for Organizations: Add SDK Code Snippets
+* `service/workdocs`: Adds new service
+ * The Administrative SDKs for Amazon WorkDocs provides full administrator level access to WorkDocs site resources, allowing developers to integrate their applications to manage WorkDocs users, content and permissions programmatically
+
+Release v1.7.5 (2017-03-08)
+===
+
+Service Client Updates
+---
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * Add support to using encrypted clusters as cross-region replication masters. Update CopyDBClusterSnapshot API to support encrypted cross region copy of Aurora cluster snapshots.
+
+Release v1.7.4 (2017-03-06)
+===
+
+Service Client Updates
+---
+* `service/budgets`: Updates service API and paginators
+ * When creating or editing a budget via the AWS Budgets API you can define notifications that are sent to subscribers when the actual or forecasted value for cost or usage exceeds the notificationThreshold associated with the budget notification object. Starting today, the maximum allowed value for the notificationThreshold was raised from 100 to 300. This change was made to give you more flexibility when setting budget notifications.
+* `service/cloudtrail`: Updates service documentation and paginators
+ * Doc-only update for AWSCloudTrail: Updated links/descriptions
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/opsworkscm`: Updates service API, documentation, and paginators
+ * OpsWorks for Chef Automate has added a new field "AssociatePublicIpAddress" to the CreateServer request, "CloudFormationStackArn" to the Server model and "TERMINATED" server state.
+
+
+Release v1.7.3 (2017-02-28)
+===
+
+Service Client Updates
+---
+* `service/mturk`: Renaming service
+ * service/mechanicalturkrequesterservice was renamed to service/mturk. Be sure to change any references of the old client to the new.
+
+Release v1.7.2 (2017-02-28)
+===
+
+Service Client Updates
+---
+* `service/dynamodb`: Updates service API and documentation
+ * Release notes: Time to Live (TTL) is a feature that allows you to define when items in a table expire and can be purged from the database, so that you don't have to track expired data and delete it manually. With TTL enabled on a DynamoDB table, you can set a timestamp for deletion on a per-item basis, allowing you to limit storage usage to only those records that are relevant.
+* `service/iam`: Updates service API, documentation, and paginators
+ * This release adds support for AWS Organizations service control policies (SCPs) to SimulatePrincipalPolicy operation. If there are SCPs associated with the simulated user's account, their effect on the result is captured in the OrganizationDecisionDetail element in the EvaluationResult.
+* `service/mechanicalturkrequesterservice`: Adds new service
+ * Amazon Mechanical Turk is a web service that provides an on-demand, scalable, human workforce to complete jobs that humans can do better than computers, for example, recognizing objects in photos.
+* `service/organizations`: Adds new service
+ * AWS Organizations is a web service that enables you to consolidate your multiple AWS accounts into an organization and centrally manage your accounts and their resources.
+* `service/dynamodbstreams`: Updates service API, documentation, and paginators
+* `service/waf`: Updates service API, documentation, and paginators
+ * Aws WAF - For GetSampledRequests action, changed max number of samples from 100 to 500.
+* `service/wafregional`: Updates service API, documentation, and paginators
+
Release v1.7.1 (2017-02-24)
===
diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md
index e69de29bb..8a1927a39 100644
--- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md
+++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG_PENDING.md
@@ -0,0 +1,5 @@
+### SDK Features
+
+### SDK Enhancements
+
+### SDK Bugs
diff --git a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
index 81edbfaeb..7c0186f0c 100644
--- a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
+++ b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
@@ -64,6 +64,11 @@ Please be aware of the following notes prior to opening a pull request:
SDK's test coverage percentage are unlikely to be merged until tests have
been added.
+5. The JSON files under the SDK's `models` folder are sourced from outside the SDK.
+ Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests
+ directly on these models. If you discover an issue with the models please
+ create a Github [issue](issues) describing the issue.
+
### Testing
To run the tests locally, running the `make unit` command will `go get` the
diff --git a/vendor/github.com/aws/aws-sdk-go/Makefile b/vendor/github.com/aws/aws-sdk-go/Makefile
index fc2bc0cef..df9803c2a 100644
--- a/vendor/github.com/aws/aws-sdk-go/Makefile
+++ b/vendor/github.com/aws/aws-sdk-go/Makefile
@@ -5,7 +5,8 @@ LINTIGNORESTUTTER='service/[^/]+/(api|service)\.go:.+(and that stutters)'
LINTIGNOREINFLECT='service/[^/]+/(api|errors|service)\.go:.+(method|const) .+ should be '
LINTIGNOREINFLECTS3UPLOAD='service/s3/s3manager/upload\.go:.+struct field SSEKMSKeyId should be '
LINTIGNOREDEPS='vendor/.+\.go'
-UNIT_TEST_TAGS="example codegen"
+LINTIGNOREPKGCOMMENT='service/[^/]+/doc_custom.go:.+package comment should be of the form'
+UNIT_TEST_TAGS="example codegen awsinclude"
SDK_WITH_VENDOR_PKGS=$(shell go list -tags ${UNIT_TEST_TAGS} ./... | grep -v "/vendor/src")
SDK_ONLY_PKGS=$(shell go list ./... | grep -v "/vendor/")
@@ -64,6 +65,9 @@ integration: get-deps-tests integ-custom smoke-tests performance
integ-custom:
go test -tags "integration" ./awstesting/integration/customizations/...
+cleanup-integ:
+ go run -tags "integration" ./awstesting/cmd/bucket_cleanup/main.go "aws-sdk-go-integration"
+
smoke-tests: get-deps-tests
gucumber -go-tags "integration" ./awstesting/integration/smoke
@@ -123,7 +127,7 @@ verify: get-deps-verify lint vet
lint:
@echo "go lint SDK and vendor packages"
@lint=`if [ \( -z "${SDK_GO_1_4}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then golint ./...; else echo "skipping golint"; fi`; \
- lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD}`; \
+ lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD} -e ${LINTIGNOREPKGCOMMENT}`; \
echo "$$lint"; \
if [ "$$lint" != "" ] && [ "$$lint" != "skipping golint" ]; then exit 1; fi
@@ -149,6 +153,7 @@ get-deps-tests:
go get github.com/stretchr/testify
go get github.com/smartystreets/goconvey
go get golang.org/x/net/html
+ go get golang.org/x/net/http2
get-deps-verify:
@echo "go get SDK verification utilities"
diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md
index 8247981b7..559697f66 100644
--- a/vendor/github.com/aws/aws-sdk-go/README.md
+++ b/vendor/github.com/aws/aws-sdk-go/README.md
@@ -1,11 +1,6 @@
-# AWS SDK for Go
+[![API Reference](http://img.shields.io/badge/api-reference-blue.svg)](http://docs.aws.amazon.com/sdk-for-go/api) [![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go) [![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt)
-
-[![API Reference](http://img.shields.io/badge/api-reference-blue.svg)](http://docs.aws.amazon.com/sdk-for-go/api)
-[![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go)
-[![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt)
-
+# AWS SDK for Go
aws-sdk-go is the official AWS SDK for the Go programming language.
@@ -33,16 +28,17 @@ These two processes will still include the `vendor` folder and it should be dele
## Getting Help
Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests.
+
* Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag.
* Come join the AWS SDK for Go community chat on [gitter](https://gitter.im/aws/aws-sdk-go).
* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html).
-* If you think you may of found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new).
+* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new).
## Opening Issues
-If you encounter a bug with the AWS SDK for Go we would like to hear about it. Search the [existing issues]( https://github.com/aws/aws-sdk-go/issues) and see if others are also experiencing the issue before opening a new issue. Please include the version of AWS SDK for Go, Go language, and OS you’re using. Please also include repro case when appropriate.
+If you encounter a bug with the AWS SDK for Go we would like to hear about it. Search the [existing issues](https://github.com/aws/aws-sdk-go/issues) and see if others are also experiencing the issue before opening a new issue. Please include the version of AWS SDK for Go, Go language, and OS you’re using. Please also include repro case when appropriate.
-The GitHub issues are intended for bug reports and feature requests. For help and questions with using AWS SDK for GO please make use of the resources listed in the [Getting Help]( https://github.com/aws/aws-sdk-go#getting-help) section. Keeping the list of open issues lean will help us respond in a timely manner.
+The GitHub issues are intended for bug reports and feature requests. For help and questions with using AWS SDK for GO please make use of the resources listed in the [Getting Help](https://github.com/aws/aws-sdk-go#getting-help) section. Keeping the list of open issues lean will help us respond in a timely manner.
## Reference Documentation
@@ -54,80 +50,397 @@ The GitHub issues are intended for bug reports and feature requests. For help an
[`SDK Examples`](https://github.com/aws/aws-sdk-go/tree/master/example) - Included in the SDK's repo are a several hand crafted examples using the SDK features and AWS services.
-## Configuring Credentials
+## Overview of SDK's Packages
-Before using the SDK, ensure that you've configured credentials. The best
-way to configure credentials on a development machine is to use the
-`~/.aws/credentials` file, which might look like:
+The SDK is composed of two main components, SDK core, and service clients.
+The SDK core packages are all available under the aws package at the root of
+the SDK. Each client for a supported AWS service is available within its own
+package under the service folder at the root of the SDK.
-```
-[default]
-aws_access_key_id = AKID1234567890
-aws_secret_access_key = MY-SECRET-KEY
-```
+ * aws - SDK core, provides common shared types such as Config, Logger,
+ and utilities to make working with API parameters easier.
-You can learn more about the credentials file from this
-[blog post](http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs).
+ * awserr - Provides the error interface that the SDK will use for all
+ errors that occur in the SDK's processing. This includes service API
+ response errors as well. The Error type is made up of a code and message.
+ Cast the SDK's returned error type to awserr.Error and call the Code
+ method to compare returned error to specific error codes. See the package's
+ documentation for additional values that can be extracted such as RequestID.
-Alternatively, you can set the following environment variables:
+ * credentials - Provides the types and built in credentials providers
+ the SDK will use to retrieve AWS credentials to make API requests with.
+ Nested under this folder are also additional credentials providers such as
+ stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles.
-```
-AWS_ACCESS_KEY_ID=AKID1234567890
-AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY
-```
+ * endpoints - Provides the AWS Regions and Endpoints metadata for the SDK.
+ Use this to lookup AWS service endpoint information such as which services
+ are in a region, and what regions a service is in. Constants are also provided
+ for all region identifiers, e.g UsWest2RegionID for "us-west-2".
-### AWS shared config file (`~/.aws/config`)
-The AWS SDK for Go added support the shared config file in release [v1.3.0](https://github.com/aws/aws-sdk-go/releases/tag/v1.3.0). You can opt into enabling support for the shared config by setting the environment variable `AWS_SDK_LOAD_CONFIG` to a truthy value. See the [Session](https://github.com/aws/aws-sdk-go/wiki/sessions) wiki for more information about this feature.
+ * session - Provides initial default configuration, and load
+ configuration from external sources such as environment and shared
+ credentials file.
-## Using the Go SDK
+ * request - Provides the API request sending, and retry logic for the SDK.
+ This package also includes utilities for defining your own request
+ retryer, and configuring how the SDK processes the request.
-To use a service in the SDK, create a service variable by calling the `New()`
-function. Once you have a service client, you can call API operations which each
-return response data and a possible error.
+ * service - Clients for AWS services. All services supported by the SDK are
+ available under this folder.
-To list a set of instance IDs from EC2, you could run:
+## How to Use the SDK's AWS Service Clients
+
+The SDK includes the Go types and utilities you can use to make requests to
+AWS service APIs. Within the service folder at the root of the SDK you'll find
+a package for each AWS service the SDK supports. All service clients follows
+a common pattern of creation and usage.
+
+When creating a client for an AWS service you'll first need to have a Session
+value constructed. The Session provides shared configuration that can be shared
+between your service clients. When service clients are created you can pass
+in additional configuration via the aws.Config type to override configuration
+provided by in the Session to create service client instances with custom
+configuration.
+
+Once the service's client is created you can use it to make API requests the
+AWS service. These clients are safe to use concurrently.
+
+## Configuring the SDK
+
+In the AWS SDK for Go, you can configure settings for service clients, such
+as the log level and maximum number of retries. Most settings are optional;
+however, for each service client, you must specify a region and your credentials.
+The SDK uses these values to send requests to the correct AWS region and sign
+requests with the correct credentials. You can specify these values as part
+of a session or as environment variables.
+
+See the SDK's [configuration guide][config_guide] for more information.
+
+See the [session][session_pkg] package documentation for more information on how to use Session
+with the SDK.
+
+See the [Config][config_typ] type in the [aws][aws_pkg] package for more information on configuration
+options.
+
+[config_guide]: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html
+[session_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/session/
+[config_typ]: https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+[aws_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/
+
+### Configuring Credentials
+
+When using the SDK you'll generally need your AWS credentials to authenticate
+with AWS services. The SDK supports multiple methods of supporting these
+credentials. By default the SDK will source credentials automatically from
+its default credential chain. See the session package for more information
+on this chain, and how to configure it. The common items in the credential
+chain are the following:
+
+ * Environment Credentials - Set of environment variables that are useful
+ when sub processes are created for specific roles.
+
+ * Shared Credentials file (~/.aws/credentials) - This file stores your
+ credentials based on a profile name and is useful for local development.
+
+ * EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials
+ to application running on an EC2 instance. This removes the need to manage
+ credential files in production.
+
+Credentials can be configured in code as well by setting the Config's Credentials
+value to a custom provider or using one of the providers included with the
+SDK to bypass the default credential chain and use a custom one. This is
+helpful when you want to instruct the SDK to only use a specific set of
+credentials or providers.
+
+This example creates a credential provider for assuming an IAM role, "myRoleARN"
+and configures the S3 service client to use that role for API requests.
```go
-package main
+ // Initial credentials loaded from SDK's default credential chain. Such as
+ // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
+ // Role. These credentials will be used to to make the STS Assume Role API.
+ sess := session.Must(session.NewSession())
-import (
- "fmt"
+ // Create the credentials from AssumeRoleProvider to assume the role
+ // referenced by the "myRoleARN" ARN.
+ creds := stscreds.NewCredentials(sess, "myRoleArn")
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/ec2"
-)
-
-func main() {
- sess, err := session.NewSession()
- if err != nil {
- panic(err)
- }
-
- // Create an EC2 service object in the "us-west-2" region
- // Note that you can also configure your region globally by
- // exporting the AWS_REGION environment variable
- svc := ec2.New(sess, &aws.Config{Region: aws.String("us-west-2")})
-
- // Call the DescribeInstances Operation
- resp, err := svc.DescribeInstances(nil)
- if err != nil {
- panic(err)
- }
-
- // resp has all of the response data, pull out instance IDs:
- fmt.Println("> Number of reservation sets: ", len(resp.Reservations))
- for idx, res := range resp.Reservations {
- fmt.Println(" > Number of instances: ", len(res.Instances))
- for _, inst := range resp.Reservations[idx].Instances {
- fmt.Println(" - Instance ID: ", *inst.InstanceId)
- }
- }
-}
+ // Create service client value configured for credentials
+ // from assumed role.
+ svc := s3.New(sess, &aws.Config{Credentials: creds})/
```
-You can find more information and operations in our
-[API documentation](http://docs.aws.amazon.com/sdk-for-go/api/).
+See the [credentials][credentials_pkg] package documentation for more information on credential
+providers included with the SDK, and how to customize the SDK's usage of
+credentials.
+
+The SDK has support for the shared configuration file (~/.aws/config). This
+support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1",
+or enabling the feature in code when creating a Session via the
+Option's SharedConfigState parameter.
+
+```go
+ sess := session.Must(session.NewSessionWithOptions(session.Options{
+ SharedConfigState: session.SharedConfigEnable,
+ }))
+```
+
+[credentials_pkg]: ttps://docs.aws.amazon.com/sdk-for-go/api/aws/credentials
+
+### Configuring AWS Region
+
+In addition to the credentials you'll need to specify the region the SDK
+will use to make AWS API requests to. In the SDK you can specify the region
+either with an environment variable, or directly in code when a Session or
+service client is created. The last value specified in code wins if the region
+is specified multiple ways.
+
+To set the region via the environment variable set the "AWS_REGION" to the
+region you want to the SDK to use. Using this method to set the region will
+allow you to run your application in multiple regions without needing additional
+code in the application to select the region.
+
+ AWS_REGION=us-west-2
+
+The endpoints package includes constants for all regions the SDK knows. The
+values are all suffixed with RegionID. These values are helpful, because they
+reduce the need to type the region string manually.
+
+To set the region on a Session use the aws package's Config struct parameter
+Region to the AWS region you want the service clients created from the session to
+use. This is helpful when you want to create multiple service clients, and
+all of the clients make API requests to the same region.
+
+```go
+ sess := session.Must(session.NewSession(&aws.Config{
+ Region: aws.String(endpoints.UsWest2RegionID),
+ }))
+```
+
+See the [endpoints][endpoints_pkg] package for the AWS Regions and Endpoints metadata.
+
+In addition to setting the region when creating a Session you can also set
+the region on a per service client bases. This overrides the region of a
+Session. This is helpful when you want to create service clients in specific
+regions different from the Session's region.
+
+```go
+ svc := s3.New(sess, &aws.Config{
+ Region: aws.String(endpoints.UsWest2RegionID),
+ })
+```
+
+See the [Config][config_typ] type in the [aws][aws_pkg] package for more information and additional
+options such as setting the Endpoint, and other service client configuration options.
+
+[endpoints_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/
+
+## Making API Requests
+
+Once the client is created you can make an API request to the service.
+Each API method takes a input parameter, and returns the service response
+and an error. The SDK provides methods for making the API call in multiple ways.
+
+In this list we'll use the S3 ListObjects API as an example for the different
+ways of making API requests.
+
+ * ListObjects - Base API operation that will make the API request to the service.
+
+ * ListObjectsRequest - API methods suffixed with Request will construct the
+ API request, but not send it. This is also helpful when you want to get a
+ presigned URL for a request, and share the presigned URL instead of your
+ application making the request directly.
+
+ * ListObjectsPages - Same as the base API operation, but uses a callback to
+ automatically handle pagination of the API's response.
+
+ * ListObjectsWithContext - Same as base API operation, but adds support for
+ the Context pattern. This is helpful for controlling the canceling of in
+ flight requests. See the Go standard library context package for more
+ information. This method also takes request package's Option functional
+ options as the variadic argument for modifying how the request will be
+ made, or extracting information from the raw HTTP response.
+
+ * ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for
+ the Context pattern. Similar to ListObjectsWithContext this method also
+ takes the request package's Option function option types as the variadic
+ argument.
+
+In addition to the API operations the SDK also includes several higher level
+methods that abstract checking for and waiting for an AWS resource to be in
+a desired state. In this list we'll use WaitUntilBucketExists to demonstrate
+the different forms of waiters.
+
+ * WaitUntilBucketExists. - Method to make API request to query an AWS service for
+ a resource's state. Will return successfully when that state is accomplished.
+
+ * WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds
+ support for the Context pattern. In addition these methods take request
+ package's WaiterOptions to configure the waiter, and how underlying request
+ will be made by the SDK.
+
+The API method will document which error codes the service might return for
+the operation. These errors will also be available as const strings prefixed
+with "ErrCode" in the service client's package. If there are no errors listed
+in the API's SDK documentation you'll need to consult the AWS service's API
+documentation for the errors that could be returned.
+
+```go
+ ctx := context.Background()
+
+ result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{
+ Bucket: aws.String("my-bucket"),
+ Key: aws.String("my-key"),
+ })
+ if err != nil {
+ // Cast err to awserr.Error to handle specific error codes.
+ aerr, ok := err.(awserr.Error)
+ if ok && aerr.Code() == s3.ErrCodeNoSuchKey {
+ // Specific error code handling
+ }
+ return err
+ }
+
+ // Make sure to close the body when done with it for S3 GetObject APIs or
+ // will leak connections.
+ defer result.Body.Close()
+
+ fmt.Println("Object Size:", aws.StringValue(result.ContentLength))
+```
+
+### API Request Pagination and Resource Waiters
+
+Pagination helper methods are suffixed with "Pages", and provide the
+functionality needed to round trip API page requests. Pagination methods
+take a callback function that will be called for each page of the API's response.
+
+```go
+ objects := []string{}
+ err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{
+ Bucket: aws.String(myBucket),
+ }, func(p *s3.ListObjectsOutput, lastPage bool) bool {
+ for _, o := range p.Contents {
+ objects = append(objects, aws.StringValue(o.Key))
+ }
+ return true // continue paging
+ })
+ if err != nil {
+ panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err))
+ }
+
+ fmt.Println("Objects in bucket:", objects)
+```
+
+Waiter helper methods provide the functionality to wait for an AWS resource
+state. These methods abstract the logic needed to to check the state of an
+AWS resource, and wait until that resource is in a desired state. The waiter
+will block until the resource is in the state that is desired, an error occurs,
+or the waiter times out. If a resource times out the error code returned will
+be request.WaiterResourceNotReadyErrorCode.
+
+```go
+ err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{
+ Bucket: aws.String(myBucket),
+ })
+ if err != nil {
+ aerr, ok := err.(awserr.Error)
+ if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode {
+ fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist")
+ }
+ panic(fmt.Errorf("failed to wait for bucket to exist, %v", err))
+ }
+ fmt.Println("Bucket", myBucket, "exists")
+```
+
+## Complete SDK Example
+
+This example shows a complete working Go file which will upload a file to S3
+and use the Context pattern to implement timeout logic that will cancel the
+request if it takes too long. This example highlights how to use sessions,
+create a service client, make a request, handle the error, and process the
+response.
+
+```go
+ package main
+
+ import (
+ "context"
+ "flag"
+ "fmt"
+ "os"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/service/s3"
+ )
+
+ // Uploads a file to S3 given a bucket and object key. Also takes a duration
+ // value to terminate the update if it doesn't complete within that time.
+ //
+ // The AWS Region needs to be provided in the AWS shared config or on the
+ // environment variable as `AWS_REGION`. Credentials also must be provided
+ // Will default to shared config file, but can load from environment if provided.
+ //
+ // Usage:
+ // # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail
+ // go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt
+ func main() {
+ var bucket, key string
+ var timeout time.Duration
+
+ flag.StringVar(&bucket, "b", "", "Bucket name.")
+ flag.StringVar(&key, "k", "", "Object key name.")
+ flag.DurationVar(&timeout, "d", 0, "Upload timeout.")
+ flag.Parse()
+
+ // All clients require a Session. The Session provides the client with
+ // shared configuration such as region, endpoint, and credentials. A
+ // Session should be shared where possible to take advantage of
+ // configuration and credential caching. See the session package for
+ // more information.
+ sess := session.Must(session.NewSession())
+
+ // Create a new instance of the service's client with a Session.
+ // Optional aws.Config values can also be provided as variadic arguments
+ // to the New function. This option allows you to provide service
+ // specific configuration.
+ svc := s3.New(sess)
+
+ // Create a context with a timeout that will abort the upload if it takes
+ // more than the passed in timeout.
+ ctx := context.Background()
+ var cancelFn func()
+ if timeout > 0 {
+ ctx, cancelFn = context.WithTimeout(ctx, timeout)
+ }
+ // Ensure the context is canceled to prevent leaking.
+ // See context package for more information, https://golang.org/pkg/context/
+ defer cancelFn()
+
+ // Uploads the object to S3. The Context will interrupt the request if the
+ // timeout expires.
+ _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{
+ Bucket: aws.String(bucket),
+ Key: aws.String(key),
+ Body: os.Stdin,
+ })
+ if err != nil {
+ if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode {
+ // If the SDK can determine the request or retry delay was canceled
+ // by a context the CanceledErrorCode error code will be returned.
+ fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err)
+ } else {
+ fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err)
+ }
+ os.Exit(1)
+ }
+
+ fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key)
+ }
+```
## License
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
index 17fc76a0f..788fe6e27 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
@@ -2,7 +2,6 @@ package client
import (
"fmt"
- "net/http/httputil"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client/metadata"
@@ -46,7 +45,7 @@ func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, op
svc := &Client{
Config: cfg,
ClientInfo: info,
- Handlers: handlers,
+ Handlers: handlers.Copy(),
}
switch retryer, ok := cfg.Retryer.(request.Retryer); {
@@ -86,61 +85,6 @@ func (c *Client) AddDebugHandlers() {
return
}
- c.Handlers.Send.PushFront(logRequest)
- c.Handlers.Send.PushBack(logResponse)
-}
-
-const logReqMsg = `DEBUG: Request %s/%s Details:
----[ REQUEST POST-SIGN ]-----------------------------
-%s
------------------------------------------------------`
-
-const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
----[ REQUEST DUMP ERROR ]-----------------------------
-%s
------------------------------------------------------`
-
-func logRequest(r *request.Request) {
- logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
- dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- if logBody {
- // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's
- // Body as a NoOpCloser and will not be reset after read by the HTTP
- // client reader.
- r.ResetBody()
- }
-
- r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody)))
-}
-
-const logRespMsg = `DEBUG: Response %s/%s Details:
----[ RESPONSE ]--------------------------------------
-%s
------------------------------------------------------`
-
-const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
----[ RESPONSE DUMP ERROR ]-----------------------------
-%s
------------------------------------------------------`
-
-func logResponse(r *request.Request) {
- var msg = "no response data"
- if r.HTTPResponse != nil {
- logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
- dumpedBody, err := httputil.DumpResponse(r.HTTPResponse, logBody)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- msg = string(dumpedBody)
- } else if r.Error != nil {
- msg = r.Error.Error()
- }
- r.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.ClientInfo.ServiceName, r.Operation.Name, msg))
+ c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest})
+ c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse})
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
index 43a3676b7..e25a460fb 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
@@ -15,11 +15,11 @@ import (
// the MaxRetries method:
//
// type retryer struct {
-// service.DefaultRetryer
+// client.DefaultRetryer
// }
//
// // This implementation always has 100 max retries
-// func (d retryer) MaxRetries() uint { return 100 }
+// func (d retryer) MaxRetries() int { return 100 }
type DefaultRetryer struct {
NumMaxRetries int
}
@@ -54,6 +54,12 @@ func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
// ShouldRetry returns true if the request should be retried.
func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
+ // If one of the other handlers already set the retry state
+ // we don't want to override it based on the service's state
+ if r.Retryable != nil {
+ return *r.Retryable
+ }
+
if r.HTTPResponse.StatusCode >= 500 {
return true
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
new file mode 100644
index 000000000..1f39c91f2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
@@ -0,0 +1,108 @@
+package client
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http/httputil"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+const logReqMsg = `DEBUG: Request %s/%s Details:
+---[ REQUEST POST-SIGN ]-----------------------------
+%s
+-----------------------------------------------------`
+
+const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
+---[ REQUEST DUMP ERROR ]-----------------------------
+%s
+------------------------------------------------------`
+
+type logWriter struct {
+ // Logger is what we will use to log the payload of a response.
+ Logger aws.Logger
+ // buf stores the contents of what has been read
+ buf *bytes.Buffer
+}
+
+func (logger *logWriter) Write(b []byte) (int, error) {
+ return logger.buf.Write(b)
+}
+
+type teeReaderCloser struct {
+ // io.Reader will be a tee reader that is used during logging.
+ // This structure will read from a body and write the contents to a logger.
+ io.Reader
+ // Source is used just to close when we are done reading.
+ Source io.ReadCloser
+}
+
+func (reader *teeReaderCloser) Close() error {
+ return reader.Source.Close()
+}
+
+func logRequest(r *request.Request) {
+ logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
+ dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
+ if err != nil {
+ r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
+ return
+ }
+
+ if logBody {
+ // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's
+ // Body as a NoOpCloser and will not be reset after read by the HTTP
+ // client reader.
+ r.ResetBody()
+ }
+
+ r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody)))
+}
+
+const logRespMsg = `DEBUG: Response %s/%s Details:
+---[ RESPONSE ]--------------------------------------
+%s
+-----------------------------------------------------`
+
+const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
+---[ RESPONSE DUMP ERROR ]-----------------------------
+%s
+-----------------------------------------------------`
+
+func logResponse(r *request.Request) {
+ lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)}
+ r.HTTPResponse.Body = &teeReaderCloser{
+ Reader: io.TeeReader(r.HTTPResponse.Body, lw),
+ Source: r.HTTPResponse.Body,
+ }
+
+ handlerFn := func(req *request.Request) {
+ body, err := httputil.DumpResponse(req.HTTPResponse, false)
+ if err != nil {
+ lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err))
+ return
+ }
+
+ b, err := ioutil.ReadAll(lw.buf)
+ if err != nil {
+ lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err))
+ return
+ }
+ lw.Logger.Log(fmt.Sprintf(logRespMsg, req.ClientInfo.ServiceName, req.Operation.Name, string(body)))
+ if req.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) {
+ lw.Logger.Log(string(b))
+ }
+ }
+
+ const handlerName = "awsdk.client.LogResponse.ResponseBody"
+
+ r.Handlers.Unmarshal.SetBackNamed(request.NamedHandler{
+ Name: handlerName, Fn: handlerFn,
+ })
+ r.Handlers.UnmarshalError.SetBackNamed(request.NamedHandler{
+ Name: handlerName, Fn: handlerFn,
+ })
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go
index f5a7c3792..ae3a28696 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go
@@ -53,6 +53,13 @@ type Config struct {
// to use based on region.
EndpointResolver endpoints.Resolver
+ // EnforceShouldRetryCheck is used in the AfterRetryHandler to always call
+ // ShouldRetry regardless of whether or not if request.Retryable is set.
+ // This will utilize ShouldRetry method of custom retryers. If EnforceShouldRetryCheck
+ // is not set, then ShouldRetry will only be called if request.Retryable is nil.
+ // Proper handling of the request.Retryable field is important when setting this field.
+ EnforceShouldRetryCheck *bool
+
// The region to send requests to. This parameter is required and must
// be configured globally or on a per-client basis unless otherwise
// noted. A full list of regions is found in the "Regions and Endpoints"
@@ -88,7 +95,7 @@ type Config struct {
// recoverable failures.
//
// When nil or the value does not implement the request.Retryer interface,
- // the request.DefaultRetryer will be used.
+ // the client.DefaultRetryer will be used.
//
// When both Retryer and MaxRetries are non-nil, the former is used and
// the latter ignored.
@@ -187,6 +194,10 @@ type Config struct {
// request delays. This value should only be used for testing. To adjust
// the delay of a request see the aws/client.DefaultRetryer and
// aws/request.Retryer.
+ //
+ // SleepDelay will prevent any Context from being used for canceling retry
+ // delay of an API operation. It is recommended to not use SleepDelay at all
+ // and specify a Retryer instead.
SleepDelay func(time.Duration)
// DisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests.
@@ -439,6 +450,10 @@ func mergeInConfig(dst *Config, other *Config) {
if other.DisableRestProtocolURICleaning != nil {
dst.DisableRestProtocolURICleaning = other.DisableRestProtocolURICleaning
}
+
+ if other.EnforceShouldRetryCheck != nil {
+ dst.EnforceShouldRetryCheck = other.EnforceShouldRetryCheck
+ }
}
// Copy will return a shallow copy of the Config object. If any additional
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context.go b/vendor/github.com/aws/aws-sdk-go/aws/context.go
new file mode 100644
index 000000000..79f426853
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context.go
@@ -0,0 +1,71 @@
+package aws
+
+import (
+ "time"
+)
+
+// Context is an copy of the Go v1.7 stdlib's context.Context interface.
+// It is represented as a SDK interface to enable you to use the "WithContext"
+// API methods with Go v1.6 and a Context type such as golang.org/x/net/context.
+//
+// See https://golang.org/pkg/context on how to use contexts.
+type Context interface {
+ // Deadline returns the time when work done on behalf of this context
+ // should be canceled. Deadline returns ok==false when no deadline is
+ // set. Successive calls to Deadline return the same results.
+ Deadline() (deadline time.Time, ok bool)
+
+ // Done returns a channel that's closed when work done on behalf of this
+ // context should be canceled. Done may return nil if this context can
+ // never be canceled. Successive calls to Done return the same value.
+ Done() <-chan struct{}
+
+ // Err returns a non-nil error value after Done is closed. Err returns
+ // Canceled if the context was canceled or DeadlineExceeded if the
+ // context's deadline passed. No other values for Err are defined.
+ // After Done is closed, successive calls to Err return the same value.
+ Err() error
+
+ // Value returns the value associated with this context for key, or nil
+ // if no value is associated with key. Successive calls to Value with
+ // the same key returns the same result.
+ //
+ // Use context values only for request-scoped data that transits
+ // processes and API boundaries, not for passing optional parameters to
+ // functions.
+ Value(key interface{}) interface{}
+}
+
+// BackgroundContext returns a context that will never be canceled, has no
+// values, and no deadline. This context is used by the SDK to provide
+// backwards compatibility with non-context API operations and functionality.
+//
+// Go 1.6 and before:
+// This context function is equivalent to context.Background in the Go stdlib.
+//
+// Go 1.7 and later:
+// The context returned will be the value returned by context.Background()
+//
+// See https://golang.org/pkg/context for more information on Contexts.
+func BackgroundContext() Context {
+ return backgroundCtx
+}
+
+// SleepWithContext will wait for the timer duration to expire, or the context
+// is canceled. Which ever happens first. If the context is canceled the Context's
+// error will be returned.
+//
+// Expects Context to always return a non-nil error if the Done channel is closed.
+func SleepWithContext(ctx Context, dur time.Duration) error {
+ t := time.NewTimer(dur)
+ defer t.Stop()
+
+ select {
+ case <-t.C:
+ break
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
new file mode 100644
index 000000000..e8cf93d26
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
@@ -0,0 +1,41 @@
+// +build !go1.7
+
+package aws
+
+import "time"
+
+// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This
+// is copied to provide a 1.6 and 1.5 safe version of context that is compatible
+// with Go 1.7's Context.
+//
+// An emptyCtx is never canceled, has no values, and has no deadline. It is not
+// struct{}, since vars of this type must have distinct addresses.
+type emptyCtx int
+
+func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
+ return
+}
+
+func (*emptyCtx) Done() <-chan struct{} {
+ return nil
+}
+
+func (*emptyCtx) Err() error {
+ return nil
+}
+
+func (*emptyCtx) Value(key interface{}) interface{} {
+ return nil
+}
+
+func (e *emptyCtx) String() string {
+ switch e {
+ case backgroundCtx:
+ return "aws.BackgroundContext"
+ }
+ return "unknown empty Context"
+}
+
+var (
+ backgroundCtx = new(emptyCtx)
+)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go
new file mode 100644
index 000000000..064f75c92
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go
@@ -0,0 +1,9 @@
+// +build go1.7
+
+package aws
+
+import "context"
+
+var (
+ backgroundCtx = context.Background()
+)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
index 8a7bafc78..495e3ef62 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
@@ -27,7 +27,7 @@ type lener interface {
// or will use the HTTPRequest.Header's "Content-Length" if defined. If unable
// to determine request body length and no "Content-Length" was specified it will panic.
//
-// The Content-Length will only be aded to the request if the length of the body
+// The Content-Length will only be added to the request if the length of the body
// is greater than 0. If the body is empty or the current `Content-Length`
// header is <= 0, the header will also be stripped.
var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLengthHandler", Fn: func(r *request.Request) {
@@ -71,8 +71,8 @@ var reStatusCode = regexp.MustCompile(`^(\d{3})`)
// ValidateReqSigHandler is a request handler to ensure that the request's
// signature doesn't expire before it is sent. This can happen when a request
-// is built and signed signficantly before it is sent. Or significant delays
-// occur whne retrying requests that would cause the signature to expire.
+// is built and signed significantly before it is sent. Or significant delays
+// occur when retrying requests that would cause the signature to expire.
var ValidateReqSigHandler = request.NamedHandler{
Name: "core.ValidateReqSigHandler",
Fn: func(r *request.Request) {
@@ -98,44 +98,95 @@ var ValidateReqSigHandler = request.NamedHandler{
}
// SendHandler is a request handler to send service request using HTTP client.
-var SendHandler = request.NamedHandler{Name: "core.SendHandler", Fn: func(r *request.Request) {
- var err error
- r.HTTPResponse, err = r.Config.HTTPClient.Do(r.HTTPRequest)
- if err != nil {
- // Prevent leaking if an HTTPResponse was returned. Clean up
- // the body.
- if r.HTTPResponse != nil {
- r.HTTPResponse.Body.Close()
+var SendHandler = request.NamedHandler{
+ Name: "core.SendHandler",
+ Fn: func(r *request.Request) {
+ sender := sendFollowRedirects
+ if r.DisableFollowRedirects {
+ sender = sendWithoutFollowRedirects
}
- // Capture the case where url.Error is returned for error processing
- // response. e.g. 301 without location header comes back as string
- // error and r.HTTPResponse is nil. Other url redirect errors will
- // comeback in a similar method.
- if e, ok := err.(*url.Error); ok && e.Err != nil {
- if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil {
- code, _ := strconv.ParseInt(s[1], 10, 64)
- r.HTTPResponse = &http.Response{
- StatusCode: int(code),
- Status: http.StatusText(int(code)),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- return
- }
+
+ if request.NoBody == r.HTTPRequest.Body {
+ // Strip off the request body if the NoBody reader was used as a
+ // place holder for a request body. This prevents the SDK from
+ // making requests with a request body when it would be invalid
+ // to do so.
+ //
+ // Use a shallow copy of the http.Request to ensure the race condition
+ // of transport on Body will not trigger
+ reqOrig, reqCopy := r.HTTPRequest, *r.HTTPRequest
+ reqCopy.Body = nil
+ r.HTTPRequest = &reqCopy
+ defer func() {
+ r.HTTPRequest = reqOrig
+ }()
}
- if r.HTTPResponse == nil {
- // Add a dummy request response object to ensure the HTTPResponse
- // value is consistent.
+
+ var err error
+ r.HTTPResponse, err = sender(r)
+ if err != nil {
+ handleSendError(r, err)
+ }
+ },
+}
+
+func sendFollowRedirects(r *request.Request) (*http.Response, error) {
+ return r.Config.HTTPClient.Do(r.HTTPRequest)
+}
+
+func sendWithoutFollowRedirects(r *request.Request) (*http.Response, error) {
+ transport := r.Config.HTTPClient.Transport
+ if transport == nil {
+ transport = http.DefaultTransport
+ }
+
+ return transport.RoundTrip(r.HTTPRequest)
+}
+
+func handleSendError(r *request.Request, err error) {
+ // Prevent leaking if an HTTPResponse was returned. Clean up
+ // the body.
+ if r.HTTPResponse != nil {
+ r.HTTPResponse.Body.Close()
+ }
+ // Capture the case where url.Error is returned for error processing
+ // response. e.g. 301 without location header comes back as string
+ // error and r.HTTPResponse is nil. Other URL redirect errors will
+ // comeback in a similar method.
+ if e, ok := err.(*url.Error); ok && e.Err != nil {
+ if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil {
+ code, _ := strconv.ParseInt(s[1], 10, 64)
r.HTTPResponse = &http.Response{
- StatusCode: int(0),
- Status: http.StatusText(int(0)),
+ StatusCode: int(code),
+ Status: http.StatusText(int(code)),
Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
}
+ return
}
- // Catch all other request errors.
- r.Error = awserr.New("RequestError", "send request failed", err)
- r.Retryable = aws.Bool(true) // network errors are retryable
}
-}}
+ if r.HTTPResponse == nil {
+ // Add a dummy request response object to ensure the HTTPResponse
+ // value is consistent.
+ r.HTTPResponse = &http.Response{
+ StatusCode: int(0),
+ Status: http.StatusText(int(0)),
+ Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
+ }
+ }
+ // Catch all other request errors.
+ r.Error = awserr.New("RequestError", "send request failed", err)
+ r.Retryable = aws.Bool(true) // network errors are retryable
+
+ // Override the error with a context canceled error, if that was canceled.
+ ctx := r.Context()
+ select {
+ case <-ctx.Done():
+ r.Error = awserr.New(request.CanceledErrorCode,
+ "request context canceled", ctx.Err())
+ r.Retryable = aws.Bool(false)
+ default:
+ }
+}
// ValidateResponseHandler is a request handler to validate service response.
var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseHandler", Fn: func(r *request.Request) {
@@ -150,13 +201,22 @@ var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseH
var AfterRetryHandler = request.NamedHandler{Name: "core.AfterRetryHandler", Fn: func(r *request.Request) {
// If one of the other handlers already set the retry state
// we don't want to override it based on the service's state
- if r.Retryable == nil {
+ if r.Retryable == nil || aws.BoolValue(r.Config.EnforceShouldRetryCheck) {
r.Retryable = aws.Bool(r.ShouldRetry(r))
}
if r.WillRetry() {
r.RetryDelay = r.RetryRules(r)
- r.Config.SleepDelay(r.RetryDelay)
+
+ if sleepFn := r.Config.SleepDelay; sleepFn != nil {
+ // Support SleepDelay for backwards compatibility and testing
+ sleepFn(r.RetryDelay)
+ } else if err := aws.SleepWithContext(r.Context(), r.RetryDelay); err != nil {
+ r.Error = awserr.New(request.CanceledErrorCode,
+ "request context canceled", err)
+ r.Retryable = aws.Bool(false)
+ return
+ }
// when the expired token exception occurs the credentials
// need to be expired locally so that the next request to
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
index 6efc77bf0..f298d6596 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
@@ -13,7 +13,7 @@ var (
//
// @readonly
ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders",
- `no valid providers in chain. Deprecated.
+ `no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors`,
nil)
)
@@ -39,16 +39,18 @@ var (
// does not return any credentials ChainProvider will return the error
// ErrNoValidProvidersFoundInChain
//
-// creds := NewChainCredentials(
-// []Provider{
-// &EnvProvider{},
-// &EC2RoleProvider{
+// creds := credentials.NewChainCredentials(
+// []credentials.Provider{
+// &credentials.EnvProvider{},
+// &ec2rolecreds.EC2RoleProvider{
// Client: ec2metadata.New(sess),
// },
// })
//
// // Usage of ChainCredentials with aws.Config
-// svc := ec2.New(&aws.Config{Credentials: creds})
+// svc := ec2.New(session.Must(session.NewSession(&aws.Config{
+// Credentials: creds,
+// })))
//
type ChainProvider struct {
Providers []Provider
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
index 7b8ebf5f9..42416fc2f 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
@@ -14,7 +14,7 @@
//
// Example of using the environment variable credentials.
//
-// creds := NewEnvCredentials()
+// creds := credentials.NewEnvCredentials()
//
// // Retrieve the credentials value
// credValue, err := creds.Get()
@@ -26,7 +26,7 @@
// This may be helpful to proactively expire credentials and refresh them sooner
// than they would naturally expire on their own.
//
-// creds := NewCredentials(&EC2RoleProvider{})
+// creds := credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{})
// creds.Expire()
// credsValue, err := creds.Get()
// // New credentials will be retrieved instead of from cache.
@@ -43,7 +43,7 @@
// func (m *MyProvider) Retrieve() (Value, error) {...}
// func (m *MyProvider) IsExpired() bool {...}
//
-// creds := NewCredentials(&MyProvider{})
+// creds := credentials.NewCredentials(&MyProvider{})
// credValue, err := creds.Get()
//
package credentials
@@ -60,7 +60,9 @@ import (
// when making service API calls. For example, when accessing public
// s3 buckets.
//
-// svc := s3.New(&aws.Config{Credentials: AnonymousCredentials})
+// svc := s3.New(session.Must(session.NewSession(&aws.Config{
+// Credentials: credentials.AnonymousCredentials,
+// })))
// // Access public S3 buckets.
//
// @readonly
@@ -88,7 +90,7 @@ type Value struct {
// The Provider should not need to implement its own mutexes, because
// that will be managed by Credentials.
type Provider interface {
- // Refresh returns nil if it successfully retrieved the value.
+ // Retrieve returns nil if it successfully retrieved the value.
// Error is returned if the value were not obtainable, or empty.
Retrieve() (Value, error)
@@ -97,6 +99,27 @@ type Provider interface {
IsExpired() bool
}
+// An ErrorProvider is a stub credentials provider that always returns an error
+// this is used by the SDK when construction a known provider is not possible
+// due to an error.
+type ErrorProvider struct {
+ // The error to be returned from Retrieve
+ Err error
+
+ // The provider name to set on the Retrieved returned Value
+ ProviderName string
+}
+
+// Retrieve will always return the error that the ErrorProvider was created with.
+func (p ErrorProvider) Retrieve() (Value, error) {
+ return Value{ProviderName: p.ProviderName}, p.Err
+}
+
+// IsExpired will always return not expired.
+func (p ErrorProvider) IsExpired() bool {
+ return false
+}
+
// A Expiry provides shared expiration logic to be used by credentials
// providers to implement expiry functionality.
//
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
index 96655bc46..c14231a16 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
@@ -29,6 +29,7 @@ var (
// Environment variables used:
//
// * Access Key ID: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY
+//
// * Secret Access Key: AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY
type EnvProvider struct {
retrieved bool
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
index 7fb7cbf0d..51e21e0f3 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
@@ -3,11 +3,11 @@ package credentials
import (
"fmt"
"os"
- "path/filepath"
"github.com/go-ini/ini"
"github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/internal/shareddefaults"
)
// SharedCredsProviderName provides a name of SharedCreds provider
@@ -15,8 +15,6 @@ const SharedCredsProviderName = "SharedCredentialsProvider"
var (
// ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found.
- //
- // @readonly
ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil)
)
@@ -117,22 +115,23 @@ func loadProfile(filename, profile string) (Value, error) {
//
// Will return an error if the user's home directory path cannot be found.
func (p *SharedCredentialsProvider) filename() (string, error) {
- if p.Filename == "" {
- if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); p.Filename != "" {
- return p.Filename, nil
- }
-
- homeDir := os.Getenv("HOME") // *nix
- if homeDir == "" { // Windows
- homeDir = os.Getenv("USERPROFILE")
- }
- if homeDir == "" {
- return "", ErrSharedCredentialsHomeNotFound
- }
-
- p.Filename = filepath.Join(homeDir, ".aws", "credentials")
+ if len(p.Filename) != 0 {
+ return p.Filename, nil
}
+ if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 {
+ return p.Filename, nil
+ }
+
+ if home := shareddefaults.UserHomeDir(); len(home) == 0 {
+ // Backwards compatibility of home directly not found error being returned.
+ // This error is too verbose, failure when opening the file would of been
+ // a better error to return.
+ return "", ErrSharedCredentialsHomeNotFound
+ }
+
+ p.Filename = shareddefaults.SharedCredentialsFilename()
+
return p.Filename, nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
index b84062332..4108e433e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
@@ -12,7 +12,7 @@ between multiple Credentials, Sessions or service clients.
Assume Role
To assume an IAM role using STS with the SDK you can create a new Credentials
-with the SDKs's stscreds package.
+with the SDKs's stscreds package.
// Initial credentials loaded from SDK's default credential chain. Such as
// the environment, shared credentials (~/.aws/credentials), or EC2 Instance
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
index 0ef55040a..07afe3b8e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
@@ -10,10 +10,12 @@ package defaults
import (
"fmt"
"net/http"
+ "net/url"
"os"
"time"
"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/credentials/ec2rolecreds"
@@ -56,7 +58,6 @@ func Config() *aws.Config {
WithMaxRetries(aws.UseServiceDefaultRetries).
WithLogger(aws.NewDefaultLogger()).
WithLogLevel(aws.LogOff).
- WithSleepDelay(time.Sleep).
WithEndpointResolver(endpoints.DefaultResolver())
}
@@ -97,23 +98,51 @@ func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credenti
})
}
-// RemoteCredProvider returns a credenitials provider for the default remote
+const (
+ httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
+ ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
+)
+
+// RemoteCredProvider returns a credentials provider for the default remote
// endpoints such as EC2 or ECS Roles.
func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider {
- ecsCredURI := os.Getenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")
+ if u := os.Getenv(httpProviderEnvVar); len(u) > 0 {
+ return localHTTPCredProvider(cfg, handlers, u)
+ }
- if len(ecsCredURI) > 0 {
- return ecsCredProvider(cfg, handlers, ecsCredURI)
+ if uri := os.Getenv(ecsCredsProviderEnvVar); len(uri) > 0 {
+ u := fmt.Sprintf("http://169.254.170.2%s", uri)
+ return httpCredProvider(cfg, handlers, u)
}
return ec2RoleProvider(cfg, handlers)
}
-func ecsCredProvider(cfg aws.Config, handlers request.Handlers, uri string) credentials.Provider {
- const host = `169.254.170.2`
+func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
+ var errMsg string
- return endpointcreds.NewProviderClient(cfg, handlers,
- fmt.Sprintf("http://%s%s", host, uri),
+ parsed, err := url.Parse(u)
+ if err != nil {
+ errMsg = fmt.Sprintf("invalid URL, %v", err)
+ } else if host := aws.URLHostname(parsed); !(host == "localhost" || host == "127.0.0.1") {
+ errMsg = fmt.Sprintf("invalid host address, %q, only localhost and 127.0.0.1 are valid.", host)
+ }
+
+ if len(errMsg) > 0 {
+ if cfg.Logger != nil {
+ cfg.Logger.Log("Ignoring, HTTP credential provider", errMsg, err)
+ }
+ return credentials.ErrorProvider{
+ Err: awserr.New("CredentialsEndpointError", errMsg, err),
+ ProviderName: endpointcreds.ProviderName,
+ }
+ }
+
+ return httpCredProvider(cfg, handlers, u)
+}
+
+func httpCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
+ return endpointcreds.NewProviderClient(cfg, handlers, u,
func(p *endpointcreds.Provider) {
p.ExpiryWindow = 5 * time.Minute
},
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
new file mode 100644
index 000000000..ca0ee1dcc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
@@ -0,0 +1,27 @@
+package defaults
+
+import (
+ "github.com/aws/aws-sdk-go/internal/shareddefaults"
+)
+
+// SharedCredentialsFilename returns the SDK's default file path
+// for the shared credentials file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/credentials
+// - Windows: %USERPROFILE%\.aws\credentials
+func SharedCredentialsFilename() string {
+ return shareddefaults.SharedCredentialsFilename()
+}
+
+// SharedConfigFilename returns the SDK's default file path for
+// the shared config file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/config
+// - Windows: %USERPROFILE%\.aws\config
+func SharedConfigFilename() string {
+ return shareddefaults.SharedConfigFilename()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/doc.go
new file mode 100644
index 000000000..4fcb61618
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/doc.go
@@ -0,0 +1,56 @@
+// Package aws provides the core SDK's utilities and shared types. Use this package's
+// utilities to simplify setting and reading API operations parameters.
+//
+// Value and Pointer Conversion Utilities
+//
+// This package includes a helper conversion utility for each scalar type the SDK's
+// API use. These utilities make getting a pointer of the scalar, and dereferencing
+// a pointer easier.
+//
+// Each conversion utility comes in two forms. Value to Pointer and Pointer to Value.
+// The Pointer to value will safely dereference the pointer and return its value.
+// If the pointer was nil, the scalar's zero value will be returned.
+//
+// The value to pointer functions will be named after the scalar type. So get a
+// *string from a string value use the "String" function. This makes it easy to
+// to get pointer of a literal string value, because getting the address of a
+// literal requires assigning the value to a variable first.
+//
+// var strPtr *string
+//
+// // Without the SDK's conversion functions
+// str := "my string"
+// strPtr = &str
+//
+// // With the SDK's conversion functions
+// strPtr = aws.String("my string")
+//
+// // Convert *string to string value
+// str = aws.StringValue(strPtr)
+//
+// In addition to scalars the aws package also includes conversion utilities for
+// map and slice for commonly types used in API parameters. The map and slice
+// conversion functions use similar naming pattern as the scalar conversion
+// functions.
+//
+// var strPtrs []*string
+// var strs []string = []string{"Go", "Gophers", "Go"}
+//
+// // Convert []string to []*string
+// strPtrs = aws.StringSlice(strs)
+//
+// // Convert []*string to []string
+// strs = aws.StringValueSlice(strPtrs)
+//
+// SDK Default HTTP Client
+//
+// The SDK will use the http.DefaultClient if a HTTP client is not provided to
+// the SDK's Session, or service client constructor. This means that if the
+// http.DefaultClient is modified by other components of your application the
+// modifications will be picked up by the SDK as well.
+//
+// In some cases this might be intended, but it is a better practice to create
+// a custom HTTP Client to share explicitly through your application. You can
+// configure the SDK to use the custom HTTP Client by setting the HTTPClient
+// value of the SDK's Config type when creating a Session or service client.
+package aws
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
index 53616560d..ba0c07b25 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
package endpoints
@@ -47,6 +47,7 @@ const (
ApigatewayServiceID = "apigateway" // Apigateway.
ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
Appstream2ServiceID = "appstream2" // Appstream2.
+ AthenaServiceID = "athena" // Athena.
AutoscalingServiceID = "autoscaling" // Autoscaling.
BatchServiceID = "batch" // Batch.
BudgetsServiceID = "budgets" // Budgets.
@@ -60,6 +61,7 @@ const (
CodecommitServiceID = "codecommit" // Codecommit.
CodedeployServiceID = "codedeploy" // Codedeploy.
CodepipelineServiceID = "codepipeline" // Codepipeline.
+ CodestarServiceID = "codestar" // Codestar.
CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity.
CognitoIdpServiceID = "cognito-idp" // CognitoIdp.
CognitoSyncServiceID = "cognito-sync" // CognitoSync.
@@ -83,11 +85,13 @@ const (
ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce.
ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder.
EmailServiceID = "email" // Email.
+ EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace.
EsServiceID = "es" // Es.
EventsServiceID = "events" // Events.
FirehoseServiceID = "firehose" // Firehose.
GameliftServiceID = "gamelift" // Gamelift.
GlacierServiceID = "glacier" // Glacier.
+ GreengrassServiceID = "greengrass" // Greengrass.
HealthServiceID = "health" // Health.
IamServiceID = "iam" // Iam.
ImportexportServiceID = "importexport" // Importexport.
@@ -103,9 +107,12 @@ const (
MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics.
MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace.
MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics.
+ ModelsLexServiceID = "models.lex" // ModelsLex.
MonitoringServiceID = "monitoring" // Monitoring.
+ MturkRequesterServiceID = "mturk-requester" // MturkRequester.
OpsworksServiceID = "opsworks" // Opsworks.
OpsworksCmServiceID = "opsworks-cm" // OpsworksCm.
+ OrganizationsServiceID = "organizations" // Organizations.
PinpointServiceID = "pinpoint" // Pinpoint.
PollyServiceID = "polly" // Polly.
RdsServiceID = "rds" // Rds.
@@ -129,8 +136,10 @@ const (
StsServiceID = "sts" // Sts.
SupportServiceID = "support" // Support.
SwfServiceID = "swf" // Swf.
+ TaggingServiceID = "tagging" // Tagging.
WafServiceID = "waf" // Waf.
WafRegionalServiceID = "waf-regional" // WafRegional.
+ WorkdocsServiceID = "workdocs" // Workdocs.
WorkspacesServiceID = "workspaces" // Workspaces.
XrayServiceID = "xray" // Xray.
)
@@ -138,17 +147,20 @@ const (
// DefaultResolver returns an Endpoint resolver that will be able
// to resolve endpoints for: AWS Standard, AWS China, and AWS GovCloud (US).
//
-// Casting the return value of this func to a EnumPartitions will
-// allow you to get a list of the partitions in the order the endpoints
-// will be resolved in.
+// Use DefaultPartitions() to get the list of the default partitions.
+func DefaultResolver() Resolver {
+ return defaultPartitions
+}
+
+// DefaultPartitions returns a list of the partitions the SDK is bundled
+// with. The available partitions are: AWS Standard, AWS China, and AWS GovCloud (US).
//
-// resolver := endpoints.DefaultResolver()
-// partitions := resolver.(endpoints.EnumPartitions).Partitions()
+// partitions := endpoints.DefaultPartitions
// for _, p := range partitions {
// // ... inspect partitions
// }
-func DefaultResolver() Resolver {
- return defaultPartitions
+func DefaultPartitions() []Partition {
+ return defaultPartitions.Partitions()
}
var defaultPartitions = partitions{
@@ -246,11 +258,14 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -296,6 +311,17 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "athena": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"autoscaling": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -320,7 +346,14 @@ var awsPartition = partition{
"batch": service{
Endpoints: endpoints{
- "us-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"budgets": service{
@@ -342,6 +375,7 @@ var awsPartition = partition{
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -432,19 +466,36 @@ var awsPartition = partition{
"codebuild": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"codecommit": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"codedeploy": service{
@@ -472,22 +523,36 @@ var awsPartition = partition{
"ap-northeast-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
+ "codestar": service{
+
+ Endpoints: endpoints{
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"cognito-identity": service{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -498,9 +563,11 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -511,9 +578,11 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -608,11 +677,15 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -749,10 +822,11 @@ var awsPartition = partition{
"elasticfilesystem": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"elasticloadbalancing": service{
@@ -823,6 +897,16 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "entitlement.marketplace": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "aws-marketplace",
+ },
+ },
+ Endpoints: endpoints{
+ "us-east-1": endpoint{},
+ },
+ },
"es": service{
Endpoints: endpoints{
@@ -831,8 +915,10 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -848,6 +934,7 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
@@ -899,6 +986,18 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "greengrass": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"health": service{
Endpoints: endpoints{
@@ -942,6 +1041,7 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -958,6 +1058,7 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -1014,11 +1115,14 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -1028,7 +1132,16 @@ var awsPartition = partition{
"lightsail": service{
Endpoints: endpoints{
- "us-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"logs": service{
@@ -1075,10 +1188,13 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
"us-west-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -1089,6 +1205,16 @@ var awsPartition = partition{
"us-east-1": endpoint{},
},
},
+ "models.lex": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "lex",
+ },
+ },
+ Endpoints: endpoints{
+ "us-east-1": endpoint{},
+ },
+ },
"monitoring": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -1110,6 +1236,16 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "mturk-requester": service{
+ IsRegionalized: boxedFalse,
+
+ Endpoints: endpoints{
+ "sandbox": endpoint{
+ Hostname: "mturk-requester-sandbox.us-east-1.amazonaws.com",
+ },
+ "us-east-1": endpoint{},
+ },
+ },
"opsworks": service{
Endpoints: endpoints{
@@ -1136,6 +1272,19 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "organizations": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+
+ Endpoints: endpoints{
+ "aws-global": endpoint{
+ Hostname: "organizations.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
"pinpoint": service{
Defaults: endpoint{
CredentialScope: credentialScope{
@@ -1336,9 +1485,16 @@ var awsPartition = partition{
"sms": service{
Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"snowball": service{
@@ -1346,7 +1502,6 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
- "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
@@ -1406,10 +1561,13 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1421,6 +1579,8 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1432,6 +1592,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
@@ -1447,7 +1608,7 @@ var awsPartition = partition{
},
"streams.dynamodb": service{
Defaults: endpoint{
- Protocols: []string{"http", "http", "https", "https"},
+ Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
@@ -1502,9 +1663,33 @@ var awsPartition = partition{
"eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "us-east-1-fips": endpoint{
+ Hostname: "sts-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{},
+ "us-east-2-fips": endpoint{
+ Hostname: "sts-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-1": endpoint{},
+ "us-west-1-fips": endpoint{
+ Hostname: "sts-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "us-west-2": endpoint{},
+ "us-west-2-fips": endpoint{
+ Hostname: "sts-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
},
},
"support": service{
@@ -1532,6 +1717,25 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "tagging": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"waf": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
@@ -1554,6 +1758,17 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "workdocs": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"workspaces": service{
Endpoints: endpoints{
@@ -1574,8 +1789,10 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1632,6 +1849,12 @@ var awscnPartition = partition{
"cn-north-1": endpoint{},
},
},
+ "codedeploy": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
"config": service{
Endpoints: endpoints{
@@ -1671,6 +1894,18 @@ var awscnPartition = partition{
},
},
},
+ "ecr": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
+ "ecs": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
"elasticache": service{
Endpoints: endpoints{
@@ -1784,6 +2019,12 @@ var awscnPartition = partition{
"cn-north-1": endpoint{},
},
},
+ "ssm": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
"storagegateway": service{
Endpoints: endpoints{
@@ -1792,7 +2033,7 @@ var awscnPartition = partition{
},
"streams.dynamodb": service{
Defaults: endpoint{
- Protocols: []string{"http", "http", "https", "https"},
+ Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
@@ -1809,6 +2050,12 @@ var awscnPartition = partition{
},
"swf": service{
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
+ "tagging": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
},
@@ -1868,6 +2115,12 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "codedeploy": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"config": service{
Endpoints: endpoints{
@@ -1925,6 +2178,12 @@ var awsusgovPartition = partition{
},
},
},
+ "events": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"glacier": service{
Endpoints: endpoints{
@@ -1946,12 +2205,24 @@ var awsusgovPartition = partition{
},
},
},
+ "kinesis": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"kms": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
+ "lambda": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"logs": service{
Endpoints: endpoints{
@@ -1976,6 +2247,12 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "rekognition": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"s3": service{
Defaults: endpoint{
SignatureVersions: []string{"s3", "s3v4"},
@@ -1993,6 +2270,12 @@ var awsusgovPartition = partition{
},
},
},
+ "sms": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"snowball": service{
Endpoints: endpoints{
@@ -2016,6 +2299,12 @@ var awsusgovPartition = partition{
},
},
},
+ "ssm": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"streams.dynamodb": service{
Defaults: endpoint{
CredentialScope: credentialScope{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
index 37e19ab00..9c3eedb48 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
@@ -124,6 +124,49 @@ type EnumPartitions interface {
Partitions() []Partition
}
+// RegionsForService returns a map of regions for the partition and service.
+// If either the partition or service does not exist false will be returned
+// as the second parameter.
+//
+// This example shows how to get the regions for DynamoDB in the AWS partition.
+// rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID)
+//
+// This is equivalent to using the partition directly.
+// rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions()
+func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) {
+ for _, p := range ps {
+ if p.ID() != partitionID {
+ continue
+ }
+ if _, ok := p.p.Services[serviceID]; !ok {
+ break
+ }
+
+ s := Service{
+ id: serviceID,
+ p: p.p,
+ }
+ return s.Regions(), true
+ }
+
+ return map[string]Region{}, false
+}
+
+// PartitionForRegion returns the first partition which includes the region
+// passed in. This includes both known regions and regions which match
+// a pattern supported by the partition which may include regions that are
+// not explicitly known by the partition. Use the Regions method of the
+// returned Partition if explicit support is needed.
+func PartitionForRegion(ps []Partition, regionID string) (Partition, bool) {
+ for _, p := range ps {
+ if _, ok := p.p.Regions[regionID]; ok || p.p.RegionRegex.MatchString(regionID) {
+ return p, true
+ }
+ }
+
+ return Partition{}, false
+}
+
// A Partition provides the ability to enumerate the partition's regions
// and services.
type Partition struct {
@@ -132,7 +175,7 @@ type Partition struct {
}
// ID returns the identifier of the partition.
-func (p *Partition) ID() string { return p.id }
+func (p Partition) ID() string { return p.id }
// EndpointFor attempts to resolve the endpoint based on service and region.
// See Options for information on configuring how the endpoint is resolved.
@@ -155,13 +198,13 @@ func (p *Partition) ID() string { return p.id }
// Errors that can be returned.
// * UnknownServiceError
// * UnknownEndpointError
-func (p *Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return p.p.EndpointFor(service, region, opts...)
}
// Regions returns a map of Regions indexed by their ID. This is useful for
// enumerating over the regions in a partition.
-func (p *Partition) Regions() map[string]Region {
+func (p Partition) Regions() map[string]Region {
rs := map[string]Region{}
for id := range p.p.Regions {
rs[id] = Region{
@@ -175,7 +218,7 @@ func (p *Partition) Regions() map[string]Region {
// Services returns a map of Service indexed by their ID. This is useful for
// enumerating over the services in a partition.
-func (p *Partition) Services() map[string]Service {
+func (p Partition) Services() map[string]Service {
ss := map[string]Service{}
for id := range p.p.Services {
ss[id] = Service{
@@ -195,16 +238,16 @@ type Region struct {
}
// ID returns the region's identifier.
-func (r *Region) ID() string { return r.id }
+func (r Region) ID() string { return r.id }
// ResolveEndpoint resolves an endpoint from the context of the region given
// a service. See Partition.EndpointFor for usage and errors that can be returned.
-func (r *Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return r.p.EndpointFor(service, r.id, opts...)
}
// Services returns a list of all services that are known to be in this region.
-func (r *Region) Services() map[string]Service {
+func (r Region) Services() map[string]Service {
ss := map[string]Service{}
for id, s := range r.p.Services {
if _, ok := s.Endpoints[r.id]; ok {
@@ -226,17 +269,38 @@ type Service struct {
}
// ID returns the identifier for the service.
-func (s *Service) ID() string { return s.id }
+func (s Service) ID() string { return s.id }
// ResolveEndpoint resolves an endpoint from the context of a service given
// a region. See Partition.EndpointFor for usage and errors that can be returned.
-func (s *Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
+func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
return s.p.EndpointFor(s.id, region, opts...)
}
+// Regions returns a map of Regions that the service is present in.
+//
+// A region is the AWS region the service exists in. Whereas a Endpoint is
+// an URL that can be resolved to a instance of a service.
+func (s Service) Regions() map[string]Region {
+ rs := map[string]Region{}
+ for id := range s.p.Services[s.id].Endpoints {
+ if _, ok := s.p.Regions[id]; ok {
+ rs[id] = Region{
+ id: id,
+ p: s.p,
+ }
+ }
+ }
+
+ return rs
+}
+
// Endpoints returns a map of Endpoints indexed by their ID for all known
// endpoints for a service.
-func (s *Service) Endpoints() map[string]Endpoint {
+//
+// A region is the AWS region the service exists in. Whereas a Endpoint is
+// an URL that can be resolved to a instance of a service.
+func (s Service) Endpoints() map[string]Endpoint {
es := map[string]Endpoint{}
for id := range s.p.Services[s.id].Endpoints {
es[id] = Endpoint{
@@ -259,15 +323,15 @@ type Endpoint struct {
}
// ID returns the identifier for an endpoint.
-func (e *Endpoint) ID() string { return e.id }
+func (e Endpoint) ID() string { return e.id }
// ServiceID returns the identifier the endpoint belongs to.
-func (e *Endpoint) ServiceID() string { return e.serviceID }
+func (e Endpoint) ServiceID() string { return e.serviceID }
// ResolveEndpoint resolves an endpoint from the context of a service and
// region the endpoint represents. See Partition.EndpointFor for usage and
// errors that can be returned.
-func (e *Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) {
+func (e Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) {
return e.p.EndpointFor(e.serviceID, e.id, opts...)
}
@@ -300,28 +364,6 @@ type EndpointNotFoundError struct {
Region string
}
-//// NewEndpointNotFoundError builds and returns NewEndpointNotFoundError.
-//func NewEndpointNotFoundError(p, s, r string) EndpointNotFoundError {
-// return EndpointNotFoundError{
-// awsError: awserr.New("EndpointNotFoundError", "unable to find endpoint", nil),
-// Partition: p,
-// Service: s,
-// Region: r,
-// }
-//}
-//
-//// Error returns string representation of the error.
-//func (e EndpointNotFoundError) Error() string {
-// extra := fmt.Sprintf("partition: %q, service: %q, region: %q",
-// e.Partition, e.Service, e.Region)
-// return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
-//}
-//
-//// String returns the string representation of the error.
-//func (e EndpointNotFoundError) String() string {
-// return e.Error()
-//}
-
// A UnknownServiceError is returned when the service does not resolve to an
// endpoint. Includes a list of all known services for the partition. Returned
// when a partition does not support the service.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
index 1e7369dbf..05e92df22 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
@@ -158,7 +158,7 @@ var funcMap = template.FuncMap{
const v3Tmpl = `
{{ define "defaults" -}}
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
package endpoints
@@ -209,17 +209,20 @@ import (
// DefaultResolver returns an Endpoint resolver that will be able
// to resolve endpoints for: {{ ListPartitionNames . }}.
//
- // Casting the return value of this func to a EnumPartitions will
- // allow you to get a list of the partitions in the order the endpoints
- // will be resolved in.
+ // Use DefaultPartitions() to get the list of the default partitions.
+ func DefaultResolver() Resolver {
+ return defaultPartitions
+ }
+
+ // DefaultPartitions returns a list of the partitions the SDK is bundled
+ // with. The available partitions are: {{ ListPartitionNames . }}.
//
- // resolver := endpoints.DefaultResolver()
- // partitions := resolver.(endpoints.EnumPartitions).Partitions()
+ // partitions := endpoints.DefaultPartitions
// for _, p := range partitions {
// // ... inspect partitions
// }
- func DefaultResolver() Resolver {
- return defaultPartitions
+ func DefaultPartitions() []Partition {
+ return defaultPartitions.Partitions()
}
var defaultPartitions = partitions{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
new file mode 100644
index 000000000..91a6f277a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
@@ -0,0 +1,12 @@
+package aws
+
+// JSONValue is a representation of a grab bag type that will be marshaled
+// into a json string. This type can be used just like any other map.
+//
+// Example:
+//
+// values := aws.JSONValue{
+// "Foo": "Bar",
+// }
+// values["Baz"] = "Qux"
+type JSONValue map[string]interface{}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
index db87188e2..3babb5abd 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/logger.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
@@ -26,14 +26,14 @@ func (l *LogLevelType) Value() LogLevelType {
// Matches returns true if the v LogLevel is enabled by this LogLevel. Should be
// used with logging sub levels. Is safe to use on nil value LogLevelTypes. If
-// LogLevel is nill, will default to LogOff comparison.
+// LogLevel is nil, will default to LogOff comparison.
func (l *LogLevelType) Matches(v LogLevelType) bool {
c := l.Value()
return c&v == v
}
// AtLeast returns true if this LogLevel is at least high enough to satisfies v.
-// Is safe to use on nil value LogLevelTypes. If LogLevel is nill, will default
+// Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default
// to LogOff comparison.
func (l *LogLevelType) AtLeast(v LogLevelType) bool {
c := l.Value()
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
new file mode 100644
index 000000000..271da432c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
@@ -0,0 +1,19 @@
+// +build !appengine,!plan9
+
+package request
+
+import (
+ "net"
+ "os"
+ "syscall"
+)
+
+func isErrConnectionReset(err error) bool {
+ if opErr, ok := err.(*net.OpError); ok {
+ if sysErr, ok := opErr.Err.(*os.SyscallError); ok {
+ return sysErr.Err == syscall.ECONNRESET
+ }
+ }
+
+ return false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go
new file mode 100644
index 000000000..daf9eca43
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go
@@ -0,0 +1,11 @@
+// +build appengine plan9
+
+package request
+
+import (
+ "strings"
+)
+
+func isErrConnectionReset(err error) bool {
+ return strings.Contains(err.Error(), "connection reset")
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
index 5279c19c0..802ac88ad 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
@@ -18,6 +18,7 @@ type Handlers struct {
UnmarshalError HandlerList
Retry HandlerList
AfterRetry HandlerList
+ Complete HandlerList
}
// Copy returns of this handler's lists.
@@ -33,6 +34,7 @@ func (h *Handlers) Copy() Handlers {
UnmarshalMeta: h.UnmarshalMeta.copy(),
Retry: h.Retry.copy(),
AfterRetry: h.AfterRetry.copy(),
+ Complete: h.Complete.copy(),
}
}
@@ -48,6 +50,7 @@ func (h *Handlers) Clear() {
h.ValidateResponse.Clear()
h.Retry.Clear()
h.AfterRetry.Clear()
+ h.Complete.Clear()
}
// A HandlerListRunItem represents an entry in the HandlerList which
@@ -85,13 +88,17 @@ func (l *HandlerList) copy() HandlerList {
n := HandlerList{
AfterEachFn: l.AfterEachFn,
}
- n.list = append([]NamedHandler{}, l.list...)
+ if len(l.list) == 0 {
+ return n
+ }
+
+ n.list = append(make([]NamedHandler, 0, len(l.list)), l.list...)
return n
}
// Clear clears the handler list.
func (l *HandlerList) Clear() {
- l.list = []NamedHandler{}
+ l.list = l.list[0:0]
}
// Len returns the number of handlers in the list.
@@ -101,33 +108,85 @@ func (l *HandlerList) Len() int {
// PushBack pushes handler f to the back of the handler list.
func (l *HandlerList) PushBack(f func(*Request)) {
- l.list = append(l.list, NamedHandler{"__anonymous", f})
-}
-
-// PushFront pushes handler f to the front of the handler list.
-func (l *HandlerList) PushFront(f func(*Request)) {
- l.list = append([]NamedHandler{{"__anonymous", f}}, l.list...)
+ l.PushBackNamed(NamedHandler{"__anonymous", f})
}
// PushBackNamed pushes named handler f to the back of the handler list.
func (l *HandlerList) PushBackNamed(n NamedHandler) {
+ if cap(l.list) == 0 {
+ l.list = make([]NamedHandler, 0, 5)
+ }
l.list = append(l.list, n)
}
+// PushFront pushes handler f to the front of the handler list.
+func (l *HandlerList) PushFront(f func(*Request)) {
+ l.PushFrontNamed(NamedHandler{"__anonymous", f})
+}
+
// PushFrontNamed pushes named handler f to the front of the handler list.
func (l *HandlerList) PushFrontNamed(n NamedHandler) {
- l.list = append([]NamedHandler{n}, l.list...)
+ if cap(l.list) == len(l.list) {
+ // Allocating new list required
+ l.list = append([]NamedHandler{n}, l.list...)
+ } else {
+ // Enough room to prepend into list.
+ l.list = append(l.list, NamedHandler{})
+ copy(l.list[1:], l.list)
+ l.list[0] = n
+ }
}
// Remove removes a NamedHandler n
func (l *HandlerList) Remove(n NamedHandler) {
- newlist := []NamedHandler{}
- for _, m := range l.list {
- if m.Name != n.Name {
- newlist = append(newlist, m)
+ l.RemoveByName(n.Name)
+}
+
+// RemoveByName removes a NamedHandler by name.
+func (l *HandlerList) RemoveByName(name string) {
+ for i := 0; i < len(l.list); i++ {
+ m := l.list[i]
+ if m.Name == name {
+ // Shift array preventing creating new arrays
+ copy(l.list[i:], l.list[i+1:])
+ l.list[len(l.list)-1] = NamedHandler{}
+ l.list = l.list[:len(l.list)-1]
+
+ // decrement list so next check to length is correct
+ i--
}
}
- l.list = newlist
+}
+
+// SwapNamed will swap out any existing handlers with the same name as the
+// passed in NamedHandler returning true if handlers were swapped. False is
+// returned otherwise.
+func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) {
+ for i := 0; i < len(l.list); i++ {
+ if l.list[i].Name == n.Name {
+ l.list[i].Fn = n.Fn
+ swapped = true
+ }
+ }
+
+ return swapped
+}
+
+// SetBackNamed will replace the named handler if it exists in the handler list.
+// If the handler does not exist the handler will be added to the end of the list.
+func (l *HandlerList) SetBackNamed(n NamedHandler) {
+ if !l.SwapNamed(n) {
+ l.PushBackNamed(n)
+ }
+}
+
+// SetFrontNamed will replace the named handler if it exists in the handler list.
+// If the handler does not exist the handler will be added to the beginning of
+// the list.
+func (l *HandlerList) SetFrontNamed(n NamedHandler) {
+ if !l.SwapNamed(n) {
+ l.PushFrontNamed(n)
+ }
}
// Run executes all handlers in the list with a given request object.
@@ -163,6 +222,16 @@ func HandlerListStopOnError(item HandlerListRunItem) bool {
return item.Request.Error == nil
}
+// WithAppendUserAgent will add a string to the user agent prefixed with a
+// single white space.
+func WithAppendUserAgent(s string) Option {
+ return func(r *Request) {
+ r.Handlers.Build.PushBack(func(r2 *Request) {
+ AddToUserAgent(r, s)
+ })
+ }
+}
+
// MakeAddToUserAgentHandler will add the name/version pair to the User-Agent request
// header. If the extra parameters are provided they will be added as metadata to the
// name/version pair resulting in the following format.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
index 77312bb66..299dc379d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
@@ -16,6 +16,24 @@ import (
"github.com/aws/aws-sdk-go/aws/client/metadata"
)
+const (
+ // ErrCodeSerialization is the serialization error code that is received
+ // during protocol unmarshaling.
+ ErrCodeSerialization = "SerializationError"
+
+ // ErrCodeRead is an error that is returned during HTTP reads.
+ ErrCodeRead = "ReadError"
+
+ // ErrCodeResponseTimeout is the connection timeout error that is recieved
+ // during body reads.
+ ErrCodeResponseTimeout = "ResponseTimeout"
+
+ // CanceledErrorCode is the error code that will be returned by an
+ // API request that was canceled. Requests given a aws.Context may
+ // return this error when canceled.
+ CanceledErrorCode = "RequestCanceled"
+)
+
// A Request is the service request to be made.
type Request struct {
Config aws.Config
@@ -23,30 +41,33 @@ type Request struct {
Handlers Handlers
Retryer
- Time time.Time
- ExpireTime time.Duration
- Operation *Operation
- HTTPRequest *http.Request
- HTTPResponse *http.Response
- Body io.ReadSeeker
- BodyStart int64 // offset from beginning of Body that the request body starts
- Params interface{}
- Error error
- Data interface{}
- RequestID string
- RetryCount int
- Retryable *bool
- RetryDelay time.Duration
- NotHoist bool
- SignedHeaderVals http.Header
- LastSignedAt time.Time
+ Time time.Time
+ ExpireTime time.Duration
+ Operation *Operation
+ HTTPRequest *http.Request
+ HTTPResponse *http.Response
+ Body io.ReadSeeker
+ BodyStart int64 // offset from beginning of Body that the request body starts
+ Params interface{}
+ Error error
+ Data interface{}
+ RequestID string
+ RetryCount int
+ Retryable *bool
+ RetryDelay time.Duration
+ NotHoist bool
+ SignedHeaderVals http.Header
+ LastSignedAt time.Time
+ DisableFollowRedirects bool
+
+ context aws.Context
built bool
- // Need to persist an intermideant body betweend the input Body and HTTP
+ // Need to persist an intermediate body between the input Body and HTTP
// request body because the HTTP Client's transport can maintain a reference
// to the HTTP request's body after the client has returned. This value is
- // safe to use concurrently and rewraps the input Body for each HTTP request.
+ // safe to use concurrently and wrap the input Body for each HTTP request.
safeBody *offsetReader
}
@@ -60,14 +81,6 @@ type Operation struct {
BeforePresignFn func(r *Request) error
}
-// Paginator keeps track of pagination configuration for an API operation.
-type Paginator struct {
- InputTokens []string
- OutputTokens []string
- LimitToken string
- TruncationToken string
-}
-
// New returns a new Request pointer for the service API
// operation and parameters.
//
@@ -111,6 +124,94 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
return r
}
+// A Option is a functional option that can augment or modify a request when
+// using a WithContext API operation method.
+type Option func(*Request)
+
+// WithGetResponseHeader builds a request Option which will retrieve a single
+// header value from the HTTP Response. If there are multiple values for the
+// header key use WithGetResponseHeaders instead to access the http.Header
+// map directly. The passed in val pointer must be non-nil.
+//
+// This Option can be used multiple times with a single API operation.
+//
+// var id2, versionID string
+// svc.PutObjectWithContext(ctx, params,
+// request.WithGetResponseHeader("x-amz-id-2", &id2),
+// request.WithGetResponseHeader("x-amz-version-id", &versionID),
+// )
+func WithGetResponseHeader(key string, val *string) Option {
+ return func(r *Request) {
+ r.Handlers.Complete.PushBack(func(req *Request) {
+ *val = req.HTTPResponse.Header.Get(key)
+ })
+ }
+}
+
+// WithGetResponseHeaders builds a request Option which will retrieve the
+// headers from the HTTP response and assign them to the passed in headers
+// variable. The passed in headers pointer must be non-nil.
+//
+// var headers http.Header
+// svc.PutObjectWithContext(ctx, params, request.WithGetResponseHeaders(&headers))
+func WithGetResponseHeaders(headers *http.Header) Option {
+ return func(r *Request) {
+ r.Handlers.Complete.PushBack(func(req *Request) {
+ *headers = req.HTTPResponse.Header
+ })
+ }
+}
+
+// WithLogLevel is a request option that will set the request to use a specific
+// log level when the request is made.
+//
+// svc.PutObjectWithContext(ctx, params, request.WithLogLevel(aws.LogDebugWithHTTPBody)
+func WithLogLevel(l aws.LogLevelType) Option {
+ return func(r *Request) {
+ r.Config.LogLevel = aws.LogLevel(l)
+ }
+}
+
+// ApplyOptions will apply each option to the request calling them in the order
+// the were provided.
+func (r *Request) ApplyOptions(opts ...Option) {
+ for _, opt := range opts {
+ opt(r)
+ }
+}
+
+// Context will always returns a non-nil context. If Request does not have a
+// context aws.BackgroundContext will be returned.
+func (r *Request) Context() aws.Context {
+ if r.context != nil {
+ return r.context
+ }
+ return aws.BackgroundContext()
+}
+
+// SetContext adds a Context to the current request that can be used to cancel
+// a in-flight request. The Context value must not be nil, or this method will
+// panic.
+//
+// Unlike http.Request.WithContext, SetContext does not return a copy of the
+// Request. It is not safe to use use a single Request value for multiple
+// requests. A new Request should be created for each API operation request.
+//
+// Go 1.6 and below:
+// The http.Request's Cancel field will be set to the Done() value of
+// the context. This will overwrite the Cancel field's value.
+//
+// Go 1.7 and above:
+// The http.Request.WithContext will be used to set the context on the underlying
+// http.Request. This will create a shallow copy of the http.Request. The SDK
+// may create sub contexts in the future for nested requests such as retries.
+func (r *Request) SetContext(ctx aws.Context) {
+ if ctx == nil {
+ panic("context cannot be nil")
+ }
+ setRequestContext(r, ctx)
+}
+
// WillRetry returns if the request's can be retried.
func (r *Request) WillRetry() bool {
return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries()
@@ -237,10 +338,7 @@ func (r *Request) Sign() error {
return r.Error
}
-// ResetBody rewinds the request body backto its starting position, and
-// set's the HTTP Request body reference. When the body is read prior
-// to being sent in the HTTP request it will need to be rewound.
-func (r *Request) ResetBody() {
+func (r *Request) getNextRequestBody() (io.ReadCloser, error) {
if r.safeBody != nil {
r.safeBody.Close()
}
@@ -262,14 +360,14 @@ func (r *Request) ResetBody() {
// Related golang/go#18257
l, err := computeBodyLength(r.Body)
if err != nil {
- r.Error = awserr.New("SerializationError", "failed to compute request body size", err)
- return
+ return nil, awserr.New(ErrCodeSerialization, "failed to compute request body size", err)
}
+ var body io.ReadCloser
if l == 0 {
- r.HTTPRequest.Body = noBodyReader
+ body = NoBody
} else if l > 0 {
- r.HTTPRequest.Body = r.safeBody
+ body = r.safeBody
} else {
// Hack to prevent sending bodies for methods where the body
// should be ignored by the server. Sending bodies on these
@@ -281,11 +379,13 @@ func (r *Request) ResetBody() {
// a io.Reader that was not also an io.Seeker.
switch r.Operation.HTTPMethod {
case "GET", "HEAD", "DELETE":
- r.HTTPRequest.Body = noBodyReader
+ body = NoBody
default:
- r.HTTPRequest.Body = r.safeBody
+ body = r.safeBody
}
}
+
+ return body, nil
}
// Attempts to compute the length of the body of the reader using the
@@ -344,6 +444,12 @@ func (r *Request) GetBody() io.ReadSeeker {
//
// Send will not close the request.Request's body.
func (r *Request) Send() error {
+ defer func() {
+ // Regardless of success or failure of the request trigger the Complete
+ // request handlers.
+ r.Handlers.Complete.Run(r)
+ }()
+
for {
if aws.BoolValue(r.Retryable) {
if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) {
@@ -381,7 +487,7 @@ func (r *Request) Send() error {
r.Handlers.Retry.Run(r)
r.Handlers.AfterRetry.Run(r)
if r.Error != nil {
- debugLogReqError(r, "Send Request", false, r.Error)
+ debugLogReqError(r, "Send Request", false, err)
return r.Error
}
debugLogReqError(r, "Send Request", true, err)
@@ -390,12 +496,13 @@ func (r *Request) Send() error {
r.Handlers.UnmarshalMeta.Run(r)
r.Handlers.ValidateResponse.Run(r)
if r.Error != nil {
- err := r.Error
r.Handlers.UnmarshalError.Run(r)
+ err := r.Error
+
r.Handlers.Retry.Run(r)
r.Handlers.AfterRetry.Run(r)
if r.Error != nil {
- debugLogReqError(r, "Validate Response", false, r.Error)
+ debugLogReqError(r, "Validate Response", false, err)
return r.Error
}
debugLogReqError(r, "Validate Response", true, err)
@@ -408,7 +515,7 @@ func (r *Request) Send() error {
r.Handlers.Retry.Run(r)
r.Handlers.AfterRetry.Run(r)
if r.Error != nil {
- debugLogReqError(r, "Unmarshal Response", false, r.Error)
+ debugLogReqError(r, "Unmarshal Response", false, err)
return r.Error
}
debugLogReqError(r, "Unmarshal Response", true, err)
@@ -446,6 +553,9 @@ func shouldRetryCancel(r *Request) bool {
timeoutErr := false
errStr := r.Error.Error()
if ok {
+ if awsErr.Code() == CanceledErrorCode {
+ return false
+ }
err := awsErr.OrigErr()
netErr, netOK := err.(net.Error)
timeoutErr = netOK && netErr.Temporary()
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
index 1323af900..869b97a1a 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
@@ -16,6 +16,24 @@ func (noBody) Read([]byte) (int, error) { return 0, io.EOF }
func (noBody) Close() error { return nil }
func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
-// Is an empty reader that will trigger the Go HTTP client to not include
+// NoBody is an empty reader that will trigger the Go HTTP client to not include
// and body in the HTTP request.
-var noBodyReader = noBody{}
+var NoBody = noBody{}
+
+// ResetBody rewinds the request body back to its starting position, and
+// set's the HTTP Request body reference. When the body is read prior
+// to being sent in the HTTP request it will need to be rewound.
+//
+// ResetBody will automatically be called by the SDK's build handler, but if
+// the request is being used directly ResetBody must be called before the request
+// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
+// call ResetBody.
+func (r *Request) ResetBody() {
+ body, err := r.getNextRequestBody()
+ if err != nil {
+ r.Error = err
+ return
+ }
+
+ r.HTTPRequest.Body = body
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
index 8b963f4de..c32fc69bc 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
@@ -2,8 +2,32 @@
package request
-import "net/http"
+import (
+ "net/http"
+)
-// Is a http.NoBody reader instructing Go HTTP client to not include
+// NoBody is a http.NoBody reader instructing Go HTTP client to not include
// and body in the HTTP request.
-var noBodyReader = http.NoBody
+var NoBody = http.NoBody
+
+// ResetBody rewinds the request body back to its starting position, and
+// set's the HTTP Request body reference. When the body is read prior
+// to being sent in the HTTP request it will need to be rewound.
+//
+// ResetBody will automatically be called by the SDK's build handler, but if
+// the request is being used directly ResetBody must be called before the request
+// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
+// call ResetBody.
+//
+// Will also set the Go 1.8's http.Request.GetBody member to allow retrying
+// PUT/POST redirects.
+func (r *Request) ResetBody() {
+ body, err := r.getNextRequestBody()
+ if err != nil {
+ r.Error = err
+ return
+ }
+
+ r.HTTPRequest.Body = body
+ r.HTTPRequest.GetBody = r.getNextRequestBody
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
new file mode 100644
index 000000000..a7365cd1e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
@@ -0,0 +1,14 @@
+// +build go1.7
+
+package request
+
+import "github.com/aws/aws-sdk-go/aws"
+
+// setContext updates the Request to use the passed in context for cancellation.
+// Context will also be used for request retry delay.
+//
+// Creates shallow copy of the http.Request with the WithContext method.
+func setRequestContext(r *Request, ctx aws.Context) {
+ r.context = ctx
+ r.HTTPRequest = r.HTTPRequest.WithContext(ctx)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
new file mode 100644
index 000000000..307fa0705
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
@@ -0,0 +1,14 @@
+// +build !go1.7
+
+package request
+
+import "github.com/aws/aws-sdk-go/aws"
+
+// setContext updates the Request to use the passed in context for cancellation.
+// Context will also be used for request retry delay.
+//
+// Creates shallow copy of the http.Request with the WithContext method.
+func setRequestContext(r *Request, ctx aws.Context) {
+ r.context = ctx
+ r.HTTPRequest.Cancel = ctx.Done()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
index 2939ec473..59de6736b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
@@ -2,29 +2,125 @@ package request
import (
"reflect"
+ "sync/atomic"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
)
-//type Paginater interface {
-// HasNextPage() bool
-// NextPage() *Request
-// EachPage(fn func(data interface{}, isLastPage bool) (shouldContinue bool)) error
-//}
+// A Pagination provides paginating of SDK API operations which are paginatable.
+// Generally you should not use this type directly, but use the "Pages" API
+// operations method to automatically perform pagination for you. Such as,
+// "S3.ListObjectsPages", and "S3.ListObjectsPagesWithContext" methods.
+//
+// Pagination differs from a Paginator type in that pagination is the type that
+// does the pagination between API operations, and Paginator defines the
+// configuration that will be used per page request.
+//
+// cont := true
+// for p.Next() && cont {
+// data := p.Page().(*s3.ListObjectsOutput)
+// // process the page's data
+// }
+// return p.Err()
+//
+// See service client API operation Pages methods for examples how the SDK will
+// use the Pagination type.
+type Pagination struct {
+ // Function to return a Request value for each pagination request.
+ // Any configuration or handlers that need to be applied to the request
+ // prior to getting the next page should be done here before the request
+ // returned.
+ //
+ // NewRequest should always be built from the same API operations. It is
+ // undefined if different API operations are returned on subsequent calls.
+ NewRequest func() (*Request, error)
-// HasNextPage returns true if this request has more pages of data available.
-func (r *Request) HasNextPage() bool {
- return len(r.nextPageTokens()) > 0
+ started bool
+ nextTokens []interface{}
+
+ err error
+ curPage interface{}
}
-// nextPageTokens returns the tokens to use when asking for the next page of
-// data.
+// HasNextPage will return true if Pagination is able to determine that the API
+// operation has additional pages. False will be returned if there are no more
+// pages remaining.
+//
+// Will always return true if Next has not been called yet.
+func (p *Pagination) HasNextPage() bool {
+ return !(p.started && len(p.nextTokens) == 0)
+}
+
+// Err returns the error Pagination encountered when retrieving the next page.
+func (p *Pagination) Err() error {
+ return p.err
+}
+
+// Page returns the current page. Page should only be called after a successful
+// call to Next. It is undefined what Page will return if Page is called after
+// Next returns false.
+func (p *Pagination) Page() interface{} {
+ return p.curPage
+}
+
+// Next will attempt to retrieve the next page for the API operation. When a page
+// is retrieved true will be returned. If the page cannot be retrieved, or there
+// are no more pages false will be returned.
+//
+// Use the Page method to retrieve the current page data. The data will need
+// to be cast to the API operation's output type.
+//
+// Use the Err method to determine if an error occurred if Page returns false.
+func (p *Pagination) Next() bool {
+ if !p.HasNextPage() {
+ return false
+ }
+
+ req, err := p.NewRequest()
+ if err != nil {
+ p.err = err
+ return false
+ }
+
+ if p.started {
+ for i, intok := range req.Operation.InputTokens {
+ awsutil.SetValueAtPath(req.Params, intok, p.nextTokens[i])
+ }
+ }
+ p.started = true
+
+ err = req.Send()
+ if err != nil {
+ p.err = err
+ return false
+ }
+
+ p.nextTokens = req.nextPageTokens()
+ p.curPage = req.Data
+
+ return true
+}
+
+// A Paginator is the configuration data that defines how an API operation
+// should be paginated. This type is used by the API service models to define
+// the generated pagination config for service APIs.
+//
+// The Pagination type is what provides iterating between pages of an API. It
+// is only used to store the token metadata the SDK should use for performing
+// pagination.
+type Paginator struct {
+ InputTokens []string
+ OutputTokens []string
+ LimitToken string
+ TruncationToken string
+}
+
+// nextPageTokens returns the tokens to use when asking for the next page of data.
func (r *Request) nextPageTokens() []interface{} {
if r.Operation.Paginator == nil {
return nil
}
-
if r.Operation.TruncationToken != "" {
tr, _ := awsutil.ValuesAtPath(r.Data, r.Operation.TruncationToken)
if len(tr) == 0 {
@@ -61,9 +157,40 @@ func (r *Request) nextPageTokens() []interface{} {
return tokens
}
+// Ensure a deprecated item is only logged once instead of each time its used.
+func logDeprecatedf(logger aws.Logger, flag *int32, msg string) {
+ if logger == nil {
+ return
+ }
+ if atomic.CompareAndSwapInt32(flag, 0, 1) {
+ logger.Log(msg)
+ }
+}
+
+var (
+ logDeprecatedHasNextPage int32
+ logDeprecatedNextPage int32
+ logDeprecatedEachPage int32
+)
+
+// HasNextPage returns true if this request has more pages of data available.
+//
+// Deprecated Use Pagination type for configurable pagination of API operations
+func (r *Request) HasNextPage() bool {
+ logDeprecatedf(r.Config.Logger, &logDeprecatedHasNextPage,
+ "Request.HasNextPage deprecated. Use Pagination type for configurable pagination of API operations")
+
+ return len(r.nextPageTokens()) > 0
+}
+
// NextPage returns a new Request that can be executed to return the next
// page of result data. Call .Send() on this request to execute it.
+//
+// Deprecated Use Pagination type for configurable pagination of API operations
func (r *Request) NextPage() *Request {
+ logDeprecatedf(r.Config.Logger, &logDeprecatedNextPage,
+ "Request.NextPage deprecated. Use Pagination type for configurable pagination of API operations")
+
tokens := r.nextPageTokens()
if len(tokens) == 0 {
return nil
@@ -90,7 +217,12 @@ func (r *Request) NextPage() *Request {
// as the structure "T". The lastPage value represents whether the page is
// the last page of data or not. The return value of this function should
// return true to keep iterating or false to stop.
+//
+// Deprecated Use Pagination type for configurable pagination of API operations
func (r *Request) EachPage(fn func(data interface{}, isLastPage bool) (shouldContinue bool)) error {
+ logDeprecatedf(r.Config.Logger, &logDeprecatedEachPage,
+ "Request.EachPage deprecated. Use Pagination type for configurable pagination of API operations")
+
for page := r; page != nil; page = page.NextPage() {
if err := page.Send(); err != nil {
return err
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
index ebd60ccc4..2c05dbdc2 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
@@ -8,7 +8,7 @@ import (
)
// Retryer is an interface to control retry logic for a given service.
-// The default implementation used by most services is the service.DefaultRetryer
+// The default implementation used by most services is the client.DefaultRetryer
// structure, which contains basic retry logic using exponential backoff.
type Retryer interface {
RetryRules(*Request) time.Duration
@@ -26,8 +26,10 @@ func WithRetryer(cfg *aws.Config, retryer Retryer) *aws.Config {
// retryableCodes is a collection of service response codes which are retry-able
// without any further action.
var retryableCodes = map[string]struct{}{
- "RequestError": {},
- "RequestTimeout": {},
+ "RequestError": {},
+ "RequestTimeout": {},
+ ErrCodeResponseTimeout: {},
+ "RequestTimeoutException": {}, // Glacier's flavor of RequestTimeout
}
var throttleCodes = map[string]struct{}{
@@ -36,7 +38,6 @@ var throttleCodes = map[string]struct{}{
"ThrottlingException": {},
"RequestLimitExceeded": {},
"RequestThrottled": {},
- "LimitExceededException": {}, // Deleting 10+ DynamoDb tables at once
"TooManyRequestsException": {}, // Lambda functions
"PriorRequestNotComplete": {}, // Route53
}
@@ -68,35 +69,93 @@ func isCodeExpiredCreds(code string) bool {
return ok
}
+var validParentCodes = map[string]struct{}{
+ ErrCodeSerialization: struct{}{},
+ ErrCodeRead: struct{}{},
+}
+
+type temporaryError interface {
+ Temporary() bool
+}
+
+func isNestedErrorRetryable(parentErr awserr.Error) bool {
+ if parentErr == nil {
+ return false
+ }
+
+ if _, ok := validParentCodes[parentErr.Code()]; !ok {
+ return false
+ }
+
+ err := parentErr.OrigErr()
+ if err == nil {
+ return false
+ }
+
+ if aerr, ok := err.(awserr.Error); ok {
+ return isCodeRetryable(aerr.Code())
+ }
+
+ if t, ok := err.(temporaryError); ok {
+ return t.Temporary()
+ }
+
+ return isErrConnectionReset(err)
+}
+
// IsErrorRetryable returns whether the error is retryable, based on its Code.
-// Returns false if the request has no Error set.
-func (r *Request) IsErrorRetryable() bool {
- if r.Error != nil {
- if err, ok := r.Error.(awserr.Error); ok {
- return isCodeRetryable(err.Code())
+// Returns false if error is nil.
+func IsErrorRetryable(err error) bool {
+ if err != nil {
+ if aerr, ok := err.(awserr.Error); ok {
+ return isCodeRetryable(aerr.Code()) || isNestedErrorRetryable(aerr)
}
}
return false
}
// IsErrorThrottle returns whether the error is to be throttled based on its code.
-// Returns false if the request has no Error set
-func (r *Request) IsErrorThrottle() bool {
- if r.Error != nil {
- if err, ok := r.Error.(awserr.Error); ok {
- return isCodeThrottle(err.Code())
+// Returns false if error is nil.
+func IsErrorThrottle(err error) bool {
+ if err != nil {
+ if aerr, ok := err.(awserr.Error); ok {
+ return isCodeThrottle(aerr.Code())
}
}
return false
}
-// IsErrorExpired returns whether the error code is a credential expiry error.
-// Returns false if the request has no Error set.
-func (r *Request) IsErrorExpired() bool {
- if r.Error != nil {
- if err, ok := r.Error.(awserr.Error); ok {
- return isCodeExpiredCreds(err.Code())
+// IsErrorExpiredCreds returns whether the error code is a credential expiry error.
+// Returns false if error is nil.
+func IsErrorExpiredCreds(err error) bool {
+ if err != nil {
+ if aerr, ok := err.(awserr.Error); ok {
+ return isCodeExpiredCreds(aerr.Code())
}
}
return false
}
+
+// IsErrorRetryable returns whether the error is retryable, based on its Code.
+// Returns false if the request has no Error set.
+//
+// Alias for the utility function IsErrorRetryable
+func (r *Request) IsErrorRetryable() bool {
+ return IsErrorRetryable(r.Error)
+}
+
+// IsErrorThrottle returns whether the error is to be throttled based on its code.
+// Returns false if the request has no Error set
+//
+// Alias for the utility function IsErrorThrottle
+func (r *Request) IsErrorThrottle() bool {
+ return IsErrorThrottle(r.Error)
+}
+
+// IsErrorExpired returns whether the error code is a credential expiry error.
+// Returns false if the request has no Error set.
+//
+// Alias for the utility function IsErrorExpiredCreds
+func (r *Request) IsErrorExpired() bool {
+ return IsErrorExpiredCreds(r.Error)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
new file mode 100644
index 000000000..09a44eb98
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
@@ -0,0 +1,94 @@
+package request
+
+import (
+ "io"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws/awserr"
+)
+
+var timeoutErr = awserr.New(
+ ErrCodeResponseTimeout,
+ "read on body has reached the timeout limit",
+ nil,
+)
+
+type readResult struct {
+ n int
+ err error
+}
+
+// timeoutReadCloser will handle body reads that take too long.
+// We will return a ErrReadTimeout error if a timeout occurs.
+type timeoutReadCloser struct {
+ reader io.ReadCloser
+ duration time.Duration
+}
+
+// Read will spin off a goroutine to call the reader's Read method. We will
+// select on the timer's channel or the read's channel. Whoever completes first
+// will be returned.
+func (r *timeoutReadCloser) Read(b []byte) (int, error) {
+ timer := time.NewTimer(r.duration)
+ c := make(chan readResult, 1)
+
+ go func() {
+ n, err := r.reader.Read(b)
+ timer.Stop()
+ c <- readResult{n: n, err: err}
+ }()
+
+ select {
+ case data := <-c:
+ return data.n, data.err
+ case <-timer.C:
+ return 0, timeoutErr
+ }
+}
+
+func (r *timeoutReadCloser) Close() error {
+ return r.reader.Close()
+}
+
+const (
+ // HandlerResponseTimeout is what we use to signify the name of the
+ // response timeout handler.
+ HandlerResponseTimeout = "ResponseTimeoutHandler"
+)
+
+// adaptToResponseTimeoutError is a handler that will replace any top level error
+// to a ErrCodeResponseTimeout, if its child is that.
+func adaptToResponseTimeoutError(req *Request) {
+ if err, ok := req.Error.(awserr.Error); ok {
+ aerr, ok := err.OrigErr().(awserr.Error)
+ if ok && aerr.Code() == ErrCodeResponseTimeout {
+ req.Error = aerr
+ }
+ }
+}
+
+// WithResponseReadTimeout is a request option that will wrap the body in a timeout read closer.
+// This will allow for per read timeouts. If a timeout occurred, we will return the
+// ErrCodeResponseTimeout.
+//
+// svc.PutObjectWithContext(ctx, params, request.WithTimeoutReadCloser(30 * time.Second)
+func WithResponseReadTimeout(duration time.Duration) Option {
+ return func(r *Request) {
+
+ var timeoutHandler = NamedHandler{
+ HandlerResponseTimeout,
+ func(req *Request) {
+ req.HTTPResponse.Body = &timeoutReadCloser{
+ reader: req.HTTPResponse.Body,
+ duration: duration,
+ }
+ }}
+
+ // remove the handler so we are not stomping over any new durations.
+ r.Handlers.Send.RemoveByName(HandlerResponseTimeout)
+ r.Handlers.Send.PushBackNamed(timeoutHandler)
+
+ r.Handlers.Unmarshal.PushBack(adaptToResponseTimeoutError)
+ r.Handlers.UnmarshalError.PushBack(adaptToResponseTimeoutError)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
index 2520286b7..401246228 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
@@ -220,7 +220,7 @@ type ErrParamMinLen struct {
func NewErrParamMinLen(field string, min int) *ErrParamMinLen {
return &ErrParamMinLen{
errInvalidParam: errInvalidParam{
- code: ParamMinValueErrCode,
+ code: ParamMinLenErrCode,
field: field,
msg: fmt.Sprintf("minimum field size of %v", min),
},
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
new file mode 100644
index 000000000..4601f883c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
@@ -0,0 +1,295 @@
+package request
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/awsutil"
+)
+
+// WaiterResourceNotReadyErrorCode is the error code returned by a waiter when
+// the waiter's max attempts have been exhausted.
+const WaiterResourceNotReadyErrorCode = "ResourceNotReady"
+
+// A WaiterOption is a function that will update the Waiter value's fields to
+// configure the waiter.
+type WaiterOption func(*Waiter)
+
+// WithWaiterMaxAttempts returns the maximum number of times the waiter should
+// attempt to check the resource for the target state.
+func WithWaiterMaxAttempts(max int) WaiterOption {
+ return func(w *Waiter) {
+ w.MaxAttempts = max
+ }
+}
+
+// WaiterDelay will return a delay the waiter should pause between attempts to
+// check the resource state. The passed in attempt is the number of times the
+// Waiter has checked the resource state.
+//
+// Attempt is the number of attempts the Waiter has made checking the resource
+// state.
+type WaiterDelay func(attempt int) time.Duration
+
+// ConstantWaiterDelay returns a WaiterDelay that will always return a constant
+// delay the waiter should use between attempts. It ignores the number of
+// attempts made.
+func ConstantWaiterDelay(delay time.Duration) WaiterDelay {
+ return func(attempt int) time.Duration {
+ return delay
+ }
+}
+
+// WithWaiterDelay will set the Waiter to use the WaiterDelay passed in.
+func WithWaiterDelay(delayer WaiterDelay) WaiterOption {
+ return func(w *Waiter) {
+ w.Delay = delayer
+ }
+}
+
+// WithWaiterLogger returns a waiter option to set the logger a waiter
+// should use to log warnings and errors to.
+func WithWaiterLogger(logger aws.Logger) WaiterOption {
+ return func(w *Waiter) {
+ w.Logger = logger
+ }
+}
+
+// WithWaiterRequestOptions returns a waiter option setting the request
+// options for each request the waiter makes. Appends to waiter's request
+// options already set.
+func WithWaiterRequestOptions(opts ...Option) WaiterOption {
+ return func(w *Waiter) {
+ w.RequestOptions = append(w.RequestOptions, opts...)
+ }
+}
+
+// A Waiter provides the functionality to perform a blocking call which will
+// wait for a resource state to be satisfied by a service.
+//
+// This type should not be used directly. The API operations provided in the
+// service packages prefixed with "WaitUntil" should be used instead.
+type Waiter struct {
+ Name string
+ Acceptors []WaiterAcceptor
+ Logger aws.Logger
+
+ MaxAttempts int
+ Delay WaiterDelay
+
+ RequestOptions []Option
+ NewRequest func([]Option) (*Request, error)
+ SleepWithContext func(aws.Context, time.Duration) error
+}
+
+// ApplyOptions updates the waiter with the list of waiter options provided.
+func (w *Waiter) ApplyOptions(opts ...WaiterOption) {
+ for _, fn := range opts {
+ fn(w)
+ }
+}
+
+// WaiterState are states the waiter uses based on WaiterAcceptor definitions
+// to identify if the resource state the waiter is waiting on has occurred.
+type WaiterState int
+
+// String returns the string representation of the waiter state.
+func (s WaiterState) String() string {
+ switch s {
+ case SuccessWaiterState:
+ return "success"
+ case FailureWaiterState:
+ return "failure"
+ case RetryWaiterState:
+ return "retry"
+ default:
+ return "unknown waiter state"
+ }
+}
+
+// States the waiter acceptors will use to identify target resource states.
+const (
+ SuccessWaiterState WaiterState = iota // waiter successful
+ FailureWaiterState // waiter failed
+ RetryWaiterState // waiter needs to be retried
+)
+
+// WaiterMatchMode is the mode that the waiter will use to match the WaiterAcceptor
+// definition's Expected attribute.
+type WaiterMatchMode int
+
+// Modes the waiter will use when inspecting API response to identify target
+// resource states.
+const (
+ PathAllWaiterMatch WaiterMatchMode = iota // match on all paths
+ PathWaiterMatch // match on specific path
+ PathAnyWaiterMatch // match on any path
+ PathListWaiterMatch // match on list of paths
+ StatusWaiterMatch // match on status code
+ ErrorWaiterMatch // match on error
+)
+
+// String returns the string representation of the waiter match mode.
+func (m WaiterMatchMode) String() string {
+ switch m {
+ case PathAllWaiterMatch:
+ return "pathAll"
+ case PathWaiterMatch:
+ return "path"
+ case PathAnyWaiterMatch:
+ return "pathAny"
+ case PathListWaiterMatch:
+ return "pathList"
+ case StatusWaiterMatch:
+ return "status"
+ case ErrorWaiterMatch:
+ return "error"
+ default:
+ return "unknown waiter match mode"
+ }
+}
+
+// WaitWithContext will make requests for the API operation using NewRequest to
+// build API requests. The request's response will be compared against the
+// Waiter's Acceptors to determine the successful state of the resource the
+// waiter is inspecting.
+//
+// The passed in context must not be nil. If it is nil a panic will occur. The
+// Context will be used to cancel the waiter's pending requests and retry delays.
+// Use aws.BackgroundContext if no context is available.
+//
+// The waiter will continue until the target state defined by the Acceptors,
+// or the max attempts expires.
+//
+// Will return the WaiterResourceNotReadyErrorCode error code if the waiter's
+// retryer ShouldRetry returns false. This normally will happen when the max
+// wait attempts expires.
+func (w Waiter) WaitWithContext(ctx aws.Context) error {
+
+ for attempt := 1; ; attempt++ {
+ req, err := w.NewRequest(w.RequestOptions)
+ if err != nil {
+ waiterLogf(w.Logger, "unable to create request %v", err)
+ return err
+ }
+ req.Handlers.Build.PushBack(MakeAddToUserAgentFreeFormHandler("Waiter"))
+ err = req.Send()
+
+ // See if any of the acceptors match the request's response, or error
+ for _, a := range w.Acceptors {
+ if matched, matchErr := a.match(w.Name, w.Logger, req, err); matched {
+ return matchErr
+ }
+ }
+
+ // The Waiter should only check the resource state MaxAttempts times
+ // This is here instead of in the for loop above to prevent delaying
+ // unnecessary when the waiter will not retry.
+ if attempt == w.MaxAttempts {
+ break
+ }
+
+ // Delay to wait before inspecting the resource again
+ delay := w.Delay(attempt)
+ if sleepFn := req.Config.SleepDelay; sleepFn != nil {
+ // Support SleepDelay for backwards compatibility and testing
+ sleepFn(delay)
+ } else {
+ sleepCtxFn := w.SleepWithContext
+ if sleepCtxFn == nil {
+ sleepCtxFn = aws.SleepWithContext
+ }
+
+ if err := sleepCtxFn(ctx, delay); err != nil {
+ return awserr.New(CanceledErrorCode, "waiter context canceled", err)
+ }
+ }
+ }
+
+ return awserr.New(WaiterResourceNotReadyErrorCode, "exceeded wait attempts", nil)
+}
+
+// A WaiterAcceptor provides the information needed to wait for an API operation
+// to complete.
+type WaiterAcceptor struct {
+ State WaiterState
+ Matcher WaiterMatchMode
+ Argument string
+ Expected interface{}
+}
+
+// match returns if the acceptor found a match with the passed in request
+// or error. True is returned if the acceptor made a match, error is returned
+// if there was an error attempting to perform the match.
+func (a *WaiterAcceptor) match(name string, l aws.Logger, req *Request, err error) (bool, error) {
+ result := false
+ var vals []interface{}
+
+ switch a.Matcher {
+ case PathAllWaiterMatch, PathWaiterMatch:
+ // Require all matches to be equal for result to match
+ vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
+ if len(vals) == 0 {
+ break
+ }
+ result = true
+ for _, val := range vals {
+ if !awsutil.DeepEqual(val, a.Expected) {
+ result = false
+ break
+ }
+ }
+ case PathAnyWaiterMatch:
+ // Only a single match needs to equal for the result to match
+ vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
+ for _, val := range vals {
+ if awsutil.DeepEqual(val, a.Expected) {
+ result = true
+ break
+ }
+ }
+ case PathListWaiterMatch:
+ // ignored matcher
+ case StatusWaiterMatch:
+ s := a.Expected.(int)
+ result = s == req.HTTPResponse.StatusCode
+ case ErrorWaiterMatch:
+ if aerr, ok := err.(awserr.Error); ok {
+ result = aerr.Code() == a.Expected.(string)
+ }
+ default:
+ waiterLogf(l, "WARNING: Waiter %s encountered unexpected matcher: %s",
+ name, a.Matcher)
+ }
+
+ if !result {
+ // If there was no matching result found there is nothing more to do
+ // for this response, retry the request.
+ return false, nil
+ }
+
+ switch a.State {
+ case SuccessWaiterState:
+ // waiter completed
+ return true, nil
+ case FailureWaiterState:
+ // Waiter failure state triggered
+ return true, awserr.New(WaiterResourceNotReadyErrorCode,
+ "failed waiting for successful resource state", err)
+ case RetryWaiterState:
+ // clear the error and retry the operation
+ return false, nil
+ default:
+ waiterLogf(l, "WARNING: Waiter %s encountered unexpected state: %s",
+ name, a.State)
+ return false, nil
+ }
+}
+
+func waiterLogf(logger aws.Logger, msg string, args ...interface{}) {
+ if logger != nil {
+ logger.Log(fmt.Sprintf(msg, args...))
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
index 9975e320c..ea7b886f8 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
@@ -23,7 +23,7 @@ additional config if the AWS_SDK_LOAD_CONFIG environment variable is set.
Alternatively you can explicitly create a Session with shared config enabled.
To do this you can use NewSessionWithOptions to configure how the Session will
be created. Using the NewSessionWithOptions with SharedConfigState set to
-SharedConfigEnabled will create the session as if the AWS_SDK_LOAD_CONFIG
+SharedConfigEnable will create the session as if the AWS_SDK_LOAD_CONFIG
environment variable was set.
Creating Sessions
@@ -84,7 +84,7 @@ override the shared config state (AWS_SDK_LOAD_CONFIG).
// Force enable Shared Config support
sess := session.Must(session.NewSessionWithOptions(session.Options{
- SharedConfigState: SharedConfigEnable,
+ SharedConfigState: session.SharedConfigEnable,
}))
Adding Handlers
@@ -96,7 +96,7 @@ handler logs every request and its payload made by a service client:
// Create a session, and add additional handlers for all service
// clients created with the Session to inherit. Adds logging handler.
sess := session.Must(session.NewSession())
-
+
sess.Handlers.Send.PushFront(func(r *request.Request) {
// Log every request made and its payload
logger.Println("Request: %s/%s, Payload: %s",
@@ -124,9 +124,8 @@ file (~/.aws/config) and shared credentials file (~/.aws/credentials). Both
files have the same format.
If both config files are present the configuration from both files will be
-read. The Session will be created from configuration values from the shared
-credentials file (~/.aws/credentials) over those in the shared credentials
-file (~/.aws/config).
+read. The Session will be created from configuration values from the shared
+credentials file (~/.aws/credentials) over those in the shared config file (~/.aws/config).
Credentials are the values the SDK should use for authenticating requests with
AWS Services. They arfrom a configuration file will need to include both
@@ -169,8 +168,8 @@ session option must be set to SharedConfigEnable, or AWS_SDK_LOAD_CONFIG
environment variable set.
The shared configuration instructs the SDK to assume an IAM role with MFA
-when the mfa_serial configuration field is set in the shared config
-(~/.aws/config) or shared credentials (~/.aws/credentials) file.
+when the mfa_serial configuration field is set in the shared config
+(~/.aws/config) or shared credentials (~/.aws/credentials) file.
If mfa_serial is set in the configuration, the SDK will assume the role, and
the AssumeRoleTokenProvider session option is not set an an error will
@@ -251,6 +250,24 @@ $HOME/.aws/config on Linux/Unix based systems, and
AWS_CONFIG_FILE=$HOME/my_shared_config
+Path to a custom Credentials Authority (CA) bundle PEM file that the SDK
+will use instead of the default system's root CA bundle. Use this only
+if you want to replace the CA bundle the SDK uses for TLS requests.
+ AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
+
+Enabling this option will attempt to merge the Transport into the SDK's HTTP
+client. If the client's Transport is not a http.Transport an error will be
+returned. If the Transport's TLS config is set this option will cause the SDK
+to overwrite the Transport's TLS config's RootCAs value. If the CA bundle file
+contains multiple certificates all of them will be loaded.
+
+The Session option CustomCABundle is also available when creating sessions
+to also enable this feature. CustomCABundle session option field has priority
+over the AWS_CA_BUNDLE environment variable, and will be used if both are set.
+
+Setting a custom HTTPClient in the aws.Config options will override this setting.
+To use this option and custom HTTP client, the HTTP client needs to be provided
+when creating the session. Not the service client.
*/
package session
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
index d2f0c8448..7357e545a 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
@@ -2,7 +2,6 @@ package session
import (
"os"
- "path/filepath"
"strconv"
"github.com/aws/aws-sdk-go/aws/credentials"
@@ -75,6 +74,24 @@ type envConfig struct {
//
// AWS_CONFIG_FILE=$HOME/my_shared_config
SharedConfigFile string
+
+ // Sets the path to a custom Credentials Authroity (CA) Bundle PEM file
+ // that the SDK will use instead of the the system's root CA bundle.
+ // Only use this if you want to configure the SDK to use a custom set
+ // of CAs.
+ //
+ // Enabling this option will attempt to merge the Transport
+ // into the SDK's HTTP client. If the client's Transport is
+ // not a http.Transport an error will be returned. If the
+ // Transport's TLS config is set this option will cause the
+ // SDK to overwrite the Transport's TLS config's RootCAs value.
+ //
+ // Setting a custom HTTPClient in the aws.Config options will override this setting.
+ // To use this option and custom HTTP client, the HTTP client needs to be provided
+ // when creating the session. Not the service client.
+ //
+ // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
+ CustomCABundle string
}
var (
@@ -98,6 +115,12 @@ var (
"AWS_PROFILE",
"AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set
}
+ sharedCredsFileEnvKey = []string{
+ "AWS_SHARED_CREDENTIALS_FILE",
+ }
+ sharedConfigFileEnvKey = []string{
+ "AWS_CONFIG_FILE",
+ }
)
// loadEnvConfig retrieves the SDK's environment configuration.
@@ -147,8 +170,10 @@ func envConfigLoad(enableSharedConfig bool) envConfig {
setFromEnvVal(&cfg.Region, regionKeys)
setFromEnvVal(&cfg.Profile, profileKeys)
- cfg.SharedCredentialsFile = sharedCredentialsFilename()
- cfg.SharedConfigFile = sharedConfigFilename()
+ setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey)
+ setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey)
+
+ cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE")
return cfg
}
@@ -161,28 +186,3 @@ func setFromEnvVal(dst *string, keys []string) {
}
}
}
-
-func sharedCredentialsFilename() string {
- if name := os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(name) > 0 {
- return name
- }
-
- return filepath.Join(userHomeDir(), ".aws", "credentials")
-}
-
-func sharedConfigFilename() string {
- if name := os.Getenv("AWS_CONFIG_FILE"); len(name) > 0 {
- return name
- }
-
- return filepath.Join(userHomeDir(), ".aws", "config")
-}
-
-func userHomeDir() string {
- homeDir := os.Getenv("HOME") // *nix
- if len(homeDir) == 0 { // windows
- homeDir = os.Getenv("USERPROFILE")
- }
-
- return homeDir
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
index 42ab3632e..9f75d5ac5 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
@@ -1,7 +1,13 @@
package session
import (
+ "crypto/tls"
+ "crypto/x509"
"fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "os"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
@@ -92,9 +98,10 @@ func New(cfgs ...*aws.Config) *Session {
// control through code how the Session will be created. Such as specifying the
// config profile, and controlling if shared config is enabled or not.
func NewSession(cfgs ...*aws.Config) (*Session, error) {
- envCfg := loadEnvConfig()
+ opts := Options{}
+ opts.Config.MergeIn(cfgs...)
- return newSession(Options{}, envCfg, cfgs...)
+ return NewSessionWithOptions(opts)
}
// SharedConfigState provides the ability to optionally override the state
@@ -148,6 +155,10 @@ type Options struct {
// and enable or disable the shared config functionality.
SharedConfigState SharedConfigState
+ // Ordered list of files the session will load configuration from.
+ // It will override environment variable AWS_SHARED_CREDENTIALS_FILE, AWS_CONFIG_FILE.
+ SharedConfigFiles []string
+
// When the SDK's shared config is configured to assume a role with MFA
// this option is required in order to provide the mechanism that will
// retrieve the MFA token. There is no default value for this field. If
@@ -167,6 +178,21 @@ type Options struct {
// This field is only used if the shared configuration is enabled, and
// the config enables assume role wit MFA via the mfa_serial field.
AssumeRoleTokenProvider func() (string, error)
+
+ // Reader for a custom Credentials Authority (CA) bundle in PEM format that
+ // the SDK will use instead of the default system's root CA bundle. Use this
+ // only if you want to replace the CA bundle the SDK uses for TLS requests.
+ //
+ // Enabling this option will attempt to merge the Transport into the SDK's HTTP
+ // client. If the client's Transport is not a http.Transport an error will be
+ // returned. If the Transport's TLS config is set this option will cause the SDK
+ // to overwrite the Transport's TLS config's RootCAs value. If the CA
+ // bundle reader contains multiple certificates all of them will be loaded.
+ //
+ // The Session option CustomCABundle is also available when creating sessions
+ // to also enable this feature. CustomCABundle session option field has priority
+ // over the AWS_CA_BUNDLE environment variable, and will be used if both are set.
+ CustomCABundle io.Reader
}
// NewSessionWithOptions returns a new Session created from SDK defaults, config files,
@@ -196,7 +222,7 @@ type Options struct {
//
// // Force enable Shared Config support
// sess := session.Must(session.NewSessionWithOptions(session.Options{
-// SharedConfigState: SharedConfigEnable,
+// SharedConfigState: session.SharedConfigEnable,
// }))
func NewSessionWithOptions(opts Options) (*Session, error) {
var envCfg envConfig
@@ -217,6 +243,24 @@ func NewSessionWithOptions(opts Options) (*Session, error) {
envCfg.EnableSharedConfig = true
}
+ if len(envCfg.SharedCredentialsFile) == 0 {
+ envCfg.SharedCredentialsFile = defaults.SharedCredentialsFilename()
+ }
+ if len(envCfg.SharedConfigFile) == 0 {
+ envCfg.SharedConfigFile = defaults.SharedConfigFilename()
+ }
+
+ // Only use AWS_CA_BUNDLE if session option is not provided.
+ if len(envCfg.CustomCABundle) != 0 && opts.CustomCABundle == nil {
+ f, err := os.Open(envCfg.CustomCABundle)
+ if err != nil {
+ return nil, awserr.New("LoadCustomCABundleError",
+ "failed to open custom CA bundle PEM file", err)
+ }
+ defer f.Close()
+ opts.CustomCABundle = f
+ }
+
return newSession(opts, envCfg, &opts.Config)
}
@@ -271,13 +315,18 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session,
userCfg := &aws.Config{}
userCfg.MergeIn(cfgs...)
- // Order config files will be loaded in with later files overwriting
+ // Ordered config files will be loaded in with later files overwriting
// previous config file values.
- cfgFiles := []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile}
- if !envCfg.EnableSharedConfig {
- // The shared config file (~/.aws/config) is only loaded if instructed
- // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG).
- cfgFiles = cfgFiles[1:]
+ var cfgFiles []string
+ if opts.SharedConfigFiles != nil {
+ cfgFiles = opts.SharedConfigFiles
+ } else {
+ cfgFiles = []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile}
+ if !envCfg.EnableSharedConfig {
+ // The shared config file (~/.aws/config) is only loaded if instructed
+ // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG).
+ cfgFiles = cfgFiles[1:]
+ }
}
// Load additional config from file(s)
@@ -297,9 +346,61 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session,
initHandlers(s)
+ // Setup HTTP client with custom cert bundle if enabled
+ if opts.CustomCABundle != nil {
+ if err := loadCustomCABundle(s, opts.CustomCABundle); err != nil {
+ return nil, err
+ }
+ }
+
return s, nil
}
+func loadCustomCABundle(s *Session, bundle io.Reader) error {
+ var t *http.Transport
+ switch v := s.Config.HTTPClient.Transport.(type) {
+ case *http.Transport:
+ t = v
+ default:
+ if s.Config.HTTPClient.Transport != nil {
+ return awserr.New("LoadCustomCABundleError",
+ "unable to load custom CA bundle, HTTPClient's transport unsupported type", nil)
+ }
+ }
+ if t == nil {
+ t = &http.Transport{}
+ }
+
+ p, err := loadCertPool(bundle)
+ if err != nil {
+ return err
+ }
+ if t.TLSClientConfig == nil {
+ t.TLSClientConfig = &tls.Config{}
+ }
+ t.TLSClientConfig.RootCAs = p
+
+ s.Config.HTTPClient.Transport = t
+
+ return nil
+}
+
+func loadCertPool(r io.Reader) (*x509.CertPool, error) {
+ b, err := ioutil.ReadAll(r)
+ if err != nil {
+ return nil, awserr.New("LoadCustomCABundleError",
+ "failed to read custom CA bundle PEM file", err)
+ }
+
+ p := x509.NewCertPool()
+ if !p.AppendCertsFromPEM(b) {
+ return nil, awserr.New("LoadCustomCABundleError",
+ "failed to load custom CA bundle PEM file", err)
+ }
+
+ return p, nil
+}
+
func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers, sessOpts Options) error {
// Merge in user provided configuration
cfg.MergeIn(userCfg)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
index b58076f5e..09c8e5bc7 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
@@ -113,7 +113,7 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) {
f, err := ini.Load(b)
if err != nil {
- return nil, SharedConfigLoadError{Filename: filename}
+ return nil, SharedConfigLoadError{Filename: filename, Err: err}
}
files = append(files, sharedConfigFile{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
new file mode 100644
index 000000000..6aa2ed241
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
@@ -0,0 +1,7 @@
+package v4
+
+// WithUnsignedPayload will enable and set the UnsignedPayload field to
+// true of the signer.
+func WithUnsignedPayload(v4 *Signer) {
+ v4.UnsignedPayload = true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
index 98bfe742b..b7da95ab6 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
@@ -45,7 +45,7 @@
// If signing a request intended for HTTP2 server, and you're using Go 1.6.2
// through 1.7.4 you should use the URL.RawPath as the pre-escaped form of the
// request URL. https://github.com/golang/go/issues/16847 points to a bug in
-// Go pre 1.8 that failes to make HTTP2 requests using absolute URL in the HTTP
+// Go pre 1.8 that fails to make HTTP2 requests using absolute URL in the HTTP
// message. URL.Opaque generally will force Go to make requests with absolute URL.
// URL.RawPath does not do this, but RawPath must be a valid escaping of Path
// or url.EscapedPath will ignore the RawPath escaping.
@@ -194,6 +194,10 @@ type Signer struct {
// This value should only be used for testing. If it is nil the default
// time.Now will be used.
currentTimeFn func() time.Time
+
+ // UnsignedPayload will prevent signing of the payload. This will only
+ // work for services that have support for this.
+ UnsignedPayload bool
}
// NewSigner returns a Signer pointer configured with the credentials and optional
@@ -227,6 +231,7 @@ type signingCtx struct {
isPresign bool
formattedTime string
formattedShortTime string
+ unsignedPayload bool
bodyDigest string
signedHeaders string
@@ -317,6 +322,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
ServiceName: service,
Region: region,
DisableURIPathEscaping: v4.DisableURIPathEscaping,
+ unsignedPayload: v4.UnsignedPayload,
}
for key := range ctx.Query {
@@ -396,7 +402,7 @@ var SignRequestHandler = request.NamedHandler{
}
// SignSDKRequest signs an AWS request with the V4 signature. This
-// request handler is bested used only with the SDK's built in service client's
+// request handler should only be used with the SDK's built in service client's
// API operation requests.
//
// This function should not be used on its on its own, but in conjunction with
@@ -409,7 +415,18 @@ var SignRequestHandler = request.NamedHandler{
func SignSDKRequest(req *request.Request) {
signSDKRequestWithCurrTime(req, time.Now)
}
-func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time) {
+
+// BuildNamedHandler will build a generic handler for signing.
+func BuildNamedHandler(name string, opts ...func(*Signer)) request.NamedHandler {
+ return request.NamedHandler{
+ Name: name,
+ Fn: func(req *request.Request) {
+ signSDKRequestWithCurrTime(req, time.Now, opts...)
+ },
+ }
+}
+
+func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time, opts ...func(*Signer)) {
// 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 {
@@ -441,6 +458,10 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time
v4.DisableRequestBodyOverwrite = true
})
+ for _, opt := range opts {
+ opt(v4)
+ }
+
signingTime := req.Time
if !req.LastSignedAt.IsZero() {
signingTime = req.LastSignedAt
@@ -583,7 +604,11 @@ func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
headerValues := make([]string, len(headers))
for i, k := range headers {
if k == "host" {
- headerValues[i] = "host:" + ctx.Request.URL.Host
+ if ctx.Request.Host != "" {
+ headerValues[i] = "host:" + ctx.Request.Host
+ } else {
+ headerValues[i] = "host:" + ctx.Request.URL.Host
+ }
} else {
headerValues[i] = k + ":" +
strings.Join(ctx.SignedHeaderVals[k], ",")
@@ -634,14 +659,14 @@ func (ctx *signingCtx) buildSignature() {
func (ctx *signingCtx) buildBodyDigest() {
hash := ctx.Request.Header.Get("X-Amz-Content-Sha256")
if hash == "" {
- if ctx.isPresign && ctx.ServiceName == "s3" {
+ if ctx.unsignedPayload || (ctx.isPresign && ctx.ServiceName == "s3") {
hash = "UNSIGNED-PAYLOAD"
} else if ctx.Body == nil {
hash = emptyStringSHA256
} else {
hash = hex.EncodeToString(makeSha256Reader(ctx.Body))
}
- if ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" {
+ if ctx.unsignedPayload || ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" {
ctx.Request.Header.Set("X-Amz-Content-Sha256", hash)
}
}
@@ -703,24 +728,24 @@ func stripExcessSpaces(headerVals []string) []string {
trimmed := strings.TrimSpace(str)
idx := strings.Index(trimmed, doubleSpaces)
- var buf []byte
- for idx > -1 {
- // Multiple adjacent spaces found
- if buf == nil {
- // first time create the buffer
- buf = []byte(trimmed)
- }
+ if idx < 0 {
+ vals[i] = trimmed
+ continue
+ }
+ buf := []byte(trimmed)
+ for idx > -1 {
stripToIdx := -1
for j := idx + 1; j < len(buf); j++ {
if buf[j] != ' ' {
buf = append(buf[:idx+1], buf[j:]...)
- stripToIdx = j
+ stripToIdx = j - idx - 1
break
}
}
if stripToIdx >= 0 {
+ // Find next double space
idx = bytes.Index(buf[stripToIdx:], doubleSpaceBytes)
if idx >= 0 {
idx += stripToIdx
@@ -730,11 +755,7 @@ func stripExcessSpaces(headerVals []string) []string {
}
}
- if buf != nil {
- vals[i] = string(buf)
- } else {
- vals[i] = trimmed
- }
+ vals[i] = string(buf)
}
return vals
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/url.go b/vendor/github.com/aws/aws-sdk-go/aws/url.go
new file mode 100644
index 000000000..6192b2455
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/url.go
@@ -0,0 +1,12 @@
+// +build go1.8
+
+package aws
+
+import "net/url"
+
+// URLHostname will extract the Hostname without port from the URL value.
+//
+// Wrapper of net/url#URL.Hostname for backwards Go version compatibility.
+func URLHostname(url *url.URL) string {
+ return url.Hostname()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
new file mode 100644
index 000000000..0210d2720
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
@@ -0,0 +1,29 @@
+// +build !go1.8
+
+package aws
+
+import (
+ "net/url"
+ "strings"
+)
+
+// URLHostname will extract the Hostname without port from the URL value.
+//
+// Copy of Go 1.8's net/url#URL.Hostname functionality.
+func URLHostname(url *url.URL) string {
+ return stripPort(url.Host)
+
+}
+
+// stripPort is copy of Go 1.8 url#URL.Hostname functionality.
+// https://golang.org/src/net/url/url.go
+func stripPort(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return hostport
+ }
+ if i := strings.IndexByte(hostport, ']'); i != -1 {
+ return strings.TrimPrefix(hostport[:i], "[")
+ }
+ return hostport[:colon]
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go
index 7c48b0d9c..6abe02e04 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go
@@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.7.1"
+const SDKVersion = "1.10.14"
diff --git a/vendor/github.com/aws/aws-sdk-go/doc.go b/vendor/github.com/aws/aws-sdk-go/doc.go
new file mode 100644
index 000000000..3e077e51d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/doc.go
@@ -0,0 +1,405 @@
+// Package sdk is the official AWS SDK for the Go programming language.
+//
+// The AWS SDK for Go provides APIs and utilities that developers can use to
+// build Go applications that use AWS services, such as Amazon Elastic Compute
+// Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3).
+//
+// The SDK removes the complexity of coding directly against a web service
+// interface. It hides a lot of the lower-level plumbing, such as authentication,
+// request retries, and error handling.
+//
+// The SDK also includes helpful utilities on top of the AWS APIs that add additional
+// capabilities and functionality. For example, the Amazon S3 Download and Upload
+// Manager will automatically split up large objects into multiple parts and
+// transfer them concurrently.
+//
+// See the s3manager package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/
+//
+// Getting More Information
+//
+// Checkout the Getting Started Guide and API Reference Docs detailed the SDK's
+// components and details on each AWS client the SDK supports.
+//
+// The Getting Started Guide provides examples and detailed description of how
+// to get setup with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/welcome.html
+//
+// The API Reference Docs include a detailed breakdown of the SDK's components
+// such as utilities and AWS clients. Use this as a reference of the Go types
+// included with the SDK, such as AWS clients, API operations, and API parameters.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// Overview of SDK's Packages
+//
+// The SDK is composed of two main components, SDK core, and service clients.
+// The SDK core packages are all available under the aws package at the root of
+// the SDK. Each client for a supported AWS service is available within its own
+// package under the service folder at the root of the SDK.
+//
+// * aws - SDK core, provides common shared types such as Config, Logger,
+// and utilities to make working with API parameters easier.
+//
+// * awserr - Provides the error interface that the SDK will use for all
+// errors that occur in the SDK's processing. This includes service API
+// response errors as well. The Error type is made up of a code and message.
+// Cast the SDK's returned error type to awserr.Error and call the Code
+// method to compare returned error to specific error codes. See the package's
+// documentation for additional values that can be extracted such as RequestId.
+//
+// * credentials - Provides the types and built in credentials providers
+// the SDK will use to retrieve AWS credentials to make API requests with.
+// Nested under this folder are also additional credentials providers such as
+// stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles.
+//
+// * endpoints - Provides the AWS Regions and Endpoints metadata for the SDK.
+// Use this to lookup AWS service endpoint information such as which services
+// are in a region, and what regions a service is in. Constants are also provided
+// for all region identifiers, e.g UsWest2RegionID for "us-west-2".
+//
+// * session - Provides initial default configuration, and load
+// configuration from external sources such as environment and shared
+// credentials file.
+//
+// * request - Provides the API request sending, and retry logic for the SDK.
+// This package also includes utilities for defining your own request
+// retryer, and configuring how the SDK processes the request.
+//
+// * service - Clients for AWS services. All services supported by the SDK are
+// available under this folder.
+//
+// How to Use the SDK's AWS Service Clients
+//
+// The SDK includes the Go types and utilities you can use to make requests to
+// AWS service APIs. Within the service folder at the root of the SDK you'll find
+// a package for each AWS service the SDK supports. All service clients follows
+// a common pattern of creation and usage.
+//
+// When creating a client for an AWS service you'll first need to have a Session
+// value constructed. The Session provides shared configuration that can be shared
+// between your service clients. When service clients are created you can pass
+// in additional configuration via the aws.Config type to override configuration
+// provided by in the Session to create service client instances with custom
+// configuration.
+//
+// Once the service's client is created you can use it to make API requests the
+// AWS service. These clients are safe to use concurrently.
+//
+// Configuring the SDK
+//
+// In the AWS SDK for Go, you can configure settings for service clients, such
+// as the log level and maximum number of retries. Most settings are optional;
+// however, for each service client, you must specify a region and your credentials.
+// The SDK uses these values to send requests to the correct AWS region and sign
+// requests with the correct credentials. You can specify these values as part
+// of a session or as environment variables.
+//
+// See the SDK's configuration guide for more information.
+// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html
+//
+// See the session package documentation for more information on how to use Session
+// with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/session/
+//
+// See the Config type in the aws package for more information on configuration
+// options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// Configuring Credentials
+//
+// When using the SDK you'll generally need your AWS credentials to authenticate
+// with AWS services. The SDK supports multiple methods of supporting these
+// credentials. By default the SDK will source credentials automatically from
+// its default credential chain. See the session package for more information
+// on this chain, and how to configure it. The common items in the credential
+// chain are the following:
+//
+// * Environment Credentials - Set of environment variables that are useful
+// when sub processes are created for specific roles.
+//
+// * Shared Credentials file (~/.aws/credentials) - This file stores your
+// credentials based on a profile name and is useful for local development.
+//
+// * EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials
+// to application running on an EC2 instance. This removes the need to manage
+// credential files in production.
+//
+// Credentials can be configured in code as well by setting the Config's Credentials
+// value to a custom provider or using one of the providers included with the
+// SDK to bypass the default credential chain and use a custom one. This is
+// helpful when you want to instruct the SDK to only use a specific set of
+// credentials or providers.
+//
+// This example creates a credential provider for assuming an IAM role, "myRoleARN"
+// and configures the S3 service client to use that role for API requests.
+//
+// // Initial credentials loaded from SDK's default credential chain. Such as
+// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
+// // Role. These credentials will be used to to make the STS Assume Role API.
+// sess := session.Must(session.NewSession())
+//
+// // Create the credentials from AssumeRoleProvider to assume the role
+// // referenced by the "myRoleARN" ARN.
+// creds := stscreds.NewCredentials(sess, "myRoleArn")
+//
+// // Create service client value configured for credentials
+// // from assumed role.
+// svc := s3.New(sess, &aws.Config{Credentials: creds})/
+//
+// See the credentials package documentation for more information on credential
+// providers included with the SDK, and how to customize the SDK's usage of
+// credentials.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials
+//
+// The SDK has support for the shared configuration file (~/.aws/config). This
+// support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1",
+// or enabling the feature in code when creating a Session via the
+// Option's SharedConfigState parameter.
+//
+// sess := session.Must(session.NewSessionWithOptions(session.Options{
+// SharedConfigState: session.SharedConfigEnable,
+// }))
+//
+// Configuring AWS Region
+//
+// In addition to the credentials you'll need to specify the region the SDK
+// will use to make AWS API requests to. In the SDK you can specify the region
+// either with an environment variable, or directly in code when a Session or
+// service client is created. The last value specified in code wins if the region
+// is specified multiple ways.
+//
+// To set the region via the environment variable set the "AWS_REGION" to the
+// region you want to the SDK to use. Using this method to set the region will
+// allow you to run your application in multiple regions without needing additional
+// code in the application to select the region.
+//
+// AWS_REGION=us-west-2
+//
+// The endpoints package includes constants for all regions the SDK knows. The
+// values are all suffixed with RegionID. These values are helpful, because they
+// reduce the need to type the region string manually.
+//
+// To set the region on a Session use the aws package's Config struct parameter
+// Region to the AWS region you want the service clients created from the session to
+// use. This is helpful when you want to create multiple service clients, and
+// all of the clients make API requests to the same region.
+//
+// sess := session.Must(session.NewSession(&aws.Config{
+// Region: aws.String(endpoints.UsWest2RegionID),
+// }))
+//
+// See the endpoints package for the AWS Regions and Endpoints metadata.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/
+//
+// In addition to setting the region when creating a Session you can also set
+// the region on a per service client bases. This overrides the region of a
+// Session. This is helpful when you want to create service clients in specific
+// regions different from the Session's region.
+//
+// svc := s3.New(sess, &aws.Config{
+// Region: aws.String(ednpoints.UsWest2RegionID),
+// })
+//
+// See the Config type in the aws package for more information and additional
+// options such as setting the Endpoint, and other service client configuration options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// Making API Requests
+//
+// Once the client is created you can make an API request to the service.
+// Each API method takes a input parameter, and returns the service response
+// and an error. The SDK provides methods for making the API call in multiple ways.
+//
+// In this list we'll use the S3 ListObjects API as an example for the different
+// ways of making API requests.
+//
+// * ListObjects - Base API operation that will make the API request to the service.
+//
+// * ListObjectsRequest - API methods suffixed with Request will construct the
+// API request, but not send it. This is also helpful when you want to get a
+// presigned URL for a request, and share the presigned URL instead of your
+// application making the request directly.
+//
+// * ListObjectsPages - Same as the base API operation, but uses a callback to
+// automatically handle pagination of the API's response.
+//
+// * ListObjectsWithContext - Same as base API operation, but adds support for
+// the Context pattern. This is helpful for controlling the canceling of in
+// flight requests. See the Go standard library context package for more
+// information. This method also takes request package's Option functional
+// options as the variadic argument for modifying how the request will be
+// made, or extracting information from the raw HTTP response.
+//
+// * ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for
+// the Context pattern. Similar to ListObjectsWithContext this method also
+// takes the request package's Option function option types as the variadic
+// argument.
+//
+// In addition to the API operations the SDK also includes several higher level
+// methods that abstract checking for and waiting for an AWS resource to be in
+// a desired state. In this list we'll use WaitUntilBucketExists to demonstrate
+// the different forms of waiters.
+//
+// * WaitUntilBucketExists. - Method to make API request to query an AWS service for
+// a resource's state. Will return successfully when that state is accomplished.
+//
+// * WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds
+// support for the Context pattern. In addition these methods take request
+// package's WaiterOptions to configure the waiter, and how underlying request
+// will be made by the SDK.
+//
+// The API method will document which error codes the service might return for
+// the operation. These errors will also be available as const strings prefixed
+// with "ErrCode" in the service client's package. If there are no errors listed
+// in the API's SDK documentation you'll need to consult the AWS service's API
+// documentation for the errors that could be returned.
+//
+// ctx := context.Background()
+//
+// result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{
+// Bucket: aws.String("my-bucket"),
+// Key: aws.String("my-key"),
+// })
+// if err != nil {
+// // Cast err to awserr.Error to handle specific error codes.
+// aerr, ok := err.(awserr.Error)
+// if ok && aerr.Code() == s3.ErrCodeNoSuchKey {
+// // Specific error code handling
+// }
+// return err
+// }
+//
+// // Make sure to close the body when done with it for S3 GetObject APIs or
+// // will leak connections.
+// defer result.Body.Close()
+//
+// fmt.Println("Object Size:", aws.StringValue(result.ContentLength))
+//
+// API Request Pagination and Resource Waiters
+//
+// Pagination helper methods are suffixed with "Pages", and provide the
+// functionality needed to round trip API page requests. Pagination methods
+// take a callback function that will be called for each page of the API's response.
+//
+// objects := []string{}
+// err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{
+// Bucket: aws.String(myBucket),
+// }, func(p *s3.ListObjectsOutput, lastPage bool) bool {
+// for _, o := range p.Contents {
+// objects = append(objects, aws.StringValue(o.Key))
+// }
+// return true // continue paging
+// })
+// if err != nil {
+// panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err))
+// }
+//
+// fmt.Println("Objects in bucket:", objects)
+//
+// Waiter helper methods provide the functionality to wait for an AWS resource
+// state. These methods abstract the logic needed to to check the state of an
+// AWS resource, and wait until that resource is in a desired state. The waiter
+// will block until the resource is in the state that is desired, an error occurs,
+// or the waiter times out. If a resource times out the error code returned will
+// be request.WaiterResourceNotReadyErrorCode.
+//
+// err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{
+// Bucket: aws.String(myBucket),
+// })
+// if err != nil {
+// aerr, ok := err.(awserr.Error)
+// if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode {
+// fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist")
+// }
+// panic(fmt.Errorf("failed to wait for bucket to exist, %v", err))
+// }
+// fmt.Println("Bucket", myBucket, "exists")
+//
+// Complete SDK Example
+//
+// This example shows a complete working Go file which will upload a file to S3
+// and use the Context pattern to implement timeout logic that will cancel the
+// request if it takes too long. This example highlights how to use sessions,
+// create a service client, make a request, handle the error, and process the
+// response.
+//
+// package main
+//
+// import (
+// "context"
+// "flag"
+// "fmt"
+// "os"
+// "time"
+//
+// "github.com/aws/aws-sdk-go/aws"
+// "github.com/aws/aws-sdk-go/aws/awserr"
+// "github.com/aws/aws-sdk-go/aws/request"
+// "github.com/aws/aws-sdk-go/aws/session"
+// "github.com/aws/aws-sdk-go/service/s3"
+// )
+//
+// // Uploads a file to S3 given a bucket and object key. Also takes a duration
+// // value to terminate the update if it doesn't complete within that time.
+// //
+// // The AWS Region needs to be provided in the AWS shared config or on the
+// // environment variable as `AWS_REGION`. Credentials also must be provided
+// // Will default to shared config file, but can load from environment if provided.
+// //
+// // Usage:
+// // # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail
+// // go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt
+// func main() {
+// var bucket, key string
+// var timeout time.Duration
+//
+// flag.StringVar(&bucket, "b", "", "Bucket name.")
+// flag.StringVar(&key, "k", "", "Object key name.")
+// flag.DurationVar(&timeout, "d", 0, "Upload timeout.")
+// flag.Parse()
+//
+// // All clients require a Session. The Session provides the client with
+// // shared configuration such as region, endpoint, and credentials. A
+// // Session should be shared where possible to take advantage of
+// // configuration and credential caching. See the session package for
+// // more information.
+// sess := session.Must(session.NewSession())
+//
+// // Create a new instance of the service's client with a Session.
+// // Optional aws.Config values can also be provided as variadic arguments
+// // to the New function. This option allows you to provide service
+// // specific configuration.
+// svc := s3.New(sess)
+//
+// // Create a context with a timeout that will abort the upload if it takes
+// // more than the passed in timeout.
+// ctx := context.Background()
+// var cancelFn func()
+// if timeout > 0 {
+// ctx, cancelFn = context.WithTimeout(ctx, timeout)
+// }
+// // Ensure the context is canceled to prevent leaking.
+// // See context package for more information, https://golang.org/pkg/context/
+// defer cancelFn()
+//
+// // Uploads the object to S3. The Context will interrupt the request if the
+// // timeout expires.
+// _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{
+// Bucket: aws.String(bucket),
+// Key: aws.String(key),
+// Body: os.Stdin,
+// })
+// if err != nil {
+// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode {
+// // If the SDK can determine the request or retry delay was canceled
+// // by a context the CanceledErrorCode error code will be returned.
+// fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err)
+// } else {
+// fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err)
+// }
+// os.Exit(1)
+// }
+//
+// fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key)
+// }
+package sdk
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
new file mode 100644
index 000000000..ebcbc2b40
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
@@ -0,0 +1,40 @@
+package shareddefaults
+
+import (
+ "os"
+ "path/filepath"
+ "runtime"
+)
+
+// SharedCredentialsFilename returns the SDK's default file path
+// for the shared credentials file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/credentials
+// - Windows: %USERPROFILE%\.aws\credentials
+func SharedCredentialsFilename() string {
+ return filepath.Join(UserHomeDir(), ".aws", "credentials")
+}
+
+// SharedConfigFilename returns the SDK's default file path for
+// the shared config file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/config
+// - Windows: %USERPROFILE%\.aws\config
+func SharedConfigFilename() string {
+ return filepath.Join(UserHomeDir(), ".aws", "config")
+}
+
+// UserHomeDir returns the home directory for the user the process is
+// running under.
+func UserHomeDir() string {
+ if runtime.GOOS == "windows" { // Windows
+ return os.Getenv("USERPROFILE")
+ }
+
+ // *nix
+ return os.Getenv("HOME")
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go
deleted file mode 100644
index b4ad7405c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go
+++ /dev/null
@@ -1,70 +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 (
- "fmt"
- "regexp"
- "strings"
-)
-
-// NormalizeEndpoint takes and endpoint and service API information to return a
-// normalized endpoint and signing region. If the endpoint is not an empty string
-// the service name and region will be used to look up the service's API endpoint.
-// If the endpoint is provided the scheme will be added if it is not present.
-func NormalizeEndpoint(endpoint, serviceName, region string, disableSSL, useDualStack bool) (normEndpoint, signingRegion string) {
- if endpoint == "" {
- return EndpointForRegion(serviceName, region, disableSSL, useDualStack)
- }
-
- return AddScheme(endpoint, disableSSL), ""
-}
-
-// 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, disableSSL, useDualStack bool) (endpoint, signingRegion string) {
- dualStackField := ""
- if useDualStack {
- dualStackField = "/dualstack"
- }
-
- derivedKeys := []string{
- region + "/" + svcName + dualStackField,
- region + "/*" + dualStackField,
- "*/" + svcName + dualStackField,
- "*/*" + dualStackField,
- }
-
- 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
- break
- }
- }
-
- return AddScheme(endpoint, disableSSL), signingRegion
-}
-
-// Regular expression to determine if the endpoint string is prefixed with a scheme.
-var schemeRE = regexp.MustCompile("^([^:]+)://")
-
-// AddScheme adds the HTTP or HTTPS schemes to a endpoint URL if there is no
-// scheme. If disableSSL is true HTTP will be added instead of the default HTTPS.
-func AddScheme(endpoint string, disableSSL bool) string {
- if endpoint != "" && !schemeRE.MatchString(endpoint) {
- scheme := "https"
- if disableSSL {
- scheme = "http"
- }
- endpoint = fmt.Sprintf("%s://%s", scheme, endpoint)
- }
-
- return endpoint
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json
deleted file mode 100644
index c5bf3c7c3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "version": 2,
- "endpoints": {
- "*/*": {
- "endpoint": "{service}.{region}.amazonaws.com"
- },
- "cn-north-1/*": {
- "endpoint": "{service}.{region}.amazonaws.com.cn",
- "signatureVersion": "v4"
- },
- "cn-north-1/ec2metadata": {
- "endpoint": "http://169.254.169.254/latest"
- },
- "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"
- },
- "us-gov-west-1/ec2metadata": {
- "endpoint": "http://169.254.169.254/latest"
- },
- "*/cloudfront": {
- "endpoint": "cloudfront.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/cloudsearchdomain": {
- "endpoint": "",
- "signingRegion": "us-east-1"
- },
- "*/data.iot": {
- "endpoint": "",
- "signingRegion": "us-east-1"
- },
- "*/ec2metadata": {
- "endpoint": "http://169.254.169.254/latest"
- },
- "*/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"
- },
- "*/waf": {
- "endpoint": "waf.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "us-east-1/sdb": {
- "endpoint": "sdb.amazonaws.com",
- "signingRegion": "us-east-1"
- },
- "*/s3": {
- "endpoint": "s3-{region}.amazonaws.com"
- },
- "*/s3/dualstack": {
- "endpoint": "s3.dualstack.{region}.amazonaws.com"
- },
- "us-east-1/s3": {
- "endpoint": "s3.amazonaws.com"
- },
- "eu-central-1/s3": {
- "endpoint": "{service}.{region}.amazonaws.com"
- }
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go b/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go
deleted file mode 100644
index a81d158c3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go
+++ /dev/null
@@ -1,91 +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",
- },
- "*/data.iot": {
- Endpoint: "",
- SigningRegion: "us-east-1",
- },
- "*/ec2metadata": {
- Endpoint: "http://169.254.169.254/latest",
- },
- "*/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",
- },
- "*/s3": {
- Endpoint: "s3-{region}.amazonaws.com",
- },
- "*/s3/dualstack": {
- Endpoint: "s3.dualstack.{region}.amazonaws.com",
- },
- "*/sts": {
- Endpoint: "sts.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "*/waf": {
- Endpoint: "waf.amazonaws.com",
- SigningRegion: "us-east-1",
- },
- "cn-north-1/*": {
- Endpoint: "{service}.{region}.amazonaws.com.cn",
- },
- "cn-north-1/ec2metadata": {
- Endpoint: "http://169.254.169.254/latest",
- },
- "eu-central-1/s3": {
- Endpoint: "{service}.{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/ec2metadata": {
- Endpoint: "http://169.254.169.254/latest",
- },
- "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",
- },
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
index f434ab7cb..524ca952a 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
@@ -80,7 +80,6 @@ func (q *queryParser) parseStruct(v url.Values, value reflect.Value, prefix stri
continue
}
-
if protocol.CanSetIdempotencyToken(value.Field(i), field) {
token := protocol.GetIdempotencyToken()
elemValue = reflect.ValueOf(token)
@@ -124,7 +123,11 @@ func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string
// check for unflattened list member
if !q.isEC2 && tag.Get("flattened") == "" {
- prefix += ".member"
+ if listName := tag.Get("locationNameList"); listName == "" {
+ prefix += ".member"
+ } else {
+ prefix += "." + listName
+ }
}
for i := 0; i < value.Len(); i++ {
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
index 20a41d462..716183564 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
@@ -4,6 +4,7 @@ package rest
import (
"bytes"
"encoding/base64"
+ "encoding/json"
"fmt"
"io"
"net/http"
@@ -82,8 +83,12 @@ func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bo
if name == "" {
name = field.Name
}
- if m.Kind() == reflect.Ptr {
+ if kind := m.Kind(); kind == reflect.Ptr {
m = m.Elem()
+ } else if kind == reflect.Interface {
+ if !m.Elem().IsValid() {
+ continue
+ }
}
if !m.IsValid() {
continue
@@ -95,16 +100,16 @@ func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bo
var err error
switch field.Tag.Get("location") {
case "headers": // header maps
- err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag.Get("locationName"))
+ err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag)
case "header":
- err = buildHeader(&r.HTTPRequest.Header, m, name)
+ err = buildHeader(&r.HTTPRequest.Header, m, name, field.Tag)
case "uri":
- err = buildURI(r.HTTPRequest.URL, m, name)
+ err = buildURI(r.HTTPRequest.URL, m, name, field.Tag)
case "querystring":
- err = buildQueryString(query, m, name)
+ err = buildQueryString(query, m, name, field.Tag)
default:
if buildGETQuery {
- err = buildQueryString(query, m, name)
+ err = buildQueryString(query, m, name, field.Tag)
}
}
r.Error = err
@@ -145,8 +150,8 @@ func buildBody(r *request.Request, v reflect.Value) {
}
}
-func buildHeader(header *http.Header, v reflect.Value, name string) error {
- str, err := convertType(v)
+func buildHeader(header *http.Header, v reflect.Value, name string, tag reflect.StructTag) error {
+ str, err := convertType(v, tag)
if err == errValueNotSet {
return nil
} else if err != nil {
@@ -158,9 +163,10 @@ func buildHeader(header *http.Header, v reflect.Value, name string) error {
return nil
}
-func buildHeaderMap(header *http.Header, v reflect.Value, prefix string) error {
+func buildHeaderMap(header *http.Header, v reflect.Value, tag reflect.StructTag) error {
+ prefix := tag.Get("locationName")
for _, key := range v.MapKeys() {
- str, err := convertType(v.MapIndex(key))
+ str, err := convertType(v.MapIndex(key), tag)
if err == errValueNotSet {
continue
} else if err != nil {
@@ -173,8 +179,8 @@ func buildHeaderMap(header *http.Header, v reflect.Value, prefix string) error {
return nil
}
-func buildURI(u *url.URL, v reflect.Value, name string) error {
- value, err := convertType(v)
+func buildURI(u *url.URL, v reflect.Value, name string, tag reflect.StructTag) error {
+ value, err := convertType(v, tag)
if err == errValueNotSet {
return nil
} else if err != nil {
@@ -190,7 +196,7 @@ func buildURI(u *url.URL, v reflect.Value, name string) error {
return nil
}
-func buildQueryString(query url.Values, v reflect.Value, name string) error {
+func buildQueryString(query url.Values, v reflect.Value, name string, tag reflect.StructTag) error {
switch value := v.Interface().(type) {
case []*string:
for _, item := range value {
@@ -207,7 +213,7 @@ func buildQueryString(query url.Values, v reflect.Value, name string) error {
}
}
default:
- str, err := convertType(v)
+ str, err := convertType(v, tag)
if err == errValueNotSet {
return nil
} else if err != nil {
@@ -246,7 +252,7 @@ func EscapePath(path string, encodeSep bool) string {
return buf.String()
}
-func convertType(v reflect.Value) (string, error) {
+func convertType(v reflect.Value, tag reflect.StructTag) (string, error) {
v = reflect.Indirect(v)
if !v.IsValid() {
return "", errValueNotSet
@@ -266,6 +272,16 @@ func convertType(v reflect.Value) (string, error) {
str = strconv.FormatFloat(value, 'f', -1, 64)
case time.Time:
str = value.UTC().Format(RFC822)
+ case aws.JSONValue:
+ b, err := json.Marshal(value)
+ if err != nil {
+ return "", err
+ }
+ if tag.Get("location") == "header" {
+ str = base64.StdEncoding.EncodeToString(b)
+ } else {
+ str = string(b)
+ }
default:
err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
return "", err
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
index 9c00921c0..7a779ee22 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
@@ -3,6 +3,7 @@ package rest
import (
"bytes"
"encoding/base64"
+ "encoding/json"
"fmt"
"io"
"io/ioutil"
@@ -12,6 +13,7 @@ import (
"strings"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
)
@@ -111,7 +113,7 @@ func unmarshalLocationElements(r *request.Request, v reflect.Value) {
case "statusCode":
unmarshalStatusCode(m, r.HTTPResponse.StatusCode)
case "header":
- err := unmarshalHeader(m, r.HTTPResponse.Header.Get(name))
+ err := unmarshalHeader(m, r.HTTPResponse.Header.Get(name), field.Tag)
if err != nil {
r.Error = awserr.New("SerializationError", "failed to decode REST response", err)
break
@@ -158,8 +160,13 @@ func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string) err
return nil
}
-func unmarshalHeader(v reflect.Value, header string) error {
- if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) {
+func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) error {
+ isJSONValue := tag.Get("type") == "jsonvalue"
+ if isJSONValue {
+ if len(header) == 0 {
+ return nil
+ }
+ } else if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) {
return nil
}
@@ -196,6 +203,22 @@ func unmarshalHeader(v reflect.Value, header string) error {
return err
}
v.Set(reflect.ValueOf(&t))
+ case aws.JSONValue:
+ b := []byte(header)
+ var err error
+ if tag.Get("location") == "header" {
+ b, err = base64.StdEncoding.DecodeString(header)
+ if err != nil {
+ return err
+ }
+ }
+
+ m := aws.JSONValue{}
+ err = json.Unmarshal(b, &m)
+ if err != nil {
+ return err
+ }
+ v.Set(reflect.ValueOf(m))
default:
err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
return err
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
index c74c19196..7091b456d 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
@@ -131,7 +131,6 @@ func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag refl
continue
}
-
mTag := field.Tag
if mTag.Get("location") != "" { // skip non-body members
continue
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
index 64b6ddd3e..87584628a 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
@@ -15,7 +15,10 @@ import (
// 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)
+ n, err := XMLToStruct(d, nil)
+ if err != nil {
+ return err
+ }
if n.Children != nil {
for _, root := range n.Children {
for _, c := range root {
@@ -23,7 +26,7 @@ func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
c = wrappedChild[0] // pull out wrapped element
}
- err := parse(reflect.ValueOf(v), c, "")
+ err = parse(reflect.ValueOf(v), c, "")
if err != nil {
if err == io.EOF {
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
index 3112512a2..3e970b629 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
@@ -40,11 +40,16 @@ 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
+ if err == io.EOF {
+ break
+ } else {
+ return out, err
+ }
+ }
+
+ if tok == nil {
+ break
}
switch typed := tok.(type) {
diff --git a/vendor/github.com/aws/aws-sdk-go/private/waiter/waiter.go b/vendor/github.com/aws/aws-sdk-go/private/waiter/waiter.go
deleted file mode 100644
index b51e9449c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/waiter/waiter.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package waiter
-
-import (
- "fmt"
- "reflect"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// A Config provides a collection of configuration values to setup a generated
-// waiter code with.
-type Config struct {
- Name string
- Delay int
- MaxAttempts int
- Operation string
- Acceptors []WaitAcceptor
-}
-
-// A WaitAcceptor provides the information needed to wait for an API operation
-// to complete.
-type WaitAcceptor struct {
- Expected interface{}
- Matcher string
- State string
- Argument string
-}
-
-// A Waiter provides waiting for an operation to complete.
-type Waiter struct {
- Config
- Client interface{}
- Input interface{}
-}
-
-// Wait waits for an operation to complete, expire max attempts, or fail. Error
-// is returned if the operation fails.
-func (w *Waiter) Wait() error {
- client := reflect.ValueOf(w.Client)
- in := reflect.ValueOf(w.Input)
- method := client.MethodByName(w.Config.Operation + "Request")
-
- for i := 0; i < w.MaxAttempts; i++ {
- res := method.Call([]reflect.Value{in})
- req := res[0].Interface().(*request.Request)
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Waiter"))
-
- err := req.Send()
- for _, a := range w.Acceptors {
- result := false
- var vals []interface{}
- switch a.Matcher {
- case "pathAll", "path":
- // Require all matches to be equal for result to match
- vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
- if len(vals) == 0 {
- break
- }
- result = true
- for _, val := range vals {
- if !awsutil.DeepEqual(val, a.Expected) {
- result = false
- break
- }
- }
- case "pathAny":
- // Only a single match needs to equal for the result to match
- vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
- for _, val := range vals {
- if awsutil.DeepEqual(val, a.Expected) {
- result = true
- break
- }
- }
- case "status":
- s := a.Expected.(int)
- result = s == req.HTTPResponse.StatusCode
- case "error":
- if aerr, ok := err.(awserr.Error); ok {
- result = aerr.Code() == a.Expected.(string)
- }
- case "pathList":
- // ignored matcher
- default:
- logf(client, "WARNING: Waiter for %s encountered unexpected matcher: %s",
- w.Config.Operation, a.Matcher)
- }
-
- if !result {
- // If there was no matching result found there is nothing more to do
- // for this response, retry the request.
- continue
- }
-
- switch a.State {
- case "success":
- // waiter completed
- return nil
- case "failure":
- // Waiter failure state triggered
- return awserr.New("ResourceNotReady",
- fmt.Sprintf("failed waiting for successful resource state"), err)
- case "retry":
- // clear the error and retry the operation
- err = nil
- default:
- logf(client, "WARNING: Waiter for %s encountered unexpected state: %s",
- w.Config.Operation, a.State)
- }
- }
- if err != nil {
- return err
- }
-
- time.Sleep(time.Second * time.Duration(w.Delay))
- }
-
- return awserr.New("ResourceNotReady",
- fmt.Sprintf("exceeded %d wait attempts", w.MaxAttempts), nil)
-}
-
-func logf(client reflect.Value, msg string, args ...interface{}) {
- cfgVal := client.FieldByName("Config")
- if !cfgVal.IsValid() {
- return
- }
- if cfg, ok := cfgVal.Interface().(*aws.Config); ok && cfg.Logger != nil {
- cfg.Logger.Log(fmt.Sprintf(msg, args...))
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/sdk.go b/vendor/github.com/aws/aws-sdk-go/sdk.go
deleted file mode 100644
index afa465a22..000000000
--- a/vendor/github.com/aws/aws-sdk-go/sdk.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// Package sdk is the official AWS SDK for the Go programming language.
-//
-// See our Developer Guide for information for on getting started and using
-// the SDK.
-//
-// https://github.com/aws/aws-sdk-go/wiki
-package sdk
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
index 83191e2d7..bd13ab77e 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
@@ -1,12 +1,12 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-// Package ec2 provides a client for Amazon Elastic Compute Cloud.
package ec2
import (
"fmt"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
@@ -70,8 +70,23 @@ func (c *EC2) AcceptReservedInstancesExchangeQuoteRequest(input *AcceptReservedI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote
func (c *EC2) AcceptReservedInstancesExchangeQuote(input *AcceptReservedInstancesExchangeQuoteInput) (*AcceptReservedInstancesExchangeQuoteOutput, error) {
req, out := c.AcceptReservedInstancesExchangeQuoteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AcceptReservedInstancesExchangeQuoteWithContext is the same as AcceptReservedInstancesExchangeQuote with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AcceptReservedInstancesExchangeQuote for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AcceptReservedInstancesExchangeQuoteWithContext(ctx aws.Context, input *AcceptReservedInstancesExchangeQuoteInput, opts ...request.Option) (*AcceptReservedInstancesExchangeQuoteOutput, error) {
+ req, out := c.AcceptReservedInstancesExchangeQuoteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection"
@@ -121,8 +136,8 @@ func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectio
//
// 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.
+// of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding
+// VPC peering connection requests.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -133,8 +148,23 @@ func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection
func (c *EC2) AcceptVpcPeeringConnection(input *AcceptVpcPeeringConnectionInput) (*AcceptVpcPeeringConnectionOutput, error) {
req, out := c.AcceptVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AcceptVpcPeeringConnectionWithContext is the same as AcceptVpcPeeringConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AcceptVpcPeeringConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AcceptVpcPeeringConnectionWithContext(ctx aws.Context, input *AcceptVpcPeeringConnectionInput, opts ...request.Option) (*AcceptVpcPeeringConnectionOutput, error) {
+ req, out := c.AcceptVpcPeeringConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAllocateAddress = "AllocateAddress"
@@ -197,8 +227,23 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress
func (c *EC2) AllocateAddress(input *AllocateAddressInput) (*AllocateAddressOutput, error) {
req, out := c.AllocateAddressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AllocateAddressWithContext is the same as AllocateAddress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AllocateAddress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AllocateAddressWithContext(ctx aws.Context, input *AllocateAddressInput, opts ...request.Option) (*AllocateAddressOutput, error) {
+ req, out := c.AllocateAddressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAllocateHosts = "AllocateHosts"
@@ -259,8 +304,23 @@ func (c *EC2) AllocateHostsRequest(input *AllocateHostsInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts
func (c *EC2) AllocateHosts(input *AllocateHostsInput) (*AllocateHostsOutput, error) {
req, out := c.AllocateHostsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AllocateHostsWithContext is the same as AllocateHosts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AllocateHosts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AllocateHostsWithContext(ctx aws.Context, input *AllocateHostsInput, opts ...request.Option) (*AllocateHostsOutput, error) {
+ req, out := c.AllocateHostsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssignIpv6Addresses = "AssignIpv6Addresses"
@@ -326,8 +386,23 @@ func (c *EC2) AssignIpv6AddressesRequest(input *AssignIpv6AddressesInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses
func (c *EC2) AssignIpv6Addresses(input *AssignIpv6AddressesInput) (*AssignIpv6AddressesOutput, error) {
req, out := c.AssignIpv6AddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssignIpv6AddressesWithContext is the same as AssignIpv6Addresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssignIpv6Addresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssignIpv6AddressesWithContext(ctx aws.Context, input *AssignIpv6AddressesInput, opts ...request.Option) (*AssignIpv6AddressesOutput, error) {
+ req, out := c.AssignIpv6AddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses"
@@ -398,8 +473,23 @@ func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses
func (c *EC2) AssignPrivateIpAddresses(input *AssignPrivateIpAddressesInput) (*AssignPrivateIpAddressesOutput, error) {
req, out := c.AssignPrivateIpAddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssignPrivateIpAddressesWithContext is the same as AssignPrivateIpAddresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssignPrivateIpAddresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssignPrivateIpAddressesWithContext(ctx aws.Context, input *AssignPrivateIpAddressesInput, opts ...request.Option) (*AssignPrivateIpAddressesOutput, error) {
+ req, out := c.AssignPrivateIpAddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateAddress = "AssociateAddress"
@@ -455,12 +545,17 @@ func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *reques
//
// [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.
+// instance and associated with the specified instance. If you associate an
+// Elastic IP address with an instance that has an existing Elastic IP address,
+// the existing address is disassociated from the instance, but remains allocated
+// to your account.
//
// [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.
+// interface, you get an error unless you allow reassociation. You cannot associate
+// an Elastic IP address with an instance or network interface that has an existing
+// Elastic IP address.
//
// This is an idempotent operation. If you perform the operation more than once,
// Amazon EC2 doesn't return an error, and you may be charged for each time
@@ -476,8 +571,23 @@ func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress
func (c *EC2) AssociateAddress(input *AssociateAddressInput) (*AssociateAddressOutput, error) {
req, out := c.AssociateAddressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateAddressWithContext is the same as AssociateAddress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateAddress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateAddressWithContext(ctx aws.Context, input *AssociateAddressInput, opts ...request.Option) (*AssociateAddressOutput, error) {
+ req, out := c.AssociateAddressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateDhcpOptions = "AssociateDhcpOptions"
@@ -549,8 +659,23 @@ func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions
func (c *EC2) AssociateDhcpOptions(input *AssociateDhcpOptionsInput) (*AssociateDhcpOptionsOutput, error) {
req, out := c.AssociateDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateDhcpOptionsWithContext is the same as AssociateDhcpOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateDhcpOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateDhcpOptionsWithContext(ctx aws.Context, input *AssociateDhcpOptionsInput, opts ...request.Option) (*AssociateDhcpOptionsOutput, error) {
+ req, out := c.AssociateDhcpOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile"
@@ -610,8 +735,23 @@ func (c *EC2) AssociateIamInstanceProfileRequest(input *AssociateIamInstanceProf
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile
func (c *EC2) AssociateIamInstanceProfile(input *AssociateIamInstanceProfileInput) (*AssociateIamInstanceProfileOutput, error) {
req, out := c.AssociateIamInstanceProfileRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateIamInstanceProfileWithContext is the same as AssociateIamInstanceProfile with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateIamInstanceProfile for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateIamInstanceProfileWithContext(ctx aws.Context, input *AssociateIamInstanceProfileInput, opts ...request.Option) (*AssociateIamInstanceProfileOutput, error) {
+ req, out := c.AssociateIamInstanceProfileRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateRouteTable = "AssociateRouteTable"
@@ -677,8 +817,23 @@ func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable
func (c *EC2) AssociateRouteTable(input *AssociateRouteTableInput) (*AssociateRouteTableOutput, error) {
req, out := c.AssociateRouteTableRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateRouteTableWithContext is the same as AssociateRouteTable with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateRouteTable for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateRouteTableWithContext(ctx aws.Context, input *AssociateRouteTableInput, opts ...request.Option) (*AssociateRouteTableOutput, error) {
+ req, out := c.AssociateRouteTableRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock"
@@ -739,8 +894,23 @@ func (c *EC2) AssociateSubnetCidrBlockRequest(input *AssociateSubnetCidrBlockInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock
func (c *EC2) AssociateSubnetCidrBlock(input *AssociateSubnetCidrBlockInput) (*AssociateSubnetCidrBlockOutput, error) {
req, out := c.AssociateSubnetCidrBlockRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateSubnetCidrBlockWithContext is the same as AssociateSubnetCidrBlock with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateSubnetCidrBlock for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateSubnetCidrBlockWithContext(ctx aws.Context, input *AssociateSubnetCidrBlockInput, opts ...request.Option) (*AssociateSubnetCidrBlockOutput, error) {
+ req, out := c.AssociateSubnetCidrBlockRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock"
@@ -800,8 +970,23 @@ func (c *EC2) AssociateVpcCidrBlockRequest(input *AssociateVpcCidrBlockInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock
func (c *EC2) AssociateVpcCidrBlock(input *AssociateVpcCidrBlockInput) (*AssociateVpcCidrBlockOutput, error) {
req, out := c.AssociateVpcCidrBlockRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssociateVpcCidrBlockWithContext is the same as AssociateVpcCidrBlock with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssociateVpcCidrBlock for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AssociateVpcCidrBlockWithContext(ctx aws.Context, input *AssociateVpcCidrBlockInput, opts ...request.Option) (*AssociateVpcCidrBlockOutput, error) {
+ req, out := c.AssociateVpcCidrBlockRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachClassicLinkVpc = "AttachClassicLinkVpc"
@@ -871,8 +1056,23 @@ func (c *EC2) AttachClassicLinkVpcRequest(input *AttachClassicLinkVpcInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc
func (c *EC2) AttachClassicLinkVpc(input *AttachClassicLinkVpcInput) (*AttachClassicLinkVpcOutput, error) {
req, out := c.AttachClassicLinkVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachClassicLinkVpcWithContext is the same as AttachClassicLinkVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachClassicLinkVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachClassicLinkVpcWithContext(ctx aws.Context, input *AttachClassicLinkVpcInput, opts ...request.Option) (*AttachClassicLinkVpcOutput, error) {
+ req, out := c.AttachClassicLinkVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachInternetGateway = "AttachInternetGateway"
@@ -935,8 +1135,23 @@ func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway
func (c *EC2) AttachInternetGateway(input *AttachInternetGatewayInput) (*AttachInternetGatewayOutput, error) {
req, out := c.AttachInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachInternetGatewayWithContext is the same as AttachInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachInternetGatewayWithContext(ctx aws.Context, input *AttachInternetGatewayInput, opts ...request.Option) (*AttachInternetGatewayOutput, error) {
+ req, out := c.AttachInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachNetworkInterface = "AttachNetworkInterface"
@@ -995,8 +1210,23 @@ func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface
func (c *EC2) AttachNetworkInterface(input *AttachNetworkInterfaceInput) (*AttachNetworkInterfaceOutput, error) {
req, out := c.AttachNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachNetworkInterfaceWithContext is the same as AttachNetworkInterface with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachNetworkInterface for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachNetworkInterfaceWithContext(ctx aws.Context, input *AttachNetworkInterfaceInput, opts ...request.Option) (*AttachNetworkInterfaceOutput, error) {
+ req, out := c.AttachNetworkInterfaceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachVolume = "AttachVolume"
@@ -1084,8 +1314,23 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume
func (c *EC2) AttachVolume(input *AttachVolumeInput) (*VolumeAttachment, error) {
req, out := c.AttachVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachVolumeWithContext is the same as AttachVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachVolumeWithContext(ctx aws.Context, input *AttachVolumeInput, opts ...request.Option) (*VolumeAttachment, error) {
+ req, out := c.AttachVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAttachVpnGateway = "AttachVpnGateway"
@@ -1133,8 +1378,11 @@ func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *reques
// AttachVpnGateway API operation for Amazon Elastic Compute Cloud.
//
-// 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)
+// Attaches a virtual private gateway to a VPC. You can attach one virtual private
+// gateway to one VPC at a time.
+//
+// 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -1146,8 +1394,23 @@ func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) {
req, out := c.AttachVpnGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AttachVpnGatewayWithContext is the same as AttachVpnGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AttachVpnGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AttachVpnGatewayWithContext(ctx aws.Context, input *AttachVpnGatewayInput, opts ...request.Option) (*AttachVpnGatewayOutput, error) {
+ req, out := c.AttachVpnGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress"
@@ -1224,8 +1487,23 @@ func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupE
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress
func (c *EC2) AuthorizeSecurityGroupEgress(input *AuthorizeSecurityGroupEgressInput) (*AuthorizeSecurityGroupEgressOutput, error) {
req, out := c.AuthorizeSecurityGroupEgressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AuthorizeSecurityGroupEgressWithContext is the same as AuthorizeSecurityGroupEgress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AuthorizeSecurityGroupEgress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AuthorizeSecurityGroupEgressWithContext(ctx aws.Context, input *AuthorizeSecurityGroupEgressInput, opts ...request.Option) (*AuthorizeSecurityGroupEgressOutput, error) {
+ req, out := c.AuthorizeSecurityGroupEgressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress"
@@ -1302,8 +1580,23 @@ func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroup
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress
func (c *EC2) AuthorizeSecurityGroupIngress(input *AuthorizeSecurityGroupIngressInput) (*AuthorizeSecurityGroupIngressOutput, error) {
req, out := c.AuthorizeSecurityGroupIngressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AuthorizeSecurityGroupIngressWithContext is the same as AuthorizeSecurityGroupIngress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AuthorizeSecurityGroupIngress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AuthorizeSecurityGroupIngressWithContext(ctx aws.Context, input *AuthorizeSecurityGroupIngressInput, opts ...request.Option) (*AuthorizeSecurityGroupIngressOutput, error) {
+ req, out := c.AuthorizeSecurityGroupIngressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opBundleInstance = "BundleInstance"
@@ -1370,8 +1663,23 @@ func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance
func (c *EC2) BundleInstance(input *BundleInstanceInput) (*BundleInstanceOutput, error) {
req, out := c.BundleInstanceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// BundleInstanceWithContext is the same as BundleInstance with the addition of
+// the ability to pass a context and additional request options.
+//
+// See BundleInstance for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) BundleInstanceWithContext(ctx aws.Context, input *BundleInstanceInput, opts ...request.Option) (*BundleInstanceOutput, error) {
+ req, out := c.BundleInstanceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelBundleTask = "CancelBundleTask"
@@ -1430,8 +1738,23 @@ func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask
func (c *EC2) CancelBundleTask(input *CancelBundleTaskInput) (*CancelBundleTaskOutput, error) {
req, out := c.CancelBundleTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelBundleTaskWithContext is the same as CancelBundleTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelBundleTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelBundleTaskWithContext(ctx aws.Context, input *CancelBundleTaskInput, opts ...request.Option) (*CancelBundleTaskOutput, error) {
+ req, out := c.CancelBundleTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelConversionTask = "CancelConversionTask"
@@ -1499,8 +1822,23 @@ func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask
func (c *EC2) CancelConversionTask(input *CancelConversionTaskInput) (*CancelConversionTaskOutput, error) {
req, out := c.CancelConversionTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelConversionTaskWithContext is the same as CancelConversionTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelConversionTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelConversionTaskWithContext(ctx aws.Context, input *CancelConversionTaskInput, opts ...request.Option) (*CancelConversionTaskOutput, error) {
+ req, out := c.CancelConversionTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelExportTask = "CancelExportTask"
@@ -1564,8 +1902,23 @@ func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask
func (c *EC2) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) {
req, out := c.CancelExportTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelExportTaskWithContext is the same as CancelExportTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelExportTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelExportTaskWithContext(ctx aws.Context, input *CancelExportTaskInput, opts ...request.Option) (*CancelExportTaskOutput, error) {
+ req, out := c.CancelExportTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelImportTask = "CancelImportTask"
@@ -1624,8 +1977,23 @@ func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask
func (c *EC2) CancelImportTask(input *CancelImportTaskInput) (*CancelImportTaskOutput, error) {
req, out := c.CancelImportTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelImportTaskWithContext is the same as CancelImportTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelImportTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelImportTaskWithContext(ctx aws.Context, input *CancelImportTaskInput, opts ...request.Option) (*CancelImportTaskOutput, error) {
+ req, out := c.CancelImportTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelReservedInstancesListing = "CancelReservedInstancesListing"
@@ -1688,8 +2056,23 @@ func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstanc
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing
func (c *EC2) CancelReservedInstancesListing(input *CancelReservedInstancesListingInput) (*CancelReservedInstancesListingOutput, error) {
req, out := c.CancelReservedInstancesListingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelReservedInstancesListingWithContext is the same as CancelReservedInstancesListing with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelReservedInstancesListing for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelReservedInstancesListingWithContext(ctx aws.Context, input *CancelReservedInstancesListingInput, opts ...request.Option) (*CancelReservedInstancesListingOutput, error) {
+ req, out := c.CancelReservedInstancesListingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelSpotFleetRequests = "CancelSpotFleetRequests"
@@ -1755,8 +2138,23 @@ func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests
func (c *EC2) CancelSpotFleetRequests(input *CancelSpotFleetRequestsInput) (*CancelSpotFleetRequestsOutput, error) {
req, out := c.CancelSpotFleetRequestsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelSpotFleetRequestsWithContext is the same as CancelSpotFleetRequests with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelSpotFleetRequests for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelSpotFleetRequestsWithContext(ctx aws.Context, input *CancelSpotFleetRequestsInput, opts ...request.Option) (*CancelSpotFleetRequestsOutput, error) {
+ req, out := c.CancelSpotFleetRequestsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests"
@@ -1823,8 +2221,23 @@ func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequest
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests
func (c *EC2) CancelSpotInstanceRequests(input *CancelSpotInstanceRequestsInput) (*CancelSpotInstanceRequestsOutput, error) {
req, out := c.CancelSpotInstanceRequestsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CancelSpotInstanceRequestsWithContext is the same as CancelSpotInstanceRequests with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CancelSpotInstanceRequests for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CancelSpotInstanceRequestsWithContext(ctx aws.Context, input *CancelSpotInstanceRequestsInput, opts ...request.Option) (*CancelSpotInstanceRequestsOutput, error) {
+ req, out := c.CancelSpotInstanceRequestsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opConfirmProductInstance = "ConfirmProductInstance"
@@ -1886,8 +2299,23 @@ func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance
func (c *EC2) ConfirmProductInstance(input *ConfirmProductInstanceInput) (*ConfirmProductInstanceOutput, error) {
req, out := c.ConfirmProductInstanceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ConfirmProductInstanceWithContext is the same as ConfirmProductInstance with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ConfirmProductInstance for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ConfirmProductInstanceWithContext(ctx aws.Context, input *ConfirmProductInstanceInput, opts ...request.Option) (*ConfirmProductInstanceOutput, error) {
+ req, out := c.ConfirmProductInstanceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCopyImage = "CopyImage"
@@ -1939,7 +2367,8 @@ func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, out
// region. You specify the destination region by using its endpoint when making
// the request.
//
-// For more information, see Copying AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html)
+// For more information about the prerequisites and limits when copying an AMI,
+// see Copying an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -1951,8 +2380,23 @@ func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, out
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage
func (c *EC2) CopyImage(input *CopyImageInput) (*CopyImageOutput, error) {
req, out := c.CopyImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CopyImageWithContext is the same as CopyImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CopyImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CopyImageWithContext(ctx aws.Context, input *CopyImageInput, opts ...request.Option) (*CopyImageOutput, error) {
+ req, out := c.CopyImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCopySnapshot = "CopySnapshot"
@@ -2030,8 +2474,23 @@ func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot
func (c *EC2) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) {
req, out := c.CopySnapshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CopySnapshotWithContext is the same as CopySnapshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CopySnapshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CopySnapshotWithContext(ctx aws.Context, input *CopySnapshotInput, opts ...request.Option) (*CopySnapshotOutput, error) {
+ req, out := c.CopySnapshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateCustomerGateway = "CreateCustomerGateway"
@@ -2114,8 +2573,23 @@ func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway
func (c *EC2) CreateCustomerGateway(input *CreateCustomerGatewayInput) (*CreateCustomerGatewayOutput, error) {
req, out := c.CreateCustomerGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateCustomerGatewayWithContext is the same as CreateCustomerGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateCustomerGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateCustomerGatewayWithContext(ctx aws.Context, input *CreateCustomerGatewayInput, opts ...request.Option) (*CreateCustomerGatewayOutput, error) {
+ req, out := c.CreateCustomerGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateDhcpOptions = "CreateDhcpOptions"
@@ -2176,16 +2650,16 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ
// to receive a custom DNS hostname as specified in domain-name, you must
// set domain-name-servers to a custom DNS server.
//
-// * 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"). This
-// value is used to complete unqualified DNS hostnames. 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.
+// * 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). This value
+// is used to complete unqualified DNS hostnames. 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.
@@ -2213,8 +2687,23 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions
func (c *EC2) CreateDhcpOptions(input *CreateDhcpOptionsInput) (*CreateDhcpOptionsOutput, error) {
req, out := c.CreateDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateDhcpOptionsWithContext is the same as CreateDhcpOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateDhcpOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateDhcpOptionsWithContext(ctx aws.Context, input *CreateDhcpOptionsInput, opts ...request.Option) (*CreateDhcpOptionsOutput, error) {
+ req, out := c.CreateDhcpOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway"
@@ -2276,8 +2765,23 @@ func (c *EC2) CreateEgressOnlyInternetGatewayRequest(input *CreateEgressOnlyInte
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway
func (c *EC2) CreateEgressOnlyInternetGateway(input *CreateEgressOnlyInternetGatewayInput) (*CreateEgressOnlyInternetGatewayOutput, error) {
req, out := c.CreateEgressOnlyInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateEgressOnlyInternetGatewayWithContext is the same as CreateEgressOnlyInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateEgressOnlyInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateEgressOnlyInternetGatewayWithContext(ctx aws.Context, input *CreateEgressOnlyInternetGatewayInput, opts ...request.Option) (*CreateEgressOnlyInternetGatewayOutput, error) {
+ req, out := c.CreateEgressOnlyInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateFlowLogs = "CreateFlowLogs"
@@ -2345,8 +2849,105 @@ func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs
func (c *EC2) CreateFlowLogs(input *CreateFlowLogsInput) (*CreateFlowLogsOutput, error) {
req, out := c.CreateFlowLogsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateFlowLogsWithContext is the same as CreateFlowLogs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateFlowLogs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateFlowLogsWithContext(ctx aws.Context, input *CreateFlowLogsInput, opts ...request.Option) (*CreateFlowLogsOutput, error) {
+ req, out := c.CreateFlowLogsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateFpgaImage = "CreateFpgaImage"
+
+// CreateFpgaImageRequest generates a "aws/request.Request" representing the
+// client's request for the CreateFpgaImage operation. The "output" return
+// value can be used to capture response data after the request's "Send" method
+// is called.
+//
+// See CreateFpgaImage for usage and error information.
+//
+// Creating a request object using this method should be used when you want to inject
+// custom logic into the request's lifecycle using a custom handler, or if you want to
+// access properties on the request object before or after sending the request. If
+// you just want the service response, call the CreateFpgaImage method directly
+// instead.
+//
+// Note: You must call the "Send" method on the returned request object in order
+// to execute the request.
+//
+// // Example sending a request using the CreateFpgaImageRequest method.
+// req, resp := client.CreateFpgaImageRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage
+func (c *EC2) CreateFpgaImageRequest(input *CreateFpgaImageInput) (req *request.Request, output *CreateFpgaImageOutput) {
+ op := &request.Operation{
+ Name: opCreateFpgaImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateFpgaImageInput{}
+ }
+
+ output = &CreateFpgaImageOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateFpgaImage API operation for Amazon Elastic Compute Cloud.
+//
+// Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).
+//
+// The create operation is asynchronous. To verify that the AFI is ready for
+// use, check the output logs.
+//
+// An AFI contains the FPGA bitstream that is ready to download to an FPGA.
+// You can securely deploy an AFI on one or more FPGA-accelerated instances.
+// For more information, see the AWS FPGA Hardware Development Kit (https://github.com/aws/aws-fpga/).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateFpgaImage for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage
+func (c *EC2) CreateFpgaImage(input *CreateFpgaImageInput) (*CreateFpgaImageOutput, error) {
+ req, out := c.CreateFpgaImageRequest(input)
+ return out, req.Send()
+}
+
+// CreateFpgaImageWithContext is the same as CreateFpgaImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateFpgaImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateFpgaImageWithContext(ctx aws.Context, input *CreateFpgaImageInput, opts ...request.Option) (*CreateFpgaImageOutput, error) {
+ req, out := c.CreateFpgaImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateImage = "CreateImage"
@@ -2414,8 +3015,23 @@ func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage
func (c *EC2) CreateImage(input *CreateImageInput) (*CreateImageOutput, error) {
req, out := c.CreateImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateImageWithContext is the same as CreateImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateImageWithContext(ctx aws.Context, input *CreateImageInput, opts ...request.Option) (*CreateImageOutput, error) {
+ req, out := c.CreateImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateInstanceExportTask = "CreateInstanceExportTask"
@@ -2479,8 +3095,23 @@ func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask
func (c *EC2) CreateInstanceExportTask(input *CreateInstanceExportTaskInput) (*CreateInstanceExportTaskOutput, error) {
req, out := c.CreateInstanceExportTaskRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateInstanceExportTaskWithContext is the same as CreateInstanceExportTask with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateInstanceExportTask for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateInstanceExportTaskWithContext(ctx aws.Context, input *CreateInstanceExportTaskInput, opts ...request.Option) (*CreateInstanceExportTaskOutput, error) {
+ req, out := c.CreateInstanceExportTaskRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateInternetGateway = "CreateInternetGateway"
@@ -2543,8 +3174,23 @@ func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway
func (c *EC2) CreateInternetGateway(input *CreateInternetGatewayInput) (*CreateInternetGatewayOutput, error) {
req, out := c.CreateInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateInternetGatewayWithContext is the same as CreateInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateInternetGatewayWithContext(ctx aws.Context, input *CreateInternetGatewayInput, opts ...request.Option) (*CreateInternetGatewayOutput, error) {
+ req, out := c.CreateInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateKeyPair = "CreateKeyPair"
@@ -2614,8 +3260,23 @@ func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair
func (c *EC2) CreateKeyPair(input *CreateKeyPairInput) (*CreateKeyPairOutput, error) {
req, out := c.CreateKeyPairRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateKeyPairWithContext is the same as CreateKeyPair with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateKeyPair for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateKeyPairWithContext(ctx aws.Context, input *CreateKeyPairInput, opts ...request.Option) (*CreateKeyPairOutput, error) {
+ req, out := c.CreateKeyPairRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateNatGateway = "CreateNatGateway"
@@ -2679,8 +3340,23 @@ func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway
func (c *EC2) CreateNatGateway(input *CreateNatGatewayInput) (*CreateNatGatewayOutput, error) {
req, out := c.CreateNatGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateNatGatewayWithContext is the same as CreateNatGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNatGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNatGatewayWithContext(ctx aws.Context, input *CreateNatGatewayInput, opts ...request.Option) (*CreateNatGatewayOutput, error) {
+ req, out := c.CreateNatGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateNetworkAcl = "CreateNetworkAcl"
@@ -2743,8 +3419,23 @@ func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl
func (c *EC2) CreateNetworkAcl(input *CreateNetworkAclInput) (*CreateNetworkAclOutput, error) {
req, out := c.CreateNetworkAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateNetworkAclWithContext is the same as CreateNetworkAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNetworkAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNetworkAclWithContext(ctx aws.Context, input *CreateNetworkAclInput, opts ...request.Option) (*CreateNetworkAclOutput, error) {
+ req, out := c.CreateNetworkAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateNetworkAclEntry = "CreateNetworkAclEntry"
@@ -2821,8 +3512,23 @@ func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry
func (c *EC2) CreateNetworkAclEntry(input *CreateNetworkAclEntryInput) (*CreateNetworkAclEntryOutput, error) {
req, out := c.CreateNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateNetworkAclEntryWithContext is the same as CreateNetworkAclEntry with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNetworkAclEntry for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNetworkAclEntryWithContext(ctx aws.Context, input *CreateNetworkAclEntryInput, opts ...request.Option) (*CreateNetworkAclEntryOutput, error) {
+ req, out := c.CreateNetworkAclEntryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateNetworkInterface = "CreateNetworkInterface"
@@ -2885,8 +3591,102 @@ func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface
func (c *EC2) CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*CreateNetworkInterfaceOutput, error) {
req, out := c.CreateNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateNetworkInterfaceWithContext is the same as CreateNetworkInterface with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNetworkInterface for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNetworkInterfaceWithContext(ctx aws.Context, input *CreateNetworkInterfaceInput, opts ...request.Option) (*CreateNetworkInterfaceOutput, error) {
+ req, out := c.CreateNetworkInterfaceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission"
+
+// CreateNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the
+// client's request for the CreateNetworkInterfacePermission operation. The "output" return
+// value can be used to capture response data after the request's "Send" method
+// is called.
+//
+// See CreateNetworkInterfacePermission for usage and error information.
+//
+// Creating a request object using this method should be used when you want to inject
+// custom logic into the request's lifecycle using a custom handler, or if you want to
+// access properties on the request object before or after sending the request. If
+// you just want the service response, call the CreateNetworkInterfacePermission method directly
+// instead.
+//
+// Note: You must call the "Send" method on the returned request object in order
+// to execute the request.
+//
+// // Example sending a request using the CreateNetworkInterfacePermissionRequest method.
+// req, resp := client.CreateNetworkInterfacePermissionRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission
+func (c *EC2) CreateNetworkInterfacePermissionRequest(input *CreateNetworkInterfacePermissionInput) (req *request.Request, output *CreateNetworkInterfacePermissionOutput) {
+ op := &request.Operation{
+ Name: opCreateNetworkInterfacePermission,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateNetworkInterfacePermissionInput{}
+ }
+
+ output = &CreateNetworkInterfacePermissionOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateNetworkInterfacePermission API operation for Amazon Elastic Compute Cloud.
+//
+// Grants an AWS authorized partner account permission to attach the specified
+// network interface to an instance in their account.
+//
+// You can grant permission to a single AWS account only, and only one account
+// at a time.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateNetworkInterfacePermission for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission
+func (c *EC2) CreateNetworkInterfacePermission(input *CreateNetworkInterfacePermissionInput) (*CreateNetworkInterfacePermissionOutput, error) {
+ req, out := c.CreateNetworkInterfacePermissionRequest(input)
+ return out, req.Send()
+}
+
+// CreateNetworkInterfacePermissionWithContext is the same as CreateNetworkInterfacePermission with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateNetworkInterfacePermission for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateNetworkInterfacePermissionWithContext(ctx aws.Context, input *CreateNetworkInterfacePermissionInput, opts ...request.Option) (*CreateNetworkInterfacePermissionOutput, error) {
+ req, out := c.CreateNetworkInterfacePermissionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreatePlacementGroup = "CreatePlacementGroup"
@@ -2952,8 +3752,23 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup
func (c *EC2) CreatePlacementGroup(input *CreatePlacementGroupInput) (*CreatePlacementGroupOutput, error) {
req, out := c.CreatePlacementGroupRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreatePlacementGroupWithContext is the same as CreatePlacementGroup with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreatePlacementGroup for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreatePlacementGroupWithContext(ctx aws.Context, input *CreatePlacementGroupInput, opts ...request.Option) (*CreatePlacementGroupOutput, error) {
+ req, out := c.CreatePlacementGroupRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateReservedInstancesListing = "CreateReservedInstancesListing"
@@ -3035,8 +3850,23 @@ func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstanc
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing
func (c *EC2) CreateReservedInstancesListing(input *CreateReservedInstancesListingInput) (*CreateReservedInstancesListingOutput, error) {
req, out := c.CreateReservedInstancesListingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateReservedInstancesListingWithContext is the same as CreateReservedInstancesListing with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateReservedInstancesListing for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateReservedInstancesListingWithContext(ctx aws.Context, input *CreateReservedInstancesListingInput, opts ...request.Option) (*CreateReservedInstancesListingOutput, error) {
+ req, out := c.CreateReservedInstancesListingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateRoute = "CreateRoute"
@@ -3114,8 +3944,23 @@ func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute
func (c *EC2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) {
req, out := c.CreateRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateRouteWithContext is the same as CreateRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) {
+ req, out := c.CreateRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateRouteTable = "CreateRouteTable"
@@ -3178,8 +4023,23 @@ func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable
func (c *EC2) CreateRouteTable(input *CreateRouteTableInput) (*CreateRouteTableOutput, error) {
req, out := c.CreateRouteTableRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateRouteTableWithContext is the same as CreateRouteTable with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateRouteTable for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateRouteTableWithContext(ctx aws.Context, input *CreateRouteTableInput, opts ...request.Option) (*CreateRouteTableOutput, error) {
+ req, out := c.CreateRouteTableRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateSecurityGroup = "CreateSecurityGroup"
@@ -3264,8 +4124,23 @@ func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup
func (c *EC2) CreateSecurityGroup(input *CreateSecurityGroupInput) (*CreateSecurityGroupOutput, error) {
req, out := c.CreateSecurityGroupRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateSecurityGroupWithContext is the same as CreateSecurityGroup with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateSecurityGroup for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateSecurityGroupWithContext(ctx aws.Context, input *CreateSecurityGroupInput, opts ...request.Option) (*CreateSecurityGroupOutput, error) {
+ req, out := c.CreateSecurityGroupRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateSnapshot = "CreateSnapshot"
@@ -3351,8 +4226,23 @@ func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot
func (c *EC2) CreateSnapshot(input *CreateSnapshotInput) (*Snapshot, error) {
req, out := c.CreateSnapshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateSnapshotWithContext is the same as CreateSnapshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateSnapshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*Snapshot, error) {
+ req, out := c.CreateSnapshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription"
@@ -3414,8 +4304,23 @@ func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSub
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription
func (c *EC2) CreateSpotDatafeedSubscription(input *CreateSpotDatafeedSubscriptionInput) (*CreateSpotDatafeedSubscriptionOutput, error) {
req, out := c.CreateSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateSpotDatafeedSubscriptionWithContext is the same as CreateSpotDatafeedSubscription with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateSpotDatafeedSubscription for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *CreateSpotDatafeedSubscriptionInput, opts ...request.Option) (*CreateSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.CreateSpotDatafeedSubscriptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateSubnet = "CreateSubnet"
@@ -3477,7 +4382,7 @@ func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Reques
// If you've associated an IPv6 CIDR block with your VPC, you can create a subnet
// with an IPv6 CIDR block that uses a /64 prefix length.
//
-// AWS reserves both the first four and the last IP address in each subnet's
+// AWS reserves both the first four and the last IPv4 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
@@ -3501,8 +4406,23 @@ func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet
func (c *EC2) CreateSubnet(input *CreateSubnetInput) (*CreateSubnetOutput, error) {
req, out := c.CreateSubnetRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateSubnetWithContext is the same as CreateSubnet with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateSubnet for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateSubnetWithContext(ctx aws.Context, input *CreateSubnetInput, opts ...request.Option) (*CreateSubnetOutput, error) {
+ req, out := c.CreateSubnetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateTags = "CreateTags"
@@ -3571,8 +4491,23 @@ func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, o
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags
func (c *EC2) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
req, out := c.CreateTagsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateTagsWithContext is the same as CreateTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) {
+ req, out := c.CreateTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVolume = "CreateVolume"
@@ -3634,7 +4569,10 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques
// 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)
+// You can tag your volumes during creation. For more information, see Tagging
+// Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
+//
+// For more information, see Creating an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -3646,8 +4584,23 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume
func (c *EC2) CreateVolume(input *CreateVolumeInput) (*Volume, error) {
req, out := c.CreateVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVolumeWithContext is the same as CreateVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVolumeWithContext(ctx aws.Context, input *CreateVolumeInput, opts ...request.Option) (*Volume, error) {
+ req, out := c.CreateVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpc = "CreateVpc"
@@ -3724,8 +4677,23 @@ func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, out
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc
func (c *EC2) CreateVpc(input *CreateVpcInput) (*CreateVpcOutput, error) {
req, out := c.CreateVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpcWithContext is the same as CreateVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpcWithContext(ctx aws.Context, input *CreateVpcInput, opts ...request.Option) (*CreateVpcOutput, error) {
+ req, out := c.CreateVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpcEndpoint = "CreateVpcEndpoint"
@@ -3790,8 +4758,23 @@ func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint
func (c *EC2) CreateVpcEndpoint(input *CreateVpcEndpointInput) (*CreateVpcEndpointOutput, error) {
req, out := c.CreateVpcEndpointRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpcEndpointWithContext is the same as CreateVpcEndpoint with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpcEndpoint for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpcEndpointWithContext(ctx aws.Context, input *CreateVpcEndpointInput, opts ...request.Option) (*CreateVpcEndpointOutput, error) {
+ req, out := c.CreateVpcEndpointRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection"
@@ -3848,8 +4831,8 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio
// 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.
+// If you try to create a VPC peering connection between VPCs that have overlapping
+// CIDR blocks, the VPC peering connection status goes to failed.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -3860,8 +4843,23 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection
func (c *EC2) CreateVpcPeeringConnection(input *CreateVpcPeeringConnectionInput) (*CreateVpcPeeringConnectionOutput, error) {
req, out := c.CreateVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpcPeeringConnectionWithContext is the same as CreateVpcPeeringConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpcPeeringConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpcPeeringConnectionWithContext(ctx aws.Context, input *CreateVpcPeeringConnectionInput, opts ...request.Option) (*CreateVpcPeeringConnectionOutput, error) {
+ req, out := c.CreateVpcPeeringConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpnConnection = "CreateVpnConnection"
@@ -3939,8 +4937,23 @@ func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection
func (c *EC2) CreateVpnConnection(input *CreateVpnConnectionInput) (*CreateVpnConnectionOutput, error) {
req, out := c.CreateVpnConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpnConnectionWithContext is the same as CreateVpnConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpnConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpnConnectionWithContext(ctx aws.Context, input *CreateVpnConnectionInput, opts ...request.Option) (*CreateVpnConnectionOutput, error) {
+ req, out := c.CreateVpnConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute"
@@ -4008,8 +5021,23 @@ func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute
func (c *EC2) CreateVpnConnectionRoute(input *CreateVpnConnectionRouteInput) (*CreateVpnConnectionRouteOutput, error) {
req, out := c.CreateVpnConnectionRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpnConnectionRouteWithContext is the same as CreateVpnConnectionRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpnConnectionRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpnConnectionRouteWithContext(ctx aws.Context, input *CreateVpnConnectionRouteInput, opts ...request.Option) (*CreateVpnConnectionRouteOutput, error) {
+ req, out := c.CreateVpnConnectionRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateVpnGateway = "CreateVpnGateway"
@@ -4074,8 +5102,23 @@ func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway
func (c *EC2) CreateVpnGateway(input *CreateVpnGatewayInput) (*CreateVpnGatewayOutput, error) {
req, out := c.CreateVpnGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateVpnGatewayWithContext is the same as CreateVpnGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpnGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpnGatewayWithContext(ctx aws.Context, input *CreateVpnGatewayInput, opts ...request.Option) (*CreateVpnGatewayOutput, error) {
+ req, out := c.CreateVpnGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteCustomerGateway = "DeleteCustomerGateway"
@@ -4137,8 +5180,23 @@ func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway
func (c *EC2) DeleteCustomerGateway(input *DeleteCustomerGatewayInput) (*DeleteCustomerGatewayOutput, error) {
req, out := c.DeleteCustomerGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteCustomerGatewayWithContext is the same as DeleteCustomerGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteCustomerGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteCustomerGatewayWithContext(ctx aws.Context, input *DeleteCustomerGatewayInput, opts ...request.Option) (*DeleteCustomerGatewayOutput, error) {
+ req, out := c.DeleteCustomerGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteDhcpOptions = "DeleteDhcpOptions"
@@ -4202,8 +5260,23 @@ func (c *EC2) DeleteDhcpOptionsRequest(input *DeleteDhcpOptionsInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions
func (c *EC2) DeleteDhcpOptions(input *DeleteDhcpOptionsInput) (*DeleteDhcpOptionsOutput, error) {
req, out := c.DeleteDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteDhcpOptionsWithContext is the same as DeleteDhcpOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteDhcpOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteDhcpOptionsWithContext(ctx aws.Context, input *DeleteDhcpOptionsInput, opts ...request.Option) (*DeleteDhcpOptionsOutput, error) {
+ req, out := c.DeleteDhcpOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway"
@@ -4262,8 +5335,23 @@ func (c *EC2) DeleteEgressOnlyInternetGatewayRequest(input *DeleteEgressOnlyInte
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway
func (c *EC2) DeleteEgressOnlyInternetGateway(input *DeleteEgressOnlyInternetGatewayInput) (*DeleteEgressOnlyInternetGatewayOutput, error) {
req, out := c.DeleteEgressOnlyInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteEgressOnlyInternetGatewayWithContext is the same as DeleteEgressOnlyInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteEgressOnlyInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteEgressOnlyInternetGatewayWithContext(ctx aws.Context, input *DeleteEgressOnlyInternetGatewayInput, opts ...request.Option) (*DeleteEgressOnlyInternetGatewayOutput, error) {
+ req, out := c.DeleteEgressOnlyInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteFlowLogs = "DeleteFlowLogs"
@@ -4322,8 +5410,23 @@ func (c *EC2) DeleteFlowLogsRequest(input *DeleteFlowLogsInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs
func (c *EC2) DeleteFlowLogs(input *DeleteFlowLogsInput) (*DeleteFlowLogsOutput, error) {
req, out := c.DeleteFlowLogsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteFlowLogsWithContext is the same as DeleteFlowLogs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteFlowLogs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteFlowLogsWithContext(ctx aws.Context, input *DeleteFlowLogsInput, opts ...request.Option) (*DeleteFlowLogsOutput, error) {
+ req, out := c.DeleteFlowLogsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteInternetGateway = "DeleteInternetGateway"
@@ -4385,8 +5488,23 @@ func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway
func (c *EC2) DeleteInternetGateway(input *DeleteInternetGatewayInput) (*DeleteInternetGatewayOutput, error) {
req, out := c.DeleteInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteInternetGatewayWithContext is the same as DeleteInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteInternetGatewayWithContext(ctx aws.Context, input *DeleteInternetGatewayInput, opts ...request.Option) (*DeleteInternetGatewayOutput, error) {
+ req, out := c.DeleteInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteKeyPair = "DeleteKeyPair"
@@ -4447,8 +5565,23 @@ func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair
func (c *EC2) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) {
req, out := c.DeleteKeyPairRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteKeyPairWithContext is the same as DeleteKeyPair with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteKeyPair for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteKeyPairWithContext(ctx aws.Context, input *DeleteKeyPairInput, opts ...request.Option) (*DeleteKeyPairOutput, error) {
+ req, out := c.DeleteKeyPairRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteNatGateway = "DeleteNatGateway"
@@ -4509,8 +5642,23 @@ func (c *EC2) DeleteNatGatewayRequest(input *DeleteNatGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway
func (c *EC2) DeleteNatGateway(input *DeleteNatGatewayInput) (*DeleteNatGatewayOutput, error) {
req, out := c.DeleteNatGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteNatGatewayWithContext is the same as DeleteNatGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNatGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNatGatewayWithContext(ctx aws.Context, input *DeleteNatGatewayInput, opts ...request.Option) (*DeleteNatGatewayOutput, error) {
+ req, out := c.DeleteNatGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteNetworkAcl = "DeleteNetworkAcl"
@@ -4572,8 +5720,23 @@ func (c *EC2) DeleteNetworkAclRequest(input *DeleteNetworkAclInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl
func (c *EC2) DeleteNetworkAcl(input *DeleteNetworkAclInput) (*DeleteNetworkAclOutput, error) {
req, out := c.DeleteNetworkAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteNetworkAclWithContext is the same as DeleteNetworkAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNetworkAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNetworkAclWithContext(ctx aws.Context, input *DeleteNetworkAclInput, opts ...request.Option) (*DeleteNetworkAclOutput, error) {
+ req, out := c.DeleteNetworkAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry"
@@ -4635,8 +5798,23 @@ func (c *EC2) DeleteNetworkAclEntryRequest(input *DeleteNetworkAclEntryInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry
func (c *EC2) DeleteNetworkAclEntry(input *DeleteNetworkAclEntryInput) (*DeleteNetworkAclEntryOutput, error) {
req, out := c.DeleteNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteNetworkAclEntryWithContext is the same as DeleteNetworkAclEntry with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNetworkAclEntry for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNetworkAclEntryWithContext(ctx aws.Context, input *DeleteNetworkAclEntryInput, opts ...request.Option) (*DeleteNetworkAclEntryOutput, error) {
+ req, out := c.DeleteNetworkAclEntryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteNetworkInterface = "DeleteNetworkInterface"
@@ -4698,8 +5876,101 @@ func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface
func (c *EC2) DeleteNetworkInterface(input *DeleteNetworkInterfaceInput) (*DeleteNetworkInterfaceOutput, error) {
req, out := c.DeleteNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteNetworkInterfaceWithContext is the same as DeleteNetworkInterface with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNetworkInterface for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNetworkInterfaceWithContext(ctx aws.Context, input *DeleteNetworkInterfaceInput, opts ...request.Option) (*DeleteNetworkInterfaceOutput, error) {
+ req, out := c.DeleteNetworkInterfaceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission"
+
+// DeleteNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteNetworkInterfacePermission operation. The "output" return
+// value can be used to capture response data after the request's "Send" method
+// is called.
+//
+// See DeleteNetworkInterfacePermission for usage and error information.
+//
+// Creating a request object using this method should be used when you want to inject
+// custom logic into the request's lifecycle using a custom handler, or if you want to
+// access properties on the request object before or after sending the request. If
+// you just want the service response, call the DeleteNetworkInterfacePermission method directly
+// instead.
+//
+// Note: You must call the "Send" method on the returned request object in order
+// to execute the request.
+//
+// // Example sending a request using the DeleteNetworkInterfacePermissionRequest method.
+// req, resp := client.DeleteNetworkInterfacePermissionRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission
+func (c *EC2) DeleteNetworkInterfacePermissionRequest(input *DeleteNetworkInterfacePermissionInput) (req *request.Request, output *DeleteNetworkInterfacePermissionOutput) {
+ op := &request.Operation{
+ Name: opDeleteNetworkInterfacePermission,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteNetworkInterfacePermissionInput{}
+ }
+
+ output = &DeleteNetworkInterfacePermissionOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DeleteNetworkInterfacePermission API operation for Amazon Elastic Compute Cloud.
+//
+// Deletes a permission for a network interface. By default, you cannot delete
+// the permission if the account for which you're removing the permission has
+// attached the network interface to an instance. However, you can force delete
+// the permission, regardless of any attachment.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DeleteNetworkInterfacePermission for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission
+func (c *EC2) DeleteNetworkInterfacePermission(input *DeleteNetworkInterfacePermissionInput) (*DeleteNetworkInterfacePermissionOutput, error) {
+ req, out := c.DeleteNetworkInterfacePermissionRequest(input)
+ return out, req.Send()
+}
+
+// DeleteNetworkInterfacePermissionWithContext is the same as DeleteNetworkInterfacePermission with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteNetworkInterfacePermission for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteNetworkInterfacePermissionWithContext(ctx aws.Context, input *DeleteNetworkInterfacePermissionInput, opts ...request.Option) (*DeleteNetworkInterfacePermissionOutput, error) {
+ req, out := c.DeleteNetworkInterfacePermissionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeletePlacementGroup = "DeletePlacementGroup"
@@ -4763,8 +6034,23 @@ func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup
func (c *EC2) DeletePlacementGroup(input *DeletePlacementGroupInput) (*DeletePlacementGroupOutput, error) {
req, out := c.DeletePlacementGroupRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeletePlacementGroupWithContext is the same as DeletePlacementGroup with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeletePlacementGroup for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeletePlacementGroupWithContext(ctx aws.Context, input *DeletePlacementGroupInput, opts ...request.Option) (*DeletePlacementGroupOutput, error) {
+ req, out := c.DeletePlacementGroupRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteRoute = "DeleteRoute"
@@ -4825,8 +6111,23 @@ func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute
func (c *EC2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) {
req, out := c.DeleteRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteRouteWithContext is the same as DeleteRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) {
+ req, out := c.DeleteRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteRouteTable = "DeleteRouteTable"
@@ -4889,8 +6190,23 @@ func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable
func (c *EC2) DeleteRouteTable(input *DeleteRouteTableInput) (*DeleteRouteTableOutput, error) {
req, out := c.DeleteRouteTableRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteRouteTableWithContext is the same as DeleteRouteTable with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteRouteTable for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteRouteTableWithContext(ctx aws.Context, input *DeleteRouteTableInput, opts ...request.Option) (*DeleteRouteTableOutput, error) {
+ req, out := c.DeleteRouteTableRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteSecurityGroup = "DeleteSecurityGroup"
@@ -4955,8 +6271,23 @@ func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup
func (c *EC2) DeleteSecurityGroup(input *DeleteSecurityGroupInput) (*DeleteSecurityGroupOutput, error) {
req, out := c.DeleteSecurityGroupRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteSecurityGroupWithContext is the same as DeleteSecurityGroup with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteSecurityGroup for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteSecurityGroupWithContext(ctx aws.Context, input *DeleteSecurityGroupInput, opts ...request.Option) (*DeleteSecurityGroupOutput, error) {
+ req, out := c.DeleteSecurityGroupRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteSnapshot = "DeleteSnapshot"
@@ -5031,8 +6362,23 @@ func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot
func (c *EC2) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error) {
req, out := c.DeleteSnapshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteSnapshotWithContext is the same as DeleteSnapshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteSnapshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteSnapshotWithContext(ctx aws.Context, input *DeleteSnapshotInput, opts ...request.Option) (*DeleteSnapshotOutput, error) {
+ req, out := c.DeleteSnapshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription"
@@ -5093,8 +6439,23 @@ func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSub
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription
func (c *EC2) DeleteSpotDatafeedSubscription(input *DeleteSpotDatafeedSubscriptionInput) (*DeleteSpotDatafeedSubscriptionOutput, error) {
req, out := c.DeleteSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteSpotDatafeedSubscriptionWithContext is the same as DeleteSpotDatafeedSubscription with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteSpotDatafeedSubscription for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *DeleteSpotDatafeedSubscriptionInput, opts ...request.Option) (*DeleteSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.DeleteSpotDatafeedSubscriptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteSubnet = "DeleteSubnet"
@@ -5156,8 +6517,23 @@ func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet
func (c *EC2) DeleteSubnet(input *DeleteSubnetInput) (*DeleteSubnetOutput, error) {
req, out := c.DeleteSubnetRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteSubnetWithContext is the same as DeleteSubnet with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteSubnet for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteSubnetWithContext(ctx aws.Context, input *DeleteSubnetInput, opts ...request.Option) (*DeleteSubnetOutput, error) {
+ req, out := c.DeleteSubnetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteTags = "DeleteTags"
@@ -5222,8 +6598,23 @@ func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, o
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags
func (c *EC2) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
req, out := c.DeleteTagsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteTagsWithContext is the same as DeleteTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
+ req, out := c.DeleteTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVolume = "DeleteVolume"
@@ -5290,8 +6681,23 @@ func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume
func (c *EC2) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) {
req, out := c.DeleteVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVolumeWithContext is the same as DeleteVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVolumeWithContext(ctx aws.Context, input *DeleteVolumeInput, opts ...request.Option) (*DeleteVolumeOutput, error) {
+ req, out := c.DeleteVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpc = "DeleteVpc"
@@ -5356,8 +6762,23 @@ func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, out
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc
func (c *EC2) DeleteVpc(input *DeleteVpcInput) (*DeleteVpcOutput, error) {
req, out := c.DeleteVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpcWithContext is the same as DeleteVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpcWithContext(ctx aws.Context, input *DeleteVpcInput, opts ...request.Option) (*DeleteVpcOutput, error) {
+ req, out := c.DeleteVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpcEndpoints = "DeleteVpcEndpoints"
@@ -5417,8 +6838,23 @@ func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints
func (c *EC2) DeleteVpcEndpoints(input *DeleteVpcEndpointsInput) (*DeleteVpcEndpointsOutput, error) {
req, out := c.DeleteVpcEndpointsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpcEndpointsWithContext is the same as DeleteVpcEndpoints with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpcEndpoints for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpcEndpointsWithContext(ctx aws.Context, input *DeleteVpcEndpointsInput, opts ...request.Option) (*DeleteVpcEndpointsOutput, error) {
+ req, out := c.DeleteVpcEndpointsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection"
@@ -5480,8 +6916,23 @@ func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection
func (c *EC2) DeleteVpcPeeringConnection(input *DeleteVpcPeeringConnectionInput) (*DeleteVpcPeeringConnectionOutput, error) {
req, out := c.DeleteVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpcPeeringConnectionWithContext is the same as DeleteVpcPeeringConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpcPeeringConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpcPeeringConnectionWithContext(ctx aws.Context, input *DeleteVpcPeeringConnectionInput, opts ...request.Option) (*DeleteVpcPeeringConnectionOutput, error) {
+ req, out := c.DeleteVpcPeeringConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpnConnection = "DeleteVpnConnection"
@@ -5551,8 +7002,23 @@ func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection
func (c *EC2) DeleteVpnConnection(input *DeleteVpnConnectionInput) (*DeleteVpnConnectionOutput, error) {
req, out := c.DeleteVpnConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpnConnectionWithContext is the same as DeleteVpnConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpnConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpnConnectionWithContext(ctx aws.Context, input *DeleteVpnConnectionInput, opts ...request.Option) (*DeleteVpnConnectionOutput, error) {
+ req, out := c.DeleteVpnConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute"
@@ -5616,8 +7082,23 @@ func (c *EC2) DeleteVpnConnectionRouteRequest(input *DeleteVpnConnectionRouteInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute
func (c *EC2) DeleteVpnConnectionRoute(input *DeleteVpnConnectionRouteInput) (*DeleteVpnConnectionRouteOutput, error) {
req, out := c.DeleteVpnConnectionRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpnConnectionRouteWithContext is the same as DeleteVpnConnectionRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpnConnectionRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpnConnectionRouteWithContext(ctx aws.Context, input *DeleteVpnConnectionRouteInput, opts ...request.Option) (*DeleteVpnConnectionRouteOutput, error) {
+ req, out := c.DeleteVpnConnectionRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteVpnGateway = "DeleteVpnGateway"
@@ -5682,8 +7163,23 @@ func (c *EC2) DeleteVpnGatewayRequest(input *DeleteVpnGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway
func (c *EC2) DeleteVpnGateway(input *DeleteVpnGatewayInput) (*DeleteVpnGatewayOutput, error) {
req, out := c.DeleteVpnGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteVpnGatewayWithContext is the same as DeleteVpnGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpnGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpnGatewayWithContext(ctx aws.Context, input *DeleteVpnGatewayInput, opts ...request.Option) (*DeleteVpnGatewayOutput, error) {
+ req, out := c.DeleteVpnGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeregisterImage = "DeregisterImage"
@@ -5747,8 +7243,23 @@ func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage
func (c *EC2) DeregisterImage(input *DeregisterImageInput) (*DeregisterImageOutput, error) {
req, out := c.DeregisterImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeregisterImageWithContext is the same as DeregisterImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeregisterImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeregisterImageWithContext(ctx aws.Context, input *DeregisterImageInput, opts ...request.Option) (*DeregisterImageOutput, error) {
+ req, out := c.DeregisterImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeAccountAttributes = "DescribeAccountAttributes"
@@ -5825,8 +7336,23 @@ func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes
func (c *EC2) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) {
req, out := c.DescribeAccountAttributesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeAccountAttributes for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) {
+ req, out := c.DescribeAccountAttributesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeAddresses = "DescribeAddresses"
@@ -5889,8 +7415,23 @@ func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses
func (c *EC2) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddressesOutput, error) {
req, out := c.DescribeAddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeAddressesWithContext is the same as DescribeAddresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeAddresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeAddressesWithContext(ctx aws.Context, input *DescribeAddressesInput, opts ...request.Option) (*DescribeAddressesOutput, error) {
+ req, out := c.DescribeAddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeAvailabilityZones = "DescribeAvailabilityZones"
@@ -5955,8 +7496,23 @@ func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones
func (c *EC2) DescribeAvailabilityZones(input *DescribeAvailabilityZonesInput) (*DescribeAvailabilityZonesOutput, error) {
req, out := c.DescribeAvailabilityZonesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeAvailabilityZonesWithContext is the same as DescribeAvailabilityZones with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeAvailabilityZones for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeAvailabilityZonesWithContext(ctx aws.Context, input *DescribeAvailabilityZonesInput, opts ...request.Option) (*DescribeAvailabilityZonesOutput, error) {
+ req, out := c.DescribeAvailabilityZonesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeBundleTasks = "DescribeBundleTasks"
@@ -6020,8 +7576,23 @@ func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks
func (c *EC2) DescribeBundleTasks(input *DescribeBundleTasksInput) (*DescribeBundleTasksOutput, error) {
req, out := c.DescribeBundleTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeBundleTasksWithContext is the same as DescribeBundleTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeBundleTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeBundleTasksWithContext(ctx aws.Context, input *DescribeBundleTasksInput, opts ...request.Option) (*DescribeBundleTasksOutput, error) {
+ req, out := c.DescribeBundleTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances"
@@ -6083,8 +7654,23 @@ func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInst
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances
func (c *EC2) DescribeClassicLinkInstances(input *DescribeClassicLinkInstancesInput) (*DescribeClassicLinkInstancesOutput, error) {
req, out := c.DescribeClassicLinkInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeClassicLinkInstancesWithContext is the same as DescribeClassicLinkInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeClassicLinkInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeClassicLinkInstancesWithContext(ctx aws.Context, input *DescribeClassicLinkInstancesInput, opts ...request.Option) (*DescribeClassicLinkInstancesOutput, error) {
+ req, out := c.DescribeClassicLinkInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeConversionTasks = "DescribeConversionTasks"
@@ -6147,8 +7733,23 @@ func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks
func (c *EC2) DescribeConversionTasks(input *DescribeConversionTasksInput) (*DescribeConversionTasksOutput, error) {
req, out := c.DescribeConversionTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeConversionTasksWithContext is the same as DescribeConversionTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeConversionTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeConversionTasksWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.Option) (*DescribeConversionTasksOutput, error) {
+ req, out := c.DescribeConversionTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeCustomerGateways = "DescribeCustomerGateways"
@@ -6211,8 +7812,23 @@ func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways
func (c *EC2) DescribeCustomerGateways(input *DescribeCustomerGatewaysInput) (*DescribeCustomerGatewaysOutput, error) {
req, out := c.DescribeCustomerGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeCustomerGatewaysWithContext is the same as DescribeCustomerGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeCustomerGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeCustomerGatewaysWithContext(ctx aws.Context, input *DescribeCustomerGatewaysInput, opts ...request.Option) (*DescribeCustomerGatewaysOutput, error) {
+ req, out := c.DescribeCustomerGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeDhcpOptions = "DescribeDhcpOptions"
@@ -6274,8 +7890,23 @@ func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions
func (c *EC2) DescribeDhcpOptions(input *DescribeDhcpOptionsInput) (*DescribeDhcpOptionsOutput, error) {
req, out := c.DescribeDhcpOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeDhcpOptionsWithContext is the same as DescribeDhcpOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeDhcpOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeDhcpOptionsWithContext(ctx aws.Context, input *DescribeDhcpOptionsInput, opts ...request.Option) (*DescribeDhcpOptionsOutput, error) {
+ req, out := c.DescribeDhcpOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways"
@@ -6334,8 +7965,23 @@ func (c *EC2) DescribeEgressOnlyInternetGatewaysRequest(input *DescribeEgressOnl
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways
func (c *EC2) DescribeEgressOnlyInternetGateways(input *DescribeEgressOnlyInternetGatewaysInput) (*DescribeEgressOnlyInternetGatewaysOutput, error) {
req, out := c.DescribeEgressOnlyInternetGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeEgressOnlyInternetGatewaysWithContext is the same as DescribeEgressOnlyInternetGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeEgressOnlyInternetGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeEgressOnlyInternetGatewaysWithContext(ctx aws.Context, input *DescribeEgressOnlyInternetGatewaysInput, opts ...request.Option) (*DescribeEgressOnlyInternetGatewaysOutput, error) {
+ req, out := c.DescribeEgressOnlyInternetGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeExportTasks = "DescribeExportTasks"
@@ -6394,8 +8040,23 @@ func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks
func (c *EC2) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) {
req, out := c.DescribeExportTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeExportTasksWithContext is the same as DescribeExportTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeExportTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeExportTasksWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.Option) (*DescribeExportTasksOutput, error) {
+ req, out := c.DescribeExportTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeFlowLogs = "DescribeFlowLogs"
@@ -6456,8 +8117,100 @@ func (c *EC2) DescribeFlowLogsRequest(input *DescribeFlowLogsInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs
func (c *EC2) DescribeFlowLogs(input *DescribeFlowLogsInput) (*DescribeFlowLogsOutput, error) {
req, out := c.DescribeFlowLogsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeFlowLogsWithContext is the same as DescribeFlowLogs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeFlowLogs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeFlowLogsWithContext(ctx aws.Context, input *DescribeFlowLogsInput, opts ...request.Option) (*DescribeFlowLogsOutput, error) {
+ req, out := c.DescribeFlowLogsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeFpgaImages = "DescribeFpgaImages"
+
+// DescribeFpgaImagesRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeFpgaImages operation. The "output" return
+// value can be used to capture response data after the request's "Send" method
+// is called.
+//
+// See DescribeFpgaImages for usage and error information.
+//
+// Creating a request object using this method should be used when you want to inject
+// custom logic into the request's lifecycle using a custom handler, or if you want to
+// access properties on the request object before or after sending the request. If
+// you just want the service response, call the DescribeFpgaImages method directly
+// instead.
+//
+// Note: You must call the "Send" method on the returned request object in order
+// to execute the request.
+//
+// // Example sending a request using the DescribeFpgaImagesRequest method.
+// req, resp := client.DescribeFpgaImagesRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages
+func (c *EC2) DescribeFpgaImagesRequest(input *DescribeFpgaImagesInput) (req *request.Request, output *DescribeFpgaImagesOutput) {
+ op := &request.Operation{
+ Name: opDescribeFpgaImages,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeFpgaImagesInput{}
+ }
+
+ output = &DescribeFpgaImagesOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeFpgaImages API operation for Amazon Elastic Compute Cloud.
+//
+// Describes one or more available Amazon FPGA Images (AFIs). These include
+// public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts
+// for which you have load permissions.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeFpgaImages for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages
+func (c *EC2) DescribeFpgaImages(input *DescribeFpgaImagesInput) (*DescribeFpgaImagesOutput, error) {
+ req, out := c.DescribeFpgaImagesRequest(input)
+ return out, req.Send()
+}
+
+// DescribeFpgaImagesWithContext is the same as DescribeFpgaImages with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeFpgaImages for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeFpgaImagesWithContext(ctx aws.Context, input *DescribeFpgaImagesInput, opts ...request.Option) (*DescribeFpgaImagesOutput, error) {
+ req, out := c.DescribeFpgaImagesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings"
@@ -6524,8 +8277,23 @@ func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReserva
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings
func (c *EC2) DescribeHostReservationOfferings(input *DescribeHostReservationOfferingsInput) (*DescribeHostReservationOfferingsOutput, error) {
req, out := c.DescribeHostReservationOfferingsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeHostReservationOfferingsWithContext is the same as DescribeHostReservationOfferings with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeHostReservationOfferings for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeHostReservationOfferingsWithContext(ctx aws.Context, input *DescribeHostReservationOfferingsInput, opts ...request.Option) (*DescribeHostReservationOfferingsOutput, error) {
+ req, out := c.DescribeHostReservationOfferingsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeHostReservations = "DescribeHostReservations"
@@ -6585,8 +8353,23 @@ func (c *EC2) DescribeHostReservationsRequest(input *DescribeHostReservationsInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations
func (c *EC2) DescribeHostReservations(input *DescribeHostReservationsInput) (*DescribeHostReservationsOutput, error) {
req, out := c.DescribeHostReservationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeHostReservationsWithContext is the same as DescribeHostReservations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeHostReservations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeHostReservationsWithContext(ctx aws.Context, input *DescribeHostReservationsInput, opts ...request.Option) (*DescribeHostReservationsOutput, error) {
+ req, out := c.DescribeHostReservationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeHosts = "DescribeHosts"
@@ -6649,8 +8432,23 @@ func (c *EC2) DescribeHostsRequest(input *DescribeHostsInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts
func (c *EC2) DescribeHosts(input *DescribeHostsInput) (*DescribeHostsOutput, error) {
req, out := c.DescribeHostsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeHostsWithContext is the same as DescribeHosts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeHosts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeHostsWithContext(ctx aws.Context, input *DescribeHostsInput, opts ...request.Option) (*DescribeHostsOutput, error) {
+ req, out := c.DescribeHostsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAssociations"
@@ -6709,8 +8507,23 @@ func (c *EC2) DescribeIamInstanceProfileAssociationsRequest(input *DescribeIamIn
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations
func (c *EC2) DescribeIamInstanceProfileAssociations(input *DescribeIamInstanceProfileAssociationsInput) (*DescribeIamInstanceProfileAssociationsOutput, error) {
req, out := c.DescribeIamInstanceProfileAssociationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeIamInstanceProfileAssociationsWithContext is the same as DescribeIamInstanceProfileAssociations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeIamInstanceProfileAssociations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeIamInstanceProfileAssociationsWithContext(ctx aws.Context, input *DescribeIamInstanceProfileAssociationsInput, opts ...request.Option) (*DescribeIamInstanceProfileAssociationsOutput, error) {
+ req, out := c.DescribeIamInstanceProfileAssociationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeIdFormat = "DescribeIdFormat"
@@ -6782,8 +8595,23 @@ func (c *EC2) DescribeIdFormatRequest(input *DescribeIdFormatInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat
func (c *EC2) DescribeIdFormat(input *DescribeIdFormatInput) (*DescribeIdFormatOutput, error) {
req, out := c.DescribeIdFormatRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeIdFormatWithContext is the same as DescribeIdFormat with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeIdFormat for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeIdFormatWithContext(ctx aws.Context, input *DescribeIdFormatInput, opts ...request.Option) (*DescribeIdFormatOutput, error) {
+ req, out := c.DescribeIdFormatRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat"
@@ -6853,8 +8681,23 @@ func (c *EC2) DescribeIdentityIdFormatRequest(input *DescribeIdentityIdFormatInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat
func (c *EC2) DescribeIdentityIdFormat(input *DescribeIdentityIdFormatInput) (*DescribeIdentityIdFormatOutput, error) {
req, out := c.DescribeIdentityIdFormatRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeIdentityIdFormatWithContext is the same as DescribeIdentityIdFormat with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeIdentityIdFormat for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeIdentityIdFormatWithContext(ctx aws.Context, input *DescribeIdentityIdFormatInput, opts ...request.Option) (*DescribeIdentityIdFormatOutput, error) {
+ req, out := c.DescribeIdentityIdFormatRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImageAttribute = "DescribeImageAttribute"
@@ -6914,8 +8757,23 @@ func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute
func (c *EC2) DescribeImageAttribute(input *DescribeImageAttributeInput) (*DescribeImageAttributeOutput, error) {
req, out := c.DescribeImageAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImageAttributeWithContext is the same as DescribeImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeImageAttributeWithContext(ctx aws.Context, input *DescribeImageAttributeInput, opts ...request.Option) (*DescribeImageAttributeOutput, error) {
+ req, out := c.DescribeImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImages = "DescribeImages"
@@ -6980,8 +8838,23 @@ func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages
func (c *EC2) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
req, out := c.DescribeImagesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImagesWithContext is the same as DescribeImages with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImages for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) {
+ req, out := c.DescribeImagesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImportImageTasks = "DescribeImportImageTasks"
@@ -7041,8 +8914,23 @@ func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks
func (c *EC2) DescribeImportImageTasks(input *DescribeImportImageTasksInput) (*DescribeImportImageTasksOutput, error) {
req, out := c.DescribeImportImageTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImportImageTasksWithContext is the same as DescribeImportImageTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImportImageTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeImportImageTasksWithContext(ctx aws.Context, input *DescribeImportImageTasksInput, opts ...request.Option) (*DescribeImportImageTasksOutput, error) {
+ req, out := c.DescribeImportImageTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks"
@@ -7101,8 +8989,23 @@ func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTa
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks
func (c *EC2) DescribeImportSnapshotTasks(input *DescribeImportSnapshotTasksInput) (*DescribeImportSnapshotTasksOutput, error) {
req, out := c.DescribeImportSnapshotTasksRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImportSnapshotTasksWithContext is the same as DescribeImportSnapshotTasks with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImportSnapshotTasks for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeImportSnapshotTasksWithContext(ctx aws.Context, input *DescribeImportSnapshotTasksInput, opts ...request.Option) (*DescribeImportSnapshotTasksOutput, error) {
+ req, out := c.DescribeImportSnapshotTasksRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeInstanceAttribute = "DescribeInstanceAttribute"
@@ -7165,8 +9068,23 @@ func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute
func (c *EC2) DescribeInstanceAttribute(input *DescribeInstanceAttributeInput) (*DescribeInstanceAttributeOutput, error) {
req, out := c.DescribeInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeInstanceAttributeWithContext is the same as DescribeInstanceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInstanceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstanceAttributeWithContext(ctx aws.Context, input *DescribeInstanceAttributeInput, opts ...request.Option) (*DescribeInstanceAttributeOutput, error) {
+ req, out := c.DescribeInstanceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeInstanceStatus = "DescribeInstanceStatus"
@@ -7221,7 +9139,8 @@ func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput)
// DescribeInstanceStatus API operation for Amazon Elastic Compute Cloud.
//
// Describes the status of one or more instances. By default, only running instances
-// are described, unless specified otherwise.
+// are described, unless you specifically indicate to return the status of all
+// instances.
//
// Instance status includes the following components:
//
@@ -7251,8 +9170,23 @@ func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus
func (c *EC2) DescribeInstanceStatus(input *DescribeInstanceStatusInput) (*DescribeInstanceStatusOutput, error) {
req, out := c.DescribeInstanceStatusRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeInstanceStatusWithContext is the same as DescribeInstanceStatus with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInstanceStatus for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstanceStatusWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.Option) (*DescribeInstanceStatusOutput, error) {
+ req, out := c.DescribeInstanceStatusRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeInstanceStatusPages iterates over the pages of a DescribeInstanceStatus operation,
@@ -7272,12 +9206,37 @@ func (c *EC2) DescribeInstanceStatus(input *DescribeInstanceStatusInput) (*Descr
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeInstanceStatusPages(input *DescribeInstanceStatusInput, fn func(*DescribeInstanceStatusOutput, bool) bool) error {
+ return c.DescribeInstanceStatusPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeInstanceStatusPagesWithContext same as DescribeInstanceStatusPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstanceStatusPagesWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, fn func(*DescribeInstanceStatusOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeInstanceStatusInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstanceStatusRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeInstanceStatusOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeInstances = "DescribeInstances"
@@ -7357,8 +9316,23 @@ func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances
func (c *EC2) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstancesOutput, error) {
req, out := c.DescribeInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeInstancesWithContext is the same as DescribeInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstancesWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.Option) (*DescribeInstancesOutput, error) {
+ req, out := c.DescribeInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeInstancesPages iterates over the pages of a DescribeInstances operation,
@@ -7378,12 +9352,37 @@ func (c *EC2) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstanc
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeInstancesPages(input *DescribeInstancesInput, fn func(*DescribeInstancesOutput, bool) bool) error {
+ return c.DescribeInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeInstancesPagesWithContext same as DescribeInstancesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstancesPagesWithContext(ctx aws.Context, input *DescribeInstancesInput, fn func(*DescribeInstancesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeInstancesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeInternetGateways = "DescribeInternetGateways"
@@ -7442,8 +9441,23 @@ func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways
func (c *EC2) DescribeInternetGateways(input *DescribeInternetGatewaysInput) (*DescribeInternetGatewaysOutput, error) {
req, out := c.DescribeInternetGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeInternetGatewaysWithContext is the same as DescribeInternetGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInternetGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInternetGatewaysWithContext(ctx aws.Context, input *DescribeInternetGatewaysInput, opts ...request.Option) (*DescribeInternetGatewaysOutput, error) {
+ req, out := c.DescribeInternetGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeKeyPairs = "DescribeKeyPairs"
@@ -7505,8 +9519,23 @@ func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs
func (c *EC2) DescribeKeyPairs(input *DescribeKeyPairsInput) (*DescribeKeyPairsOutput, error) {
req, out := c.DescribeKeyPairsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeKeyPairsWithContext is the same as DescribeKeyPairs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeKeyPairs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeKeyPairsWithContext(ctx aws.Context, input *DescribeKeyPairsInput, opts ...request.Option) (*DescribeKeyPairsOutput, error) {
+ req, out := c.DescribeKeyPairsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeMovingAddresses = "DescribeMovingAddresses"
@@ -7567,8 +9596,23 @@ func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses
func (c *EC2) DescribeMovingAddresses(input *DescribeMovingAddressesInput) (*DescribeMovingAddressesOutput, error) {
req, out := c.DescribeMovingAddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeMovingAddressesWithContext is the same as DescribeMovingAddresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeMovingAddresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeMovingAddressesWithContext(ctx aws.Context, input *DescribeMovingAddressesInput, opts ...request.Option) (*DescribeMovingAddressesOutput, error) {
+ req, out := c.DescribeMovingAddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeNatGateways = "DescribeNatGateways"
@@ -7633,8 +9677,23 @@ func (c *EC2) DescribeNatGatewaysRequest(input *DescribeNatGatewaysInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways
func (c *EC2) DescribeNatGateways(input *DescribeNatGatewaysInput) (*DescribeNatGatewaysOutput, error) {
req, out := c.DescribeNatGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeNatGatewaysWithContext is the same as DescribeNatGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNatGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNatGatewaysWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, opts ...request.Option) (*DescribeNatGatewaysOutput, error) {
+ req, out := c.DescribeNatGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeNatGatewaysPages iterates over the pages of a DescribeNatGateways operation,
@@ -7654,12 +9713,37 @@ func (c *EC2) DescribeNatGateways(input *DescribeNatGatewaysInput) (*DescribeNat
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeNatGatewaysPages(input *DescribeNatGatewaysInput, fn func(p *DescribeNatGatewaysOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeNatGatewaysRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeNatGatewaysOutput), lastPage)
- })
+func (c *EC2) DescribeNatGatewaysPages(input *DescribeNatGatewaysInput, fn func(*DescribeNatGatewaysOutput, bool) bool) error {
+ return c.DescribeNatGatewaysPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeNatGatewaysPagesWithContext same as DescribeNatGatewaysPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNatGatewaysPagesWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, fn func(*DescribeNatGatewaysOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeNatGatewaysInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeNatGatewaysRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeNatGatewaysOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeNetworkAcls = "DescribeNetworkAcls"
@@ -7721,8 +9805,23 @@ func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls
func (c *EC2) DescribeNetworkAcls(input *DescribeNetworkAclsInput) (*DescribeNetworkAclsOutput, error) {
req, out := c.DescribeNetworkAclsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeNetworkAclsWithContext is the same as DescribeNetworkAcls with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNetworkAcls for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNetworkAclsWithContext(ctx aws.Context, input *DescribeNetworkAclsInput, opts ...request.Option) (*DescribeNetworkAclsOutput, error) {
+ req, out := c.DescribeNetworkAclsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute"
@@ -7782,8 +9881,98 @@ func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInt
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute
func (c *EC2) DescribeNetworkInterfaceAttribute(input *DescribeNetworkInterfaceAttributeInput) (*DescribeNetworkInterfaceAttributeOutput, error) {
req, out := c.DescribeNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeNetworkInterfaceAttributeWithContext is the same as DescribeNetworkInterfaceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNetworkInterfaceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNetworkInterfaceAttributeWithContext(ctx aws.Context, input *DescribeNetworkInterfaceAttributeInput, opts ...request.Option) (*DescribeNetworkInterfaceAttributeOutput, error) {
+ req, out := c.DescribeNetworkInterfaceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissions"
+
+// DescribeNetworkInterfacePermissionsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeNetworkInterfacePermissions operation. The "output" return
+// value can be used to capture response data after the request's "Send" method
+// is called.
+//
+// See DescribeNetworkInterfacePermissions for usage and error information.
+//
+// Creating a request object using this method should be used when you want to inject
+// custom logic into the request's lifecycle using a custom handler, or if you want to
+// access properties on the request object before or after sending the request. If
+// you just want the service response, call the DescribeNetworkInterfacePermissions method directly
+// instead.
+//
+// Note: You must call the "Send" method on the returned request object in order
+// to execute the request.
+//
+// // Example sending a request using the DescribeNetworkInterfacePermissionsRequest method.
+// req, resp := client.DescribeNetworkInterfacePermissionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions
+func (c *EC2) DescribeNetworkInterfacePermissionsRequest(input *DescribeNetworkInterfacePermissionsInput) (req *request.Request, output *DescribeNetworkInterfacePermissionsOutput) {
+ op := &request.Operation{
+ Name: opDescribeNetworkInterfacePermissions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeNetworkInterfacePermissionsInput{}
+ }
+
+ output = &DescribeNetworkInterfacePermissionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeNetworkInterfacePermissions API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the permissions for your network interfaces.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeNetworkInterfacePermissions for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions
+func (c *EC2) DescribeNetworkInterfacePermissions(input *DescribeNetworkInterfacePermissionsInput) (*DescribeNetworkInterfacePermissionsOutput, error) {
+ req, out := c.DescribeNetworkInterfacePermissionsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeNetworkInterfacePermissionsWithContext is the same as DescribeNetworkInterfacePermissions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNetworkInterfacePermissions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNetworkInterfacePermissionsWithContext(ctx aws.Context, input *DescribeNetworkInterfacePermissionsInput, opts ...request.Option) (*DescribeNetworkInterfacePermissionsOutput, error) {
+ req, out := c.DescribeNetworkInterfacePermissionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces"
@@ -7842,8 +10031,23 @@ func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces
func (c *EC2) DescribeNetworkInterfaces(input *DescribeNetworkInterfacesInput) (*DescribeNetworkInterfacesOutput, error) {
req, out := c.DescribeNetworkInterfacesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeNetworkInterfacesWithContext is the same as DescribeNetworkInterfaces with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeNetworkInterfaces for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeNetworkInterfacesWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, opts ...request.Option) (*DescribeNetworkInterfacesOutput, error) {
+ req, out := c.DescribeNetworkInterfacesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribePlacementGroups = "DescribePlacementGroups"
@@ -7904,8 +10108,23 @@ func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups
func (c *EC2) DescribePlacementGroups(input *DescribePlacementGroupsInput) (*DescribePlacementGroupsOutput, error) {
req, out := c.DescribePlacementGroupsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribePlacementGroupsWithContext is the same as DescribePlacementGroups with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribePlacementGroups for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribePlacementGroupsWithContext(ctx aws.Context, input *DescribePlacementGroupsInput, opts ...request.Option) (*DescribePlacementGroupsOutput, error) {
+ req, out := c.DescribePlacementGroupsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribePrefixLists = "DescribePrefixLists"
@@ -7968,8 +10187,23 @@ func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists
func (c *EC2) DescribePrefixLists(input *DescribePrefixListsInput) (*DescribePrefixListsOutput, error) {
req, out := c.DescribePrefixListsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribePrefixListsWithContext is the same as DescribePrefixLists with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribePrefixLists for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribePrefixListsWithContext(ctx aws.Context, input *DescribePrefixListsInput, opts ...request.Option) (*DescribePrefixListsOutput, error) {
+ req, out := c.DescribePrefixListsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeRegions = "DescribeRegions"
@@ -8031,8 +10265,23 @@ func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions
func (c *EC2) DescribeRegions(input *DescribeRegionsInput) (*DescribeRegionsOutput, error) {
req, out := c.DescribeRegionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeRegionsWithContext is the same as DescribeRegions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeRegions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeRegionsWithContext(ctx aws.Context, input *DescribeRegionsInput, opts ...request.Option) (*DescribeRegionsOutput, error) {
+ req, out := c.DescribeRegionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeReservedInstances = "DescribeReservedInstances"
@@ -8094,8 +10343,23 @@ func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances
func (c *EC2) DescribeReservedInstances(input *DescribeReservedInstancesInput) (*DescribeReservedInstancesOutput, error) {
req, out := c.DescribeReservedInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeReservedInstancesWithContext is the same as DescribeReservedInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeReservedInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesWithContext(ctx aws.Context, input *DescribeReservedInstancesInput, opts ...request.Option) (*DescribeReservedInstancesOutput, error) {
+ req, out := c.DescribeReservedInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings"
@@ -8175,8 +10439,23 @@ func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedIn
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings
func (c *EC2) DescribeReservedInstancesListings(input *DescribeReservedInstancesListingsInput) (*DescribeReservedInstancesListingsOutput, error) {
req, out := c.DescribeReservedInstancesListingsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeReservedInstancesListingsWithContext is the same as DescribeReservedInstancesListings with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeReservedInstancesListings for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesListingsWithContext(ctx aws.Context, input *DescribeReservedInstancesListingsInput, opts ...request.Option) (*DescribeReservedInstancesListingsOutput, error) {
+ req, out := c.DescribeReservedInstancesListingsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModifications"
@@ -8247,8 +10526,23 @@ func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReser
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications
func (c *EC2) DescribeReservedInstancesModifications(input *DescribeReservedInstancesModificationsInput) (*DescribeReservedInstancesModificationsOutput, error) {
req, out := c.DescribeReservedInstancesModificationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeReservedInstancesModificationsWithContext is the same as DescribeReservedInstancesModifications with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeReservedInstancesModifications for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesModificationsWithContext(ctx aws.Context, input *DescribeReservedInstancesModificationsInput, opts ...request.Option) (*DescribeReservedInstancesModificationsOutput, error) {
+ req, out := c.DescribeReservedInstancesModificationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeReservedInstancesModificationsPages iterates over the pages of a DescribeReservedInstancesModifications operation,
@@ -8268,12 +10562,37 @@ func (c *EC2) DescribeReservedInstancesModifications(input *DescribeReservedInst
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeReservedInstancesModificationsPages(input *DescribeReservedInstancesModificationsInput, fn func(*DescribeReservedInstancesModificationsOutput, bool) bool) error {
+ return c.DescribeReservedInstancesModificationsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeReservedInstancesModificationsPagesWithContext same as DescribeReservedInstancesModificationsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesModificationsPagesWithContext(ctx aws.Context, input *DescribeReservedInstancesModificationsInput, fn func(*DescribeReservedInstancesModificationsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeReservedInstancesModificationsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeReservedInstancesModificationsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeReservedInstancesModificationsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings"
@@ -8349,8 +10668,23 @@ func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings
func (c *EC2) DescribeReservedInstancesOfferings(input *DescribeReservedInstancesOfferingsInput) (*DescribeReservedInstancesOfferingsOutput, error) {
req, out := c.DescribeReservedInstancesOfferingsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeReservedInstancesOfferingsWithContext is the same as DescribeReservedInstancesOfferings with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeReservedInstancesOfferings for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesOfferingsWithContext(ctx aws.Context, input *DescribeReservedInstancesOfferingsInput, opts ...request.Option) (*DescribeReservedInstancesOfferingsOutput, error) {
+ req, out := c.DescribeReservedInstancesOfferingsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeReservedInstancesOfferingsPages iterates over the pages of a DescribeReservedInstancesOfferings operation,
@@ -8370,12 +10704,37 @@ func (c *EC2) DescribeReservedInstancesOfferings(input *DescribeReservedInstance
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeReservedInstancesOfferingsPages(input *DescribeReservedInstancesOfferingsInput, fn func(*DescribeReservedInstancesOfferingsOutput, bool) bool) error {
+ return c.DescribeReservedInstancesOfferingsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeReservedInstancesOfferingsPagesWithContext same as DescribeReservedInstancesOfferingsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeReservedInstancesOfferingsPagesWithContext(ctx aws.Context, input *DescribeReservedInstancesOfferingsInput, fn func(*DescribeReservedInstancesOfferingsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeReservedInstancesOfferingsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeReservedInstancesOfferingsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeReservedInstancesOfferingsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeRouteTables = "DescribeRouteTables"
@@ -8442,8 +10801,23 @@ func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables
func (c *EC2) DescribeRouteTables(input *DescribeRouteTablesInput) (*DescribeRouteTablesOutput, error) {
req, out := c.DescribeRouteTablesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeRouteTablesWithContext is the same as DescribeRouteTables with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeRouteTables for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeRouteTablesWithContext(ctx aws.Context, input *DescribeRouteTablesInput, opts ...request.Option) (*DescribeRouteTablesOutput, error) {
+ req, out := c.DescribeRouteTablesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvailability"
@@ -8510,8 +10884,23 @@ func (c *EC2) DescribeScheduledInstanceAvailabilityRequest(input *DescribeSchedu
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability
func (c *EC2) DescribeScheduledInstanceAvailability(input *DescribeScheduledInstanceAvailabilityInput) (*DescribeScheduledInstanceAvailabilityOutput, error) {
req, out := c.DescribeScheduledInstanceAvailabilityRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeScheduledInstanceAvailabilityWithContext is the same as DescribeScheduledInstanceAvailability with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeScheduledInstanceAvailability for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeScheduledInstanceAvailabilityWithContext(ctx aws.Context, input *DescribeScheduledInstanceAvailabilityInput, opts ...request.Option) (*DescribeScheduledInstanceAvailabilityOutput, error) {
+ req, out := c.DescribeScheduledInstanceAvailabilityRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeScheduledInstances = "DescribeScheduledInstances"
@@ -8570,8 +10959,23 @@ func (c *EC2) DescribeScheduledInstancesRequest(input *DescribeScheduledInstance
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances
func (c *EC2) DescribeScheduledInstances(input *DescribeScheduledInstancesInput) (*DescribeScheduledInstancesOutput, error) {
req, out := c.DescribeScheduledInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeScheduledInstancesWithContext is the same as DescribeScheduledInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeScheduledInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeScheduledInstancesWithContext(ctx aws.Context, input *DescribeScheduledInstancesInput, opts ...request.Option) (*DescribeScheduledInstancesOutput, error) {
+ req, out := c.DescribeScheduledInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences"
@@ -8631,8 +11035,23 @@ func (c *EC2) DescribeSecurityGroupReferencesRequest(input *DescribeSecurityGrou
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences
func (c *EC2) DescribeSecurityGroupReferences(input *DescribeSecurityGroupReferencesInput) (*DescribeSecurityGroupReferencesOutput, error) {
req, out := c.DescribeSecurityGroupReferencesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSecurityGroupReferencesWithContext is the same as DescribeSecurityGroupReferences with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSecurityGroupReferences for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSecurityGroupReferencesWithContext(ctx aws.Context, input *DescribeSecurityGroupReferencesInput, opts ...request.Option) (*DescribeSecurityGroupReferencesOutput, error) {
+ req, out := c.DescribeSecurityGroupReferencesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSecurityGroups = "DescribeSecurityGroups"
@@ -8698,8 +11117,23 @@ func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups
func (c *EC2) DescribeSecurityGroups(input *DescribeSecurityGroupsInput) (*DescribeSecurityGroupsOutput, error) {
req, out := c.DescribeSecurityGroupsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSecurityGroupsWithContext is the same as DescribeSecurityGroups with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSecurityGroups for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSecurityGroupsWithContext(ctx aws.Context, input *DescribeSecurityGroupsInput, opts ...request.Option) (*DescribeSecurityGroupsOutput, error) {
+ req, out := c.DescribeSecurityGroupsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute"
@@ -8762,8 +11196,23 @@ func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute
func (c *EC2) DescribeSnapshotAttribute(input *DescribeSnapshotAttributeInput) (*DescribeSnapshotAttributeOutput, error) {
req, out := c.DescribeSnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSnapshotAttributeWithContext is the same as DescribeSnapshotAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSnapshotAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSnapshotAttributeWithContext(ctx aws.Context, input *DescribeSnapshotAttributeInput, opts ...request.Option) (*DescribeSnapshotAttributeOutput, error) {
+ req, out := c.DescribeSnapshotAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSnapshots = "DescribeSnapshots"
@@ -8873,8 +11322,23 @@ func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots
func (c *EC2) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) {
req, out := c.DescribeSnapshotsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSnapshotsWithContext is the same as DescribeSnapshots with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSnapshots for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSnapshotsWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.Option) (*DescribeSnapshotsOutput, error) {
+ req, out := c.DescribeSnapshotsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeSnapshotsPages iterates over the pages of a DescribeSnapshots operation,
@@ -8894,12 +11358,37 @@ func (c *EC2) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapsho
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeSnapshotsPages(input *DescribeSnapshotsInput, fn func(*DescribeSnapshotsOutput, bool) bool) error {
+ return c.DescribeSnapshotsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeSnapshotsPagesWithContext same as DescribeSnapshotsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSnapshotsPagesWithContext(ctx aws.Context, input *DescribeSnapshotsInput, fn func(*DescribeSnapshotsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeSnapshotsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSnapshotsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeSnapshotsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription"
@@ -8960,8 +11449,23 @@ func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafee
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription
func (c *EC2) DescribeSpotDatafeedSubscription(input *DescribeSpotDatafeedSubscriptionInput) (*DescribeSpotDatafeedSubscriptionOutput, error) {
req, out := c.DescribeSpotDatafeedSubscriptionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotDatafeedSubscriptionWithContext is the same as DescribeSpotDatafeedSubscription with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotDatafeedSubscription for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotDatafeedSubscriptionWithContext(ctx aws.Context, input *DescribeSpotDatafeedSubscriptionInput, opts ...request.Option) (*DescribeSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.DescribeSpotDatafeedSubscriptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances"
@@ -9020,8 +11524,23 @@ func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstance
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances
func (c *EC2) DescribeSpotFleetInstances(input *DescribeSpotFleetInstancesInput) (*DescribeSpotFleetInstancesOutput, error) {
req, out := c.DescribeSpotFleetInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotFleetInstancesWithContext is the same as DescribeSpotFleetInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotFleetInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotFleetInstancesWithContext(ctx aws.Context, input *DescribeSpotFleetInstancesInput, opts ...request.Option) (*DescribeSpotFleetInstancesOutput, error) {
+ req, out := c.DescribeSpotFleetInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory"
@@ -9085,8 +11604,23 @@ func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetReq
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory
func (c *EC2) DescribeSpotFleetRequestHistory(input *DescribeSpotFleetRequestHistoryInput) (*DescribeSpotFleetRequestHistoryOutput, error) {
req, out := c.DescribeSpotFleetRequestHistoryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotFleetRequestHistoryWithContext is the same as DescribeSpotFleetRequestHistory with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotFleetRequestHistory for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotFleetRequestHistoryWithContext(ctx aws.Context, input *DescribeSpotFleetRequestHistoryInput, opts ...request.Option) (*DescribeSpotFleetRequestHistoryOutput, error) {
+ req, out := c.DescribeSpotFleetRequestHistoryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests"
@@ -9154,8 +11688,23 @@ func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests
func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) (*DescribeSpotFleetRequestsOutput, error) {
req, out := c.DescribeSpotFleetRequestsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotFleetRequestsWithContext is the same as DescribeSpotFleetRequests with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotFleetRequests for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotFleetRequestsWithContext(ctx aws.Context, input *DescribeSpotFleetRequestsInput, opts ...request.Option) (*DescribeSpotFleetRequestsOutput, error) {
+ req, out := c.DescribeSpotFleetRequestsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeSpotFleetRequestsPages iterates over the pages of a DescribeSpotFleetRequests operation,
@@ -9175,12 +11724,37 @@ func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) (
// return pageNum <= 3
// })
//
-func (c *EC2) DescribeSpotFleetRequestsPages(input *DescribeSpotFleetRequestsInput, fn func(p *DescribeSpotFleetRequestsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeSpotFleetRequestsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeSpotFleetRequestsOutput), lastPage)
- })
+func (c *EC2) DescribeSpotFleetRequestsPages(input *DescribeSpotFleetRequestsInput, fn func(*DescribeSpotFleetRequestsOutput, bool) bool) error {
+ return c.DescribeSpotFleetRequestsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeSpotFleetRequestsPagesWithContext same as DescribeSpotFleetRequestsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotFleetRequestsPagesWithContext(ctx aws.Context, input *DescribeSpotFleetRequestsInput, fn func(*DescribeSpotFleetRequestsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeSpotFleetRequestsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSpotFleetRequestsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeSpotFleetRequestsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests"
@@ -9253,8 +11827,23 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests
func (c *EC2) DescribeSpotInstanceRequests(input *DescribeSpotInstanceRequestsInput) (*DescribeSpotInstanceRequestsOutput, error) {
req, out := c.DescribeSpotInstanceRequestsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotInstanceRequestsWithContext is the same as DescribeSpotInstanceRequests with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotInstanceRequests for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotInstanceRequestsWithContext(ctx aws.Context, input *DescribeSpotInstanceRequestsInput, opts ...request.Option) (*DescribeSpotInstanceRequestsOutput, error) {
+ req, out := c.DescribeSpotInstanceRequestsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory"
@@ -9326,8 +11915,23 @@ func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory
func (c *EC2) DescribeSpotPriceHistory(input *DescribeSpotPriceHistoryInput) (*DescribeSpotPriceHistoryOutput, error) {
req, out := c.DescribeSpotPriceHistoryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSpotPriceHistoryWithContext is the same as DescribeSpotPriceHistory with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSpotPriceHistory for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotPriceHistoryWithContext(ctx aws.Context, input *DescribeSpotPriceHistoryInput, opts ...request.Option) (*DescribeSpotPriceHistoryOutput, error) {
+ req, out := c.DescribeSpotPriceHistoryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeSpotPriceHistoryPages iterates over the pages of a DescribeSpotPriceHistory operation,
@@ -9347,12 +11951,37 @@ func (c *EC2) DescribeSpotPriceHistory(input *DescribeSpotPriceHistoryInput) (*D
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeSpotPriceHistoryPages(input *DescribeSpotPriceHistoryInput, fn func(*DescribeSpotPriceHistoryOutput, bool) bool) error {
+ return c.DescribeSpotPriceHistoryPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeSpotPriceHistoryPagesWithContext same as DescribeSpotPriceHistoryPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSpotPriceHistoryPagesWithContext(ctx aws.Context, input *DescribeSpotPriceHistoryInput, fn func(*DescribeSpotPriceHistoryOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeSpotPriceHistoryInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSpotPriceHistoryRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeSpotPriceHistoryOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups"
@@ -9414,8 +12043,23 @@ func (c *EC2) DescribeStaleSecurityGroupsRequest(input *DescribeStaleSecurityGro
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups
func (c *EC2) DescribeStaleSecurityGroups(input *DescribeStaleSecurityGroupsInput) (*DescribeStaleSecurityGroupsOutput, error) {
req, out := c.DescribeStaleSecurityGroupsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeStaleSecurityGroupsWithContext is the same as DescribeStaleSecurityGroups with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeStaleSecurityGroups for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeStaleSecurityGroupsWithContext(ctx aws.Context, input *DescribeStaleSecurityGroupsInput, opts ...request.Option) (*DescribeStaleSecurityGroupsOutput, error) {
+ req, out := c.DescribeStaleSecurityGroupsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeSubnets = "DescribeSubnets"
@@ -9477,8 +12121,23 @@ func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets
func (c *EC2) DescribeSubnets(input *DescribeSubnetsInput) (*DescribeSubnetsOutput, error) {
req, out := c.DescribeSubnetsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeSubnetsWithContext is the same as DescribeSubnets with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeSubnets for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeSubnetsWithContext(ctx aws.Context, input *DescribeSubnetsInput, opts ...request.Option) (*DescribeSubnetsOutput, error) {
+ req, out := c.DescribeSubnetsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeTags = "DescribeTags"
@@ -9546,8 +12205,23 @@ func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags
func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
req, out := c.DescribeTagsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeTagsWithContext is the same as DescribeTags with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeTags for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
+ req, out := c.DescribeTagsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeTagsPages iterates over the pages of a DescribeTags operation,
@@ -9567,12 +12241,37 @@ func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error {
+ return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeTagsPagesWithContext same as DescribeTagsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeTagsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeTagsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeVolumeAttribute = "DescribeVolumeAttribute"
@@ -9635,8 +12334,23 @@ func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute
func (c *EC2) DescribeVolumeAttribute(input *DescribeVolumeAttributeInput) (*DescribeVolumeAttributeOutput, error) {
req, out := c.DescribeVolumeAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVolumeAttributeWithContext is the same as DescribeVolumeAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVolumeAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumeAttributeWithContext(ctx aws.Context, input *DescribeVolumeAttributeInput, opts ...request.Option) (*DescribeVolumeAttributeOutput, error) {
+ req, out := c.DescribeVolumeAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVolumeStatus = "DescribeVolumeStatus"
@@ -9735,8 +12449,23 @@ func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus
func (c *EC2) DescribeVolumeStatus(input *DescribeVolumeStatusInput) (*DescribeVolumeStatusOutput, error) {
req, out := c.DescribeVolumeStatusRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVolumeStatusWithContext is the same as DescribeVolumeStatus with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVolumeStatus for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumeStatusWithContext(ctx aws.Context, input *DescribeVolumeStatusInput, opts ...request.Option) (*DescribeVolumeStatusOutput, error) {
+ req, out := c.DescribeVolumeStatusRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeVolumeStatusPages iterates over the pages of a DescribeVolumeStatus operation,
@@ -9756,12 +12485,37 @@ func (c *EC2) DescribeVolumeStatus(input *DescribeVolumeStatusInput) (*DescribeV
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeVolumeStatusPages(input *DescribeVolumeStatusInput, fn func(*DescribeVolumeStatusOutput, bool) bool) error {
+ return c.DescribeVolumeStatusPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeVolumeStatusPagesWithContext same as DescribeVolumeStatusPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumeStatusPagesWithContext(ctx aws.Context, input *DescribeVolumeStatusInput, fn func(*DescribeVolumeStatusOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeVolumeStatusInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumeStatusRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeVolumeStatusOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeVolumes = "DescribeVolumes"
@@ -9836,8 +12590,23 @@ func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes
func (c *EC2) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutput, error) {
req, out := c.DescribeVolumesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVolumesWithContext is the same as DescribeVolumes with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVolumes for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumesWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.Option) (*DescribeVolumesOutput, error) {
+ req, out := c.DescribeVolumesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeVolumesPages iterates over the pages of a DescribeVolumes operation,
@@ -9857,12 +12626,37 @@ func (c *EC2) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutp
// return pageNum <= 3
// })
//
-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)
- })
+func (c *EC2) DescribeVolumesPages(input *DescribeVolumesInput, fn func(*DescribeVolumesOutput, bool) bool) error {
+ return c.DescribeVolumesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeVolumesPagesWithContext same as DescribeVolumesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumesPagesWithContext(ctx aws.Context, input *DescribeVolumesInput, fn func(*DescribeVolumesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeVolumesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeVolumesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeVolumesModifications = "DescribeVolumesModifications"
@@ -9933,8 +12727,23 @@ func (c *EC2) DescribeVolumesModificationsRequest(input *DescribeVolumesModifica
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications
func (c *EC2) DescribeVolumesModifications(input *DescribeVolumesModificationsInput) (*DescribeVolumesModificationsOutput, error) {
req, out := c.DescribeVolumesModificationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVolumesModificationsWithContext is the same as DescribeVolumesModifications with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVolumesModifications for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVolumesModificationsWithContext(ctx aws.Context, input *DescribeVolumesModificationsInput, opts ...request.Option) (*DescribeVolumesModificationsOutput, error) {
+ req, out := c.DescribeVolumesModificationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcAttribute = "DescribeVpcAttribute"
@@ -9994,8 +12803,23 @@ func (c *EC2) DescribeVpcAttributeRequest(input *DescribeVpcAttributeInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute
func (c *EC2) DescribeVpcAttribute(input *DescribeVpcAttributeInput) (*DescribeVpcAttributeOutput, error) {
req, out := c.DescribeVpcAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcAttributeWithContext is the same as DescribeVpcAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcAttributeWithContext(ctx aws.Context, input *DescribeVpcAttributeInput, opts ...request.Option) (*DescribeVpcAttributeOutput, error) {
+ req, out := c.DescribeVpcAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcClassicLink = "DescribeVpcClassicLink"
@@ -10054,8 +12878,23 @@ func (c *EC2) DescribeVpcClassicLinkRequest(input *DescribeVpcClassicLinkInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink
func (c *EC2) DescribeVpcClassicLink(input *DescribeVpcClassicLinkInput) (*DescribeVpcClassicLinkOutput, error) {
req, out := c.DescribeVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcClassicLinkWithContext is the same as DescribeVpcClassicLink with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcClassicLink for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcClassicLinkWithContext(ctx aws.Context, input *DescribeVpcClassicLinkInput, opts ...request.Option) (*DescribeVpcClassicLinkOutput, error) {
+ req, out := c.DescribeVpcClassicLinkRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport"
@@ -10107,8 +12946,8 @@ func (c *EC2) DescribeVpcClassicLinkDnsSupportRequest(input *DescribeVpcClassicL
// the DNS hostname of a linked EC2-Classic instance resolves to its private
// IP address when addressed from an instance in the VPC to which it's linked.
// Similarly, the DNS hostname of an instance in a VPC resolves to its private
-// IP address when addressed from a linked EC2-Classic instance. For more information
-// about ClassicLink, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
+// IP address when addressed from a linked EC2-Classic instance. For more information,
+// see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -10120,8 +12959,23 @@ func (c *EC2) DescribeVpcClassicLinkDnsSupportRequest(input *DescribeVpcClassicL
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport
func (c *EC2) DescribeVpcClassicLinkDnsSupport(input *DescribeVpcClassicLinkDnsSupportInput) (*DescribeVpcClassicLinkDnsSupportOutput, error) {
req, out := c.DescribeVpcClassicLinkDnsSupportRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcClassicLinkDnsSupportWithContext is the same as DescribeVpcClassicLinkDnsSupport with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcClassicLinkDnsSupport for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *DescribeVpcClassicLinkDnsSupportInput, opts ...request.Option) (*DescribeVpcClassicLinkDnsSupportOutput, error) {
+ req, out := c.DescribeVpcClassicLinkDnsSupportRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices"
@@ -10181,8 +13035,23 @@ func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServi
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices
func (c *EC2) DescribeVpcEndpointServices(input *DescribeVpcEndpointServicesInput) (*DescribeVpcEndpointServicesOutput, error) {
req, out := c.DescribeVpcEndpointServicesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcEndpointServicesWithContext is the same as DescribeVpcEndpointServices with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcEndpointServices for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcEndpointServicesWithContext(ctx aws.Context, input *DescribeVpcEndpointServicesInput, opts ...request.Option) (*DescribeVpcEndpointServicesOutput, error) {
+ req, out := c.DescribeVpcEndpointServicesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcEndpoints = "DescribeVpcEndpoints"
@@ -10241,8 +13110,23 @@ func (c *EC2) DescribeVpcEndpointsRequest(input *DescribeVpcEndpointsInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints
func (c *EC2) DescribeVpcEndpoints(input *DescribeVpcEndpointsInput) (*DescribeVpcEndpointsOutput, error) {
req, out := c.DescribeVpcEndpointsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcEndpointsWithContext is the same as DescribeVpcEndpoints with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcEndpoints for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcEndpointsWithContext(ctx aws.Context, input *DescribeVpcEndpointsInput, opts ...request.Option) (*DescribeVpcEndpointsOutput, error) {
+ req, out := c.DescribeVpcEndpointsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections"
@@ -10301,8 +13185,23 @@ func (c *EC2) DescribeVpcPeeringConnectionsRequest(input *DescribeVpcPeeringConn
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections
func (c *EC2) DescribeVpcPeeringConnections(input *DescribeVpcPeeringConnectionsInput) (*DescribeVpcPeeringConnectionsOutput, error) {
req, out := c.DescribeVpcPeeringConnectionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcPeeringConnectionsWithContext is the same as DescribeVpcPeeringConnections with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcPeeringConnections for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcPeeringConnectionsWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.Option) (*DescribeVpcPeeringConnectionsOutput, error) {
+ req, out := c.DescribeVpcPeeringConnectionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpcs = "DescribeVpcs"
@@ -10361,8 +13260,23 @@ func (c *EC2) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs
func (c *EC2) DescribeVpcs(input *DescribeVpcsInput) (*DescribeVpcsOutput, error) {
req, out := c.DescribeVpcsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpcsWithContext is the same as DescribeVpcs with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcs for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcsWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.Option) (*DescribeVpcsOutput, error) {
+ req, out := c.DescribeVpcsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpnConnections = "DescribeVpnConnections"
@@ -10425,8 +13339,23 @@ func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections
func (c *EC2) DescribeVpnConnections(input *DescribeVpnConnectionsInput) (*DescribeVpnConnectionsOutput, error) {
req, out := c.DescribeVpnConnectionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpnConnectionsWithContext is the same as DescribeVpnConnections with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpnConnections for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpnConnectionsWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.Option) (*DescribeVpnConnectionsOutput, error) {
+ req, out := c.DescribeVpnConnectionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeVpnGateways = "DescribeVpnGateways"
@@ -10489,8 +13418,23 @@ func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways
func (c *EC2) DescribeVpnGateways(input *DescribeVpnGatewaysInput) (*DescribeVpnGatewaysOutput, error) {
req, out := c.DescribeVpnGatewaysRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeVpnGatewaysWithContext is the same as DescribeVpnGateways with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpnGateways for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpnGatewaysWithContext(ctx aws.Context, input *DescribeVpnGatewaysInput, opts ...request.Option) (*DescribeVpnGatewaysOutput, error) {
+ req, out := c.DescribeVpnGatewaysRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachClassicLinkVpc = "DetachClassicLinkVpc"
@@ -10551,8 +13495,23 @@ func (c *EC2) DetachClassicLinkVpcRequest(input *DetachClassicLinkVpcInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc
func (c *EC2) DetachClassicLinkVpc(input *DetachClassicLinkVpcInput) (*DetachClassicLinkVpcOutput, error) {
req, out := c.DetachClassicLinkVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachClassicLinkVpcWithContext is the same as DetachClassicLinkVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachClassicLinkVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachClassicLinkVpcWithContext(ctx aws.Context, input *DetachClassicLinkVpcInput, opts ...request.Option) (*DetachClassicLinkVpcOutput, error) {
+ req, out := c.DetachClassicLinkVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachInternetGateway = "DetachInternetGateway"
@@ -10604,7 +13563,7 @@ func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (r
//
// 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.
+// Elastic IP addresses or public IPv4 addresses.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -10615,8 +13574,23 @@ func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway
func (c *EC2) DetachInternetGateway(input *DetachInternetGatewayInput) (*DetachInternetGatewayOutput, error) {
req, out := c.DetachInternetGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachInternetGatewayWithContext is the same as DetachInternetGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachInternetGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachInternetGatewayWithContext(ctx aws.Context, input *DetachInternetGatewayInput, opts ...request.Option) (*DetachInternetGatewayOutput, error) {
+ req, out := c.DetachInternetGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachNetworkInterface = "DetachNetworkInterface"
@@ -10677,8 +13651,23 @@ func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface
func (c *EC2) DetachNetworkInterface(input *DetachNetworkInterfaceInput) (*DetachNetworkInterfaceOutput, error) {
req, out := c.DetachNetworkInterfaceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachNetworkInterfaceWithContext is the same as DetachNetworkInterface with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachNetworkInterface for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachNetworkInterfaceWithContext(ctx aws.Context, input *DetachNetworkInterfaceInput, opts ...request.Option) (*DetachNetworkInterfaceOutput, error) {
+ req, out := c.DetachNetworkInterfaceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachVolume = "DetachVolume"
@@ -10750,8 +13739,23 @@ func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume
func (c *EC2) DetachVolume(input *DetachVolumeInput) (*VolumeAttachment, error) {
req, out := c.DetachVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachVolumeWithContext is the same as DetachVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachVolumeWithContext(ctx aws.Context, input *DetachVolumeInput, opts ...request.Option) (*VolumeAttachment, error) {
+ req, out := c.DetachVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDetachVpnGateway = "DetachVpnGateway"
@@ -10819,8 +13823,23 @@ func (c *EC2) DetachVpnGatewayRequest(input *DetachVpnGatewayInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway
func (c *EC2) DetachVpnGateway(input *DetachVpnGatewayInput) (*DetachVpnGatewayOutput, error) {
req, out := c.DetachVpnGatewayRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DetachVpnGatewayWithContext is the same as DetachVpnGateway with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DetachVpnGateway for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DetachVpnGatewayWithContext(ctx aws.Context, input *DetachVpnGatewayInput, opts ...request.Option) (*DetachVpnGatewayOutput, error) {
+ req, out := c.DetachVpnGatewayRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation"
@@ -10882,8 +13901,23 @@ func (c *EC2) DisableVgwRoutePropagationRequest(input *DisableVgwRoutePropagatio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation
func (c *EC2) DisableVgwRoutePropagation(input *DisableVgwRoutePropagationInput) (*DisableVgwRoutePropagationOutput, error) {
req, out := c.DisableVgwRoutePropagationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisableVgwRoutePropagationWithContext is the same as DisableVgwRoutePropagation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisableVgwRoutePropagation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisableVgwRoutePropagationWithContext(ctx aws.Context, input *DisableVgwRoutePropagationInput, opts ...request.Option) (*DisableVgwRoutePropagationOutput, error) {
+ req, out := c.DisableVgwRoutePropagationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisableVpcClassicLink = "DisableVpcClassicLink"
@@ -10943,8 +13977,23 @@ func (c *EC2) DisableVpcClassicLinkRequest(input *DisableVpcClassicLinkInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink
func (c *EC2) DisableVpcClassicLink(input *DisableVpcClassicLinkInput) (*DisableVpcClassicLinkOutput, error) {
req, out := c.DisableVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisableVpcClassicLinkWithContext is the same as DisableVpcClassicLink with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisableVpcClassicLink for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisableVpcClassicLinkWithContext(ctx aws.Context, input *DisableVpcClassicLinkInput, opts ...request.Option) (*DisableVpcClassicLinkOutput, error) {
+ req, out := c.DisableVpcClassicLinkRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport"
@@ -11007,8 +14056,23 @@ func (c *EC2) DisableVpcClassicLinkDnsSupportRequest(input *DisableVpcClassicLin
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport
func (c *EC2) DisableVpcClassicLinkDnsSupport(input *DisableVpcClassicLinkDnsSupportInput) (*DisableVpcClassicLinkDnsSupportOutput, error) {
req, out := c.DisableVpcClassicLinkDnsSupportRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisableVpcClassicLinkDnsSupportWithContext is the same as DisableVpcClassicLinkDnsSupport with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisableVpcClassicLinkDnsSupport for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *DisableVpcClassicLinkDnsSupportInput, opts ...request.Option) (*DisableVpcClassicLinkDnsSupportOutput, error) {
+ req, out := c.DisableVpcClassicLinkDnsSupportRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateAddress = "DisassociateAddress"
@@ -11077,8 +14141,23 @@ func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress
func (c *EC2) DisassociateAddress(input *DisassociateAddressInput) (*DisassociateAddressOutput, error) {
req, out := c.DisassociateAddressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateAddressWithContext is the same as DisassociateAddress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateAddress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateAddressWithContext(ctx aws.Context, input *DisassociateAddressInput, opts ...request.Option) (*DisassociateAddressOutput, error) {
+ req, out := c.DisassociateAddressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile"
@@ -11139,8 +14218,23 @@ func (c *EC2) DisassociateIamInstanceProfileRequest(input *DisassociateIamInstan
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile
func (c *EC2) DisassociateIamInstanceProfile(input *DisassociateIamInstanceProfileInput) (*DisassociateIamInstanceProfileOutput, error) {
req, out := c.DisassociateIamInstanceProfileRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateIamInstanceProfileWithContext is the same as DisassociateIamInstanceProfile with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateIamInstanceProfile for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateIamInstanceProfileWithContext(ctx aws.Context, input *DisassociateIamInstanceProfileInput, opts ...request.Option) (*DisassociateIamInstanceProfileOutput, error) {
+ req, out := c.DisassociateIamInstanceProfileRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateRouteTable = "DisassociateRouteTable"
@@ -11206,8 +14300,23 @@ func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable
func (c *EC2) DisassociateRouteTable(input *DisassociateRouteTableInput) (*DisassociateRouteTableOutput, error) {
req, out := c.DisassociateRouteTableRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateRouteTableWithContext is the same as DisassociateRouteTable with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateRouteTable for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateRouteTableWithContext(ctx aws.Context, input *DisassociateRouteTableInput, opts ...request.Option) (*DisassociateRouteTableOutput, error) {
+ req, out := c.DisassociateRouteTableRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock"
@@ -11268,8 +14377,23 @@ func (c *EC2) DisassociateSubnetCidrBlockRequest(input *DisassociateSubnetCidrBl
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock
func (c *EC2) DisassociateSubnetCidrBlock(input *DisassociateSubnetCidrBlockInput) (*DisassociateSubnetCidrBlockOutput, error) {
req, out := c.DisassociateSubnetCidrBlockRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateSubnetCidrBlockWithContext is the same as DisassociateSubnetCidrBlock with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateSubnetCidrBlock for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateSubnetCidrBlockWithContext(ctx aws.Context, input *DisassociateSubnetCidrBlockInput, opts ...request.Option) (*DisassociateSubnetCidrBlockOutput, error) {
+ req, out := c.DisassociateSubnetCidrBlockRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock"
@@ -11330,8 +14454,23 @@ func (c *EC2) DisassociateVpcCidrBlockRequest(input *DisassociateVpcCidrBlockInp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock
func (c *EC2) DisassociateVpcCidrBlock(input *DisassociateVpcCidrBlockInput) (*DisassociateVpcCidrBlockOutput, error) {
req, out := c.DisassociateVpcCidrBlockRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DisassociateVpcCidrBlockWithContext is the same as DisassociateVpcCidrBlock with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DisassociateVpcCidrBlock for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DisassociateVpcCidrBlockWithContext(ctx aws.Context, input *DisassociateVpcCidrBlockInput, opts ...request.Option) (*DisassociateVpcCidrBlockOutput, error) {
+ req, out := c.DisassociateVpcCidrBlockRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation"
@@ -11393,8 +14532,23 @@ func (c *EC2) EnableVgwRoutePropagationRequest(input *EnableVgwRoutePropagationI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation
func (c *EC2) EnableVgwRoutePropagation(input *EnableVgwRoutePropagationInput) (*EnableVgwRoutePropagationOutput, error) {
req, out := c.EnableVgwRoutePropagationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// EnableVgwRoutePropagationWithContext is the same as EnableVgwRoutePropagation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See EnableVgwRoutePropagation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) EnableVgwRoutePropagationWithContext(ctx aws.Context, input *EnableVgwRoutePropagationInput, opts ...request.Option) (*EnableVgwRoutePropagationOutput, error) {
+ req, out := c.EnableVgwRoutePropagationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opEnableVolumeIO = "EnableVolumeIO"
@@ -11456,8 +14610,23 @@ func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO
func (c *EC2) EnableVolumeIO(input *EnableVolumeIOInput) (*EnableVolumeIOOutput, error) {
req, out := c.EnableVolumeIORequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// EnableVolumeIOWithContext is the same as EnableVolumeIO with the addition of
+// the ability to pass a context and additional request options.
+//
+// See EnableVolumeIO for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) EnableVolumeIOWithContext(ctx aws.Context, input *EnableVolumeIOInput, opts ...request.Option) (*EnableVolumeIOOutput, error) {
+ req, out := c.EnableVolumeIORequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opEnableVpcClassicLink = "EnableVpcClassicLink"
@@ -11522,8 +14691,23 @@ func (c *EC2) EnableVpcClassicLinkRequest(input *EnableVpcClassicLinkInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink
func (c *EC2) EnableVpcClassicLink(input *EnableVpcClassicLinkInput) (*EnableVpcClassicLinkOutput, error) {
req, out := c.EnableVpcClassicLinkRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// EnableVpcClassicLinkWithContext is the same as EnableVpcClassicLink with the addition of
+// the ability to pass a context and additional request options.
+//
+// See EnableVpcClassicLink for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) EnableVpcClassicLinkWithContext(ctx aws.Context, input *EnableVpcClassicLinkInput, opts ...request.Option) (*EnableVpcClassicLinkOutput, error) {
+ req, out := c.EnableVpcClassicLinkRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport"
@@ -11588,8 +14772,23 @@ func (c *EC2) EnableVpcClassicLinkDnsSupportRequest(input *EnableVpcClassicLinkD
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport
func (c *EC2) EnableVpcClassicLinkDnsSupport(input *EnableVpcClassicLinkDnsSupportInput) (*EnableVpcClassicLinkDnsSupportOutput, error) {
req, out := c.EnableVpcClassicLinkDnsSupportRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// EnableVpcClassicLinkDnsSupportWithContext is the same as EnableVpcClassicLinkDnsSupport with the addition of
+// the ability to pass a context and additional request options.
+//
+// See EnableVpcClassicLinkDnsSupport for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) EnableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input *EnableVpcClassicLinkDnsSupportInput, opts ...request.Option) (*EnableVpcClassicLinkDnsSupportOutput, error) {
+ req, out := c.EnableVpcClassicLinkDnsSupportRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetConsoleOutput = "GetConsoleOutput"
@@ -11665,8 +14864,23 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput
func (c *EC2) GetConsoleOutput(input *GetConsoleOutputInput) (*GetConsoleOutputOutput, error) {
req, out := c.GetConsoleOutputRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetConsoleOutputWithContext is the same as GetConsoleOutput with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetConsoleOutput for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetConsoleOutputWithContext(ctx aws.Context, input *GetConsoleOutputInput, opts ...request.Option) (*GetConsoleOutputOutput, error) {
+ req, out := c.GetConsoleOutputRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetConsoleScreenshot = "GetConsoleScreenshot"
@@ -11727,8 +14941,23 @@ func (c *EC2) GetConsoleScreenshotRequest(input *GetConsoleScreenshotInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot
func (c *EC2) GetConsoleScreenshot(input *GetConsoleScreenshotInput) (*GetConsoleScreenshotOutput, error) {
req, out := c.GetConsoleScreenshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetConsoleScreenshotWithContext is the same as GetConsoleScreenshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetConsoleScreenshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetConsoleScreenshotWithContext(ctx aws.Context, input *GetConsoleScreenshotInput, opts ...request.Option) (*GetConsoleScreenshotOutput, error) {
+ req, out := c.GetConsoleScreenshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview"
@@ -11792,8 +15021,23 @@ func (c *EC2) GetHostReservationPurchasePreviewRequest(input *GetHostReservation
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview
func (c *EC2) GetHostReservationPurchasePreview(input *GetHostReservationPurchasePreviewInput) (*GetHostReservationPurchasePreviewOutput, error) {
req, out := c.GetHostReservationPurchasePreviewRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetHostReservationPurchasePreviewWithContext is the same as GetHostReservationPurchasePreview with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetHostReservationPurchasePreview for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetHostReservationPurchasePreviewWithContext(ctx aws.Context, input *GetHostReservationPurchasePreviewInput, opts ...request.Option) (*GetHostReservationPurchasePreviewOutput, error) {
+ req, out := c.GetHostReservationPurchasePreviewRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetPasswordData = "GetPasswordData"
@@ -11865,8 +15109,23 @@ func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData
func (c *EC2) GetPasswordData(input *GetPasswordDataInput) (*GetPasswordDataOutput, error) {
req, out := c.GetPasswordDataRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetPasswordDataWithContext is the same as GetPasswordData with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetPasswordData for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetPasswordDataWithContext(ctx aws.Context, input *GetPasswordDataInput, opts ...request.Option) (*GetPasswordDataOutput, error) {
+ req, out := c.GetPasswordDataRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote"
@@ -11927,8 +15186,23 @@ func (c *EC2) GetReservedInstancesExchangeQuoteRequest(input *GetReservedInstanc
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote
func (c *EC2) GetReservedInstancesExchangeQuote(input *GetReservedInstancesExchangeQuoteInput) (*GetReservedInstancesExchangeQuoteOutput, error) {
req, out := c.GetReservedInstancesExchangeQuoteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetReservedInstancesExchangeQuoteWithContext is the same as GetReservedInstancesExchangeQuote with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetReservedInstancesExchangeQuote for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetReservedInstancesExchangeQuoteWithContext(ctx aws.Context, input *GetReservedInstancesExchangeQuoteInput, opts ...request.Option) (*GetReservedInstancesExchangeQuoteOutput, error) {
+ req, out := c.GetReservedInstancesExchangeQuoteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportImage = "ImportImage"
@@ -11990,8 +15264,23 @@ func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage
func (c *EC2) ImportImage(input *ImportImageInput) (*ImportImageOutput, error) {
req, out := c.ImportImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportImageWithContext is the same as ImportImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportImageWithContext(ctx aws.Context, input *ImportImageInput, opts ...request.Option) (*ImportImageOutput, error) {
+ req, out := c.ImportImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportInstance = "ImportInstance"
@@ -12056,8 +15345,23 @@ func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance
func (c *EC2) ImportInstance(input *ImportInstanceInput) (*ImportInstanceOutput, error) {
req, out := c.ImportInstanceRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportInstanceWithContext is the same as ImportInstance with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportInstance for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportInstanceWithContext(ctx aws.Context, input *ImportInstanceInput, opts ...request.Option) (*ImportInstanceOutput, error) {
+ req, out := c.ImportInstanceRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportKeyPair = "ImportKeyPair"
@@ -12123,8 +15427,23 @@ func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair
func (c *EC2) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) {
req, out := c.ImportKeyPairRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportKeyPairWithContext is the same as ImportKeyPair with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportKeyPair for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportKeyPairWithContext(ctx aws.Context, input *ImportKeyPairInput, opts ...request.Option) (*ImportKeyPairOutput, error) {
+ req, out := c.ImportKeyPairRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportSnapshot = "ImportSnapshot"
@@ -12183,8 +15502,23 @@ func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot
func (c *EC2) ImportSnapshot(input *ImportSnapshotInput) (*ImportSnapshotOutput, error) {
req, out := c.ImportSnapshotRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportSnapshotWithContext is the same as ImportSnapshot with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportSnapshot for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportSnapshotWithContext(ctx aws.Context, input *ImportSnapshotInput, opts ...request.Option) (*ImportSnapshotOutput, error) {
+ req, out := c.ImportSnapshotRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opImportVolume = "ImportVolume"
@@ -12247,8 +15581,23 @@ func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume
func (c *EC2) ImportVolume(input *ImportVolumeInput) (*ImportVolumeOutput, error) {
req, out := c.ImportVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ImportVolumeWithContext is the same as ImportVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ImportVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput, opts ...request.Option) (*ImportVolumeOutput, error) {
+ req, out := c.ImportVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyHosts = "ModifyHosts"
@@ -12313,8 +15662,23 @@ func (c *EC2) ModifyHostsRequest(input *ModifyHostsInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts
func (c *EC2) ModifyHosts(input *ModifyHostsInput) (*ModifyHostsOutput, error) {
req, out := c.ModifyHostsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyHostsWithContext is the same as ModifyHosts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyHosts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyHostsWithContext(ctx aws.Context, input *ModifyHostsInput, opts ...request.Option) (*ModifyHostsOutput, error) {
+ req, out := c.ModifyHostsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyIdFormat = "ModifyIdFormat"
@@ -12389,8 +15753,23 @@ func (c *EC2) ModifyIdFormatRequest(input *ModifyIdFormatInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat
func (c *EC2) ModifyIdFormat(input *ModifyIdFormatInput) (*ModifyIdFormatOutput, error) {
req, out := c.ModifyIdFormatRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyIdFormatWithContext is the same as ModifyIdFormat with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyIdFormat for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyIdFormatWithContext(ctx aws.Context, input *ModifyIdFormatInput, opts ...request.Option) (*ModifyIdFormatOutput, error) {
+ req, out := c.ModifyIdFormatRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyIdentityIdFormat = "ModifyIdentityIdFormat"
@@ -12465,8 +15844,23 @@ func (c *EC2) ModifyIdentityIdFormatRequest(input *ModifyIdentityIdFormatInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat
func (c *EC2) ModifyIdentityIdFormat(input *ModifyIdentityIdFormatInput) (*ModifyIdentityIdFormatOutput, error) {
req, out := c.ModifyIdentityIdFormatRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyIdentityIdFormatWithContext is the same as ModifyIdentityIdFormat with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyIdentityIdFormat for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyIdentityIdFormatWithContext(ctx aws.Context, input *ModifyIdentityIdFormatInput, opts ...request.Option) (*ModifyIdentityIdFormatOutput, error) {
+ req, out := c.ModifyIdentityIdFormatRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyImageAttribute = "ModifyImageAttribute"
@@ -12536,8 +15930,23 @@ func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute
func (c *EC2) ModifyImageAttribute(input *ModifyImageAttributeInput) (*ModifyImageAttributeOutput, error) {
req, out := c.ModifyImageAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyImageAttributeWithContext is the same as ModifyImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyImageAttributeWithContext(ctx aws.Context, input *ModifyImageAttributeInput, opts ...request.Option) (*ModifyImageAttributeOutput, error) {
+ req, out := c.ModifyImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyInstanceAttribute = "ModifyInstanceAttribute"
@@ -12603,8 +16012,23 @@ func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute
func (c *EC2) ModifyInstanceAttribute(input *ModifyInstanceAttributeInput) (*ModifyInstanceAttributeOutput, error) {
req, out := c.ModifyInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyInstanceAttributeWithContext is the same as ModifyInstanceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyInstanceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyInstanceAttributeWithContext(ctx aws.Context, input *ModifyInstanceAttributeInput, opts ...request.Option) (*ModifyInstanceAttributeOutput, error) {
+ req, out := c.ModifyInstanceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyInstancePlacement = "ModifyInstancePlacement"
@@ -12681,8 +16105,23 @@ func (c *EC2) ModifyInstancePlacementRequest(input *ModifyInstancePlacementInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement
func (c *EC2) ModifyInstancePlacement(input *ModifyInstancePlacementInput) (*ModifyInstancePlacementOutput, error) {
req, out := c.ModifyInstancePlacementRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyInstancePlacementWithContext is the same as ModifyInstancePlacement with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyInstancePlacement for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyInstancePlacementWithContext(ctx aws.Context, input *ModifyInstancePlacementInput, opts ...request.Option) (*ModifyInstancePlacementOutput, error) {
+ req, out := c.ModifyInstancePlacementRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute"
@@ -12744,8 +16183,23 @@ func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfa
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute
func (c *EC2) ModifyNetworkInterfaceAttribute(input *ModifyNetworkInterfaceAttributeInput) (*ModifyNetworkInterfaceAttributeOutput, error) {
req, out := c.ModifyNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyNetworkInterfaceAttributeWithContext is the same as ModifyNetworkInterfaceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyNetworkInterfaceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyNetworkInterfaceAttributeWithContext(ctx aws.Context, input *ModifyNetworkInterfaceAttributeInput, opts ...request.Option) (*ModifyNetworkInterfaceAttributeOutput, error) {
+ req, out := c.ModifyNetworkInterfaceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyReservedInstances = "ModifyReservedInstances"
@@ -12810,8 +16264,23 @@ func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances
func (c *EC2) ModifyReservedInstances(input *ModifyReservedInstancesInput) (*ModifyReservedInstancesOutput, error) {
req, out := c.ModifyReservedInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyReservedInstancesWithContext is the same as ModifyReservedInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyReservedInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyReservedInstancesWithContext(ctx aws.Context, input *ModifyReservedInstancesInput, opts ...request.Option) (*ModifyReservedInstancesOutput, error) {
+ req, out := c.ModifyReservedInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifySnapshotAttribute = "ModifySnapshotAttribute"
@@ -12884,8 +16353,23 @@ func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute
func (c *EC2) ModifySnapshotAttribute(input *ModifySnapshotAttributeInput) (*ModifySnapshotAttributeOutput, error) {
req, out := c.ModifySnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifySnapshotAttributeWithContext is the same as ModifySnapshotAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifySnapshotAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifySnapshotAttributeWithContext(ctx aws.Context, input *ModifySnapshotAttributeInput, opts ...request.Option) (*ModifySnapshotAttributeOutput, error) {
+ req, out := c.ModifySnapshotAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifySpotFleetRequest = "ModifySpotFleetRequest"
@@ -12963,8 +16447,23 @@ func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest
func (c *EC2) ModifySpotFleetRequest(input *ModifySpotFleetRequestInput) (*ModifySpotFleetRequestOutput, error) {
req, out := c.ModifySpotFleetRequestRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifySpotFleetRequestWithContext is the same as ModifySpotFleetRequest with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifySpotFleetRequest for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifySpotFleetRequestWithContext(ctx aws.Context, input *ModifySpotFleetRequestInput, opts ...request.Option) (*ModifySpotFleetRequestOutput, error) {
+ req, out := c.ModifySpotFleetRequestRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifySubnetAttribute = "ModifySubnetAttribute"
@@ -13025,8 +16524,23 @@ func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute
func (c *EC2) ModifySubnetAttribute(input *ModifySubnetAttributeInput) (*ModifySubnetAttributeOutput, error) {
req, out := c.ModifySubnetAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifySubnetAttributeWithContext is the same as ModifySubnetAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifySubnetAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifySubnetAttributeWithContext(ctx aws.Context, input *ModifySubnetAttributeInput, opts ...request.Option) (*ModifySubnetAttributeOutput, error) {
+ req, out := c.ModifySubnetAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVolume = "ModifyVolume"
@@ -13117,8 +16631,23 @@ func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume
func (c *EC2) ModifyVolume(input *ModifyVolumeInput) (*ModifyVolumeOutput, error) {
req, out := c.ModifyVolumeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVolumeWithContext is the same as ModifyVolume with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVolume for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVolumeWithContext(ctx aws.Context, input *ModifyVolumeInput, opts ...request.Option) (*ModifyVolumeOutput, error) {
+ req, out := c.ModifyVolumeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVolumeAttribute = "ModifyVolumeAttribute"
@@ -13188,8 +16717,23 @@ func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute
func (c *EC2) ModifyVolumeAttribute(input *ModifyVolumeAttributeInput) (*ModifyVolumeAttributeOutput, error) {
req, out := c.ModifyVolumeAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVolumeAttributeWithContext is the same as ModifyVolumeAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVolumeAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVolumeAttributeWithContext(ctx aws.Context, input *ModifyVolumeAttributeInput, opts ...request.Option) (*ModifyVolumeAttributeOutput, error) {
+ req, out := c.ModifyVolumeAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVpcAttribute = "ModifyVpcAttribute"
@@ -13250,8 +16794,23 @@ func (c *EC2) ModifyVpcAttributeRequest(input *ModifyVpcAttributeInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute
func (c *EC2) ModifyVpcAttribute(input *ModifyVpcAttributeInput) (*ModifyVpcAttributeOutput, error) {
req, out := c.ModifyVpcAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVpcAttributeWithContext is the same as ModifyVpcAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcAttributeWithContext(ctx aws.Context, input *ModifyVpcAttributeInput, opts ...request.Option) (*ModifyVpcAttributeOutput, error) {
+ req, out := c.ModifyVpcAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVpcEndpoint = "ModifyVpcEndpoint"
@@ -13312,8 +16871,23 @@ func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint
func (c *EC2) ModifyVpcEndpoint(input *ModifyVpcEndpointInput) (*ModifyVpcEndpointOutput, error) {
req, out := c.ModifyVpcEndpointRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVpcEndpointWithContext is the same as ModifyVpcEndpoint with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcEndpoint for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcEndpointWithContext(ctx aws.Context, input *ModifyVpcEndpointInput, opts ...request.Option) (*ModifyVpcEndpointOutput, error) {
+ req, out := c.ModifyVpcEndpointRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions"
@@ -13391,8 +16965,23 @@ func (c *EC2) ModifyVpcPeeringConnectionOptionsRequest(input *ModifyVpcPeeringCo
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions
func (c *EC2) ModifyVpcPeeringConnectionOptions(input *ModifyVpcPeeringConnectionOptionsInput) (*ModifyVpcPeeringConnectionOptionsOutput, error) {
req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ModifyVpcPeeringConnectionOptionsWithContext is the same as ModifyVpcPeeringConnectionOptions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcPeeringConnectionOptions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcPeeringConnectionOptionsWithContext(ctx aws.Context, input *ModifyVpcPeeringConnectionOptionsInput, opts ...request.Option) (*ModifyVpcPeeringConnectionOptionsOutput, error) {
+ req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opMonitorInstances = "MonitorInstances"
@@ -13456,8 +17045,23 @@ func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances
func (c *EC2) MonitorInstances(input *MonitorInstancesInput) (*MonitorInstancesOutput, error) {
req, out := c.MonitorInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// MonitorInstancesWithContext is the same as MonitorInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See MonitorInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) MonitorInstancesWithContext(ctx aws.Context, input *MonitorInstancesInput, opts ...request.Option) (*MonitorInstancesOutput, error) {
+ req, out := c.MonitorInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opMoveAddressToVpc = "MoveAddressToVpc"
@@ -13522,8 +17126,23 @@ func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc
func (c *EC2) MoveAddressToVpc(input *MoveAddressToVpcInput) (*MoveAddressToVpcOutput, error) {
req, out := c.MoveAddressToVpcRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// MoveAddressToVpcWithContext is the same as MoveAddressToVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See MoveAddressToVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) MoveAddressToVpcWithContext(ctx aws.Context, input *MoveAddressToVpcInput, opts ...request.Option) (*MoveAddressToVpcOutput, error) {
+ req, out := c.MoveAddressToVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPurchaseHostReservation = "PurchaseHostReservation"
@@ -13585,8 +17204,23 @@ func (c *EC2) PurchaseHostReservationRequest(input *PurchaseHostReservationInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation
func (c *EC2) PurchaseHostReservation(input *PurchaseHostReservationInput) (*PurchaseHostReservationOutput, error) {
req, out := c.PurchaseHostReservationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PurchaseHostReservationWithContext is the same as PurchaseHostReservation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PurchaseHostReservation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) PurchaseHostReservationWithContext(ctx aws.Context, input *PurchaseHostReservationInput, opts ...request.Option) (*PurchaseHostReservationOutput, error) {
+ req, out := c.PurchaseHostReservationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering"
@@ -13654,8 +17288,23 @@ func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedIn
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering
func (c *EC2) PurchaseReservedInstancesOffering(input *PurchaseReservedInstancesOfferingInput) (*PurchaseReservedInstancesOfferingOutput, error) {
req, out := c.PurchaseReservedInstancesOfferingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PurchaseReservedInstancesOfferingWithContext is the same as PurchaseReservedInstancesOffering with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PurchaseReservedInstancesOffering for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) PurchaseReservedInstancesOfferingWithContext(ctx aws.Context, input *PurchaseReservedInstancesOfferingInput, opts ...request.Option) (*PurchaseReservedInstancesOfferingOutput, error) {
+ req, out := c.PurchaseReservedInstancesOfferingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPurchaseScheduledInstances = "PurchaseScheduledInstances"
@@ -13723,8 +17372,23 @@ func (c *EC2) PurchaseScheduledInstancesRequest(input *PurchaseScheduledInstance
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances
func (c *EC2) PurchaseScheduledInstances(input *PurchaseScheduledInstancesInput) (*PurchaseScheduledInstancesOutput, error) {
req, out := c.PurchaseScheduledInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PurchaseScheduledInstancesWithContext is the same as PurchaseScheduledInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PurchaseScheduledInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) PurchaseScheduledInstancesWithContext(ctx aws.Context, input *PurchaseScheduledInstancesInput, opts ...request.Option) (*PurchaseScheduledInstancesOutput, error) {
+ req, out := c.PurchaseScheduledInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRebootInstances = "RebootInstances"
@@ -13795,8 +17459,23 @@ func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances
func (c *EC2) RebootInstances(input *RebootInstancesInput) (*RebootInstancesOutput, error) {
req, out := c.RebootInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RebootInstancesWithContext is the same as RebootInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RebootInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RebootInstancesWithContext(ctx aws.Context, input *RebootInstancesInput, opts ...request.Option) (*RebootInstancesOutput, error) {
+ req, out := c.RebootInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRegisterImage = "RegisterImage"
@@ -13854,8 +17533,8 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Requ
//
// You can also use RegisterImage to create an Amazon EBS-backed Linux AMI from
// a snapshot of a root device volume. You specify the snapshot using the block
-// device mapping. For more information, see Launching an Instance from a Snapshot
-// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_LaunchingInstanceFromSnapshot.html)
+// device mapping. For more information, see Launching a Linux Instance from
+// a Backup (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// You can't register an image where a secondary (non-root) snapshot has AWS
@@ -13883,8 +17562,23 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage
func (c *EC2) RegisterImage(input *RegisterImageInput) (*RegisterImageOutput, error) {
req, out := c.RegisterImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RegisterImageWithContext is the same as RegisterImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RegisterImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RegisterImageWithContext(ctx aws.Context, input *RegisterImageInput, opts ...request.Option) (*RegisterImageOutput, error) {
+ req, out := c.RegisterImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection"
@@ -13947,8 +17641,23 @@ func (c *EC2) RejectVpcPeeringConnectionRequest(input *RejectVpcPeeringConnectio
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection
func (c *EC2) RejectVpcPeeringConnection(input *RejectVpcPeeringConnectionInput) (*RejectVpcPeeringConnectionOutput, error) {
req, out := c.RejectVpcPeeringConnectionRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RejectVpcPeeringConnectionWithContext is the same as RejectVpcPeeringConnection with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RejectVpcPeeringConnection for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RejectVpcPeeringConnectionWithContext(ctx aws.Context, input *RejectVpcPeeringConnectionInput, opts ...request.Option) (*RejectVpcPeeringConnectionOutput, error) {
+ req, out := c.RejectVpcPeeringConnectionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReleaseAddress = "ReleaseAddress"
@@ -14023,8 +17732,23 @@ func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress
func (c *EC2) ReleaseAddress(input *ReleaseAddressInput) (*ReleaseAddressOutput, error) {
req, out := c.ReleaseAddressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReleaseAddressWithContext is the same as ReleaseAddress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReleaseAddress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReleaseAddressWithContext(ctx aws.Context, input *ReleaseAddressInput, opts ...request.Option) (*ReleaseAddressOutput, error) {
+ req, out := c.ReleaseAddressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReleaseHosts = "ReleaseHosts"
@@ -14094,8 +17818,23 @@ func (c *EC2) ReleaseHostsRequest(input *ReleaseHostsInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts
func (c *EC2) ReleaseHosts(input *ReleaseHostsInput) (*ReleaseHostsOutput, error) {
req, out := c.ReleaseHostsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReleaseHostsWithContext is the same as ReleaseHosts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReleaseHosts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReleaseHostsWithContext(ctx aws.Context, input *ReleaseHostsInput, opts ...request.Option) (*ReleaseHostsOutput, error) {
+ req, out := c.ReleaseHostsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssociation"
@@ -14159,8 +17898,23 @@ func (c *EC2) ReplaceIamInstanceProfileAssociationRequest(input *ReplaceIamInsta
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation
func (c *EC2) ReplaceIamInstanceProfileAssociation(input *ReplaceIamInstanceProfileAssociationInput) (*ReplaceIamInstanceProfileAssociationOutput, error) {
req, out := c.ReplaceIamInstanceProfileAssociationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceIamInstanceProfileAssociationWithContext is the same as ReplaceIamInstanceProfileAssociation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceIamInstanceProfileAssociation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceIamInstanceProfileAssociationWithContext(ctx aws.Context, input *ReplaceIamInstanceProfileAssociationInput, opts ...request.Option) (*ReplaceIamInstanceProfileAssociationOutput, error) {
+ req, out := c.ReplaceIamInstanceProfileAssociationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation"
@@ -14222,8 +17976,23 @@ func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssoci
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation
func (c *EC2) ReplaceNetworkAclAssociation(input *ReplaceNetworkAclAssociationInput) (*ReplaceNetworkAclAssociationOutput, error) {
req, out := c.ReplaceNetworkAclAssociationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceNetworkAclAssociationWithContext is the same as ReplaceNetworkAclAssociation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceNetworkAclAssociation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceNetworkAclAssociationWithContext(ctx aws.Context, input *ReplaceNetworkAclAssociationInput, opts ...request.Option) (*ReplaceNetworkAclAssociationOutput, error) {
+ req, out := c.ReplaceNetworkAclAssociationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry"
@@ -14286,8 +18055,23 @@ func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry
func (c *EC2) ReplaceNetworkAclEntry(input *ReplaceNetworkAclEntryInput) (*ReplaceNetworkAclEntryOutput, error) {
req, out := c.ReplaceNetworkAclEntryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceNetworkAclEntryWithContext is the same as ReplaceNetworkAclEntry with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceNetworkAclEntry for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceNetworkAclEntryWithContext(ctx aws.Context, input *ReplaceNetworkAclEntryInput, opts ...request.Option) (*ReplaceNetworkAclEntryOutput, error) {
+ req, out := c.ReplaceNetworkAclEntryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceRoute = "ReplaceRoute"
@@ -14354,8 +18138,23 @@ func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute
func (c *EC2) ReplaceRoute(input *ReplaceRouteInput) (*ReplaceRouteOutput, error) {
req, out := c.ReplaceRouteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceRouteWithContext is the same as ReplaceRoute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceRoute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceRouteWithContext(ctx aws.Context, input *ReplaceRouteInput, opts ...request.Option) (*ReplaceRouteOutput, error) {
+ req, out := c.ReplaceRouteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation"
@@ -14422,8 +18221,23 @@ func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssoci
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation
func (c *EC2) ReplaceRouteTableAssociation(input *ReplaceRouteTableAssociationInput) (*ReplaceRouteTableAssociationOutput, error) {
req, out := c.ReplaceRouteTableAssociationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReplaceRouteTableAssociationWithContext is the same as ReplaceRouteTableAssociation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReplaceRouteTableAssociation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReplaceRouteTableAssociationWithContext(ctx aws.Context, input *ReplaceRouteTableAssociationInput, opts ...request.Option) (*ReplaceRouteTableAssociationOutput, error) {
+ req, out := c.ReplaceRouteTableAssociationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opReportInstanceStatus = "ReportInstanceStatus"
@@ -14490,8 +18304,23 @@ func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus
func (c *EC2) ReportInstanceStatus(input *ReportInstanceStatusInput) (*ReportInstanceStatusOutput, error) {
req, out := c.ReportInstanceStatusRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ReportInstanceStatusWithContext is the same as ReportInstanceStatus with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ReportInstanceStatus for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ReportInstanceStatusWithContext(ctx aws.Context, input *ReportInstanceStatusInput, opts ...request.Option) (*ReportInstanceStatusOutput, error) {
+ req, out := c.ReportInstanceStatusRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRequestSpotFleet = "RequestSpotFleet"
@@ -14566,8 +18395,23 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet
func (c *EC2) RequestSpotFleet(input *RequestSpotFleetInput) (*RequestSpotFleetOutput, error) {
req, out := c.RequestSpotFleetRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RequestSpotFleetWithContext is the same as RequestSpotFleet with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RequestSpotFleet for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RequestSpotFleetWithContext(ctx aws.Context, input *RequestSpotFleetInput, opts ...request.Option) (*RequestSpotFleetOutput, error) {
+ req, out := c.RequestSpotFleetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRequestSpotInstances = "RequestSpotInstances"
@@ -14631,8 +18475,23 @@ func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances
func (c *EC2) RequestSpotInstances(input *RequestSpotInstancesInput) (*RequestSpotInstancesOutput, error) {
req, out := c.RequestSpotInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RequestSpotInstancesWithContext is the same as RequestSpotInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RequestSpotInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RequestSpotInstancesWithContext(ctx aws.Context, input *RequestSpotInstancesInput, opts ...request.Option) (*RequestSpotInstancesOutput, error) {
+ req, out := c.RequestSpotInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opResetImageAttribute = "ResetImageAttribute"
@@ -14695,8 +18554,23 @@ func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute
func (c *EC2) ResetImageAttribute(input *ResetImageAttributeInput) (*ResetImageAttributeOutput, error) {
req, out := c.ResetImageAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ResetImageAttributeWithContext is the same as ResetImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetImageAttributeWithContext(ctx aws.Context, input *ResetImageAttributeInput, opts ...request.Option) (*ResetImageAttributeOutput, error) {
+ req, out := c.ResetImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opResetInstanceAttribute = "ResetInstanceAttribute"
@@ -14765,8 +18639,23 @@ func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute
func (c *EC2) ResetInstanceAttribute(input *ResetInstanceAttributeInput) (*ResetInstanceAttributeOutput, error) {
req, out := c.ResetInstanceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ResetInstanceAttributeWithContext is the same as ResetInstanceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetInstanceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetInstanceAttributeWithContext(ctx aws.Context, input *ResetInstanceAttributeInput, opts ...request.Option) (*ResetInstanceAttributeOutput, error) {
+ req, out := c.ResetInstanceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute"
@@ -14828,8 +18717,23 @@ func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterface
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute
func (c *EC2) ResetNetworkInterfaceAttribute(input *ResetNetworkInterfaceAttributeInput) (*ResetNetworkInterfaceAttributeOutput, error) {
req, out := c.ResetNetworkInterfaceAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ResetNetworkInterfaceAttributeWithContext is the same as ResetNetworkInterfaceAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetNetworkInterfaceAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetNetworkInterfaceAttributeWithContext(ctx aws.Context, input *ResetNetworkInterfaceAttributeInput, opts ...request.Option) (*ResetNetworkInterfaceAttributeOutput, error) {
+ req, out := c.ResetNetworkInterfaceAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opResetSnapshotAttribute = "ResetSnapshotAttribute"
@@ -14894,8 +18798,23 @@ func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute
func (c *EC2) ResetSnapshotAttribute(input *ResetSnapshotAttributeInput) (*ResetSnapshotAttributeOutput, error) {
req, out := c.ResetSnapshotAttributeRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ResetSnapshotAttributeWithContext is the same as ResetSnapshotAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetSnapshotAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetSnapshotAttributeWithContext(ctx aws.Context, input *ResetSnapshotAttributeInput, opts ...request.Option) (*ResetSnapshotAttributeOutput, error) {
+ req, out := c.ResetSnapshotAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRestoreAddressToClassic = "RestoreAddressToClassic"
@@ -14957,8 +18876,23 @@ func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic
func (c *EC2) RestoreAddressToClassic(input *RestoreAddressToClassicInput) (*RestoreAddressToClassicOutput, error) {
req, out := c.RestoreAddressToClassicRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RestoreAddressToClassicWithContext is the same as RestoreAddressToClassic with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RestoreAddressToClassic for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RestoreAddressToClassicWithContext(ctx aws.Context, input *RestoreAddressToClassicInput, opts ...request.Option) (*RestoreAddressToClassicOutput, error) {
+ req, out := c.RestoreAddressToClassicRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress"
@@ -15030,8 +18964,23 @@ func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress
func (c *EC2) RevokeSecurityGroupEgress(input *RevokeSecurityGroupEgressInput) (*RevokeSecurityGroupEgressOutput, error) {
req, out := c.RevokeSecurityGroupEgressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RevokeSecurityGroupEgressWithContext is the same as RevokeSecurityGroupEgress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RevokeSecurityGroupEgress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RevokeSecurityGroupEgressWithContext(ctx aws.Context, input *RevokeSecurityGroupEgressInput, opts ...request.Option) (*RevokeSecurityGroupEgressOutput, error) {
+ req, out := c.RevokeSecurityGroupEgressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress"
@@ -15102,8 +19051,23 @@ func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngres
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress
func (c *EC2) RevokeSecurityGroupIngress(input *RevokeSecurityGroupIngressInput) (*RevokeSecurityGroupIngressOutput, error) {
req, out := c.RevokeSecurityGroupIngressRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RevokeSecurityGroupIngressWithContext is the same as RevokeSecurityGroupIngress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RevokeSecurityGroupIngress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RevokeSecurityGroupIngressWithContext(ctx aws.Context, input *RevokeSecurityGroupIngressInput, opts ...request.Option) (*RevokeSecurityGroupIngressOutput, error) {
+ req, out := c.RevokeSecurityGroupIngressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRunInstances = "RunInstances"
@@ -15186,9 +19150,9 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques
// each instead of 1 launch request for 500 instances.
//
// An instance is ready for you to use when it's in the running state. You can
-// check the state of your instance using DescribeInstances. After launch, you
-// can apply tags to your running instance (requires a resource ID). For more
-// information, see CreateTags and Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
+// check the state of your instance using DescribeInstances. You can tag instances
+// and EBS volumes during launch, after launch, or both. For more information,
+// see CreateTags and Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
//
// 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
@@ -15210,8 +19174,23 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances
func (c *EC2) RunInstances(input *RunInstancesInput) (*Reservation, error) {
req, out := c.RunInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RunInstancesWithContext is the same as RunInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RunInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RunInstancesWithContext(ctx aws.Context, input *RunInstancesInput, opts ...request.Option) (*Reservation, error) {
+ req, out := c.RunInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRunScheduledInstances = "RunScheduledInstances"
@@ -15280,8 +19259,23 @@ func (c *EC2) RunScheduledInstancesRequest(input *RunScheduledInstancesInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances
func (c *EC2) RunScheduledInstances(input *RunScheduledInstancesInput) (*RunScheduledInstancesOutput, error) {
req, out := c.RunScheduledInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RunScheduledInstancesWithContext is the same as RunScheduledInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RunScheduledInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RunScheduledInstancesWithContext(ctx aws.Context, input *RunScheduledInstancesInput, opts ...request.Option) (*RunScheduledInstancesOutput, error) {
+ req, out := c.RunScheduledInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opStartInstances = "StartInstances"
@@ -15358,8 +19352,23 @@ func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances
func (c *EC2) StartInstances(input *StartInstancesInput) (*StartInstancesOutput, error) {
req, out := c.StartInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// StartInstancesWithContext is the same as StartInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See StartInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) StartInstancesWithContext(ctx aws.Context, input *StartInstancesInput, opts ...request.Option) (*StartInstancesOutput, error) {
+ req, out := c.StartInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opStopInstances = "StopInstances"
@@ -15447,8 +19456,23 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances
func (c *EC2) StopInstances(input *StopInstancesInput) (*StopInstancesOutput, error) {
req, out := c.StopInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// StopInstancesWithContext is the same as StopInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See StopInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) StopInstancesWithContext(ctx aws.Context, input *StopInstancesInput, opts ...request.Option) (*StopInstancesOutput, error) {
+ req, out := c.StopInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opTerminateInstances = "TerminateInstances"
@@ -15531,8 +19555,23 @@ func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances
func (c *EC2) TerminateInstances(input *TerminateInstancesInput) (*TerminateInstancesOutput, error) {
req, out := c.TerminateInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// TerminateInstancesWithContext is the same as TerminateInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See TerminateInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) TerminateInstancesWithContext(ctx aws.Context, input *TerminateInstancesInput, opts ...request.Option) (*TerminateInstancesOutput, error) {
+ req, out := c.TerminateInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUnassignIpv6Addresses = "UnassignIpv6Addresses"
@@ -15591,8 +19630,23 @@ func (c *EC2) UnassignIpv6AddressesRequest(input *UnassignIpv6AddressesInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses
func (c *EC2) UnassignIpv6Addresses(input *UnassignIpv6AddressesInput) (*UnassignIpv6AddressesOutput, error) {
req, out := c.UnassignIpv6AddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UnassignIpv6AddressesWithContext is the same as UnassignIpv6Addresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UnassignIpv6Addresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) UnassignIpv6AddressesWithContext(ctx aws.Context, input *UnassignIpv6AddressesInput, opts ...request.Option) (*UnassignIpv6AddressesOutput, error) {
+ req, out := c.UnassignIpv6AddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses"
@@ -15653,8 +19707,23 @@ func (c *EC2) UnassignPrivateIpAddressesRequest(input *UnassignPrivateIpAddresse
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses
func (c *EC2) UnassignPrivateIpAddresses(input *UnassignPrivateIpAddressesInput) (*UnassignPrivateIpAddressesOutput, error) {
req, out := c.UnassignPrivateIpAddressesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UnassignPrivateIpAddressesWithContext is the same as UnassignPrivateIpAddresses with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UnassignPrivateIpAddresses for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) UnassignPrivateIpAddressesWithContext(ctx aws.Context, input *UnassignPrivateIpAddressesInput, opts ...request.Option) (*UnassignPrivateIpAddressesOutput, error) {
+ req, out := c.UnassignPrivateIpAddressesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUnmonitorInstances = "UnmonitorInstances"
@@ -15715,8 +19784,23 @@ func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances
func (c *EC2) UnmonitorInstances(input *UnmonitorInstancesInput) (*UnmonitorInstancesOutput, error) {
req, out := c.UnmonitorInstancesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UnmonitorInstancesWithContext is the same as UnmonitorInstances with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UnmonitorInstances for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) UnmonitorInstancesWithContext(ctx aws.Context, input *UnmonitorInstancesInput, opts ...request.Option) (*UnmonitorInstancesOutput, error) {
+ req, out := c.UnmonitorInstancesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// Contains the parameters for accepting the quote.
@@ -15943,8 +20027,8 @@ func (s *AccountAttributeValue) SetAttributeValue(v string) *AccountAttributeVal
type ActiveInstance struct {
_ struct{} `type:"structure"`
- // The health status of the instance. If the status of both the instance status
- // check and the system status check is impaired, the health status of the instance
+ // The health status of the instance. If the status of either the instance status
+ // check or the system status check is impaired, the health status of the instance
// is unhealthy. Otherwise, the health status is healthy.
InstanceHealth *string `locationName:"instanceHealth" type:"string" enum:"InstanceHealthStatus"`
@@ -20002,6 +24086,128 @@ func (s *CreateFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *CreateFlo
return s
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImageRequest
+type CreateFpgaImageInput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency
+ // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // A description for the AFI.
+ 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 `type:"boolean"`
+
+ // The location of the encrypted design checkpoint in Amazon S3. The input must
+ // be a tarball.
+ //
+ // InputStorageLocation is a required field
+ InputStorageLocation *StorageLocation `type:"structure" required:"true"`
+
+ // The location in Amazon S3 for the output logs.
+ LogsStorageLocation *StorageLocation `type:"structure"`
+
+ // A name for the AFI.
+ Name *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CreateFpgaImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateFpgaImageInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateFpgaImageInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateFpgaImageInput"}
+ if s.InputStorageLocation == nil {
+ invalidParams.Add(request.NewErrParamRequired("InputStorageLocation"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateFpgaImageInput) SetClientToken(v string) *CreateFpgaImageInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *CreateFpgaImageInput) SetDescription(v string) *CreateFpgaImageInput {
+ s.Description = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateFpgaImageInput) SetDryRun(v bool) *CreateFpgaImageInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetInputStorageLocation sets the InputStorageLocation field's value.
+func (s *CreateFpgaImageInput) SetInputStorageLocation(v *StorageLocation) *CreateFpgaImageInput {
+ s.InputStorageLocation = v
+ return s
+}
+
+// SetLogsStorageLocation sets the LogsStorageLocation field's value.
+func (s *CreateFpgaImageInput) SetLogsStorageLocation(v *StorageLocation) *CreateFpgaImageInput {
+ s.LogsStorageLocation = v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *CreateFpgaImageInput) SetName(v string) *CreateFpgaImageInput {
+ s.Name = &v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImageResult
+type CreateFpgaImageOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The global FPGA image identifier (AGFI ID).
+ FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"`
+
+ // The FPGA image identifier (AFI ID).
+ FpgaImageId *string `locationName:"fpgaImageId" type:"string"`
+}
+
+// String returns the string representation
+func (s CreateFpgaImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateFpgaImageOutput) GoString() string {
+ return s.String()
+}
+
+// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value.
+func (s *CreateFpgaImageOutput) SetFpgaImageGlobalId(v string) *CreateFpgaImageOutput {
+ s.FpgaImageGlobalId = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *CreateFpgaImageOutput) SetFpgaImageId(v string) *CreateFpgaImageOutput {
+ s.FpgaImageId = &v
+ return s
+}
+
// Contains the parameters for CreateImage.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImageRequest
type CreateImageInput struct {
@@ -20888,6 +25094,113 @@ func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface)
return s
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionRequest
+type CreateNetworkInterfacePermissionInput struct {
+ _ struct{} `type:"structure"`
+
+ // The AWS account ID.
+ AwsAccountId *string `type:"string"`
+
+ // The AWS service. Currently not supported.
+ AwsService *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 network interface.
+ //
+ // NetworkInterfaceId is a required field
+ NetworkInterfaceId *string `type:"string" required:"true"`
+
+ // The type of permission to grant.
+ //
+ // Permission is a required field
+ Permission *string `type:"string" required:"true" enum:"InterfacePermissionType"`
+}
+
+// String returns the string representation
+func (s CreateNetworkInterfacePermissionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkInterfacePermissionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateNetworkInterfacePermissionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfacePermissionInput"}
+ if s.NetworkInterfaceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId"))
+ }
+ if s.Permission == nil {
+ invalidParams.Add(request.NewErrParamRequired("Permission"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAwsAccountId sets the AwsAccountId field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetAwsAccountId(v string) *CreateNetworkInterfacePermissionInput {
+ s.AwsAccountId = &v
+ return s
+}
+
+// SetAwsService sets the AwsService field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetAwsService(v string) *CreateNetworkInterfacePermissionInput {
+ s.AwsService = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetDryRun(v bool) *CreateNetworkInterfacePermissionInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetNetworkInterfaceId(v string) *CreateNetworkInterfacePermissionInput {
+ s.NetworkInterfaceId = &v
+ return s
+}
+
+// SetPermission sets the Permission field's value.
+func (s *CreateNetworkInterfacePermissionInput) SetPermission(v string) *CreateNetworkInterfacePermissionInput {
+ s.Permission = &v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionResult
+type CreateNetworkInterfacePermissionOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the permission for the network interface.
+ InterfacePermission *NetworkInterfacePermission `locationName:"interfacePermission" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateNetworkInterfacePermissionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkInterfacePermissionOutput) GoString() string {
+ return s.String()
+}
+
+// SetInterfacePermission sets the InterfacePermission field's value.
+func (s *CreateNetworkInterfacePermissionOutput) SetInterfacePermission(v *NetworkInterfacePermission) *CreateNetworkInterfacePermissionOutput {
+ s.InterfacePermission = v
+ return s
+}
+
// Contains the parameters for CreatePlacementGroup.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroupRequest
type CreatePlacementGroupInput struct {
@@ -21824,6 +26137,9 @@ type CreateVolumeInput struct {
// The snapshot from which to create the volume.
SnapshotId *string `type:"string"`
+ // The tags to apply to the volume during creation.
+ TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"`
+
// The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned
// IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard
// for Magnetic volumes.
@@ -21897,6 +26213,12 @@ func (s *CreateVolumeInput) SetSnapshotId(v string) *CreateVolumeInput {
return s
}
+// SetTagSpecifications sets the TagSpecifications field's value.
+func (s *CreateVolumeInput) SetTagSpecifications(v []*TagSpecification) *CreateVolumeInput {
+ s.TagSpecifications = v
+ return s
+}
+
// SetVolumeType sets the VolumeType field's value.
func (s *CreateVolumeInput) SetVolumeType(v string) *CreateVolumeInput {
s.VolumeType = &v
@@ -23343,6 +27665,91 @@ func (s DeleteNetworkInterfaceOutput) GoString() string {
return s.String()
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionRequest
+type DeleteNetworkInterfacePermissionInput struct {
+ _ struct{} `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"`
+
+ // Specify true to remove the permission even if the network interface is attached
+ // to an instance.
+ Force *bool `type:"boolean"`
+
+ // The ID of the network interface permission.
+ //
+ // NetworkInterfacePermissionId is a required field
+ NetworkInterfacePermissionId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkInterfacePermissionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkInterfacePermissionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteNetworkInterfacePermissionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfacePermissionInput"}
+ if s.NetworkInterfacePermissionId == nil {
+ invalidParams.Add(request.NewErrParamRequired("NetworkInterfacePermissionId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DeleteNetworkInterfacePermissionInput) SetDryRun(v bool) *DeleteNetworkInterfacePermissionInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetForce sets the Force field's value.
+func (s *DeleteNetworkInterfacePermissionInput) SetForce(v bool) *DeleteNetworkInterfacePermissionInput {
+ s.Force = &v
+ return s
+}
+
+// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value.
+func (s *DeleteNetworkInterfacePermissionInput) SetNetworkInterfacePermissionId(v string) *DeleteNetworkInterfacePermissionInput {
+ s.NetworkInterfacePermissionId = &v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionResult
+type DeleteNetworkInterfacePermissionOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns true if the request succeeds, otherwise returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkInterfacePermissionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkInterfacePermissionOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturn sets the Return field's value.
+func (s *DeleteNetworkInterfacePermissionOutput) SetReturn(v bool) *DeleteNetworkInterfacePermissionOutput {
+ s.Return = &v
+ return s
+}
+
// Contains the parameters for DeletePlacementGroup.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroupRequest
type DeletePlacementGroupInput struct {
@@ -25409,6 +29816,164 @@ func (s *DescribeFlowLogsOutput) SetNextToken(v string) *DescribeFlowLogsOutput
return s
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesRequest
+type DescribeFpgaImagesInput struct {
+ _ struct{} `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"`
+
+ // One or more filters.
+ //
+ // * create-time - The creation time of the AFI.
+ //
+ // * fpga-image-id - The FPGA image identifier (AFI ID).
+ //
+ // * fpga-image-global-id - The global FPGA image identifier (AGFI ID).
+ //
+ // * name - The name of the AFI.
+ //
+ // * owner-id - The AWS account ID of the AFI owner.
+ //
+ // * product-code - The product code.
+ //
+ // * shell-version - The version of the AWS Shell that was used to create
+ // the bitstream.
+ //
+ // * state - The state of the AFI (pending | failed | available | unavailable).
+ //
+ // * tag:key=value - The key/value combination of a tag assigned to the resource.
+ // Specify the key of the tag in the filter name and the value of the tag
+ // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose
+ // for the filter name and X for the filter value.
+ //
+ // * 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.
+ //
+ // * update-time - The time of the most recent update.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more AFI IDs.
+ FpgaImageIds []*string `locationName:"FpgaImageId" locationNameList:"item" type:"list"`
+
+ // The maximum number of results to return in a single call.
+ MaxResults *int64 `min:"5" type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `min:"1" type:"string"`
+
+ // Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender
+ // of the request), or an AWS owner alias (valid values are amazon | aws-marketplace).
+ Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"`
+}
+
+// String returns the string representation
+func (s DescribeFpgaImagesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFpgaImagesInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeFpgaImagesInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImagesInput"}
+ if s.MaxResults != nil && *s.MaxResults < 5 {
+ invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5))
+ }
+ if s.NextToken != nil && len(*s.NextToken) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeFpgaImagesInput) SetDryRun(v bool) *DescribeFpgaImagesInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeFpgaImagesInput) SetFilters(v []*Filter) *DescribeFpgaImagesInput {
+ s.Filters = v
+ return s
+}
+
+// SetFpgaImageIds sets the FpgaImageIds field's value.
+func (s *DescribeFpgaImagesInput) SetFpgaImageIds(v []*string) *DescribeFpgaImagesInput {
+ s.FpgaImageIds = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeFpgaImagesInput) SetMaxResults(v int64) *DescribeFpgaImagesInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeFpgaImagesInput) SetNextToken(v string) *DescribeFpgaImagesInput {
+ s.NextToken = &v
+ return s
+}
+
+// SetOwners sets the Owners field's value.
+func (s *DescribeFpgaImagesInput) SetOwners(v []*string) *DescribeFpgaImagesInput {
+ s.Owners = v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesResult
+type DescribeFpgaImagesOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about one or more FPGA images.
+ FpgaImages []*FpgaImage `locationName:"fpgaImageSet" 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" min:"1" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeFpgaImagesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFpgaImagesOutput) GoString() string {
+ return s.String()
+}
+
+// SetFpgaImages sets the FpgaImages field's value.
+func (s *DescribeFpgaImagesOutput) SetFpgaImages(v []*FpgaImage) *DescribeFpgaImagesOutput {
+ s.FpgaImages = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeFpgaImagesOutput) SetNextToken(v string) *DescribeFpgaImagesOutput {
+ s.NextToken = &v
+ return s
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferingsRequest
type DescribeHostReservationOfferingsInput struct {
_ struct{} `type:"structure"`
@@ -26891,18 +31456,6 @@ type DescribeInstancesInput struct {
//
// * architecture - The instance architecture (i386 | x86_64).
//
- // * association.public-ip - The address of the Elastic IP address (IPv4)
- // bound to the network interface.
- //
- // * association.ip-owner-id - The owner of the Elastic IP address (IPv4)
- // associated with the network interface.
- //
- // * association.allocation-id - The allocation ID returned when you allocated
- // the Elastic IP address (IPv4) for your network interface.
- //
- // * association.association-id - The association ID returned when the network
- // interface was associated with an IPv4 address.
- //
// * availability-zone - The Availability Zone of the instance.
//
// * block-device-mapping.attach-time - The attach time for an EBS volume
@@ -26988,6 +31541,18 @@ type DescribeInstancesInput struct {
// * network-interface.addresses.association.ip-owner-id - The owner ID of
// the private IPv4 address associated with the network interface.
//
+ // * network-interface.association.public-ip - The address of the Elastic
+ // IP address (IPv4) bound to the network interface.
+ //
+ // * network-interface.association.ip-owner-id - The owner of the Elastic
+ // IP address (IPv4) associated with the network interface.
+ //
+ // * network-interface.association.allocation-id - The allocation ID returned
+ // when you allocated the Elastic IP address (IPv4) for your network interface.
+ //
+ // * network-interface.association.association-id - The association ID returned
+ // when the network interface was associated with an IPv4 address.
+ //
// * network-interface.attachment.attachment-id - The ID of the interface
// attachment.
//
@@ -27729,7 +32294,7 @@ func (s *DescribeNetworkAclsOutput) SetNetworkAcls(v []*NetworkAcl) *DescribeNet
type DescribeNetworkInterfaceAttributeInput struct {
_ struct{} `type:"structure"`
- // The attribute of the network interface.
+ // The attribute of the network interface. This parameter is required.
Attribute *string `locationName:"attribute" type:"string" enum:"NetworkInterfaceAttribute"`
// Checks whether you have the required permissions for the action, without
@@ -27846,6 +32411,105 @@ func (s *DescribeNetworkInterfaceAttributeOutput) SetSourceDestCheck(v *Attribut
return s
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsRequest
+type DescribeNetworkInterfacePermissionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // One or more filters.
+ //
+ // * network-interface-permission.network-interface-permission-id - The ID
+ // of the permission.
+ //
+ // * network-interface-permission.network-interface-id - The ID of the network
+ // interface.
+ //
+ // * network-interface-permission.aws-account-id - The AWS account ID.
+ //
+ // * network-interface-permission.aws-service - The AWS service.
+ //
+ // * network-interface-permission.permission - The type of permission (INSTANCE-ATTACH
+ // | EIP-ASSOCIATE).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. If
+ // this parameter is not specified, up to 50 results are returned by default.
+ MaxResults *int64 `type:"integer"`
+
+ // One or more network interface permission IDs.
+ NetworkInterfacePermissionIds []*string `locationName:"NetworkInterfacePermissionId" type:"list"`
+
+ // The token to request the next page of results.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkInterfacePermissionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkInterfacePermissionsInput) GoString() string {
+ return s.String()
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeNetworkInterfacePermissionsInput) SetFilters(v []*Filter) *DescribeNetworkInterfacePermissionsInput {
+ s.Filters = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeNetworkInterfacePermissionsInput) SetMaxResults(v int64) *DescribeNetworkInterfacePermissionsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNetworkInterfacePermissionIds sets the NetworkInterfacePermissionIds field's value.
+func (s *DescribeNetworkInterfacePermissionsInput) SetNetworkInterfacePermissionIds(v []*string) *DescribeNetworkInterfacePermissionsInput {
+ s.NetworkInterfacePermissionIds = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeNetworkInterfacePermissionsInput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsInput {
+ s.NextToken = &v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsResult
+type DescribeNetworkInterfacePermissionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The network interface permissions.
+ NetworkInterfacePermissions []*NetworkInterfacePermission `locationName:"networkInterfacePermissions" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkInterfacePermissionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkInterfacePermissionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetNetworkInterfacePermissions sets the NetworkInterfacePermissions field's value.
+func (s *DescribeNetworkInterfacePermissionsOutput) SetNetworkInterfacePermissions(v []*NetworkInterfacePermission) *DescribeNetworkInterfacePermissionsOutput {
+ s.NetworkInterfacePermissions = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeNetworkInterfacePermissionsOutput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsOutput {
+ s.NextToken = &v
+ return s
+}
+
// Contains the parameters for DescribeNetworkInterfaces.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacesRequest
type DescribeNetworkInterfacesInput struct {
@@ -28659,6 +33323,9 @@ type DescribeReservedInstancesOfferingsInput struct {
// with a tenancy of dedicated is applied to instances that run in a VPC on
// single-tenant hardware (i.e., Dedicated Instances).
//
+ // Important: The host value cannot be used with this parameter. Use the default
+ // or dedicated values only.
+ //
// Default: default
InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
@@ -28890,7 +33557,8 @@ type DescribeRouteTablesInput struct {
// * 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 (true | false).
+ // table for the VPC (true | false). Route tables that do not have an association
+ // ID are not returned in the response.
//
// * route-table-id - The ID of the route table.
//
@@ -29620,7 +34288,7 @@ type DescribeSnapshotsInput struct {
//
// * owner-alias - Value from an Amazon-maintained list (amazon | aws-marketplace
// | microsoft) of snapshot owners. Not to be confused with the user-configured
- // AWS account alias, which is set from the IAM consolew.
+ // AWS account alias, which is set from the IAM console.
//
// * owner-id - The ID of the AWS account that owns the snapshot.
//
@@ -30886,7 +35554,7 @@ func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput {
type DescribeVolumeAttributeInput struct {
_ struct{} `type:"structure"`
- // The instance attribute.
+ // The attribute of the volume. This parameter is required.
Attribute *string `type:"string" enum:"VolumeAttributeName"`
// Checks whether you have the required permissions for the action, without
@@ -34482,6 +39150,182 @@ func (s *FlowLog) SetTrafficType(v string) *FlowLog {
return s
}
+// Describes an Amazon FPGA image (AFI).
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImage
+type FpgaImage struct {
+ _ struct{} `type:"structure"`
+
+ // The date and time the AFI was created.
+ CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The description of the AFI.
+ Description *string `locationName:"description" type:"string"`
+
+ // The global FPGA image identifier (AGFI ID).
+ FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"`
+
+ // The FPGA image identifier (AFI ID).
+ FpgaImageId *string `locationName:"fpgaImageId" type:"string"`
+
+ // The name of the AFI.
+ Name *string `locationName:"name" type:"string"`
+
+ // The alias of the AFI owner. Possible values include self, amazon, and aws-marketplace.
+ OwnerAlias *string `locationName:"ownerAlias" type:"string"`
+
+ // The AWS account ID of the AFI owner.
+ OwnerId *string `locationName:"ownerId" type:"string"`
+
+ // Information about the PCI bus.
+ PciId *PciId `locationName:"pciId" type:"structure"`
+
+ // The product codes for the AFI.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+
+ // The version of the AWS Shell that was used to create the bitstream.
+ ShellVersion *string `locationName:"shellVersion" type:"string"`
+
+ // Information about the state of the AFI.
+ State *FpgaImageState `locationName:"state" type:"structure"`
+
+ // Any tags assigned to the AFI.
+ Tags []*Tag `locationName:"tags" locationNameList:"item" type:"list"`
+
+ // The time of the most recent update to the AFI.
+ UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"`
+}
+
+// String returns the string representation
+func (s FpgaImage) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FpgaImage) GoString() string {
+ return s.String()
+}
+
+// SetCreateTime sets the CreateTime field's value.
+func (s *FpgaImage) SetCreateTime(v time.Time) *FpgaImage {
+ s.CreateTime = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *FpgaImage) SetDescription(v string) *FpgaImage {
+ s.Description = &v
+ return s
+}
+
+// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value.
+func (s *FpgaImage) SetFpgaImageGlobalId(v string) *FpgaImage {
+ s.FpgaImageGlobalId = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *FpgaImage) SetFpgaImageId(v string) *FpgaImage {
+ s.FpgaImageId = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *FpgaImage) SetName(v string) *FpgaImage {
+ s.Name = &v
+ return s
+}
+
+// SetOwnerAlias sets the OwnerAlias field's value.
+func (s *FpgaImage) SetOwnerAlias(v string) *FpgaImage {
+ s.OwnerAlias = &v
+ return s
+}
+
+// SetOwnerId sets the OwnerId field's value.
+func (s *FpgaImage) SetOwnerId(v string) *FpgaImage {
+ s.OwnerId = &v
+ return s
+}
+
+// SetPciId sets the PciId field's value.
+func (s *FpgaImage) SetPciId(v *PciId) *FpgaImage {
+ s.PciId = v
+ return s
+}
+
+// SetProductCodes sets the ProductCodes field's value.
+func (s *FpgaImage) SetProductCodes(v []*ProductCode) *FpgaImage {
+ s.ProductCodes = v
+ return s
+}
+
+// SetShellVersion sets the ShellVersion field's value.
+func (s *FpgaImage) SetShellVersion(v string) *FpgaImage {
+ s.ShellVersion = &v
+ return s
+}
+
+// SetState sets the State field's value.
+func (s *FpgaImage) SetState(v *FpgaImageState) *FpgaImage {
+ s.State = v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *FpgaImage) SetTags(v []*Tag) *FpgaImage {
+ s.Tags = v
+ return s
+}
+
+// SetUpdateTime sets the UpdateTime field's value.
+func (s *FpgaImage) SetUpdateTime(v time.Time) *FpgaImage {
+ s.UpdateTime = &v
+ return s
+}
+
+// Describes the state of the bitstream generation process for an Amazon FPGA
+// image (AFI).
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImageState
+type FpgaImageState struct {
+ _ struct{} `type:"structure"`
+
+ // The state. The following are the possible values:
+ //
+ // * pending - AFI bitstream generation is in progress.
+ //
+ // * available - The AFI is available for use.
+ //
+ // * failed - AFI bitstream generation failed.
+ //
+ // * unavailable - The AFI is no longer available for use.
+ Code *string `locationName:"code" type:"string" enum:"FpgaImageStateCode"`
+
+ // If the state is failed, this is the error message.
+ Message *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s FpgaImageState) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FpgaImageState) GoString() string {
+ return s.String()
+}
+
+// SetCode sets the Code field's value.
+func (s *FpgaImageState) SetCode(v string) *FpgaImageState {
+ s.Code = &v
+ return s
+}
+
+// SetMessage sets the Message field's value.
+func (s *FpgaImageState) SetMessage(v string) *FpgaImageState {
+ s.Message = &v
+ return s
+}
+
// Contains the parameters for GetConsoleOutput.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutputRequest
type GetConsoleOutputInput struct {
@@ -39585,7 +44429,7 @@ type ModifyInstanceAttributeInput struct {
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
+ // console, CLI, or API; otherwise, you can. You cannot use this parameter for
// Spot Instances.
DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"`
@@ -41888,6 +46732,110 @@ func (s *NetworkInterfaceIpv6Address) SetIpv6Address(v string) *NetworkInterface
return s
}
+// Describes a permission for a network interface.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePermission
+type NetworkInterfacePermission struct {
+ _ struct{} `type:"structure"`
+
+ // The AWS account ID.
+ AwsAccountId *string `locationName:"awsAccountId" type:"string"`
+
+ // The AWS service.
+ AwsService *string `locationName:"awsService" type:"string"`
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The ID of the network interface permission.
+ NetworkInterfacePermissionId *string `locationName:"networkInterfacePermissionId" type:"string"`
+
+ // The type of permission.
+ Permission *string `locationName:"permission" type:"string" enum:"InterfacePermissionType"`
+
+ // Information about the state of the permission.
+ PermissionState *NetworkInterfacePermissionState `locationName:"permissionState" type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkInterfacePermission) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfacePermission) GoString() string {
+ return s.String()
+}
+
+// SetAwsAccountId sets the AwsAccountId field's value.
+func (s *NetworkInterfacePermission) SetAwsAccountId(v string) *NetworkInterfacePermission {
+ s.AwsAccountId = &v
+ return s
+}
+
+// SetAwsService sets the AwsService field's value.
+func (s *NetworkInterfacePermission) SetAwsService(v string) *NetworkInterfacePermission {
+ s.AwsService = &v
+ return s
+}
+
+// SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
+func (s *NetworkInterfacePermission) SetNetworkInterfaceId(v string) *NetworkInterfacePermission {
+ s.NetworkInterfaceId = &v
+ return s
+}
+
+// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value.
+func (s *NetworkInterfacePermission) SetNetworkInterfacePermissionId(v string) *NetworkInterfacePermission {
+ s.NetworkInterfacePermissionId = &v
+ return s
+}
+
+// SetPermission sets the Permission field's value.
+func (s *NetworkInterfacePermission) SetPermission(v string) *NetworkInterfacePermission {
+ s.Permission = &v
+ return s
+}
+
+// SetPermissionState sets the PermissionState field's value.
+func (s *NetworkInterfacePermission) SetPermissionState(v *NetworkInterfacePermissionState) *NetworkInterfacePermission {
+ s.PermissionState = v
+ return s
+}
+
+// Describes the state of a network interface permission.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePermissionState
+type NetworkInterfacePermissionState struct {
+ _ struct{} `type:"structure"`
+
+ // The state of the permission.
+ State *string `locationName:"state" type:"string" enum:"NetworkInterfacePermissionStateCode"`
+
+ // A status message, if applicable.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+}
+
+// String returns the string representation
+func (s NetworkInterfacePermissionState) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfacePermissionState) GoString() string {
+ return s.String()
+}
+
+// SetState sets the State field's value.
+func (s *NetworkInterfacePermissionState) SetState(v string) *NetworkInterfacePermissionState {
+ s.State = &v
+ return s
+}
+
+// SetStatusMessage sets the StatusMessage field's value.
+func (s *NetworkInterfacePermissionState) SetStatusMessage(v string) *NetworkInterfacePermissionState {
+ s.StatusMessage = &v
+ return s
+}
+
// Describes the private IPv4 address of a network interface.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePrivateIpAddress
type NetworkInterfacePrivateIpAddress struct {
@@ -41973,6 +46921,59 @@ func (s *NewDhcpConfiguration) SetValues(v []*string) *NewDhcpConfiguration {
return s
}
+// Describes the data that identifies an Amazon FPGA image (AFI) on the PCI
+// bus.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PciId
+type PciId struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the device.
+ DeviceId *string `type:"string"`
+
+ // The ID of the subsystem.
+ SubsystemId *string `type:"string"`
+
+ // The ID of the vendor for the subsystem.
+ SubsystemVendorId *string `type:"string"`
+
+ // The ID of the vendor.
+ VendorId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s PciId) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PciId) GoString() string {
+ return s.String()
+}
+
+// SetDeviceId sets the DeviceId field's value.
+func (s *PciId) SetDeviceId(v string) *PciId {
+ s.DeviceId = &v
+ return s
+}
+
+// SetSubsystemId sets the SubsystemId field's value.
+func (s *PciId) SetSubsystemId(v string) *PciId {
+ s.SubsystemId = &v
+ return s
+}
+
+// SetSubsystemVendorId sets the SubsystemVendorId field's value.
+func (s *PciId) SetSubsystemVendorId(v string) *PciId {
+ s.SubsystemVendorId = &v
+ return s
+}
+
+// SetVendorId sets the VendorId field's value.
+func (s *PciId) SetVendorId(v string) *PciId {
+ s.VendorId = &v
+ return s
+}
+
// Describes the VPC peering connection options.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PeeringConnectionOptions
type PeeringConnectionOptions struct {
@@ -42084,6 +47085,9 @@ type Placement struct {
// is not supported for the ImportInstance command.
HostId *string `locationName:"hostId" type:"string"`
+ // Reserved for future use.
+ SpreadDomain *string `locationName:"spreadDomain" 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. The host tenancy
// is not supported for the ImportInstance command.
@@ -42124,6 +47128,12 @@ func (s *Placement) SetHostId(v string) *Placement {
return s
}
+// SetSpreadDomain sets the SpreadDomain field's value.
+func (s *Placement) SetSpreadDomain(v string) *Placement {
+ s.SpreadDomain = &v
+ return s
+}
+
// SetTenancy sets the Tenancy field's value.
func (s *Placement) SetTenancy(v string) *Placement {
s.Tenancy = &v
@@ -43245,7 +48255,9 @@ type RegisterImageInput struct {
// the architecture specified in the manifest file.
Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
- // The billing product codes.
+ // The billing product codes. Your account must be authorized to specify billing
+ // product codes. Otherwise, you can use the AWS Marketplace to bill for the
+ // use of an AMI.
BillingProducts []*string `locationName:"BillingProduct" locationNameList:"item" type:"list"`
// One or more block device mapping entries.
@@ -44501,7 +49513,7 @@ type RequestSpotInstancesInput struct {
// Default: Instances are launched and terminated individually
LaunchGroup *string `locationName:"launchGroup" type:"string"`
- // Describes the launch specification for an instance.
+ // The launch specification.
LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"`
// The maximum hourly price (bid) for any Spot instance launched to fulfill
@@ -44690,7 +49702,9 @@ type RequestSpotLaunchSpecification struct {
// The name of the key pair.
KeyName *string `locationName:"keyName" type:"string"`
- // Describes the monitoring of an instance.
+ // Indicates whether basic or detailed monitoring is enabled for the instance.
+ //
+ // Default: Disabled
Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"`
// One or more network interfaces. If you specify a network interface, you must
@@ -44703,8 +49717,12 @@ type RequestSpotLaunchSpecification struct {
// The ID of the RAM disk.
RamdiskId *string `locationName:"ramdiskId" type:"string"`
+ // One or more security group IDs.
SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"`
+ // 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 []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"`
// The ID of the subnet in which to launch the instance.
@@ -46794,6 +51812,11 @@ type RunInstancesInput struct {
// [EC2-VPC] The ID of the subnet to launch the instance into.
SubnetId *string `type:"string"`
+ // The tags to apply to the resources during launch. You can tag instances and
+ // volumes. The specified tags are applied to all instances or volumes that
+ // are created during launch.
+ TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"`
+
// The user data to make available to the instance. For more information, see
// Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html)
// (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data)
@@ -46991,6 +52014,12 @@ func (s *RunInstancesInput) SetSubnetId(v string) *RunInstancesInput {
return s
}
+// SetTagSpecifications sets the TagSpecifications field's value.
+func (s *RunInstancesInput) SetTagSpecifications(v []*TagSpecification) *RunInstancesInput {
+ s.TagSpecifications = v
+ return s
+}
+
// SetUserData sets the UserData field's value.
func (s *RunInstancesInput) SetUserData(v string) *RunInstancesInput {
s.UserData = &v
@@ -50244,6 +55273,40 @@ func (s *Storage) SetS3(v *S3Storage) *Storage {
return s
}
+// Describes a storage location in Amazon S3.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StorageLocation
+type StorageLocation struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the S3 bucket.
+ Bucket *string `type:"string"`
+
+ // The key.
+ Key *string `type:"string"`
+}
+
+// String returns the string representation
+func (s StorageLocation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StorageLocation) GoString() string {
+ return s.String()
+}
+
+// SetBucket sets the Bucket field's value.
+func (s *StorageLocation) SetBucket(v string) *StorageLocation {
+ s.Bucket = &v
+ return s
+}
+
+// SetKey sets the Key field's value.
+func (s *StorageLocation) SetKey(v string) *StorageLocation {
+ s.Key = &v
+ return s
+}
+
// Describes a subnet.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Subnet
type Subnet struct {
@@ -50531,6 +55594,41 @@ func (s *TagDescription) SetValue(v string) *TagDescription {
return s
}
+// The tags to apply to a resource when the resource is being created.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TagSpecification
+type TagSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The type of resource to tag. Currently, the resource types that support tagging
+ // on creation are instance and volume.
+ ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"`
+
+ // The tags to apply to the resource.
+ Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s TagSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TagSpecification) GoString() string {
+ return s.String()
+}
+
+// SetResourceType sets the ResourceType field's value.
+func (s *TagSpecification) SetResourceType(v string) *TagSpecification {
+ s.ResourceType = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification {
+ s.Tags = v
+ return s
+}
+
// Information about the Convertible Reserved Instance offering.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetConfiguration
type TargetConfiguration struct {
@@ -52219,15 +57317,15 @@ func (s *VpcIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *VpcCidrBlockState
type VpcPeeringConnection struct {
_ struct{} `type:"structure"`
- // Information about the accepter VPC. CIDR block information is not returned
- // when creating a VPC peering connection, or when describing a VPC peering
- // connection that's in the initiating-request or pending-acceptance state.
+ // Information about the accepter VPC. CIDR block information is only returned
+ // when describing an active VPC peering connection.
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"`
- // Information about the requester VPC.
+ // Information about the requester VPC. CIDR block information is only returned
+ // when describing an active VPC peering connection.
RequesterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"requesterVpcInfo" type:"structure"`
// The status of the VPC peering connection.
@@ -53018,6 +58116,20 @@ const (
FlowLogsResourceTypeNetworkInterface = "NetworkInterface"
)
+const (
+ // FpgaImageStateCodePending is a FpgaImageStateCode enum value
+ FpgaImageStateCodePending = "pending"
+
+ // FpgaImageStateCodeFailed is a FpgaImageStateCode enum value
+ FpgaImageStateCodeFailed = "failed"
+
+ // FpgaImageStateCodeAvailable is a FpgaImageStateCode enum value
+ FpgaImageStateCodeAvailable = "available"
+
+ // FpgaImageStateCodeUnavailable is a FpgaImageStateCode enum value
+ FpgaImageStateCodeUnavailable = "unavailable"
+)
+
const (
// GatewayTypeIpsec1 is a GatewayType enum value
GatewayTypeIpsec1 = "ipsec.1"
@@ -53392,6 +58504,15 @@ const (
// InstanceTypeG28xlarge is a InstanceType enum value
InstanceTypeG28xlarge = "g2.8xlarge"
+ // InstanceTypeG34xlarge is a InstanceType enum value
+ InstanceTypeG34xlarge = "g3.4xlarge"
+
+ // InstanceTypeG38xlarge is a InstanceType enum value
+ InstanceTypeG38xlarge = "g3.8xlarge"
+
+ // InstanceTypeG316xlarge is a InstanceType enum value
+ InstanceTypeG316xlarge = "g3.16xlarge"
+
// InstanceTypeCg14xlarge is a InstanceType enum value
InstanceTypeCg14xlarge = "cg1.4xlarge"
@@ -53423,6 +58544,14 @@ const (
InstanceTypeF116xlarge = "f1.16xlarge"
)
+const (
+ // InterfacePermissionTypeInstanceAttach is a InterfacePermissionType enum value
+ InterfacePermissionTypeInstanceAttach = "INSTANCE-ATTACH"
+
+ // InterfacePermissionTypeEipAssociate is a InterfacePermissionType enum value
+ InterfacePermissionTypeEipAssociate = "EIP-ASSOCIATE"
+)
+
const (
// ListingStateAvailable is a ListingState enum value
ListingStateAvailable = "available"
@@ -53504,6 +58633,20 @@ const (
NetworkInterfaceAttributeAttachment = "attachment"
)
+const (
+ // NetworkInterfacePermissionStateCodePending is a NetworkInterfacePermissionStateCode enum value
+ NetworkInterfacePermissionStateCodePending = "pending"
+
+ // NetworkInterfacePermissionStateCodeGranted is a NetworkInterfacePermissionStateCode enum value
+ NetworkInterfacePermissionStateCodeGranted = "granted"
+
+ // NetworkInterfacePermissionStateCodeRevoking is a NetworkInterfacePermissionStateCode enum value
+ NetworkInterfacePermissionStateCodeRevoking = "revoking"
+
+ // NetworkInterfacePermissionStateCodeRevoked is a NetworkInterfacePermissionStateCode enum value
+ NetworkInterfacePermissionStateCodeRevoked = "revoked"
+)
+
const (
// NetworkInterfaceStatusAvailable is a NetworkInterfaceStatus enum value
NetworkInterfaceStatusAvailable = "available"
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
new file mode 100644
index 000000000..4aa6618b4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
@@ -0,0 +1,83 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package ec2 provides the client and types for making API
+// requests to Amazon Elastic Compute Cloud.
+//
+// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity
+// in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your
+// need to invest in hardware up front, so you can develop and deploy applications
+// faster.
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service.
+//
+// See ec2 package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/
+//
+// Using the Client
+//
+// To use the client for Amazon Elastic Compute Cloud you will first need
+// to create a new instance of it.
+//
+// When creating a client for an AWS service you'll first need to have a Session
+// already created. The Session provides configuration that can be shared
+// between multiple service clients. Additional configuration can be applied to
+// the Session and service's client when they are constructed. The aws package's
+// Config type contains several fields such as Region for the AWS Region the
+// client should make API requests too. The optional Config value can be provided
+// as the variadic argument for Sessions and client creation.
+//
+// Once the service's client is created you can use it to make API requests the
+// AWS service. These clients are safe to use concurrently.
+//
+// // Create a session to share configuration, and load external configuration.
+// sess := session.Must(session.NewSession())
+//
+// // Create the service's client with the session.
+// svc := ec2.New(sess)
+//
+// See the SDK's documentation for more information on how to use service clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws package's Config type for more information on configuration options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the Amazon Elastic Compute Cloud client EC2 for more
+// information on creating the service's client.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#New
+//
+// Once the client is created you can make an API request to the service.
+// Each API method takes a input parameter, and returns the service response
+// and an error.
+//
+// The API method will document which error codes the service can be returned
+// by the operation if the service models the API operation's errors. These
+// errors will also be available as const strings prefixed with "ErrCode".
+//
+// result, err := svc.AcceptReservedInstancesExchangeQuote(params)
+// if err != nil {
+// // Cast err to awserr.Error to handle specific error codes.
+// aerr, ok := err.(awserr.Error)
+// if ok && aerr.Code() == {
+// // Specific error code handling
+// }
+// return err
+// }
+//
+// fmt.Println("AcceptReservedInstancesExchangeQuote result:")
+// fmt.Println(result)
+//
+// Using the Client with Context
+//
+// The service's client also provides methods to make API requests with a Context
+// value. This allows you to control the timeout, and cancellation of pending
+// requests. These methods also take request Option as variadic parameter to apply
+// additional configuration to the API request.
+//
+// ctx := context.Background()
+//
+// result, err := svc.AcceptReservedInstancesExchangeQuoteWithContext(ctx, params)
+//
+// See the request package documentation for more information on using Context pattern
+// with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
+package ec2
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go
index f90fa6ec5..3d61d7e35 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go
@@ -1,3 +1,3 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go
index c289b5b04..ba4433d38 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
@@ -11,13 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/ec2query"
)
-// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity
-// in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your
-// need to invest in hardware up front, so you can develop and deploy applications
-// faster.
-// The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15
+// EC2 provides the API operation methods for making requests to
+// Amazon Elastic Compute Cloud. See this package's package overview docs
+// for details on the service.
+//
+// EC2 methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
type EC2 struct {
*client.Client
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
index 7917cbdaf..c0a655fa0 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
@@ -1,9 +1,12 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
import (
- "github.com/aws/aws-sdk-go/private/waiter"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilBundleTaskComplete uses the Amazon EC2 API operation
@@ -11,32 +14,50 @@ import (
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilBundleTaskComplete(input *DescribeBundleTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeBundleTasks",
- Delay: 15,
+ return c.WaitUntilBundleTaskCompleteWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilBundleTaskCompleteWithContext is an extended version of WaitUntilBundleTaskComplete.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilBundleTaskCompleteWithContext(ctx aws.Context, input *DescribeBundleTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilBundleTaskComplete",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "BundleTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "BundleTasks[].State",
Expected: "complete",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "BundleTasks[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "BundleTasks[].State",
Expected: "failed",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeBundleTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeBundleTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilConversionTaskCancelled uses the Amazon EC2 API operation
@@ -44,26 +65,45 @@ func (c *EC2) WaitUntilBundleTaskComplete(input *DescribeBundleTasksInput) error
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskCancelled(input *DescribeConversionTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeConversionTasks",
- Delay: 15,
+ return c.WaitUntilConversionTaskCancelledWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilConversionTaskCancelledWithContext is an extended version of WaitUntilConversionTaskCancelled.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilConversionTaskCancelledWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilConversionTaskCancelled",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ConversionTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "cancelled",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeConversionTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeConversionTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilConversionTaskCompleted uses the Amazon EC2 API operation
@@ -71,38 +111,55 @@ func (c *EC2) WaitUntilConversionTaskCancelled(input *DescribeConversionTasksInp
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskCompleted(input *DescribeConversionTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeConversionTasks",
- Delay: 15,
+ return c.WaitUntilConversionTaskCompletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilConversionTaskCompletedWithContext is an extended version of WaitUntilConversionTaskCompleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilConversionTaskCompletedWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilConversionTaskCompleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ConversionTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "completed",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "ConversionTasks[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "cancelled",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "ConversionTasks[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "cancelling",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeConversionTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeConversionTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilConversionTaskDeleted uses the Amazon EC2 API operation
@@ -110,26 +167,45 @@ func (c *EC2) WaitUntilConversionTaskCompleted(input *DescribeConversionTasksInp
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskDeleted(input *DescribeConversionTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeConversionTasks",
- Delay: 15,
+ return c.WaitUntilConversionTaskDeletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilConversionTaskDeletedWithContext is an extended version of WaitUntilConversionTaskDeleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilConversionTaskDeletedWithContext(ctx aws.Context, input *DescribeConversionTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilConversionTaskDeleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ConversionTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ConversionTasks[].State",
Expected: "deleted",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeConversionTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeConversionTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilCustomerGatewayAvailable uses the Amazon EC2 API operation
@@ -137,38 +213,55 @@ func (c *EC2) WaitUntilConversionTaskDeleted(input *DescribeConversionTasksInput
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeCustomerGateways",
- Delay: 15,
+ return c.WaitUntilCustomerGatewayAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilCustomerGatewayAvailableWithContext is an extended version of WaitUntilCustomerGatewayAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilCustomerGatewayAvailableWithContext(ctx aws.Context, input *DescribeCustomerGatewaysInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilCustomerGatewayAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "CustomerGateways[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "CustomerGateways[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "CustomerGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "CustomerGateways[].State",
Expected: "deleted",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "CustomerGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "CustomerGateways[].State",
Expected: "deleting",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeCustomerGatewaysInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeCustomerGatewaysRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilExportTaskCancelled uses the Amazon EC2 API operation
@@ -176,26 +269,45 @@ func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysI
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilExportTaskCancelled(input *DescribeExportTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeExportTasks",
- Delay: 15,
+ return c.WaitUntilExportTaskCancelledWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilExportTaskCancelledWithContext is an extended version of WaitUntilExportTaskCancelled.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilExportTaskCancelledWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilExportTaskCancelled",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ExportTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ExportTasks[].State",
Expected: "cancelled",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeExportTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeExportTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilExportTaskCompleted uses the Amazon EC2 API operation
@@ -203,26 +315,45 @@ func (c *EC2) WaitUntilExportTaskCancelled(input *DescribeExportTasksInput) erro
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilExportTaskCompleted(input *DescribeExportTasksInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeExportTasks",
- Delay: 15,
+ return c.WaitUntilExportTaskCompletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilExportTaskCompletedWithContext is an extended version of WaitUntilExportTaskCompleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilExportTaskCompletedWithContext(ctx aws.Context, input *DescribeExportTasksInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilExportTaskCompleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "ExportTasks[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "ExportTasks[].State",
Expected: "completed",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeExportTasksInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeExportTasksRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilImageAvailable uses the Amazon EC2 API operation
@@ -230,32 +361,50 @@ func (c *EC2) WaitUntilExportTaskCompleted(input *DescribeExportTasksInput) erro
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilImageAvailable(input *DescribeImagesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeImages",
- Delay: 15,
+ return c.WaitUntilImageAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilImageAvailableWithContext is an extended version of WaitUntilImageAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilImageAvailableWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilImageAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Images[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Images[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Images[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Images[].State",
Expected: "failed",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeImagesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeImagesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilImageExists uses the Amazon EC2 API operation
@@ -263,32 +412,50 @@ func (c *EC2) WaitUntilImageAvailable(input *DescribeImagesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilImageExists(input *DescribeImagesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeImages",
- Delay: 15,
+ return c.WaitUntilImageExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilImageExistsWithContext is an extended version of WaitUntilImageExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilImageExistsWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilImageExists",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
- Argument: "length(Images[]) > `0`",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "length(Images[]) > `0`",
Expected: true,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidAMIID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeImagesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeImagesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceExists uses the Amazon EC2 API operation
@@ -296,32 +463,50 @@ func (c *EC2) WaitUntilImageExists(input *DescribeImagesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilInstanceExists(input *DescribeInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstances",
- Delay: 5,
+ return c.WaitUntilInstanceExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceExistsWithContext is an extended version of WaitUntilInstanceExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceExistsWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceExists",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
- Argument: "length(Reservations[]) > `0`",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "length(Reservations[]) > `0`",
Expected: true,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidInstanceID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceRunning uses the Amazon EC2 API operation
@@ -329,50 +514,65 @@ func (c *EC2) WaitUntilInstanceExists(input *DescribeInstancesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilInstanceRunning(input *DescribeInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstances",
- Delay: 15,
+ return c.WaitUntilInstanceRunningWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceRunningWithContext is an extended version of WaitUntilInstanceRunning.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceRunningWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceRunning",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "running",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "shutting-down",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "terminated",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "stopping",
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidInstanceID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceStatusOk uses the Amazon EC2 API operation
@@ -380,32 +580,50 @@ func (c *EC2) WaitUntilInstanceRunning(input *DescribeInstancesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilInstanceStatusOk(input *DescribeInstanceStatusInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstanceStatus",
- Delay: 15,
+ return c.WaitUntilInstanceStatusOkWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceStatusOkWithContext is an extended version of WaitUntilInstanceStatusOk.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceStatusOkWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceStatusOk",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "InstanceStatuses[].InstanceStatus.Status",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "InstanceStatuses[].InstanceStatus.Status",
Expected: "ok",
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidInstanceID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstanceStatusInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstanceStatusRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceStopped uses the Amazon EC2 API operation
@@ -413,38 +631,55 @@ func (c *EC2) WaitUntilInstanceStatusOk(input *DescribeInstanceStatusInput) erro
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilInstanceStopped(input *DescribeInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstances",
- Delay: 15,
+ return c.WaitUntilInstanceStoppedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceStoppedWithContext is an extended version of WaitUntilInstanceStopped.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceStoppedWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceStopped",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "stopped",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "pending",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "terminated",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilInstanceTerminated uses the Amazon EC2 API operation
@@ -452,38 +687,55 @@ func (c *EC2) WaitUntilInstanceStopped(input *DescribeInstancesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstances",
- Delay: 15,
+ return c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilInstanceTerminatedWithContext is an extended version of WaitUntilInstanceTerminated.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilInstanceTerminatedWithContext(ctx aws.Context, input *DescribeInstancesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilInstanceTerminated",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "terminated",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "pending",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Reservations[].Instances[].State.Name",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Reservations[].Instances[].State.Name",
Expected: "stopping",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstancesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstancesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilKeyPairExists uses the Amazon EC2 API operation
@@ -491,32 +743,50 @@ func (c *EC2) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeKeyPairs",
- Delay: 5,
+ return c.WaitUntilKeyPairExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilKeyPairExistsWithContext is an extended version of WaitUntilKeyPairExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilKeyPairExistsWithContext(ctx aws.Context, input *DescribeKeyPairsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilKeyPairExists",
MaxAttempts: 6,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
- Argument: "length(KeyPairs[].KeyName) > `0`",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "length(KeyPairs[].KeyName) > `0`",
Expected: true,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidKeyPair.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeKeyPairsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeKeyPairsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilNatGatewayAvailable uses the Amazon EC2 API operation
@@ -524,50 +794,65 @@ func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilNatGatewayAvailable(input *DescribeNatGatewaysInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeNatGateways",
- Delay: 15,
+ return c.WaitUntilNatGatewayAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilNatGatewayAvailableWithContext is an extended version of WaitUntilNatGatewayAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilNatGatewayAvailableWithContext(ctx aws.Context, input *DescribeNatGatewaysInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilNatGatewayAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "NatGateways[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "NatGateways[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "NatGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State",
Expected: "failed",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "NatGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State",
Expected: "deleting",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "NatGateways[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "NatGateways[].State",
Expected: "deleted",
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "NatGatewayNotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeNatGatewaysInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeNatGatewaysRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilNetworkInterfaceAvailable uses the Amazon EC2 API operation
@@ -575,32 +860,50 @@ func (c *EC2) WaitUntilNatGatewayAvailable(input *DescribeNatGatewaysInput) erro
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterfacesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeNetworkInterfaces",
- Delay: 20,
+ return c.WaitUntilNetworkInterfaceAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilNetworkInterfaceAvailableWithContext is an extended version of WaitUntilNetworkInterfaceAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilNetworkInterfaceAvailableWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilNetworkInterfaceAvailable",
MaxAttempts: 10,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(20 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "NetworkInterfaces[].Status",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "NetworkInterfaces[].Status",
Expected: "available",
},
{
- State: "failure",
- Matcher: "error",
- Argument: "",
+ State: request.FailureWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidNetworkInterfaceID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeNetworkInterfacesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeNetworkInterfacesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilPasswordDataAvailable uses the Amazon EC2 API operation
@@ -608,26 +911,45 @@ func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterface
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilPasswordDataAvailable(input *GetPasswordDataInput) error {
- waiterCfg := waiter.Config{
- Operation: "GetPasswordData",
- Delay: 15,
+ return c.WaitUntilPasswordDataAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilPasswordDataAvailableWithContext is an extended version of WaitUntilPasswordDataAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilPasswordDataAvailableWithContext(ctx aws.Context, input *GetPasswordDataInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilPasswordDataAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "path",
- Argument: "length(PasswordData) > `0`",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathWaiterMatch, Argument: "length(PasswordData) > `0`",
Expected: true,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *GetPasswordDataInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.GetPasswordDataRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilSnapshotCompleted uses the Amazon EC2 API operation
@@ -635,26 +957,45 @@ func (c *EC2) WaitUntilPasswordDataAvailable(input *GetPasswordDataInput) error
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilSnapshotCompleted(input *DescribeSnapshotsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeSnapshots",
- Delay: 15,
+ return c.WaitUntilSnapshotCompletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilSnapshotCompletedWithContext is an extended version of WaitUntilSnapshotCompleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilSnapshotCompletedWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilSnapshotCompleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Snapshots[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Snapshots[].State",
Expected: "completed",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeSnapshotsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSnapshotsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilSpotInstanceRequestFulfilled uses the Amazon EC2 API operation
@@ -662,50 +1003,65 @@ func (c *EC2) WaitUntilSnapshotCompleted(input *DescribeSnapshotsInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilSpotInstanceRequestFulfilled(input *DescribeSpotInstanceRequestsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeSpotInstanceRequests",
- Delay: 15,
+ return c.WaitUntilSpotInstanceRequestFulfilledWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilSpotInstanceRequestFulfilledWithContext is an extended version of WaitUntilSpotInstanceRequestFulfilled.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context, input *DescribeSpotInstanceRequestsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilSpotInstanceRequestFulfilled",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "fulfilled",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "schedule-expired",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "canceled-before-fulfillment",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "bad-parameters",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "SpotInstanceRequests[].Status.Code",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "system-error",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeSpotInstanceRequestsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSpotInstanceRequestsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilSubnetAvailable uses the Amazon EC2 API operation
@@ -713,26 +1069,45 @@ func (c *EC2) WaitUntilSpotInstanceRequestFulfilled(input *DescribeSpotInstanceR
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilSubnetAvailable(input *DescribeSubnetsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeSubnets",
- Delay: 15,
+ return c.WaitUntilSubnetAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilSubnetAvailableWithContext is an extended version of WaitUntilSubnetAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilSubnetAvailableWithContext(ctx aws.Context, input *DescribeSubnetsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilSubnetAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Subnets[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Subnets[].State",
Expected: "available",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeSubnetsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeSubnetsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilSystemStatusOk uses the Amazon EC2 API operation
@@ -740,26 +1115,45 @@ func (c *EC2) WaitUntilSubnetAvailable(input *DescribeSubnetsInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilSystemStatusOk(input *DescribeInstanceStatusInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeInstanceStatus",
- Delay: 15,
+ return c.WaitUntilSystemStatusOkWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilSystemStatusOkWithContext is an extended version of WaitUntilSystemStatusOk.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilSystemStatusOkWithContext(ctx aws.Context, input *DescribeInstanceStatusInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilSystemStatusOk",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "InstanceStatuses[].SystemStatus.Status",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "InstanceStatuses[].SystemStatus.Status",
Expected: "ok",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeInstanceStatusInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeInstanceStatusRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVolumeAvailable uses the Amazon EC2 API operation
@@ -767,32 +1161,50 @@ func (c *EC2) WaitUntilSystemStatusOk(input *DescribeInstanceStatusInput) error
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVolumeAvailable(input *DescribeVolumesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVolumes",
- Delay: 15,
+ return c.WaitUntilVolumeAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVolumeAvailableWithContext is an extended version of WaitUntilVolumeAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVolumeAvailableWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVolumeAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Volumes[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Volumes[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Volumes[].State",
Expected: "deleted",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVolumesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVolumeDeleted uses the Amazon EC2 API operation
@@ -800,32 +1212,50 @@ func (c *EC2) WaitUntilVolumeAvailable(input *DescribeVolumesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVolumeDeleted(input *DescribeVolumesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVolumes",
- Delay: 15,
+ return c.WaitUntilVolumeDeletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVolumeDeletedWithContext is an extended version of WaitUntilVolumeDeleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVolumeDeletedWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVolumeDeleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Volumes[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State",
Expected: "deleted",
},
{
- State: "success",
- Matcher: "error",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidVolume.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVolumesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVolumeInUse uses the Amazon EC2 API operation
@@ -833,32 +1263,50 @@ func (c *EC2) WaitUntilVolumeDeleted(input *DescribeVolumesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVolumeInUse(input *DescribeVolumesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVolumes",
- Delay: 15,
+ return c.WaitUntilVolumeInUseWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVolumeInUseWithContext is an extended version of WaitUntilVolumeInUse.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVolumeInUseWithContext(ctx aws.Context, input *DescribeVolumesInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVolumeInUse",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Volumes[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Volumes[].State",
Expected: "in-use",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "Volumes[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "Volumes[].State",
Expected: "deleted",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVolumesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVolumesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpcAvailable uses the Amazon EC2 API operation
@@ -866,26 +1314,45 @@ func (c *EC2) WaitUntilVolumeInUse(input *DescribeVolumesInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVpcAvailable(input *DescribeVpcsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpcs",
- Delay: 15,
+ return c.WaitUntilVpcAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpcAvailableWithContext is an extended version of WaitUntilVpcAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpcAvailableWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpcAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "Vpcs[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "Vpcs[].State",
Expected: "available",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpcsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpcsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpcExists uses the Amazon EC2 API operation
@@ -893,32 +1360,50 @@ func (c *EC2) WaitUntilVpcAvailable(input *DescribeVpcsInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVpcExists(input *DescribeVpcsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpcs",
- Delay: 1,
+ return c.WaitUntilVpcExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpcExistsWithContext is an extended version of WaitUntilVpcExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpcExistsWithContext(ctx aws.Context, input *DescribeVpcsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpcExists",
MaxAttempts: 5,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(1 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidVpcID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpcsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpcsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpcPeeringConnectionDeleted uses the Amazon EC2 API operation
@@ -926,32 +1411,50 @@ func (c *EC2) WaitUntilVpcExists(input *DescribeVpcsInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVpcPeeringConnectionDeleted(input *DescribeVpcPeeringConnectionsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpcPeeringConnections",
- Delay: 15,
+ return c.WaitUntilVpcPeeringConnectionDeletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpcPeeringConnectionDeletedWithContext is an extended version of WaitUntilVpcPeeringConnectionDeleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpcPeeringConnectionDeletedWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpcPeeringConnectionDeleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "VpcPeeringConnections[].Status.Code",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "VpcPeeringConnections[].Status.Code",
Expected: "deleted",
},
{
- State: "success",
- Matcher: "error",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidVpcPeeringConnectionID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpcPeeringConnectionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpcPeeringConnectionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpcPeeringConnectionExists uses the Amazon EC2 API operation
@@ -959,32 +1462,50 @@ func (c *EC2) WaitUntilVpcPeeringConnectionDeleted(input *DescribeVpcPeeringConn
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVpcPeeringConnectionExists(input *DescribeVpcPeeringConnectionsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpcPeeringConnections",
- Delay: 15,
+ return c.WaitUntilVpcPeeringConnectionExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpcPeeringConnectionExistsWithContext is an extended version of WaitUntilVpcPeeringConnectionExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpcPeeringConnectionExistsWithContext(ctx aws.Context, input *DescribeVpcPeeringConnectionsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpcPeeringConnectionExists",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
- State: "retry",
- Matcher: "error",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
Expected: "InvalidVpcPeeringConnectionID.NotFound",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpcPeeringConnectionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpcPeeringConnectionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpnConnectionAvailable uses the Amazon EC2 API operation
@@ -992,38 +1513,55 @@ func (c *EC2) WaitUntilVpcPeeringConnectionExists(input *DescribeVpcPeeringConne
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVpnConnectionAvailable(input *DescribeVpnConnectionsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpnConnections",
- Delay: 15,
+ return c.WaitUntilVpnConnectionAvailableWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpnConnectionAvailableWithContext is an extended version of WaitUntilVpnConnectionAvailable.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpnConnectionAvailableWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpnConnectionAvailable",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "VpnConnections[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "VpnConnections[].State",
Expected: "available",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "VpnConnections[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State",
Expected: "deleting",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "VpnConnections[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State",
Expected: "deleted",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpnConnectionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpnConnectionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilVpnConnectionDeleted uses the Amazon EC2 API operation
@@ -1031,30 +1569,48 @@ func (c *EC2) WaitUntilVpnConnectionAvailable(input *DescribeVpnConnectionsInput
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *EC2) WaitUntilVpnConnectionDeleted(input *DescribeVpnConnectionsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeVpnConnections",
- Delay: 15,
+ return c.WaitUntilVpnConnectionDeletedWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilVpnConnectionDeletedWithContext is an extended version of WaitUntilVpnConnectionDeleted.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) WaitUntilVpnConnectionDeletedWithContext(ctx aws.Context, input *DescribeVpnConnectionsInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilVpnConnectionDeleted",
MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(15 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "pathAll",
- Argument: "VpnConnections[].State",
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "VpnConnections[].State",
Expected: "deleted",
},
{
- State: "failure",
- Matcher: "pathAny",
- Argument: "VpnConnections[].State",
+ State: request.FailureWaiterState,
+ Matcher: request.PathAnyWaiterMatch, Argument: "VpnConnections[].State",
Expected: "pending",
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *DescribeVpnConnectionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeVpnConnectionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
index fc46f5145..c06242daa 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
@@ -1,11 +1,11 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-// Package ecr provides a client for Amazon EC2 Container Registry.
package ecr
import (
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
@@ -84,8 +84,23 @@ func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabil
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability
func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) {
req, out := c.BatchCheckLayerAvailabilityRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// BatchCheckLayerAvailabilityWithContext is the same as BatchCheckLayerAvailability with the addition of
+// the ability to pass a context and additional request options.
+//
+// See BatchCheckLayerAvailability for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) BatchCheckLayerAvailabilityWithContext(ctx aws.Context, input *BatchCheckLayerAvailabilityInput, opts ...request.Option) (*BatchCheckLayerAvailabilityOutput, error) {
+ req, out := c.BatchCheckLayerAvailabilityRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opBatchDeleteImage = "BatchDeleteImage"
@@ -165,8 +180,23 @@ func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage
func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) {
req, out := c.BatchDeleteImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// BatchDeleteImageWithContext is the same as BatchDeleteImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See BatchDeleteImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) BatchDeleteImageWithContext(ctx aws.Context, input *BatchDeleteImageInput, opts ...request.Option) (*BatchDeleteImageOutput, error) {
+ req, out := c.BatchDeleteImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opBatchGetImage = "BatchGetImage"
@@ -239,8 +269,23 @@ func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage
func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) {
req, out := c.BatchGetImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// BatchGetImageWithContext is the same as BatchGetImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See BatchGetImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) BatchGetImageWithContext(ctx aws.Context, input *BatchGetImageInput, opts ...request.Option) (*BatchGetImageOutput, error) {
+ req, out := c.BatchGetImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCompleteLayerUpload = "CompleteLayerUpload"
@@ -335,8 +380,23 @@ func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload
func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) {
req, out := c.CompleteLayerUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CompleteLayerUploadWithContext is the same as CompleteLayerUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CompleteLayerUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) CompleteLayerUploadWithContext(ctx aws.Context, input *CompleteLayerUploadInput, opts ...request.Option) (*CompleteLayerUploadOutput, error) {
+ req, out := c.CompleteLayerUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateRepository = "CreateRepository"
@@ -413,8 +473,23 @@ func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository
func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
req, out := c.CreateRepositoryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateRepositoryWithContext is the same as CreateRepository with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateRepository for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) {
+ req, out := c.CreateRepositoryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteRepository = "DeleteRepository"
@@ -491,8 +566,23 @@ func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *reques
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository
func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
req, out := c.DeleteRepositoryRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteRepositoryWithContext is the same as DeleteRepository with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteRepository for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) {
+ req, out := c.DeleteRepositoryRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy"
@@ -568,8 +658,23 @@ func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy
func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) {
req, out := c.DeleteRepositoryPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteRepositoryPolicyWithContext is the same as DeleteRepositoryPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteRepositoryPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRepositoryPolicyInput, opts ...request.Option) (*DeleteRepositoryPolicyOutput, error) {
+ req, out := c.DeleteRepositoryPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDescribeImages = "DescribeImages"
@@ -656,8 +761,23 @@ func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages
func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
req, out := c.DescribeImagesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeImagesWithContext is the same as DescribeImages with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeImages for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) {
+ req, out := c.DescribeImagesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeImagesPages iterates over the pages of a DescribeImages operation,
@@ -677,12 +797,37 @@ func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput,
// return pageNum <= 3
// })
//
-func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(p *DescribeImagesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeImagesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeImagesOutput), lastPage)
- })
+func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool) error {
+ return c.DescribeImagesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeImagesPagesWithContext same as DescribeImagesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeImagesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeImagesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opDescribeRepositories = "DescribeRepositories"
@@ -760,8 +905,23 @@ func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories
func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) {
req, out := c.DescribeRepositoriesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DescribeRepositoriesWithContext is the same as DescribeRepositories with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeRepositories for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DescribeRepositoriesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, opts ...request.Option) (*DescribeRepositoriesOutput, error) {
+ req, out := c.DescribeRepositoriesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// DescribeRepositoriesPages iterates over the pages of a DescribeRepositories operation,
@@ -781,12 +941,37 @@ func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeR
// return pageNum <= 3
// })
//
-func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(p *DescribeRepositoriesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.DescribeRepositoriesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*DescribeRepositoriesOutput), lastPage)
- })
+func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool) error {
+ return c.DescribeRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// DescribeRepositoriesPagesWithContext same as DescribeRepositoriesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *DescribeRepositoriesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.DescribeRepositoriesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opGetAuthorizationToken = "GetAuthorizationToken"
@@ -861,8 +1046,23 @@ func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken
func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) {
req, out := c.GetAuthorizationTokenRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetAuthorizationTokenWithContext is the same as GetAuthorizationToken with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetAuthorizationToken for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) GetAuthorizationTokenWithContext(ctx aws.Context, input *GetAuthorizationTokenInput, opts ...request.Option) (*GetAuthorizationTokenOutput, error) {
+ req, out := c.GetAuthorizationTokenRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer"
@@ -947,8 +1147,23 @@ func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer
func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) {
req, out := c.GetDownloadUrlForLayerRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetDownloadUrlForLayerWithContext is the same as GetDownloadUrlForLayer with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetDownloadUrlForLayer for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownloadUrlForLayerInput, opts ...request.Option) (*GetDownloadUrlForLayerOutput, error) {
+ req, out := c.GetDownloadUrlForLayerRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetRepositoryPolicy = "GetRepositoryPolicy"
@@ -1024,8 +1239,23 @@ func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy
func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) {
req, out := c.GetRepositoryPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetRepositoryPolicyWithContext is the same as GetRepositoryPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetRepositoryPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) GetRepositoryPolicyWithContext(ctx aws.Context, input *GetRepositoryPolicyInput, opts ...request.Option) (*GetRepositoryPolicyOutput, error) {
+ req, out := c.GetRepositoryPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opInitiateLayerUpload = "InitiateLayerUpload"
@@ -1101,8 +1331,23 @@ func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload
func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) {
req, out := c.InitiateLayerUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// InitiateLayerUploadWithContext is the same as InitiateLayerUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See InitiateLayerUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) InitiateLayerUploadWithContext(ctx aws.Context, input *InitiateLayerUploadInput, opts ...request.Option) (*InitiateLayerUploadOutput, error) {
+ req, out := c.InitiateLayerUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListImages = "ListImages"
@@ -1186,8 +1431,23 @@ func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, o
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages
func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
req, out := c.ListImagesRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListImagesWithContext is the same as ListImages with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListImages for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) ListImagesWithContext(ctx aws.Context, input *ListImagesInput, opts ...request.Option) (*ListImagesOutput, error) {
+ req, out := c.ListImagesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListImagesPages iterates over the pages of a ListImages operation,
@@ -1207,12 +1467,37 @@ func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
// return pageNum <= 3
// })
//
-func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(p *ListImagesOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListImagesRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListImagesOutput), lastPage)
- })
+func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(*ListImagesOutput, bool) bool) error {
+ return c.ListImagesPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListImagesPagesWithContext same as ListImagesPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput, fn func(*ListImagesOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListImagesInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListImagesRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListImagesOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opPutImage = "PutImage"
@@ -1302,8 +1587,23 @@ func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, outpu
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage
func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) {
req, out := c.PutImageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutImageWithContext is the same as PutImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts ...request.Option) (*PutImageOutput, error) {
+ req, out := c.PutImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opSetRepositoryPolicy = "SetRepositoryPolicy"
@@ -1375,8 +1675,23 @@ func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy
func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) {
req, out := c.SetRepositoryPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// SetRepositoryPolicyWithContext is the same as SetRepositoryPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See SetRepositoryPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetRepositoryPolicyInput, opts ...request.Option) (*SetRepositoryPolicyOutput, error) {
+ req, out := c.SetRepositoryPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUploadLayerPart = "UploadLayerPart"
@@ -1466,8 +1781,23 @@ func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart
func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) {
req, out := c.UploadLayerPartRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UploadLayerPartWithContext is the same as UploadLayerPart with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UploadLayerPart for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPartInput, opts ...request.Option) (*UploadLayerPartOutput, error) {
+ req, out := c.UploadLayerPartRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// An object representing authorization data for an Amazon ECR registry.
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go
new file mode 100644
index 000000000..004e50f0a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go
@@ -0,0 +1,85 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package ecr provides the client and types for making API
+// requests to Amazon EC2 Container Registry.
+//
+// Amazon EC2 Container Registry (Amazon ECR) is a managed AWS Docker registry
+// service. Customers can use the familiar Docker CLI to push, pull, and manage
+// images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon
+// ECR supports private Docker repositories with resource-based permissions
+// using AWS IAM so that specific users or Amazon EC2 instances can access repositories
+// and images. Developers can use the Docker CLI to author and manage images.
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21 for more information on this service.
+//
+// See ecr package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/ecr/
+//
+// Using the Client
+//
+// To use the client for Amazon EC2 Container Registry you will first need
+// to create a new instance of it.
+//
+// When creating a client for an AWS service you'll first need to have a Session
+// already created. The Session provides configuration that can be shared
+// between multiple service clients. Additional configuration can be applied to
+// the Session and service's client when they are constructed. The aws package's
+// Config type contains several fields such as Region for the AWS Region the
+// client should make API requests too. The optional Config value can be provided
+// as the variadic argument for Sessions and client creation.
+//
+// Once the service's client is created you can use it to make API requests the
+// AWS service. These clients are safe to use concurrently.
+//
+// // Create a session to share configuration, and load external configuration.
+// sess := session.Must(session.NewSession())
+//
+// // Create the service's client with the session.
+// svc := ecr.New(sess)
+//
+// See the SDK's documentation for more information on how to use service clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws package's Config type for more information on configuration options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the Amazon EC2 Container Registry client ECR for more
+// information on creating the service's client.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/ecr/#New
+//
+// Once the client is created you can make an API request to the service.
+// Each API method takes a input parameter, and returns the service response
+// and an error.
+//
+// The API method will document which error codes the service can be returned
+// by the operation if the service models the API operation's errors. These
+// errors will also be available as const strings prefixed with "ErrCode".
+//
+// result, err := svc.BatchCheckLayerAvailability(params)
+// if err != nil {
+// // Cast err to awserr.Error to handle specific error codes.
+// aerr, ok := err.(awserr.Error)
+// if ok && aerr.Code() == {
+// // Specific error code handling
+// }
+// return err
+// }
+//
+// fmt.Println("BatchCheckLayerAvailability result:")
+// fmt.Println(result)
+//
+// Using the Client with Context
+//
+// The service's client also provides methods to make API requests with a Context
+// value. This allows you to control the timeout, and cancellation of pending
+// requests. These methods also take request Option as variadic parameter to apply
+// additional configuration to the API request.
+//
+// ctx := context.Background()
+//
+// result, err := svc.BatchCheckLayerAvailabilityWithContext(ctx, params)
+//
+// See the request package documentation for more information on using Context pattern
+// with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
+package ecr
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go
index c51948bc7..4399e6a29 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ecr
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go
index 2c7904b75..95de12e25 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ecr
@@ -11,15 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
-// Amazon EC2 Container Registry (Amazon ECR) is a managed AWS Docker registry
-// service. Customers can use the familiar Docker CLI to push, pull, and manage
-// images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon
-// ECR supports private Docker repositories with resource-based permissions
-// using AWS IAM so that specific users or Amazon EC2 instances can access repositories
-// and images. Developers can use the Docker CLI to author and manage images.
-// The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21
+// ECR provides the API operation methods for making requests to
+// Amazon EC2 Container Registry. See this package's package overview docs
+// for details on the service.
+//
+// ECR methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
type ECR struct {
*client.Client
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
index 9b205f3f0..8a5fd8e17 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
@@ -1,6 +1,5 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-// Package s3 provides a client for Amazon Simple Storage Service.
package s3
import (
@@ -8,6 +7,7 @@ import (
"io"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
@@ -79,8 +79,23 @@ func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
req, out := c.AbortMultipartUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AbortMultipartUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
+ req, out := c.AbortMultipartUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCompleteMultipartUpload = "CompleteMultipartUpload"
@@ -139,8 +154,23 @@ func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
req, out := c.CompleteMultipartUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CompleteMultipartUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
+ req, out := c.CompleteMultipartUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCopyObject = "CopyObject"
@@ -205,8 +235,23 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
req, out := c.CopyObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CopyObjectWithContext is the same as CopyObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CopyObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
+ req, out := c.CopyObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateBucket = "CreateBucket"
@@ -273,8 +318,23 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
req, out := c.CreateBucketRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateBucketWithContext is the same as CreateBucket with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateBucket for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
+ req, out := c.CreateBucketRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opCreateMultipartUpload = "CreateMultipartUpload"
@@ -339,8 +399,23 @@ func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
req, out := c.CreateMultipartUploadRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateMultipartUpload for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
+ req, out := c.CreateMultipartUploadRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucket = "DeleteBucket"
@@ -402,8 +477,23 @@ func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
req, out := c.DeleteBucketRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketWithContext is the same as DeleteBucket with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucket for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
+ req, out := c.DeleteBucketRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
@@ -465,8 +555,23 @@ func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyt
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
+ req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketCors = "DeleteBucketCors"
@@ -527,8 +632,23 @@ func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
req, out := c.DeleteBucketCorsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketCors for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
+ req, out := c.DeleteBucketCorsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
@@ -590,8 +710,23 @@ func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInvent
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
req, out := c.DeleteBucketInventoryConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketInventoryConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
+ req, out := c.DeleteBucketInventoryConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
@@ -652,8 +787,23 @@ func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
req, out := c.DeleteBucketLifecycleRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketLifecycle for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
+ req, out := c.DeleteBucketLifecycleRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
@@ -715,8 +865,23 @@ func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsC
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
req, out := c.DeleteBucketMetricsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketMetricsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
+ req, out := c.DeleteBucketMetricsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketPolicy = "DeleteBucketPolicy"
@@ -777,8 +942,23 @@ func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
req, out := c.DeleteBucketPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
+ req, out := c.DeleteBucketPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketReplication = "DeleteBucketReplication"
@@ -839,8 +1019,23 @@ func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
req, out := c.DeleteBucketReplicationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketReplication for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
+ req, out := c.DeleteBucketReplicationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketTagging = "DeleteBucketTagging"
@@ -901,8 +1096,23 @@ func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
req, out := c.DeleteBucketTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
+ req, out := c.DeleteBucketTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteBucketWebsite = "DeleteBucketWebsite"
@@ -963,8 +1173,23 @@ func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
req, out := c.DeleteBucketWebsiteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketWebsite for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
+ req, out := c.DeleteBucketWebsiteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteObject = "DeleteObject"
@@ -1025,8 +1250,23 @@ func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
req, out := c.DeleteObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteObjectWithContext is the same as DeleteObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
+ req, out := c.DeleteObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteObjectTagging = "DeleteObjectTagging"
@@ -1085,8 +1325,23 @@ func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
req, out := c.DeleteObjectTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteObjectTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
+ req, out := c.DeleteObjectTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDeleteObjects = "DeleteObjects"
@@ -1146,8 +1401,23 @@ func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
req, out := c.DeleteObjectsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DeleteObjectsWithContext is the same as DeleteObjects with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteObjects for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
+ req, out := c.DeleteObjectsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
@@ -1206,8 +1476,23 @@ func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateC
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
req, out := c.GetBucketAccelerateConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketAccelerateConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
+ req, out := c.GetBucketAccelerateConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketAcl = "GetBucketAcl"
@@ -1266,8 +1551,23 @@ func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
req, out := c.GetBucketAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketAclWithContext is the same as GetBucketAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
+ req, out := c.GetBucketAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
@@ -1327,8 +1627,23 @@ func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
req, out := c.GetBucketAnalyticsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketAnalyticsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
+ req, out := c.GetBucketAnalyticsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketCors = "GetBucketCors"
@@ -1387,8 +1702,23 @@ func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
req, out := c.GetBucketCorsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketCorsWithContext is the same as GetBucketCors with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketCors for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
+ req, out := c.GetBucketCorsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
@@ -1448,8 +1778,23 @@ func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
req, out := c.GetBucketInventoryConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketInventoryConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
+ req, out := c.GetBucketInventoryConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketLifecycle = "GetBucketLifecycle"
@@ -1511,8 +1856,23 @@ func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
req, out := c.GetBucketLifecycleRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketLifecycle for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
+ req, out := c.GetBucketLifecycleRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
@@ -1571,8 +1931,23 @@ func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
req, out := c.GetBucketLifecycleConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketLifecycleConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
+ req, out := c.GetBucketLifecycleConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketLocation = "GetBucketLocation"
@@ -1631,8 +2006,23 @@ func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
req, out := c.GetBucketLocationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketLocation for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
+ req, out := c.GetBucketLocationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketLogging = "GetBucketLogging"
@@ -1692,8 +2082,23 @@ func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
req, out := c.GetBucketLoggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketLogging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
+ req, out := c.GetBucketLoggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
@@ -1753,8 +2158,23 @@ func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigu
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
req, out := c.GetBucketMetricsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketMetricsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
+ req, out := c.GetBucketMetricsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketNotification = "GetBucketNotification"
@@ -1816,8 +2236,23 @@ func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurat
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
req, out := c.GetBucketNotificationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketNotification for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
+ req, out := c.GetBucketNotificationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
@@ -1876,8 +2311,23 @@ func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificat
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
req, out := c.GetBucketNotificationConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketNotificationConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
+ req, out := c.GetBucketNotificationConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketPolicy = "GetBucketPolicy"
@@ -1936,8 +2386,23 @@ func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.R
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
req, out := c.GetBucketPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
+ req, out := c.GetBucketPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketReplication = "GetBucketReplication"
@@ -1996,8 +2461,23 @@ func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
req, out := c.GetBucketReplicationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketReplication for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
+ req, out := c.GetBucketReplicationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketRequestPayment = "GetBucketRequestPayment"
@@ -2056,8 +2536,23 @@ func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
req, out := c.GetBucketRequestPaymentRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketRequestPayment for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
+ req, out := c.GetBucketRequestPaymentRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketTagging = "GetBucketTagging"
@@ -2116,8 +2611,23 @@ func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
req, out := c.GetBucketTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
+ req, out := c.GetBucketTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketVersioning = "GetBucketVersioning"
@@ -2176,8 +2686,23 @@ func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
req, out := c.GetBucketVersioningRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketVersioning for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
+ req, out := c.GetBucketVersioningRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetBucketWebsite = "GetBucketWebsite"
@@ -2236,8 +2761,23 @@ func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
req, out := c.GetBucketWebsiteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketWebsite for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
+ req, out := c.GetBucketWebsiteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetObject = "GetObject"
@@ -2301,8 +2841,23 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
req, out := c.GetObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetObjectWithContext is the same as GetObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
+ req, out := c.GetObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetObjectAcl = "GetObjectAcl"
@@ -2366,8 +2921,23 @@ func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
req, out := c.GetObjectAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetObjectAclWithContext is the same as GetObjectAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetObjectAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
+ req, out := c.GetObjectAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetObjectTagging = "GetObjectTagging"
@@ -2426,8 +2996,23 @@ func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
req, out := c.GetObjectTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetObjectTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
+ req, out := c.GetObjectTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetObjectTorrent = "GetObjectTorrent"
@@ -2486,8 +3071,23 @@ func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
req, out := c.GetObjectTorrentRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetObjectTorrent for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
+ req, out := c.GetObjectTorrentRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opHeadBucket = "HeadBucket"
@@ -2554,8 +3154,23 @@ func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, ou
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
req, out := c.HeadBucketRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// HeadBucketWithContext is the same as HeadBucket with the addition of
+// the ability to pass a context and additional request options.
+//
+// See HeadBucket for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
+ req, out := c.HeadBucketRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opHeadObject = "HeadObject"
@@ -2607,22 +3222,35 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou
// object itself. This operation is useful if you're only interested in an object's
// metadata. To use HEAD, you must have READ access to the object.
//
+// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
+// for more information on returned errors.
+//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation HeadObject for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
req, out := c.HeadObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// HeadObjectWithContext is the same as HeadObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See HeadObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
+ req, out := c.HeadObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
@@ -2681,8 +3309,23 @@ func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalytics
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListBucketAnalyticsConfigurations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
+ req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
@@ -2741,8 +3384,23 @@ func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventory
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
req, out := c.ListBucketInventoryConfigurationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListBucketInventoryConfigurations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
+ req, out := c.ListBucketInventoryConfigurationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
@@ -2801,8 +3459,23 @@ func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConf
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
req, out := c.ListBucketMetricsConfigurationsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListBucketMetricsConfigurations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
+ req, out := c.ListBucketMetricsConfigurationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListBuckets = "ListBuckets"
@@ -2861,8 +3534,23 @@ func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
req, out := c.ListBucketsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListBucketsWithContext is the same as ListBuckets with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListBuckets for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
+ req, out := c.ListBucketsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opListMultipartUploads = "ListMultipartUploads"
@@ -2927,8 +3615,23 @@ func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
req, out := c.ListMultipartUploadsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListMultipartUploads for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
+ req, out := c.ListMultipartUploadsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
@@ -2948,12 +3651,37 @@ func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultip
// return pageNum <= 3
// })
//
-func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(p *ListMultipartUploadsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListMultipartUploadsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListMultipartUploadsOutput), lastPage)
- })
+func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
+ return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListMultipartUploadsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListMultipartUploadsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opListObjectVersions = "ListObjectVersions"
@@ -3018,8 +3746,23 @@ func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
req, out := c.ListObjectVersionsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListObjectVersions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
+ req, out := c.ListObjectVersionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
@@ -3039,12 +3782,37 @@ func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVers
// return pageNum <= 3
// })
//
-func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(p *ListObjectVersionsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListObjectVersionsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListObjectVersionsOutput), lastPage)
- })
+func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
+ return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListObjectVersionsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListObjectVersionsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opListObjects = "ListObjects"
@@ -3116,8 +3884,23 @@ func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request,
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
req, out := c.ListObjectsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListObjectsWithContext is the same as ListObjects with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListObjects for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
+ req, out := c.ListObjectsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListObjectsPages iterates over the pages of a ListObjects operation,
@@ -3137,12 +3920,37 @@ func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
// return pageNum <= 3
// })
//
-func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(p *ListObjectsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListObjectsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListObjectsOutput), lastPage)
- })
+func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
+ return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListObjectsPagesWithContext same as ListObjectsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListObjectsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListObjectsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opListObjectsV2 = "ListObjectsV2"
@@ -3215,8 +4023,23 @@ func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
req, out := c.ListObjectsV2Request(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListObjectsV2 for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
+ req, out := c.ListObjectsV2Request(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
@@ -3236,12 +4059,37 @@ func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, err
// return pageNum <= 3
// })
//
-func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(p *ListObjectsV2Output, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListObjectsV2Request(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListObjectsV2Output), lastPage)
- })
+func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
+ return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListObjectsV2Input
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListObjectsV2Request(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
+ }
+ return p.Err()
}
const opListParts = "ListParts"
@@ -3306,8 +4154,23 @@ func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, outp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
req, out := c.ListPartsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// ListPartsWithContext is the same as ListParts with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ListParts for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
+ req, out := c.ListPartsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// ListPartsPages iterates over the pages of a ListParts operation,
@@ -3327,12 +4190,37 @@ func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
// return pageNum <= 3
// })
//
-func (c *S3) ListPartsPages(input *ListPartsInput, fn func(p *ListPartsOutput, lastPage bool) (shouldContinue bool)) error {
- page, _ := c.ListPartsRequest(input)
- page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
- return page.EachPage(func(p interface{}, lastPage bool) bool {
- return fn(p.(*ListPartsOutput), lastPage)
- })
+func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
+ return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
+}
+
+// ListPartsPagesWithContext same as ListPartsPages except
+// it takes a Context and allows setting request options on the pages.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
+ p := request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *ListPartsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.ListPartsRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
+ }
+
+ cont := true
+ for p.Next() && cont {
+ cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
+ }
+ return p.Err()
}
const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
@@ -3393,8 +4281,23 @@ func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateC
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
req, out := c.PutBucketAccelerateConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketAccelerateConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
+ req, out := c.PutBucketAccelerateConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketAcl = "PutBucketAcl"
@@ -3455,8 +4358,23 @@ func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
req, out := c.PutBucketAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketAclWithContext is the same as PutBucketAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
+ req, out := c.PutBucketAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
@@ -3518,8 +4436,23 @@ func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
req, out := c.PutBucketAnalyticsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketAnalyticsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
+ req, out := c.PutBucketAnalyticsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketCors = "PutBucketCors"
@@ -3580,8 +4513,23 @@ func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
req, out := c.PutBucketCorsRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketCorsWithContext is the same as PutBucketCors with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketCors for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
+ req, out := c.PutBucketCorsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
@@ -3643,8 +4591,23 @@ func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
req, out := c.PutBucketInventoryConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketInventoryConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
+ req, out := c.PutBucketInventoryConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketLifecycle = "PutBucketLifecycle"
@@ -3708,8 +4671,23 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
req, out := c.PutBucketLifecycleRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketLifecycle for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
+ req, out := c.PutBucketLifecycleRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
@@ -3771,8 +4749,23 @@ func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleCon
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
req, out := c.PutBucketLifecycleConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketLifecycleConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
+ req, out := c.PutBucketLifecycleConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketLogging = "PutBucketLogging"
@@ -3835,8 +4828,23 @@ func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
req, out := c.PutBucketLoggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketLogging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
+ req, out := c.PutBucketLoggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
@@ -3898,8 +4906,23 @@ func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigu
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
req, out := c.PutBucketMetricsConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketMetricsConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
+ req, out := c.PutBucketMetricsConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketNotification = "PutBucketNotification"
@@ -3963,8 +4986,23 @@ func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
req, out := c.PutBucketNotificationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketNotification for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
+ req, out := c.PutBucketNotificationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
@@ -4025,8 +5063,23 @@ func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificat
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
req, out := c.PutBucketNotificationConfigurationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketNotificationConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
+ req, out := c.PutBucketNotificationConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketPolicy = "PutBucketPolicy"
@@ -4088,8 +5141,23 @@ func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.R
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
req, out := c.PutBucketPolicyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketPolicy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
+ req, out := c.PutBucketPolicyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketReplication = "PutBucketReplication"
@@ -4151,8 +5219,23 @@ func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
req, out := c.PutBucketReplicationRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketReplication for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
+ req, out := c.PutBucketReplicationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketRequestPayment = "PutBucketRequestPayment"
@@ -4217,8 +5300,23 @@ func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
req, out := c.PutBucketRequestPaymentRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketRequestPayment for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
+ req, out := c.PutBucketRequestPaymentRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketTagging = "PutBucketTagging"
@@ -4279,8 +5377,23 @@ func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
req, out := c.PutBucketTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
+ req, out := c.PutBucketTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketVersioning = "PutBucketVersioning"
@@ -4342,8 +5455,23 @@ func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *r
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
req, out := c.PutBucketVersioningRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketVersioning for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
+ req, out := c.PutBucketVersioningRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutBucketWebsite = "PutBucketWebsite"
@@ -4404,8 +5532,23 @@ func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
req, out := c.PutBucketWebsiteRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketWebsite for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
+ req, out := c.PutBucketWebsiteRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutObject = "PutObject"
@@ -4464,8 +5607,23 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
req, out := c.PutObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutObjectWithContext is the same as PutObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
+ req, out := c.PutObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutObjectAcl = "PutObjectAcl"
@@ -4530,8 +5688,23 @@ func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
req, out := c.PutObjectAclRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutObjectAclWithContext is the same as PutObjectAcl with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutObjectAcl for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
+ req, out := c.PutObjectAclRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opPutObjectTagging = "PutObjectTagging"
@@ -4590,8 +5763,23 @@ func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
req, out := c.PutObjectTaggingRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutObjectTagging for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
+ req, out := c.PutObjectTaggingRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opRestoreObject = "RestoreObject"
@@ -4655,8 +5843,23 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
req, out := c.RestoreObjectRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// RestoreObjectWithContext is the same as RestoreObject with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RestoreObject for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
+ req, out := c.RestoreObjectRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUploadPart = "UploadPart"
@@ -4721,8 +5924,23 @@ func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, ou
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
req, out := c.UploadPartRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UploadPartWithContext is the same as UploadPart with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UploadPart for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
+ req, out := c.UploadPartRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opUploadPartCopy = "UploadPartCopy"
@@ -4781,8 +5999,23 @@ func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Req
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
req, out := c.UploadPartCopyRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UploadPartCopy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
+ req, out := c.UploadPartCopyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// Specifies the days since the initiation of an Incomplete Multipart Upload
@@ -4870,6 +6103,13 @@ func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInp
return s
}
+func (s *AbortMultipartUploadInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
s.Key = &v
@@ -5279,6 +6519,13 @@ func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDes
return s
}
+func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetBucketAccountId sets the BucketAccountId field's value.
func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
s.BucketAccountId = &v
@@ -5637,7 +6884,7 @@ type CompleteMultipartUploadInput struct {
// Key is a required field
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
- MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure"`
+ MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Confirms that the requester knows that she or he will be charged for the
// request. Bucket owners need not specify this parameter in their requests.
@@ -5687,6 +6934,13 @@ func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUpl
return s
}
+func (s *CompleteMultipartUploadInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
s.Key = &v
@@ -5760,6 +7014,13 @@ func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUp
return s
}
+func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetETag sets the ETag field's value.
func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
s.ETag = &v
@@ -6085,6 +7346,13 @@ func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
return s
}
+func (s *CopyObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCacheControl sets the CacheControl field's value.
func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
s.CacheControl = &v
@@ -6157,6 +7425,13 @@ func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput
return s
}
+func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
+ if s.CopySourceSSECustomerKey == nil {
+ return v
+ }
+ return *s.CopySourceSSECustomerKey
+}
+
// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
s.CopySourceSSECustomerKeyMD5 = &v
@@ -6229,6 +7504,13 @@ func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
return s
}
+func (s *CopyObjectInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
s.SSECustomerKeyMD5 = &v
@@ -6471,7 +7753,7 @@ type CreateBucketInput struct {
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure"`
+ CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Allows grantee the read, write, read ACP, and write ACP permissions on the
// bucket.
@@ -6525,6 +7807,13 @@ func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
return s
}
+func (s *CreateBucketInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
s.CreateBucketConfiguration = v
@@ -6666,6 +7955,9 @@ type CreateMultipartUploadInput struct {
// The type of storage to use for the object. Defaults to 'STANDARD'.
StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
+ // The tag-set for the object. The tag-set must be encoded as URL Query parameters
+ Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
+
// If the bucket is configured as a website, redirects requests for this object
// to another object in the same bucket or to an external URL. Amazon S3 stores
// the value of this header in the object metadata.
@@ -6713,6 +8005,13 @@ func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadI
return s
}
+func (s *CreateMultipartUploadInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCacheControl sets the CacheControl field's value.
func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
s.CacheControl = &v
@@ -6803,6 +8102,13 @@ func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipar
return s
}
+func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
s.SSECustomerKeyMD5 = &v
@@ -6827,6 +8133,12 @@ func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartU
return s
}
+// SetTagging sets the Tagging field's value.
+func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
+ s.Tagging = &v
+ return s
+}
+
// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
s.WebsiteRedirectLocation = &v
@@ -6904,6 +8216,13 @@ func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUpload
return s
}
+func (s *CreateMultipartUploadOutput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
s.Key = &v
@@ -7050,6 +8369,13 @@ func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBuc
return s
}
+func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
s.Id = &v
@@ -7108,6 +8434,13 @@ func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
return s
}
+func (s *DeleteBucketCorsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsOutput
type DeleteBucketCorsOutput struct {
_ struct{} `type:"structure"`
@@ -7160,6 +8493,13 @@ func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
return s
}
+func (s *DeleteBucketInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationRequest
type DeleteBucketInventoryConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -7207,6 +8547,13 @@ func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBuc
return s
}
+func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
s.Id = &v
@@ -7265,6 +8612,13 @@ func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleI
return s
}
+func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleOutput
type DeleteBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
@@ -7327,6 +8681,13 @@ func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucke
return s
}
+func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
s.Id = &v
@@ -7400,6 +8761,13 @@ func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
return s
}
+func (s *DeleteBucketPolicyInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyOutput
type DeleteBucketPolicyOutput struct {
_ struct{} `type:"structure"`
@@ -7452,6 +8820,13 @@ func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicat
return s
}
+func (s *DeleteBucketReplicationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationOutput
type DeleteBucketReplicationOutput struct {
_ struct{} `type:"structure"`
@@ -7504,6 +8879,13 @@ func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput
return s
}
+func (s *DeleteBucketTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingOutput
type DeleteBucketTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -7556,6 +8938,13 @@ func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput
return s
}
+func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteOutput
type DeleteBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
@@ -7690,6 +9079,13 @@ func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
return s
}
+func (s *DeleteObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
s.Key = &v
@@ -7808,6 +9204,13 @@ func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput
return s
}
+func (s *DeleteObjectTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
s.Key = &v
@@ -7852,7 +9255,7 @@ type DeleteObjectsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// Delete is a required field
- Delete *Delete `locationName:"Delete" type:"structure" required:"true"`
+ Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// The concatenation of the authentication device's serial number, a space,
// and the value that is displayed on your authentication device.
@@ -7902,6 +9305,13 @@ func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
return s
}
+func (s *DeleteObjectsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetDelete sets the Delete field's value.
func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
s.Delete = v
@@ -8051,6 +9461,13 @@ func (s *Destination) SetBucket(v string) *Destination {
return s
}
+func (s *Destination) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetStorageClass sets the StorageClass field's value.
func (s *Destination) SetStorageClass(v string) *Destination {
s.StorageClass = &v
@@ -8221,6 +9638,13 @@ func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAc
return s
}
+func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationOutput
type GetBucketAccelerateConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -8282,6 +9706,13 @@ func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
return s
}
+func (s *GetBucketAclInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclOutput
type GetBucketAclOutput struct {
_ struct{} `type:"structure"`
@@ -8361,6 +9792,13 @@ func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAna
return s
}
+func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
s.Id = &v
@@ -8428,6 +9866,13 @@ func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
return s
}
+func (s *GetBucketCorsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsOutput
type GetBucketCorsOutput struct {
_ struct{} `type:"structure"`
@@ -8498,6 +9943,13 @@ func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInv
return s
}
+func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
s.Id = &v
@@ -8565,6 +10017,13 @@ func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLif
return s
}
+func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationOutput
type GetBucketLifecycleConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -8625,6 +10084,13 @@ func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
return s
}
+func (s *GetBucketLifecycleInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleOutput
type GetBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
@@ -8685,6 +10151,13 @@ func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
return s
}
+func (s *GetBucketLocationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationOutput
type GetBucketLocationOutput struct {
_ struct{} `type:"structure"`
@@ -8745,6 +10218,13 @@ func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
return s
}
+func (s *GetBucketLoggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingOutput
type GetBucketLoggingOutput struct {
_ struct{} `type:"structure"`
@@ -8815,6 +10295,13 @@ func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetri
return s
}
+func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
s.Id = &v
@@ -8884,6 +10371,13 @@ func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBuck
return s
}
+func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyRequest
type GetBucketPolicyInput struct {
_ struct{} `type:"structure"`
@@ -8921,6 +10415,13 @@ func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
return s
}
+func (s *GetBucketPolicyInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyOutput
type GetBucketPolicyOutput struct {
_ struct{} `type:"structure" payload:"Policy"`
@@ -8982,6 +10483,13 @@ func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInp
return s
}
+func (s *GetBucketReplicationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationOutput
type GetBucketReplicationOutput struct {
_ struct{} `type:"structure" payload:"ReplicationConfiguration"`
@@ -9044,6 +10552,13 @@ func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaym
return s
}
+func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentOutput
type GetBucketRequestPaymentOutput struct {
_ struct{} `type:"structure"`
@@ -9105,6 +10620,13 @@ func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
return s
}
+func (s *GetBucketTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingOutput
type GetBucketTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -9166,6 +10688,13 @@ func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput
return s
}
+func (s *GetBucketVersioningInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningOutput
type GetBucketVersioningOutput struct {
_ struct{} `type:"structure"`
@@ -9238,6 +10767,13 @@ func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
return s
}
+func (s *GetBucketWebsiteInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteOutput
type GetBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
@@ -9340,6 +10876,13 @@ func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
return s
}
+func (s *GetObjectAclInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
s.Key = &v
@@ -9513,6 +11056,13 @@ func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
return s
}
+func (s *GetObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetIfMatch sets the IfMatch field's value.
func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
s.IfMatch = &v
@@ -9609,6 +11159,13 @@ func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
return s
}
+func (s *GetObjectInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
s.SSECustomerKeyMD5 = &v
@@ -9953,6 +11510,13 @@ func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
return s
}
+func (s *GetObjectTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
s.Key = &v
@@ -10049,6 +11613,13 @@ func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
return s
}
+func (s *GetObjectTorrentInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
s.Key = &v
@@ -10137,7 +11708,7 @@ func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
type Grant struct {
_ struct{} `type:"structure"`
- Grantee *Grantee `type:"structure"`
+ Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
// Specifies the permission given to the grantee.
Permission *string `type:"string" enum:"Permission"`
@@ -10292,6 +11863,13 @@ func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
return s
}
+func (s *HeadBucketInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketOutput
type HeadBucketOutput struct {
_ struct{} `type:"structure"`
@@ -10403,6 +11981,13 @@ func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
return s
}
+func (s *HeadObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetIfMatch sets the IfMatch field's value.
func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
s.IfMatch = &v
@@ -10463,6 +12048,13 @@ func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
return s
}
+func (s *HeadObjectInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
s.SSECustomerKeyMD5 = &v
@@ -11081,6 +12673,13 @@ func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDes
return s
}
+func (s *InventoryS3BucketDestination) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetFormat sets the Format field's value.
func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
s.Format = &v
@@ -11611,6 +13210,13 @@ func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucket
return s
}
+func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContinuationToken sets the ContinuationToken field's value.
func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
s.ContinuationToken = &v
@@ -11717,6 +13323,13 @@ func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucket
return s
}
+func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContinuationToken sets the ContinuationToken field's value.
func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
s.ContinuationToken = &v
@@ -11823,6 +13436,13 @@ func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMe
return s
}
+func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContinuationToken sets the ContinuationToken field's value.
func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
s.ContinuationToken = &v
@@ -11998,6 +13618,13 @@ func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInp
return s
}
+func (s *ListMultipartUploadsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetDelimiter sets the Delimiter field's value.
func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
s.Delimiter = &v
@@ -12095,6 +13722,13 @@ func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOu
return s
}
+func (s *ListMultipartUploadsOutput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCommonPrefixes sets the CommonPrefixes field's value.
func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
s.CommonPrefixes = v
@@ -12222,6 +13856,13 @@ func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
return s
}
+func (s *ListObjectVersionsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetDelimiter sets the Delimiter field's value.
func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
s.Delimiter = &v
@@ -12449,6 +14090,13 @@ func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
return s
}
+func (s *ListObjectsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetDelimiter sets the Delimiter field's value.
func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
s.Delimiter = &v
@@ -12661,6 +14309,13 @@ func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
return s
}
+func (s *ListObjectsV2Input) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContinuationToken sets the ContinuationToken field's value.
func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
s.ContinuationToken = &v
@@ -12910,6 +14565,13 @@ func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
return s
}
+func (s *ListPartsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
s.Key = &v
@@ -13017,6 +14679,13 @@ func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
return s
}
+func (s *ListPartsOutput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetInitiator sets the Initiator field's value.
func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
s.Initiator = v
@@ -13900,7 +15569,7 @@ type PutBucketAccelerateConfigurationInput struct {
// Specifies the Accelerate Configuration you want to set for the bucket.
//
// AccelerateConfiguration is a required field
- AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true"`
+ AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Name of the bucket for which the accelerate configuration is set.
//
@@ -13946,6 +15615,13 @@ func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAc
return s
}
+func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationOutput
type PutBucketAccelerateConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -13968,7 +15644,7 @@ type PutBucketAclInput struct {
// The canned ACL to apply to the bucket.
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
- AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
+ AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -14036,6 +15712,13 @@ func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
return s
}
+func (s *PutBucketAclInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetGrantFullControl sets the GrantFullControl field's value.
func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
s.GrantFullControl = &v
@@ -14088,7 +15771,7 @@ type PutBucketAnalyticsConfigurationInput struct {
// The configuration and any analyses for the analytics filter.
//
// AnalyticsConfiguration is a required field
- AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true"`
+ AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// The name of the bucket to which an analytics configuration is stored.
//
@@ -14147,6 +15830,13 @@ func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAna
return s
}
+func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
s.Id = &v
@@ -14176,7 +15866,7 @@ type PutBucketCorsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// CORSConfiguration is a required field
- CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true"`
+ CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14216,6 +15906,13 @@ func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
return s
}
+func (s *PutBucketCorsInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCORSConfiguration sets the CORSConfiguration field's value.
func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
s.CORSConfiguration = v
@@ -14254,7 +15951,7 @@ type PutBucketInventoryConfigurationInput struct {
// Specifies the inventory configuration.
//
// InventoryConfiguration is a required field
- InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true"`
+ InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14297,6 +15994,13 @@ func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInv
return s
}
+func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
s.Id = &v
@@ -14331,7 +16035,7 @@ type PutBucketLifecycleConfigurationInput struct {
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
+ LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14368,6 +16072,13 @@ func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLif
return s
}
+func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
s.LifecycleConfiguration = v
@@ -14396,7 +16107,7 @@ type PutBucketLifecycleInput struct {
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
- LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
+ LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14433,6 +16144,13 @@ func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
return s
}
+func (s *PutBucketLifecycleInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
s.LifecycleConfiguration = v
@@ -14462,7 +16180,7 @@ type PutBucketLoggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// BucketLoggingStatus is a required field
- BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true"`
+ BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14502,6 +16220,13 @@ func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
return s
}
+func (s *PutBucketLoggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
s.BucketLoggingStatus = v
@@ -14540,7 +16265,7 @@ type PutBucketMetricsConfigurationInput struct {
// Specifies the metrics configuration.
//
// MetricsConfiguration is a required field
- MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true"`
+ MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14583,6 +16308,13 @@ func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetri
return s
}
+func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetId sets the Id field's value.
func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
s.Id = &v
@@ -14621,7 +16353,7 @@ type PutBucketNotificationConfigurationInput struct {
// this element is empty, notifications are turned off on the bucket.
//
// NotificationConfiguration is a required field
- NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true"`
+ NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14661,6 +16393,13 @@ func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucket
return s
}
+func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetNotificationConfiguration sets the NotificationConfiguration field's value.
func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
s.NotificationConfiguration = v
@@ -14690,7 +16429,7 @@ type PutBucketNotificationInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// NotificationConfiguration is a required field
- NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true"`
+ NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14725,6 +16464,13 @@ func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationI
return s
}
+func (s *PutBucketNotificationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetNotificationConfiguration sets the NotificationConfiguration field's value.
func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
s.NotificationConfiguration = v
@@ -14791,6 +16537,13 @@ func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
return s
}
+func (s *PutBucketPolicyInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetPolicy sets the Policy field's value.
func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
s.Policy = &v
@@ -14823,7 +16576,7 @@ type PutBucketReplicationInput struct {
// replication configuration size can be up to 2 MB.
//
// ReplicationConfiguration is a required field
- ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true"`
+ ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14863,6 +16616,13 @@ func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInp
return s
}
+func (s *PutBucketReplicationInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetReplicationConfiguration sets the ReplicationConfiguration field's value.
func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
s.ReplicationConfiguration = v
@@ -14892,7 +16652,7 @@ type PutBucketRequestPaymentInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// RequestPaymentConfiguration is a required field
- RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true"`
+ RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -14932,6 +16692,13 @@ func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaym
return s
}
+func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
s.RequestPaymentConfiguration = v
@@ -14961,7 +16728,7 @@ type PutBucketTaggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// Tagging is a required field
- Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"`
+ Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -15001,6 +16768,13 @@ func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
return s
}
+func (s *PutBucketTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetTagging sets the Tagging field's value.
func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
s.Tagging = v
@@ -15034,7 +16808,7 @@ type PutBucketVersioningInput struct {
MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
// VersioningConfiguration is a required field
- VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true"`
+ VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -15069,6 +16843,13 @@ func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput
return s
}
+func (s *PutBucketVersioningInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetMFA sets the MFA field's value.
func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
s.MFA = &v
@@ -15104,7 +16885,7 @@ type PutBucketWebsiteInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
// WebsiteConfiguration is a required field
- WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true"`
+ WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
}
// String returns the string representation
@@ -15144,6 +16925,13 @@ func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
return s
}
+func (s *PutBucketWebsiteInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
s.WebsiteConfiguration = v
@@ -15172,7 +16960,7 @@ type PutObjectAclInput struct {
// The canned ACL to apply to the object.
ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
- AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
+ AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -15258,6 +17046,13 @@ func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
return s
}
+func (s *PutObjectAclInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetGrantFullControl sets the GrantFullControl field's value.
func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
s.GrantFullControl = &v
@@ -15480,6 +17275,13 @@ func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
return s
}
+func (s *PutObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCacheControl sets the CacheControl field's value.
func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
s.CacheControl = &v
@@ -15576,6 +17378,13 @@ func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
return s
}
+func (s *PutObjectInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
s.SSECustomerKeyMD5 = &v
@@ -15718,7 +17527,7 @@ type PutObjectTaggingInput struct {
Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
// Tagging is a required field
- Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"`
+ Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
}
@@ -15766,6 +17575,13 @@ func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
return s
}
+func (s *PutObjectTaggingInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
s.Key = &v
@@ -16252,7 +18068,7 @@ type RestoreObjectInput struct {
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure"`
+ RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
}
@@ -16297,6 +18113,13 @@ func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
return s
}
+func (s *RestoreObjectInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetKey sets the Key field's value.
func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
s.Key = &v
@@ -16772,7 +18595,7 @@ func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
type TargetGrant struct {
_ struct{} `type:"structure"`
- Grantee *Grantee `type:"structure"`
+ Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
// Logging permissions assigned to the Grantee for the bucket.
Permission *string `type:"string" enum:"BucketLogsPermission"`
@@ -17112,6 +18935,13 @@ func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
return s
}
+func (s *UploadPartCopyInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetCopySource sets the CopySource field's value.
func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
s.CopySource = &v
@@ -17160,6 +18990,13 @@ func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartC
return s
}
+func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
+ if s.CopySourceSSECustomerKey == nil {
+ return v
+ }
+ return *s.CopySourceSSECustomerKey
+}
+
// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
s.CopySourceSSECustomerKeyMD5 = &v
@@ -17196,6 +19033,13 @@ func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
return s
}
+func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
s.SSECustomerKeyMD5 = &v
@@ -17395,6 +19239,13 @@ func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
return s
}
+func (s *UploadPartInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
// SetContentLength sets the ContentLength field's value.
func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
s.ContentLength = &v
@@ -17431,6 +19282,13 @@ func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
return s
}
+func (s *UploadPartInput) getSSECustomerKey() (v string) {
+ if s.SSECustomerKey == nil {
+ return v
+ }
+ return *s.SSECustomerKey
+}
+
// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
s.SSECustomerKeyMD5 = &v
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
index c3a2702da..bc68a46ac 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
@@ -12,6 +12,69 @@ import (
var reBucketLocation = regexp.MustCompile(`>([^<>]+)<\/Location`)
+// NormalizeBucketLocation is a utility function which will update the
+// passed in value to always be a region ID. Generally this would be used
+// with GetBucketLocation API operation.
+//
+// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
+//
+// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
+// for more information on the values that can be returned.
+func NormalizeBucketLocation(loc string) string {
+ switch loc {
+ case "":
+ loc = "us-east-1"
+ case "EU":
+ loc = "eu-west-1"
+ }
+
+ return loc
+}
+
+// NormalizeBucketLocationHandler is a request handler which will update the
+// GetBucketLocation's result LocationConstraint value to always be a region ID.
+//
+// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
+//
+// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
+// for more information on the values that can be returned.
+//
+// req, result := svc.GetBucketLocationRequest(&s3.GetBucketLocationInput{
+// Bucket: aws.String(bucket),
+// })
+// req.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
+// err := req.Send()
+var NormalizeBucketLocationHandler = request.NamedHandler{
+ Name: "awssdk.s3.NormalizeBucketLocation",
+ Fn: func(req *request.Request) {
+ if req.Error != nil {
+ return
+ }
+
+ out := req.Data.(*GetBucketLocationOutput)
+ loc := NormalizeBucketLocation(aws.StringValue(out.LocationConstraint))
+ out.LocationConstraint = aws.String(loc)
+ },
+}
+
+// WithNormalizeBucketLocation is a request option which will update the
+// GetBucketLocation's result LocationConstraint value to always be a region ID.
+//
+// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
+//
+// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
+// for more information on the values that can be returned.
+//
+// result, err := svc.GetBucketLocationWithContext(ctx,
+// &s3.GetBucketLocationInput{
+// Bucket: aws.String(bucket),
+// },
+// s3.WithNormalizeBucketLocation,
+// )
+func WithNormalizeBucketLocation(r *request.Request) {
+ r.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
+}
+
func buildGetBucketLocation(r *request.Request) {
if r.DataFilled() {
out := r.Data.(*GetBucketLocationOutput)
@@ -24,7 +87,7 @@ func buildGetBucketLocation(r *request.Request) {
match := reBucketLocation.FindSubmatch(b)
if len(match) > 1 {
loc := string(match[1])
- out.LocationConstraint = &loc
+ out.LocationConstraint = aws.String(loc)
}
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
index 846334723..899d5e8d1 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
@@ -44,3 +44,21 @@ func defaultInitRequestFn(r *request.Request) {
r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError)
}
}
+
+// bucketGetter is an accessor interface to grab the "Bucket" field from
+// an S3 type.
+type bucketGetter interface {
+ getBucket() string
+}
+
+// sseCustomerKeyGetter is an accessor interface to grab the "SSECustomerKey"
+// field from an S3 type.
+type sseCustomerKeyGetter interface {
+ getSSECustomerKey() string
+}
+
+// copySourceSSECustomerKeyGetter is an accessor interface to grab the
+// "CopySourceSSECustomerKey" field from an S3 type.
+type copySourceSSECustomerKeyGetter interface {
+ getCopySourceSSECustomerKey() string
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
new file mode 100644
index 000000000..f045fd0db
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
@@ -0,0 +1,78 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package s3 provides the client and types for making API
+// requests to Amazon Simple Storage Service.
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01 for more information on this service.
+//
+// See s3 package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/
+//
+// Using the Client
+//
+// To use the client for Amazon Simple Storage Service you will first need
+// to create a new instance of it.
+//
+// When creating a client for an AWS service you'll first need to have a Session
+// already created. The Session provides configuration that can be shared
+// between multiple service clients. Additional configuration can be applied to
+// the Session and service's client when they are constructed. The aws package's
+// Config type contains several fields such as Region for the AWS Region the
+// client should make API requests too. The optional Config value can be provided
+// as the variadic argument for Sessions and client creation.
+//
+// Once the service's client is created you can use it to make API requests the
+// AWS service. These clients are safe to use concurrently.
+//
+// // Create a session to share configuration, and load external configuration.
+// sess := session.Must(session.NewSession())
+//
+// // Create the service's client with the session.
+// svc := s3.New(sess)
+//
+// See the SDK's documentation for more information on how to use service clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws package's Config type for more information on configuration options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the Amazon Simple Storage Service client S3 for more
+// information on creating the service's client.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New
+//
+// Once the client is created you can make an API request to the service.
+// Each API method takes a input parameter, and returns the service response
+// and an error.
+//
+// The API method will document which error codes the service can be returned
+// by the operation if the service models the API operation's errors. These
+// errors will also be available as const strings prefixed with "ErrCode".
+//
+// result, err := svc.AbortMultipartUpload(params)
+// if err != nil {
+// // Cast err to awserr.Error to handle specific error codes.
+// aerr, ok := err.(awserr.Error)
+// if ok && aerr.Code() == {
+// // Specific error code handling
+// }
+// return err
+// }
+//
+// fmt.Println("AbortMultipartUpload result:")
+// fmt.Println(result)
+//
+// Using the Client with Context
+//
+// The service's client also provides methods to make API requests with a Context
+// value. This allows you to control the timeout, and cancellation of pending
+// requests. These methods also take request Option as variadic parameter to apply
+// additional configuration to the API request.
+//
+// ctx := context.Background()
+//
+// result, err := svc.AbortMultipartUploadWithContext(ctx, params)
+//
+// See the request package documentation for more information on using Context pattern
+// with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
+package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
new file mode 100644
index 000000000..b794a63ba
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
@@ -0,0 +1,109 @@
+// Upload Managers
+//
+// The s3manager package's Uploader provides concurrent upload of content to S3
+// by taking advantage of S3's Multipart APIs. The Uploader also supports both
+// io.Reader for streaming uploads, and will also take advantage of io.ReadSeeker
+// for optimizations if the Body satisfies that type. Once the Uploader instance
+// is created you can call Upload concurrently from multiple goroutines safely.
+//
+// // The session the S3 Uploader will use
+// sess := session.Must(session.NewSession())
+//
+// // Create an uploader with the session and default options
+// uploader := s3manager.NewUploader(sess)
+//
+// f, err := os.Open(filename)
+// if err != nil {
+// return fmt.Errorf("failed to open file %q, %v", filename, err)
+// }
+//
+// // Upload the file to S3.
+// result, err := uploader.Upload(&s3manager.UploadInput{
+// Bucket: aws.String(myBucket),
+// Key: aws.String(myString),
+// Body: f,
+// })
+// if err != nil {
+// return fmt.Errorf("failed to upload file, %v", err)
+// }
+// fmt.Printf("file uploaded to, %s\n", aws.StringValue(result.Location))
+//
+// See the s3manager package's Uploader type documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Uploader
+//
+// Download Manager
+//
+// The s3manager package's Downloader provides concurrently downloading of Objects
+// from S3. The Downloader will write S3 Object content with an io.WriterAt.
+// Once the Downloader instance is created you can call Upload concurrently from
+// multiple goroutines safely.
+//
+// // The session the S3 Downloader will use
+// sess := session.Must(session.NewSession())
+//
+// // Create a downloader with the session and default options
+// downloader := s3manager.NewDownloader(sess)
+//
+// // Create a file to write the S3 Object contents to.
+// f, err := os.Create(filename)
+// if err != nil {
+// return fmt.Errorf("failed to create file %q, %v", filename, err)
+// }
+//
+// // Write the contents of S3 Object to the file
+// n, err := downloader.Download(f, &s3.GetObjectInput{
+// Bucket: aws.String(myBucket),
+// Key: aws.String(myString),
+// })
+// if err != nil {
+// return fmt.Errorf("failed to upload file, %v", err)
+// }
+// fmt.Printf("file downloaded, %d bytes\n", n)
+//
+// See the s3manager package's Downloader type documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Downloader
+//
+// Get Bucket Region
+//
+// GetBucketRegion will attempt to get the region for a bucket using a region
+// hint to determine which AWS partition to perform the query on. Use this utility
+// to determine the region a bucket is in.
+//
+// sess := session.Must(session.NewSession())
+//
+// bucket := "my-bucket"
+// region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2")
+// if err != nil {
+// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" {
+// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket)
+// }
+// return err
+// }
+// fmt.Printf("Bucket %s is in %s region\n", bucket, region)
+//
+// See the s3manager package's GetBucketRegion function documentation for more information
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#GetBucketRegion
+//
+// S3 Crypto Client
+//
+// The s3crypto package provides the tools to upload and download encrypted
+// content from S3. The Encryption and Decryption clients can be used concurrently
+// once the client is created.
+//
+// sess := session.Must(session.NewSession())
+//
+// // Create the decryption client.
+// svc := s3crypto.NewDecryptionClient(sess)
+//
+// // The object will be downloaded from S3 and decrypted locally. By metadata
+// // about the object's encryption will instruct the decryption client how
+// // decrypt the content of the object. By default KMS is used for keys.
+// result, err := svc.GetObject(&s3.GetObjectInput {
+// Bucket: aws.String(myBucket),
+// Key: aws.String(myKey),
+// })
+//
+// See the s3crypto package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3crypto/
+//
+package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
index 13ebbdad9..931cb17bb 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
index ec3ffe448..a7fbc2de2 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
@@ -8,7 +8,6 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
@@ -113,15 +112,9 @@ func updateEndpointForAccelerate(r *request.Request) {
// Attempts to retrieve the bucket name from the request input parameters.
// If no bucket is found, or the field is empty "", false will be returned.
func bucketNameFromReqParams(params interface{}) (string, bool) {
- b, _ := awsutil.ValuesAtPath(params, "Bucket")
- if len(b) == 0 {
- return "", false
- }
-
- if bucket, ok := b[0].(*string); ok {
- if bucketStr := aws.StringValue(bucket); bucketStr != "" {
- return bucketStr, true
- }
+ if iface, ok := params.(bucketGetter); ok {
+ b := iface.getBucket()
+ return b, len(b) > 0
}
return "", false
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
index c2f840e3a..8c1e33437 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package s3iface provides an interface to enable mocking the Amazon Simple Storage Service service client
// for testing your code.
@@ -9,6 +9,7 @@
package s3iface
import (
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/s3"
)
@@ -59,319 +60,328 @@ import (
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type S3API interface {
+ AbortMultipartUpload(*s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error)
+ AbortMultipartUploadWithContext(aws.Context, *s3.AbortMultipartUploadInput, ...request.Option) (*s3.AbortMultipartUploadOutput, error)
AbortMultipartUploadRequest(*s3.AbortMultipartUploadInput) (*request.Request, *s3.AbortMultipartUploadOutput)
- AbortMultipartUpload(*s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error)
-
+ CompleteMultipartUpload(*s3.CompleteMultipartUploadInput) (*s3.CompleteMultipartUploadOutput, error)
+ CompleteMultipartUploadWithContext(aws.Context, *s3.CompleteMultipartUploadInput, ...request.Option) (*s3.CompleteMultipartUploadOutput, error)
CompleteMultipartUploadRequest(*s3.CompleteMultipartUploadInput) (*request.Request, *s3.CompleteMultipartUploadOutput)
- CompleteMultipartUpload(*s3.CompleteMultipartUploadInput) (*s3.CompleteMultipartUploadOutput, error)
-
+ CopyObject(*s3.CopyObjectInput) (*s3.CopyObjectOutput, error)
+ CopyObjectWithContext(aws.Context, *s3.CopyObjectInput, ...request.Option) (*s3.CopyObjectOutput, error)
CopyObjectRequest(*s3.CopyObjectInput) (*request.Request, *s3.CopyObjectOutput)
- CopyObject(*s3.CopyObjectInput) (*s3.CopyObjectOutput, error)
-
+ CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
+ CreateBucketWithContext(aws.Context, *s3.CreateBucketInput, ...request.Option) (*s3.CreateBucketOutput, error)
CreateBucketRequest(*s3.CreateBucketInput) (*request.Request, *s3.CreateBucketOutput)
- CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
-
+ CreateMultipartUpload(*s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error)
+ CreateMultipartUploadWithContext(aws.Context, *s3.CreateMultipartUploadInput, ...request.Option) (*s3.CreateMultipartUploadOutput, error)
CreateMultipartUploadRequest(*s3.CreateMultipartUploadInput) (*request.Request, *s3.CreateMultipartUploadOutput)
- CreateMultipartUpload(*s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error)
-
+ DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
+ DeleteBucketWithContext(aws.Context, *s3.DeleteBucketInput, ...request.Option) (*s3.DeleteBucketOutput, error)
DeleteBucketRequest(*s3.DeleteBucketInput) (*request.Request, *s3.DeleteBucketOutput)
- DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
-
+ DeleteBucketAnalyticsConfiguration(*s3.DeleteBucketAnalyticsConfigurationInput) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
+ DeleteBucketAnalyticsConfigurationWithContext(aws.Context, *s3.DeleteBucketAnalyticsConfigurationInput, ...request.Option) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
DeleteBucketAnalyticsConfigurationRequest(*s3.DeleteBucketAnalyticsConfigurationInput) (*request.Request, *s3.DeleteBucketAnalyticsConfigurationOutput)
- DeleteBucketAnalyticsConfiguration(*s3.DeleteBucketAnalyticsConfigurationInput) (*s3.DeleteBucketAnalyticsConfigurationOutput, error)
-
+ DeleteBucketCors(*s3.DeleteBucketCorsInput) (*s3.DeleteBucketCorsOutput, error)
+ DeleteBucketCorsWithContext(aws.Context, *s3.DeleteBucketCorsInput, ...request.Option) (*s3.DeleteBucketCorsOutput, error)
DeleteBucketCorsRequest(*s3.DeleteBucketCorsInput) (*request.Request, *s3.DeleteBucketCorsOutput)
- DeleteBucketCors(*s3.DeleteBucketCorsInput) (*s3.DeleteBucketCorsOutput, error)
-
+ DeleteBucketInventoryConfiguration(*s3.DeleteBucketInventoryConfigurationInput) (*s3.DeleteBucketInventoryConfigurationOutput, error)
+ DeleteBucketInventoryConfigurationWithContext(aws.Context, *s3.DeleteBucketInventoryConfigurationInput, ...request.Option) (*s3.DeleteBucketInventoryConfigurationOutput, error)
DeleteBucketInventoryConfigurationRequest(*s3.DeleteBucketInventoryConfigurationInput) (*request.Request, *s3.DeleteBucketInventoryConfigurationOutput)
- DeleteBucketInventoryConfiguration(*s3.DeleteBucketInventoryConfigurationInput) (*s3.DeleteBucketInventoryConfigurationOutput, error)
-
+ DeleteBucketLifecycle(*s3.DeleteBucketLifecycleInput) (*s3.DeleteBucketLifecycleOutput, error)
+ DeleteBucketLifecycleWithContext(aws.Context, *s3.DeleteBucketLifecycleInput, ...request.Option) (*s3.DeleteBucketLifecycleOutput, error)
DeleteBucketLifecycleRequest(*s3.DeleteBucketLifecycleInput) (*request.Request, *s3.DeleteBucketLifecycleOutput)
- DeleteBucketLifecycle(*s3.DeleteBucketLifecycleInput) (*s3.DeleteBucketLifecycleOutput, error)
-
+ DeleteBucketMetricsConfiguration(*s3.DeleteBucketMetricsConfigurationInput) (*s3.DeleteBucketMetricsConfigurationOutput, error)
+ DeleteBucketMetricsConfigurationWithContext(aws.Context, *s3.DeleteBucketMetricsConfigurationInput, ...request.Option) (*s3.DeleteBucketMetricsConfigurationOutput, error)
DeleteBucketMetricsConfigurationRequest(*s3.DeleteBucketMetricsConfigurationInput) (*request.Request, *s3.DeleteBucketMetricsConfigurationOutput)
- DeleteBucketMetricsConfiguration(*s3.DeleteBucketMetricsConfigurationInput) (*s3.DeleteBucketMetricsConfigurationOutput, error)
-
+ DeleteBucketPolicy(*s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error)
+ DeleteBucketPolicyWithContext(aws.Context, *s3.DeleteBucketPolicyInput, ...request.Option) (*s3.DeleteBucketPolicyOutput, error)
DeleteBucketPolicyRequest(*s3.DeleteBucketPolicyInput) (*request.Request, *s3.DeleteBucketPolicyOutput)
- DeleteBucketPolicy(*s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error)
-
+ DeleteBucketReplication(*s3.DeleteBucketReplicationInput) (*s3.DeleteBucketReplicationOutput, error)
+ DeleteBucketReplicationWithContext(aws.Context, *s3.DeleteBucketReplicationInput, ...request.Option) (*s3.DeleteBucketReplicationOutput, error)
DeleteBucketReplicationRequest(*s3.DeleteBucketReplicationInput) (*request.Request, *s3.DeleteBucketReplicationOutput)
- DeleteBucketReplication(*s3.DeleteBucketReplicationInput) (*s3.DeleteBucketReplicationOutput, error)
-
+ DeleteBucketTagging(*s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error)
+ DeleteBucketTaggingWithContext(aws.Context, *s3.DeleteBucketTaggingInput, ...request.Option) (*s3.DeleteBucketTaggingOutput, error)
DeleteBucketTaggingRequest(*s3.DeleteBucketTaggingInput) (*request.Request, *s3.DeleteBucketTaggingOutput)
- DeleteBucketTagging(*s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error)
-
+ DeleteBucketWebsite(*s3.DeleteBucketWebsiteInput) (*s3.DeleteBucketWebsiteOutput, error)
+ DeleteBucketWebsiteWithContext(aws.Context, *s3.DeleteBucketWebsiteInput, ...request.Option) (*s3.DeleteBucketWebsiteOutput, error)
DeleteBucketWebsiteRequest(*s3.DeleteBucketWebsiteInput) (*request.Request, *s3.DeleteBucketWebsiteOutput)
- DeleteBucketWebsite(*s3.DeleteBucketWebsiteInput) (*s3.DeleteBucketWebsiteOutput, error)
-
+ DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
+ DeleteObjectWithContext(aws.Context, *s3.DeleteObjectInput, ...request.Option) (*s3.DeleteObjectOutput, error)
DeleteObjectRequest(*s3.DeleteObjectInput) (*request.Request, *s3.DeleteObjectOutput)
- DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
-
+ DeleteObjectTagging(*s3.DeleteObjectTaggingInput) (*s3.DeleteObjectTaggingOutput, error)
+ DeleteObjectTaggingWithContext(aws.Context, *s3.DeleteObjectTaggingInput, ...request.Option) (*s3.DeleteObjectTaggingOutput, error)
DeleteObjectTaggingRequest(*s3.DeleteObjectTaggingInput) (*request.Request, *s3.DeleteObjectTaggingOutput)
- DeleteObjectTagging(*s3.DeleteObjectTaggingInput) (*s3.DeleteObjectTaggingOutput, error)
-
+ DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
+ DeleteObjectsWithContext(aws.Context, *s3.DeleteObjectsInput, ...request.Option) (*s3.DeleteObjectsOutput, error)
DeleteObjectsRequest(*s3.DeleteObjectsInput) (*request.Request, *s3.DeleteObjectsOutput)
- DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
-
+ GetBucketAccelerateConfiguration(*s3.GetBucketAccelerateConfigurationInput) (*s3.GetBucketAccelerateConfigurationOutput, error)
+ GetBucketAccelerateConfigurationWithContext(aws.Context, *s3.GetBucketAccelerateConfigurationInput, ...request.Option) (*s3.GetBucketAccelerateConfigurationOutput, error)
GetBucketAccelerateConfigurationRequest(*s3.GetBucketAccelerateConfigurationInput) (*request.Request, *s3.GetBucketAccelerateConfigurationOutput)
- GetBucketAccelerateConfiguration(*s3.GetBucketAccelerateConfigurationInput) (*s3.GetBucketAccelerateConfigurationOutput, error)
-
+ GetBucketAcl(*s3.GetBucketAclInput) (*s3.GetBucketAclOutput, error)
+ GetBucketAclWithContext(aws.Context, *s3.GetBucketAclInput, ...request.Option) (*s3.GetBucketAclOutput, error)
GetBucketAclRequest(*s3.GetBucketAclInput) (*request.Request, *s3.GetBucketAclOutput)
- GetBucketAcl(*s3.GetBucketAclInput) (*s3.GetBucketAclOutput, error)
-
+ GetBucketAnalyticsConfiguration(*s3.GetBucketAnalyticsConfigurationInput) (*s3.GetBucketAnalyticsConfigurationOutput, error)
+ GetBucketAnalyticsConfigurationWithContext(aws.Context, *s3.GetBucketAnalyticsConfigurationInput, ...request.Option) (*s3.GetBucketAnalyticsConfigurationOutput, error)
GetBucketAnalyticsConfigurationRequest(*s3.GetBucketAnalyticsConfigurationInput) (*request.Request, *s3.GetBucketAnalyticsConfigurationOutput)
- GetBucketAnalyticsConfiguration(*s3.GetBucketAnalyticsConfigurationInput) (*s3.GetBucketAnalyticsConfigurationOutput, error)
-
+ GetBucketCors(*s3.GetBucketCorsInput) (*s3.GetBucketCorsOutput, error)
+ GetBucketCorsWithContext(aws.Context, *s3.GetBucketCorsInput, ...request.Option) (*s3.GetBucketCorsOutput, error)
GetBucketCorsRequest(*s3.GetBucketCorsInput) (*request.Request, *s3.GetBucketCorsOutput)
- GetBucketCors(*s3.GetBucketCorsInput) (*s3.GetBucketCorsOutput, error)
-
+ GetBucketInventoryConfiguration(*s3.GetBucketInventoryConfigurationInput) (*s3.GetBucketInventoryConfigurationOutput, error)
+ GetBucketInventoryConfigurationWithContext(aws.Context, *s3.GetBucketInventoryConfigurationInput, ...request.Option) (*s3.GetBucketInventoryConfigurationOutput, error)
GetBucketInventoryConfigurationRequest(*s3.GetBucketInventoryConfigurationInput) (*request.Request, *s3.GetBucketInventoryConfigurationOutput)
- GetBucketInventoryConfiguration(*s3.GetBucketInventoryConfigurationInput) (*s3.GetBucketInventoryConfigurationOutput, error)
-
+ GetBucketLifecycle(*s3.GetBucketLifecycleInput) (*s3.GetBucketLifecycleOutput, error)
+ GetBucketLifecycleWithContext(aws.Context, *s3.GetBucketLifecycleInput, ...request.Option) (*s3.GetBucketLifecycleOutput, error)
GetBucketLifecycleRequest(*s3.GetBucketLifecycleInput) (*request.Request, *s3.GetBucketLifecycleOutput)
- GetBucketLifecycle(*s3.GetBucketLifecycleInput) (*s3.GetBucketLifecycleOutput, error)
-
+ GetBucketLifecycleConfiguration(*s3.GetBucketLifecycleConfigurationInput) (*s3.GetBucketLifecycleConfigurationOutput, error)
+ GetBucketLifecycleConfigurationWithContext(aws.Context, *s3.GetBucketLifecycleConfigurationInput, ...request.Option) (*s3.GetBucketLifecycleConfigurationOutput, error)
GetBucketLifecycleConfigurationRequest(*s3.GetBucketLifecycleConfigurationInput) (*request.Request, *s3.GetBucketLifecycleConfigurationOutput)
- GetBucketLifecycleConfiguration(*s3.GetBucketLifecycleConfigurationInput) (*s3.GetBucketLifecycleConfigurationOutput, error)
-
+ GetBucketLocation(*s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error)
+ GetBucketLocationWithContext(aws.Context, *s3.GetBucketLocationInput, ...request.Option) (*s3.GetBucketLocationOutput, error)
GetBucketLocationRequest(*s3.GetBucketLocationInput) (*request.Request, *s3.GetBucketLocationOutput)
- GetBucketLocation(*s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error)
-
+ GetBucketLogging(*s3.GetBucketLoggingInput) (*s3.GetBucketLoggingOutput, error)
+ GetBucketLoggingWithContext(aws.Context, *s3.GetBucketLoggingInput, ...request.Option) (*s3.GetBucketLoggingOutput, error)
GetBucketLoggingRequest(*s3.GetBucketLoggingInput) (*request.Request, *s3.GetBucketLoggingOutput)
- GetBucketLogging(*s3.GetBucketLoggingInput) (*s3.GetBucketLoggingOutput, error)
-
+ GetBucketMetricsConfiguration(*s3.GetBucketMetricsConfigurationInput) (*s3.GetBucketMetricsConfigurationOutput, error)
+ GetBucketMetricsConfigurationWithContext(aws.Context, *s3.GetBucketMetricsConfigurationInput, ...request.Option) (*s3.GetBucketMetricsConfigurationOutput, error)
GetBucketMetricsConfigurationRequest(*s3.GetBucketMetricsConfigurationInput) (*request.Request, *s3.GetBucketMetricsConfigurationOutput)
- GetBucketMetricsConfiguration(*s3.GetBucketMetricsConfigurationInput) (*s3.GetBucketMetricsConfigurationOutput, error)
-
+ GetBucketNotification(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfigurationDeprecated, error)
+ GetBucketNotificationWithContext(aws.Context, *s3.GetBucketNotificationConfigurationRequest, ...request.Option) (*s3.NotificationConfigurationDeprecated, error)
GetBucketNotificationRequest(*s3.GetBucketNotificationConfigurationRequest) (*request.Request, *s3.NotificationConfigurationDeprecated)
- GetBucketNotification(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfigurationDeprecated, error)
-
+ GetBucketNotificationConfiguration(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfiguration, error)
+ GetBucketNotificationConfigurationWithContext(aws.Context, *s3.GetBucketNotificationConfigurationRequest, ...request.Option) (*s3.NotificationConfiguration, error)
GetBucketNotificationConfigurationRequest(*s3.GetBucketNotificationConfigurationRequest) (*request.Request, *s3.NotificationConfiguration)
- GetBucketNotificationConfiguration(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfiguration, error)
-
+ GetBucketPolicy(*s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error)
+ GetBucketPolicyWithContext(aws.Context, *s3.GetBucketPolicyInput, ...request.Option) (*s3.GetBucketPolicyOutput, error)
GetBucketPolicyRequest(*s3.GetBucketPolicyInput) (*request.Request, *s3.GetBucketPolicyOutput)
- GetBucketPolicy(*s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error)
-
+ GetBucketReplication(*s3.GetBucketReplicationInput) (*s3.GetBucketReplicationOutput, error)
+ GetBucketReplicationWithContext(aws.Context, *s3.GetBucketReplicationInput, ...request.Option) (*s3.GetBucketReplicationOutput, error)
GetBucketReplicationRequest(*s3.GetBucketReplicationInput) (*request.Request, *s3.GetBucketReplicationOutput)
- GetBucketReplication(*s3.GetBucketReplicationInput) (*s3.GetBucketReplicationOutput, error)
-
+ GetBucketRequestPayment(*s3.GetBucketRequestPaymentInput) (*s3.GetBucketRequestPaymentOutput, error)
+ GetBucketRequestPaymentWithContext(aws.Context, *s3.GetBucketRequestPaymentInput, ...request.Option) (*s3.GetBucketRequestPaymentOutput, error)
GetBucketRequestPaymentRequest(*s3.GetBucketRequestPaymentInput) (*request.Request, *s3.GetBucketRequestPaymentOutput)
- GetBucketRequestPayment(*s3.GetBucketRequestPaymentInput) (*s3.GetBucketRequestPaymentOutput, error)
-
+ GetBucketTagging(*s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)
+ GetBucketTaggingWithContext(aws.Context, *s3.GetBucketTaggingInput, ...request.Option) (*s3.GetBucketTaggingOutput, error)
GetBucketTaggingRequest(*s3.GetBucketTaggingInput) (*request.Request, *s3.GetBucketTaggingOutput)
- GetBucketTagging(*s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)
-
+ GetBucketVersioning(*s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error)
+ GetBucketVersioningWithContext(aws.Context, *s3.GetBucketVersioningInput, ...request.Option) (*s3.GetBucketVersioningOutput, error)
GetBucketVersioningRequest(*s3.GetBucketVersioningInput) (*request.Request, *s3.GetBucketVersioningOutput)
- GetBucketVersioning(*s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error)
-
+ GetBucketWebsite(*s3.GetBucketWebsiteInput) (*s3.GetBucketWebsiteOutput, error)
+ GetBucketWebsiteWithContext(aws.Context, *s3.GetBucketWebsiteInput, ...request.Option) (*s3.GetBucketWebsiteOutput, error)
GetBucketWebsiteRequest(*s3.GetBucketWebsiteInput) (*request.Request, *s3.GetBucketWebsiteOutput)
- GetBucketWebsite(*s3.GetBucketWebsiteInput) (*s3.GetBucketWebsiteOutput, error)
-
+ GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error)
+ GetObjectWithContext(aws.Context, *s3.GetObjectInput, ...request.Option) (*s3.GetObjectOutput, error)
GetObjectRequest(*s3.GetObjectInput) (*request.Request, *s3.GetObjectOutput)
- GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error)
-
+ GetObjectAcl(*s3.GetObjectAclInput) (*s3.GetObjectAclOutput, error)
+ GetObjectAclWithContext(aws.Context, *s3.GetObjectAclInput, ...request.Option) (*s3.GetObjectAclOutput, error)
GetObjectAclRequest(*s3.GetObjectAclInput) (*request.Request, *s3.GetObjectAclOutput)
- GetObjectAcl(*s3.GetObjectAclInput) (*s3.GetObjectAclOutput, error)
-
+ GetObjectTagging(*s3.GetObjectTaggingInput) (*s3.GetObjectTaggingOutput, error)
+ GetObjectTaggingWithContext(aws.Context, *s3.GetObjectTaggingInput, ...request.Option) (*s3.GetObjectTaggingOutput, error)
GetObjectTaggingRequest(*s3.GetObjectTaggingInput) (*request.Request, *s3.GetObjectTaggingOutput)
- GetObjectTagging(*s3.GetObjectTaggingInput) (*s3.GetObjectTaggingOutput, error)
-
+ GetObjectTorrent(*s3.GetObjectTorrentInput) (*s3.GetObjectTorrentOutput, error)
+ GetObjectTorrentWithContext(aws.Context, *s3.GetObjectTorrentInput, ...request.Option) (*s3.GetObjectTorrentOutput, error)
GetObjectTorrentRequest(*s3.GetObjectTorrentInput) (*request.Request, *s3.GetObjectTorrentOutput)
- GetObjectTorrent(*s3.GetObjectTorrentInput) (*s3.GetObjectTorrentOutput, error)
-
+ HeadBucket(*s3.HeadBucketInput) (*s3.HeadBucketOutput, error)
+ HeadBucketWithContext(aws.Context, *s3.HeadBucketInput, ...request.Option) (*s3.HeadBucketOutput, error)
HeadBucketRequest(*s3.HeadBucketInput) (*request.Request, *s3.HeadBucketOutput)
- HeadBucket(*s3.HeadBucketInput) (*s3.HeadBucketOutput, error)
-
+ HeadObject(*s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
+ HeadObjectWithContext(aws.Context, *s3.HeadObjectInput, ...request.Option) (*s3.HeadObjectOutput, error)
HeadObjectRequest(*s3.HeadObjectInput) (*request.Request, *s3.HeadObjectOutput)
- HeadObject(*s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
-
+ ListBucketAnalyticsConfigurations(*s3.ListBucketAnalyticsConfigurationsInput) (*s3.ListBucketAnalyticsConfigurationsOutput, error)
+ ListBucketAnalyticsConfigurationsWithContext(aws.Context, *s3.ListBucketAnalyticsConfigurationsInput, ...request.Option) (*s3.ListBucketAnalyticsConfigurationsOutput, error)
ListBucketAnalyticsConfigurationsRequest(*s3.ListBucketAnalyticsConfigurationsInput) (*request.Request, *s3.ListBucketAnalyticsConfigurationsOutput)
- ListBucketAnalyticsConfigurations(*s3.ListBucketAnalyticsConfigurationsInput) (*s3.ListBucketAnalyticsConfigurationsOutput, error)
-
+ ListBucketInventoryConfigurations(*s3.ListBucketInventoryConfigurationsInput) (*s3.ListBucketInventoryConfigurationsOutput, error)
+ ListBucketInventoryConfigurationsWithContext(aws.Context, *s3.ListBucketInventoryConfigurationsInput, ...request.Option) (*s3.ListBucketInventoryConfigurationsOutput, error)
ListBucketInventoryConfigurationsRequest(*s3.ListBucketInventoryConfigurationsInput) (*request.Request, *s3.ListBucketInventoryConfigurationsOutput)
- ListBucketInventoryConfigurations(*s3.ListBucketInventoryConfigurationsInput) (*s3.ListBucketInventoryConfigurationsOutput, error)
-
+ ListBucketMetricsConfigurations(*s3.ListBucketMetricsConfigurationsInput) (*s3.ListBucketMetricsConfigurationsOutput, error)
+ ListBucketMetricsConfigurationsWithContext(aws.Context, *s3.ListBucketMetricsConfigurationsInput, ...request.Option) (*s3.ListBucketMetricsConfigurationsOutput, error)
ListBucketMetricsConfigurationsRequest(*s3.ListBucketMetricsConfigurationsInput) (*request.Request, *s3.ListBucketMetricsConfigurationsOutput)
- ListBucketMetricsConfigurations(*s3.ListBucketMetricsConfigurationsInput) (*s3.ListBucketMetricsConfigurationsOutput, error)
-
+ ListBuckets(*s3.ListBucketsInput) (*s3.ListBucketsOutput, error)
+ ListBucketsWithContext(aws.Context, *s3.ListBucketsInput, ...request.Option) (*s3.ListBucketsOutput, error)
ListBucketsRequest(*s3.ListBucketsInput) (*request.Request, *s3.ListBucketsOutput)
- ListBuckets(*s3.ListBucketsInput) (*s3.ListBucketsOutput, error)
-
+ ListMultipartUploads(*s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error)
+ ListMultipartUploadsWithContext(aws.Context, *s3.ListMultipartUploadsInput, ...request.Option) (*s3.ListMultipartUploadsOutput, error)
ListMultipartUploadsRequest(*s3.ListMultipartUploadsInput) (*request.Request, *s3.ListMultipartUploadsOutput)
- ListMultipartUploads(*s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error)
-
ListMultipartUploadsPages(*s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool) error
-
- ListObjectVersionsRequest(*s3.ListObjectVersionsInput) (*request.Request, *s3.ListObjectVersionsOutput)
+ ListMultipartUploadsPagesWithContext(aws.Context, *s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool, ...request.Option) error
ListObjectVersions(*s3.ListObjectVersionsInput) (*s3.ListObjectVersionsOutput, error)
+ ListObjectVersionsWithContext(aws.Context, *s3.ListObjectVersionsInput, ...request.Option) (*s3.ListObjectVersionsOutput, error)
+ ListObjectVersionsRequest(*s3.ListObjectVersionsInput) (*request.Request, *s3.ListObjectVersionsOutput)
ListObjectVersionsPages(*s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool) error
-
- ListObjectsRequest(*s3.ListObjectsInput) (*request.Request, *s3.ListObjectsOutput)
+ ListObjectVersionsPagesWithContext(aws.Context, *s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool, ...request.Option) error
ListObjects(*s3.ListObjectsInput) (*s3.ListObjectsOutput, error)
+ ListObjectsWithContext(aws.Context, *s3.ListObjectsInput, ...request.Option) (*s3.ListObjectsOutput, error)
+ ListObjectsRequest(*s3.ListObjectsInput) (*request.Request, *s3.ListObjectsOutput)
ListObjectsPages(*s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool) error
-
- ListObjectsV2Request(*s3.ListObjectsV2Input) (*request.Request, *s3.ListObjectsV2Output)
+ ListObjectsPagesWithContext(aws.Context, *s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool, ...request.Option) error
ListObjectsV2(*s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error)
+ ListObjectsV2WithContext(aws.Context, *s3.ListObjectsV2Input, ...request.Option) (*s3.ListObjectsV2Output, error)
+ ListObjectsV2Request(*s3.ListObjectsV2Input) (*request.Request, *s3.ListObjectsV2Output)
ListObjectsV2Pages(*s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool) error
-
- ListPartsRequest(*s3.ListPartsInput) (*request.Request, *s3.ListPartsOutput)
+ ListObjectsV2PagesWithContext(aws.Context, *s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool, ...request.Option) error
ListParts(*s3.ListPartsInput) (*s3.ListPartsOutput, error)
+ ListPartsWithContext(aws.Context, *s3.ListPartsInput, ...request.Option) (*s3.ListPartsOutput, error)
+ ListPartsRequest(*s3.ListPartsInput) (*request.Request, *s3.ListPartsOutput)
ListPartsPages(*s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool) error
-
- PutBucketAccelerateConfigurationRequest(*s3.PutBucketAccelerateConfigurationInput) (*request.Request, *s3.PutBucketAccelerateConfigurationOutput)
+ ListPartsPagesWithContext(aws.Context, *s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool, ...request.Option) error
PutBucketAccelerateConfiguration(*s3.PutBucketAccelerateConfigurationInput) (*s3.PutBucketAccelerateConfigurationOutput, error)
-
- PutBucketAclRequest(*s3.PutBucketAclInput) (*request.Request, *s3.PutBucketAclOutput)
+ PutBucketAccelerateConfigurationWithContext(aws.Context, *s3.PutBucketAccelerateConfigurationInput, ...request.Option) (*s3.PutBucketAccelerateConfigurationOutput, error)
+ PutBucketAccelerateConfigurationRequest(*s3.PutBucketAccelerateConfigurationInput) (*request.Request, *s3.PutBucketAccelerateConfigurationOutput)
PutBucketAcl(*s3.PutBucketAclInput) (*s3.PutBucketAclOutput, error)
-
- PutBucketAnalyticsConfigurationRequest(*s3.PutBucketAnalyticsConfigurationInput) (*request.Request, *s3.PutBucketAnalyticsConfigurationOutput)
+ PutBucketAclWithContext(aws.Context, *s3.PutBucketAclInput, ...request.Option) (*s3.PutBucketAclOutput, error)
+ PutBucketAclRequest(*s3.PutBucketAclInput) (*request.Request, *s3.PutBucketAclOutput)
PutBucketAnalyticsConfiguration(*s3.PutBucketAnalyticsConfigurationInput) (*s3.PutBucketAnalyticsConfigurationOutput, error)
-
- PutBucketCorsRequest(*s3.PutBucketCorsInput) (*request.Request, *s3.PutBucketCorsOutput)
+ PutBucketAnalyticsConfigurationWithContext(aws.Context, *s3.PutBucketAnalyticsConfigurationInput, ...request.Option) (*s3.PutBucketAnalyticsConfigurationOutput, error)
+ PutBucketAnalyticsConfigurationRequest(*s3.PutBucketAnalyticsConfigurationInput) (*request.Request, *s3.PutBucketAnalyticsConfigurationOutput)
PutBucketCors(*s3.PutBucketCorsInput) (*s3.PutBucketCorsOutput, error)
-
- PutBucketInventoryConfigurationRequest(*s3.PutBucketInventoryConfigurationInput) (*request.Request, *s3.PutBucketInventoryConfigurationOutput)
+ PutBucketCorsWithContext(aws.Context, *s3.PutBucketCorsInput, ...request.Option) (*s3.PutBucketCorsOutput, error)
+ PutBucketCorsRequest(*s3.PutBucketCorsInput) (*request.Request, *s3.PutBucketCorsOutput)
PutBucketInventoryConfiguration(*s3.PutBucketInventoryConfigurationInput) (*s3.PutBucketInventoryConfigurationOutput, error)
-
- PutBucketLifecycleRequest(*s3.PutBucketLifecycleInput) (*request.Request, *s3.PutBucketLifecycleOutput)
+ PutBucketInventoryConfigurationWithContext(aws.Context, *s3.PutBucketInventoryConfigurationInput, ...request.Option) (*s3.PutBucketInventoryConfigurationOutput, error)
+ PutBucketInventoryConfigurationRequest(*s3.PutBucketInventoryConfigurationInput) (*request.Request, *s3.PutBucketInventoryConfigurationOutput)
PutBucketLifecycle(*s3.PutBucketLifecycleInput) (*s3.PutBucketLifecycleOutput, error)
-
- PutBucketLifecycleConfigurationRequest(*s3.PutBucketLifecycleConfigurationInput) (*request.Request, *s3.PutBucketLifecycleConfigurationOutput)
+ PutBucketLifecycleWithContext(aws.Context, *s3.PutBucketLifecycleInput, ...request.Option) (*s3.PutBucketLifecycleOutput, error)
+ PutBucketLifecycleRequest(*s3.PutBucketLifecycleInput) (*request.Request, *s3.PutBucketLifecycleOutput)
PutBucketLifecycleConfiguration(*s3.PutBucketLifecycleConfigurationInput) (*s3.PutBucketLifecycleConfigurationOutput, error)
-
- PutBucketLoggingRequest(*s3.PutBucketLoggingInput) (*request.Request, *s3.PutBucketLoggingOutput)
+ PutBucketLifecycleConfigurationWithContext(aws.Context, *s3.PutBucketLifecycleConfigurationInput, ...request.Option) (*s3.PutBucketLifecycleConfigurationOutput, error)
+ PutBucketLifecycleConfigurationRequest(*s3.PutBucketLifecycleConfigurationInput) (*request.Request, *s3.PutBucketLifecycleConfigurationOutput)
PutBucketLogging(*s3.PutBucketLoggingInput) (*s3.PutBucketLoggingOutput, error)
-
- PutBucketMetricsConfigurationRequest(*s3.PutBucketMetricsConfigurationInput) (*request.Request, *s3.PutBucketMetricsConfigurationOutput)
+ PutBucketLoggingWithContext(aws.Context, *s3.PutBucketLoggingInput, ...request.Option) (*s3.PutBucketLoggingOutput, error)
+ PutBucketLoggingRequest(*s3.PutBucketLoggingInput) (*request.Request, *s3.PutBucketLoggingOutput)
PutBucketMetricsConfiguration(*s3.PutBucketMetricsConfigurationInput) (*s3.PutBucketMetricsConfigurationOutput, error)
-
- PutBucketNotificationRequest(*s3.PutBucketNotificationInput) (*request.Request, *s3.PutBucketNotificationOutput)
+ PutBucketMetricsConfigurationWithContext(aws.Context, *s3.PutBucketMetricsConfigurationInput, ...request.Option) (*s3.PutBucketMetricsConfigurationOutput, error)
+ PutBucketMetricsConfigurationRequest(*s3.PutBucketMetricsConfigurationInput) (*request.Request, *s3.PutBucketMetricsConfigurationOutput)
PutBucketNotification(*s3.PutBucketNotificationInput) (*s3.PutBucketNotificationOutput, error)
-
- PutBucketNotificationConfigurationRequest(*s3.PutBucketNotificationConfigurationInput) (*request.Request, *s3.PutBucketNotificationConfigurationOutput)
+ PutBucketNotificationWithContext(aws.Context, *s3.PutBucketNotificationInput, ...request.Option) (*s3.PutBucketNotificationOutput, error)
+ PutBucketNotificationRequest(*s3.PutBucketNotificationInput) (*request.Request, *s3.PutBucketNotificationOutput)
PutBucketNotificationConfiguration(*s3.PutBucketNotificationConfigurationInput) (*s3.PutBucketNotificationConfigurationOutput, error)
-
- PutBucketPolicyRequest(*s3.PutBucketPolicyInput) (*request.Request, *s3.PutBucketPolicyOutput)
+ PutBucketNotificationConfigurationWithContext(aws.Context, *s3.PutBucketNotificationConfigurationInput, ...request.Option) (*s3.PutBucketNotificationConfigurationOutput, error)
+ PutBucketNotificationConfigurationRequest(*s3.PutBucketNotificationConfigurationInput) (*request.Request, *s3.PutBucketNotificationConfigurationOutput)
PutBucketPolicy(*s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error)
-
- PutBucketReplicationRequest(*s3.PutBucketReplicationInput) (*request.Request, *s3.PutBucketReplicationOutput)
+ PutBucketPolicyWithContext(aws.Context, *s3.PutBucketPolicyInput, ...request.Option) (*s3.PutBucketPolicyOutput, error)
+ PutBucketPolicyRequest(*s3.PutBucketPolicyInput) (*request.Request, *s3.PutBucketPolicyOutput)
PutBucketReplication(*s3.PutBucketReplicationInput) (*s3.PutBucketReplicationOutput, error)
-
- PutBucketRequestPaymentRequest(*s3.PutBucketRequestPaymentInput) (*request.Request, *s3.PutBucketRequestPaymentOutput)
+ PutBucketReplicationWithContext(aws.Context, *s3.PutBucketReplicationInput, ...request.Option) (*s3.PutBucketReplicationOutput, error)
+ PutBucketReplicationRequest(*s3.PutBucketReplicationInput) (*request.Request, *s3.PutBucketReplicationOutput)
PutBucketRequestPayment(*s3.PutBucketRequestPaymentInput) (*s3.PutBucketRequestPaymentOutput, error)
-
- PutBucketTaggingRequest(*s3.PutBucketTaggingInput) (*request.Request, *s3.PutBucketTaggingOutput)
+ PutBucketRequestPaymentWithContext(aws.Context, *s3.PutBucketRequestPaymentInput, ...request.Option) (*s3.PutBucketRequestPaymentOutput, error)
+ PutBucketRequestPaymentRequest(*s3.PutBucketRequestPaymentInput) (*request.Request, *s3.PutBucketRequestPaymentOutput)
PutBucketTagging(*s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error)
-
- PutBucketVersioningRequest(*s3.PutBucketVersioningInput) (*request.Request, *s3.PutBucketVersioningOutput)
+ PutBucketTaggingWithContext(aws.Context, *s3.PutBucketTaggingInput, ...request.Option) (*s3.PutBucketTaggingOutput, error)
+ PutBucketTaggingRequest(*s3.PutBucketTaggingInput) (*request.Request, *s3.PutBucketTaggingOutput)
PutBucketVersioning(*s3.PutBucketVersioningInput) (*s3.PutBucketVersioningOutput, error)
-
- PutBucketWebsiteRequest(*s3.PutBucketWebsiteInput) (*request.Request, *s3.PutBucketWebsiteOutput)
+ PutBucketVersioningWithContext(aws.Context, *s3.PutBucketVersioningInput, ...request.Option) (*s3.PutBucketVersioningOutput, error)
+ PutBucketVersioningRequest(*s3.PutBucketVersioningInput) (*request.Request, *s3.PutBucketVersioningOutput)
PutBucketWebsite(*s3.PutBucketWebsiteInput) (*s3.PutBucketWebsiteOutput, error)
-
- PutObjectRequest(*s3.PutObjectInput) (*request.Request, *s3.PutObjectOutput)
+ PutBucketWebsiteWithContext(aws.Context, *s3.PutBucketWebsiteInput, ...request.Option) (*s3.PutBucketWebsiteOutput, error)
+ PutBucketWebsiteRequest(*s3.PutBucketWebsiteInput) (*request.Request, *s3.PutBucketWebsiteOutput)
PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error)
-
- PutObjectAclRequest(*s3.PutObjectAclInput) (*request.Request, *s3.PutObjectAclOutput)
+ PutObjectWithContext(aws.Context, *s3.PutObjectInput, ...request.Option) (*s3.PutObjectOutput, error)
+ PutObjectRequest(*s3.PutObjectInput) (*request.Request, *s3.PutObjectOutput)
PutObjectAcl(*s3.PutObjectAclInput) (*s3.PutObjectAclOutput, error)
-
- PutObjectTaggingRequest(*s3.PutObjectTaggingInput) (*request.Request, *s3.PutObjectTaggingOutput)
+ PutObjectAclWithContext(aws.Context, *s3.PutObjectAclInput, ...request.Option) (*s3.PutObjectAclOutput, error)
+ PutObjectAclRequest(*s3.PutObjectAclInput) (*request.Request, *s3.PutObjectAclOutput)
PutObjectTagging(*s3.PutObjectTaggingInput) (*s3.PutObjectTaggingOutput, error)
-
- RestoreObjectRequest(*s3.RestoreObjectInput) (*request.Request, *s3.RestoreObjectOutput)
+ PutObjectTaggingWithContext(aws.Context, *s3.PutObjectTaggingInput, ...request.Option) (*s3.PutObjectTaggingOutput, error)
+ PutObjectTaggingRequest(*s3.PutObjectTaggingInput) (*request.Request, *s3.PutObjectTaggingOutput)
RestoreObject(*s3.RestoreObjectInput) (*s3.RestoreObjectOutput, error)
-
- UploadPartRequest(*s3.UploadPartInput) (*request.Request, *s3.UploadPartOutput)
+ RestoreObjectWithContext(aws.Context, *s3.RestoreObjectInput, ...request.Option) (*s3.RestoreObjectOutput, error)
+ RestoreObjectRequest(*s3.RestoreObjectInput) (*request.Request, *s3.RestoreObjectOutput)
UploadPart(*s3.UploadPartInput) (*s3.UploadPartOutput, error)
-
- UploadPartCopyRequest(*s3.UploadPartCopyInput) (*request.Request, *s3.UploadPartCopyOutput)
+ UploadPartWithContext(aws.Context, *s3.UploadPartInput, ...request.Option) (*s3.UploadPartOutput, error)
+ UploadPartRequest(*s3.UploadPartInput) (*request.Request, *s3.UploadPartOutput)
UploadPartCopy(*s3.UploadPartCopyInput) (*s3.UploadPartCopyOutput, error)
+ UploadPartCopyWithContext(aws.Context, *s3.UploadPartCopyInput, ...request.Option) (*s3.UploadPartCopyOutput, error)
+ UploadPartCopyRequest(*s3.UploadPartCopyInput) (*request.Request, *s3.UploadPartCopyOutput)
WaitUntilBucketExists(*s3.HeadBucketInput) error
+ WaitUntilBucketExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error
WaitUntilBucketNotExists(*s3.HeadBucketInput) error
+ WaitUntilBucketNotExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error
WaitUntilObjectExists(*s3.HeadObjectInput) error
+ WaitUntilObjectExistsWithContext(aws.Context, *s3.HeadObjectInput, ...request.WaiterOption) error
WaitUntilObjectNotExists(*s3.HeadObjectInput) error
+ WaitUntilObjectNotExistsWithContext(aws.Context, *s3.HeadObjectInput, ...request.WaiterOption) error
}
var _ S3API = (*s3.S3)(nil)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go
new file mode 100644
index 000000000..33931c6a6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/batch.go
@@ -0,0 +1,500 @@
+package s3manager
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+
+ "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/service/s3"
+ "github.com/aws/aws-sdk-go/service/s3/s3iface"
+)
+
+const (
+ // DefaultBatchSize is the batch size we initialize when constructing a batch delete client.
+ // This value is used when calling DeleteObjects. This represents how many objects to delete
+ // per DeleteObjects call.
+ DefaultBatchSize = 100
+)
+
+// BatchError will contain the key and bucket of the object that failed to
+// either upload or download.
+type BatchError struct {
+ Errors Errors
+ code string
+ message string
+}
+
+// Errors is a typed alias for a slice of errors to satisfy the error
+// interface.
+type Errors []Error
+
+func (errs Errors) Error() string {
+ buf := bytes.NewBuffer(nil)
+ for i, err := range errs {
+ buf.WriteString(err.Error())
+ if i+1 < len(errs) {
+ buf.WriteString("\n")
+ }
+ }
+ return buf.String()
+}
+
+// Error will contain the original error, bucket, and key of the operation that failed
+// during batch operations.
+type Error struct {
+ OrigErr error
+ Bucket *string
+ Key *string
+}
+
+func newError(err error, bucket, key *string) Error {
+ return Error{
+ err,
+ bucket,
+ key,
+ }
+}
+
+func (err *Error) Error() string {
+ return fmt.Sprintf("failed to upload %q to %q:\n%s", err.Key, err.Bucket, err.OrigErr.Error())
+}
+
+// NewBatchError will return a BatchError that satisfies the awserr.Error interface.
+func NewBatchError(code, message string, err []Error) awserr.Error {
+ return &BatchError{
+ Errors: err,
+ code: code,
+ message: message,
+ }
+}
+
+// Code will return the code associated with the batch error.
+func (err *BatchError) Code() string {
+ return err.code
+}
+
+// Message will return the message associated with the batch error.
+func (err *BatchError) Message() string {
+ return err.message
+}
+
+func (err *BatchError) Error() string {
+ return awserr.SprintError(err.Code(), err.Message(), "", err.Errors)
+}
+
+// OrigErr will return the original error. Which, in this case, will always be nil
+// for batched operations.
+func (err *BatchError) OrigErr() error {
+ return err.Errors
+}
+
+// BatchDeleteIterator is an interface that uses the scanner pattern to
+// iterate through what needs to be deleted.
+type BatchDeleteIterator interface {
+ Next() bool
+ Err() error
+ DeleteObject() BatchDeleteObject
+}
+
+// DeleteListIterator is an alternative iterator for the BatchDelete client. This will
+// iterate through a list of objects and delete the objects.
+//
+// Example:
+// iter := &s3manager.DeleteListIterator{
+// Client: svc,
+// Input: &s3.ListObjectsInput{
+// Bucket: aws.String("bucket"),
+// MaxKeys: aws.Int64(5),
+// },
+// Paginator: request.Pagination{
+// NewRequest: func() (*request.Request, error) {
+// var inCpy *ListObjectsInput
+// if input != nil {
+// tmp := *input
+// inCpy = &tmp
+// }
+// req, _ := c.ListObjectsRequest(inCpy)
+// return req, nil
+// },
+// },
+// }
+//
+// batcher := s3manager.NewBatchDeleteWithClient(svc)
+// if err := batcher.Delete(aws.BackgroundContext(), iter); err != nil {
+// return err
+// }
+type DeleteListIterator struct {
+ Bucket *string
+ Paginator request.Pagination
+ objects []*s3.Object
+}
+
+// NewDeleteListIterator will return a new DeleteListIterator.
+func NewDeleteListIterator(svc s3iface.S3API, input *s3.ListObjectsInput, opts ...func(*DeleteListIterator)) BatchDeleteIterator {
+ iter := &DeleteListIterator{
+ Bucket: input.Bucket,
+ Paginator: request.Pagination{
+ NewRequest: func() (*request.Request, error) {
+ var inCpy *s3.ListObjectsInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := svc.ListObjectsRequest(inCpy)
+ return req, nil
+ },
+ },
+ }
+
+ for _, opt := range opts {
+ opt(iter)
+ }
+ return iter
+}
+
+// Next will use the S3API client to iterate through a list of objects.
+func (iter *DeleteListIterator) Next() bool {
+ if len(iter.objects) > 0 {
+ iter.objects = iter.objects[1:]
+ }
+
+ if len(iter.objects) == 0 && iter.Paginator.Next() {
+ iter.objects = iter.Paginator.Page().(*s3.ListObjectsOutput).Contents
+ }
+
+ return len(iter.objects) > 0
+}
+
+// Err will return the last known error from Next.
+func (iter *DeleteListIterator) Err() error {
+ return iter.Paginator.Err()
+}
+
+// DeleteObject will return the current object to be deleted.
+func (iter *DeleteListIterator) DeleteObject() BatchDeleteObject {
+ return BatchDeleteObject{
+ Object: &s3.DeleteObjectInput{
+ Bucket: iter.Bucket,
+ Key: iter.objects[0].Key,
+ },
+ }
+}
+
+// BatchDelete will use the s3 package's service client to perform a batch
+// delete.
+type BatchDelete struct {
+ Client s3iface.S3API
+ BatchSize int
+}
+
+// NewBatchDeleteWithClient will return a new delete client that can delete a batched amount of
+// objects.
+//
+// Example:
+// batcher := s3manager.NewBatchDeleteWithClient(client, size)
+//
+// objects := []BatchDeleteObject{
+// {
+// Object: &s3.DeleteObjectInput {
+// Key: aws.String("key"),
+// Bucket: aws.String("bucket"),
+// },
+// },
+// }
+//
+// if err := batcher.Delete(&s3manager.DeleteObjectsIterator{
+// Objects: objects,
+// }); err != nil {
+// return err
+// }
+func NewBatchDeleteWithClient(client s3iface.S3API, options ...func(*BatchDelete)) *BatchDelete {
+ svc := &BatchDelete{
+ Client: client,
+ BatchSize: DefaultBatchSize,
+ }
+
+ for _, opt := range options {
+ opt(svc)
+ }
+
+ return svc
+}
+
+// NewBatchDelete will return a new delete client that can delete a batched amount of
+// objects.
+//
+// Example:
+// batcher := s3manager.NewBatchDelete(sess, size)
+//
+// objects := []BatchDeleteObject{
+// {
+// Object: &s3.DeleteObjectInput {
+// Key: aws.String("key"),
+// Bucket: aws.String("bucket"),
+// },
+// },
+// }
+//
+// if err := batcher.Delete(&s3manager.DeleteObjectsIterator{
+// Objects: objects,
+// }); err != nil {
+// return err
+// }
+func NewBatchDelete(c client.ConfigProvider, options ...func(*BatchDelete)) *BatchDelete {
+ client := s3.New(c)
+ return NewBatchDeleteWithClient(client, options...)
+}
+
+// BatchDeleteObject is a wrapper object for calling the batch delete operation.
+type BatchDeleteObject struct {
+ Object *s3.DeleteObjectInput
+ // After will run after each iteration during the batch process. This function will
+ // be executed whether or not the request was successful.
+ After func() error
+}
+
+// DeleteObjectsIterator is an interface that uses the scanner pattern to iterate
+// through a series of objects to be deleted.
+type DeleteObjectsIterator struct {
+ Objects []BatchDeleteObject
+ index int
+ inc bool
+}
+
+// Next will increment the default iterator's index and and ensure that there
+// is another object to iterator to.
+func (iter *DeleteObjectsIterator) Next() bool {
+ if iter.inc {
+ iter.index++
+ } else {
+ iter.inc = true
+ }
+ return iter.index < len(iter.Objects)
+}
+
+// Err will return an error. Since this is just used to satisfy the BatchDeleteIterator interface
+// this will only return nil.
+func (iter *DeleteObjectsIterator) Err() error {
+ return nil
+}
+
+// DeleteObject will return the BatchDeleteObject at the current batched index.
+func (iter *DeleteObjectsIterator) DeleteObject() BatchDeleteObject {
+ object := iter.Objects[iter.index]
+ return object
+}
+
+// Delete will use the iterator to queue up objects that need to be deleted.
+// Once the batch size is met, this will call the deleteBatch function.
+func (d *BatchDelete) Delete(ctx aws.Context, iter BatchDeleteIterator) error {
+ var errs []Error
+ objects := []BatchDeleteObject{}
+ var input *s3.DeleteObjectsInput
+
+ for iter.Next() {
+ o := iter.DeleteObject()
+
+ if input == nil {
+ input = initDeleteObjectsInput(o.Object)
+ }
+
+ parity := hasParity(input, o)
+ if parity {
+ input.Delete.Objects = append(input.Delete.Objects, &s3.ObjectIdentifier{
+ Key: o.Object.Key,
+ VersionId: o.Object.VersionId,
+ })
+ objects = append(objects, o)
+ }
+
+ if len(input.Delete.Objects) == d.BatchSize || !parity {
+ if err := deleteBatch(d, input, objects); err != nil {
+ errs = append(errs, err...)
+ }
+
+ objects = objects[:0]
+ input = nil
+
+ if !parity {
+ objects = append(objects, o)
+ input = initDeleteObjectsInput(o.Object)
+ input.Delete.Objects = append(input.Delete.Objects, &s3.ObjectIdentifier{
+ Key: o.Object.Key,
+ VersionId: o.Object.VersionId,
+ })
+ }
+ }
+ }
+
+ if input != nil && len(input.Delete.Objects) > 0 {
+ if err := deleteBatch(d, input, objects); err != nil {
+ errs = append(errs, err...)
+ }
+ }
+
+ if len(errs) > 0 {
+ return NewBatchError("BatchedDeleteIncomplete", "some objects have failed to be deleted.", errs)
+ }
+ return nil
+}
+
+func initDeleteObjectsInput(o *s3.DeleteObjectInput) *s3.DeleteObjectsInput {
+ return &s3.DeleteObjectsInput{
+ Bucket: o.Bucket,
+ MFA: o.MFA,
+ RequestPayer: o.RequestPayer,
+ Delete: &s3.Delete{},
+ }
+}
+
+// deleteBatch will delete a batch of items in the objects parameters.
+func deleteBatch(d *BatchDelete, input *s3.DeleteObjectsInput, objects []BatchDeleteObject) []Error {
+ errs := []Error{}
+
+ if result, err := d.Client.DeleteObjects(input); err != nil {
+ for i := 0; i < len(input.Delete.Objects); i++ {
+ errs = append(errs, newError(err, input.Bucket, input.Delete.Objects[i].Key))
+ }
+ } else if len(result.Errors) > 0 {
+ for i := 0; i < len(result.Errors); i++ {
+ errs = append(errs, newError(err, input.Bucket, result.Errors[i].Key))
+ }
+ }
+ for _, object := range objects {
+ if object.After == nil {
+ continue
+ }
+ if err := object.After(); err != nil {
+ errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
+ }
+ }
+
+ return errs
+}
+
+func hasParity(o1 *s3.DeleteObjectsInput, o2 BatchDeleteObject) bool {
+ if o1.Bucket != nil && o2.Object.Bucket != nil {
+ if *o1.Bucket != *o2.Object.Bucket {
+ return false
+ }
+ } else if o1.Bucket != o2.Object.Bucket {
+ return false
+ }
+
+ if o1.MFA != nil && o2.Object.MFA != nil {
+ if *o1.MFA != *o2.Object.MFA {
+ return false
+ }
+ } else if o1.MFA != o2.Object.MFA {
+ return false
+ }
+
+ if o1.RequestPayer != nil && o2.Object.RequestPayer != nil {
+ if *o1.RequestPayer != *o2.Object.RequestPayer {
+ return false
+ }
+ } else if o1.RequestPayer != o2.Object.RequestPayer {
+ return false
+ }
+
+ return true
+}
+
+// BatchDownloadIterator is an interface that uses the scanner pattern to iterate
+// through a series of objects to be downloaded.
+type BatchDownloadIterator interface {
+ Next() bool
+ Err() error
+ DownloadObject() BatchDownloadObject
+}
+
+// BatchDownloadObject contains all necessary information to run a batch operation once.
+type BatchDownloadObject struct {
+ Object *s3.GetObjectInput
+ Writer io.WriterAt
+ // After will run after each iteration during the batch process. This function will
+ // be executed whether or not the request was successful.
+ After func() error
+}
+
+// DownloadObjectsIterator implements the BatchDownloadIterator interface and allows for batched
+// download of objects.
+type DownloadObjectsIterator struct {
+ Objects []BatchDownloadObject
+ index int
+ inc bool
+}
+
+// Next will increment the default iterator's index and and ensure that there
+// is another object to iterator to.
+func (batcher *DownloadObjectsIterator) Next() bool {
+ if batcher.inc {
+ batcher.index++
+ } else {
+ batcher.inc = true
+ }
+ return batcher.index < len(batcher.Objects)
+}
+
+// DownloadObject will return the BatchDownloadObject at the current batched index.
+func (batcher *DownloadObjectsIterator) DownloadObject() BatchDownloadObject {
+ object := batcher.Objects[batcher.index]
+ return object
+}
+
+// Err will return an error. Since this is just used to satisfy the BatchDeleteIterator interface
+// this will only return nil.
+func (batcher *DownloadObjectsIterator) Err() error {
+ return nil
+}
+
+// BatchUploadIterator is an interface that uses the scanner pattern to
+// iterate through what needs to be uploaded.
+type BatchUploadIterator interface {
+ Next() bool
+ Err() error
+ UploadObject() BatchUploadObject
+}
+
+// UploadObjectsIterator implements the BatchUploadIterator interface and allows for batched
+// upload of objects.
+type UploadObjectsIterator struct {
+ Objects []BatchUploadObject
+ index int
+ inc bool
+}
+
+// Next will increment the default iterator's index and and ensure that there
+// is another object to iterator to.
+func (batcher *UploadObjectsIterator) Next() bool {
+ if batcher.inc {
+ batcher.index++
+ } else {
+ batcher.inc = true
+ }
+ return batcher.index < len(batcher.Objects)
+}
+
+// Err will return an error. Since this is just used to satisfy the BatchUploadIterator interface
+// this will only return nil.
+func (batcher *UploadObjectsIterator) Err() error {
+ return nil
+}
+
+// UploadObject will return the BatchUploadObject at the current batched index.
+func (batcher *UploadObjectsIterator) UploadObject() BatchUploadObject {
+ object := batcher.Objects[batcher.index]
+ return object
+}
+
+// BatchUploadObject contains all necessary information to run a batch operation once.
+type BatchUploadObject struct {
+ Object *UploadInput
+ // After will run after each iteration during the batch process. This function will
+ // be executed whether or not the request was successful.
+ After func() error
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go
new file mode 100644
index 000000000..ce5176400
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/bucket_region.go
@@ -0,0 +1,83 @@
+package s3manager
+
+import (
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/client"
+ "github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/service/s3"
+ "github.com/aws/aws-sdk-go/service/s3/s3iface"
+)
+
+// GetBucketRegion will attempt to get the region for a bucket using the
+// regionHint to determine which AWS partition to perform the query on.
+//
+// The request will not be signed, and will not use your AWS credentials.
+//
+// A "NotFound" error code will be returned if the bucket does not exist in
+// the AWS partition the regionHint belongs to.
+//
+// For example to get the region of a bucket which exists in "eu-central-1"
+// you could provide a region hint of "us-west-2".
+//
+// sess := session.Must(session.NewSession())
+//
+// bucket := "my-bucket"
+// region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2")
+// if err != nil {
+// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" {
+// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket)
+// }
+// return err
+// }
+// fmt.Printf("Bucket %s is in %s region\n", bucket, region)
+//
+func GetBucketRegion(ctx aws.Context, c client.ConfigProvider, bucket, regionHint string, opts ...request.Option) (string, error) {
+ svc := s3.New(c, &aws.Config{
+ Region: aws.String(regionHint),
+ })
+ return GetBucketRegionWithClient(ctx, svc, bucket, opts...)
+}
+
+const bucketRegionHeader = "X-Amz-Bucket-Region"
+
+// GetBucketRegionWithClient is the same as GetBucketRegion with the exception
+// that it takes a S3 service client instead of a Session. The regionHint is
+// derived from the region the S3 service client was created in.
+//
+// See GetBucketRegion for more information.
+func GetBucketRegionWithClient(ctx aws.Context, svc s3iface.S3API, bucket string, opts ...request.Option) (string, error) {
+ req, _ := svc.HeadBucketRequest(&s3.HeadBucketInput{
+ Bucket: aws.String(bucket),
+ })
+ req.Config.S3ForcePathStyle = aws.Bool(true)
+ req.Config.Credentials = credentials.AnonymousCredentials
+ req.SetContext(ctx)
+
+ // Disable HTTP redirects to prevent an invalid 301 from eating the response
+ // because Go's HTTP client will fail, and drop the response if an 301 is
+ // received without a location header. S3 will return a 301 without the
+ // location header for HeadObject API calls.
+ req.DisableFollowRedirects = true
+
+ var bucketRegion string
+ req.Handlers.Send.PushBack(func(r *request.Request) {
+ bucketRegion = r.HTTPResponse.Header.Get(bucketRegionHeader)
+ if len(bucketRegion) == 0 {
+ return
+ }
+ r.HTTPResponse.StatusCode = 200
+ r.HTTPResponse.Status = "OK"
+ r.Error = nil
+ })
+
+ req.ApplyOptions(opts...)
+
+ if err := req.Send(); err != nil {
+ return "", err
+ }
+
+ bucketRegion = s3.NormalizeBucketLocation(bucketRegion)
+
+ return bucketRegion, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
index 0841077ab..d30f2b6b3 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/download.go
@@ -31,15 +31,30 @@ const DefaultDownloadConcurrency = 5
type Downloader struct {
// The buffer size (in bytes) to use when buffering data into chunks and
// sending them as parts to S3. The minimum allowed part size is 5MB, and
- // if this value is set to zero, the DefaultPartSize value will be used.
+ // if this value is set to zero, the DefaultDownloadPartSize value will be used.
+ //
+ // PartSize is ignored if the Range input parameter is provided.
PartSize int64
// The number of goroutines to spin up in parallel when sending parts.
// If this is set to zero, the DefaultDownloadConcurrency value will be used.
+ //
+ // Concurrency is ignored if the Range input parameter is provided.
Concurrency int
// An S3 client to use when performing downloads.
S3 s3iface.S3API
+
+ // List of request options that will be passed down to individual API
+ // operation requests made by the downloader.
+ RequestOptions []request.Option
+}
+
+// WithDownloaderRequestOptions appends to the Downloader's API request options.
+func WithDownloaderRequestOptions(opts ...request.Option) func(*Downloader) {
+ return func(d *Downloader) {
+ d.RequestOptions = append(d.RequestOptions, opts...)
+ }
}
// NewDownloader creates a new Downloader instance to downloads objects from
@@ -119,32 +134,125 @@ type maxRetrier interface {
//
// The w io.WriterAt can be satisfied by an os.File to do multipart concurrent
// downloads, or in memory []byte wrapper using aws.WriteAtBuffer.
+//
+// If the GetObjectInput's Range value is provided that will cause the downloader
+// to perform a single GetObjectInput request for that object's range. This will
+// caused the part size, and concurrency configurations to be ignored.
func (d Downloader) Download(w io.WriterAt, input *s3.GetObjectInput, options ...func(*Downloader)) (n int64, err error) {
- impl := downloader{w: w, in: input, ctx: d}
+ return d.DownloadWithContext(aws.BackgroundContext(), w, input, options...)
+}
+
+// DownloadWithContext downloads an object in S3 and writes the payload into w
+// using concurrent GET requests.
+//
+// DownloadWithContext is the same as Download with the additional support for
+// Context input parameters. The Context must not be nil. A nil Context will
+// cause a panic. Use the Context to add deadlining, timeouts, ect. The
+// DownloadWithContext may create sub-contexts for individual underlying
+// requests.
+//
+// Additional functional options can be provided to configure the individual
+// download. These options are copies of the Downloader instance Download is
+// called from. Modifying the options will not impact the original Downloader
+// instance. Use the WithDownloaderRequestOptions helper function to pass in request
+// options that will be applied to all API operations made with this downloader.
+//
+// The w io.WriterAt can be satisfied by an os.File to do multipart concurrent
+// downloads, or in memory []byte wrapper using aws.WriteAtBuffer.
+//
+// It is safe to call this method concurrently across goroutines.
+//
+// If the GetObjectInput's Range value is provided that will cause the downloader
+// to perform a single GetObjectInput request for that object's range. This will
+// caused the part size, and concurrency configurations to be ignored.
+func (d Downloader) DownloadWithContext(ctx aws.Context, w io.WriterAt, input *s3.GetObjectInput, options ...func(*Downloader)) (n int64, err error) {
+ impl := downloader{w: w, in: input, cfg: d, ctx: ctx}
for _, option := range options {
- option(&impl.ctx)
+ option(&impl.cfg)
}
+ impl.cfg.RequestOptions = append(impl.cfg.RequestOptions, request.WithAppendUserAgent("S3Manager"))
if s, ok := d.S3.(maxRetrier); ok {
impl.partBodyMaxRetries = s.MaxRetries()
}
impl.totalBytes = -1
- if impl.ctx.Concurrency == 0 {
- impl.ctx.Concurrency = DefaultDownloadConcurrency
+ if impl.cfg.Concurrency == 0 {
+ impl.cfg.Concurrency = DefaultDownloadConcurrency
}
- if impl.ctx.PartSize == 0 {
- impl.ctx.PartSize = DefaultDownloadPartSize
+ if impl.cfg.PartSize == 0 {
+ impl.cfg.PartSize = DefaultDownloadPartSize
}
return impl.download()
}
+// DownloadWithIterator will download a batched amount of objects in S3 and writes them
+// to the io.WriterAt specificed in the iterator.
+//
+// Example:
+// svc := s3manager.NewDownloader(session)
+//
+// fooFile, err := os.Open("/tmp/foo.file")
+// if err != nil {
+// return err
+// }
+//
+// barFile, err := os.Open("/tmp/bar.file")
+// if err != nil {
+// return err
+// }
+//
+// objects := []s3manager.BatchDownloadObject {
+// {
+// Input: &s3.GetObjectInput {
+// Bucket: aws.String("bucket"),
+// Key: aws.String("foo"),
+// },
+// Writer: fooFile,
+// },
+// {
+// Input: &s3.GetObjectInput {
+// Bucket: aws.String("bucket"),
+// Key: aws.String("bar"),
+// },
+// Writer: barFile,
+// },
+// }
+//
+// iter := &s3manager.DownloadObjectsIterator{Objects: objects}
+// if err := svc.DownloadWithIterator(aws.BackgroundContext(), iter); err != nil {
+// return err
+// }
+func (d Downloader) DownloadWithIterator(ctx aws.Context, iter BatchDownloadIterator, opts ...func(*Downloader)) error {
+ var errs []Error
+ for iter.Next() {
+ object := iter.DownloadObject()
+ if _, err := d.DownloadWithContext(ctx, object.Writer, object.Object, opts...); err != nil {
+ errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
+ }
+
+ if object.After == nil {
+ continue
+ }
+
+ if err := object.After(); err != nil {
+ errs = append(errs, newError(err, object.Object.Bucket, object.Object.Key))
+ }
+ }
+
+ if len(errs) > 0 {
+ return NewBatchError("BatchedDownloadIncomplete", "some objects have failed to download.", errs)
+ }
+ return nil
+}
+
// downloader is the implementation structure used internally by Downloader.
type downloader struct {
- ctx Downloader
+ ctx aws.Context
+ cfg Downloader
in *s3.GetObjectInput
w io.WriterAt
@@ -163,14 +271,22 @@ type downloader struct {
// download performs the implementation of the object download across ranged
// GETs.
func (d *downloader) download() (n int64, err error) {
+ // If range is specified fall back to single download of that range
+ // this enables the functionality of ranged gets with the downloader but
+ // at the cost of no multipart downloads.
+ if rng := aws.StringValue(d.in.Range); len(rng) > 0 {
+ d.downloadRange(rng)
+ return d.written, d.err
+ }
+
// Spin off first worker to check additional header information
d.getChunk()
if total := d.getTotalBytes(); total >= 0 {
// Spin up workers
- ch := make(chan dlchunk, d.ctx.Concurrency)
+ ch := make(chan dlchunk, d.cfg.Concurrency)
- for i := 0; i < d.ctx.Concurrency; i++ {
+ for i := 0; i < d.cfg.Concurrency; i++ {
d.wg.Add(1)
go d.downloadPart(ch)
}
@@ -182,8 +298,8 @@ func (d *downloader) download() (n int64, err error) {
}
// Queue the next range of bytes to read.
- ch <- dlchunk{w: d.w, start: d.pos, size: d.ctx.PartSize}
- d.pos += d.ctx.PartSize
+ ch <- dlchunk{w: d.w, start: d.pos, size: d.cfg.PartSize}
+ d.pos += d.cfg.PartSize
}
// Wait for completion
@@ -219,13 +335,17 @@ func (d *downloader) downloadPart(ch chan dlchunk) {
defer d.wg.Done()
for {
chunk, ok := <-ch
- if !ok || d.getErr() != nil {
+ if !ok {
break
}
+ if d.getErr() != nil {
+ // Drain the channel if there is an error, to prevent deadlocking
+ // of download producer.
+ continue
+ }
if err := d.downloadChunk(chunk); err != nil {
d.setErr(err)
- break
}
}
}
@@ -237,30 +357,46 @@ func (d *downloader) getChunk() {
return
}
- chunk := dlchunk{w: d.w, start: d.pos, size: d.ctx.PartSize}
- d.pos += d.ctx.PartSize
+ chunk := dlchunk{w: d.w, start: d.pos, size: d.cfg.PartSize}
+ d.pos += d.cfg.PartSize
if err := d.downloadChunk(chunk); err != nil {
d.setErr(err)
}
}
-// downloadChunk downloads the chunk froom s3
+// downloadRange downloads an Object given the passed in Byte-Range value.
+// The chunk used down download the range will be configured for that range.
+func (d *downloader) downloadRange(rng string) {
+ if d.getErr() != nil {
+ return
+ }
+
+ chunk := dlchunk{w: d.w, start: d.pos}
+ // Ranges specified will short circuit the multipart download
+ chunk.withRange = rng
+
+ if err := d.downloadChunk(chunk); err != nil {
+ d.setErr(err)
+ }
+
+ // Update the position based on the amount of data received.
+ d.pos = d.written
+}
+
+// downloadChunk downloads the chunk from s3
func (d *downloader) downloadChunk(chunk dlchunk) error {
in := &s3.GetObjectInput{}
awsutil.Copy(in, d.in)
// Get the next byte range of data
- rng := fmt.Sprintf("bytes=%d-%d", chunk.start, chunk.start+chunk.size-1)
- in.Range = &rng
+ in.Range = aws.String(chunk.ByteRange())
var n int64
var err error
for retry := 0; retry <= d.partBodyMaxRetries; retry++ {
- req, resp := d.ctx.S3.GetObjectRequest(in)
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
-
- err = req.Send()
+ var resp *s3.GetObjectOutput
+ resp, err = d.cfg.S3.GetObjectWithContext(d.ctx, in, d.cfg.RequestOptions...)
if err != nil {
return err
}
@@ -273,7 +409,7 @@ func (d *downloader) downloadChunk(chunk dlchunk) error {
}
chunk.cur = 0
- logMessage(d.ctx.S3, aws.LogDebugWithRequestRetries,
+ logMessage(d.cfg.S3, aws.LogDebugWithRequestRetries,
fmt.Sprintf("DEBUG: object part body download interrupted %s, err, %v, retrying attempt %d",
aws.StringValue(in.Key), err, retry))
}
@@ -320,7 +456,7 @@ func (d *downloader) setTotalBytes(resp *s3.GetObjectOutput) {
}
if resp.ContentRange == nil {
- // ContentRange is nil when the full file contents is provied, and
+ // ContentRange is nil when the full file contents is provided, and
// is not chunked. Use ContentLength instead.
if resp.ContentLength != nil {
d.totalBytes = *resp.ContentLength
@@ -379,12 +515,18 @@ type dlchunk struct {
start int64
size int64
cur int64
+
+ // specifies the byte range the chunk should be downloaded with.
+ withRange string
}
// Write wraps io.WriterAt for the dlchunk, writing from the dlchunk's start
// position to its end (or EOF).
+//
+// If a range is specified on the dlchunk the size will be ignored when writing.
+// as the total size may not of be known ahead of time.
func (c *dlchunk) Write(p []byte) (n int, err error) {
- if c.cur >= c.size {
+ if c.cur >= c.size && len(c.withRange) == 0 {
return 0, io.EOF
}
@@ -393,3 +535,13 @@ func (c *dlchunk) Write(p []byte) (n int, err error) {
return
}
+
+// ByteRange returns a HTTP Byte-Range header value that should be used by the
+// client to request the chunk's range.
+func (c *dlchunk) ByteRange() string {
+ if len(c.withRange) != 0 {
+ return c.withRange
+ }
+
+ return fmt.Sprintf("bytes=%d-%d", c.start, c.start+c.size-1)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go
index a27722634..fc1f47205 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload.go
@@ -202,13 +202,20 @@ type UploadOutput struct {
UploadID string
}
+// WithUploaderRequestOptions appends to the Uploader's API request options.
+func WithUploaderRequestOptions(opts ...request.Option) func(*Uploader) {
+ return func(u *Uploader) {
+ u.RequestOptions = append(u.RequestOptions, opts...)
+ }
+}
+
// The Uploader structure that calls Upload(). It is safe to call Upload()
// on this structure for multiple objects and across concurrent goroutines.
// Mutating the Uploader's properties is not safe to be done concurrently.
type Uploader struct {
// The buffer size (in bytes) to use when buffering data into chunks and
// sending them as parts to S3. The minimum allowed part size is 5MB, and
- // if this value is set to zero, the DefaultPartSize value will be used.
+ // if this value is set to zero, the DefaultUploadPartSize value will be used.
PartSize int64
// The number of goroutines to spin up in parallel when sending parts.
@@ -232,6 +239,10 @@ type Uploader struct {
// The client to use when uploading to S3.
S3 s3iface.S3API
+
+ // List of request options that will be passed down to individual API
+ // operation requests made by the uploader.
+ RequestOptions []request.Option
}
// NewUploader creates a new Uploader instance to upload objects to S3. Pass In
@@ -308,6 +319,9 @@ func NewUploaderWithClient(svc s3iface.S3API, options ...func(*Uploader)) *Uploa
// upload. These options are copies of the Uploader instance Upload is called from.
// Modifying the options will not impact the original Uploader instance.
//
+// Use the WithUploaderRequestOptions helper function to pass in request
+// options that will be applied to all API operations made with this uploader.
+//
// It is safe to call this method concurrently across goroutines.
//
// Example:
@@ -327,18 +341,97 @@ func NewUploaderWithClient(svc s3iface.S3API, options ...func(*Uploader)) *Uploa
// u.LeavePartsOnError = true // Don't delete the parts if the upload fails.
// })
func (u Uploader) Upload(input *UploadInput, options ...func(*Uploader)) (*UploadOutput, error) {
- i := uploader{in: input, ctx: u}
+ return u.UploadWithContext(aws.BackgroundContext(), input, options...)
+}
- for _, option := range options {
- option(&i.ctx)
+// UploadWithContext uploads an object to S3, intelligently buffering large
+// files into smaller chunks and sending them in parallel across multiple
+// goroutines. You can configure the buffer size and concurrency through the
+// Uploader's parameters.
+//
+// UploadWithContext is the same as Upload with the additional support for
+// Context input parameters. The Context must not be nil. A nil Context will
+// cause a panic. Use the context to add deadlining, timeouts, ect. The
+// UploadWithContext may create sub-contexts for individual underlying requests.
+//
+// Additional functional options can be provided to configure the individual
+// upload. These options are copies of the Uploader instance Upload is called from.
+// Modifying the options will not impact the original Uploader instance.
+//
+// Use the WithUploaderRequestOptions helper function to pass in request
+// options that will be applied to all API operations made with this uploader.
+//
+// It is safe to call this method concurrently across goroutines.
+func (u Uploader) UploadWithContext(ctx aws.Context, input *UploadInput, opts ...func(*Uploader)) (*UploadOutput, error) {
+ i := uploader{in: input, cfg: u, ctx: ctx}
+
+ for _, opt := range opts {
+ opt(&i.cfg)
}
+ i.cfg.RequestOptions = append(i.cfg.RequestOptions, request.WithAppendUserAgent("S3Manager"))
return i.upload()
}
+// UploadWithIterator will upload a batched amount of objects to S3. This operation uses
+// the iterator pattern to know which object to upload next. Since this is an interface this
+// allows for custom defined functionality.
+//
+// Example:
+// svc:= s3manager.NewUploader(sess)
+//
+// objects := []BatchUploadObject{
+// {
+// Object: &s3manager.UploadInput {
+// Key: aws.String("key"),
+// Bucket: aws.String("bucket"),
+// },
+// },
+// }
+//
+// iter := &s3managee.UploadObjectsIterator{Objects: objects}
+// if err := svc.UploadWithIterator(aws.BackgroundContext(), iter); err != nil {
+// return err
+// }
+func (u Uploader) UploadWithIterator(ctx aws.Context, iter BatchUploadIterator, opts ...func(*Uploader)) error {
+ var errs []Error
+ for iter.Next() {
+ object := iter.UploadObject()
+ if _, err := u.UploadWithContext(ctx, object.Object, opts...); err != nil {
+ s3Err := Error{
+ OrigErr: err,
+ Bucket: object.Object.Bucket,
+ Key: object.Object.Key,
+ }
+
+ errs = append(errs, s3Err)
+ }
+
+ if object.After == nil {
+ continue
+ }
+
+ if err := object.After(); err != nil {
+ s3Err := Error{
+ OrigErr: err,
+ Bucket: object.Object.Bucket,
+ Key: object.Object.Key,
+ }
+
+ errs = append(errs, s3Err)
+ }
+ }
+
+ if len(errs) > 0 {
+ return NewBatchError("BatchedUploadIncomplete", "some objects have failed to upload.", errs)
+ }
+ return nil
+}
+
// internal structure to manage an upload to S3.
type uploader struct {
- ctx Uploader
+ ctx aws.Context
+ cfg Uploader
in *UploadInput
@@ -351,7 +444,7 @@ type uploader struct {
func (u *uploader) upload() (*UploadOutput, error) {
u.init()
- if u.ctx.PartSize < MinUploadPartSize {
+ if u.cfg.PartSize < MinUploadPartSize {
msg := fmt.Sprintf("part size must be at least %d bytes", MinUploadPartSize)
return nil, awserr.New("ConfigError", msg, nil)
}
@@ -370,11 +463,11 @@ func (u *uploader) upload() (*UploadOutput, error) {
// init will initialize all default options.
func (u *uploader) init() {
- if u.ctx.Concurrency == 0 {
- u.ctx.Concurrency = DefaultUploadConcurrency
+ if u.cfg.Concurrency == 0 {
+ u.cfg.Concurrency = DefaultUploadConcurrency
}
- if u.ctx.PartSize == 0 {
- u.ctx.PartSize = DefaultUploadPartSize
+ if u.cfg.PartSize == 0 {
+ u.cfg.PartSize = DefaultUploadPartSize
}
// Try to get the total size for some optimizations
@@ -399,10 +492,10 @@ func (u *uploader) initSize() {
// Try to adjust partSize if it is too small and account for
// integer division truncation.
- if u.totalSize/u.ctx.PartSize >= int64(u.ctx.MaxUploadParts) {
+ if u.totalSize/u.cfg.PartSize >= int64(u.cfg.MaxUploadParts) {
// Add one to the part size to account for remainders
// during the size calculation. e.g odd number of bytes.
- u.ctx.PartSize = (u.totalSize / int64(u.ctx.MaxUploadParts)) + 1
+ u.cfg.PartSize = (u.totalSize / int64(u.cfg.MaxUploadParts)) + 1
}
}
}
@@ -420,11 +513,11 @@ func (u *uploader) nextReader() (io.ReadSeeker, int, error) {
case readerAtSeeker:
var err error
- n := u.ctx.PartSize
+ n := u.cfg.PartSize
if u.totalSize >= 0 {
bytesLeft := u.totalSize - u.readerPos
- if bytesLeft <= u.ctx.PartSize {
+ if bytesLeft <= u.cfg.PartSize {
err = io.EOF
n = bytesLeft
}
@@ -436,7 +529,7 @@ func (u *uploader) nextReader() (io.ReadSeeker, int, error) {
return reader, int(n), err
default:
- part := make([]byte, u.ctx.PartSize)
+ part := make([]byte, u.cfg.PartSize)
n, err := readFillBuf(r, part)
u.readerPos += int64(n)
@@ -462,8 +555,11 @@ func (u *uploader) singlePart(buf io.ReadSeeker) (*UploadOutput, error) {
awsutil.Copy(params, u.in)
params.Body = buf
- req, out := u.ctx.S3.PutObjectRequest(params)
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
+ // Need to use request form because URL generated in request is
+ // used in return.
+ req, out := u.cfg.S3.PutObjectRequest(params)
+ req.SetContext(u.ctx)
+ req.ApplyOptions(u.cfg.RequestOptions...)
if err := req.Send(); err != nil {
return nil, err
}
@@ -506,16 +602,15 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker) (*UploadOutput, error) {
awsutil.Copy(params, u.in)
// Create the multipart
- req, resp := u.ctx.S3.CreateMultipartUploadRequest(params)
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
- if err := req.Send(); err != nil {
+ resp, err := u.cfg.S3.CreateMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ if err != nil {
return nil, err
}
u.uploadID = *resp.UploadId
// Create the workers
- ch := make(chan chunk, u.ctx.Concurrency)
- for i := 0; i < u.ctx.Concurrency; i++ {
+ ch := make(chan chunk, u.cfg.Concurrency)
+ for i := 0; i < u.cfg.Concurrency; i++ {
u.wg.Add(1)
go u.readChunk(ch)
}
@@ -525,15 +620,14 @@ func (u *multiuploader) upload(firstBuf io.ReadSeeker) (*UploadOutput, error) {
ch <- chunk{buf: firstBuf, num: num}
// Read and queue the rest of the parts
- var err error
for u.geterr() == nil && err == nil {
num++
// This upload exceeded maximum number of supported parts, error now.
- if num > int64(u.ctx.MaxUploadParts) || num > int64(MaxUploadParts) {
+ if num > int64(u.cfg.MaxUploadParts) || num > int64(MaxUploadParts) {
var msg string
- if num > int64(u.ctx.MaxUploadParts) {
+ if num > int64(u.cfg.MaxUploadParts) {
msg = fmt.Sprintf("exceeded total allowed configured MaxUploadParts (%d). Adjust PartSize to fit in this limit",
- u.ctx.MaxUploadParts)
+ u.cfg.MaxUploadParts)
} else {
msg = fmt.Sprintf("exceeded total allowed S3 limit MaxUploadParts (%d). Adjust PartSize to fit in this limit",
MaxUploadParts)
@@ -607,7 +701,7 @@ func (u *multiuploader) readChunk(ch chan chunk) {
// send performs an UploadPart request and keeps track of the completed
// part information.
func (u *multiuploader) send(c chunk) error {
- req, resp := u.ctx.S3.UploadPartRequest(&s3.UploadPartInput{
+ params := &s3.UploadPartInput{
Bucket: u.in.Bucket,
Key: u.in.Key,
Body: c.buf,
@@ -615,9 +709,9 @@ func (u *multiuploader) send(c chunk) error {
SSECustomerAlgorithm: u.in.SSECustomerAlgorithm,
SSECustomerKey: u.in.SSECustomerKey,
PartNumber: &c.num,
- })
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
- if err := req.Send(); err != nil {
+ }
+ resp, err := u.cfg.S3.UploadPartWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ if err != nil {
return err
}
@@ -649,17 +743,19 @@ func (u *multiuploader) seterr(e error) {
// fail will abort the multipart unless LeavePartsOnError is set to true.
func (u *multiuploader) fail() {
- if u.ctx.LeavePartsOnError {
+ if u.cfg.LeavePartsOnError {
return
}
- req, _ := u.ctx.S3.AbortMultipartUploadRequest(&s3.AbortMultipartUploadInput{
+ params := &s3.AbortMultipartUploadInput{
Bucket: u.in.Bucket,
Key: u.in.Key,
UploadId: &u.uploadID,
- })
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
- req.Send()
+ }
+ _, err := u.cfg.S3.AbortMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ if err != nil {
+ logMessage(u.cfg.S3, aws.LogDebug, fmt.Sprintf("failed to abort multipart upload, %v", err))
+ }
}
// complete successfully completes a multipart upload and returns the response.
@@ -672,14 +768,14 @@ func (u *multiuploader) complete() *s3.CompleteMultipartUploadOutput {
// Parts must be sorted in PartNumber order.
sort.Sort(u.parts)
- req, resp := u.ctx.S3.CompleteMultipartUploadRequest(&s3.CompleteMultipartUploadInput{
+ params := &s3.CompleteMultipartUploadInput{
Bucket: u.in.Bucket,
Key: u.in.Key,
UploadId: &u.uploadID,
MultipartUpload: &s3.CompletedMultipartUpload{Parts: u.parts},
- })
- req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("S3Manager"))
- if err := req.Send(); err != nil {
+ }
+ resp, err := u.cfg.S3.CompleteMultipartUploadWithContext(u.ctx, params, u.cfg.RequestOptions...)
+ if err != nil {
u.seterr(err)
u.fail()
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
index 5e6f2299e..614e477d3 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
@@ -11,10 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/restxml"
)
-// S3 is a client for Amazon S3.
-// The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01
+// S3 provides the API operation methods for making requests to
+// Amazon Simple Storage Service. See this package's package overview docs
+// for details on the service.
+//
+// S3 methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
type S3 struct {
*client.Client
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
index 268ea2fb4..8010c4fa1 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
@@ -5,17 +5,27 @@ import (
"encoding/base64"
"github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
var errSSERequiresSSL = awserr.New("ConfigError", "cannot send SSE keys over HTTP.", nil)
func validateSSERequiresSSL(r *request.Request) {
- if r.HTTPRequest.URL.Scheme != "https" {
- p, _ := awsutil.ValuesAtPath(r.Params, "SSECustomerKey||CopySourceSSECustomerKey")
- if len(p) > 0 {
+ if r.HTTPRequest.URL.Scheme == "https" {
+ return
+ }
+
+ if iface, ok := r.Params.(sseCustomerKeyGetter); ok {
+ if len(iface.getSSECustomerKey()) > 0 {
r.Error = errSSERequiresSSL
+ return
+ }
+ }
+
+ if iface, ok := r.Params.(copySourceSSECustomerKeyGetter); ok {
+ if len(iface.getCopySourceSSECustomerKey()) > 0 {
+ r.Error = errSSERequiresSSL
+ return
}
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
index ed91c5872..bcca8627a 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
@@ -23,17 +23,22 @@ func unmarshalError(r *request.Request) {
defer r.HTTPResponse.Body.Close()
defer io.Copy(ioutil.Discard, r.HTTPResponse.Body)
+ hostID := r.HTTPResponse.Header.Get("X-Amz-Id-2")
+
// Bucket exists in a different region, and request needs
// to be made to the correct region.
if r.HTTPResponse.StatusCode == http.StatusMovedPermanently {
- r.Error = awserr.NewRequestFailure(
- awserr.New("BucketRegionError",
- fmt.Sprintf("incorrect region, the bucket is not in '%s' region",
- aws.StringValue(r.Config.Region)),
- nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
+ r.Error = requestFailure{
+ RequestFailure: awserr.NewRequestFailure(
+ awserr.New("BucketRegionError",
+ fmt.Sprintf("incorrect region, the bucket is not in '%s' region",
+ aws.StringValue(r.Config.Region)),
+ nil),
+ r.HTTPResponse.StatusCode,
+ r.RequestID,
+ ),
+ hostID: hostID,
+ }
return
}
@@ -48,6 +53,7 @@ func unmarshalError(r *request.Request) {
} else {
errCode = resp.Code
errMsg = resp.Message
+ err = nil
}
// Fallback to status code converted to message if still no error code
@@ -57,9 +63,41 @@ func unmarshalError(r *request.Request) {
errMsg = statusText
}
- r.Error = awserr.NewRequestFailure(
- awserr.New(errCode, errMsg, nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
+ r.Error = requestFailure{
+ RequestFailure: awserr.NewRequestFailure(
+ awserr.New(errCode, errMsg, err),
+ r.HTTPResponse.StatusCode,
+ r.RequestID,
+ ),
+ hostID: hostID,
+ }
+}
+
+// A RequestFailure provides access to the S3 Request ID and Host ID values
+// returned from API operation errors. Getting the error as a string will
+// return the formated error with the same information as awserr.RequestFailure,
+// while also adding the HostID value from the response.
+type RequestFailure interface {
+ awserr.RequestFailure
+
+ // Host ID is the S3 Host ID needed for debug, and contacting support
+ HostID() string
+}
+
+type requestFailure struct {
+ awserr.RequestFailure
+
+ hostID string
+}
+
+func (r requestFailure) Error() string {
+ extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s",
+ r.StatusCode(), r.RequestID(), r.hostID)
+ return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr())
+}
+func (r requestFailure) String() string {
+ return r.Error()
+}
+func (r requestFailure) HostID() string {
+ return r.hostID
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
index 5e16be4ba..cccfa8c2b 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
@@ -1,9 +1,12 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package s3
import (
- "github.com/aws/aws-sdk-go/private/waiter"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilBucketExists uses the Amazon S3 API operation
@@ -11,44 +14,60 @@ import (
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
- waiterCfg := waiter.Config{
- Operation: "HeadBucket",
- Delay: 5,
+ return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilBucketExists",
MaxAttempts: 20,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 301,
},
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 403,
},
{
- State: "retry",
- Matcher: "status",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 404,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *HeadBucketInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.HeadBucketRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilBucketNotExists uses the Amazon S3 API operation
@@ -56,26 +75,45 @@ func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error {
- waiterCfg := waiter.Config{
- Operation: "HeadBucket",
- Delay: 5,
+ return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilBucketNotExists",
MaxAttempts: 20,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 404,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *HeadBucketInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.HeadBucketRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilObjectExists uses the Amazon S3 API operation
@@ -83,32 +121,50 @@ func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error {
- waiterCfg := waiter.Config{
- Operation: "HeadObject",
- Delay: 5,
+ return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilObjectExists",
MaxAttempts: 20,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 200,
},
{
- State: "retry",
- Matcher: "status",
- Argument: "",
+ State: request.RetryWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 404,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *HeadObjectInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.HeadObjectRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
// WaitUntilObjectNotExists uses the Amazon S3 API operation
@@ -116,24 +172,43 @@ func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error {
// If the condition is not meet within the max attempt window an error will
// be returned.
func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error {
- waiterCfg := waiter.Config{
- Operation: "HeadObject",
- Delay: 5,
+ return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input)
+}
+
+// WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists.
+// With the support for passing in a context and options to configure the
+// Waiter and the underlying request options.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
+ w := request.Waiter{
+ Name: "WaitUntilObjectNotExists",
MaxAttempts: 20,
- Acceptors: []waiter.WaitAcceptor{
+ Delay: request.ConstantWaiterDelay(5 * time.Second),
+ Acceptors: []request.WaiterAcceptor{
{
- State: "success",
- Matcher: "status",
- Argument: "",
+ State: request.SuccessWaiterState,
+ Matcher: request.StatusWaiterMatch,
Expected: 404,
},
},
+ Logger: c.Config.Logger,
+ NewRequest: func(opts []request.Option) (*request.Request, error) {
+ var inCpy *HeadObjectInput
+ if input != nil {
+ tmp := *input
+ inCpy = &tmp
+ }
+ req, _ := c.HeadObjectRequest(inCpy)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return req, nil
+ },
}
+ w.ApplyOptions(opts...)
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
+ return w.WaitWithContext(ctx)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
index ad42b4c97..e5c105fed 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
@@ -1,11 +1,11 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-// Package sts provides a client for AWS Security Token Service.
package sts
import (
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
@@ -172,8 +172,23 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) {
req, out := c.AssumeRoleRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssumeRoleWithContext is the same as AssumeRole with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssumeRole for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) AssumeRoleWithContext(ctx aws.Context, input *AssumeRoleInput, opts ...request.Option) (*AssumeRoleOutput, error) {
+ req, out := c.AssumeRoleRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssumeRoleWithSAML = "AssumeRoleWithSAML"
@@ -331,8 +346,23 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) {
req, out := c.AssumeRoleWithSAMLRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssumeRoleWithSAMLWithContext is the same as AssumeRoleWithSAML with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssumeRoleWithSAML for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) AssumeRoleWithSAMLWithContext(ctx aws.Context, input *AssumeRoleWithSAMLInput, opts ...request.Option) (*AssumeRoleWithSAMLOutput, error) {
+ req, out := c.AssumeRoleWithSAMLRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
@@ -519,8 +549,23 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) {
req, out := c.AssumeRoleWithWebIdentityRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// AssumeRoleWithWebIdentityWithContext is the same as AssumeRoleWithWebIdentity with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AssumeRoleWithWebIdentity for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) AssumeRoleWithWebIdentityWithContext(ctx aws.Context, input *AssumeRoleWithWebIdentityInput, opts ...request.Option) (*AssumeRoleWithWebIdentityOutput, error) {
+ req, out := c.AssumeRoleWithWebIdentityRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
@@ -617,8 +662,23 @@ func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessag
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) {
req, out := c.DecodeAuthorizationMessageRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// DecodeAuthorizationMessageWithContext is the same as DecodeAuthorizationMessage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DecodeAuthorizationMessage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) DecodeAuthorizationMessageWithContext(ctx aws.Context, input *DecodeAuthorizationMessageInput, opts ...request.Option) (*DecodeAuthorizationMessageOutput, error) {
+ req, out := c.DecodeAuthorizationMessageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetCallerIdentity = "GetCallerIdentity"
@@ -678,8 +738,23 @@ func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *requ
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) {
req, out := c.GetCallerIdentityRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetCallerIdentityWithContext is the same as GetCallerIdentity with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetCallerIdentity for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) GetCallerIdentityWithContext(ctx aws.Context, input *GetCallerIdentityInput, opts ...request.Option) (*GetCallerIdentityOutput, error) {
+ req, out := c.GetCallerIdentityRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetFederationToken = "GetFederationToken"
@@ -833,8 +908,23 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) {
req, out := c.GetFederationTokenRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetFederationTokenWithContext is the same as GetFederationToken with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetFederationToken for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) GetFederationTokenWithContext(ctx aws.Context, input *GetFederationTokenInput, opts ...request.Option) (*GetFederationTokenOutput, error) {
+ req, out := c.GetFederationTokenRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
const opGetSessionToken = "GetSessionToken"
@@ -947,8 +1037,23 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) {
req, out := c.GetSessionTokenRequest(input)
- err := req.Send()
- return out, err
+ return out, req.Send()
+}
+
+// GetSessionTokenWithContext is the same as GetSessionToken with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetSessionToken for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionTokenInput, opts ...request.Option) (*GetSessionTokenOutput, error) {
+ req, out := c.GetSessionTokenRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest
@@ -980,7 +1085,7 @@ type AssumeRoleInput struct {
//
// The regex used to validated this parameter is a string of characters consisting
// of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@:\/-
+ // also include underscores or any of the following characters: =,.@:/-
ExternalId *string `min:"2" type:"string"`
// An IAM policy in JSON format.
@@ -2164,9 +2269,9 @@ type GetSessionTokenInput struct {
// You can find the device for an IAM user by going to the AWS Management Console
// and viewing the user's security credentials.
//
- // The regex used to validate this parameter is a string of characters consisting
+ // The regex used to validated this parameter is a string of characters consisting
// of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
+ // also include underscores or any of the following characters: =,.@:/-
SerialNumber *string `min:"9" type:"string"`
// The value provided by the MFA device, if MFA is required. If any policy requires
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
new file mode 100644
index 000000000..d2af518cf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
@@ -0,0 +1,124 @@
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+
+// Package sts provides the client and types for making API
+// requests to AWS Security Token Service.
+//
+// The AWS Security Token Service (STS) is a web service that enables you to
+// request temporary, limited-privilege credentials for AWS Identity and Access
+// Management (IAM) users or for users that you authenticate (federated users).
+// This guide provides descriptions of the STS API. For more detailed information
+// about using this service, go to Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
+//
+// As an alternative to using the API, you can use one of the AWS SDKs, which
+// consist of libraries and sample code for various programming languages and
+// platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient
+// way to create programmatic access to STS. For example, the SDKs take care
+// of cryptographically signing requests, managing errors, and retrying requests
+// automatically. For information about the AWS SDKs, including how to download
+// and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/).
+//
+// For information about setting up signatures and authorization through the
+// API, go to Signing AWS API Requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html)
+// in the AWS General Reference. For general information about the Query API,
+// go to Making Query Requests (http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html)
+// in Using IAM. For information about using security tokens with other AWS
+// products, go to AWS Services That Work with IAM (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html)
+// in the IAM User Guide.
+//
+// If you're new to AWS and need additional technical information about a specific
+// AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/
+// (http://aws.amazon.com/documentation/).
+//
+// Endpoints
+//
+// The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com
+// that maps to the US East (N. Virginia) region. Additional regions are available
+// and are activated by default. For more information, see Activating and Deactivating
+// AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
+// in the IAM User Guide.
+//
+// For information about STS endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region)
+// in the AWS General Reference.
+//
+// Recording API requests
+//
+// STS supports AWS CloudTrail, which is a service that records AWS calls for
+// your AWS account and delivers log files to an Amazon S3 bucket. By using
+// information collected by CloudTrail, you can determine what requests were
+// successfully made to STS, who made the request, when it was made, and so
+// on. To learn more about CloudTrail, including how to turn it on and find
+// your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html).
+//
+// See https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 for more information on this service.
+//
+// See sts package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/
+//
+// Using the Client
+//
+// To use the client for AWS Security Token Service you will first need
+// to create a new instance of it.
+//
+// When creating a client for an AWS service you'll first need to have a Session
+// already created. The Session provides configuration that can be shared
+// between multiple service clients. Additional configuration can be applied to
+// the Session and service's client when they are constructed. The aws package's
+// Config type contains several fields such as Region for the AWS Region the
+// client should make API requests too. The optional Config value can be provided
+// as the variadic argument for Sessions and client creation.
+//
+// Once the service's client is created you can use it to make API requests the
+// AWS service. These clients are safe to use concurrently.
+//
+// // Create a session to share configuration, and load external configuration.
+// sess := session.Must(session.NewSession())
+//
+// // Create the service's client with the session.
+// svc := sts.New(sess)
+//
+// See the SDK's documentation for more information on how to use service clients.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// See aws package's Config type for more information on configuration options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// See the AWS Security Token Service client STS for more
+// information on creating the service's client.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New
+//
+// Once the client is created you can make an API request to the service.
+// Each API method takes a input parameter, and returns the service response
+// and an error.
+//
+// The API method will document which error codes the service can be returned
+// by the operation if the service models the API operation's errors. These
+// errors will also be available as const strings prefixed with "ErrCode".
+//
+// result, err := svc.AssumeRole(params)
+// if err != nil {
+// // Cast err to awserr.Error to handle specific error codes.
+// aerr, ok := err.(awserr.Error)
+// if ok && aerr.Code() == {
+// // Specific error code handling
+// }
+// return err
+// }
+//
+// fmt.Println("AssumeRole result:")
+// fmt.Println(result)
+//
+// Using the Client with Context
+//
+// The service's client also provides methods to make API requests with a Context
+// value. This allows you to control the timeout, and cancellation of pending
+// requests. These methods also take request Option as variadic parameter to apply
+// additional configuration to the API request.
+//
+// ctx := context.Background()
+//
+// result, err := svc.AssumeRoleWithContext(ctx, params)
+//
+// See the request package documentation for more information on using Context pattern
+// with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
+package sts
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
index dbcd66759..e24884ef3 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sts
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
index 9c4bfb838..1ee5839e0 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
@@ -1,4 +1,4 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sts
@@ -11,54 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/query"
)
-// The AWS Security Token Service (STS) is a web service that enables you to
-// request temporary, limited-privilege credentials for AWS Identity and Access
-// Management (IAM) users or for users that you authenticate (federated users).
-// This guide provides descriptions of the STS API. For more detailed information
-// about using this service, go to Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
+// STS provides the API operation methods for making requests to
+// AWS Security Token Service. See this package's package overview docs
+// for details on the service.
//
-// As an alternative to using the API, you can use one of the AWS SDKs, which
-// consist of libraries and sample code for various programming languages and
-// platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient
-// way to create programmatic access to STS. For example, the SDKs take care
-// of cryptographically signing requests, managing errors, and retrying requests
-// automatically. For information about the AWS SDKs, including how to download
-// and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/).
-//
-// For information about setting up signatures and authorization through the
-// API, go to Signing AWS API Requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html)
-// in the AWS General Reference. For general information about the Query API,
-// go to Making Query Requests (http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html)
-// in Using IAM. For information about using security tokens with other AWS
-// products, go to AWS Services That Work with IAM (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html)
-// in the IAM User Guide.
-//
-// If you're new to AWS and need additional technical information about a specific
-// AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/
-// (http://aws.amazon.com/documentation/).
-//
-// Endpoints
-//
-// The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com
-// that maps to the US East (N. Virginia) region. Additional regions are available
-// and are activated by default. For more information, see Activating and Deactivating
-// AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// For information about STS endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region)
-// in the AWS General Reference.
-//
-// Recording API requests
-//
-// STS supports AWS CloudTrail, which is a service that records AWS calls for
-// your AWS account and delivers log files to an Amazon S3 bucket. By using
-// information collected by CloudTrail, you can determine what requests were
-// successfully made to STS, who made the request, when it was made, and so
-// on. To learn more about CloudTrail, including how to turn it on and find
-// your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html).
-// The service client's operations are safe to be used concurrently.
-// It is not safe to mutate any of the client's properties though.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15
+// STS methods are safe to use concurrently. It is not safe to
+// modify mutate any of the struct's properties though.
type STS struct {
*client.Client
}
diff --git a/vendor/vendor.json b/vendor/vendor.json
index e1719e3e4..5a598c3c5 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -146,233 +146,313 @@
"revision": "4239b77079c7b5d1243b7b4736304ce8ddb6f0f2"
},
{
- "checksumSHA1": "ZjwjHipLn1qcBhMcS7iakI6xnwA=",
+ "checksumSHA1": "iaZ47V/I1vENvGiQOJa3tnl3KvI=",
"path": "github.com/aws/aws-sdk-go",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "D7lKOBHog4Y/ETUWhgmTCcNyzHc=",
+ "checksumSHA1": "U/rOAHRye5xCbfe0DfXPFHrIXHs=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/awserr",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/awsutil",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "iThCyNRL/oQFD9CF2SYgBGl+aww=",
+ "checksumSHA1": "n98FANpNeRT5kf6pizdpI7nm6Sw=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/client",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/client/metadata",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "Fl8vRSCY0MbM04cmiz/0MID+goA=",
+ "checksumSHA1": "7/8j/q0TWtOgXyvEcv4B2Dhl00o=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/corehandlers",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "zu5C95rmCZff6NYZb62lEaT5ibE=",
+ "checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "6cj/zsRmcxkE1TLS+v910GbQYg0=",
+ "checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "lqh3fG7wCochvB4iHAZJuhhEJW0=",
+ "checksumSHA1": "ZdtYh3ZHSgP/WEIaqwJHTEhpkbs=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/defaults",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "/EXbk/z2TWjWc1Hvb4QYs3Wmhb8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/ec2metadata",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "JTrzEDPXL3pUUH+dMCixz9T9rLY=",
+ "checksumSHA1": "vUT1+nhQHFsMQ9AQtF+3jbEOmjM=",
"path": "github.com/aws/aws-sdk-go/aws/endpoints",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "M78rTxU55Qagqr3MYj91im2031E=",
+ "checksumSHA1": "P6f+a0npro0KI5CESeKTWhRtBuE=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/request",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "u6tKvFGcRQ1xtby1ONjgyUTgcpg=",
+ "checksumSHA1": "Y20DEtMtbfE9qTtmoi2NYV1x7aA=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/session",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "0FvPLvkBUpTElfUc/FZtPsJfuV0=",
+ "checksumSHA1": "M11PbBLBimxBByeaakhFkhp7t7s=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/signer/v4",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
+ },
+ {
+ "checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=",
+ "path": "github.com/aws/aws-sdk-go/internal/shareddefaults",
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
+ },
+ {
+ "path": "github.com/aws/aws-sdk-go/private/endpoints",
+ "revision": "v1.10.14",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "wk7EyvDaHwb5qqoOP/4d3cV0708=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "1QmQ3FqV37w0Zi44qv8pA1GeR0A=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "O6hcK24yI6w7FA+g4Pbr+eQ7pys=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "ZqY5RWavBLWTo6j9xqdyBEaNFRk=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/query",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "hqTEmgtchF9SwVTW0IQId2eLUKM=",
+ "checksumSHA1": "Drt1JfLMa0DQEZLWrnMlTWaIcC8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "szZSLm3BlYkL3vqlZhNAlYk8iwM=",
+ "checksumSHA1": "VCTh+dEaqqhog5ncy/WTt9+/gFM=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/restxml",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "lZ1z4xAbT8euCzKoAsnEYic60VE=",
+ "checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "Eo9yODN5U99BK0pMzoqnBm7PCrY=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/waiter",
"revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revisionTime": "2017-02-24T22:28:38Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "ecCVL8+SptmQlojrGtL8mQdaJ6E=",
+ "checksumSHA1": "rvrD573aOLM1/jTHHqjbA/w/Kc8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/ec2",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "B6qHy1+Rrp9lQCBR/JDRT72kuCI=",
+ "checksumSHA1": "Lwqoi9aWc+j6dzkgt06LLR7i1XA=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/ecr",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "eEWM4wKzVbRqAwIy3MdMCDUGs2s=",
+ "checksumSHA1": "2ow2XQ9RCOgOwyJKHt7bibwWv8M=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "B3FgQ8T7ewtG+q0uLnofdFfp/TE=",
+ "checksumSHA1": "4b8bqkOCj9omK0Pm0UXVLGg+yRQ=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3/s3iface",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "Tr7Q8zpGveIlcort1+Og9hhG+hk=",
+ "checksumSHA1": "LlIpD3fzngPXshFh/5tuCWlrYzI=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3/s3manager",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
- "checksumSHA1": "Knj17ZMPWkGYTm2hZxEgnuboMM4=",
+ "checksumSHA1": "VH5y62f+SDyEIqnTibiPtQ687i8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/sts",
- "revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
- "revisionTime": "2017-02-24T22:28:38Z"
+ "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
+ "revisionTime": "2017-07-20T23:32:15Z",
+ "version": "v1.10.14",
+ "versionExact": "v1.10.14"
},
{
"checksumSHA1": "7SbTaY0kaYxgQrG3/9cjrI+BcyU=",
From 60cbd49536d15fc0596dc3f02985ae41b3b703fc Mon Sep 17 00:00:00 2001
From: cstuntz
Date: Mon, 31 Jul 2017 11:47:56 -0700
Subject: [PATCH 047/122] updating govendor imports
---
.../aws/aws-sdk-go/private/waiter/waiter.go | 134 ++++++++++++++++++
vendor/vendor.json | 6 -
2 files changed, 134 insertions(+), 6 deletions(-)
create mode 100644 vendor/github.com/aws/aws-sdk-go/private/waiter/waiter.go
diff --git a/vendor/github.com/aws/aws-sdk-go/private/waiter/waiter.go b/vendor/github.com/aws/aws-sdk-go/private/waiter/waiter.go
new file mode 100644
index 000000000..b51e9449c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/private/waiter/waiter.go
@@ -0,0 +1,134 @@
+package waiter
+
+import (
+ "fmt"
+ "reflect"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/awsutil"
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+// A Config provides a collection of configuration values to setup a generated
+// waiter code with.
+type Config struct {
+ Name string
+ Delay int
+ MaxAttempts int
+ Operation string
+ Acceptors []WaitAcceptor
+}
+
+// A WaitAcceptor provides the information needed to wait for an API operation
+// to complete.
+type WaitAcceptor struct {
+ Expected interface{}
+ Matcher string
+ State string
+ Argument string
+}
+
+// A Waiter provides waiting for an operation to complete.
+type Waiter struct {
+ Config
+ Client interface{}
+ Input interface{}
+}
+
+// Wait waits for an operation to complete, expire max attempts, or fail. Error
+// is returned if the operation fails.
+func (w *Waiter) Wait() error {
+ client := reflect.ValueOf(w.Client)
+ in := reflect.ValueOf(w.Input)
+ method := client.MethodByName(w.Config.Operation + "Request")
+
+ for i := 0; i < w.MaxAttempts; i++ {
+ res := method.Call([]reflect.Value{in})
+ req := res[0].Interface().(*request.Request)
+ req.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Waiter"))
+
+ err := req.Send()
+ for _, a := range w.Acceptors {
+ result := false
+ var vals []interface{}
+ switch a.Matcher {
+ case "pathAll", "path":
+ // Require all matches to be equal for result to match
+ vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
+ if len(vals) == 0 {
+ break
+ }
+ result = true
+ for _, val := range vals {
+ if !awsutil.DeepEqual(val, a.Expected) {
+ result = false
+ break
+ }
+ }
+ case "pathAny":
+ // Only a single match needs to equal for the result to match
+ vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
+ for _, val := range vals {
+ if awsutil.DeepEqual(val, a.Expected) {
+ result = true
+ break
+ }
+ }
+ case "status":
+ s := a.Expected.(int)
+ result = s == req.HTTPResponse.StatusCode
+ case "error":
+ if aerr, ok := err.(awserr.Error); ok {
+ result = aerr.Code() == a.Expected.(string)
+ }
+ case "pathList":
+ // ignored matcher
+ default:
+ logf(client, "WARNING: Waiter for %s encountered unexpected matcher: %s",
+ w.Config.Operation, a.Matcher)
+ }
+
+ if !result {
+ // If there was no matching result found there is nothing more to do
+ // for this response, retry the request.
+ continue
+ }
+
+ switch a.State {
+ case "success":
+ // waiter completed
+ return nil
+ case "failure":
+ // Waiter failure state triggered
+ return awserr.New("ResourceNotReady",
+ fmt.Sprintf("failed waiting for successful resource state"), err)
+ case "retry":
+ // clear the error and retry the operation
+ err = nil
+ default:
+ logf(client, "WARNING: Waiter for %s encountered unexpected state: %s",
+ w.Config.Operation, a.State)
+ }
+ }
+ if err != nil {
+ return err
+ }
+
+ time.Sleep(time.Second * time.Duration(w.Delay))
+ }
+
+ return awserr.New("ResourceNotReady",
+ fmt.Sprintf("exceeded %d wait attempts", w.MaxAttempts), nil)
+}
+
+func logf(client reflect.Value, msg string, args ...interface{}) {
+ cfgVal := client.FieldByName("Config")
+ if !cfgVal.IsValid() {
+ return
+ }
+ if cfg, ok := cfgVal.Interface().(*aws.Config); ok && cfg.Logger != nil {
+ cfg.Logger.Log(fmt.Sprintf(msg, args...))
+ }
+}
diff --git a/vendor/vendor.json b/vendor/vendor.json
index 5a598c3c5..f44e0645c 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -304,12 +304,6 @@
"version": "v1.10.14",
"versionExact": "v1.10.14"
},
- {
- "path": "github.com/aws/aws-sdk-go/private/endpoints",
- "revision": "v1.10.14",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
- },
{
"checksumSHA1": "wk7EyvDaHwb5qqoOP/4d3cV0708=",
"comment": "v1.7.1",
From 4c52ee969723bb088e405e5ff60cad0d968201da Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Mon, 31 Jul 2017 14:43:02 -0700
Subject: [PATCH 048/122] update changelog
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b1508c8f..af789f820 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
[GH-5172]
* core: Strip query parameters from ISO URLs when checking against a checksum
file. [GH-5181]
+* contrib: add json files to zsh completion. [GH-5195]
## 1.0.3 (July 17, 2017)
From 24c4029bb158bf64f713e43c0f6bd5c9d5bbb7ef Mon Sep 17 00:00:00 2001
From: Justin Campbell
Date: Tue, 1 Aug 2017 09:08:14 -0400
Subject: [PATCH 049/122] Remove date from atlas post-processor warning
---
post-processor/atlas/post-processor.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/post-processor/atlas/post-processor.go b/post-processor/atlas/post-processor.go
index d37af7c97..9b06e61ec 100644
--- a/post-processor/atlas/post-processor.go
+++ b/post-processor/atlas/post-processor.go
@@ -144,7 +144,7 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error) {
// todo: remove/reword after the migration
if p.config.Type == "vagrant.box" {
- return nil, false, fmt.Errorf("As of June 27th, Vagrant-related functionality has been removed from Terraform\n" +
+ return nil, false, fmt.Errorf("Vagrant-related functionality has been removed from Terraform\n" +
"Enterprise into its own product, Vagrant Cloud. For more information see\n" +
"https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" +
"Please replace the Atlas post-processor with the Vagrant Cloud post-processor,\n" +
From 40b792746a0316d81fb63bffd4437e8b73c634b3 Mon Sep 17 00:00:00 2001
From: Bengt Brodersen
Date: Wed, 2 Aug 2017 09:18:38 +0200
Subject: [PATCH 050/122] Improve Completion through better option and file
completion
---
contrib/zsh-completion/_packer | 112 ++++++++++++++++-----------------
1 file changed, 54 insertions(+), 58 deletions(-)
diff --git a/contrib/zsh-completion/_packer b/contrib/zsh-completion/_packer
index fa3797ab0..66f5a8614 100644
--- a/contrib/zsh-completion/_packer
+++ b/contrib/zsh-completion/_packer
@@ -1,70 +1,66 @@
-#compdef packer
-
-local -a _packer_cmds
-_packer_cmds=(
+_packer () {
+ local -a sub_commands && sub_commands=(
'build:Build image(s) from template'
'fix:Fixes templates from old versions of packer'
'inspect:See components of a template'
'push:Push template files to a Packer build service'
'validate:Check that a template is valid'
'version:Prints the Packer version'
-)
+ )
-__build() {
- _arguments \
- '-debug[Debug mode enabled for builds]' \
- '-force[Force a build to continue if artifacts exist, deletes existing artifacts]' \
- '-machine-readable[Machine-readable output]' \
- '-except=[(foo,bar,baz) Build all builds other than these]' \
- '-only=[(foo,bar,baz) Only build the given builds by name]' \
- '-parallel=[(false) Disable parallelization (on by default)]' \
- '-var[("key=value") Variable for templates, can be used multiple times.]' \
+ local -a build_arguments && build_arguments=(
+ '-debug[Debug mode enabled for builds]'
+ '-force[Force a build to continue if artifacts exist, deletes existing artifacts]'
+ '-machine-readable[Machine-readable output]'
+ '-except=[(foo,bar,baz) Build all builds other than these]'
+ '-only=[(foo,bar,baz) Only build the given builds by name]'
+ '-parallel=[(false) Disable parallelization (on by default)]'
+ '-var[("key=value") Variable for templates, can be used multiple times.]'
'-var-file=[(path) JSON file containing user variables.]'
- _files -g "*.json"
-}
-
-
-__inspect() {
- _arguments \
+ '(-)*:files:_files -g "*.json"'
+ )
+
+ local -a inspect_arguments && inspect_arguments=(
'-machine-readable[Machine-readable output]'
- _files -g "*.json"
-}
+ '(-)*:files:_files -g "*.json"'
+ )
-__push() {
- _arguments \
- '-name=[() The destination build in Atlas.]' \
- '-token=[() Access token to use to upload.]' \
- '-var[("key=value") Variable for templates, can be used multiple times.]' \
+ local -a push_arguments && push_arguments=(
+ '-name=[() The destination build in Atlas.]'
+ '-token=[() Access token to use to upload.]'
+ '-var[("key=value") Variable for templates, can be used multiple times.]'
+ '-var-file=[(path) JSON file containing user variables.]'
+ '(-)*:files:_files -g "*.json"'
+ )
+
+ local -a validate_arguments && validate_arguments=(
+ '-syntax-only[Only check syntax. Do not verify config of the template.]'
+ '-except=[(foo,bar,baz) Validate all builds other than these]'
+ '-only=[(foo,bar,baz) Validate only these builds]'
+ '-var[("key=value") Variable for templates, can be used multiple times.]'
'-var-file=[(path) JSON file containing user variables.]'
- _files -g "*.json"
+ '(-)*:files:_files -g "*.json"'
+ )
+
+ _arguments -C \
+ ':command:->command' \
+ '*::options:->options'
+
+ case $state in
+ command)
+ _describe -t commands 'command' sub_commands ;;
+ options)
+ case $line[1] in
+ build)
+ _arguments -s -S : $build_arguments ;;
+ inspect)
+ _arguments -s -S : $inspect_arguments ;;
+ push)
+ _arguments -s -S : $push_arguments ;;
+ validate)
+ _arguments -s -S : $validate_arguments ;;
+ esac
+ ;;
+ esac
}
-
-__validate() {
- _arguments \
- '-syntax-only[Only check syntax. Do not verify config of the template.]' \
- '-except=[(foo,bar,baz) Validate all builds other than these]' \
- '-only=[(foo,bar,baz) Validate only these builds]' \
- '-var[("key=value") Variable for templates, can be used multiple times.]' \
- '-var-file=[(path) JSON file containing user variables.]'
- _files -g "*.json"
-}
-
-
-_arguments '*:: :->command'
-
-if (( CURRENT == 1 )); then
- _describe -t commands "packer command" _packer_cmds
- return
-fi
-
-local -a _command_args
-case "$words[1]" in
- build)
- __build ;;
- inspect)
- __inspect ;;
- push)
- __push ;;
- validate)
- __validate ;;
-esac
+_packer "$@"
From c717765154d0abced1f988d40f133d42ed57c2af Mon Sep 17 00:00:00 2001
From: cstuntz
Date: Wed, 2 Aug 2017 09:29:47 -0700
Subject: [PATCH 051/122] Removing tagging post instance launch
---
.../amazon/common/step_run_source_instance.go | 30 ++-----------------
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go
index 2e024e40c..12de73adb 100644
--- a/builder/amazon/common/step_run_source_instance.go
+++ b/builder/amazon/common/step_run_source_instance.go
@@ -9,10 +9,8 @@ import (
"time"
"github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/ec2"
- retry "github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/packer"
"github.com/hashicorp/packer/template/interpolate"
"github.com/mitchellh/multistep"
@@ -143,6 +141,8 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
return multistep.ActionHalt
}
+ ReportTags(ui, ec2Tags)
+
if spotPrice == "" || spotPrice == "0" {
var runTag ec2.TagSpecification
@@ -298,32 +298,6 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
s.Tags["Name"] = "Packer Builder"
}
- ReportTags(ui, ec2Tags)
-
- // Retry creating tags for about 2.5 minutes
- err = retry.Retry(0.2, 30, 11, func(_ uint) (bool, error) {
- _, err := ec2conn.CreateTags(&ec2.CreateTagsInput{
- Tags: ec2Tags,
- Resources: []*string{instance.InstanceId},
- })
- if err == nil {
- return true, nil
- }
- if awsErr, ok := err.(awserr.Error); ok {
- if awsErr.Code() == "InvalidInstanceID.NotFound" {
- return false, nil
- }
- }
- return true, err
- })
-
- if err != nil {
- err := fmt.Errorf("Error tagging source instance: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
-
if s.Debug {
if instance.PublicDnsName != nil && *instance.PublicDnsName != "" {
ui.Message(fmt.Sprintf("Public DNS: %s", *instance.PublicDnsName))
From 3d0ab090b0a698caaa3846f5e78e8a7daf12f25d Mon Sep 17 00:00:00 2001
From: Seth Vargo
Date: Wed, 2 Aug 2017 14:12:01 -0400
Subject: [PATCH 052/122] Remove people from community section
This is going to be replaced with dynamic content from our CMS in the
future, but we agreed to remove it in the interim.
---
website/source/community.html.erb | 93 -------------------------------
1 file changed, 93 deletions(-)
diff --git a/website/source/community.html.erb b/website/source/community.html.erb
index 0dd8a7c0c..ca4200f9b 100644
--- a/website/source/community.html.erb
+++ b/website/source/community.html.erb
@@ -32,96 +32,3 @@ description: |-
Paid HashiCorp training courses
are also available in a city near you. Private training courses are also available.
-People
-
- The following people are some of the faces behind Packer. They each
- contribute to Packer in some core way. Over time, faces may appear and
- disappear from this list as contributors come and go. In addition to
- the faces below, Packer is a project by
- HashiCorp, so many HashiCorp
- employees actively contribute to Packer.
-
-
-
-
-
-
Mitchell Hashimoto (@mitchellh)
-
- Mitchell Hashimoto is the creator of Packer. He developed the
- core of Packer as well as the Amazon, VirtualBox, and VMware
- builders. In addition to Packer, Mitchell is the creator of
- Vagrant. He is self
- described as "automation obsessed."
-
-
-
-
-
-
-
-
- Jack Pearkes created and maintains the DigitalOcean builder
- for Packer. Outside of Packer, Jack is an avid open source
- contributor and software consultant.
-
-
-
-
-
-
-
-
-
-
-
Ross Smith II (@rasa)
-
- Ross Smith maintains our
- VMware builder on Windows, and provides other valuable assistance. Ross is an
- open source enthusiast, published author, and freelance consultant.
-
-
-
-
-
-
-
-
- Rickard von Essen maintains our Parallels Desktop builder. Rickard is an
- polyglot programmer and consults on Continuous Delivery.
-
-
-
-
-
-
-
-
Matt maintains Packer for HashiCorp. After
- picking up Chef for a job, he decided that continually provisioning the
- same machine was bound for trouble. Luckily Packer had just been created,
- and was the answer to his prayers. Now he works on it professionally, and
- couldn't be happier.
-
-
-
-
-
-
-
-
Megan maintains Packer for HashiCorp; in her past life she used Packer and Vagrant in her work as a cloud infrastructure developer.
-
-
-
-
-
-
From c0e32695ca65908cf5d160232d91eef5453c84f7 Mon Sep 17 00:00:00 2001
From: Seth Vargo
Date: Wed, 2 Aug 2017 14:25:13 -0400
Subject: [PATCH 053/122] Update deploy process
---
website/packer.json | 11 +-
website/redirects.txt | 55 +
website/scripts/deploy.sh | 83 +-
website/wgetlog | 2782 -------------------------------------
4 files changed, 138 insertions(+), 2793 deletions(-)
create mode 100644 website/redirects.txt
delete mode 100644 website/wgetlog
diff --git a/website/packer.json b/website/packer.json
index 72b288ed0..fd2618f17 100644
--- a/website/packer.json
+++ b/website/packer.json
@@ -10,15 +10,12 @@
"type": "docker",
"image": "hashicorp/middleman-hashicorp:0.3.28",
"discard": "true",
- "run_command": ["-d", "-i", "-t", "{{ .Image }}", "/bin/sh"]
+ "volumes": {
+ "{{ pwd }}": "/website"
+ }
}
],
"provisioners": [
- {
- "type": "file",
- "source": ".",
- "destination": "/website"
- },
{
"type": "shell",
"environment_vars": [
@@ -30,7 +27,7 @@
"inline": [
"bundle check || bundle install",
"bundle exec middleman build",
- "/bin/sh ./scripts/deploy.sh"
+ "/bin/bash ./scripts/deploy.sh"
]
}
]
diff --git a/website/redirects.txt b/website/redirects.txt
new file mode 100644
index 000000000..62475c71c
--- /dev/null
+++ b/website/redirects.txt
@@ -0,0 +1,55 @@
+#
+# REDIRECTS FILE
+#
+# This is a sample redirect file. Redirects allow individual projects to add
+# their own redirect rules in a declarative manner using Fastly edge
+# dictionaries.
+#
+# FORMAT
+#
+# Redirects are in the format. There must be at least one space between the
+# original path and the new path, and there must be exactly two entries per
+# line.
+#
+# /original-path /new-path
+#
+# GLOB MATCHING
+#
+# Because of the way lookup tables work, there is no support for glob matching.
+# Fastly does not provide a way to iterate through the lookup table, so it is
+# not possible to run through the table and find anything that matches. As such
+# URLs must match directly.
+#
+# More complex redirects are possible, but must be added directly to the
+# configuration. Please contact the release engineering team for assistance.
+#
+# DELETING
+#
+# Deleting items is not supported at this time. To delete an item, contact the
+# release engineering team and they will delete the dictionary item.
+#
+# MISC
+#
+# - Blank lines are ignored
+# - Comments are hash-style
+# - URLs are limited to 256 characters
+# - Items are case-sensitive (please use all lowercase)
+#
+
+/docs/installation.html /docs/install/index.html
+/docs/command-line/machine-readable.html /docs/commands/index.html
+/docs/command-line/introduction.html /docs/commands/index.html
+/docs/templates/introduction.html /docs/templates/index.html
+/docs/builders/azure-arm.html /docs/builders/azure.html
+/docs/templates/veewee-to-packer.html /guides/veewee-to-packer.html
+/docs/extend/developing-plugins.html /docs/extending/plugins.html
+/docs/extending/developing-plugins.html /docs/extending/plugins.html
+/docs/extend/builder.html /docs/extending/custom-builders.html
+/docs/getting-started/setup.html /docs/getting-started/install.html
+/docs/other/community.html /downloads-community.html
+/community /community.html
+/community/index.html /community.html
+/docs/other/environmental-variables.html /docs/other/environment-variables.html
+/docs/platforms.html /docs/builders/index.html
+/intro/platforms.html /docs/builders/index.html
+/docs/templates/configuration-templates.html /docs/templates/engine.html
diff --git a/website/scripts/deploy.sh b/website/scripts/deploy.sh
index 96856842a..c3592e155 100755
--- a/website/scripts/deploy.sh
+++ b/website/scripts/deploy.sh
@@ -1,9 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
PROJECT="packer"
PROJECT_URL="www.packer.io"
FASTLY_SERVICE_ID="7GrxRJP3PVBuqQbyxYQ0MV"
+FASTLY_DICTIONARY_ID="7CE9Ko06dSFrv8XqDgMZvo"
# Ensure the proper AWS environment variables are set
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
@@ -93,7 +94,76 @@ if [ -z "$NO_UPLOAD" ]; then
modify "s3://hc-sites/$PROJECT/latest/"
fi
-# Perform a soft-purge of the surrogate key.
+# Add redirects if they exist
+if [ -z "$NO_REDIRECTS" ] || [ ! test -f "./redirects.txt" ]; then
+ echo "Adding redirects..."
+ fields=()
+ while read -r line; do
+ [[ "$line" =~ ^#.* ]] && continue
+ [[ -z "$line" ]] && continue
+
+ # Read fields
+ IFS=" " read -ra parts <<<"$line"
+ fields+=("${parts[@]}")
+ done < "./redirects.txt"
+
+ # Check we have pairs
+ if [ $((${#fields[@]} % 2)) -ne 0 ]; then
+ echo "Bad redirects (not an even number)!"
+ exit 1
+ fi
+
+ # Check we don't have more than 1000 entries (yes, it says 2000 below, but that
+ # is because we've split into multiple lines).
+ if [ "${#fields}" -gt 2000 ]; then
+ echo "More than 1000 entries!"
+ exit 1
+ fi
+
+ # Validations
+ for field in "${fields[@]}"; do
+ if [ "${#field}" -gt 256 ]; then
+ echo "'$field' is > 256 characters!"
+ exit 1
+ fi
+
+ if [ "${field:0:1}" != "/" ]; then
+ echo "'$field' does not start with /!"
+ exit 1
+ fi
+ done
+
+ # Build the payload for single-request updates.
+ jq_args=()
+ jq_query="."
+ for (( i=0; i<${#fields[@]}; i+=2 )); do
+ original="${fields[i]}"
+ redirect="${fields[i+1]}"
+ echo "Redirecting ${original} -> ${redirect}"
+ jq_args+=(--arg "key$((i/2))" "${original}")
+ jq_args+=(--arg "value$((i/2))" "${redirect}")
+ jq_query+="| .items |= (. + [{op: \"upsert\", item_key: \$key$((i/2)), item_value: \$value$((i/2))}])"
+ done
+
+ # Do not post empty items (the API gets sad)
+ if [ "${#jq_args[@]}" -ne 0 ]; then
+ json="$(jq "${jq_args[@]}" "${jq_query}" <<<'{"items": []}')"
+
+ # Post the JSON body
+ curl \
+ --fail \
+ --silent \
+ --output /dev/null \
+ --request "PATCH" \
+ --header "Fastly-Key: $FASTLY_API_KEY" \
+ --header "Content-type: application/json" \
+ --header "Accept: application/json" \
+ --data "$json"\
+ "https://api.fastly.com/service/$FASTLY_SERVICE_ID/dictionary/$FASTLY_DICTIONARY_ID/items"
+ fi
+fi
+
+# Perform a purge of the surrogate key.
if [ -z "$NO_PURGE" ]; then
echo "Purging Fastly cache..."
curl \
@@ -118,8 +188,13 @@ if [ -z "$NO_WARM" ]; then
echo "wget --recursive --delete-after https://$PROJECT_URL/"
echo ""
wget \
- --recursive \
--delete-after \
- --quiet \
+ --level inf \
+ --no-directories \
+ --no-host-directories \
+ --no-verbose \
+ --page-requisites \
+ --recursive \
+ --spider \
"https://$PROJECT_URL/"
fi
diff --git a/website/wgetlog b/website/wgetlog
deleted file mode 100644
index 85b1cd6a2..000000000
--- a/website/wgetlog
+++ /dev/null
@@ -1,2782 +0,0 @@
---2016-12-15 14:14:48-- https://www.packer.io/
---2016-12-15 14:14:48-- https://www.packer.io/
-Resolving www.packer.io... Resolving www.packer.io... 151.101.53.176
-Connecting to www.packer.io|151.101.53.176|:443... 151.101.53.176
-Connecting to www.packer.io|151.101.53.176|:443... connected.
-connected.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 17742Length: 17742 (17K) [text/html]
- (17K) [text/html]
-Saving to: ‘www.packer.io/index.html’
-Saving to: ‘www.packer.io/index.html’
-
- 0K ..
- 0K .................. .. .......... .. 100%100% 485K=0.04s 485K=0.04s
-
-
-
-2016-12-15 14:14:49 (485 KB/s) - ‘www.packer.io/index.html’ saved [17742/17742]
-
-2016-12-15 14:14:49 (485 KB/s) - ‘www.packer.io/index.html’ saved [17742/17742]
-
-Loading robots.txt; please ignore errors.
-Loading robots.txt; please ignore errors.
---2016-12-15 14:14:49-- https://www.packer.io/robots.txt
---2016-12-15 14:14:49-- https://www.packer.io/robots.txt
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 44 [text/plain]
-Length: 44 [text/plain]
-Saving to: ‘www.packer.io/robots.txt’
-Saving to: ‘www.packer.io/robots.txt’
-
- 0K
- 0K 100% 3.50M=0s
-
- 100% 3.50M=0s
-
-2016-12-15 14:14:49 (3.50 MB/s) - ‘www.packer.io/robots.txt’ saved [44/44]
-
-2016-12-15 14:14:49 (3.50 MB/s) - ‘www.packer.io/robots.txt’ saved [44/44]
-
---2016-12-15 14:14:49-- https://www.packer.io/assets/stylesheets/application-c75a3c69.css
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:49-- https://www.packer.io/assets/stylesheets/application-c75a3c69.css
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 147521Length: 147521 (144K) (144K) [text/css]
- [text/css]
-Saving to: ‘www.packer.io/assets/stylesheets/application-c75a3c69.css’
-Saving to: ‘www.packer.io/assets/stylesheets/application-c75a3c69.css’
-
- 0K ..
- 0K .................. .. .................. ... ............... ... .................. ........ ............. 34% 965K 0s
- 50K . 34% 965K 0s
- 50K ................... ... .......... ........ .................. ... ............... ... ............... 69% 1.55M..... 69% 1.55M 0s
- 100K ... 0s
- 100K .......... ........ .................. .. ................ ........ ............ ..... ..... 100% 1.52M=0.1s
-
-. 100% 1.52M=0.1s
-
-2016-12-15 14:14:49 (1.26 MB/s) - ‘www.packer.io/assets/stylesheets/application-c75a3c69.css’ saved [147521/147521]
-
-2016-12-15 14:14:49 (1.26 MB/s) - ‘www.packer.io/assets/stylesheets/application-c75a3c69.css’ saved [147521/147521]
-
---2016-12-15 14:14:49-- https://www.packer.io/favicon.ico
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:49-- https://www.packer.io/favicon.ico
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 3285 (3.2K)Length: 3285 (3.2K) [image/vnd.microsoft.icon]
- [image/vnd.microsoft.icon]
-Saving to: ‘www.packer.io/favicon.ico’
-
- 0K ... 100% 20.6M=0s
-
-Saving to: ‘www.packer.io/favicon.ico’
-
- 0K ... 100% 20.6M=0s
-
-2016-12-15 14:14:49 (20.6 MB/s) - ‘www.packer.io/favicon.ico’ saved [3285/3285]
-
---2016-12-15 14:14:49-- https://www.packer.io/intro
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... 2016-12-15 14:14:49 (20.6 MB/s) - ‘www.packer.io/favicon.ico’ saved [3285/3285]
-
---2016-12-15 14:14:49-- https://www.packer.io/intro
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... 302 Moved Temporarily
-Location: /intro/ [following]
-302 Moved Temporarily
-Location: /intro/ [following]
---2016-12-15 14:14:49-- https://www.packer.io/intro/
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:49-- https://www.packer.io/intro/
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 18724 (18K) [text/html]
-Length: 18724 (18K) [text/html]
-Saving to: ‘www.packer.io/intro.1’
-Saving to: ‘www.packer.io/intro.1’
-
- 0K ..
- 0K .................. .. .............. 100% 100% 19.3M 19.3M=0.001s
-
-=0.001s
-
-2016-12-15 14:14:50 (19.3 MB/s) - ‘www.packer.io/intro.1’ saved [18724/18724]
-
-2016-12-15 14:14:50 (19.3 MB/s) - ‘www.packer.io/intro.1’ saved [18724/18724]
-
---2016-12-15 14:14:50-- https://www.packer.io/docs
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:50-- https://www.packer.io/docs
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 302 Moved Temporarily
-302 Moved Temporarily
-Location: /docs/ [following]
-Location: /docs/ [following]
---2016-12-15 14:14:50-- https://www.packer.io/docs/
---2016-12-15 14:14:50-- https://www.packer.io/docs/
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22068Length: 22068 (22K) [text/html]
- (22K) [text/html]
-Saving to: ‘www.packer.io/docs.1’
-Saving to: ‘www.packer.io/docs.1’
-
- 0K ..
- 0K .................. .. .................. . . 100%100% 570K=0.04s 570K=0.04s
-
-
-
-2016-12-15 14:14:50 (570 KB/s) - ‘www.packer.io/docs.1’ saved [22068/22068]
-
-2016-12-15 14:14:50 (570 KB/s) - ‘www.packer.io/docs.1’ saved [22068/22068]
-
---2016-12-15 14:14:50-- https://www.packer.io/community
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:50-- https://www.packer.io/community
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 302 Moved Temporarily
-302 Moved Temporarily
-Location: /community/ [following]
-Location: /community/ [following]
---2016-12-15 14:14:51-- https://www.packer.io/community/
---2016-12-15 14:14:51-- https://www.packer.io/community/
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 19293 (19K) [text/html]
-19293 (19K) [text/html]
-Saving to: ‘www.packer.io/community’
-Saving to: ‘www.packer.io/community’
-
- 0K ..
- 0K .................. .. .............. 100%100% 1.60M=0.01s
-
- 1.60M=0.01s
-
-2016-12-15 14:14:51 (1.60 MB/s) - ‘www.packer.io/community’ saved [19293/19293]
-
-2016-12-15 14:14:51 (1.60 MB/s) - ‘www.packer.io/community’ saved [19293/19293]
-
---2016-12-15 14:14:51-- https://www.packer.io/downloads.html
---2016-12-15 14:14:51-- https://www.packer.io/downloads.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 20967 (20K) [text/html]
-Length: 20967 (20K) [text/html]
-Saving to: ‘www.packer.io/downloads.html’
-Saving to: ‘www.packer.io/downloads.html’
-
- 0K ..
- 0K .................. .. ................ .. 100%100% 55.2M=0s
-
- 55.2M=0s
-
-2016-12-15 14:14:51 (55.2 MB/s) - ‘www.packer.io/downloads.html’ saved [20967/20967]
-
-2016-12-15 14:14:51 (55.2 MB/s) - ‘www.packer.io/downloads.html’ saved [20967/20967]
-
---2016-12-15 14:14:51-- https://www.packer.io/assets/images/logo-header@2x-fa646202.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:51-- https://www.packer.io/assets/images/logo-header@2x-fa646202.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 1714 (1.7K) [image/png]
-Length: 1714 (1.7K) [image/png]
-Saving to: ‘www.packer.io/assets/images/logo-header@2x-fa646202.png’
-Saving to: ‘www.packer.io/assets/images/logo-header@2x-fa646202.png’
-
- 0K .
- 0K . 100% 109M100% 109M=0s
-
-=0s
-
-2016-12-15 14:14:51 (109 MB/s) - ‘www.packer.io/assets/images/logo-header@2x-fa646202.png’ saved [1714/1714]
-
-2016-12-15 14:14:51 (109 MB/s) - ‘www.packer.io/assets/images/logo-header@2x-fa646202.png’ saved [1714/1714]
-
---2016-12-15 14:14:51-- https://www.packer.io/assets/images/screenshots/vmware_and_virtualbox-7c37c65e.png
---2016-12-15 14:14:51-- https://www.packer.io/assets/images/screenshots/vmware_and_virtualbox-7c37c65e.png
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 158767 (155K) [image/png]
-Length: 158767 (155K) [image/png]
-Saving to: ‘www.packer.io/assets/images/screenshots/vmware_and_virtualbox-7c37c65e.png’
-Saving to: ‘www.packer.io/assets/images/screenshots/vmware_and_virtualbox-7c37c65e.png’
-
- 0K ..
- 0K .................. .. .................. ... ............... ... .................. ........ .......... 32% 779K 0s
- 50K ........ 32% 779K 0s
- 50K .......... ........ .......... ........ .................. ........ .......... ........ ............... 64% 64% 1.73M 1.73M 0s
- 100K . 0s
- 100K ............ ........ .................. ........ .......... ........ .......... ........ .......... 96% 1.83M 0s....... 96% 1.83M 0s
- 150K .
- 150K ..... .... 100% 34.5M100% 34.5M=0.1s
-
-=0.1s
-
-2016-12-15 14:14:51 (1.27 MB/s) - ‘www.packer.io/assets/images/screenshots/vmware_and_virtualbox-7c37c65e.png’ saved [158767/158767]
-
-2016-12-15 14:14:51 (1.27 MB/s) - ‘www.packer.io/assets/images/screenshots/vmware_and_virtualbox-7c37c65e.png’ saved [158767/158767]
-
---2016-12-15 14:14:51-- https://www.packer.io/assets/images/screenshots/works_with-bf434c0d.png
---2016-12-15 14:14:51-- https://www.packer.io/assets/images/screenshots/works_with-bf434c0d.png
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 57028 (56K)Length: 57028 (56K) [image/png]
- [image/png]
-Saving to: ‘www.packer.io/assets/images/screenshots/works_with-bf434c0d.png’
-Saving to: ‘www.packer.io/assets/images/screenshots/works_with-bf434c0d.png’
-
- 0K ....
- 0K .............. .... ............. ........ .......... ........ .................. ........ .......... 89% 3.43M 0s
- 50K ........ 89% 3.43M 0s
- 50K ..... 100% 48.3M100% 48.3M=0.01s
-
-=0.01s
-
-2016-12-15 14:14:52 (3.79 MB/s) - ‘www.packer.io/assets/images/screenshots/works_with-bf434c0d.png’ saved [57028/57028]
-
-2016-12-15 14:14:52 (3.79 MB/s) - ‘www.packer.io/assets/images/screenshots/works_with-bf434c0d.png’ saved [57028/57028]
-
---2016-12-15 14:14:52-- https://www.packer.io/security.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:52-- https://www.packer.io/security.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 16690 (16K) [text/html]
-16690 (16K) [text/html]
-Saving to: ‘www.packer.io/security.html’
-Saving to: ‘www.packer.io/security.html’
-
- 0K ........
- 0K .......... ....... ...... . 100% 100% 116M=0s
-
- 116M=0s
-
-2016-12-15 14:14:52 (116 MB/s) - ‘www.packer.io/security.html’ saved [16690/16690]
-
-2016-12-15 14:14:52 (116 MB/s) - ‘www.packer.io/security.html’ saved [16690/16690]
-
---2016-12-15 14:14:52-- https://www.packer.io/assets/javascripts/application-9b09c209.js
---2016-12-15 14:14:52-- https://www.packer.io/assets/javascripts/application-9b09c209.js
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 88349 (86K) [application/javascript]
-88349 (86K) [application/javascript]
-Saving to: ‘www.packer.io/assets/javascripts/application-9b09c209.js’
-Saving to: ‘www.packer.io/assets/javascripts/application-9b09c209.js’
-
- 0K ........
- 0K .......... ....... .......... ........ .......... ........ .................. .. ................ 57% 2.36M 0s
- 50K ..... 57% 2.36M 0s
- 50K ............. ........ .......... ........ .................. ...... . ...... 100%100% 1.32M=0.05s 1.32M=0.05s
-
-
-
-2016-12-15 14:14:52 (1.77 MB/s) - ‘www.packer.io/assets/javascripts/application-9b09c209.js’ saved [88349/88349]
-
-2016-12-15 14:14:52 (1.77 MB/s) - ‘www.packer.io/assets/javascripts/application-9b09c209.js’ saved [88349/88349]
-
---2016-12-15 14:14:52-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot
---2016-12-15 14:14:52-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 20127 (20K) [application/vnd.ms-fontobject]
-Length: 20127 (20K) [application/vnd.ms-fontobject]
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot’
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot’
-
- 0K .......
- 0K ........... ....... ......... .... 100% 100% 9.95M 9.95M=0.002s
-
-=0.002s
-
-2016-12-15 14:14:53 (9.95 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot’ saved [20127/20127]
-
-2016-12-15 14:14:53 (9.95 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot’ saved [20127/20127]
-
---2016-12-15 14:14:53-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot?
---2016-12-15 14:14:53-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot?
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 20127 (20K) [application/vnd.ms-fontobject]
-Length: 20127 (20K) [application/vnd.ms-fontobject]
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot?’
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot?’
-
- 0K ......
- 0K ............ ....... ......... .... 100% 106M100% 106M=0s
-
-=0s
-
-2016-12-15 14:14:53 (106 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot?’ saved [20127/20127]
-
-2016-12-15 14:14:53 (106 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-86b6f62b.eot?’ saved [20127/20127]
-
---2016-12-15 14:14:53-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-ca35b697.woff2
---2016-12-15 14:14:53-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-ca35b697.woff2
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 18028Length: 18028 (18K) (18K) [binary/octet-stream]
- [binary/octet-stream]
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-ca35b697.woff2’
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-ca35b697.woff2’
-
- 0K ...
- 0K ............... .... .......... .. 100% 100% 115M=0s 115M=0s
-
-
-
-2016-12-15 14:14:53 (115 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-ca35b697.woff2’ saved [18028/18028]
-
-2016-12-15 14:14:53 (115 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-ca35b697.woff2’ saved [18028/18028]
-
---2016-12-15 14:14:53-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-278e49a8.woff
---2016-12-15 14:14:53-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-278e49a8.woff
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 23424 (23K) [application/font-woff]
-Length: 23424 (23K) [application/font-woff]
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-278e49a8.woff’
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-278e49a8.woff’
-
- 0K ....
- 0K .............. ....... .......... ....... .. 100% 100% 93.9M=0s 93.9M=0s
-
-
-
-2016-12-15 14:14:54 (93.9 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-278e49a8.woff’ saved [23424/23424]
-
-2016-12-15 14:14:54 (93.9 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-278e49a8.woff’ saved [23424/23424]
-
---2016-12-15 14:14:54-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-44bc1850.ttf
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:54-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-44bc1850.ttf
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 45404 (44K) [application/font-sfnt]
-Length: 45404 (44K) [application/font-sfnt]
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-44bc1850.ttf’
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-44bc1850.ttf’
-
- 0K ........
- 0K .......... ..... ............ ........ .......... ........ ................... .... .... 100% 100% 21.5M 21.5M=0.002s
-
-=0.002s
-
-2016-12-15 14:14:54 (21.5 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-44bc1850.ttf’ saved [45404/45404]
-
-2016-12-15 14:14:54 (21.5 MB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-44bc1850.ttf’ saved [45404/45404]
-
---2016-12-15 14:14:54-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-de51a849.svg
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:54-- https://www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-de51a849.svg
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 108738 (106K) [image/svg+xml]
-Length: 108738 (106K) [image/svg+xml]
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-de51a849.svg’
-Saving to: ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-de51a849.svg’
-
- 0K ........
- 0K .......... ... .............. ........ .......... ........ .................. ...... ............... 47% 787K 47% 787K 0s
- 50K . 0s
- 50K .............. ..... .................... . .................. ........ .......... ........ .......... 94% 1.10M 0s
- 100K ........ 94% 1.10M 0s
- 100K ...... ... 100% 44.8M100% 44.8M=0.1s
-
-=0.1s
-
-2016-12-15 14:14:55 (981 KB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-de51a849.svg’ saved [108738/108738]
-
-2016-12-15 14:14:55 (981 KB/s) - ‘www.packer.io/assets/fonts/bootstrap/glyphicons-halflings-regular-de51a849.svg’ saved [108738/108738]
-
---2016-12-15 14:14:55-- https://www.packer.io/assets/fonts/2772B2_0_0-496a5b0e.eot
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:55-- https://www.packer.io/assets/fonts/2772B2_0_0-496a5b0e.eot
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 45205200 OK
-Length: 45205 (44K) [application/vnd.ms-fontobject]
- (44K) [application/vnd.ms-fontobject]
-Saving to: ‘www.packer.io/assets/fonts/2772B2_0_0-496a5b0e.eot’
-Saving to: ‘www.packer.io/assets/fonts/2772B2_0_0-496a5b0e.eot’
-
- 0K ........
- 0K .......... ... .............. ........ .......... ........ .................. .... 100% 2.42M=0.02s
-
-. .... 100% 2.42M=0.02s
-
-2016-12-15 14:14:55 (2.42 MB/s) - ‘www.packer.io/assets/fonts/2772B2_0_0-496a5b0e.eot’ saved [45205/45205]
-
-2016-12-15 14:14:55 (2.42 MB/s) - ‘www.packer.io/assets/fonts/2772B2_0_0-496a5b0e.eot’ saved [45205/45205]
-
---2016-12-15 14:14:55-- https://www.packer.io/assets/fonts/2772B2_0_0-43877736.woff
---2016-12-15 14:14:55-- https://www.packer.io/assets/fonts/2772B2_0_0-43877736.woff
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 53183 (52K) [application/font-woff]
-Length: 53183 (52K) [application/font-woff]
-Saving to: ‘www.packer.io/assets/fonts/2772B2_0_0-43877736.woff’
-Saving to: ‘www.packer.io/assets/fonts/2772B2_0_0-43877736.woff’
-
- 0K ......
- 0K ............ ....... .......... ........ .......... ........ .................. ........ .......... 96% 2.76M 0s
- 50K . ... 96% 2.76M 0s
- 50K . 100% 38.7K100% 38.7K=0.02s
-
-=0.02s
-
-2016-12-15 14:14:55 (2.87 MB/s) - ‘www.packer.io/assets/fonts/2772B2_0_0-43877736.woff’ saved [53183/53183]
-
-2016-12-15 14:14:55 (2.87 MB/s) - ‘www.packer.io/assets/fonts/2772B2_0_0-43877736.woff’ saved [53183/53183]
-
---2016-12-15 14:14:55-- https://www.packer.io/assets/fonts/2772B2_0_0-7f0c4640.ttf
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:55-- https://www.packer.io/assets/fonts/2772B2_0_0-7f0c4640.ttf
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 102912 (100K) [application/font-sfnt]
-102912 (100K) [application/font-sfnt]
-Saving to: ‘www.packer.io/assets/fonts/2772B2_0_0-7f0c4640.ttf’
-Saving to: ‘www.packer.io/assets/fonts/2772B2_0_0-7f0c4640.ttf’
-
- 0K ......
- 0K ............ ....... .......... ........ .......... ........ .......... ................ .......... 49% 2.33M 0s
- 50K ........ 49% 2.33M 0s
- 50K .......... ........ .......... ........ .................. ........ .......... ........ .......... 99%..... 99% 2.35M 0s
- 100K 2.35M 0s
- 100K 100% 10.0K 100% 10.0K=0.04s
-
-=0.04s
-
-2016-12-15 14:14:56 (2.35 MB/s) - ‘www.packer.io/assets/fonts/2772B2_0_0-7f0c4640.ttf’ saved [102912/102912]
-
-2016-12-15 14:14:56 (2.35 MB/s) - ‘www.packer.io/assets/fonts/2772B2_0_0-7f0c4640.ttf’ saved [102912/102912]
-
---2016-12-15 14:14:56-- https://www.packer.io/assets/images/divider-6be96677.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:56-- https://www.packer.io/assets/images/divider-6be96677.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 596 [image/png]
-Length: 596 [image/png]
-Saving to: ‘www.packer.io/assets/images/divider-6be96677.png’
-Saving to: ‘www.packer.io/assets/images/divider-6be96677.png’
-
- 0K
- 0K 100%100% 51.7M=0s
-
- 51.7M=0s
-
-2016-12-15 14:14:56 (51.7 MB/s) - ‘www.packer.io/assets/images/divider-6be96677.png’ saved [596/596]
-
-2016-12-15 14:14:56 (51.7 MB/s) - ‘www.packer.io/assets/images/divider-6be96677.png’ saved [596/596]
-
---2016-12-15 14:14:56-- https://www.packer.io/assets/images/logo-header.png
---2016-12-15 14:14:56-- https://www.packer.io/assets/images/logo-header.png
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 404 OK
-404 OK
-Saving to: ‘www.packer.io/assets/images/logo-header.png’
-Saving to: ‘www.packer.io/assets/images/logo-header.png’
-
- 0K ........
- 0K ............ .... ..... . 100% 100% 147M=0s 147M=0s
-
-
-
-2016-12-15 14:14:56 ERROR 404: OK.
-
-2016-12-15 14:14:56 ERROR 404: OK.
-
---2016-12-15 14:14:56-- https://www.packer.io/assets/images/logo-header-330a8172.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:56-- https://www.packer.io/assets/images/logo-header-330a8172.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 779 [image/png]
-Length: 779 [image/png]
-Saving to: ‘www.packer.io/assets/images/logo-header-330a8172.png’
-Saving to: ‘www.packer.io/assets/images/logo-header-330a8172.png’
-
- 0K
- 0K 100% 100% 49.5M 49.5M=0s
-
-=0s
-
-2016-12-15 14:14:56 (49.5 MB/s) - ‘www.packer.io/assets/images/logo-header-330a8172.png’ saved [779/779]
-
-2016-12-15 14:14:56 (49.5 MB/s) - ‘www.packer.io/assets/images/logo-header-330a8172.png’ saved [779/779]
-
---2016-12-15 14:14:56-- https://www.packer.io/assets/images/hero_image-b46304d1.jpg
---2016-12-15 14:14:56-- https://www.packer.io/assets/images/hero_image-b46304d1.jpg
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 98026 (96K) [image/jpeg]
-Length: 98026 (96K) [image/jpeg]
-Saving to: ‘www.packer.io/assets/images/hero_image-b46304d1.jpg’
-Saving to: ‘www.packer.io/assets/images/hero_image-b46304d1.jpg’
-
- 0K ....
- 0K .............. ... .............. ...... ............ ....... ................... .... .............. 52% 2.39M 0s
- 50K ...... 52% 2.39M 0s
- 50K ............ ....... ........... ........ .................. ........ .......... ... .......... 100% 100% 2.44M=0.04s
-
- 2.44M=0.04s
-
-2016-12-15 14:14:57 (2.42 MB/s) - ‘www.packer.io/assets/images/hero_image-b46304d1.jpg’ saved [98026/98026]
-
-2016-12-15 14:14:57 (2.42 MB/s) - ‘www.packer.io/assets/images/hero_image-b46304d1.jpg’ saved [98026/98026]
-
---2016-12-15 14:14:57-- https://www.packer.io/assets/images/down_arrow-58051318.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:57-- https://www.packer.io/assets/images/down_arrow-58051318.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 1201 (1.2K) [image/png]
-Length: 1201 (1.2K) [image/png]
-Saving to: ‘www.packer.io/assets/images/down_arrow-58051318.png’
-Saving to: ‘www.packer.io/assets/images/down_arrow-58051318.png’
-
- 0K .
- 0K . 100% 115M=0s
-
- 100% 115M=0s
-
-2016-12-15 14:14:57 (115 MB/s) - ‘www.packer.io/assets/images/down_arrow-58051318.png’ saved [1201/1201]
-
-2016-12-15 14:14:57 (115 MB/s) - ‘www.packer.io/assets/images/down_arrow-58051318.png’ saved [1201/1201]
-
---2016-12-15 14:14:57-- https://www.packer.io/assets/images/arrow-left-e180d41b.png
---2016-12-15 14:14:57-- https://www.packer.io/assets/images/arrow-left-e180d41b.png
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 346 [image/png]
-Length: 346 [image/png]
-Saving to: ‘www.packer.io/assets/images/arrow-left-e180d41b.png’
-Saving to: ‘www.packer.io/assets/images/arrow-left-e180d41b.png’
-
- 0K
- 0K 100% 100% 20.6M 20.6M=0s
-
-=0s
-
-2016-12-15 14:14:57 (20.6 MB/s) - ‘www.packer.io/assets/images/arrow-left-e180d41b.png’ saved [346/346]
-
-2016-12-15 14:14:57 (20.6 MB/s) - ‘www.packer.io/assets/images/arrow-left-e180d41b.png’ saved [346/346]
-
---2016-12-15 14:14:57-- https://www.packer.io/assets/images/arrow-right-e343e6ed.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:57-- https://www.packer.io/assets/images/arrow-right-e343e6ed.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 338200 OK
-Length: 338 [image/png]
- [image/png]
-Saving to: ‘www.packer.io/assets/images/arrow-right-e343e6ed.png’
-Saving to: ‘www.packer.io/assets/images/arrow-right-e343e6ed.png’
-
- 0K
- 0K 100% 100% 20.1M=0s
-
- 20.1M=0s
-
-2016-12-15 14:14:57 (20.1 MB/s) - ‘www.packer.io/assets/images/arrow-right-e343e6ed.png’ saved [338/338]
-
-2016-12-15 14:14:57 (20.1 MB/s) - ‘www.packer.io/assets/images/arrow-right-e343e6ed.png’ saved [338/338]
-
---2016-12-15 14:14:57-- https://www.packer.io/intro/index.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:57-- https://www.packer.io/intro/index.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 18724 (18K) [text/html]
-Length: 18724 (18K) [text/html]
-Saving to: ‘www.packer.io/intro/index.html’
-Saving to: ‘www.packer.io/intro/index.html’
-
- 0K ..
- 0K .................. .. .............. 100% 18.8M100% 18.8M=0.001s
-
-=0.001s
-
-2016-12-15 14:14:57 (18.8 MB/s) - ‘www.packer.io/intro/index.html’ saved [18724/18724]
-
-2016-12-15 14:14:57 (18.8 MB/s) - ‘www.packer.io/intro/index.html’ saved [18724/18724]
-
---2016-12-15 14:14:57-- https://www.packer.io/intro/why.html
---2016-12-15 14:14:57-- https://www.packer.io/intro/why.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 20070Length: 20070 (20K) [text/html]
- (20K) [text/html]
-Saving to: ‘www.packer.io/intro/why.html’
-Saving to: ‘www.packer.io/intro/why.html’
-
- 0K ..
- 0K ............... ..... ............... . 100% 100% 20.1M 20.1M=0.001s
-
-=0.001s
-
-2016-12-15 14:14:58 (20.1 MB/s) - ‘www.packer.io/intro/why.html’ saved [20070/20070]
-
-2016-12-15 14:14:58 (20.1 MB/s) - ‘www.packer.io/intro/why.html’ saved [20070/20070]
-
---2016-12-15 14:14:58-- https://www.packer.io/intro/use-cases.html
---2016-12-15 14:14:58-- https://www.packer.io/intro/use-cases.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 19805 (19K) [text/html]
-Length: 19805 (19K) [text/html]
-Saving to: ‘www.packer.io/intro/use-cases.html’
-Saving to: ‘www.packer.io/intro/use-cases.html’
-
- 0K ..
- 0K .................. .. ............... . 100% 100% 659K 659K=0.03s
-
-=0.03s
-
-2016-12-15 14:14:58 (659 KB/s) - ‘www.packer.io/intro/use-cases.html’ saved [19805/19805]
-
-2016-12-15 14:14:58 (659 KB/s) - ‘www.packer.io/intro/use-cases.html’ saved [19805/19805]
-
---2016-12-15 14:14:58-- https://www.packer.io/intro/platforms.html
---2016-12-15 14:14:58-- https://www.packer.io/intro/platforms.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 21214 (21K) [text/html]
-Length: 21214 (21K) [text/html]
-Saving to: ‘www.packer.io/intro/platforms.html’
-Saving to: ‘www.packer.io/intro/platforms.html’
-
- 0K ..
- 0K .................. .. ................ .. 100% 1.03M 100% 1.03M=0.02s
-
-=0.02s
-
-2016-12-15 14:14:59 (1.03 MB/s) - ‘www.packer.io/intro/platforms.html’ saved [21214/21214]
-
-2016-12-15 14:14:59 (1.03 MB/s) - ‘www.packer.io/intro/platforms.html’ saved [21214/21214]
-
---2016-12-15 14:14:59-- https://www.packer.io/intro/hashicorp-ecosystem.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:59-- https://www.packer.io/intro/hashicorp-ecosystem.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 20666200 OK
-Length: 20666 (20K) [text/html]
- (20K) [text/html]
-Saving to: ‘www.packer.io/intro/hashicorp-ecosystem.html’
-Saving to: ‘www.packer.io/intro/hashicorp-ecosystem.html’
-
- 0K ..
- 0K .................. .. ................ .. 100% 100% 1.33M 1.33M=0.01s
-
-=0.01s
-
-2016-12-15 14:14:59 (1.33 MB/s) - ‘www.packer.io/intro/hashicorp-ecosystem.html’ saved [20666/20666]
-
-2016-12-15 14:14:59 (1.33 MB/s) - ‘www.packer.io/intro/hashicorp-ecosystem.html’ saved [20666/20666]
-
---2016-12-15 14:14:59-- https://www.packer.io/intro/getting-started/setup.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:14:59-- https://www.packer.io/intro/getting-started/setup.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 21420 (21K) [text/html]
-Length: 21420 (21K) [text/html]
-Saving to: ‘www.packer.io/intro/getting-started/setup.html’
-Saving to: ‘www.packer.io/intro/getting-started/setup.html’
-
- 0K ..
- 0K .................. .. .................. 100%100% 18.9M 18.9M=0.001s
-
-=0.001s
-
-2016-12-15 14:14:59 (18.9 MB/s) - ‘www.packer.io/intro/getting-started/setup.html’ saved [21420/21420]
-
-2016-12-15 14:14:59 (18.9 MB/s) - ‘www.packer.io/intro/getting-started/setup.html’ saved [21420/21420]
-
---2016-12-15 14:14:59-- https://www.packer.io/intro/getting-started/build-image.html
---2016-12-15 14:14:59-- https://www.packer.io/intro/getting-started/build-image.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 26147 (26K) [text/html]
-Length: 26147 (26K) [text/html]
-Saving to: ‘www.packer.io/intro/getting-started/build-image.html’
-Saving to: ‘www.packer.io/intro/getting-started/build-image.html’
-
- 0K ..
- 0K .................. .. .................. ... ..... .. 100%100% 13.7M 13.7M=0.002s
-
-=0.002s
-
-2016-12-15 14:15:00 (13.7 MB/s) - ‘www.packer.io/intro/getting-started/build-image.html’ saved [26147/26147]
-
-2016-12-15 14:15:00 (13.7 MB/s) - ‘www.packer.io/intro/getting-started/build-image.html’ saved [26147/26147]
-
---2016-12-15 14:15:00-- https://www.packer.io/intro/getting-started/provision.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:00-- https://www.packer.io/intro/getting-started/provision.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22253 (22K) [text/html]
-Length: 22253 (22K) [text/html]
-Saving to: ‘www.packer.io/intro/getting-started/provision.html’
-Saving to: ‘www.packer.io/intro/getting-started/provision.html’
-
- 0K ........
- 0K .......... ...... ........... . ..... . 100%100% 2.75M=0.008s 2.75M=0.008s
-
-
-
-2016-12-15 14:15:00 (2.75 MB/s) - ‘www.packer.io/intro/getting-started/provision.html’ saved [22253/22253]
-
-2016-12-15 14:15:00 (2.75 MB/s) - ‘www.packer.io/intro/getting-started/provision.html’ saved [22253/22253]
-
---2016-12-15 14:15:00-- https://www.packer.io/intro/getting-started/parallel-builds.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:00-- https://www.packer.io/intro/getting-started/parallel-builds.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24256 (24K) [text/html]
-Length: 24256 (24K) [text/html]
-Saving to: ‘www.packer.io/intro/getting-started/parallel-builds.html’
-Saving to: ‘www.packer.io/intro/getting-started/parallel-builds.html’
-
- 0K ........
- 0K ............ ... ............ ........ ... 100% 6.84M 100% 6.84M=0.003s
-
-=0.003s
-
-2016-12-15 14:15:00 (6.84 MB/s) - ‘www.packer.io/intro/getting-started/parallel-builds.html’ saved [24256/24256]
-
-2016-12-15 14:15:00 (6.84 MB/s) - ‘www.packer.io/intro/getting-started/parallel-builds.html’ saved [24256/24256]
-
---2016-12-15 14:15:00-- https://www.packer.io/intro/getting-started/vagrant.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:00-- https://www.packer.io/intro/getting-started/vagrant.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: Length: 20893 (20K) [text/html]
-20893 (20K) [text/html]
-Saving to: ‘www.packer.io/intro/getting-started/vagrant.html’
-Saving to: ‘www.packer.io/intro/getting-started/vagrant.html’
-
- 0K .
- 0K ................. ....... .............. . 100% 100% 75.2M=0s
-
- 75.2M=0s
-
-2016-12-15 14:15:01 (75.2 MB/s) - ‘www.packer.io/intro/getting-started/vagrant.html’ saved [20893/20893]
-
-2016-12-15 14:15:01 (75.2 MB/s) - ‘www.packer.io/intro/getting-started/vagrant.html’ saved [20893/20893]
-
---2016-12-15 14:15:01-- https://www.packer.io/intro/getting-started/remote-builds.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... --2016-12-15 14:15:01-- https://www.packer.io/intro/getting-started/remote-builds.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 21699 (21K) [text/html]
-Length: 21699 (21K) [text/html]
-Saving to: ‘www.packer.io/intro/getting-started/remote-builds.html’
-Saving to: ‘www.packer.io/intro/getting-started/remote-builds.html’
-
- 0K .......
- 0K ........... ....... .......... . ..... . 100% 2.08M=0.01s
-
- 100% 2.08M=0.01s
-
-2016-12-15 14:15:01 (2.08 MB/s) - ‘www.packer.io/intro/getting-started/remote-builds.html’ saved [21699/21699]
-
-2016-12-15 14:15:01 (2.08 MB/s) - ‘www.packer.io/intro/getting-started/remote-builds.html’ saved [21699/21699]
-
---2016-12-15 14:15:01-- https://www.packer.io/intro/getting-started/next.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:01-- https://www.packer.io/intro/getting-started/next.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 18124 (18K) [text/html]
-Length: 18124 (18K) [text/html]
-Saving to: ‘www.packer.io/intro/getting-started/next.html’
-Saving to: ‘www.packer.io/intro/getting-started/next.html’
-
- 0K ........
- 0K .......... ....... ....... .. 100%100% 8.70M 8.70M=0.002s
-
-=0.002s
-
-2016-12-15 14:15:02 (8.70 MB/s) - ‘www.packer.io/intro/getting-started/next.html’ saved [18124/18124]
-
-2016-12-15 14:15:02 (8.70 MB/s) - ‘www.packer.io/intro/getting-started/next.html’ saved [18124/18124]
-
---2016-12-15 14:15:02-- https://www.packer.io/docs/installation.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:02-- https://www.packer.io/docs/installation.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 25458 (25K) [text/html]
-25458 (25K) [text/html]
-Saving to: ‘www.packer.io/docs/installation.html’
-Saving to: ‘www.packer.io/docs/installation.html’
-
- 0K .....
- 0K ............. ....... .......... ........ ..... 100% 100% 5.36M 5.36M=0.005s
-
-=0.005s
-
-2016-12-15 14:15:02 (5.36 MB/s) - ‘www.packer.io/docs/installation.html’ saved [25458/25458]
-
-2016-12-15 14:15:02 (5.36 MB/s) - ‘www.packer.io/docs/installation.html’ saved [25458/25458]
-
---2016-12-15 14:15:02-- https://www.packer.io/docs/basics/terminology.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:02-- https://www.packer.io/docs/basics/terminology.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24848 (24K) [text/html]
-Length: 24848 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/basics/terminology.html’
-Saving to: ‘www.packer.io/docs/basics/terminology.html’
-
- 0K ....
- 0K .............. ....... .......... ........ .... . 100%100% 35.6M=0.001s
-
- 35.6M=0.001s
-
-2016-12-15 14:15:03 (35.6 MB/s) - ‘www.packer.io/docs/basics/terminology.html’ saved [24848/24848]
-
-2016-12-15 14:15:03 (35.6 MB/s) - ‘www.packer.io/docs/basics/terminology.html’ saved [24848/24848]
-
---2016-12-15 14:15:03-- https://www.packer.io/docs/command-line/introduction.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:03-- https://www.packer.io/docs/command-line/introduction.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22838 (22K) [text/html]
-Length: 22838 (22K) [text/html]
-Saving to: ‘www.packer.io/docs/command-line/introduction.html’
-Saving to: ‘www.packer.io/docs/command-line/introduction.html’
-
- 0K ........
- 0K .......... ...... ........... .. ..... .. 100%100% 12.8M=0.002s 12.8M=0.002s
-
-
-
-2016-12-15 14:15:03 (12.8 MB/s) - ‘www.packer.io/docs/command-line/introduction.html’ saved [22838/22838]
-
-2016-12-15 14:15:03 (12.8 MB/s) - ‘www.packer.io/docs/command-line/introduction.html’ saved [22838/22838]
-
---2016-12-15 14:15:03-- https://www.packer.io/docs/command-line/build.html
---2016-12-15 14:15:03-- https://www.packer.io/docs/command-line/build.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24584 (24K) [text/html]
-Length: 24584 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/command-line/build.html’
-Saving to: ‘www.packer.io/docs/command-line/build.html’
-
- 0K .....
- 0K ............. ....... .......... ........ .... . 100% 100% 16.7M 16.7M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:03 (16.7 MB/s) - ‘www.packer.io/docs/command-line/build.html’ saved [24584/24584]
-
-2016-12-15 14:15:03 (16.7 MB/s) - ‘www.packer.io/docs/command-line/build.html’ saved [24584/24584]
-
---2016-12-15 14:15:03-- https://www.packer.io/docs/command-line/fix.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:03-- https://www.packer.io/docs/command-line/fix.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 23152 (23K) [text/html]
-23152 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/command-line/fix.html’
-Saving to: ‘www.packer.io/docs/command-line/fix.html’
-
- 0K ........
- 0K ............ .... ........... .. ..... .. 100%100% 98.6M=0s
-
- 98.6M=0s
-
-2016-12-15 14:15:04 (98.6 MB/s) - ‘www.packer.io/docs/command-line/fix.html’ saved [23152/23152]
-
-2016-12-15 14:15:04 (98.6 MB/s) - ‘www.packer.io/docs/command-line/fix.html’ saved [23152/23152]
-
---2016-12-15 14:15:04-- https://www.packer.io/docs/command-line/inspect.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:04-- https://www.packer.io/docs/command-line/inspect.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 23102 (23K) [text/html]
-Length: 23102 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/command-line/inspect.html’
-Saving to: ‘www.packer.io/docs/command-line/inspect.html’
-
- 0K .....
- 0K ............. ....... .......... .. ..... .. 100% 100% 24.2M 24.2M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:04 (24.2 MB/s) - ‘www.packer.io/docs/command-line/inspect.html’ saved [23102/23102]
-
-2016-12-15 14:15:04 (24.2 MB/s) - ‘www.packer.io/docs/command-line/inspect.html’ saved [23102/23102]
-
---2016-12-15 14:15:04-- https://www.packer.io/docs/command-line/push.html
---2016-12-15 14:15:04-- https://www.packer.io/docs/command-line/push.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 26835 (26K) [text/html]
-26835 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/command-line/push.html’
-Saving to: ‘www.packer.io/docs/command-line/push.html’
-
- 0K ........
- 0K .......... .... ............. ........ ...... ... 100%100% 2.43M 2.43M=0.01s
-
-=0.01s
-
-2016-12-15 14:15:04 (2.43 MB/s) - ‘www.packer.io/docs/command-line/push.html’ saved [26835/26835]
-
-2016-12-15 14:15:04 (2.43 MB/s) - ‘www.packer.io/docs/command-line/push.html’ saved [26835/26835]
-
---2016-12-15 14:15:04-- https://www.packer.io/docs/command-line/validate.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:04-- https://www.packer.io/docs/command-line/validate.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22680 (22K) [text/html]
-Length: 22680 (22K) [text/html]
-Saving to: ‘www.packer.io/docs/command-line/validate.html’
-Saving to: ‘www.packer.io/docs/command-line/validate.html’
-
- 0K .......
- 0K ........... ....... .......... .. ..... .. 100%100% 17.3M=0.001s 17.3M=0.001s
-
-
-
-2016-12-15 14:15:05 (17.3 MB/s) - ‘www.packer.io/docs/command-line/validate.html’ saved [22680/22680]
-
-2016-12-15 14:15:05 (17.3 MB/s) - ‘www.packer.io/docs/command-line/validate.html’ saved [22680/22680]
-
---2016-12-15 14:15:05-- https://www.packer.io/docs/command-line/machine-readable.html
---2016-12-15 14:15:05-- https://www.packer.io/docs/command-line/machine-readable.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 25569 (25K) [text/html]
-Length: 25569 (25K) [text/html]
-Saving to: ‘www.packer.io/docs/command-line/machine-readable.html’
-Saving to: ‘www.packer.io/docs/command-line/machine-readable.html’
-
- 0K ........
- 0K .......... ..... ............ ........ .... . 100%100% 17.3M 17.3M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:05 (17.3 MB/s) - ‘www.packer.io/docs/command-line/machine-readable.html’ saved [25569/25569]
-
-2016-12-15 14:15:05 (17.3 MB/s) - ‘www.packer.io/docs/command-line/machine-readable.html’ saved [25569/25569]
-
---2016-12-15 14:15:05-- https://www.packer.io/docs/templates/introduction.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:05-- https://www.packer.io/docs/templates/introduction.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 26769200 OK
-Length: 26769 (26K) [text/html]
- (26K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/introduction.html’
-Saving to: ‘www.packer.io/docs/templates/introduction.html’
-
- 0K ..
- 0K ................ ....... .......... ........ ...... ... 100% 100% 34.4M 34.4M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:06 (34.4 MB/s) - ‘www.packer.io/docs/templates/introduction.html’ saved [26769/26769]
-
-2016-12-15 14:15:06 (34.4 MB/s) - ‘www.packer.io/docs/templates/introduction.html’ saved [26769/26769]
-
---2016-12-15 14:15:06-- https://www.packer.io/docs/templates/builders.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:06-- https://www.packer.io/docs/templates/builders.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24483 (24K) [text/html]
-Length: 24483 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/builders.html’
-Saving to: ‘www.packer.io/docs/templates/builders.html’
-
- 0K .....
- 0K ............. ....... .......... ........ ... 100%100% 1.10M 1.10M=0.02s
-
-=0.02s
-
-2016-12-15 14:15:06 (1.10 MB/s) - ‘www.packer.io/docs/templates/builders.html’ saved [24483/24483]
-
-2016-12-15 14:15:06 (1.10 MB/s) - ‘www.packer.io/docs/templates/builders.html’ saved [24483/24483]
-
---2016-12-15 14:15:06-- https://www.packer.io/docs/templates/provisioners.html
---2016-12-15 14:15:06-- https://www.packer.io/docs/templates/provisioners.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 27000 (26K) [text/html]
-Length: 27000 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/provisioners.html’
-Saving to: ‘www.packer.io/docs/templates/provisioners.html’
-
- 0K ........
- 0K .......... ..... ............ ........ ....... .. 100% 100% 51.0M 51.0M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:07 (51.0 MB/s) - ‘www.packer.io/docs/templates/provisioners.html’ saved [27000/27000]
-
-2016-12-15 14:15:07 (51.0 MB/s) - ‘www.packer.io/docs/templates/provisioners.html’ saved [27000/27000]
-
---2016-12-15 14:15:07-- https://www.packer.io/docs/templates/post-processors.html
---2016-12-15 14:15:07-- https://www.packer.io/docs/templates/post-processors.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 29049 (28K) [text/html]
-Length: 29049 (28K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/post-processors.html’
-Saving to: ‘www.packer.io/docs/templates/post-processors.html’
-
- 0K ........
- 0K ............ ... ............ ........ ........ ..... 100%100% 47.8M=0.001s 47.8M=0.001s
-
-
-
-2016-12-15 14:15:07 (47.8 MB/s) - ‘www.packer.io/docs/templates/post-processors.html’ saved [29049/29049]
-
-2016-12-15 14:15:07 (47.8 MB/s) - ‘www.packer.io/docs/templates/post-processors.html’ saved [29049/29049]
-
---2016-12-15 14:15:07-- https://www.packer.io/docs/templates/push.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:07-- https://www.packer.io/docs/templates/push.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24759 (24K) [text/html]
-Length: 24759 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/push.html’
-Saving to: ‘www.packer.io/docs/templates/push.html’
-
- 0K ........
- 0K .......... ....... .......... ........ .... . 100%100% 1.21M 1.21M=0.02s
-
-=0.02s
-
-2016-12-15 14:15:08 (1.21 MB/s) - ‘www.packer.io/docs/templates/push.html’ saved [24759/24759]
-
-2016-12-15 14:15:08 (1.21 MB/s) - ‘www.packer.io/docs/templates/push.html’ saved [24759/24759]
-
---2016-12-15 14:15:08-- https://www.packer.io/docs/templates/communicator.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:08-- https://www.packer.io/docs/templates/communicator.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 28271 (28K) [text/html]
-Length: 28271 (28K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/communicator.html’
-Saving to: ‘www.packer.io/docs/templates/communicator.html’
-
- 0K ........
- 0K .......... .... ............. ...... ......... .... 100% 100% 1.41M=0.02s 1.41M=0.02s
-
-
-
-2016-12-15 14:15:08 (1.41 MB/s) - ‘www.packer.io/docs/templates/communicator.html’ saved [28271/28271]
-
-2016-12-15 14:15:08 (1.41 MB/s) - ‘www.packer.io/docs/templates/communicator.html’ saved [28271/28271]
-
---2016-12-15 14:15:08-- https://www.packer.io/docs/templates/configuration-templates.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:08-- https://www.packer.io/docs/templates/configuration-templates.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 27963 (27K) [text/html]
-Length: 27963 (27K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/configuration-templates.html’
-Saving to: ‘www.packer.io/docs/templates/configuration-templates.html’
-
- 0K ........
- 0K .......... ....... .......... ....... ..... ....... 100%100% 153M=0s 153M=0s
-
-
-
-2016-12-15 14:15:08 (153 MB/s) - ‘www.packer.io/docs/templates/configuration-templates.html’ saved [27963/27963]
-
-2016-12-15 14:15:08 (153 MB/s) - ‘www.packer.io/docs/templates/configuration-templates.html’ saved [27963/27963]
-
---2016-12-15 14:15:08-- https://www.packer.io/docs/templates/user-variables.html
---2016-12-15 14:15:08-- https://www.packer.io/docs/templates/user-variables.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 29467200 OK
-Length: 29467 (29K) [text/html]
- (29K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/user-variables.html’
-Saving to: ‘www.packer.io/docs/templates/user-variables.html’
-
- 0K ......
- 0K ............ ....... .......... ........ ........ ..... 100%100% 32.6M=0.001s
-
- 32.6M=0.001s
-
-2016-12-15 14:15:09 (32.6 MB/s) - ‘www.packer.io/docs/templates/user-variables.html’ saved [29467/29467]
-
-2016-12-15 14:15:09 (32.6 MB/s) - ‘www.packer.io/docs/templates/user-variables.html’ saved [29467/29467]
-
---2016-12-15 14:15:09-- https://www.packer.io/docs/templates/veewee-to-packer.html
---2016-12-15 14:15:09-- https://www.packer.io/docs/templates/veewee-to-packer.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24510 (24K) [text/html]
-Length: 24510 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/templates/veewee-to-packer.html’
-Saving to: ‘www.packer.io/docs/templates/veewee-to-packer.html’
-
- 0K ........
- 0K .......... ....... .......... ........ ... 100%100% 1.03M=0.02s 1.03M=0.02s
-
-
-
-2016-12-15 14:15:10 (1.03 MB/s) - ‘www.packer.io/docs/templates/veewee-to-packer.html’ saved [24510/24510]
-
-2016-12-15 14:15:10 (1.03 MB/s) - ‘www.packer.io/docs/templates/veewee-to-packer.html’ saved [24510/24510]
-
---2016-12-15 14:15:10-- https://www.packer.io/docs/builders/amazon.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:10-- https://www.packer.io/docs/builders/amazon.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 29810200 OK
-Length: 29810 (29K) [text/html]
- (29K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/amazon.html’
-Saving to: ‘www.packer.io/docs/builders/amazon.html’
-
- 0K .......
- 0K ........... ....... .......... ........ ............. .. 100%100% 1.28M 1.28M=0.02s
-
-=0.02s
-
-2016-12-15 14:15:10 (1.28 MB/s) - ‘www.packer.io/docs/builders/amazon.html’ saved [29810/29810]
-
-2016-12-15 14:15:10 (1.28 MB/s) - ‘www.packer.io/docs/builders/amazon.html’ saved [29810/29810]
-
---2016-12-15 14:15:10-- https://www.packer.io/docs/builders/azure.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:10-- https://www.packer.io/docs/builders/azure.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 36170200 OK
-Length: 36170 (35K) [text/html]
- (35K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/azure.html’
-Saving to: ‘www.packer.io/docs/builders/azure.html’
-
- 0K .........
- 0K .......... ...... .......... ........ ................. . ..... .... 100% 42.7M=0.001s
-
- 100% 42.7M=0.001s
-
-2016-12-15 14:15:11 (42.7 MB/s) - ‘www.packer.io/docs/builders/azure.html’ saved [36170/36170]
-
-2016-12-15 14:15:11 (42.7 MB/s) - ‘www.packer.io/docs/builders/azure.html’ saved [36170/36170]
-
---2016-12-15 14:15:11-- https://www.packer.io/docs/builders/cloudstack.html
---2016-12-15 14:15:11-- https://www.packer.io/docs/builders/cloudstack.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 29917 (29K) [text/html]
-29917 (29K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/cloudstack.html’
-Saving to: ‘www.packer.io/docs/builders/cloudstack.html’
-
- 0K ........
- 0K .......... ..... ............ ........ ......... ...... 100%100% 1.15M 1.15M=0.02s
-
-=0.02s
-
-2016-12-15 14:15:11 (1.15 MB/s) - ‘www.packer.io/docs/builders/cloudstack.html’ saved [29917/29917]
-
-2016-12-15 14:15:11 (1.15 MB/s) - ‘www.packer.io/docs/builders/cloudstack.html’ saved [29917/29917]
-
---2016-12-15 14:15:11-- https://www.packer.io/docs/builders/digitalocean.html
---2016-12-15 14:15:11-- https://www.packer.io/docs/builders/digitalocean.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 26438 (26K) [text/html]
-Length: 26438 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/digitalocean.html’
-Saving to: ‘www.packer.io/docs/builders/digitalocean.html’
-
- 0K ....
- 0K .............. ....... .......... ........ ..... .. 100% 962K=0.03s
-
-100% 962K=0.03s
-
-2016-12-15 14:15:11 (962 KB/s) - ‘www.packer.io/docs/builders/digitalocean.html’ saved [26438/26438]
-
-2016-12-15 14:15:11 (962 KB/s) - ‘www.packer.io/docs/builders/digitalocean.html’ saved [26438/26438]
-
---2016-12-15 14:15:11-- https://www.packer.io/docs/builders/docker.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:11-- https://www.packer.io/docs/builders/docker.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 35083 (34K) [text/html]
-Length: 35083 (34K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/docker.html’
-Saving to: ‘www.packer.io/docs/builders/docker.html’
-
- 0K ........
- 0K .......... ....... .......... ........ .......... ........ .... 100% 2.81M... 100% 2.81M=0.01s
-
-=0.01s
-
-2016-12-15 14:15:12 (2.81 MB/s) - ‘www.packer.io/docs/builders/docker.html’ saved [35083/35083]
-
-2016-12-15 14:15:12 (2.81 MB/s) - ‘www.packer.io/docs/builders/docker.html’ saved [35083/35083]
-
---2016-12-15 14:15:12-- https://www.packer.io/docs/builders/file.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:12-- https://www.packer.io/docs/builders/file.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 23310 (23K) [text/html]
-Length: 23310 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/file.html’
-Saving to: ‘www.packer.io/docs/builders/file.html’
-
- 0K ........
- 0K .......... .... ............. .. ..... .. 100%100% 9.49M=0.002s 9.49M=0.002s
-
-
-
-2016-12-15 14:15:12 (9.49 MB/s) - ‘www.packer.io/docs/builders/file.html’ saved [23310/23310]
-
-2016-12-15 14:15:12 (9.49 MB/s) - ‘www.packer.io/docs/builders/file.html’ saved [23310/23310]
-
---2016-12-15 14:15:12-- https://www.packer.io/docs/builders/googlecompute.html
---2016-12-15 14:15:12-- https://www.packer.io/docs/builders/googlecompute.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 35168 (34K) [text/html]
-Length: 35168 (34K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/googlecompute.html’
-Saving to: ‘www.packer.io/docs/builders/googlecompute.html’
-
- 0K ........
- 0K .......... ..... ............ ........ .......... ........ .... ... 100% 12.9M=0.003s
-
-100% 12.9M=0.003s
-
-2016-12-15 14:15:13 (12.9 MB/s) - ‘www.packer.io/docs/builders/googlecompute.html’ saved [35168/35168]
-
-2016-12-15 14:15:13 (12.9 MB/s) - ‘www.packer.io/docs/builders/googlecompute.html’ saved [35168/35168]
-
---2016-12-15 14:15:13-- https://www.packer.io/docs/builders/null.html
---2016-12-15 14:15:13-- https://www.packer.io/docs/builders/null.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22599 (22K)Length: 22599 (22K) [text/html]
- [text/html]
-Saving to: ‘www.packer.io/docs/builders/null.html’
-Saving to: ‘www.packer.io/docs/builders/null.html’
-
- 0K ........
- 0K .......... ....... .......... .. ..... .. 100% 100% 11.4M 11.4M=0.002s
-
-=0.002s
-
-2016-12-15 14:15:13 (11.4 MB/s) - ‘www.packer.io/docs/builders/null.html’ saved [22599/22599]
-
-2016-12-15 14:15:13 (11.4 MB/s) - ‘www.packer.io/docs/builders/null.html’ saved [22599/22599]
-
---2016-12-15 14:15:13-- https://www.packer.io/docs/builders/openstack.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:13-- https://www.packer.io/docs/builders/openstack.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 35310 (34K) [text/html]
-Length: 35310 (34K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/openstack.html’
-Saving to: ‘www.packer.io/docs/builders/openstack.html’
-
- 0K ........
- 0K ............ .... ........... ....... ................. . ..... ... 100% 10.2M100% 10.2M=0.003s
-
-=0.003s
-
-2016-12-15 14:15:14 (10.2 MB/s) - ‘www.packer.io/docs/builders/openstack.html’ saved [35310/35310]
-
-2016-12-15 14:15:14 (10.2 MB/s) - ‘www.packer.io/docs/builders/openstack.html’ saved [35310/35310]
-
---2016-12-15 14:15:14-- https://www.packer.io/docs/builders/parallels.html
---2016-12-15 14:15:14-- https://www.packer.io/docs/builders/parallels.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 23210 (23K) [text/html]
-Length: 23210 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/parallels.html’
-Saving to: ‘www.packer.io/docs/builders/parallels.html’
-
- 0K ........
- 0K .......... ....... .......... .. ..... .. 100% 79.1M100% 79.1M=0s
-
-=0s
-
-2016-12-15 14:15:14 (79.1 MB/s) - ‘www.packer.io/docs/builders/parallels.html’ saved [23210/23210]
-
-2016-12-15 14:15:14 (79.1 MB/s) - ‘www.packer.io/docs/builders/parallels.html’ saved [23210/23210]
-
---2016-12-15 14:15:14-- https://www.packer.io/docs/builders/qemu.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:14-- https://www.packer.io/docs/builders/qemu.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 46889 (46K) [text/html]
-Length: 46889 (46K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/qemu.html’
-Saving to: ‘www.packer.io/docs/builders/qemu.html’
-
- 0K .......
- 0K ........... ....... .......... ........ .......... ........ .................. ..... . ..... 100% 100% 22.3M 22.3M=0.002s
-
-=0.002s
-
-2016-12-15 14:15:15 (22.3 MB/s) - ‘www.packer.io/docs/builders/qemu.html’ saved [46889/46889]
-
-2016-12-15 14:15:15 (22.3 MB/s) - ‘www.packer.io/docs/builders/qemu.html’ saved [46889/46889]
-
---2016-12-15 14:15:15-- https://www.packer.io/docs/builders/virtualbox.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:15-- https://www.packer.io/docs/builders/virtualbox.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22746 (22K) [text/html]
-Length: 22746 (22K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/virtualbox.html’
-Saving to: ‘www.packer.io/docs/builders/virtualbox.html’
-
- 0K ........
- 0K .......... ...... ........... .. ..... .. 100% 100% 21.0M 21.0M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:15 (21.0 MB/s) - ‘www.packer.io/docs/builders/virtualbox.html’ saved [22746/22746]
-
-2016-12-15 14:15:15 (21.0 MB/s) - ‘www.packer.io/docs/builders/virtualbox.html’ saved [22746/22746]
-
---2016-12-15 14:15:15-- https://www.packer.io/docs/builders/vmware.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:15-- https://www.packer.io/docs/builders/vmware.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 22628 (22K) [text/html]
-22628 (22K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/vmware.html’
-Saving to: ‘www.packer.io/docs/builders/vmware.html’
-
- 0K ........
- 0K .......... ..... ............ .. ..... .. 100% 25.7M=0.001s
-
-100% 25.7M=0.001s
-
-2016-12-15 14:15:15 (25.7 MB/s) - ‘www.packer.io/docs/builders/vmware.html’ saved [22628/22628]
-
-2016-12-15 14:15:15 (25.7 MB/s) - ‘www.packer.io/docs/builders/vmware.html’ saved [22628/22628]
-
---2016-12-15 14:15:15-- https://www.packer.io/docs/builders/custom.html
---2016-12-15 14:15:15-- https://www.packer.io/docs/builders/custom.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22025 (22K) [text/html]
-Length: 22025 (22K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/custom.html’
-Saving to: ‘www.packer.io/docs/builders/custom.html’
-
- 0K .......
- 0K ........... ....... .......... . ..... . 100% 11.8M100% 11.8M=0.002s
-
-=0.002s
-
-2016-12-15 14:15:15 (11.8 MB/s) - ‘www.packer.io/docs/builders/custom.html’ saved [22025/22025]
-
-2016-12-15 14:15:15 (11.8 MB/s) - ‘www.packer.io/docs/builders/custom.html’ saved [22025/22025]
-
---2016-12-15 14:15:15-- https://www.packer.io/docs/provisioners/shell.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:15-- https://www.packer.io/docs/provisioners/shell.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 33876 (33K) [text/html]
-Length: 33876 (33K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/shell.html’
-Saving to: ‘www.packer.io/docs/provisioners/shell.html’
-
- 0K .......
- 0K ........... ....... .......... ........ ................ .. ... 100%.. 100% 46.9M 46.9M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:16 (46.9 MB/s) - ‘www.packer.io/docs/provisioners/shell.html’ saved [33876/33876]
-
-2016-12-15 14:15:16 (46.9 MB/s) - ‘www.packer.io/docs/provisioners/shell.html’ saved [33876/33876]
-
---2016-12-15 14:15:16-- https://www.packer.io/docs/provisioners/shell-local.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:16-- https://www.packer.io/docs/provisioners/shell-local.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 23184 (23K) [text/html]
-23184 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/shell-local.html’
-Saving to: ‘www.packer.io/docs/provisioners/shell-local.html’
-
- 0K ........
- 0K .......... .. ............... .. ..... .. 100%100% 5.74M=0.004s 5.74M=0.004s
-
-
-
-2016-12-15 14:15:16 (5.74 MB/s) - ‘www.packer.io/docs/provisioners/shell-local.html’ saved [23184/23184]
-
-2016-12-15 14:15:16 (5.74 MB/s) - ‘www.packer.io/docs/provisioners/shell-local.html’ saved [23184/23184]
-
---2016-12-15 14:15:16-- https://www.packer.io/docs/provisioners/file.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:16-- https://www.packer.io/docs/provisioners/file.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24728 (24K) [text/html]
-Length: 24728 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/file.html’
-Saving to: ‘www.packer.io/docs/provisioners/file.html’
-
- 0K ........
- 0K .......... ....... .......... ........ .... . 100%100% 2.25M 2.25M=0.01s
-
-=0.01s
-
-2016-12-15 14:15:16 (2.25 MB/s) - ‘www.packer.io/docs/provisioners/file.html’ saved [24728/24728]
-
-2016-12-15 14:15:16 (2.25 MB/s) - ‘www.packer.io/docs/provisioners/file.html’ saved [24728/24728]
-
---2016-12-15 14:15:16-- https://www.packer.io/docs/provisioners/powershell.html
---2016-12-15 14:15:16-- https://www.packer.io/docs/provisioners/powershell.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 25858 (25K) [text/html]
-200 OK
-Length: 25858 (25K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/powershell.html’
-Saving to: ‘www.packer.io/docs/provisioners/powershell.html’
-
- 0K ........
- 0K .......... ....... .......... ........ ..... .. 100% 3.66M=0.007s
-
-100% 3.66M=0.007s
-
-2016-12-15 14:15:16 (3.66 MB/s) - ‘www.packer.io/docs/provisioners/powershell.html’ saved [25858/25858]
-
-2016-12-15 14:15:16 (3.66 MB/s) - ‘www.packer.io/docs/provisioners/powershell.html’ saved [25858/25858]
-
---2016-12-15 14:15:16-- https://www.packer.io/docs/provisioners/windows-shell.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:16-- https://www.packer.io/docs/provisioners/windows-shell.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 25321 (25K) [text/html]
-Length: 25321 (25K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/windows-shell.html’
-Saving to: ‘www.packer.io/docs/provisioners/windows-shell.html’
-
- 0K .....
- 0K ............. ....... .......... ........ .... . 100%100% 15.7M 15.7M=0.002s
-
-=0.002s
-
-2016-12-15 14:15:17 (15.7 MB/s) - ‘www.packer.io/docs/provisioners/windows-shell.html’ saved [25321/25321]
-
-2016-12-15 14:15:17 (15.7 MB/s) - ‘www.packer.io/docs/provisioners/windows-shell.html’ saved [25321/25321]
-
---2016-12-15 14:15:17-- https://www.packer.io/docs/provisioners/ansible-local.html
---2016-12-15 14:15:17-- https://www.packer.io/docs/provisioners/ansible-local.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 27346 (27K) [text/html]
-Length: 27346 (27K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/ansible-local.html’
-Saving to: ‘www.packer.io/docs/provisioners/ansible-local.html’
-
- 0K ........
- 0K .......... ....... .......... ........ ...... ... 100%100% 13.2M=0.002s 13.2M=0.002s
-
-
-
-2016-12-15 14:15:17 (13.2 MB/s) - ‘www.packer.io/docs/provisioners/ansible-local.html’ saved [27346/27346]
-
-2016-12-15 14:15:17 (13.2 MB/s) - ‘www.packer.io/docs/provisioners/ansible-local.html’ saved [27346/27346]
-
---2016-12-15 14:15:17-- https://www.packer.io/docs/provisioners/ansible.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:17-- https://www.packer.io/docs/provisioners/ansible.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 33419 (33K) [text/html]
-Length: 33419 (33K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/ansible.html’
-Saving to: ‘www.packer.io/docs/provisioners/ansible.html’
-
- 0K ........
- 0K ........... .... ............ ........ .......... ........ .. . 100%100% 9.05M 9.05M=0.004s
-
-=0.004s
-
-2016-12-15 14:15:17 (9.05 MB/s) - ‘www.packer.io/docs/provisioners/ansible.html’ saved [33419/33419]
-
-2016-12-15 14:15:17 (9.05 MB/s) - ‘www.packer.io/docs/provisioners/ansible.html’ saved [33419/33419]
-
---2016-12-15 14:15:17-- https://www.packer.io/docs/provisioners/chef-client.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:17-- https://www.packer.io/docs/provisioners/chef-client.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 37183 (36K) [text/html]
-Length: 37183 (36K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/chef-client.html’
-Saving to: ‘www.packer.io/docs/provisioners/chef-client.html’
-
- 0K ........
- 0K .......... ....... .......... ...... ............ ........ ...... ..... 100%100% 11.7M 11.7M=0.003s
-
-=0.003s
-
-2016-12-15 14:15:18 (11.7 MB/s) - ‘www.packer.io/docs/provisioners/chef-client.html’ saved [37183/37183]
-
-2016-12-15 14:15:18 (11.7 MB/s) - ‘www.packer.io/docs/provisioners/chef-client.html’ saved [37183/37183]
-
---2016-12-15 14:15:18-- https://www.packer.io/docs/provisioners/chef-solo.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:18-- https://www.packer.io/docs/provisioners/chef-solo.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 31817 (31K) [text/html]
-Length: 31817 (31K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/chef-solo.html’
-Saving to: ‘www.packer.io/docs/provisioners/chef-solo.html’
-
- 0K .......... .....
- 0K .......... .......... ........ .......... . ....... . 100% 4.06M100% 4.06M=0.007s
-
-=0.007s
-
-2016-12-15 14:15:18 (4.06 MB/s) - ‘www.packer.io/docs/provisioners/chef-solo.html’ saved [31817/31817]
-
-2016-12-15 14:15:18 (4.06 MB/s) - ‘www.packer.io/docs/provisioners/chef-solo.html’ saved [31817/31817]
-
---2016-12-15 14:15:18-- https://www.packer.io/docs/provisioners/puppet-masterless.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:18-- https://www.packer.io/docs/provisioners/puppet-masterless.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 30444 (30K) [text/html]
-Length: 30444 (30K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/puppet-masterless.html’
-Saving to: ‘www.packer.io/docs/provisioners/puppet-masterless.html’
-
- 0K ..
- 0K .................. .. .................. ... .............. . 100%100% 2.15M 2.15M=0.01s
-
-=0.01s
-
-2016-12-15 14:15:19 (2.15 MB/s) - ‘www.packer.io/docs/provisioners/puppet-masterless.html’ saved [30444/30444]
-
-2016-12-15 14:15:19 (2.15 MB/s) - ‘www.packer.io/docs/provisioners/puppet-masterless.html’ saved [30444/30444]
-
---2016-12-15 14:15:19-- https://www.packer.io/docs/provisioners/puppet-server.html
---2016-12-15 14:15:19-- https://www.packer.io/docs/provisioners/puppet-server.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 26449 (26K) [text/html]
-Length: 26449 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/puppet-server.html’
-Saving to: ‘www.packer.io/docs/provisioners/puppet-server.html’
-
- 0K ........
- 0K .......... .. ............... ....... ...... 100% 109M=0s
-
-.. 100% 109M=0s
-
-2016-12-15 14:15:20 (109 MB/s) - ‘www.packer.io/docs/provisioners/puppet-server.html’ saved [26449/26449]
-
-2016-12-15 14:15:20 (109 MB/s) - ‘www.packer.io/docs/provisioners/puppet-server.html’ saved [26449/26449]
-
---2016-12-15 14:15:20-- https://www.packer.io/docs/provisioners/salt-masterless.html
---2016-12-15 14:15:20-- https://www.packer.io/docs/provisioners/salt-masterless.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 26447Length: 26447 (26K) (26K) [text/html]
- [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/salt-masterless.html’
-Saving to: ‘www.packer.io/docs/provisioners/salt-masterless.html’
-
- 0K ........
- 0K .......... ....... .......... ........ ..... .. 100%100% 3.47M 3.47M=0.007s
-
-=0.007s
-
-2016-12-15 14:15:21 (3.47 MB/s) - ‘www.packer.io/docs/provisioners/salt-masterless.html’ saved [26447/26447]
-
-2016-12-15 14:15:21 (3.47 MB/s) - ‘www.packer.io/docs/provisioners/salt-masterless.html’ saved [26447/26447]
-
---2016-12-15 14:15:21-- https://www.packer.io/docs/provisioners/windows-restart.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:21-- https://www.packer.io/docs/provisioners/windows-restart.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 23521200 OK
-Length: 23521 (23K) [text/html]
- (23K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/windows-restart.html’
-Saving to: ‘www.packer.io/docs/provisioners/windows-restart.html’
-
- 0K ........
- 0K .......... .... .................. . ... 100%100% 4.52M 4.52M=0.005s
-
-=0.005s
-
-2016-12-15 14:15:21 (4.52 MB/s) - ‘www.packer.io/docs/provisioners/windows-restart.html’ saved [23521/23521]
-
-2016-12-15 14:15:21 (4.52 MB/s) - ‘www.packer.io/docs/provisioners/windows-restart.html’ saved [23521/23521]
-
---2016-12-15 14:15:21-- https://www.packer.io/docs/provisioners/custom.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:21-- https://www.packer.io/docs/provisioners/custom.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22077Length: 22077 (22K) [text/html]
- (22K) [text/html]
-Saving to: ‘www.packer.io/docs/provisioners/custom.html’
-Saving to: ‘www.packer.io/docs/provisioners/custom.html’
-
- 0K ........
- 0K .......... ... .............. . ..... . 100% 100% 146M=0s 146M=0s
-
-
-
-2016-12-15 14:15:22 (146 MB/s) - ‘www.packer.io/docs/provisioners/custom.html’ saved [22077/22077]
-
-2016-12-15 14:15:22 (146 MB/s) - ‘www.packer.io/docs/provisioners/custom.html’ saved [22077/22077]
-
---2016-12-15 14:15:22-- https://www.packer.io/docs/post-processors/amazon-import.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:22-- https://www.packer.io/docs/post-processors/amazon-import.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 27414Length: 27414 (27K) [text/html]
- (27K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/amazon-import.html’
-Saving to: ‘www.packer.io/docs/post-processors/amazon-import.html’
-
- 0K .
- 0K ................. ....... .......... ...... ........ ... 100% 1.84M=0.01s
-
-100% 1.84M=0.01s
-
-2016-12-15 14:15:22 (1.84 MB/s) - ‘www.packer.io/docs/post-processors/amazon-import.html’ saved [27414/27414]
-
-2016-12-15 14:15:22 (1.84 MB/s) - ‘www.packer.io/docs/post-processors/amazon-import.html’ saved [27414/27414]
-
---2016-12-15 14:15:22-- https://www.packer.io/docs/post-processors/artifice.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:22-- https://www.packer.io/docs/post-processors/artifice.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 26710 (26K) [text/html]
-Length: 26710 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/artifice.html’
-Saving to: ‘www.packer.io/docs/post-processors/artifice.html’
-
- 0K ........
- 0K .......... .. ............... ........ ...... ... 100%100% 64.3M=0s 64.3M=0s
-
-
-
-2016-12-15 14:15:22 (64.3 MB/s) - ‘www.packer.io/docs/post-processors/artifice.html’ saved [26710/26710]
-
-2016-12-15 14:15:22 (64.3 MB/s) - ‘www.packer.io/docs/post-processors/artifice.html’ saved [26710/26710]
-
---2016-12-15 14:15:22-- https://www.packer.io/docs/post-processors/atlas.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:22-- https://www.packer.io/docs/post-processors/atlas.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 28026 (27K) [text/html]
-200 OK
-Length: 28026 (27K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/atlas.html’
-Saving to: ‘www.packer.io/docs/post-processors/atlas.html’
-
- 0K ......
- 0K ............ ....... .......... ........ ....... .... 100% 3.14M=0.009s
-
-100% 3.14M=0.009s
-
-2016-12-15 14:15:23 (3.14 MB/s) - ‘www.packer.io/docs/post-processors/atlas.html’ saved [28026/28026]
-
-2016-12-15 14:15:23 (3.14 MB/s) - ‘www.packer.io/docs/post-processors/atlas.html’ saved [28026/28026]
-
---2016-12-15 14:15:23-- https://www.packer.io/docs/post-processors/compress.html
---2016-12-15 14:15:23-- https://www.packer.io/docs/post-processors/compress.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24363 (24K) [text/html]
-Length: 24363 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/compress.html’
-Saving to: ‘www.packer.io/docs/post-processors/compress.html’
-
- 0K ........
- 0K .......... ....... .......... ........ ... 100%100% 41.9M 41.9M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:23 (41.9 MB/s) - ‘www.packer.io/docs/post-processors/compress.html’ saved [24363/24363]
-
-2016-12-15 14:15:23 (41.9 MB/s) - ‘www.packer.io/docs/post-processors/compress.html’ saved [24363/24363]
-
---2016-12-15 14:15:23-- https://www.packer.io/docs/post-processors/checksum.html
---2016-12-15 14:15:23-- https://www.packer.io/docs/post-processors/checksum.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 23347Length: 23347 (23K) [text/html]
- (23K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/checksum.html’
-Saving to: ‘www.packer.io/docs/post-processors/checksum.html’
-
- 0K .....
- 0K ............. ..... ............ .. ..... .. 100% 105M100% 105M=0s
-
-=0s
-
-2016-12-15 14:15:24 (105 MB/s) - ‘www.packer.io/docs/post-processors/checksum.html’ saved [23347/23347]
-
-2016-12-15 14:15:24 (105 MB/s) - ‘www.packer.io/docs/post-processors/checksum.html’ saved [23347/23347]
-
---2016-12-15 14:15:24-- https://www.packer.io/docs/post-processors/docker-import.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:24-- https://www.packer.io/docs/post-processors/docker-import.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 23311 (23K) [text/html]
-Length: 23311 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/docker-import.html’
-Saving to: ‘www.packer.io/docs/post-processors/docker-import.html’
-
- 0K ........
- 0K .......... .... ............. .. ..... .. 100%100% 69.5M 69.5M=0s
-
-=0s
-
-2016-12-15 14:15:24 (69.5 MB/s) - ‘www.packer.io/docs/post-processors/docker-import.html’ saved [23311/23311]
-
-2016-12-15 14:15:24 (69.5 MB/s) - ‘www.packer.io/docs/post-processors/docker-import.html’ saved [23311/23311]
-
---2016-12-15 14:15:24-- https://www.packer.io/docs/post-processors/docker-push.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:24-- https://www.packer.io/docs/post-processors/docker-push.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24958Length: 24958 (24K) (24K) [text/html]
- [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/docker-push.html’
-Saving to: ‘www.packer.io/docs/post-processors/docker-push.html’
-
- 0K ........
- 0K .......... ....... .......... ........ .... . 100%100% 1.32M 1.32M=0.02s
-
-=0.02s
-
-2016-12-15 14:15:24 (1.32 MB/s) - ‘www.packer.io/docs/post-processors/docker-push.html’ saved [24958/24958]
-
-2016-12-15 14:15:24 (1.32 MB/s) - ‘www.packer.io/docs/post-processors/docker-push.html’ saved [24958/24958]
-
---2016-12-15 14:15:24-- https://www.packer.io/docs/post-processors/docker-save.html
---2016-12-15 14:15:24-- https://www.packer.io/docs/post-processors/docker-save.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22841Length: 22841 (22K) [text/html]
- (22K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/docker-save.html’
-Saving to: ‘www.packer.io/docs/post-processors/docker-save.html’
-
- 0K ........
- 0K .......... .. ............... .. ..... .. 100% 100% 3.77M 3.77M=0.006s
-
-=0.006s
-
-2016-12-15 14:15:25 (3.77 MB/s) - ‘www.packer.io/docs/post-processors/docker-save.html’ saved [22841/22841]
-
-2016-12-15 14:15:25 (3.77 MB/s) - ‘www.packer.io/docs/post-processors/docker-save.html’ saved [22841/22841]
-
---2016-12-15 14:15:25-- https://www.packer.io/docs/post-processors/docker-tag.html
---2016-12-15 14:15:25-- https://www.packer.io/docs/post-processors/docker-tag.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 23572 (23K) [text/html]
-200 OK
-Length: 23572 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/docker-tag.html’
-Saving to: ‘www.packer.io/docs/post-processors/docker-tag.html’
-
- 0K ........
- 0K .......... ....... .......... ... ..... ... 100% 12.2M 100% 12.2M=0.002s
-
-=0.002s
-
-2016-12-15 14:15:25 (12.2 MB/s) - ‘www.packer.io/docs/post-processors/docker-tag.html’ saved [23572/23572]
-
-2016-12-15 14:15:25 (12.2 MB/s) - ‘www.packer.io/docs/post-processors/docker-tag.html’ saved [23572/23572]
-
---2016-12-15 14:15:25-- https://www.packer.io/docs/post-processors/googlecompute-export.html
---2016-12-15 14:15:25-- https://www.packer.io/docs/post-processors/googlecompute-export.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 24369 (24K) [text/html]
-24369 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/googlecompute-export.html’
-Saving to: ‘www.packer.io/docs/post-processors/googlecompute-export.html’
-
- 0K ......
- 0K ............ ....... ........... .... ...... 100%100% 4.46M=0.005s 4.46M=0.005s
-
-
-
-2016-12-15 14:15:25 (4.46 MB/s) - ‘www.packer.io/docs/post-processors/googlecompute-export.html’ saved [24369/24369]
-
-2016-12-15 14:15:25 (4.46 MB/s) - ‘www.packer.io/docs/post-processors/googlecompute-export.html’ saved [24369/24369]
-
---2016-12-15 14:15:25-- https://www.packer.io/docs/post-processors/shell-local.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:25-- https://www.packer.io/docs/post-processors/shell-local.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 30636 (30K)Length: 30636 (30K) [text/html]
- [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/shell-local.html’
-Saving to: ‘www.packer.io/docs/post-processors/shell-local.html’
-
- 0K ...
- 0K ............... ....... .......... ........ ......... ...... 100%100% 66.6M=0s
-
- 66.6M=0s
-
-2016-12-15 14:15:26 (66.6 MB/s) - ‘www.packer.io/docs/post-processors/shell-local.html’ saved [30636/30636]
-
-2016-12-15 14:15:26 (66.6 MB/s) - ‘www.packer.io/docs/post-processors/shell-local.html’ saved [30636/30636]
-
---2016-12-15 14:15:26-- https://www.packer.io/docs/post-processors/manifest.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:26-- https://www.packer.io/docs/post-processors/manifest.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 23576 (23K) [text/html]
-Length: 23576 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/manifest.html’
-Saving to: ‘www.packer.io/docs/post-processors/manifest.html’
-
- 0K ......
- 0K ............ ..... ................. . ..... 100% 2.49M100% 2.49M=0.009s
-
-=0.009s
-
-2016-12-15 14:15:26 (2.49 MB/s) - ‘www.packer.io/docs/post-processors/manifest.html’ saved [23576/23576]
-
-2016-12-15 14:15:26 (2.49 MB/s) - ‘www.packer.io/docs/post-processors/manifest.html’ saved [23576/23576]
-
---2016-12-15 14:15:26-- https://www.packer.io/docs/post-processors/vagrant.html
---2016-12-15 14:15:26-- https://www.packer.io/docs/post-processors/vagrant.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 26794 (26K) [text/html]
-Length: 26794 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/vagrant.html’
-Saving to: ‘www.packer.io/docs/post-processors/vagrant.html’
-
- 0K ........
- 0K ............ .... ........... ........ ...... ... 100% 54.7M100% 54.7M=0s
-
-=0s
-
-2016-12-15 14:15:27 (54.7 MB/s) - ‘www.packer.io/docs/post-processors/vagrant.html’ saved [26794/26794]
-
-2016-12-15 14:15:27 (54.7 MB/s) - ‘www.packer.io/docs/post-processors/vagrant.html’ saved [26794/26794]
-
---2016-12-15 14:15:27-- https://www.packer.io/docs/post-processors/vagrant-cloud.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:27-- https://www.packer.io/docs/post-processors/vagrant-cloud.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 27089 (26K) [text/html]
-Length: 27089 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/vagrant-cloud.html’
-Saving to: ‘www.packer.io/docs/post-processors/vagrant-cloud.html’
-
- 0K ........
- 0K .......... ....... .......... ........ ...... ... 100%100% 29.6M 29.6M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:27 (29.6 MB/s) - ‘www.packer.io/docs/post-processors/vagrant-cloud.html’ saved [27089/27089]
-
-2016-12-15 14:15:27 (29.6 MB/s) - ‘www.packer.io/docs/post-processors/vagrant-cloud.html’ saved [27089/27089]
-
---2016-12-15 14:15:27-- https://www.packer.io/docs/post-processors/vsphere.html
---2016-12-15 14:15:27-- https://www.packer.io/docs/post-processors/vsphere.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24559 (24K) [text/html]
-Length: 24559 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/post-processors/vsphere.html’
-Saving to: ‘www.packer.io/docs/post-processors/vsphere.html’
-
- 0K .....
- 0K ............. ....... .......... ........ ... 100% 45.3M100% 45.3M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:28 (45.3 MB/s) - ‘www.packer.io/docs/post-processors/vsphere.html’ saved [24559/24559]
-
-2016-12-15 14:15:28 (45.3 MB/s) - ‘www.packer.io/docs/post-processors/vsphere.html’ saved [24559/24559]
-
---2016-12-15 14:15:28-- https://www.packer.io/docs/other/core-configuration.html
---2016-12-15 14:15:28-- https://www.packer.io/docs/other/core-configuration.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 23837 (23K) [text/html]
-Length: 23837 (23K) [text/html]
-Saving to: ‘www.packer.io/docs/other/core-configuration.html’
-Saving to: ‘www.packer.io/docs/other/core-configuration.html’
-
- 0K ........
- 0K ............ ..... .......... ... ..... ... 100% 100% 1.21M 1.21M=0.02s
-
-=0.02s
-
-2016-12-15 14:15:28 (1.21 MB/s) - ‘www.packer.io/docs/other/core-configuration.html’ saved [23837/23837]
-
-2016-12-15 14:15:28 (1.21 MB/s) - ‘www.packer.io/docs/other/core-configuration.html’ saved [23837/23837]
-
---2016-12-15 14:15:28-- https://www.packer.io/docs/other/debugging.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:28-- https://www.packer.io/docs/other/debugging.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 26773 (26K) [text/html]
-Length: 26773 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/other/debugging.html’
-Saving to: ‘www.packer.io/docs/other/debugging.html’
-
- 0K .......
- 0K ........... ....... .......... ........ ...... ... 100%100% 99.7M=0s
-
- 99.7M=0s
-
-2016-12-15 14:15:29 (99.7 MB/s) - ‘www.packer.io/docs/other/debugging.html’ saved [26773/26773]
-
-2016-12-15 14:15:29 (99.7 MB/s) - ‘www.packer.io/docs/other/debugging.html’ saved [26773/26773]
-
---2016-12-15 14:15:29-- https://www.packer.io/docs/other/environmental-variables.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:29-- https://www.packer.io/docs/other/environmental-variables.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 24075 (24K) [text/html]
-Length: 24075 (24K) [text/html]
-Saving to: ‘www.packer.io/docs/other/environmental-variables.html’
-Saving to: ‘www.packer.io/docs/other/environmental-variables.html’
-
- 0K ........
- 0K .......... ....... .......... ........ ... 100% 100% 2.79M 2.79M=0.008s
-
-=0.008s
-
-2016-12-15 14:15:29 (2.79 MB/s) - ‘www.packer.io/docs/other/environmental-variables.html’ saved [24075/24075]
-
-2016-12-15 14:15:29 (2.79 MB/s) - ‘www.packer.io/docs/other/environmental-variables.html’ saved [24075/24075]
-
---2016-12-15 14:15:29-- https://www.packer.io/docs/extend/plugins.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:29-- https://www.packer.io/docs/extend/plugins.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 25311 (25K) [text/html]
-Length: 25311 (25K) [text/html]
-Saving to: ‘www.packer.io/docs/extend/plugins.html’
-Saving to: ‘www.packer.io/docs/extend/plugins.html’
-
- 0K ........
- 0K .......... ....... .......... ........ .... . 100% 100% 2.04M 2.04M=0.01s
-
-=0.01s
-
-2016-12-15 14:15:29 (2.04 MB/s) - ‘www.packer.io/docs/extend/plugins.html’ saved [25311/25311]
-
-2016-12-15 14:15:29 (2.04 MB/s) - ‘www.packer.io/docs/extend/plugins.html’ saved [25311/25311]
-
---2016-12-15 14:15:29-- https://www.packer.io/docs/extend/developing-plugins.html
---2016-12-15 14:15:29-- https://www.packer.io/docs/extend/developing-plugins.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 29277 (29K) [text/html]
-Length: 29277 (29K) [text/html]
-Saving to: ‘www.packer.io/docs/extend/developing-plugins.html’
-Saving to: ‘www.packer.io/docs/extend/developing-plugins.html’
-
- 0K ......
- 0K ............ ....... .......... ........ ............. 100% 41.5M=0.001s
-
-100% 41.5M=0.001s
-
-2016-12-15 14:15:30 (41.5 MB/s) - ‘www.packer.io/docs/extend/developing-plugins.html’ saved [29277/29277]
-
-2016-12-15 14:15:30 (41.5 MB/s) - ‘www.packer.io/docs/extend/developing-plugins.html’ saved [29277/29277]
-
---2016-12-15 14:15:30-- https://www.packer.io/docs/extend/builder.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:30-- https://www.packer.io/docs/extend/builder.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 30643 (30K) [text/html]
-200 OK
-Length: 30643 (30K) [text/html]
-Saving to: ‘www.packer.io/docs/extend/builder.html’
-Saving to: ‘www.packer.io/docs/extend/builder.html’
-
- 0K .......
- 0K .......... ........ .......... ....... .......... 100%...... 100% 2.29M=0.01s
-
- 2.29M=0.01s
-
-2016-12-15 14:15:30 (2.29 MB/s) - ‘www.packer.io/docs/extend/builder.html’ saved [30643/30643]
-
-2016-12-15 14:15:30 (2.29 MB/s) - ‘www.packer.io/docs/extend/builder.html’ saved [30643/30643]
-
---2016-12-15 14:15:30-- https://www.packer.io/docs/extend/post-processor.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:30-- https://www.packer.io/docs/extend/post-processor.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 26381 (26K) [text/html]
-Length: 26381 (26K) [text/html]
-Saving to: ‘www.packer.io/docs/extend/post-processor.html’
-Saving to: ‘www.packer.io/docs/extend/post-processor.html’
-
- 0K .....
- 0K ............. ....... .......... ........ ..... .. 100%100% 94.6M=0s 94.6M=0s
-
-
-
-2016-12-15 14:15:31 (94.6 MB/s) - ‘www.packer.io/docs/extend/post-processor.html’ saved [26381/26381]
-
-2016-12-15 14:15:31 (94.6 MB/s) - ‘www.packer.io/docs/extend/post-processor.html’ saved [26381/26381]
-
---2016-12-15 14:15:31-- https://www.packer.io/docs/extend/provisioner.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:31-- https://www.packer.io/docs/extend/provisioner.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 26462200 OK
-Length: 26462 (26K) [text/html]
- (26K) [text/html]
-Saving to: ‘www.packer.io/docs/extend/provisioner.html’
-Saving to: ‘www.packer.io/docs/extend/provisioner.html’
-
- 0K ........
- 0K .......... ....... .......... ........ ..... .. 100%100% 100M=0s
-
- 100M=0s
-
-2016-12-15 14:15:31 (100 MB/s) - ‘www.packer.io/docs/extend/provisioner.html’ saved [26462/26462]
-
-2016-12-15 14:15:31 (100 MB/s) - ‘www.packer.io/docs/extend/provisioner.html’ saved [26462/26462]
-
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_darwin-c019f8c4.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_darwin-c019f8c4.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 1850 (1.8K) [image/png]
-Length: 1850 (1.8K) [image/png]
-Saving to: ‘www.packer.io/assets/images/icons/icon_darwin-c019f8c4.png’
-Saving to: ‘www.packer.io/assets/images/icons/icon_darwin-c019f8c4.png’
-
- 0K .
- 0K . 100% 100% 118M=0s
-
- 118M=0s
-
-2016-12-15 14:15:31 (118 MB/s) - ‘www.packer.io/assets/images/icons/icon_darwin-c019f8c4.png’ saved [1850/1850]
-
-2016-12-15 14:15:31 (118 MB/s) - ‘www.packer.io/assets/images/icons/icon_darwin-c019f8c4.png’ saved [1850/1850]
-
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_freebsd-36cde04f.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_freebsd-36cde04f.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 5852 (5.7K) [image/png]
-5852 (5.7K) [image/png]
-Saving to: ‘www.packer.io/assets/images/icons/icon_freebsd-36cde04f.png’
-Saving to: ‘www.packer.io/assets/images/icons/icon_freebsd-36cde04f.png’
-
- 0K
- 0K .......... 100% 100% 558M=0s
-
- 558M=0s
-
-2016-12-15 14:15:31 (558 MB/s) - ‘www.packer.io/assets/images/icons/icon_freebsd-36cde04f.png’ saved [5852/5852]
-
-2016-12-15 14:15:31 (558 MB/s) - ‘www.packer.io/assets/images/icons/icon_freebsd-36cde04f.png’ saved [5852/5852]
-
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_linux-3568fb8e.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_linux-3568fb8e.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 4229 (4.1K) [image/png]
-4229 (4.1K) [image/png]
-Saving to: ‘www.packer.io/assets/images/icons/icon_linux-3568fb8e.png’
-Saving to: ‘www.packer.io/assets/images/icons/icon_linux-3568fb8e.png’
-
- 0K ..
- 0K ..... . 100%100% 517K 517K=0.008s
-
-=0.008s
-
-2016-12-15 14:15:31 (517 KB/s) - ‘www.packer.io/assets/images/icons/icon_linux-3568fb8e.png’ saved [4229/4229]
-
-2016-12-15 14:15:31 (517 KB/s) - ‘www.packer.io/assets/images/icons/icon_linux-3568fb8e.png’ saved [4229/4229]
-
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_openbsd-a48a02d5.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_openbsd-a48a02d5.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 10634 (10K) [image/png]
-Length: 10634 (10K) [image/png]
-Saving to: ‘www.packer.io/assets/images/icons/icon_openbsd-a48a02d5.png’
-Saving to: ‘www.packer.io/assets/images/icons/icon_openbsd-a48a02d5.png’
-
- 0K
- 0K .................... 100%100% 1.96M 1.96M=0.005s
-
-=0.005s
-
-2016-12-15 14:15:31 (1.96 MB/s) - ‘www.packer.io/assets/images/icons/icon_openbsd-a48a02d5.png’ saved [10634/10634]
-
-2016-12-15 14:15:31 (1.96 MB/s) - ‘www.packer.io/assets/images/icons/icon_openbsd-a48a02d5.png’ saved [10634/10634]
-
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_windows-9aefff0f.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/icons/icon_windows-9aefff0f.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 3292 (3.2K) [image/png]
-3292 (3.2K) [image/png]
-Saving to: ‘www.packer.io/assets/images/icons/icon_windows-9aefff0f.png’
-Saving to: ‘www.packer.io/assets/images/icons/icon_windows-9aefff0f.png’
-
- 0K ..
- 0K ... . 100% 3.59M 100% 3.59M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:31 (3.59 MB/s) - ‘www.packer.io/assets/images/icons/icon_windows-9aefff0f.png’ saved [3292/3292]
-
-2016-12-15 14:15:31 (3.59 MB/s) - ‘www.packer.io/assets/images/icons/icon_windows-9aefff0f.png’ saved [3292/3292]
-
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/fastly_logo-00afb3d4.png
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/fastly_logo-00afb3d4.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 3995 (3.9K) [image/png]
-Length: 3995 (3.9K) [image/png]
-Saving to: ‘www.packer.io/assets/images/fastly_logo-00afb3d4.png’
-Saving to: ‘www.packer.io/assets/images/fastly_logo-00afb3d4.png’
-
- 0K ..
- 0K .... 100% 100% 47.6M=0s
-
- 47.6M=0s
-
-2016-12-15 14:15:31 (47.6 MB/s) - ‘www.packer.io/assets/images/fastly_logo-00afb3d4.png’ saved [3995/3995]
-
-2016-12-15 14:15:31 (47.6 MB/s) - ‘www.packer.io/assets/images/fastly_logo-00afb3d4.png’ saved [3995/3995]
-
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/docs/atlas-workflow-f583af75.png
---2016-12-15 14:15:31-- https://www.packer.io/assets/images/docs/atlas-workflow-f583af75.png
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 87148Length: 87148 (85K) [image/png]
- (85K) [image/png]
-Saving to: ‘www.packer.io/assets/images/docs/atlas-workflow-f583af75.png’
-Saving to: ‘www.packer.io/assets/images/docs/atlas-workflow-f583af75.png’
-
- 0K ..
- 0K .................. .. .................. ... ............... ... .................. ........ .......... 58% 1.93M 0s
- 50K ........ 58% 1.93M 0s
- 50K .......... ........ .......... ........ .................. ..... . ..... 100%100% 4.20M 4.20M=0.03s
-
-=0.03s
-
-2016-12-15 14:15:31 (2.48 MB/s) - ‘www.packer.io/assets/images/docs/atlas-workflow-f583af75.png’ saved [87148/87148]
-
-2016-12-15 14:15:31 (2.48 MB/s) - ‘www.packer.io/assets/images/docs/atlas-workflow-f583af75.png’ saved [87148/87148]
-
---2016-12-15 14:15:31-- https://www.packer.io/?utm_source=packer&utm_campaign=HashicorpEcosystem
---2016-12-15 14:15:31-- https://www.packer.io/?utm_source=packer&utm_campaign=HashicorpEcosystem
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 17742200 OK
-Length: 17742 (17K) [text/html]
- (17K) [text/html]
-Saving to: ‘www.packer.io/index.html?utm_source=packer&utm_campaign=HashicorpEcosystem’
-
- 0K .......... ....... 100% 56.2M=0s
-
-Saving to: ‘www.packer.io/index.html?utm_source=packer&utm_campaign=HashicorpEcosystem’
-
- 0K .......... ....... 100% 56.2M=0s
-
-2016-12-15 14:15:32 (56.2 MB/s) - ‘www.packer.io/index.html?utm_source=packer&utm_campaign=HashicorpEcosystem’ saved [17742/17742]
-
-2016-12-15 14:15:32 (56.2 MB/s) - ‘www.packer.io/index.html?utm_source=packer&utm_campaign=HashicorpEcosystem’ saved [17742/17742]
-
---2016-12-15 14:15:32-- https://www.packer.io/assets/images/packer-signed-urls-9acd0852.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... --2016-12-15 14:15:32-- https://www.packer.io/assets/images/packer-signed-urls-9acd0852.png
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 22578 (22K) [image/png]
-22578 (22K) [image/png]
-Saving to: ‘www.packer.io/assets/images/packer-signed-urls-9acd0852.png’
-Saving to: ‘www.packer.io/assets/images/packer-signed-urls-9acd0852.png’
-
- 0K ........
- 0K ........... .... ............ .. ..... .. 100% 100% 19.6M 19.6M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:32 (19.6 MB/s) - ‘www.packer.io/assets/images/packer-signed-urls-9acd0852.png’ saved [22578/22578]
-
-2016-12-15 14:15:32 (19.6 MB/s) - ‘www.packer.io/assets/images/packer-signed-urls-9acd0852.png’ saved [22578/22578]
-
---2016-12-15 14:15:32-- https://www.packer.io/docs/machine-readable/index.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:32-- https://www.packer.io/docs/machine-readable/index.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 17374 (17K) [text/html]
-17374 (17K) [text/html]
-Saving to: ‘www.packer.io/docs/machine-readable/index.html’
-Saving to: ‘www.packer.io/docs/machine-readable/index.html’
-
- 0K ......
- 0K ............ ....... ...... . 100% 101M100% 101M=0s
-
-=0s
-
-2016-12-15 14:15:32 (101 MB/s) - ‘www.packer.io/docs/machine-readable/index.html’ saved [17374/17374]
-
-2016-12-15 14:15:32 (101 MB/s) - ‘www.packer.io/docs/machine-readable/index.html’ saved [17374/17374]
-
---2016-12-15 14:15:32-- https://www.packer.io/docs/builders/amazon-ebs.html
---2016-12-15 14:15:32-- https://www.packer.io/docs/builders/amazon-ebs.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 45231 (44K) [text/html]
-45231 (44K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/amazon-ebs.html’
-Saving to: ‘www.packer.io/docs/builders/amazon-ebs.html’
-
- 0K ........
- 0K .......... ....... .......... ........ .......... ........ .................. .... . .... 100% 4.26M 100% 4.26M=0.01s
-
-=0.01s
-
-2016-12-15 14:15:32 (4.26 MB/s) - ‘www.packer.io/docs/builders/amazon-ebs.html’ saved [45231/45231]
-
-2016-12-15 14:15:32 (4.26 MB/s) - ‘www.packer.io/docs/builders/amazon-ebs.html’ saved [45231/45231]
-
---2016-12-15 14:15:32-- https://www.packer.io/docs/builders/amazon-instance.html
---2016-12-15 14:15:32-- https://www.packer.io/docs/builders/amazon-instance.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 46272 (45K) [text/html]
-Length: 46272 (45K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/amazon-instance.html’
-Saving to: ‘www.packer.io/docs/builders/amazon-instance.html’
-
- 0K .....
- 0K ............. ....... .......... ........ .......... ........ .................. ..... 100% 4.16M=0.01s
-
-. ..... 100% 4.16M=0.01s
-
-2016-12-15 14:15:33 (4.16 MB/s) - ‘www.packer.io/docs/builders/amazon-instance.html’ saved [46272/46272]
-
-2016-12-15 14:15:33 (4.16 MB/s) - ‘www.packer.io/docs/builders/amazon-instance.html’ saved [46272/46272]
-
---2016-12-15 14:15:33-- https://www.packer.io/docs/builders/amazon-chroot.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:33-- https://www.packer.io/docs/builders/amazon-chroot.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 41652 (41K) [text/html]
-Length: 41652 (41K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/amazon-chroot.html’
-Saving to: ‘www.packer.io/docs/builders/amazon-chroot.html’
-
- 0K ........
- 0K .......... ....... .......... ........ .......... ........ .................. . 100% 4.18M100% 4.18M=0.01s
-
-=0.01s
-
-2016-12-15 14:15:33 (4.18 MB/s) - ‘www.packer.io/docs/builders/amazon-chroot.html’ saved [41652/41652]
-
-2016-12-15 14:15:33 (4.18 MB/s) - ‘www.packer.io/docs/builders/amazon-chroot.html’ saved [41652/41652]
-
---2016-12-15 14:15:33-- https://www.packer.io/docs/builders/amazon-ebs-volume.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:33-- https://www.packer.io/docs/builders/amazon-ebs-volume.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 42755 (42K) [text/html]
-Length: 42755 (42K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/amazon-ebs-volume.html’
-Saving to: ‘www.packer.io/docs/builders/amazon-ebs-volume.html’
-
- 0K ..
- 0K ................ ... .............. ........ .......... ........ .................. . 100% 40.2M. . 100% 40.2M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:34 (40.2 MB/s) - ‘www.packer.io/docs/builders/amazon-ebs-volume.html’ saved [42755/42755]
-
-2016-12-15 14:15:34 (40.2 MB/s) - ‘www.packer.io/docs/builders/amazon-ebs-volume.html’ saved [42755/42755]
-
---2016-12-15 14:15:34-- https://www.packer.io/docs/builders/azure-setup.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:34-- https://www.packer.io/docs/builders/azure-setup.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 31228200 OK
-Length: 31228 (30K) [text/html]
- (30K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/azure-setup.html’
-Saving to: ‘www.packer.io/docs/builders/azure-setup.html’
-
- 0K ..
- 0K ................. ... ............. ........ .............. ... 100% 32.0M100% 32.0M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:35 (32.0 MB/s) - ‘www.packer.io/docs/builders/azure-setup.html’ saved [31228/31228]
-
-2016-12-15 14:15:35 (32.0 MB/s) - ‘www.packer.io/docs/builders/azure-setup.html’ saved [31228/31228]
-
---2016-12-15 14:15:35-- https://www.packer.io/docs/builders/parallels-iso.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:35-- https://www.packer.io/docs/builders/parallels-iso.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 43388 (42K) [text/html]
-Length: 43388 (42K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/parallels-iso.html’
-Saving to: ‘www.packer.io/docs/builders/parallels-iso.html’
-
- 0K ........
- 0K .......... ..... ............ ........ .......... ........ .................. .. . .. 100% 100% 1.11M 1.11M=0.04s
-
-=0.04s
-
-2016-12-15 14:15:35 (1.11 MB/s) - ‘www.packer.io/docs/builders/parallels-iso.html’ saved [43388/43388]
-
-2016-12-15 14:15:35 (1.11 MB/s) - ‘www.packer.io/docs/builders/parallels-iso.html’ saved [43388/43388]
-
---2016-12-15 14:15:35-- https://www.packer.io/docs/builders/parallels-pvm.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:35-- https://www.packer.io/docs/builders/parallels-pvm.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 37604Length: 37604 (37K) (37K) [text/html]
- [text/html]
-Saving to: ‘www.packer.io/docs/builders/parallels-pvm.html’
-Saving to: ‘www.packer.io/docs/builders/parallels-pvm.html’
-
- 0K ..
- 0K ................ ... ................... ... ................ .. ........... 100% 100% 1.81M 1.81M=0.02s
-
-=0.02s
-
-2016-12-15 14:15:35 (1.81 MB/s) - ‘www.packer.io/docs/builders/parallels-pvm.html’ saved [37604/37604]
-
-2016-12-15 14:15:35 (1.81 MB/s) - ‘www.packer.io/docs/builders/parallels-pvm.html’ saved [37604/37604]
-
---2016-12-15 14:15:35-- https://www.packer.io/docs/builders/virtualbox-iso.html
---2016-12-15 14:15:35-- https://www.packer.io/docs/builders/virtualbox-iso.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 48850 (48K) [text/html]
-Length: 48850 (48K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/virtualbox-iso.html’
-Saving to: ‘www.packer.io/docs/builders/virtualbox-iso.html’
-
- 0K .......
- 0K ........... ....... .......... ........ .......... ........ .................. ........ ....... 100% 23.7M100% 23.7M=0.002s
-
-=0.002s
-
-2016-12-15 14:15:36 (23.7 MB/s) - ‘www.packer.io/docs/builders/virtualbox-iso.html’ saved [48850/48850]
-
-2016-12-15 14:15:36 (23.7 MB/s) - ‘www.packer.io/docs/builders/virtualbox-iso.html’ saved [48850/48850]
-
---2016-12-15 14:15:36-- https://www.packer.io/docs/builders/virtualbox-ovf.html
---2016-12-15 14:15:36-- https://www.packer.io/docs/builders/virtualbox-ovf.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 45595 (45K) [text/html]
-Length: 45595 (45K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/virtualbox-ovf.html’
-Saving to: ‘www.packer.io/docs/builders/virtualbox-ovf.html’
-
- 0K ........
- 0K .......... ....... .......... ........ .......... ........ .................. ... ..... . 100%100% 1.39M 1.39M=0.03s
-
-=0.03s
-
-2016-12-15 14:15:36 (1.39 MB/s) - ‘www.packer.io/docs/builders/virtualbox-ovf.html’ saved [45595/45595]
-
-2016-12-15 14:15:36 (1.39 MB/s) - ‘www.packer.io/docs/builders/virtualbox-ovf.html’ saved [45595/45595]
-
---2016-12-15 14:15:36-- https://www.packer.io/docs/builders/vmware-iso.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:36-- https://www.packer.io/docs/builders/vmware-iso.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 52652 (51K) [text/html]
-Length: 52652 (51K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/vmware-iso.html’
-Saving to: ‘www.packer.io/docs/builders/vmware-iso.html’
-
- 0K ..
- 0K .................. .. .................. ... ............... ... .................. ...... ............ 97% 1.25M 0s
- 50K ... 97% 1.25M 0s
- 50K . . 100% 28.4K100% 28.4K=0.04s
-
-=0.04s
-
-2016-12-15 14:15:39 (1.29 MB/s) - ‘www.packer.io/docs/builders/vmware-iso.html’ saved [52652/52652]
-
-2016-12-15 14:15:39 (1.29 MB/s) - ‘www.packer.io/docs/builders/vmware-iso.html’ saved [52652/52652]
-
---2016-12-15 14:15:39-- https://www.packer.io/docs/builders/vmware-vmx.html
---2016-12-15 14:15:39-- https://www.packer.io/docs/builders/vmware-vmx.html
-Reusing existing connection to www.packer.io:443.
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-Length: 200 OK
-Length: 37848 (37K) [text/html]
-37848 (37K) [text/html]
-Saving to: ‘www.packer.io/docs/builders/vmware-vmx.html’
-Saving to: ‘www.packer.io/docs/builders/vmware-vmx.html’
-
- 0K .......
- 0K ........... ....... .......... ........ .......... ........ ...... ..... 100% 100% 2.94M=0.01s 2.94M=0.01s
-
-
-
-2016-12-15 14:15:39 (2.94 MB/s) - ‘www.packer.io/docs/builders/vmware-vmx.html’ saved [37848/37848]
-
-2016-12-15 14:15:39 (2.94 MB/s) - ‘www.packer.io/docs/builders/vmware-vmx.html’ saved [37848/37848]
-
---2016-12-15 14:15:39-- https://www.packer.io/docs/index.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:39-- https://www.packer.io/docs/index.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 22068 (22K) [text/html]
-Length: 22068 (22K) [text/html]
-Saving to: ‘www.packer.io/docs/index.html’
-Saving to: ‘www.packer.io/docs/index.html’
-
- 0K ........
- 0K .......... ....... .......... . ..... . 100% 14.3M100% 14.3M=0.001s
-
-=0.001s
-
-2016-12-15 14:15:39 (14.3 MB/s) - ‘www.packer.io/docs/index.html’ saved [22068/22068]
-
-2016-12-15 14:15:39 (14.3 MB/s) - ‘www.packer.io/docs/index.html’ saved [22068/22068]
-
---2016-12-15 14:15:39-- https://www.packer.io/docs/machine-readable/general.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:39-- https://www.packer.io/docs/machine-readable/general.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 17161 (17K) [text/html]
-Length: 17161 (17K) [text/html]
-Saving to: ‘www.packer.io/docs/machine-readable/general.html’
-Saving to: ‘www.packer.io/docs/machine-readable/general.html’
-
- 0K
- 0K .... .............. ....... ...... . 100% 136M=0s
-
- 100% 136M=0s
-
-2016-12-15 14:15:40 (136 MB/s) - ‘www.packer.io/docs/machine-readable/general.html’ saved [17161/17161]
-
-2016-12-15 14:15:40 (136 MB/s) - ‘www.packer.io/docs/machine-readable/general.html’ saved [17161/17161]
-
---2016-12-15 14:15:40-- https://www.packer.io/docs/machine-readable/command-build.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:40-- https://www.packer.io/docs/machine-readable/command-build.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 20314 (20K) [text/html]
-Length: 20314 (20K) [text/html]
-Saving to: ‘www.packer.io/docs/machine-readable/command-build.html’
-Saving to: ‘www.packer.io/docs/machine-readable/command-build.html’
-
- 0K ...
- 0K ............... ....... ......... .... 100%100% 6.00M 6.00M=0.003s
-
-=0.003s
-
-2016-12-15 14:15:40 (6.00 MB/s) - ‘www.packer.io/docs/machine-readable/command-build.html’ saved [20314/20314]
-
-2016-12-15 14:15:40 (6.00 MB/s) - ‘www.packer.io/docs/machine-readable/command-build.html’ saved [20314/20314]
-
---2016-12-15 14:15:40-- https://www.packer.io/docs/machine-readable/command-inspect.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:40-- https://www.packer.io/docs/machine-readable/command-inspect.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 17681 (17K) [text/html]
-Length: 17681 (17K) [text/html]
-Saving to: ‘www.packer.io/docs/machine-readable/command-inspect.html’
-Saving to: ‘www.packer.io/docs/machine-readable/command-inspect.html’
-
- 0K ......
- 0K ............ ....... ....... .. 100% 100% 128M=0s 128M=0s
-
-
-
-2016-12-15 14:15:41 (128 MB/s) - ‘www.packer.io/docs/machine-readable/command-inspect.html’ saved [17681/17681]
-
-2016-12-15 14:15:41 (128 MB/s) - ‘www.packer.io/docs/machine-readable/command-inspect.html’ saved [17681/17681]
-
---2016-12-15 14:15:41-- https://www.packer.io/docs/machine-readable/command-version.html
-Reusing existing connection to www.packer.io:443.
---2016-12-15 14:15:41-- https://www.packer.io/docs/machine-readable/command-version.html
-Reusing existing connection to www.packer.io:443.
-HTTP request sent, awaiting response... HTTP request sent, awaiting response... 200 OK
-200 OK
-Length: 17473 (17K) [text/html]
-Length: 17473 (17K) [text/html]
-Saving to: ‘www.packer.io/docs/machine-readable/command-version.html’
-Saving to: ‘www.packer.io/docs/machine-readable/command-version.html’
-
- 0K ........
- 0K .......... ....... ....... .. 100%100% 8.48M=0.002s 8.48M=0.002s
-
-
-
-2016-12-15 14:15:41 (8.48 MB/s) - ‘www.packer.io/docs/machine-readable/command-version.html’ saved [17473/17473]
-
-2016-12-15 14:15:41 (8.48 MB/s) - ‘www.packer.io/docs/machine-readable/command-version.html’ saved [17473/17473]
-
-FINISHED --2016-12-15 14:15:41--
-Total wall clock time: 53s
-Downloaded: 135 files, 3.8M in 1.3s (2.85 MB/s)
-FINISHED --2016-12-15 14:15:41--
-Total wall clock time: 53s
-Downloaded: 135 files, 3.8M in 1.3s (2.85 MB/s)
From 64b8666531d79f2bffe958b35289b19771d699fb Mon Sep 17 00:00:00 2001
From: Matthew Aynalem
Date: Thu, 3 Aug 2017 07:49:15 -0700
Subject: [PATCH 054/122] move resource_pool to optional section
---
website/source/docs/post-processors/vsphere.html.md | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/website/source/docs/post-processors/vsphere.html.md b/website/source/docs/post-processors/vsphere.html.md
index 9b16cac79..9a04fe7a3 100644
--- a/website/source/docs/post-processors/vsphere.html.md
+++ b/website/source/docs/post-processors/vsphere.html.md
@@ -36,9 +36,6 @@ Required:
- `password` (string) - Password to use to authenticate to the
vSphere endpoint.
-- `resource_pool` (string) - The resource pool to upload the VM to. This is
- *not required*.
-
- `username` (string) - The username to use to authenticate to the
vSphere endpoint.
@@ -52,6 +49,8 @@ Optional:
- `insecure` (boolean) - Whether or not the connection to vSphere can be done
over an insecure connection. By default this is false.
+- `resource_pool` (string) - The resource pool to upload the VM to.
+
- `vm_folder` (string) - The folder within the datastore to store the VM.
- `vm_network` (string) - The name of the VM network this VM will be
From c760e1323f9ca1c21d5f0cb0b1127c6d83462f7b Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Thu, 3 Aug 2017 13:54:57 -0700
Subject: [PATCH 055/122] don't panic if the communicator is none and the port
is 0
---
builder/amazon/common/step_security_group.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/builder/amazon/common/step_security_group.go b/builder/amazon/common/step_security_group.go
index 7e4071370..a5032772b 100644
--- a/builder/amazon/common/step_security_group.go
+++ b/builder/amazon/common/step_security_group.go
@@ -45,7 +45,9 @@ func (s *StepSecurityGroup) Run(state multistep.StateBag) multistep.StepAction {
port := s.CommConfig.Port()
if port == 0 {
- panic("port must be set to a non-zero value.")
+ if s.CommConfig.Type != "none" {
+ panic("port must be set to a non-zero value.")
+ }
}
// Create the group
From 5280a027d8a00634cd52582a6d3aaeec124720e1 Mon Sep 17 00:00:00 2001
From: Bengt Brodersen
Date: Thu, 3 Aug 2017 23:11:52 +0200
Subject: [PATCH 056/122] Update _packer
---
contrib/zsh-completion/_packer | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/zsh-completion/_packer b/contrib/zsh-completion/_packer
index 66f5a8614..e0f73b5de 100644
--- a/contrib/zsh-completion/_packer
+++ b/contrib/zsh-completion/_packer
@@ -1,3 +1,5 @@
+#compdef packer
+
_packer () {
local -a sub_commands && sub_commands=(
'build:Build image(s) from template'
From c4e72dc4a0bf70e28e1e72dad54ff00ca8e7005b Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Thu, 3 Aug 2017 15:14:46 -0700
Subject: [PATCH 057/122] fix formatting
---
website/source/docs/templates/communicator.html.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/website/source/docs/templates/communicator.html.md b/website/source/docs/templates/communicator.html.md
index 07d6229ed..423ebe8ce 100644
--- a/website/source/docs/templates/communicator.html.md
+++ b/website/source/docs/templates/communicator.html.md
@@ -67,8 +67,7 @@ The SSH communicator has the following options:
- `ssh_bastion_password` (string) - The password to use to authenticate
with the bastion host.
-- `ssh_bastion_port` (integer) - The port of the bastion host. Defaults to
- 1.
+- `ssh_bastion_port` (integer) - The port of the bastion host. Defaults to 1.
- `ssh_bastion_private_key_file` (string) - A private key file to use
to authenticate with the bastion host.
From 974309d81f0b5a47692e8478c0910b6124b9f35b Mon Sep 17 00:00:00 2001
From: Matthew Aynalem
Date: Thu, 3 Aug 2017 20:29:35 -0700
Subject: [PATCH 058/122] fix alicloud misspelling, add missing sidebar_current
---
website/source/docs/post-processors/alicloud-import.html.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/website/source/docs/post-processors/alicloud-import.html.md b/website/source/docs/post-processors/alicloud-import.html.md
index eec52c90d..356eea84b 100644
--- a/website/source/docs/post-processors/alicloud-import.html.md
+++ b/website/source/docs/post-processors/alicloud-import.html.md
@@ -4,9 +4,10 @@ description: |
various builders and imports it to an Alicloud customized image list.
layout: docs
page_title: 'Alicloud Import Post-Processor'
+sidebar_current: 'docs-post-processors-alicloud-import'
---
-# Aicloud Import Post-Processor
+# Alicloud Import Post-Processor
Type: `alicloud-import`
From c96c15427248cae88af899b678908644d92d04ac Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 4 Aug 2017 14:01:46 -0700
Subject: [PATCH 059/122] update changelog
---
CHANGELOG.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index af789f820..1d4102ab7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,9 +5,12 @@
* builder/alicloud: Increase polling timeout. [GH-5148]
* builder/parallels: Remove soon to be removed --vmtype flag in createvm.
[GH-5172]
+* contrib: add json files to zsh completion. [GH-5195]
+
+### BUG FIXES:
+* builder/amazon: fix builds when using the null communicator. [GH-5217]
* core: Strip query parameters from ISO URLs when checking against a checksum
file. [GH-5181]
-* contrib: add json files to zsh completion. [GH-5195]
## 1.0.3 (July 17, 2017)
From d9a5b694036c20c11f98e444611c966752356687 Mon Sep 17 00:00:00 2001
From: Luke Farnell
Date: Mon, 7 Aug 2017 13:20:01 -0400
Subject: [PATCH 060/122] clean up ineffectual assignments
---
builder/azure/pkcs12/bmp-string_test.go | 2 +-
builder/azure/pkcs12/crypto_test.go | 2 --
builder/azure/pkcs12/pbkdf.go | 1 -
packer/plugin/plugin_test.go | 5 +++--
post-processor/vagrant-cloud/step_release_version.go | 5 +++--
provisioner/powershell/provisioner_test.go | 3 +++
provisioner/puppet-masterless/provisioner_test.go | 3 +++
provisioner/puppet-server/provisioner_test.go | 6 +++++-
provisioner/windows-shell/provisioner_test.go | 6 +++++-
9 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/builder/azure/pkcs12/bmp-string_test.go b/builder/azure/pkcs12/bmp-string_test.go
index 8d4599e91..7b861c3e8 100644
--- a/builder/azure/pkcs12/bmp-string_test.go
+++ b/builder/azure/pkcs12/bmp-string_test.go
@@ -63,7 +63,7 @@ func TestBMPString(t *testing.T) {
// some character outside the BMP should error
tst = "\U0001f000 East wind (Mahjong)"
- str, err = bmpString(tst)
+ _, err = bmpString(tst)
if err == nil {
t.Errorf("expected '%s' to throw error because the first character is not in the BMP", tst)
}
diff --git a/builder/azure/pkcs12/crypto_test.go b/builder/azure/pkcs12/crypto_test.go
index fb7f8484d..46cbc21cd 100644
--- a/builder/azure/pkcs12/crypto_test.go
+++ b/builder/azure/pkcs12/crypto_test.go
@@ -21,7 +21,6 @@ func pbDecrypterFor(algorithm pkix.AlgorithmIdentifier, password []byte) (cipher
k := deriveKeyByAlg[algorithmName](params.Salt, password, params.Iterations)
iv := deriveIVByAlg[algorithmName](params.Salt, password, params.Iterations)
- password = nil
code, err := blockcodeByAlg[algorithmName](k)
if err != nil {
@@ -34,7 +33,6 @@ func pbDecrypterFor(algorithm pkix.AlgorithmIdentifier, password []byte) (cipher
func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error) {
cbc, err := pbDecrypterFor(info.GetAlgorithm(), password)
- password = nil
if err != nil {
return nil, err
}
diff --git a/builder/azure/pkcs12/pbkdf.go b/builder/azure/pkcs12/pbkdf.go
index 29685723f..ea789566b 100644
--- a/builder/azure/pkcs12/pbkdf.go
+++ b/builder/azure/pkcs12/pbkdf.go
@@ -113,7 +113,6 @@ func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID
for len(P) < times*v {
P = append(P, password...)
}
- password = nil
P = P[:times*v]
}
diff --git a/packer/plugin/plugin_test.go b/packer/plugin/plugin_test.go
index d35e7bb7b..d5867148b 100644
--- a/packer/plugin/plugin_test.go
+++ b/packer/plugin/plugin_test.go
@@ -2,12 +2,13 @@ package plugin
import (
"fmt"
- "github.com/hashicorp/packer/packer"
"log"
"os"
"os/exec"
"testing"
"time"
+
+ "github.com/hashicorp/packer/packer"
)
func helperProcess(s ...string) *exec.Cmd {
@@ -48,7 +49,7 @@ func TestHelperProcess(*testing.T) {
os.Exit(2)
}
- cmd, args := args[0], args[1:]
+ cmd, _ := args[0], args[1:]
switch cmd {
case "bad-version":
fmt.Printf("%s1|tcp|:1234\n", APIVersion)
diff --git a/post-processor/vagrant-cloud/step_release_version.go b/post-processor/vagrant-cloud/step_release_version.go
index 7b6b25e93..73ba9b6f8 100644
--- a/post-processor/vagrant-cloud/step_release_version.go
+++ b/post-processor/vagrant-cloud/step_release_version.go
@@ -2,9 +2,10 @@ package vagrantcloud
import (
"fmt"
+ "strings"
+
"github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep"
- "strings"
)
type stepReleaseVersion struct {
@@ -30,7 +31,7 @@ func (s *stepReleaseVersion) Run(state multistep.StateBag) multistep.StepAction
if err != nil || (resp.StatusCode != 200) {
cloudErrors := &VagrantCloudErrors{}
- err = decodeBody(resp, cloudErrors)
+ _ = decodeBody(resp, cloudErrors)
if strings.Contains(cloudErrors.FormatErrors(), "already been released") {
ui.Message("Not releasing version, already released")
return multistep.ActionContinue
diff --git a/provisioner/powershell/provisioner_test.go b/provisioner/powershell/provisioner_test.go
index a0d6d80c0..f0d375e3b 100644
--- a/provisioner/powershell/provisioner_test.go
+++ b/provisioner/powershell/provisioner_test.go
@@ -41,6 +41,9 @@ func TestProvisionerPrepare_extractScript(t *testing.T) {
// File contents should contain 2 lines concatenated by newlines: foo\nbar
readFile, err := ioutil.ReadFile(file)
expectedContents := "foo\nbar\n"
+ if err != nil {
+ t.Fatalf("Should not be error: %s", err)
+ }
s := string(readFile[:])
if s != expectedContents {
t.Fatalf("Expected generated inlineScript to equal '%s', got '%s'", expectedContents, s)
diff --git a/provisioner/puppet-masterless/provisioner_test.go b/provisioner/puppet-masterless/provisioner_test.go
index 6c58f63d7..84defbef9 100644
--- a/provisioner/puppet-masterless/provisioner_test.go
+++ b/provisioner/puppet-masterless/provisioner_test.go
@@ -200,6 +200,9 @@ func TestProvisionerPrepare_facterFacts(t *testing.T) {
delete(config, "facter")
p = new(Provisioner)
err = p.Prepare(config)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
if p.config.Facter == nil {
t.Fatalf("err: Default facts are not set in the Puppet provisioner!")
}
diff --git a/provisioner/puppet-server/provisioner_test.go b/provisioner/puppet-server/provisioner_test.go
index a41a6bec5..4c7746c78 100644
--- a/provisioner/puppet-server/provisioner_test.go
+++ b/provisioner/puppet-server/provisioner_test.go
@@ -1,10 +1,11 @@
package puppetserver
import (
- "github.com/hashicorp/packer/packer"
"io/ioutil"
"os"
"testing"
+
+ "github.com/hashicorp/packer/packer"
)
func testConfig() map[string]interface{} {
@@ -167,6 +168,9 @@ func TestProvisionerPrepare_facterFacts(t *testing.T) {
delete(config, "facter")
p = new(Provisioner)
err = p.Prepare(config)
+ if err != nil {
+ t.Fatalf("err: %s", err)
+ }
if p.config.Facter == nil {
t.Fatalf("err: Default facts are not set in the Puppet provisioner!")
}
diff --git a/provisioner/windows-shell/provisioner_test.go b/provisioner/windows-shell/provisioner_test.go
index 62f78f20a..1f2ee2cab 100644
--- a/provisioner/windows-shell/provisioner_test.go
+++ b/provisioner/windows-shell/provisioner_test.go
@@ -4,13 +4,14 @@ import (
"bytes"
"errors"
"fmt"
- "github.com/hashicorp/packer/packer"
"io/ioutil"
"log"
"os"
"strings"
"testing"
"time"
+
+ "github.com/hashicorp/packer/packer"
)
func testConfig() map[string]interface{} {
@@ -34,6 +35,9 @@ func TestProvisionerPrepare_extractScript(t *testing.T) {
// File contents should contain 2 lines concatenated by newlines: foo\nbar
readFile, err := ioutil.ReadFile(file)
+ if err != nil {
+ t.Fatalf("Should not be error: %s", err)
+ }
expectedContents := "foo\nbar\n"
s := string(readFile[:])
if s != expectedContents {
From 7c3eb33cda7bf3db54f8abb03b1cadd4a223fa40 Mon Sep 17 00:00:00 2001
From: Luke Farnell
Date: Mon, 7 Aug 2017 13:45:50 -0400
Subject: [PATCH 061/122] Fixed spelling mistakes
---
builder/alicloud/ecs/step_config_vswitch.go | 2 +-
builder/digitalocean/step_snapshot.go | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builder/alicloud/ecs/step_config_vswitch.go b/builder/alicloud/ecs/step_config_vswitch.go
index 734647e07..dfa858d0b 100644
--- a/builder/alicloud/ecs/step_config_vswitch.go
+++ b/builder/alicloud/ecs/step_config_vswitch.go
@@ -113,7 +113,7 @@ func (s *stepConfigAlicloudVSwitch) Run(state multistep.StateBag) multistep.Step
}
if err := client.WaitForVSwitchAvailable(vpcId, s.VSwitchId, ALICLOUD_DEFAULT_TIMEOUT); err != nil {
state.Put("error", err)
- ui.Error(fmt.Sprintf("Timeout waiting for vswitch to become avaiable: %v", err))
+ ui.Error(fmt.Sprintf("Timeout waiting for vswitch to become available: %v", err))
return multistep.ActionHalt
}
state.Put("vswitchid", vswitchId)
diff --git a/builder/digitalocean/step_snapshot.go b/builder/digitalocean/step_snapshot.go
index bd5298137..eb91fdead 100644
--- a/builder/digitalocean/step_snapshot.go
+++ b/builder/digitalocean/step_snapshot.go
@@ -85,12 +85,12 @@ func (s *stepSnapshot) Run(state multistep.StateBag) multistep.StepAction {
}
imageTransfer, _, err := client.ImageActions.Transfer(context.TODO(), images[0].ID, transferRequest)
if err != nil {
- err := fmt.Errorf("Error transfering snapshot: %s", err)
+ err := fmt.Errorf("Error transferring snapshot: %s", err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
- ui.Say(fmt.Sprintf("Transfering Snapshot ID: %d", imageTransfer.ID))
+ ui.Say(fmt.Sprintf("transferring Snapshot ID: %d", imageTransfer.ID))
if err := waitForImageState(godo.ActionCompleted, imageTransfer.ID, action.ID,
client, 20*time.Minute); err != nil {
// If we get an error the first time, actually report it
From 943e8e648a01aae928bf2611cefa20ec47cdced8 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Mon, 7 Aug 2017 11:09:40 -0700
Subject: [PATCH 062/122] properly handle decode error
---
post-processor/vagrant-cloud/step_release_version.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/post-processor/vagrant-cloud/step_release_version.go b/post-processor/vagrant-cloud/step_release_version.go
index 73ba9b6f8..cc4db611f 100644
--- a/post-processor/vagrant-cloud/step_release_version.go
+++ b/post-processor/vagrant-cloud/step_release_version.go
@@ -31,7 +31,10 @@ func (s *stepReleaseVersion) Run(state multistep.StateBag) multistep.StepAction
if err != nil || (resp.StatusCode != 200) {
cloudErrors := &VagrantCloudErrors{}
- _ = decodeBody(resp, cloudErrors)
+ if err := decodeBody(resp, cloudErrors); err != nil {
+ state.Put("error", fmt.Errorf("Error parsing provider response: %s", err))
+ return multistep.ActionHalt
+ }
if strings.Contains(cloudErrors.FormatErrors(), "already been released") {
ui.Message("Not releasing version, already released")
return multistep.ActionContinue
From ada8902721df0b5c4276e5b14eac68a6eb7c563a Mon Sep 17 00:00:00 2001
From: Tobias
Date: Tue, 8 Aug 2017 13:21:53 +0000
Subject: [PATCH 063/122] fix formatting
---
builder/hyperv/iso/builder.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/hyperv/iso/builder.go b/builder/hyperv/iso/builder.go
index 07c776d11..657c07886 100644
--- a/builder/hyperv/iso/builder.go
+++ b/builder/hyperv/iso/builder.go
@@ -92,7 +92,7 @@ type Config struct {
// Prepare processes the build configuration parameters.
func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
err := config.Decode(&b.config, &config.DecodeOpts{
- Interpolate: true,
+ Interpolate: true,
InterpolateContext: &b.config.ctx,
InterpolateFilter: &interpolate.RenderFilter{
Exclude: []string{
From d909c702eeab652d66220e1e3afe2974e33f8ea5 Mon Sep 17 00:00:00 2001
From: Joao Albuquerque
Date: Sun, 6 Aug 2017 23:32:44 +0100
Subject: [PATCH 064/122] Working PublicPrivate
---
builder/azure/arm/builder.go | 8 +-
builder/azure/arm/config.go | 36 ++---
builder/azure/arm/step_get_ip_address.go | 13 +-
builder/azure/arm/step_get_ip_address_test.go | 131 ++++++++--------
builder/azure/arm/template_factory.go | 7 +-
...stVirtualMachineDeployment10.approved.json | 141 ++++++++++++++++++
builder/azure/arm/template_factory_test.go | 37 +++++
.../azure/common/template/template_builder.go | 18 +++
website/source/docs/builders/azure.html.md | 7 +-
9 files changed, 315 insertions(+), 83 deletions(-)
create mode 100644 builder/azure/arm/template_factory_test.TestVirtualMachineDeployment10.approved.json
diff --git a/builder/azure/arm/builder.go b/builder/azure/arm/builder.go
index 5377b7bb6..b8658cd8d 100644
--- a/builder/azure/arm/builder.go
+++ b/builder/azure/arm/builder.go
@@ -119,7 +119,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
}
endpointConnectType := PublicEndpoint
- if b.isPrivateNetworkCommunication() {
+ if b.isPublicPrivateNetworkCommunication() && b.isPrivateNetworkCommunication() {
+ endpointConnectType = PublicEndpointInPrivateNetwork
+ } else if b.isPrivateNetworkCommunication() {
endpointConnectType = PrivateEndpoint
}
@@ -245,6 +247,10 @@ func (b *Builder) writeSSHPrivateKey(ui packer.Ui, debugKeyPath string) {
}
}
+func (b *Builder) isPublicPrivateNetworkCommunication() bool {
+ return DefaultPrivateVirtualNetworkWithPublicIp != b.config.PrivateVirtualNetworkWithPublicIp
+}
+
func (b *Builder) isPrivateNetworkCommunication() bool {
return b.config.VirtualNetworkName != ""
}
diff --git a/builder/azure/arm/config.go b/builder/azure/arm/config.go
index 1d0c98d14..08ab3ffb2 100644
--- a/builder/azure/arm/config.go
+++ b/builder/azure/arm/config.go
@@ -34,10 +34,11 @@ import (
)
const (
- DefaultCloudEnvironmentName = "Public"
- DefaultImageVersion = "latest"
- DefaultUserName = "packer"
- DefaultVMSize = "Standard_A1"
+ DefaultCloudEnvironmentName = "Public"
+ DefaultImageVersion = "latest"
+ DefaultUserName = "packer"
+ DefaultPrivateVirtualNetworkWithPublicIp = false
+ DefaultVMSize = "Standard_A1"
)
var (
@@ -78,19 +79,20 @@ type Config struct {
manageImageLocation string
// Deployment
- AzureTags map[string]*string `mapstructure:"azure_tags"`
- ResourceGroupName string `mapstructure:"resource_group_name"`
- StorageAccount string `mapstructure:"storage_account"`
- TempComputeName string `mapstructure:"temp_compute_name"`
- TempResourceGroupName string `mapstructure:"temp_resource_group_name"`
- storageAccountBlobEndpoint string
- CloudEnvironmentName string `mapstructure:"cloud_environment_name"`
- cloudEnvironment *azure.Environment
- VirtualNetworkName string `mapstructure:"virtual_network_name"`
- VirtualNetworkSubnetName string `mapstructure:"virtual_network_subnet_name"`
- VirtualNetworkResourceGroupName string `mapstructure:"virtual_network_resource_group_name"`
- CustomDataFile string `mapstructure:"custom_data_file"`
- customData string
+ AzureTags map[string]*string `mapstructure:"azure_tags"`
+ ResourceGroupName string `mapstructure:"resource_group_name"`
+ StorageAccount string `mapstructure:"storage_account"`
+ TempComputeName string `mapstructure:"temp_compute_name"`
+ TempResourceGroupName string `mapstructure:"temp_resource_group_name"`
+ storageAccountBlobEndpoint string
+ CloudEnvironmentName string `mapstructure:"cloud_environment_name"`
+ cloudEnvironment *azure.Environment
+ PrivateVirtualNetworkWithPublicIp bool `mapstructure:"private_virtual_network_with_public_ip"`
+ VirtualNetworkName string `mapstructure:"virtual_network_name"`
+ VirtualNetworkSubnetName string `mapstructure:"virtual_network_subnet_name"`
+ VirtualNetworkResourceGroupName string `mapstructure:"virtual_network_resource_group_name"`
+ CustomDataFile string `mapstructure:"custom_data_file"`
+ customData string
// OS
OSType string `mapstructure:"os_type"`
diff --git a/builder/azure/arm/step_get_ip_address.go b/builder/azure/arm/step_get_ip_address.go
index fed78afbb..69b17a64f 100644
--- a/builder/azure/arm/step_get_ip_address.go
+++ b/builder/azure/arm/step_get_ip_address.go
@@ -16,12 +16,14 @@ type EndpointType int
const (
PublicEndpoint EndpointType = iota
PrivateEndpoint
+ PublicEndpointInPrivateNetwork
)
var (
EndpointCommunicationText = map[EndpointType]string{
- PublicEndpoint: "PublicEndpoint",
- PrivateEndpoint: "PrivateEndpoint",
+ PublicEndpoint: "PublicEndpoint",
+ PrivateEndpoint: "PrivateEndpoint",
+ PublicEndpointInPrivateNetwork: "PublicEndpointInPrivateNetwork",
}
)
@@ -46,6 +48,8 @@ func NewStepGetIPAddress(client *AzureClient, ui packer.Ui, endpoint EndpointTyp
step.get = step.getPrivateIP
case PublicEndpoint:
step.get = step.getPublicIP
+ case PublicEndpointInPrivateNetwork:
+ step.get = step.getPublicIPInPrivateNetwork
}
return step
@@ -70,6 +74,11 @@ func (s *StepGetIPAddress) getPublicIP(resourceGroupName string, ipAddressName s
return *resp.IPAddress, nil
}
+func (s *StepGetIPAddress) getPublicIPInPrivateNetwork(resourceGroupName string, ipAddressName string, interfaceName string) (string, error) {
+ s.getPrivateIP(resourceGroupName, ipAddressName, interfaceName)
+ return s.getPublicIP(resourceGroupName, ipAddressName, interfaceName)
+}
+
func (s *StepGetIPAddress) Run(state multistep.StateBag) multistep.StepAction {
s.say("Getting the VM's IP address ...")
diff --git a/builder/azure/arm/step_get_ip_address_test.go b/builder/azure/arm/step_get_ip_address_test.go
index a0b854ed0..f19c14425 100644
--- a/builder/azure/arm/step_get_ip_address_test.go
+++ b/builder/azure/arm/step_get_ip_address_test.go
@@ -12,42 +12,50 @@ import (
)
func TestStepGetIPAddressShouldFailIfGetFails(t *testing.T) {
- var testSubject = &StepGetIPAddress{
- get: func(string, string, string) (string, error) { return "", fmt.Errorf("!! Unit Test FAIL !!") },
- endpoint: PublicEndpoint,
- say: func(message string) {},
- error: func(e error) {},
- }
+ endpoints := []EndpointType{PublicEndpoint, PublicEndpointInPrivateNetwork}
- stateBag := createTestStateBagStepGetIPAddress()
+ for _, endpoint := range endpoints {
+ var testSubject = &StepGetIPAddress{
+ get: func(string, string, string) (string, error) { return "", fmt.Errorf("!! Unit Test FAIL !!") },
+ endpoint: endpoint,
+ say: func(message string) {},
+ error: func(e error) {},
+ }
- var result = testSubject.Run(stateBag)
- if result != multistep.ActionHalt {
- t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
- }
+ stateBag := createTestStateBagStepGetIPAddress()
- if _, ok := stateBag.GetOk(constants.Error); ok == false {
- t.Fatalf("Expected the step to set stateBag['%s'], but it was not.", constants.Error)
+ var result = testSubject.Run(stateBag)
+ if result != multistep.ActionHalt {
+ t.Fatalf("Expected the step to return 'ActionHalt', but got '%d'.", result)
+ }
+
+ if _, ok := stateBag.GetOk(constants.Error); ok == false {
+ t.Fatalf("Expected the step to set stateBag['%s'], but it was not.", constants.Error)
+ }
}
}
func TestStepGetIPAddressShouldPassIfGetPasses(t *testing.T) {
- var testSubject = &StepGetIPAddress{
- get: func(string, string, string) (string, error) { return "", nil },
- endpoint: PublicEndpoint,
- say: func(message string) {},
- error: func(e error) {},
- }
+ endpoints := []EndpointType{PublicEndpoint, PublicEndpointInPrivateNetwork}
- stateBag := createTestStateBagStepGetIPAddress()
+ for _, endpoint := range endpoints {
+ var testSubject = &StepGetIPAddress{
+ get: func(string, string, string) (string, error) { return "", nil },
+ endpoint: endpoint,
+ say: func(message string) {},
+ error: func(e error) {},
+ }
- var result = testSubject.Run(stateBag)
- if result != multistep.ActionContinue {
- t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)
- }
+ stateBag := createTestStateBagStepGetIPAddress()
- if _, ok := stateBag.GetOk(constants.Error); ok == true {
- t.Fatalf("Expected the step to not set stateBag['%s'], but it was.", constants.Error)
+ var result = testSubject.Run(stateBag)
+ if result != multistep.ActionContinue {
+ t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)
+ }
+
+ if _, ok := stateBag.GetOk(constants.Error); ok == true {
+ t.Fatalf("Expected the step to not set stateBag['%s'], but it was.", constants.Error)
+ }
}
}
@@ -55,50 +63,53 @@ func TestStepGetIPAddressShouldTakeStepArgumentsFromStateBag(t *testing.T) {
var actualResourceGroupName string
var actualIPAddressName string
var actualNicName string
+ endpoints := []EndpointType{PublicEndpoint, PublicEndpointInPrivateNetwork}
- var testSubject = &StepGetIPAddress{
- get: func(resourceGroupName string, ipAddressName string, nicName string) (string, error) {
- actualResourceGroupName = resourceGroupName
- actualIPAddressName = ipAddressName
- actualNicName = nicName
+ for _, endpoint := range endpoints {
+ var testSubject = &StepGetIPAddress{
+ get: func(resourceGroupName string, ipAddressName string, nicName string) (string, error) {
+ actualResourceGroupName = resourceGroupName
+ actualIPAddressName = ipAddressName
+ actualNicName = nicName
- return "127.0.0.1", nil
- },
- endpoint: PublicEndpoint,
- say: func(message string) {},
- error: func(e error) {},
- }
+ return "127.0.0.1", nil
+ },
+ endpoint: endpoint,
+ say: func(message string) {},
+ error: func(e error) {},
+ }
- stateBag := createTestStateBagStepGetIPAddress()
- var result = testSubject.Run(stateBag)
+ stateBag := createTestStateBagStepGetIPAddress()
+ var result = testSubject.Run(stateBag)
- if result != multistep.ActionContinue {
- t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)
- }
+ if result != multistep.ActionContinue {
+ t.Fatalf("Expected the step to return 'ActionContinue', but got '%d'.", result)
+ }
- var expectedResourceGroupName = stateBag.Get(constants.ArmResourceGroupName).(string)
- var expectedIPAddressName = stateBag.Get(constants.ArmPublicIPAddressName).(string)
- var expectedNicName = stateBag.Get(constants.ArmNicName).(string)
+ var expectedResourceGroupName = stateBag.Get(constants.ArmResourceGroupName).(string)
+ var expectedIPAddressName = stateBag.Get(constants.ArmPublicIPAddressName).(string)
+ var expectedNicName = stateBag.Get(constants.ArmNicName).(string)
- if actualIPAddressName != expectedIPAddressName {
- t.Fatal("Expected StepGetIPAddress to source 'constants.ArmIPAddressName' from the state bag, but it did not.")
- }
+ if actualIPAddressName != expectedIPAddressName {
+ t.Fatal("Expected StepGetIPAddress to source 'constants.ArmIPAddressName' from the state bag, but it did not.")
+ }
- if actualResourceGroupName != expectedResourceGroupName {
- t.Fatal("Expected StepGetIPAddress to source 'constants.ArmResourceGroupName' from the state bag, but it did not.")
- }
+ if actualResourceGroupName != expectedResourceGroupName {
+ t.Fatal("Expected StepGetIPAddress to source 'constants.ArmResourceGroupName' from the state bag, but it did not.")
+ }
- if actualNicName != expectedNicName {
- t.Fatalf("Expected StepGetIPAddress to source 'constants.ArmNetworkInterfaceName' from the state bag, but it did not.")
- }
+ if actualNicName != expectedNicName {
+ t.Fatalf("Expected StepGetIPAddress to source 'constants.ArmNetworkInterfaceName' from the state bag, but it did not.")
+ }
- expectedIPAddress, ok := stateBag.GetOk(constants.SSHHost)
- if !ok {
- t.Fatalf("Expected the state bag to have a value for '%s', but it did not.", constants.SSHHost)
- }
+ expectedIPAddress, ok := stateBag.GetOk(constants.SSHHost)
+ if !ok {
+ t.Fatalf("Expected the state bag to have a value for '%s', but it did not.", constants.SSHHost)
+ }
- if expectedIPAddress != "127.0.0.1" {
- t.Fatalf("Expected the value of stateBag[%s] to be '127.0.0.1', but got '%s'.", constants.SSHHost, expectedIPAddress)
+ if expectedIPAddress != "127.0.0.1" {
+ t.Fatalf("Expected the value of stateBag[%s] to be '127.0.0.1', but got '%s'.", constants.SSHHost, expectedIPAddress)
+ }
}
}
diff --git a/builder/azure/arm/template_factory.go b/builder/azure/arm/template_factory.go
index 3cd00845f..fd4d96fe5 100644
--- a/builder/azure/arm/template_factory.go
+++ b/builder/azure/arm/template_factory.go
@@ -76,7 +76,12 @@ func GetVirtualMachineDeployment(config *Config) (*resources.Deployment, error)
builder.SetCustomData(config.customData)
}
- if config.VirtualNetworkName != "" {
+ if config.VirtualNetworkName != "" && DefaultPrivateVirtualNetworkWithPublicIp != config.PrivateVirtualNetworkWithPublicIp {
+ builder.SetPrivateVirtualNetworWithPublicIp(
+ config.VirtualNetworkResourceGroupName,
+ config.VirtualNetworkName,
+ config.VirtualNetworkSubnetName)
+ } else if config.VirtualNetworkName != "" {
builder.SetVirtualNetwork(
config.VirtualNetworkResourceGroupName,
config.VirtualNetworkName,
diff --git a/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment10.approved.json b/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment10.approved.json
new file mode 100644
index 000000000..9ad7217c7
--- /dev/null
+++ b/builder/azure/arm/template_factory_test.TestVirtualMachineDeployment10.approved.json
@@ -0,0 +1,141 @@
+{
+ "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "adminPassword": {
+ "type": "string"
+ },
+ "adminUsername": {
+ "type": "string"
+ },
+ "dnsNameForPublicIP": {
+ "type": "string"
+ },
+ "osDiskName": {
+ "type": "string"
+ },
+ "storageAccountBlobEndpoint": {
+ "type": "string"
+ },
+ "vmName": {
+ "type": "string"
+ },
+ "vmSize": {
+ "type": "string"
+ }
+ },
+ "resources": [
+ {
+ "apiVersion": "[variables('publicIPAddressApiVersion')]",
+ "location": "[variables('location')]",
+ "name": "[variables('publicIPAddressName')]",
+ "properties": {
+ "dnsSettings": {
+ "domainNameLabel": "[parameters('dnsNameForPublicIP')]"
+ },
+ "publicIPAllocationMethod": "[variables('publicIPAddressType')]"
+ },
+ "type": "Microsoft.Network/publicIPAddresses"
+ },
+ {
+ "apiVersion": "[variables('networkInterfacesApiVersion')]",
+ "dependsOn": [
+ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]"
+ ],
+ "location": "[variables('location')]",
+ "name": "[variables('nicName')]",
+ "properties": {
+ "ipConfigurations": [
+ {
+ "name": "ipconfig",
+ "properties": {
+ "privateIPAllocationMethod": "Dynamic",
+ "publicIPAddress": {
+ "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]"
+ },
+ "subnet": {
+ "id": "[variables('subnetRef')]"
+ }
+ }
+ }
+ ]
+ },
+ "type": "Microsoft.Network/networkInterfaces"
+ },
+ {
+ "apiVersion": "[variables('apiVersion')]",
+ "dependsOn": [
+ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
+ ],
+ "location": "[variables('location')]",
+ "name": "[parameters('vmName')]",
+ "properties": {
+ "diagnosticsProfile": {
+ "bootDiagnostics": {
+ "enabled": false
+ }
+ },
+ "hardwareProfile": {
+ "vmSize": "[parameters('vmSize')]"
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]"
+ }
+ ]
+ },
+ "osProfile": {
+ "adminPassword": "[parameters('adminPassword')]",
+ "adminUsername": "[parameters('adminUsername')]",
+ "computerName": "[parameters('vmName')]",
+ "linuxConfiguration": {
+ "ssh": {
+ "publicKeys": [
+ {
+ "keyData": "",
+ "path": "[variables('sshKeyPath')]"
+ }
+ ]
+ }
+ }
+ },
+ "storageProfile": {
+ "imageReference": {
+ "offer": "--image-offer--",
+ "publisher": "--image-publisher--",
+ "sku": "--image-sku--",
+ "version": "--version--"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "createOption": "fromImage",
+ "name": "osdisk",
+ "osType": "Linux"
+ }
+ }
+ },
+ "type": "Microsoft.Compute/virtualMachines"
+ }
+ ],
+ "variables": {
+ "addressPrefix": "10.0.0.0/16",
+ "apiVersion": "2017-03-30",
+ "location": "[resourceGroup().location]",
+ "managedDiskApiVersion": "2017-03-30",
+ "networkInterfacesApiVersion": "2017-04-01",
+ "nicName": "packerNic",
+ "publicIPAddressApiVersion": "2017-04-01",
+ "publicIPAddressName": "packerPublicIP",
+ "publicIPAddressType": "Dynamic",
+ "sshKeyPath": "[concat('/home/',parameters('adminUsername'),'/.ssh/authorized_keys')]",
+ "subnetAddressPrefix": "10.0.0.0/24",
+ "subnetName": "--virtual_network_subnet_name--",
+ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
+ "virtualNetworkName": "--virtual_network_name--",
+ "virtualNetworkResourceGroup": "--virtual_network_resource_group_name--",
+ "virtualNetworksApiVersion": "2017-04-01",
+ "vmStorageAccountContainerName": "images",
+ "vnetID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]"
+ }
+}
\ No newline at end of file
diff --git a/builder/azure/arm/template_factory_test.go b/builder/azure/arm/template_factory_test.go
index 8a6e0c650..b571871ef 100644
--- a/builder/azure/arm/template_factory_test.go
+++ b/builder/azure/arm/template_factory_test.go
@@ -318,6 +318,43 @@ func TestVirtualMachineDeployment09(t *testing.T) {
}
}
+// Ensure the VM template is correct when building with PublicIp and connect to Private Network
+func TestVirtualMachineDeployment10(t *testing.T) {
+ config := map[string]interface{}{
+ "location": "ignore",
+ "subscription_id": "ignore",
+ "os_type": constants.Target_Linux,
+ "communicator": "none",
+ "image_publisher": "--image-publisher--",
+ "image_offer": "--image-offer--",
+ "image_sku": "--image-sku--",
+ "image_version": "--version--",
+
+ "virtual_network_resource_group_name": "--virtual_network_resource_group_name--",
+ "virtual_network_name": "--virtual_network_name--",
+ "virtual_network_subnet_name": "--virtual_network_subnet_name--",
+ "private_virtual_network_with_public_ip": true,
+
+ "managed_image_name": "ManagedImageName",
+ "managed_image_resource_group_name": "ManagedImageResourceGroupName",
+ }
+
+ c, _, err := newConfig(config, getPackerConfiguration())
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ deployment, err := GetVirtualMachineDeployment(c)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ err = approvaltests.VerifyJSONStruct(t, deployment.Properties.Template)
+ if err != nil {
+ t.Fatal(err)
+ }
+}
+
// Ensure the link values are not set, and the concrete values are set.
func TestKeyVaultDeployment00(t *testing.T) {
c, _, _ := newConfig(getArmBuilderConfiguration(), getPackerConfiguration())
diff --git a/builder/azure/common/template/template_builder.go b/builder/azure/common/template/template_builder.go
index 898bf77e9..7950052dd 100644
--- a/builder/azure/common/template/template_builder.go
+++ b/builder/azure/common/template/template_builder.go
@@ -219,6 +219,24 @@ func (s *TemplateBuilder) SetVirtualNetwork(virtualNetworkResourceGroup, virtual
return nil
}
+func (s *TemplateBuilder) SetPrivateVirtualNetworWithPublicIp(virtualNetworkResourceGroup, virtualNetworkName, subnetName string) error {
+ s.setVariable("virtualNetworkResourceGroup", virtualNetworkResourceGroup)
+ s.setVariable("virtualNetworkName", virtualNetworkName)
+ s.setVariable("subnetName", subnetName)
+
+ s.deleteResourceByType(resourceVirtualNetworks)
+ resource, err := s.getResourceByType(resourceNetworkInterfaces)
+ if err != nil {
+ return err
+ }
+
+ s.deleteResourceDependency(resource, func(s string) bool {
+ return strings.Contains(s, "Microsoft.Network/virtualNetworks")
+ })
+
+ return nil
+}
+
func (s *TemplateBuilder) SetTags(tags *map[string]*string) error {
if tags == nil || len(*tags) == 0 {
return nil
diff --git a/website/source/docs/builders/azure.html.md b/website/source/docs/builders/azure.html.md
index ec3916318..2e7422fc3 100644
--- a/website/source/docs/builders/azure.html.md
+++ b/website/source/docs/builders/azure.html.md
@@ -131,9 +131,12 @@ When creating a managed image the following two options are required.
- `tenant_id` (string) The account identifier with which your `client_id` and `subscription_id` are associated. If not
specified, `tenant_id` will be looked up using `subscription_id`.
+- `private_virtual_network_with_public_ip` (boolean) This value allows you to set a `virtual_network_name` and obtain
+ a public IP. If this value is not set and `virtual_network_name` is defined Packer is only allowed to be executed
+ from a host on the same subnet / virtual network.
+
- `virtual_network_name` (string) Use a pre-existing virtual network for the VM. This option enables private
- communication with the VM, no public IP address is **used** or **provisioned**. This value should only be set if
- Packer is executed from a host on the same subnet / virtual network.
+ communication with the VM, no public IP address is **used** or **provisioned** (unless you set `private_virtual_network_with_public_ip`).
- `virtual_network_resource_group_name` (string) If virtual\_network\_name is set, this value **may** also be set. If
virtual\_network\_name is set, and this value is not set the builder attempts to determine the resource group
From 535268cf855f292b6b92164a9e911541f44868f9 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Tue, 8 Aug 2017 09:40:44 -0700
Subject: [PATCH 065/122] update atlas-go to fix symlink-related packer push
failures
---
.../hashicorp/atlas-go/archive/archive.go | 45 +++++++------------
vendor/vendor.json | 6 +--
2 files changed, 20 insertions(+), 31 deletions(-)
diff --git a/vendor/github.com/hashicorp/atlas-go/archive/archive.go b/vendor/github.com/hashicorp/atlas-go/archive/archive.go
index 0a025b21f..91310ad5a 100644
--- a/vendor/github.com/hashicorp/atlas-go/archive/archive.go
+++ b/vendor/github.com/hashicorp/atlas-go/archive/archive.go
@@ -372,6 +372,8 @@ func copyDirWalkFn(
return filepath.Walk(target, copyDirWalkFn(
tarW, target, subpath, opts, vcsInclude))
}
+ // return now so that we don't try to copy twice
+ return nil
}
return copyConcreteEntry(tarW, subpath, path, info)
@@ -418,7 +420,7 @@ func copyConcreteEntry(
if _, err = io.Copy(tarW, f); err != nil {
return fmt.Errorf(
- "failed copying file to archive: %s", path)
+ "failed copying file to archive: %s, %s", path, err)
}
return nil
@@ -474,35 +476,22 @@ func copyExtras(w *tar.Writer, extra map[string]string) error {
}
func readLinkFull(path string, info os.FileInfo) (string, os.FileInfo, error) {
- // Read the symlink continously until we reach a concrete file.
- target := path
- tries := 0
- for info.Mode()&os.ModeSymlink != 0 {
- var err error
- target, err = os.Readlink(target)
- if err != nil {
- return "", nil, err
- }
- if !filepath.IsAbs(target) {
- target, err = filepath.Abs(target)
- if err != nil {
- return "", nil, err
- }
- }
- info, err = os.Lstat(target)
- if err != nil {
- return "", nil, err
- }
-
- tries++
- if tries > 100 {
- return "", nil, fmt.Errorf(
- "Symlink for %s is too deep, over 100 levels deep",
- path)
- }
+ target, err := filepath.EvalSymlinks(path)
+ if err != nil {
+ return "", nil, err
}
- return target, info, nil
+ target, err = filepath.Abs(target)
+ if err != nil {
+ return "", nil, err
+ }
+
+ fi, err := os.Lstat(target)
+ if err != nil {
+ return "", nil, err
+ }
+
+ return target, fi, nil
}
// readCloseRemover is an io.ReadCloser implementation that will remove
diff --git a/vendor/vendor.json b/vendor/vendor.json
index e1719e3e4..280a829b0 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -579,11 +579,11 @@
"revisionTime": "2017-06-23T01:44:30Z"
},
{
- "checksumSHA1": "FUiF2WLrih0JdHsUTMMDz3DRokw=",
+ "checksumSHA1": "izBSRxLAHN+a/XpAku0in05UzlY=",
"comment": "20141209094003-92-g95fa852",
"path": "github.com/hashicorp/atlas-go/archive",
- "revision": "1792bd8de119ba49b17fd8d3c3c1f488ec613e62",
- "revisionTime": "2016-11-07T20:49:10Z"
+ "revision": "17522f63497eefcffc90d528ca1eeaded2b529d3",
+ "revisionTime": "2017-08-08T16:18:53Z"
},
{
"checksumSHA1": "IR7S+SOsSUnPnLxgRrfemXfCqNM=",
From d423d768fa9b718a304c6809cf22e2aa44f9919d Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Tue, 8 Aug 2017 10:08:44 -0700
Subject: [PATCH 066/122] update changelog
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d4102ab7..9e9c29f4f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
* builder/parallels: Remove soon to be removed --vmtype flag in createvm.
[GH-5172]
* contrib: add json files to zsh completion. [GH-5195]
+* builder/hyperv: Properly interpolate user variables in template. [GH-5184]
### BUG FIXES:
* builder/amazon: fix builds when using the null communicator. [GH-5217]
From e3e36906c3dcd65c223bf9db8a21115fb8226dc9 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Tue, 8 Aug 2017 11:53:16 -0700
Subject: [PATCH 067/122] update changelog
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e9c29f4f..a7fb2b38a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@
* builder/amazon: fix builds when using the null communicator. [GH-5217]
* core: Strip query parameters from ISO URLs when checking against a checksum
file. [GH-5181]
+* command/push: fix handling of symlinks. [GH-5226]
## 1.0.3 (July 17, 2017)
From 3f7c090f3b78bea6d9bf65c00f6905b73cdd1b32 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Tue, 8 Aug 2017 12:25:12 -0700
Subject: [PATCH 068/122] fix test that flaked in a travis build recently
---
builder/googlecompute/step_create_instance_test.go | 4 ----
1 file changed, 4 deletions(-)
diff --git a/builder/googlecompute/step_create_instance_test.go b/builder/googlecompute/step_create_instance_test.go
index 00e842963..a9a91d692 100644
--- a/builder/googlecompute/step_create_instance_test.go
+++ b/builder/googlecompute/step_create_instance_test.go
@@ -229,10 +229,6 @@ func TestStepCreateInstance_errorTimeout(t *testing.T) {
state.Put("ssh_public_key", "key")
errCh := make(chan error, 1)
- go func() {
- <-time.After(10 * time.Millisecond)
- errCh <- nil
- }()
config := state.Get("config").(*Config)
config.stateTimeout = 1 * time.Microsecond
From e9ec705497dc3274854cfcb197dca019ef918450 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Wed, 2 Aug 2017 09:45:53 -0700
Subject: [PATCH 069/122] use block device mappings to know whether a snapshot
existed before packer's current run. If yes, don't delete the unencrypted
snapshot.
---
builder/amazon/chroot/builder.go | 1 +
builder/amazon/common/step_encrypted_ami.go | 14 +++++++++++++-
builder/amazon/ebs/builder.go | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/builder/amazon/chroot/builder.go b/builder/amazon/chroot/builder.go
index 65660cf4f..401c164b2 100644
--- a/builder/amazon/chroot/builder.go
+++ b/builder/amazon/chroot/builder.go
@@ -256,6 +256,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
KeyID: b.config.AMIKmsKeyId,
EncryptBootVolume: b.config.AMIEncryptBootVolume,
Name: b.config.AMIName,
+ AMIMappings: b.config.AMIBlockDevices.AMIMappings,
},
&awscommon.StepAMIRegionCopy{
AccessConfig: &b.config.AccessConfig,
diff --git a/builder/amazon/common/step_encrypted_ami.go b/builder/amazon/common/step_encrypted_ami.go
index fec882b67..a6e95b183 100644
--- a/builder/amazon/common/step_encrypted_ami.go
+++ b/builder/amazon/common/step_encrypted_ami.go
@@ -15,6 +15,7 @@ type StepCreateEncryptedAMICopy struct {
KeyID string
EncryptBootVolume bool
Name string
+ AMIMappings []BlockDevice
}
func (s *StepCreateEncryptedAMICopy) Run(state multistep.StateBag) multistep.StepAction {
@@ -118,7 +119,18 @@ func (s *StepCreateEncryptedAMICopy) Run(state multistep.StateBag) multistep.Ste
for _, blockDevice := range unencImage.BlockDeviceMappings {
if blockDevice.Ebs != nil && blockDevice.Ebs.SnapshotId != nil {
- ui.Message(fmt.Sprintf("Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
+ // If this packer run didn't create it, then don't delete it
+ doDelete := true
+ for _, origDevice := range s.AMIMappings {
+ if origDevice.SnapshotId == *blockDevice.Ebs.SnapshotId {
+ doDelete = false
+ }
+ }
+ if doDelete == false {
+ ui.Message(fmt.Sprintf("Keeping Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
+ continue
+ }
+ ui.Message(fmt.Sprintf("Deleting Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
deleteSnapOpts := &ec2.DeleteSnapshotInput{
SnapshotId: aws.String(*blockDevice.Ebs.SnapshotId),
}
diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go
index 79ef6e687..110c89212 100644
--- a/builder/amazon/ebs/builder.go
+++ b/builder/amazon/ebs/builder.go
@@ -191,6 +191,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
KeyID: b.config.AMIKmsKeyId,
EncryptBootVolume: b.config.AMIEncryptBootVolume,
Name: b.config.AMIName,
+ AMIMappings: b.config.AMIBlockDevices.AMIMappings,
},
&awscommon.StepAMIRegionCopy{
AccessConfig: &b.config.AccessConfig,
From 2d6028eb9aec9eebb74d12b0cf65c671739a3922 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Tue, 8 Aug 2017 14:28:01 -0700
Subject: [PATCH 070/122] use named loops instead of doDelete flag
---
builder/amazon/common/step_encrypted_ami.go | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/builder/amazon/common/step_encrypted_ami.go b/builder/amazon/common/step_encrypted_ami.go
index a6e95b183..3e3b6023d 100644
--- a/builder/amazon/common/step_encrypted_ami.go
+++ b/builder/amazon/common/step_encrypted_ami.go
@@ -117,19 +117,17 @@ func (s *StepCreateEncryptedAMICopy) Run(state multistep.StateBag) multistep.Ste
ui.Say("Deleting unencrypted snapshots")
snapshots := state.Get("snapshots").(map[string][]string)
+OuterLoop:
for _, blockDevice := range unencImage.BlockDeviceMappings {
if blockDevice.Ebs != nil && blockDevice.Ebs.SnapshotId != nil {
// If this packer run didn't create it, then don't delete it
- doDelete := true
for _, origDevice := range s.AMIMappings {
if origDevice.SnapshotId == *blockDevice.Ebs.SnapshotId {
- doDelete = false
+ ui.Message(fmt.Sprintf("Keeping Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
+ break OuterLoop
}
}
- if doDelete == false {
- ui.Message(fmt.Sprintf("Keeping Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
- continue
- }
+
ui.Message(fmt.Sprintf("Deleting Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
deleteSnapOpts := &ec2.DeleteSnapshotInput{
SnapshotId: aws.String(*blockDevice.Ebs.SnapshotId),
From ef0a09172010535ecb971f579a2a6bf35c593059 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Tue, 8 Aug 2017 14:53:56 -0700
Subject: [PATCH 071/122] continue, not break
---
builder/amazon/common/step_encrypted_ami.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/amazon/common/step_encrypted_ami.go b/builder/amazon/common/step_encrypted_ami.go
index 3e3b6023d..16c4ce7a8 100644
--- a/builder/amazon/common/step_encrypted_ami.go
+++ b/builder/amazon/common/step_encrypted_ami.go
@@ -124,7 +124,7 @@ OuterLoop:
for _, origDevice := range s.AMIMappings {
if origDevice.SnapshotId == *blockDevice.Ebs.SnapshotId {
ui.Message(fmt.Sprintf("Keeping Snapshot ID: %s", *blockDevice.Ebs.SnapshotId))
- break OuterLoop
+ continue OuterLoop
}
}
From 199b9062b07204bb46c815057996c80ca9ea0db5 Mon Sep 17 00:00:00 2001
From: Megan Marsh
Date: Wed, 9 Aug 2017 15:19:17 -0700
Subject: [PATCH 072/122] fix file copy script to prevent error when
encountering empty directory
---
builder/docker/communicator.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/docker/communicator.go b/builder/docker/communicator.go
index d33f79e95..43e4c01f2 100644
--- a/builder/docker/communicator.go
+++ b/builder/docker/communicator.go
@@ -173,7 +173,7 @@ func (c *Communicator) UploadDir(dst string, src string, exclude []string) error
// Make the directory, then copy into it
cmd := &packer.RemoteCmd{
- Command: fmt.Sprintf("set -e; mkdir -p %s; cd %s; command cp -R `ls -A .` %s",
+ Command: fmt.Sprintf("set -e; mkdir -p %s; command cp -R %s/ %s",
containerDst, containerSrc, containerDst),
}
if err := c.Start(cmd); err != nil {
From 48d8670838c77ccde7532187b85796dca0b26cf5 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Wed, 9 Aug 2017 16:11:11 -0700
Subject: [PATCH 073/122] update changelog
---
CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7fb2b38a..c6238a5f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,8 @@
* core: Strip query parameters from ISO URLs when checking against a checksum
file. [GH-5181]
* command/push: fix handling of symlinks. [GH-5226]
+* builder/amazon: Don't delete snapshots we didn't create. [GH-5211]
+* builder/docker: Correctly handle case when uploading an empty directory. [GH-5234]
## 1.0.3 (July 17, 2017)
From d8af39254e0941aacdd2a91022f71bbad6a79e33 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Wed, 9 Aug 2017 16:11:38 -0700
Subject: [PATCH 074/122] Revert "make sure that flagVars is not a nil map"
---
command/meta.go | 3 ---
1 file changed, 3 deletions(-)
diff --git a/command/meta.go b/command/meta.go
index 187c364a3..b8dfdfbf5 100644
--- a/command/meta.go
+++ b/command/meta.go
@@ -120,9 +120,6 @@ func (m *Meta) FlagSet(n string, fs FlagSetFlags) *flag.FlagSet {
f.Var((*kvflag.Flag)(&m.flagVars), "var", "")
f.Var((*kvflag.FlagJSON)(&m.flagVars), "var-file", "")
}
- if len(m.flagVars) == 0 {
- m.flagVars = make(map[string]string)
- }
// Create an io.Writer that writes to our Ui properly for errors.
// This is kind of a hack, but it does the job. Basically: create
From c67d118523bb46128f2a97d687e4723f4151b01b Mon Sep 17 00:00:00 2001
From: Ali Bazlamit
Date: Thu, 10 Aug 2017 16:15:53 +0300
Subject: [PATCH 075/122] Update packer to Use ProfitBricks Image Alias feature
---
builder/profitbricks/config.go | 2 +-
builder/profitbricks/step_create_server.go | 88 +-
builder/profitbricks/step_take_snapshot.go | 2 +-
.../profitbricks-sdk-go/.gitignore | 33 -
.../profitbricks-sdk-go/README.md | 2612 ++++++++++++++---
.../profitbricks-sdk-go/config.go | 12 +-
.../profitbricks-sdk-go/contractresources.go | 60 +
.../profitbricks-sdk-go/datacenter.go | 20 +-
.../profitbricks-sdk-go/firewallrule.go | 34 +-
.../profitbricks/profitbricks-sdk-go/image.go | 16 +-
.../profitbricks-sdk-go/ipblock.go | 17 +-
.../profitbricks/profitbricks-sdk-go/lan.go | 47 +-
.../profitbricks-sdk-go/loadbalancer.go | 18 +-
.../profitbricks-sdk-go/location.go | 30 +-
.../profitbricks/profitbricks-sdk-go/nic.go | 25 +-
.../profitbricks/profitbricks-sdk-go/paths.go | 91 +-
.../profitbricks/profitbricks-sdk-go/req.go | 19 +-
.../profitbricks-sdk-go/request.go | 68 +
.../profitbricks/profitbricks-sdk-go/resp.go | 29 -
.../profitbricks-sdk-go/server.go | 20 +-
.../profitbricks-sdk-go/snapshot.go | 16 +-
.../profitbricks-sdk-go/test_helpers.go | 116 +-
.../profitbricks-sdk-go/usermanagment.go | 402 +++
.../profitbricks-sdk-go/volume.go | 29 +-
vendor/vendor.json | 6 +
25 files changed, 3209 insertions(+), 603 deletions(-)
delete mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore
create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/contractresources.go
create mode 100644 vendor/github.com/profitbricks/profitbricks-sdk-go/usermanagment.go
diff --git a/builder/profitbricks/config.go b/builder/profitbricks/config.go
index 62ffc18c8..bb4e8d37f 100644
--- a/builder/profitbricks/config.go
+++ b/builder/profitbricks/config.go
@@ -76,7 +76,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
if c.PBUrl == "" {
- c.PBUrl = "https://api.profitbricks.com/rest/v2"
+ c.PBUrl = "https://api.profitbricks.com/cloudapi/v4"
}
if c.Cores == 0 {
diff --git a/builder/profitbricks/step_create_server.go b/builder/profitbricks/step_create_server.go
index 70c9148d5..a4de3cb19 100644
--- a/builder/profitbricks/step_create_server.go
+++ b/builder/profitbricks/step_create_server.go
@@ -26,34 +26,33 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
}
ui.Say("Creating Virtual Data Center...")
img := s.getImageId(c.Image, c)
+ alias := ""
+ if img == "" {
+ alias = s.getImageAlias(c.Image, c.Region, ui)
+ }
datacenter := profitbricks.Datacenter{
Properties: profitbricks.DatacenterProperties{
Name: c.SnapshotName,
Location: c.Region,
},
- Entities: profitbricks.DatacenterEntities{
- Servers: &profitbricks.Servers{
- Items: []profitbricks.Server{
+ }
+ server := profitbricks.Server{
+ Properties: profitbricks.ServerProperties{
+ Name: c.SnapshotName,
+ Ram: c.Ram,
+ Cores: c.Cores,
+ },
+ Entities: &profitbricks.ServerEntities{
+ Volumes: &profitbricks.Volumes{
+ Items: []profitbricks.Volume{
{
- Properties: profitbricks.ServerProperties{
- Name: c.SnapshotName,
- Ram: c.Ram,
- Cores: c.Cores,
- },
- Entities: &profitbricks.ServerEntities{
- Volumes: &profitbricks.Volumes{
- Items: []profitbricks.Volume{
- {
- Properties: profitbricks.VolumeProperties{
- Type: c.DiskType,
- Size: c.DiskSize,
- Name: c.SnapshotName,
- Image: img,
- },
- },
- },
- },
+ Properties: profitbricks.VolumeProperties{
+ Type: c.DiskType,
+ Size: c.DiskSize,
+ Name: c.SnapshotName,
+ ImageAlias: alias,
+ Image: img,
},
},
},
@@ -61,11 +60,11 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
},
}
if c.SSHKey != "" {
- datacenter.Entities.Servers.Items[0].Entities.Volumes.Items[0].Properties.SshKeys = []string{c.SSHKey}
+ server.Entities.Volumes.Items[0].Properties.SshKeys = []string{c.SSHKey}
}
if c.Comm.SSHPassword != "" {
- datacenter.Entities.Servers.Items[0].Entities.Volumes.Items[0].Properties.ImagePassword = c.Comm.SSHPassword
+ server.Entities.Volumes.Items[0].Properties.ImagePassword = c.Comm.SSHPassword
}
datacenter = profitbricks.CompositeCreateDatacenter(datacenter)
@@ -94,8 +93,20 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
state.Put("datacenter_id", datacenter.Id)
- lan := profitbricks.CreateLan(datacenter.Id, profitbricks.Lan{
- Properties: profitbricks.LanProperties{
+ server = profitbricks.CreateServer(datacenter.Id, server)
+ if server.StatusCode > 299 {
+ ui.Error(fmt.Sprintf("Error occurred %s", parseErrorMessage(server.Response)))
+ return multistep.ActionHalt
+ }
+
+ err = s.waitTillProvisioned(server.Headers.Get("Location"), *c)
+ if err != nil {
+ ui.Error(fmt.Sprintf("Error occurred while creating a server %s", err.Error()))
+ return multistep.ActionHalt
+ }
+
+ lan := profitbricks.CreateLan(datacenter.Id, profitbricks.CreateLanRequest{
+ Properties: profitbricks.CreateLanProperties{
Public: true,
Name: c.SnapshotName,
},
@@ -113,8 +124,8 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
}
lanId, _ := strconv.Atoi(lan.Id)
- nic := profitbricks.CreateNic(datacenter.Id, datacenter.Entities.Servers.Items[0].Id, profitbricks.Nic{
- Properties: profitbricks.NicProperties{
+ nic := profitbricks.CreateNic(datacenter.Id, server.Id, profitbricks.Nic{
+ Properties: &profitbricks.NicProperties{
Name: c.SnapshotName,
Lan: lanId,
Dhcp: true,
@@ -132,9 +143,9 @@ func (s *stepCreateServer) Run(state multistep.StateBag) multistep.StepAction {
return multistep.ActionHalt
}
- state.Put("volume_id", datacenter.Entities.Servers.Items[0].Entities.Volumes.Items[0].Id)
+ state.Put("volume_id", server.Entities.Volumes.Items[0].Id)
- server := profitbricks.GetServer(datacenter.Id, datacenter.Entities.Servers.Items[0].Id)
+ server = profitbricks.GetServer(datacenter.Id, server.Id)
state.Put("server_ip", server.Entities.Nics.Items[0].Properties.Ips[0])
@@ -225,6 +236,25 @@ func (d *stepCreateServer) getImageId(imageName string, c *Config) string {
return ""
}
+func (d *stepCreateServer) getImageAlias(imageAlias string, location string, ui packer.Ui) string {
+ if imageAlias == "" {
+ return ""
+ }
+ locations := profitbricks.GetLocation(location)
+ if len(locations.Properties.ImageAliases) > 0 {
+ for _, i := range locations.Properties.ImageAliases {
+ alias := ""
+ if i != "" {
+ alias = i
+ }
+ if alias != "" && strings.ToLower(alias) == strings.ToLower(imageAlias) {
+ return alias
+ }
+ }
+ }
+ return ""
+}
+
func parseErrorMessage(raw string) (toreturn string) {
var tmp map[string]interface{}
json.Unmarshal([]byte(raw), &tmp)
diff --git a/builder/profitbricks/step_take_snapshot.go b/builder/profitbricks/step_take_snapshot.go
index db63df73c..822ea8699 100644
--- a/builder/profitbricks/step_take_snapshot.go
+++ b/builder/profitbricks/step_take_snapshot.go
@@ -22,7 +22,7 @@ func (s *stepTakeSnapshot) Run(state multistep.StateBag) multistep.StepAction {
dcId := state.Get("datacenter_id").(string)
volumeId := state.Get("volume_id").(string)
- snapshot := profitbricks.CreateSnapshot(dcId, volumeId, c.SnapshotName)
+ snapshot := profitbricks.CreateSnapshot(dcId, volumeId, c.SnapshotName, "")
state.Put("snapshotname", c.SnapshotName)
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore b/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore
deleted file mode 100644
index 75eab1e65..000000000
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/.gitignore
+++ /dev/null
@@ -1,33 +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
-*.test
-*.prof
-/.idea/
-.idea/compiler.xml
-.idea/copyright/
-.idea/encodings.xml
-.idea/misc.xml
-.idea/modules.xml
-.idea/profitbricks-sdk-go.iml
-.idea/vcs.xml
-.idea/workspace.xml
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md b/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md
index b41efd679..a36630aea 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/README.md
@@ -1,342 +1,2270 @@
-# Go SDK
-
-The ProfitBricks Client Library for [Go](https://www.golang.org/) provides you with access to the ProfitBricks REST API. It is designed for developers who are building applications in Go.
-
-This guide will walk you through getting setup with the library and performing various actions against the API.
-
-# Table of Contents
-* [Concepts](#concepts)
-* [Getting Started](#getting-started)
-* [Installation](#installation)
-* [How to: Create Data Center](#how-to-create-data-center)
-* [How to: Delete Data Center](#how-to-delete-data-center)
-* [How to: Create Server](#how-to-create-server)
-* [How to: List Available Images](#how-to-list-available-images)
-* [How to: Create Storage Volume](#how-to-create-storage-volume)
-* [How to: Update Cores and Memory](#how-to-update-cores-and-memory)
-* [How to: Attach or Detach Storage Volume](#how-to-attach-or-detach-storage-volume)
-* [How to: List Servers, Volumes, and Data Centers](#how-to-list-servers-volumes-and-data-centers)
-* [Example](#example)
-* [Return Types](#return-types)
-* [Support](#support)
-
-
-# Concepts
-
-The Go SDK wraps the latest version of the ProfitBricks REST API. All API operations are performed over SSL and authenticated using your ProfitBricks portal credentials. The API can be accessed within an instance running in ProfitBricks or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
-
-# Getting Started
-
-Before you begin you will need to have [signed-up](https://www.profitbricks.com/signup) for a ProfitBricks account. The credentials you setup during sign-up will be used to authenticate against the API.
-
-Install the Go language from: [Go Installation](https://golang.org/doc/install)
-
-The `GOPATH` environment variable specifies the location of your Go workspace. It is likely the only environment variable you'll need to set when developing Go code. This is an example of pointing to a workspace configured underneath your home directory:
-
-```
-mkdir -p ~/go/bin
-export GOPATH=~/go
-export GOBIN=$GOPATH/bin
-export PATH=$PATH:$GOBIN
-```
-
-# Installation
-
-The following go command will download `profitbricks-sdk-go` to your configured `GOPATH`:
-
-```go
-go get "github.com/profitbricks/profitbricks-sdk-go"
-```
-
-The source code of the package will be located at:
-
- $GOBIN\src\profitbricks-sdk-go
-
-Create main package file *example.go*:
-
-```go
-package main
-
-import (
- "fmt"
-)
-
-func main() {
-}
-```
-
-Import GO SDK:
-
-```go
-import(
- "github.com/profitbricks/profitbricks-sdk-go"
-)
-```
-
-Add your credentials for connecting to ProfitBricks:
-
-```go
-profitbricks.SetAuth("username", "password")
-```
-
-Set depth:
-
-```go
-profitbricks.SetDepth("5")
-```
-
-Depth controls the amount of data returned from the REST server ( range 1-5 ). The larger the number the more information is returned from the server. This is especially useful if you are looking for the information in the nested objects.
-
-**Caution**: You will want to ensure you follow security best practices when using credentials within your code or stored in a file.
-
-# How To's
-
-## How To: Create Data Center
-
-ProfitBricks introduces the concept of Data Centers. These are logically separated from one another and allow you to have a self-contained environment for all servers, volumes, networking, snapshots, and so forth. The goal is to give you the same experience as you would have if you were running your own physical data center.
-
-The following code example shows you how to programmatically create a data center:
-
-```go
-dcrequest := profitbricks.Datacenter{
- Properties: profitbricks.DatacenterProperties{
- Name: "example.go3",
- Description: "description",
- Location: "us/lasdev",
- },
- }
-
-datacenter := profitbricks.CreateDatacenter(dcrequest)
-```
-
-## How To: Create Data Center with Multiple Resources
-
-To create a complex Data Center you would do this. As you can see, you can create quite a few of the objects you will need later all in one request.:
-
-```go
-datacenter := model.Datacenter{
- Properties: model.DatacenterProperties{
- Name: "composite test",
- Location:location,
- },
- Entities:model.DatacenterEntities{
- Servers: &model.Servers{
- Items:[]model.Server{
- model.Server{
- Properties: model.ServerProperties{
- Name : "server1",
- Ram: 2048,
- Cores: 1,
- },
- Entities:model.ServerEntities{
- Volumes: &model.AttachedVolumes{
- Items:[]model.Volume{
- model.Volume{
- Properties: model.VolumeProperties{
- Type_:"HDD",
- Size:10,
- Name:"volume1",
- Image:"1f46a4a3-3f47-11e6-91c6-52540005ab80",
- Bus:"VIRTIO",
- ImagePassword:"test1234",
- SshKeys: []string{"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoLVLHON4BSK3D8L4H79aFo..."},
- },
- },
- },
- },
- Nics: &model.Nics{
- Items: []model.Nic{
- model.Nic{
- Properties: model.NicProperties{
- Name : "nic",
- Lan : "1",
- },
- },
- },
- },
- },
- },
- },
- },
- },
- }
-
-dc := CompositeCreateDatacenter(datacenter)
-
-```
-
-
-## How To: Delete Data Center
-
-You will want to exercise a bit of caution here. Removing a data center will destroy all objects contained within that data center -- servers, volumes, snapshots, and so on.
-
-The code to remove a data center is as follows. This example assumes you want to remove previously data center:
-
-```go
-profitbricks.DeleteDatacenter(response.Id)
-```
-
-## How To: Create Server
-
-The server create method has a list of required parameters followed by a hash of optional parameters. The optional parameters are specified within the "options" hash and the variable names match the [REST API](https://devops.profitbricks.com/api/rest/) parameters.
-
-The following example shows you how to create a new server in the data center created above:
-
-```go
-req := profitbricks.Server{
- Properties: profitbricks.ServerProperties{
- Name: "go01",
- Ram: 1024,
- Cores: 2,
- },
-}
-server := CreateServer(datacenter.Id, req)
-```
-
-## How To: List Available Images
-
-A list of disk and ISO images are available from ProfitBricks for immediate use. These can be easily viewed and selected. The following shows you how to get a list of images. This list represents both CDROM images and HDD images.
-
-```go
-images := profitbricks.ListImages()
-```
-
-This will return a [collection](#Collection) object
-
-## How To: Create Storage Volume
-
-ProfitBricks allows for the creation of multiple storage volumes that can be attached and detached as needed. It is useful to attach an image when creating a storage volume. The storage size is in gigabytes.
-
-```go
-volumerequest := profitbricks.Volume{
- Properties: profitbricks.VolumeProperties{
- Size: 1,
- Name: "Volume Test",
- LicenceType: "LINUX",
- Type: "HDD",
- },
-}
-
-storage := CreateVolume(datacenter.Id, volumerequest)
-```
-
-## How To: Update Cores and Memory
-
-ProfitBricks allows users to dynamically update cores, memory, and disk independently of each other. This removes the restriction of needing to upgrade to the next size available size to receive an increase in memory. You can now simply increase the instances memory keeping your costs in-line with your resource needs.
-
-Note: The memory parameter value must be a multiple of 256, e.g. 256, 512, 768, 1024, and so forth.
-
-The following code illustrates how you can update cores and memory:
-
-```go
-serverupdaterequest := profitbricks.ServerProperties{
- Cores: 1,
- Ram: 256,
-}
-
-resp := PatchServer(datacenter.Id, server.Id, serverupdaterequest)
-```
-
-## How To: Attach or Detach Storage Volume
-
-ProfitBricks allows for the creation of multiple storage volumes. You can detach and reattach these on the fly. This allows for various scenarios such as re-attaching a failed OS disk to another server for possible recovery or moving a volume to another location and spinning it up.
-
-The following illustrates how you would attach and detach a volume and CDROM to/from a server:
-
-```go
-profitbricks.AttachVolume(datacenter.Id, server.Id, volume.Id)
-profitbricks.AttachCdrom(datacenter.Id, server.Id, images.Items[0].Id)
-
-profitbricks.DetachVolume(datacenter.Id, server.Id, volume.Id)
-profitbricks.DetachCdrom(datacenter.Id, server.Id, images.Items[0].Id)
-```
-
-## How To: List Servers, Volumes, and Data Centers
-
-Go SDK provides standard functions for retrieving a list of volumes, servers, and datacenters.
-
-The following code illustrates how to pull these three list types:
-
-```go
-volumes := profitbricks.ListVolumes(datacenter.Id)
-
-servers := profitbricks.ListServers(datacenter.Id)
-
-datacenters := profitbricks.ListDatacenters()
-```
-
-## Example
-
-```go
-package main
-
-import (
- "fmt"
- "time"
-
- "github.com/profitbricks/profitbricks-sdk-go"
-)
-
-func main() {
-
- //Sets username and password
- profitbricks.SetAuth("username", "password")
- //Sets depth.
- profitbricks.SetDepth("5")
-
- dcrequest := profitbricks.Datacenter{
- Properties: profitbricks.DatacenterProperties{
- Name: "example.go3",
- Description: "description",
- Location: "us/lasdev",
- },
- }
-
- datacenter := profitbricks.CreateDatacenter(dcrequest)
-
- serverrequest := profitbricks.Server{
- Properties: profitbricks.ServerProperties{
- Name: "go01",
- Ram: 1024,
- Cores: 2,
- },
- }
- server := profitbricks.CreateServer(datacenter.Id, serverrequest)
-
- volumerequest := profitbricks.Volume{
- Properties: profitbricks.VolumeProperties{
- Size: 1,
- Name: "Volume Test",
- LicenceType: "LINUX",
- Type: "HDD",
- },
- }
-
- storage := profitbricks.CreateVolume(datacenter.Id, volumerequest)
-
- serverupdaterequest := profitbricks.ServerProperties{
- Name: "go01renamed",
- Cores: 1,
- Ram: 256,
- }
-
- profitbricks.PatchServer(datacenter.Id, server.Id, serverupdaterequest)
- //It takes a moment for a volume to be provisioned so we wait.
- time.Sleep(60 * time.Second)
-
- profitbricks.AttachVolume(datacenter.Id, server.Id, storage.Id)
-
- volumes := profitbricks.ListVolumes(datacenter.Id)
- fmt.Println(volumes.Items)
- servers := profitbricks.ListServers(datacenter.Id)
- fmt.Println(servers.Items)
- datacenters := profitbricks.ListDatacenters()
- fmt.Println(datacenters.Items)
-
- profitbricks.DeleteServer(datacenter.Id, server.Id)
- profitbricks.DeleteDatacenter(datacenter.Id)
-}
-```
-
-# Support
-You are welcome to contact us with questions or comments at [ProfitBricks DevOps Central](https://devops.profitbricks.com/). Please report any issues via [GitHub's issue tracker](https://github.com/profitbricks/profitbricks-sdk-go/issues).
\ No newline at end of file
+# Go SDK
+
+Version: profitbricks-sdk-go **4.0.2**
+
+The ProfitBricks Client Library for [Go](https://www.golang.org/) provides you with access to the ProfitBricks REST API. It is designed for developers who are building applications in Go.
+
+This guide will walk you through getting setup with the library and performing various actions against the API.
+
+## Table of Contents
+
+* [Description](#description)
+* [Getting Started](#getting-started)
+ * [Installation](#installation)
+ * [Authenticating](#authenticating)
+ * [Error Handling](#error-handling)
+* [Reference](#reference)
+ * [Data Centers](#data-centers)
+ * [List Data Centers](#list-data-centers)
+ * [Retrieve a Data Center](#retrieve-a-data-center)
+ * [Create a Data Center](#create-a-data-center)
+ * [Update a Data Center](#update-a-data-center)
+ * [Delete a Data Center](#delete-a-data-center)
+ * [Locations](#locations)
+ * [List Locations](#list-locations)
+ * [Get a Location](#get-a-location)
+ * [Servers](#servers)
+ * [List Servers](#list-servers)
+ * [Retrieve a Server](#retrieve-a-server)
+ * [Create a Server](#create-a-server)
+ * [Update a Server](#update-a-server)
+ * [Delete a Server](#delete-a-server)
+ * [List Attached Volumes](#list-attached-volumes)
+ * [Attach a Volume](#attach-a-volume)
+ * [Retrieve an Attached Volume](#retrieve-an-attached-volume)
+ * [Detach a Volume](#detach-a-volume)
+ * [List Attached CD-ROMs](#list-attached-cd-roms)
+ * [Attach a CD-ROM](#attach-a-cd-rom)
+ * [Retrieve an Attached CD-ROM](#retrieve-an-attached-cd-rom)
+ * [Detach a CD-ROM](#detach-a-cd-rom)
+ * [Reboot a Server](#reboot-a-server)
+ * [Start a Server](#start-a-server)
+ * [Stop a Server](#stop-a-server)
+ * [Images](#images)
+ * [List Images](#list-images)
+ * [Get an Image](#get-an-image)
+ * [Update an Image](#update-an-image)
+ * [Delete an Image](#delete-an-image)
+ * [Volumes](#volumes)
+ * [List Volumes](#list-volumes)
+ * [Get a Volume](#get-a-volume)
+ * [Create a Volume](#create-a-volume)
+ * [Update a Volume](#update-a-volume)
+ * [Delete a Volume](#delete-a-volume)
+ * [Create a Volume Snapshot](#create-a-volume-snapshot)
+ * [Restore a Volume Snapshot](#restore-a-volume-snapshot)
+ * [Snapshots](#snapshots)
+ * [List Snapshots](#list-snapshots)
+ * [Get a Snapshot](#get-a-snapshot)
+ * [Update a Snapshot](#update-a-snapshot)
+ * [Delete a Snapshot](#delete-a-snapshot)
+ * [IP Blocks](#ip-blocks)
+ * [List IP Blocks](#list-ip-blocks)
+ * [Get an IP Block](#get-an-ip-block)
+ * [Create an IP Block](#create-an-ip-block)
+ * [Delete an IP Block](#delete-an-ip-block)
+ * [LANs](#lans)
+ * [List LANs](#list-lans)
+ * [Create a LAN](#create-a-lan)
+ * [Get a LAN](#get-a-lan)
+ * [Update a LAN](#update-a-lan)
+ * [Delete a LAN](#delete-a-lan)
+ * [Network Interfaces (NICs)](#network-interfaces-nics)
+ * [List NICs](#list-nics)
+ * [Get a NIC](#get-a-nic)
+ * [Create a NIC](#create-a-nic)
+ * [Update a NIC](#update-a-nic)
+ * [Delete a NIC](#delete-a-nic)
+ * [Firewall Rules](#firewall-rules)
+ * [List Firewall Rules](#list-firewall-rules)
+ * [Get a Firewall Rule](#get-a-firewall-rule)
+ * [Create a Firewall Rule](#create-a-firewall-rule)
+ * [Update a Firewall Rule](#update-a-firewall-rule)
+ * [Delete a Firewall Rule](#delete-a-firewall-rule)
+ * [Load Balancers](#load-balancers)
+ * [List Load Balancers](#list-load-balancers)
+ * [Get a Load Balancer](#get-a-load-balancer)
+ * [Create a Load Balancer](#create-a-load-balancer)
+ * [Update a Load Balancer](#update-a-load-balancer)
+ * [List Load Balanced NICs](#list-load-balanced-nics)
+ * [Get a Load Balanced NIC](#get-a-load-balanced-nic)
+ * [Associate NIC to a Load Balancer](#associate-nic-to-a-load-balancer)
+ * [Remove a NIC Association](#remove-a-nic-association)
+ * [Requests](#requests)
+ * [List Requests](#list-requests)
+ * [Get a Request](#get-a-request)
+ * [Get a Request Status](#get-a-request-status)
+ * [Contract Resources](#contract-resources)
+ * [Users Management](#users-management)
+ * [List Groups](#list-groups)
+ * [Retrieve a Group](#retrieve-a-group)
+ * [Create a Group](#create-a-group)
+ * [Update a Group](#update-a-group)
+ * [Delete a Group](#delete-a-group)
+ * [List Shares](#list-shares)
+ * [Retrieve a Share](#retrieve-a-share)
+ * [Add a Share](#add-a-share)
+ * [Update a Share](#update-a-share)
+ * [Delete a Share](#delete-a-share)
+ * [List Users in a Group](#list-users-in-a-group)
+ * [Add User to Group](#add-user-to-group)
+ * [Remove User from a Group](#remove-user-from-a-group)
+ * [List Users](#list-users)
+ * [Retrieve a User](#retrieve-a-user)
+ * [Create a User](#create-a-user)
+ * [Update a User](#update-a-user)
+ * [Delete a User](#delete-a-user)
+ * [List Resources](#list-resources)
+ * [List All Resources of a Type](#list-all-resources-of-a-type)
+ * [List a specific Resource Type](#list-a-specific-resource-type)
+* [Example](#example)
+* [Support](#support)
+* [Testing](#testing)
+* [Contributing](#contributing)
+
+
+# Description
+
+The Go SDK wraps the latest version of the ProfitBricks REST API. All API operations are performed over SSL and authenticated using your ProfitBricks portal credentials. The API can be accessed within an instance running in ProfitBricks or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
+
+## Getting Started
+
+Before you begin you will need to have [signed-up](https://www.profitbricks.com/signup) for a ProfitBricks account. The credentials you setup during sign-up will be used to authenticate against the API.
+
+### Installation
+
+Install the Go language from: [Go Installation](https://golang.org/doc/install)
+
+The `GOPATH` environment variable specifies the location of your Go workspace. It is likely the only environment variable you'll need to set when developing Go code. This is an example of pointing to a workspace configured underneath your home directory:
+
+```
+mkdir -p ~/go/bin
+export GOPATH=~/go
+export GOBIN=$GOPATH/bin
+export PATH=$PATH:$GOBIN
+```
+
+
+The following go command will download `profitbricks-sdk-go` to your configured `GOPATH`:
+
+```go
+go get "github.com/profitbricks/profitbricks-sdk-go"
+```
+
+The source code of the package will be located at:
+
+ $GOBIN\src\profitbricks-sdk-go
+
+Create main package file *example.go*:
+
+```go
+package main
+
+import (
+ "fmt"
+)
+
+func main() {
+}
+```
+
+Import GO SDK:
+
+```go
+import(
+ "github.com/profitbricks/profitbricks-sdk-go"
+)
+```
+
+
+### Authenticating
+Add your credentials for connecting to ProfitBricks:
+
+```go
+profitbricks.SetAuth("username", "password")
+```
+
+
+
+**Caution**: You will want to ensure you follow security best practices when using credentials within your code or stored in a file.
+
+### Error Handling
+
+The SDK will raise custom exceptions when the Cloud API returns an error. There are four response types:
+
+| HTTP Code | Description |
+|---|---|
+| 401 | The supplied user credentials are invalid. |
+| 404 | The requested resource cannot be found. |
+| 422 | The request body includes invalid JSON. |
+| 429 | The Cloud API rate limit has been exceeded. |
+
+# Concepts
+
+The Go SDK wraps the latest version of the ProfitBricks REST API. All API operations are performed over SSL and authenticated using your ProfitBricks portal credentials. The API can be accessed within an instance running in ProfitBricks or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
+
+# Getting Started
+
+Before you begin you will need to have [signed-up](https://www.profitbricks.com/signup) for a ProfitBricks account. The credentials you setup during sign-up will be used to authenticate against the API.
+
+Install the Go language from: [Go Installation](https://golang.org/doc/install)
+
+The `GOPATH` environment variable specifies the location of your Go workspace. It is likely the only environment variable you'll need to set when developing Go code. This is an example of pointing to a workspace configured underneath your home directory:
+
+```
+mkdir -p ~/go/bin
+export GOPATH=~/go
+export GOBIN=$GOPATH/bin
+export PATH=$PATH:$GOBIN
+```
+
+# Installation
+
+The following go command will download `profitbricks-sdk-go` to your configured `GOPATH`:
+
+```go
+go get "github.com/profitbricks/profitbricks-sdk-go"
+```
+
+The source code of the package will be located at:
+
+ $GOBIN\src\profitbricks-sdk-go
+
+Create main package file *example.go*:
+
+```go
+package main
+
+import (
+ "fmt"
+)
+
+func main() {
+}
+```
+
+Import GO SDK:
+
+```go
+import(
+ "github.com/profitbricks/profitbricks-sdk-go"
+)
+```
+
+Add your credentials for connecting to ProfitBricks:
+
+```go
+profitbricks.SetAuth("username", "password")
+```
+
+Set depth:
+
+```go
+profitbricks.SetDepth("5")
+```
+
+Depth controls the amount of data returned from the REST server ( range 1-5 ). The larger the number the more information is returned from the server. This is especially useful if you are looking for the information in the nested objects.
+
+**Caution**: You will want to ensure you follow security best practices when using credentials within your code or stored in a file.
+
+
+## Reference
+
+This section provides details on all the available operations and the arguments they accept. Brief code snippets demonstrating usage are also included.
+
+
+##### Depth
+
+Many of the *List* or *Get* operations will accept an optional *depth* argument. Setting this to a value between 0 and 5 affects the amount of data that is returned. The detail returned varies somewhat depending on the resource being queried, however it generally follows this pattern.
+
+| Depth | Description |
+|:-:|---|
+| 0 | Only direct properties are included. Children are not included. |
+| 1 | Direct properties and children's references are returned. |
+| 2 | Direct properties and children's properties are returned. |
+| 3 | Direct properties, children's properties, and descendant's references are returned. |
+| 4 | Direct properties, children's properties, and descendant's properties are returned. |
+| 5 | Returns all available properties. |
+
+This SDK sets the *Depth=5* by default as that works well in the majority of cases. You may find that setting *Depth* to a lower or higher value could simplify a later operation by reducing or increasing the data available in the response object.
+
+### Data Centers
+
+Virtual Data Centers (VDCs) are the foundation of the ProfitBricks platform. VDCs act as logical containers for all other objects you will be creating, e.g., servers. You can provision as many VDCs as you want. VDCs have their own private network and are logically segmented from each other to create isolation.
+
+#### List Data Centers
+
+This operation will list all currently provisioned VDCs that your account credentials provide access to.
+
+There are no request arguments that need to be supplied.
+
+Call `ListDatacenters`:
+
+ ListDatacenters()
+
+---
+
+#### Retrieve a Data Center
+
+Use this to retrieve details about a specific VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| dcid | Yes | string | The ID of the data center. |
+
+Pass the arguments to `GetDatacenter`:
+
+ GetDatacenter(dcid string)
+
+---
+
+#### Create a Data Center
+
+Use this operation to create a new VDC. You can create a "simple" VDC by supplying just the required *Name* and *Location* arguments. This operation also has the capability of provisioning a "complex" VDC by supplying additional arguments for servers, volumes, LANs, and/or load balancers.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenter | **yes** | object | A [Datacenter object](#datacenter-resource-object) describing the VDC being created. |
+
+Build the `Datacenter` resource object:
+
+ var obj = Datacenter{
+ Properties: DatacenterProperties{
+ Name: "GO SDK Test",
+ Description: "GO SDK test datacenter",
+ Location: location,
+ },
+ }
+
+Pass the object to `CreateDatacenter`:
+
+ CreateDatacenter(obj)
+
+##### Datacenter Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | **yes** | string | The name of the VDC. |
+| Location | **yes** | string | The physical ProfitBricks location where the VDC will be created. |
+| Description | no | string | A description for the VDC, e.g. staging, production. |
+| Servers | no | list | A list of one or more [Server objects](#server-resource-object) to be created. |
+| Volumes | no | list | A list of one or more [Volume objects](#volume-resource-object) to be created. |
+| Lans | no | list | A list of one or more [LAN objects](#lan-resource-object) to be created. |
+| Loadbalancers | no | list | A list of one or more [LoadBalancer objects](#load-balancer-resource-object) to be created. |
+
+The following table outlines the locations currently supported:
+
+| Value| Country | City |
+|---|---|---|
+| us/las | United States | Las Vegas |
+| us/ewr | United States | Newark |
+| de/fra | Germany | Frankfurt |
+| de/fkb | Germany | Karlsruhe |
+
+**NOTES**:
+
+* The value for `Name` cannot contain the following characters: (@, /, , |, ‘’, ‘).
+* You cannot change the VDC `Location` once it has been provisioned.
+
+---
+
+#### Update a Data Center
+
+After retrieving a VDC, either by ID or as a create response object, you can change its properties by calling the `update_datacenter` method. Some arguments may not be changed using `update_datacenter`.
+
+The following table describes the available request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| dcid | **yes** | string | The ID of the VDC. |
+| Name | no | string | The new name of the VDC. |
+| Description | no | string | The new description of the VDC. |
+
+Build the `DatacenterProperties` resource object:
+
+ var obj = DatacenterProperties{Name: "new Name",Description: "new desc"}
+
+Pass the arguments to `PatchDatacenter`:
+
+PatchDatacenter(dcid string, obj DatacenterProperties)
+
+---
+
+#### Delete a Data Center
+
+This will remove all objects within the VDC and remove the VDC object itself.
+
+**NOTE**: This is a highly destructive operation which should be used with extreme caution!
+
+The following table describes the available request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| dcid | **yes** | string | The ID of the VDC that you want to delete. |
+
+Pass the argument to `DeleteDatacenter`:
+
+ DeleteDatacenter(dcid)
+
+---
+
+### Locations
+
+Locations are the physical ProfitBricks data centers where you can provision your VDCs.
+
+#### List Locations
+
+The `ListLocations` operation will return the list of currently available locations.
+
+There are no request arguments to supply.
+
+ ListLocations()
+
+---
+
+#### Get a Location
+
+Retrieves the attributes of a specific location.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| locationid | **yes** | string | The ID consisting of country/city. |
+
+Pass the argument to `GetLocation`:
+
+ GetLocation("us/las")
+
+---
+
+#### Get a Regional Location
+
+Retrieves the locations available in a specific region.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| regionid | **yes** | string | The ID consisting of country/city. |
+
+Pass the argument to `GetRegionalLocations`:
+
+ GetRegionalLocations("us")
+
+---
+
+### Servers
+
+#### List Servers
+
+You can retrieve a list of all the servers provisioned inside a specific VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| dcid | **yes** | string | The ID of the VDC. |
+
+Pass the arguments to `ListServers`:
+
+ ListServers(dcid)
+
+---
+
+#### Retrieve a Server
+
+Returns information about a specific server such as its configuration, provisioning status, etc.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| dcId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `GetServer`:
+
+ GetServer(dcId, serverId)
+
+---
+
+#### Create a Server
+
+Creates a server within an existing VDC. You can configure additional properties such as specifying a boot volume and connecting the server to a LAN.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| server | **yes** | object | A [Server object](#server-resource-object) describing the server being created. |
+
+Build a [Server](#server-resource-object) object:
+
+ var server = Server{
+ Properties: ServerProperties{
+ Name: "GO SDK Test",
+ Ram: 1024,
+ Cores: 1,
+ AvailabilityZone: "ZONE_1",
+ CpuFamily: "INTEL_XEON",
+ },
+ }
+
+Pass the object and other arguments to `CreateServer`:
+
+ CreateServer(datacenterId, server)
+
+##### Server Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | **yes** | string | The name of the server. |
+| Cores | **yes** | int | The total number of cores for the server. |
+| Ram | **yes** | int | The amount of memory for the server in MB, e.g. 2048. Size must be specified in multiples of 256 MB with a minimum of 256 MB; however, if you set `RamHotPlug` to *true* then you must use a minimum of 1024 MB. |
+| AvailabilityZone | no | string | The availability zone in which the server should exist. |
+| CpuFamily | no | string | Sets the CPU type. "AMD_OPTERON" or "INTEL_XEON". Defaults to "AMD_OPTERON". |
+| BootVolume | no | string | A volume ID that the server will boot from. If not *nil* then `BootCdrom` has to be *nil*. |
+| BootCdrom | no | string | A CD-ROM image ID used for booting. If not *nil* then `BootVolume` has to be *nil*. |
+| Cdroms | no | list | A list of existing volume IDs that you want to connect to the server. |
+| Volumes | no | list | One or more [Volume objects](#volume-resource-object) that you want to create and attach to the server.|
+| Nics | no | list | One or more [NIC objects](#nic-resource-object) that you wish to create at the time the server is provisioned. |
+
+The following table outlines the server availability zones currently supported:
+
+| Availability Zone | Comment |
+|---|---|
+| AUTO | Automatically Selected Zone |
+| ZONE_1 | Fire Zone 1 |
+| ZONE_2 | Fire Zone 2 |
+
+---
+
+#### Update a Server
+
+Perform updates to the attributes of a server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| Name | no | string | The name of the server. |
+| Cores | no | int | The number of cores for the server. |
+| Ram | no | int | The amount of memory in the server. |
+| AvailabilityZone | no | string | The new availability zone for the server. |
+| CpuFamily | no | string | Sets the CPU type. "AMD_OPTERON" or "INTEL_XEON". Defaults to "AMD_OPTERON". |
+| BootVolume | no | string | A volume ID used for booting. If not *nil* then `BootCdrom` has to be *nil*. |
+| BootCdrom | no | string | A CD-ROM image ID used for booting. If not *nil* then `BootVolume` has to be *nil*. |
+
+Build a [ServerProperties](#serverproperties) object:
+
+ var server = ServerProperties{
+ Name: "GO SDK Test RENAME",
+ }
+
+
+Pass the arguments to `update_server`:
+
+ PatchServer(datacenterId, serverId, server)
+
+---
+
+#### Delete a Server
+
+This will remove a server from a VDC. **NOTE**: This will not automatically remove the storage volume(s) attached to a server. A separate operation is required to delete a storage volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server that will be deleted. |
+
+Pass the arguments to `delete_server`:
+
+ DeleteServer(datacenterId, serverId)
+
+---
+
+#### List Attached Volumes
+
+Retrieves a list of volumes attached to the server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `ListAttachedVolumes`:
+
+ ListAttachedVolumes(datacenterId, serverId)
+
+---
+
+#### Attach a Volume
+
+This will attach a pre-existing storage volume to the server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| volumeId | **yes** | string | The ID of a storage volume. |
+
+Pass the arguments to `AttachVolume`:
+
+AttachVolume(datacenterId, serverId, volumeId)
+
+---
+
+#### Retrieve an Attached Volume
+
+This will retrieve the properties of an attached volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| volumeId | **yes** | string | The ID of the attached volume. |
+
+Pass the arguments to `get_attached_volume`:
+
+ GetAttachedVolume(srv_dc_id, srv_srvid, srv_vol)
+
+---
+
+#### Detach a Volume
+
+This will detach the volume from the server. Depending on the volume `hot_unplug` settings, this may result in the server being rebooted. If `disc_virtio_hot_unplug` has been set to *true*, then a reboot should not be required.
+
+This will **NOT** delete the volume from your VDC. You will need to make a separate request to delete a volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| volumeId | **yes** | string | The ID of the attached volume. |
+
+Pass the arguments to `detach_volume`:
+
+ DetachVolume(datacenterId, serverId, volumeId)
+
+---
+
+#### List Attached CD-ROMs
+
+Retrieves a list of CD-ROMs attached to a server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `ListAttachedCdroms`:
+
+ ListAttachedCdroms(srv_dc_id, srv_srvid)
+
+---
+
+#### Attach a CD-ROM
+
+You can attach a CD-ROM to an existing server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| cdromId | **yes** | string | The ID of a CD-ROM. |
+
+Pass the arguments to `attach_cdrom`:
+
+ AttachCdrom(datacenterId, serverId, cdromId)
+
+---
+
+#### Retrieve an Attached CD-ROM
+
+You can retrieve a specific CD-ROM attached to the server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| cdromId | **yes** | string | The ID of the attached CD-ROM. |
+
+Pass the arguments to `GetAttachedCdrom`:
+
+GetAttachedCdrom(datacenterId, serverId, cdromId)
+
+---
+
+#### Detach a CD-ROM
+
+This will detach a CD-ROM from the server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| cdromId | **yes** | string | The ID of the attached CD-ROM. |
+
+Pass the arguments to `DetachCdrom`:
+
+ DetachCdrom(datacenterId, serverId, cdromId)
+
+---
+
+#### Reboot a Server
+
+This will force a hard reboot of the server. Do not use this method if you want to gracefully reboot the machine. This is the equivalent of powering off the machine and turning it back on.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `RebootServer`:
+
+ RebootServer(datacenterId, serverId)
+
+---
+
+#### Start a Server
+
+This will start a server. If a DHCP assigned public IP was deallocated when the server was stopped, then a new IP will be assigned.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `StartServer`:
+
+ StartServer(datacenterId, serverId)
+
+---
+
+#### Stop a Server
+
+This will stop a server. The machine will be forcefully powered off, billing will cease, and the public IP, if one is allocated, will be deallocated.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `StopServer`:
+
+ StopServer(datacenterId, serverId)
+
+---
+
+### Images
+
+#### List Images
+
+Retrieve a list of images.
+
+Just call the `ListImages`:
+
+ ListImages()
+
+---
+
+#### Get an Image
+
+Retrieves the attributes of a specific image.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| imgId | **yes** | string | The ID of the image. |
+
+Pass the arguments to `GetImage`:
+
+ GetImage(imgid)
+
+---
+
+
+### Volumes
+
+#### List Volumes
+
+Retrieve a list of volumes within the VDC. If you want to retrieve a list of volumes attached to a server please see the [List Attached Volumes](#list-attached-volumes) entry in the Server section for details.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+
+Pass the arguments to `ListVolumes`:
+
+ ListVolumes(datacenterId)
+
+---
+
+#### Get a Volume
+
+Retrieves the attributes of a given volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+
+Pass the arguments to `GetVolume`:
+
+ GetVolume(datacenterId, volumeId)
+
+---
+
+#### Create a Volume
+
+Creates a volume within the VDC. This will NOT attach the volume to a server. Please see the [Attach a Volume](#attach-a-volume) entry in the Server section for details on how to attach storage volumes.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenter_id | **yes** | string | The ID of the VDC. |
+| volume | **yes** | object | A [Volume object](#volume-resource-object) you wish to create. |
+
+Build the `Volume` resource object:
+
+ var request = Volume{
+ Properties: VolumeProperties{
+ Size: 2,
+ Name: "GO SDK Test",
+ ImageAlias: "ubuntu:latest",
+ Bus: "VIRTIO",
+ SshKeys: []string{"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoLVLHON4BSK3D8L4H79aFo..."},
+ Type: "HDD",
+ ImagePassword: "test1234",
+ AvailabilityZone: "ZONE_3",
+ },
+ }
+
+Pass the object and arguments to `CreateVolume`:
+
+ CreateVolume(dcID, request)
+
+##### Volume Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | no | string | The name of the volume. |
+| Size | **yes** | int | The size of the volume in GB. |
+| Bus | no | string | The bus type of the volume (VIRTIO or IDE). Default: VIRTIO. |
+| Image | **yes** | string | The image or snapshot ID. Can be left empty for a data volume, however you'll need to set the `licence_type`. Default: *null* |
+| Type | **yes** | string | The volume type, HDD or SSD. Default: HDD|
+| LicenceType | **yes** | string | The licence type of the volume. Options: LINUX, WINDOWS, WINDOWS2016, UNKNOWN, OTHER. Default: UNKNOWN |
+| ImagePassword | **yes** | string | A password to set on the volume for the appropriate root or administrative account. This field may only be set in creation requests. When reading, it always returns *null*. The password has to contain 8-50 characters. Only these characters are allowed: [abcdefghjkmnpqrstuvxABCDEFGHJKLMNPQRSTUVX23456789] |
+| ImageAlias | **yes** | string | An alias to a ProfitBricks public image. Use instead of "image".] |
+| SshKeys | **yes** | string | SSH keys to allow access to the volume via SSH. |
+| AvailabilityZone | no | string | The storage availability zone assigned to the volume. Valid values: AUTO, ZONE_1, ZONE_2, or ZONE_3. This only applies to HDD volumes. Leave blank or set to AUTO when provisioning SSD volumes. |
+
+The following table outlines the various licence types you can define:
+
+| Licence Type | Comment |
+|---|---|
+| WINDOWS2016 | Use this for the Microsoft Windows Server 2016 operating system. |
+| WINDOWS | Use this for the Microsoft Windows Server 2008 and 2012 operating systems. |
+| LINUX |Use this for Linux distributions such as CentOS, Ubuntu, Debian, etc. |
+| OTHER | Use this for any volumes that do not match one of the other licence types. |
+| UNKNOWN | This value may be inherited when you've uploaded an image and haven't set the license type. Use one of the options above instead. |
+
+The following table outlines the storage availability zones currently supported:
+
+| Availability Zone | Comment |
+|---|---|
+| AUTO | Automatically Selected Zone |
+| ZONE_1 | Fire Zone 1 |
+| ZONE_2 | Fire Zone 2 |
+| ZONE_3 | Fire Zone 3 |
+
+**Note:** You will need to provide either the `Image` or the `LicenceType` arguments when creating a volume. A `LicenceType` is required, but if `Image` is supplied, it is already set and cannot be changed. Either the `ImagePassword` or `SshKeys` arguments need to be supplied when creating a volume using one of the official ProfitBricks images. Only official ProfitBricks provided images support the `SshKeys` and `ImagePassword` arguments.
+
+---
+
+#### Update a Volume
+
+You can update various attributes of an existing volume; however, some restrictions are in place:
+
+You can increase the size of an existing storage volume. You cannot reduce the size of an existing storage volume. The volume size will be increased without requiring a reboot if the relevant hot plug settings (`disc_virtio_hot_plug`, `disc_virtio_hot_unplug`, etc.) have been set to *true*. The additional capacity is not added automatically added to any partition, therefore you will need to handle that inside the OS afterwards. Once you have increased the volume size you cannot decrease the volume size.
+
+Since an existing volume is being modified, none of the request arguments are specifically required as long as the changes being made satisfy the requirements for creating a volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+| Name | no | string | The name of the volume. |
+| Size | no | int | The size of the volume in GB. You may only increase the `size` when updating. |
+| Bus | no | string | The bus type of the volume (VIRTIO or IDE). Default: VIRTIO. |
+| LicenceType | no | string | The licence type of the volume. Options: LINUX, WINDOWS, WINDOWS2016, UNKNOWN, OTHER. You may get an error trying to update `LicenceType` depending on the `Image` that was used to create the volume. For example, you cannot update the `LicenceType` for a volume created from a ProfitBricks supplied OS image. |
+
+**Note**: Trying to change the `Image`, `Type`, or `AvailabilityZone` in an update request will result in an error.
+
+Pass the arguments to `PatchVolume`:
+
+ var obj := VolumeProperties{
+ Name: "GO SDK Test - RENAME",
+ Size: 5,
+ }
+ PatchVolume(datacenterId, volumeId, obj)
+
+---
+
+#### Delete a Volume
+
+Deletes the specified volume. This will result in the volume being removed from your data center. Use this with caution.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+
+Pass the arguments to `DeleteVolume`:
+
+ DeleteVolume(datacenterId, volumeId)
+
+---
+
+#### Create a Volume Snapshot
+
+Creates a snapshot of a volume within the VDC. You can use a snapshot to create a new storage volume or to restore a storage volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+| Name | no | string | The name of the snapshot. |
+| Description | no | string | The description of the snapshot. |
+
+Pass the arguments to `CreateSnapshot`:
+
+ CreateSnapshot(datacenterId, volumeId, Name,Description)
+
+---
+
+#### Restore a Volume Snapshot
+
+This will restore a snapshot onto a volume. A snapshot is created as just another image that can be used to create new volumes or to restore an existing volume.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| volumeId | **yes** | string | The ID of the volume. |
+| snapshotId | **yes** | string | The ID of the snapshot. |
+
+Pass the arguments to `restore_snapshot`:
+
+ RestoreSnapshot(datacenterId, volumeId, snapshotId)
+
+---
+
+### Snapshots
+
+#### List Snapshots
+
+Call the `ListSnapshots`:
+
+ ListSnapshots()
+
+---
+
+#### Get a Snapshot
+
+Retrieves the attributes of a specific snapshot.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| snapshotId | **yes** | string | The ID of the snapshot. |
+
+Pass the arguments to `GetSnapshot`:
+
+ GetSnapshot(snapshotId)
+
+---
+
+#### Update a Snapshot
+
+Perform updates to attributes of a snapshot.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| snapshotId | **yes** | string | The ID of the snapshot. |
+| Name | no | string | The name of the snapshot. |
+| Description | no | string | The description of the snapshot. |
+| LicenceType | no | string | The snapshot's licence type: LINUX, WINDOWS, WINDOWS2016, or OTHER. |
+| CpuHotPlug | no | bool | This volume is capable of CPU hot plug (no reboot required) |
+| CpuHotUnplug | no | bool | This volume is capable of CPU hot unplug (no reboot required) |
+| RamHotPlug | no | bool | This volume is capable of memory hot plug (no reboot required) |
+| RamHotUnplug | no | bool | This volume is capable of memory hot unplug (no reboot required) |
+| NicHotPlug | no | bool | This volume is capable of NIC hot plug (no reboot required) |
+| NicHotUnplug | no | bool | This volume is capable of NIC hot unplug (no reboot required) |
+| DiscVirtioHotPlug | no | bool | This volume is capable of VirtIO drive hot plug (no reboot required) |
+| DiscVirtioHotUnplug | no | bool | This volume is capable of VirtIO drive hot unplug (no reboot required) |
+| DiscScsiHotPlug | no | bool | This volume is capable of SCSI drive hot plug (no reboot required) |
+| DiscScsiHotUnplug | no | bool | This volume is capable of SCSI drive hot unplug (no reboot required) |
+
+Pass the arguments to `UpdateSnapshot`:
+
+ UpdateSnapshot(snapshotId, SnapshotProperties{Name: newValue})
+
+---
+
+#### Delete a Snapshot
+
+Deletes the specified snapshot.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| snapshotId | **yes** | string | The ID of the snapshot. |
+
+Pass the arguments to `DeleteSnapshot`:
+
+ DeleteSnapshot(snapshotId)
+
+---
+
+### IP Blocks
+
+The IP block operations assist with managing reserved /static public IP addresses.
+
+#### List IP Blocks
+
+Retrieve a list of available IP blocks.
+
+
+ ListIpBlocks()
+
+---
+
+#### Get an IP Block
+
+Retrieves the attributes of a specific IP block.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| ipblock_id | **yes** | string | The ID of the IP block. |
+
+Pass the arguments to `get_ipblock`:
+
+ response = client.get_ipblock('UUID')
+
+---
+
+#### Create an IP Block
+
+Creates an IP block. Creating an IP block is a bit different than some of the other available create operations. IP blocks are not attached to a particular VDC, but rather to a location. Therefore, you must specify a valid `location` along with a `size` argument indicating the number of IP addresses you want to reserve in the IP block. Any resources using an IP address from an IP block must be in the same `location`.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenter_id | **yes** | string | The ID of the VDC. |
+| ipblock | **yes** | object | An [IPBlock object](#ipblock-resource-object) you wish to create. |
+
+To create an IP block, define the `IPBlock` resource object:
+
+ var ipblock = IpBlock{
+ Properties: IpBlockProperties{
+ Name: "GO SDK Test",
+ Size: 2,
+ Location: location,
+ },
+ }
+
+Pass it to `ReserveIpBlock`:
+
+ ReserveIpBlock(ipblock)
+
+##### IPBlock Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Location | **yes** | string | This must be one of the available locations: us/las, us/ewr, de/fra, de/fkb. |
+| Size | **yes** | int | The size of the IP block you want. |
+| Name | no | string | A descriptive name for the IP block |
+
+The following table outlines the locations currently supported:
+
+| Value| Country | City |
+|---|---|---|
+| us/las | United States | Las Vegas |
+| us/ewr | United States | Newark |
+| de/fra | Germany | Frankfurt |
+| de/fkb | Germany | Karlsruhe |
+
+---
+
+#### Delete an IP Block
+
+Deletes the specified IP Block.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| ipblkid | **yes** | string | The ID of the IP block. |
+
+Pass the arguments to `ReleaseIpBlock`:
+
+ ReleaseIpBlock(ipblkid)
+
+---
+
+### LANs
+
+#### List LANs
+
+Retrieve a list of LANs within the VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterd | **yes** | string | The ID of the VDC. |
+
+
+Pass the arguments to `ListLans`:
+
+ ListLans(datacenterd)
+
+---
+
+#### Create a LAN
+
+Creates a LAN within a VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| lan | **yes** | object | A [LAN object](#lan-resource-object) describing the LAN to create. |
+
+Create the `LAN` resource object:
+
+ var request = CreateLanRequest{
+ Properties: CreateLanProperties{
+ Public: true,
+ Name: "GO SDK Test with failover",
+ },
+ Entities: &LanEntities{
+ Nics: lanNics,
+ },
+ }
+
+Pass the object and arguments to `create_lan`:
+
+ CreateLan(datacenterId, request)
+
+##### LAN Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | no | string | The name of your LAN. |
+| Public | **Yes** | bool | Boolean indicating if the LAN faces the public Internet or not. |
+| Nics | no | list | One or more NIC IDs attached to the LAN. |
+
+---
+
+#### Get a LAN
+
+Retrieves the attributes of a given LAN.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| lanId | **yes** | int | The ID of the LAN. |
+
+Pass the arguments to `GetLan`:
+
+ GetLan(datacenterId, lanId)
+
+---
+
+#### Update a LAN
+
+Perform updates to attributes of a LAN.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| lanId | **yes** | int | The ID of the LAN. |
+| Name | no | string | A descriptive name for the LAN. |
+| Public | no | bool | Boolean indicating if the LAN faces the public Internet or not. |
+| IpFailover | no | array | A list of IP fail-over dicts. |
+
+Pass the arguments to `update_lan`:
+
+ var obj = LanProperties{
+ Properties: LanProperties{
+ Public: true,
+ Name: "GO SDK Test with failover",
+ }
+ PatchLan(datacenterId, lanId, obj)
+
+---
+
+#### Delete a LAN
+
+Deletes the specified LAN.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| lanId | **yes** | string | The ID of the LAN. |
+
+Pass the arguments to `delete_lan`:
+
+ DeleteLan(lan_dcid, lanid)
+---
+
+### Network Interfaces (NICs)
+
+#### List NICs
+
+Retrieve a list of LANs within the VDC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+
+Pass the arguments to `ListNics`:
+
+ ListNics(datacenterId, serverId)
+
+---
+
+#### Get a NIC
+
+Retrieves the attributes of a given NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+
+Pass the arguments to `GetNic`:
+
+ GetNic(datacenterId, serverId, nicId)
+
+---
+
+#### Create a NIC
+
+Adds a NIC to the target server.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string| The ID of the server. |
+| nic | **yes** | object | A [NIC object](#nic-resource-object) describing the NIC to be created. |
+
+Create the `NIC` resource object:
+
+ var nic = Nic{
+ Properties: &NicProperties{
+ Lan: 1,
+ Name: "GO SDK Test",
+ Nat: false,
+ Dhcp: true,
+ FirewallActive: true,
+ Ips: []string{"10.0.0.1"},
+ },
+ }
+
+Pass the object and arguments to `create_nic`:
+
+ CreateNic(datacenterId, serverId, nic)
+
+##### NIC Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | no | string | The name of the NIC. |
+| Ips | no | list | IP addresses assigned to the NIC. |
+| Dhcp | no | bool | Set to *false* if you wish to disable DHCP on the NIC. Default: *true*. |
+| Lan | **yes** | int | The LAN ID the NIC will sit on. If the LAN ID does not exist it will be created. |
+| Nat | no | bool | Indicates the private IP address has outbound access to the public internet. |
+| FirewallActive | no | bool | Set this to *true* to enable the ProfitBricks firewall, *false* to disable. |
+| Firewallrules | no | list | A list of [FirewallRule objects](#firewall-rule-resource-object) to be created with the NIC. |
+
+---
+
+#### Update a NIC
+
+You can update -- in full or partially -- various attributes on the NIC; however, some restrictions are in place:
+
+The primary address of a NIC connected to a load balancer can only be changed by changing the IP of the load balancer. You can also add additional reserved, public IPs to the NIC.
+
+The user can specify and assign private IPs manually. Valid IP addresses for private networks are 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string| The ID of the server. |
+| nicId | **yes** | string| The ID of the NIC. |
+| Name | no | string | The name of the NIC. |
+| Ips | no | list | IPs assigned to the NIC represented as a list of strings. |
+| Dhcp | no | bool | Boolean value that indicates if the NIC is using DHCP or not. |
+| Lan | no | int | The LAN ID the NIC sits on. |
+| Nat | no | bool | Indicates the private IP address has outbound access to the public internet. |
+| FirewallActive | no | bool | Set this to *true* to enable the ProfitBricks firewall, *false* to disable. |
+
+Pass the arguments to `update_nic`:
+
+ var obj = NicProperties{Name: "GO SDK Test - RENAME", Lan: 1}
+ PatchNic(nic_dcid, nic_srvid, nicid, obj)
+
+---
+
+#### Delete a NIC
+
+Deletes the specified NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string| The ID of the server. |
+| nicId | **yes** | string| The ID of the NIC. |
+
+Pass the arguments to `DeleteNic`:
+
+ DeleteNic(nic_dcid, nic_srvid, nicid)
+
+---
+
+### Firewall Rules
+
+#### List Firewall Rules
+
+Retrieves a list of firewall rules associated with a particular NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+
+Pass the arguments to `ListFirewallRules`:
+
+ ListFirewallRules(datacenterId, serverId, nicId)
+
+---
+
+#### Get a Firewall Rule
+
+Retrieves the attributes of a given firewall rule.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+| firewallRuleId | **yes** | string | The ID of the firewall rule. |
+
+Pass the arguments to `get_firewall_rule`:
+
+ GetFirewallRule(datacenterId, serverId, nicId, firewallRuleId)
+
+---
+
+#### Create a Firewall Rule
+
+This will add a firewall rule to the NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+| firewallRule | **yes** | object | A [FirewallRule object](#firewall-rule-resource-object) describing the firewall rule to be created. |
+
+Create the `FirewallRule` resource object:
+
+ var firewallRule FirewallRule{
+ Properties: FirewallruleProperties{
+ Name: "SSH",
+ Protocol: "TCP",
+ SourceMac: "01:23:45:67:89:00",
+ PortRangeStart: 22,
+ PortRangeEnd: 22,
+ },
+ }
+
+Pass the object and arguments to `create_firewall_rule`:
+
+ CreateFirewallRule(datacenterId, serverId, nicId, firewallRule)
+
+##### Firewall Rule Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | no | string | The name of the firewall rule. |
+| Protocol | **yes** | string | The protocol for the rule: TCP, UDP, ICMP, ANY. |
+| SourceMac | no | string | Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. A *nil* value allows all source MAC address. |
+| SourceIp | no | string | Only traffic originating from the respective IPv4 address is allowed. A *nil* value allows all source IPs. |
+| TargetIp | no | string | In case the target NIC has multiple IP addresses, only traffic directed to the respective IP address of the NIC is allowed. A *nil* value allows all target IPs. |
+| PortRangeStart | no | string | Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave `PortRangeStart` and `PortRangeEnd` value as *nil* to allow all ports. |
+| PortRangeEnd | no | string | Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave `PortRangeStart` and `PortRangeEnd` value as *nil* to allow all ports. |
+| IcmpType | no | string | Defines the allowed type (from 0 to 254) if the protocol ICMP is chosen. A *nil* value allows all types. |
+| IcmpCode | no | string | Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. A *nil* value allows all codes. |
+
+---
+
+#### Update a Firewall Rule
+
+Perform updates to an existing firewall rule. You will notice that some arguments, such as `protocol` cannot be updated. If the `protocol` needs to be changed, you can [delete](#delete-a-firewall-rule) the firewall rule and then [create](#create-a-firewall-rule) new one to replace it.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+| firewallRuleId | **yes** | string | The ID of the firewall rule. |
+| Name | no | string | The name of the firewall rule. |
+| SourceMac | no | string | Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. A *nil* value allows all source MAC address. |
+| SourceIp | no | string | Only traffic originating from the respective IPv4 address is allowed. A *nil* value allows all source IPs. |
+| TargetIp | no | string | In case the target NIC has multiple IP addresses, only traffic directed to the respective IP address of the NIC is allowed. A *nil* value allows all target IPs. |
+| PortRangeStart | no | string | Defines the start range of the allowed port (from 1 to 65534) if protocol TCP or UDP is chosen. Leave `PortRangeStart` and `PortRangeEnd` value as *nil* to allow all ports. |
+| PortRangeEnd | no | string | Defines the end range of the allowed port (from 1 to 65534) if the protocol TCP or UDP is chosen. Leave `PortRangeStart` and `PortRangeEnd` value as *nil* to allow all ports. |
+| IcmpType | no | string | Defines the allowed type (from 0 to 254) if the protocol ICMP is chosen. A *nil* value allows all types. |
+| IcmpCode | no | string | Defines the allowed code (from 0 to 254) if protocol ICMP is chosen. A *nil* value allows all codes. |
+
+Pass the arguments to `PatchFirewallRule`:
+
+ props := FirewallruleProperties{
+ Name: "SSH - RENAME",
+ }
+ PatchFirewallRule(dcID, srv_srvid, nicid, fwId, props)
+
+---
+
+#### Delete a Firewall Rule
+
+Removes a firewall rule.
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| serverId | **yes** | string | The ID of the server. |
+| nicId | **yes** | string | The ID of the NIC. |
+| firewallRuleId | **yes** | string | The ID of the firewall rule. |
+
+Pass the arguments to `DeleteFirewallRule`:
+
+ DeleteFirewallRule(dcID, srv_srvid, nicid, fwId)
+
+---
+
+### Load Balancers
+
+#### List Load Balancers
+
+Retrieve a list of load balancers within the data center.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+
+
+Pass the arguments to `ListLoadbalancers`:
+
+ ListLoadbalancers(datacenterId)
+
+---
+
+#### Get a Load Balancer
+
+Retrieves the attributes of a given load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+
+Pass the arguments to `GetLoadbalancer`:
+
+ GetLoadbalancer(datacenterId, loadbalancerId)
+
+---
+
+#### Create a Load Balancer
+
+Creates a load balancer within the VDC. Load balancers can be used for public or private IP traffic.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancer | **yes** | object | A [LoadBalancer object](#load-balancer-resource-object) describing the load balancer to be created. |
+
+Create the `LoadBalancer` resource object:
+
+ var loadbalancer = Loadbalancer{
+ Properties: LoadbalancerProperties{
+ Name: "GO SDK Test",
+ Ip: "10.0.0.1",
+ Dhcp: true,
+ }
+ }
+Pass the object and arguments to `CreateLoadbalancer`:
+
+ CreateLoadbalancer(datacenterId, loadbalancer)
+
+##### Load Balancer Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | **yes** | string | The name of the load balancer. |
+| Ip | no | string | IPv4 address of the load balancer. All attached NICs will inherit this IP. |
+| Dhcp | no | bool | Indicates if the load balancer will reserve an IP using DHCP. |
+| Balancednics | no | list | List of NIC IDs taking part in load-balancing. All balanced NICs inherit the IP of the load balancer. |
+
+---
+
+#### Update a Load Balancer
+
+Perform updates to attributes of a load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+| Name | no | string | The name of the load balancer. |
+| Ip | no | string | The IP of the load balancer. |
+| Dhcp | no | bool | Indicates if the load balancer will reserve an IP using DHCP. |
+
+Pass the arguments to `PatchLoadbalancer`:
+
+ var obj = LoadbalancerProperties{Name: "GO SDK Test - RENAME"}
+ PatchLoadbalancer(datacenterId, loadbalancerId, obj)
+
+---
+
+#### Delete a Load Balancer
+
+Deletes the specified load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+
+Pass the arguments to `DeleteLoadbalancer`:
+
+ DeleteLoadbalancer(datacenterId, loadbalancerId)
+
+---
+
+#### List Load Balanced NICs
+
+This will retrieve a list of NICs associated with the load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+
+Pass the arguments to `ListBalancedNics`:
+
+ ListBalancedNics(datacenterId, loadbalancerId)
+
+---
+
+#### Get a Load Balanced NIC
+
+Retrieves the attributes of a given load balanced NIC.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+| nicId | **yes** | string | The ID of the NIC. |
+
+
+Pass the arguments to `GetBalancedNic`:
+
+ GetBalancedNic(datacenterId, loadbalancerId, nicId)
+
+---
+
+#### Associate NIC to a Load Balancer
+
+This will associate a NIC to a load balancer, enabling the NIC to participate in load-balancing.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+| nicId | **yes** | string | The ID of the NIC. |
+
+Pass the arguments to `add_loadbalanced_nics`:
+
+ AssociateNic(datacenterId, loadbalancerId, nicId)
+
+---
+
+#### Remove a NIC Association
+
+Removes the association of a NIC with a load balancer.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| datacenterId | **yes** | string | The ID of the VDC. |
+| loadbalancerId | **yes** | string | The ID of the load balancer. |
+| nicId | **yes** | string | The ID of the NIC you are removing from the load balancer. |
+
+Pass the arguments to `DeleteBalancedNic`:
+
+ DeleteBalancedNic(datacenterId, loadbalancerId, nicId)
+
+---
+
+### Requests
+
+Each call to the ProfitBricks Cloud API is assigned a request ID. These operations can be used to get information about the requests that have been submitted and their current status.
+
+#### List Requests
+
+
+ ListRequests()
+
+---
+
+#### Get a Request
+
+Retrieves the attributes of a specific request. This operation shares the same `get_request` method used for getting request status, however the response it determined by the boolean value you pass for *status*. To get details about the request itself, you want to pass a *status* of *False*.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| request_id | **yes** | string | The ID of the request. |
+| status | **yes** | bool | Set to *False* to have the request details returned. |
+
+Pass the arguments to `get_request`:
+
+ response = client.get_request(
+ request_id='UUID',
+ status=False)
+
+---
+
+#### Get a Request Status
+
+Retrieves the status of a request. This operation shares the same `get_request` method used for getting the details of a request, however the response it determined by the boolean value you pass for *status*. To get the request status, you want to pass a *status* of *True*.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| path | **yes** | string | The ID of the request. Retrieved from response header location |
+
+
+Pass the arguments to `get_request`:
+
+ GetRequestStatus(path)
+
+---
+
+### Contract Resources
+
+#### List Contract Resources
+
+Returns information about the resource limits for a particular contract and the current resource usage.
+
+```
+GetContractResources()
+```
+
+---
+
+### Users Management
+These operations are designed to allow you to orchestrate users and resources via the Cloud API. Previously this functionality required use of the DCD (Data Center Designer) web application.
+
+#### List Groups
+This retrieves a full list of all groups.
+
+```
+ListGroups()
+```
+
+
+#### Retrieve a Group
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupId | Yes | string | The ID of the specific group to retrieve. |
+
+```
+GetGroup(groupid)
+```
+
+#### Create a Group
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+|---|---|---|---|
+| group | Group |See [Group Object](#group-resource-object) | Yes |
+
+Build the `Group` resource object:
+
+ var group = Group{
+ Properties: GroupProperties{
+ Name: "GO SDK Test",
+ CreateDataCenter: &TRUE,
+ CreateSnapshot: &TRUE,
+ ReserveIp: &TRUE,
+ AccessActivityLog: &TRUE,
+ },
+ }
+
+Pass the object to `CreateGroup`:
+
+```
+CreateGroup(group Group)
+```
+
+##### Group Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Name | **yes** | string | A name that was given to the group. |
+| CreateDataCenter | no | bool | The group has permission to create virtual data centers. |
+| CreateSnapshot | no | bool | The group has permission to create snapshots. |
+| ReserveIp | no | bool | The group has permission to reserve IP addresses. |
+| AccessActivityLog | no | bool | The group has permission to access the activity log. |
+
+#### Update a Group
+
+Use this operation to update a group.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupId | **yes** | string | The ID of the specific group to retrieve. |
+| group | Group |See [Group Object](#group-resource-object) | Yes |
+
+```
+UpdateGroup(groupId, group Group)
+```
+
+---
+
+#### Delete a Group
+
+This will remove all objects within the data center and remove the data center object itself.
+Use this operation to delete a single group. Resources that are assigned to the group are NOT deleted, but are no longer accessible to the group members unless the member is a Contract Owner, Admin, or Resource Owner.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupId | **yes** | string | The ID of the specific group to retrieve. |
+
+```
+DeleteGroup(groupId)
+```
+
+---
+
+#### List Shares
+Retrieves a full list of all the resources that are shared through this group and lists the permissions granted to the group members for each shared resource.
+
+```
+ListShares()
+```
+
+#### Retrieve a Share
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupid | **yes** | string | The ID of the specific group to retrieve. |
+| resourceId | **yes** | string | The ID of the specific resource to retrieve. |
+
+```
+GetShare(groupid, resourceId)
+```
+
+---
+
+#### Add a Share
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupid | **yes** | string | The ID of the specific group to add a resource too. |
+| resourceId | **yes** | string | The ID of the specific resource to add. |
+| share | **yes** | Share | See [Share Object](#share-resource-object) |
+
+Build the `Share` resource object:
+
+ var share = Share{
+ Properties: ShareProperties{
+ SharePrivilege: true,
+ EditPrivilege: true,
+ },
+ }
+
+Pass the object to `AddShare`:
+
+```
+AddShare(share Share, groupid, resourceId)
+```
+
+##### Share Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| EditPrivilege | no | bool | The group has permission to edit privileges on this resource. |
+| SharePrivilege | no | bool | The group has permission to share this resource. |
+
+---
+
+#### Update a Share
+
+Use this to update the permissions that a group has for a specific resource share.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupid | **yes** | string | The ID of the specific group to add a resource too. |
+| resourceId | **yes** | string | The ID of the specific resource to add. |
+| share | **yes** | Share | See [Share Object](#share-resource-object) |
+
+```
+UpdateShare(groupid, resourceId, obj)
+```
+
+
+#### Delete a Share
+
+This will remove all objects within the data center and remove the data center object itself.
+Use this operation to delete a single group. Resources that are assigned to the group are NOT deleted, but are no longer accessible to the group members unless the member is a Contract Owner, Admin, or Resource Owner.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupid | **yes** | string | The ID of the specific group containing the resource to delete. |
+| resourceId | **yes** | string | The ID of the specific resource to delete. |
+
+```
+DeleteShare(groupid, resourceId)
+```
+
+---
+
+#### List Users in a Group
+Retrieves a full list of all the users that are members of a particular group.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupid | **yes** | string | The ID of the specific group to retrieve a user list for. |
+
+```
+ListGroupUsers(groupid)
+```
+
+---
+
+
+#### Add User to Group
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| groupid | **yes** | string | The ID of the specific group you want to add a user to. |
+| userid | **yes** | string | The ID of the specific user to add to the group. |
+
+
+```
+AddUserToGroup(groupid, userid)
+```
+
+---
+
+#### Remove User from a Group
+
+Use this operation to remove a user from a group.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| groupid | **yes** | string | The ID of the specific group you want to remove a user from. |
+| userid | **yes** | string | The ID of the specific user to remove from the group. |
+
+```
+DeleteUserFromGroup(groupid, userid)
+```
+
+---
+
+#### List Users
+Retrieve a list of all the users that have been created under a contract.
+
+```
+ListUsers()
+```
+
+---
+
+#### Retrieve a User
+Retrieve details about a specific user including what groups and resources the user is associated with.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| userid | **yes** | string | The ID of the specific user to retrieve information about. |
+
+```
+GetUser(userid)
+```
+
+---
+
+#### Create a User
+Creates a new user under a particular contract.
+
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| user | **yes** | User | See [User Object](#user-resource-object) |
+
+Build the `User` resource object:
+
+ var user = User{
+ Properties: &UserProperties{
+ Firstname: "John",
+ Lastname: "Doe",
+ Email: email,
+ Password: "abc123-321CBA",
+ Administrator: false,
+ ForceSecAuth: false,
+ SecAuthActive: false,
+ },
+ }
+
+Pass the object to `CreateUser`:
+
+```
+CreateUser(user User)
+```
+
+##### User Resource Object
+
+| Name | Required | Type | Description |
+|---|:-:|---|---|
+| Firstname | **yes** | bool | The first name of the user. |
+| Lastname | **yes** | bool | The last name of the user. |
+| Email | **yes** | bool | The e-mail address of the user. |
+| Password | **yes** | bool | A password for the user. |
+| Administrator | no | bool | Indicates if the user has administrative rights. |
+| ForceSecAuth | no | bool | Indicates if secure (two-factor) authentication was enabled for the user. |
+| SecAuthActive | no | bool | Indicates if secure (two-factor) authentication is enabled for the user. |
+
+---
+
+#### Update a User
+
+Update details about a specific user including their privileges.
+
+The following table describes the request arguments:
+
+| Name | Required | Type | Description |
+|---|---|---|---|
+| userid | **Yes** | string | The ID of the specific user to update. |
+
+
+```
+user := UserProperties{
+ Firstname: "go sdk ",
+ Lastname: newName,
+ Email: "test@go.com",
+ Password: "abc123-321CBA",
+ Administrator: false,
+ ForceSecAuth: false,
+ SecAuthActive: false,
+ }
+UpdateUser(userid, user)
+```
+
+---
+
+#### Delete a User
+
+Blacklists the user, disabling them. The user is not completely purged, therefore if you anticipate needing to create a user with the same name in the future, we suggest renaming the user before you delete it.
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| userid | **Yes** | string | The ID of the specific user to update. |
+
+```
+DeleteUser(userid)
+```
+
+---
+
+#### List Resources
+Retrieves a list of all resources and optionally their group associations.
+
+*Note*: This API call can take a significant amount of time to return when there are a large number of provisioned resources. You may wish to consult the next section on how to list resources of a particular type.
+
+```
+ListResources()
+```
+
+---
+
+#### List All Resources of a Type
+Lists all shareable resources of a specific type. Optionally include their association with groups, permissions that a group has for the resource, and users that are members of the group. Because you are scoping your request to a specific resource type, this API will likely return faster than querying `/um/resources`.
+
+
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| resourcetype | **Yes** | string | The specific type of resources to retrieve information about. |
+
+The values available for resourcetype are listed in this table:
+
+| Resource Type | Description |
+|---|---|
+| datacenter | A virtual data center. |
+| image | A private image that has been uploaded to ProfitBricks. |
+| snapshot | A snapshot of a storage volume. |
+| ipblock | An IP block that has been reserved. |
+
+```
+ListResourcesByType(resourcetype)
+```
+
+---
+
+#### List a specific Resource Type
+
+
+The following table describes the request arguments:
+
+| Name | Type | Description | Required |
+| --- | --- | --- | --- |
+| resourcetype | **Yes** | string | The specific type of resources to retrieve information about. |
+| resourceId | **Yes** | string | The ID of the specific resource to retrieve information about. |
+
+The values available for resourcetype are listed in this table:
+
+| Resource Type | Description |
+|---|---|
+| datacenter | A virtual data center. |
+| image | A private image that has been uploaded to ProfitBricks. |
+| snapshot | A snapshot of a storage volume. |
+| ipblock | An IP block that has been reserved. |
+
+```
+GetResourceByType(resourcetype, resourceId)
+```
+
+---
+
+## Example
+
+```go
+package main
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/profitbricks/profitbricks-sdk-go"
+)
+
+func main() {
+
+ //Sets username and password
+ profitbricks.SetAuth("username", "password")
+ //Sets depth.
+ profitbricks.SetDepth("5")
+
+ dcrequest := profitbricks.Datacenter{
+ Properties: profitbricks.DatacenterProperties{
+ Name: "example.go3",
+ Description: "description",
+ Location: "us/lasdev",
+ },
+ }
+
+ datacenter := profitbricks.CreateDatacenter(dcrequest)
+
+ serverrequest := profitbricks.Server{
+ Properties: profitbricks.ServerProperties{
+ Name: "go01",
+ Ram: 1024,
+ Cores: 2,
+ },
+ }
+ server := profitbricks.CreateServer(datacenter.Id, serverrequest)
+
+ volumerequest := profitbricks.Volume{
+ Properties: profitbricks.VolumeProperties{
+ Size: 1,
+ Name: "Volume Test",
+ LicenceType: "LINUX",
+ Type: "HDD",
+ },
+ }
+
+ storage := profitbricks.CreateVolume(datacenter.Id, volumerequest)
+
+ serverupdaterequest := profitbricks.ServerProperties{
+ Name: "go01renamed",
+ Cores: 1,
+ Ram: 256,
+ }
+
+ profitbricks.PatchServer(datacenter.Id, server.Id, serverupdaterequest)
+ //It takes a moment for a volume to be provisioned so we wait.
+ time.Sleep(60 * time.Second)
+
+ profitbricks.AttachVolume(datacenter.Id, server.Id, storage.Id)
+
+ volumes := profitbricks.ListVolumes(datacenter.Id)
+ fmt.Println(volumes.Items)
+ servers := profitbricks.ListServers(datacenter.Id)
+ fmt.Println(servers.Items)
+ datacenters := profitbricks.ListDatacenters()
+ fmt.Println(datacenters.Items)
+
+ profitbricks.DeleteServer(datacenter.Id, server.Id)
+ profitbricks.DeleteDatacenter(datacenter.Id)
+}
+```
+
+# Support
+You are welcome to contact us with questions or comments at [ProfitBricks DevOps Central](https://devops.profitbricks.com/). Please report any issues via [GitHub's issue tracker](https://github.com/profitbricks/profitbricks-sdk-go/issues).
+
+## Testing
+
+You can run all test by using the command `go test -timeout=120m` or run a single test by specifying the name of the test file `go test servers_test.go`
+
+## Contributing
+
+1. Fork it ( https://github.com/profitbricks/profitbricks-sdk-go/fork )
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create a new Pull Request
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/config.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/config.go
index 567108951..368a111a0 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/config.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/config.go
@@ -1,7 +1,7 @@
package profitbricks
-// Endpoint is the base url for REST requests .
-var Endpoint = "https://api.profitbricks.com/rest/v2"
+// Endpoint is the base url for REST requests.
+var Endpoint = "https://api.profitbricks.com/cloudapi/v4"
// Username for authentication .
var Username string
@@ -11,7 +11,9 @@ var Passwd string
// SetEndpoint is used to set the REST Endpoint. Endpoint is declared in config.go
func SetEndpoint(newendpoint string) string {
- Endpoint = newendpoint
+ if newendpoint != "" {
+ Endpoint = newendpoint
+ }
return Endpoint
}
@@ -21,3 +23,7 @@ func SetAuth(u, p string) {
Username = u
Passwd = p
}
+
+func SetUserAgent(userAgent string) {
+ AgentHeader = userAgent
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/contractresources.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/contractresources.go
new file mode 100644
index 000000000..cd4fa2c3c
--- /dev/null
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/contractresources.go
@@ -0,0 +1,60 @@
+package profitbricks
+
+import (
+ "encoding/json"
+ "net/http"
+ "strconv"
+)
+
+type ContractResources struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Properties ContractResourcesProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type ContractResourcesProperties struct {
+ PBContractNumber string `json:"PB-Contract-Number,omitempty"`
+ Owner string `json:"owner,omitempty"`
+ Status string `json:"status,omitempty"`
+ ResourceLimits *ResourcesLimits `json:"resourceLimits,omitempty"`
+}
+
+type ResourcesLimits struct {
+ CoresPerServer int32 `json:"coresPerServer,omitempty"`
+ CoresPerContract int32 `json:"coresPerContract,omitempty"`
+ CoresProvisioned int32 `json:"coresProvisioned,omitempty"`
+ RamPerServer int32 `json:"ramPerServer,omitempty"`
+ RamPerContract int32 `json:"ramPerContract,omitempty"`
+ RamProvisioned int32 `json:"ramProvisioned,omitempty"`
+ HddLimitPerVolume int64 `json:"hddLimitPerVolume,omitempty"`
+ HddLimitPerContract int64 `json:"hddLimitPerContract,omitempty"`
+ HddVolumeProvisioned int64 `json:"hddVolumeProvisioned,omitempty"`
+ SsdLimitPerVolume int64 `json:"ssdLimitPerVolume,omitempty"`
+ SsdLimitPerContract int64 `json:"ssdLimitPerContract,omitempty"`
+ SsdVolumeProvisioned int64 `json:"ssdVolumeProvisioned,omitempty"`
+ ReservableIps int32 `json:"reservableIps,omitempty"`
+ ReservedIpsOnContract int32 `json:"reservedIpsOnContract,omitempty"`
+ ReservedIpsInUse int32 `json:"reservedIpsInUse,omitempty"`
+}
+
+func GetContractResources() ContractResources {
+ path := contract_resource_path()
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toContractResources(resp)
+}
+
+func toContractResources(resp Resp) ContractResources {
+ var col ContractResources
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go
index eb3d9094f..1bdf22d60 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/datacenter.go
@@ -8,18 +8,18 @@ import (
)
type Datacenter struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties DatacenterProperties `json:"properties,omitempty"`
- Entities DatacenterEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties DatacenterProperties `json:"properties,omitempty"`
+ Entities DatacenterEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
-type DatacenterElementMetadata struct {
+type Metadata struct {
CreatedDate time.Time `json:"createdDate,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
Etag string `json:"etag,omitempty"`
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/firewallrule.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/firewallrule.go
index 11cae62a5..1d5ef4ec4 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/firewallrule.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/firewallrule.go
@@ -7,26 +7,26 @@ import (
)
type FirewallRule struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties FirewallruleProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties FirewallruleProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type FirewallruleProperties struct {
- Name string `json:"name,omitempty"`
- Protocol string `json:"protocol,omitempty"`
- SourceMac string `json:"sourceMac,omitempty"`
- SourceIp string `json:"sourceIp,omitempty"`
- TargetIp string `json:"targetIp,omitempty"`
- IcmpCode int `json:"icmpCode,omitempty"`
- IcmpType int `json:"icmpType,omitempty"`
- PortRangeStart int `json:"portRangeStart,omitempty"`
- PortRangeEnd int `json:"portRangeEnd,omitempty"`
+ Name string `json:"name,omitempty"`
+ Protocol string `json:"protocol,omitempty"`
+ SourceMac *string `json:"sourceMac,omitempty"`
+ SourceIp *string `json:"sourceIp,omitempty"`
+ TargetIp *string `json:"targetIp,omitempty"`
+ IcmpCode *int `json:"icmpCode,omitempty"`
+ IcmpType *int `json:"icmpType,omitempty"`
+ PortRangeStart *int `json:"portRangeStart,omitempty"`
+ PortRangeEnd *int `json:"portRangeEnd,omitempty"`
}
type FirewallRules struct {
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/image.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/image.go
index 95ec9e25a..fa2ba2140 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/image.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/image.go
@@ -6,14 +6,14 @@ import (
)
type Image struct {
- Id string `json:"id,omitempty"`
- Type string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties ImageProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties ImageProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type ImageProperties struct {
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/ipblock.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/ipblock.go
index 1b78262bb..e6be130e2 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/ipblock.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/ipblock.go
@@ -7,17 +7,18 @@ import (
)
type IpBlock struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties IpBlockProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties IpBlockProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type IpBlockProperties struct {
+ Name string `json:"name,omitempty"`
Ips []string `json:"ips,omitempty"`
Location string `json:"location,omitempty"`
Size int `json:"size,omitempty"`
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/lan.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/lan.go
index 2b7f85ed4..e855d80d6 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/lan.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/lan.go
@@ -6,27 +6,50 @@ import (
"net/http"
)
-type Lan struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties LanProperties `json:"properties,omitempty"`
- Entities *LanEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+type CreateLanRequest struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties CreateLanProperties `json:"properties,omitempty"`
+ Entities *LanEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
-type LanProperties struct {
+type CreateLanProperties struct {
Name string `json:"name,omitempty"`
Public bool `json:"public,omitempty"`
}
+type Lan struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties LanProperties `json:"properties,omitempty"`
+ Entities *LanEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type LanProperties struct {
+ Name string `json:"name,omitempty"`
+ Public bool `json:"public,omitempty"`
+ IpFailover []IpFailover `json:"ipFailover"`
+}
+
type LanEntities struct {
Nics *LanNics `json:"nics,omitempty"`
}
+type IpFailover struct {
+ NicUuid string `json:"nicUuid,omitempty"`
+ Ip string `json:"ip,omitempty"`
+}
+
type LanNics struct {
Id string `json:"id,omitempty"`
Type_ string `json:"type,omitempty"`
@@ -55,7 +78,7 @@ func ListLans(dcid string) Lans {
// CreateLan creates a lan in the datacenter
// from a jason []byte and returns a Instance struct
-func CreateLan(dcid string, request Lan) Lan {
+func CreateLan(dcid string, request CreateLanRequest) Lan {
obj, _ := json.Marshal(request)
path := lan_col_path(dcid)
url := mk_url(path)
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/loadbalancer.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/loadbalancer.go
index 2a5b3389f..8d2f71ba6 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/loadbalancer.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/loadbalancer.go
@@ -7,15 +7,15 @@ import (
)
type Loadbalancer struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties LoadbalancerProperties `json:"properties,omitempty"`
- Entities LoadbalancerEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties LoadbalancerProperties `json:"properties,omitempty"`
+ Entities LoadbalancerEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type LoadbalancerProperties struct {
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/location.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/location.go
index 279429464..c62f6e7cc 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/location.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/location.go
@@ -6,14 +6,14 @@ import (
)
type Location struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties Properties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata Metadata `json:"metadata,omitempty"`
+ Properties LocationProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type Locations struct {
@@ -26,8 +26,10 @@ type Locations struct {
StatusCode int `json:"headers,omitempty"`
}
-type Properties struct {
- Name string `json:"name,omitempty"`
+type LocationProperties struct {
+ Name string `json:"name,omitempty"`
+ Features []string `json:"features,omitempty"`
+ ImageAliases []string `json:"imageAliases,omitempty"`
}
// ListLocations returns location collection data
@@ -38,6 +40,14 @@ func ListLocations() Locations {
return toLocations(do(req))
}
+// GetRegionalLocations returns a list of available locations in a specific region
+func GetRegionalLocations(regid string) Locations {
+ url := mk_url(location_reg_path(regid)) + `?depth=` + Depth
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toLocations(do(req))
+}
+
// GetLocation returns location data
func GetLocation(locid string) Location {
url := mk_url(location_path(locid)) + `?depth=` + Depth
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/nic.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/nic.go
index 74764f56b..3c0a0225c 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/nic.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/nic.go
@@ -7,24 +7,25 @@ import (
)
type Nic struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties NicProperties `json:"properties,omitempty"`
- Entities *NicEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties *NicProperties `json:"properties,omitempty"`
+ Entities *NicEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type NicProperties struct {
Name string `json:"name,omitempty"`
Mac string `json:"mac,omitempty"`
Ips []string `json:"ips,omitempty"`
- Dhcp bool `json:"dhcp,omitempty"`
+ Dhcp bool `json:"dhcp"`
Lan int `json:"lan,omitempty"`
FirewallActive bool `json:"firewallActive,omitempty"`
+ Nat bool `json:"nat,omitempty"`
}
type NicEntities struct {
@@ -56,8 +57,8 @@ func ListNics(dcid, srvid string) Nics {
// CreateNic creates a nic on a server
// from a jason []byte and returns a Instance struct
-func CreateNic(dcid string, srvid string, request Nic) Nic {
- obj, _ := json.Marshal(request)
+func CreateNic(dcid string, srvid string, nic Nic) Nic {
+ obj, _ := json.Marshal(nic)
path := nic_col_path(dcid, srvid)
url := mk_url(path) + `?depth=` + Depth
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/paths.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/paths.go
index 3b3c7f50d..f85f793aa 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/paths.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/paths.go
@@ -45,19 +45,9 @@ func location_path(locid string) string {
return location_col_path() + slash(locid)
}
-// request_col_path returns the string "/requests"
-func request_col_path() string {
- return slash("requests")
-}
-
-// request_path returns the string "/requests/"
-func request_path(requestid string) string {
- return request_col_path() + slash(requestid)
-}
-
-// request_status_path returns the string "/requests/status"
-func request_status_path(requestid string) string {
- return request_path(requestid) + slash("status")
+// location_path returns the string "/locations/"
+func location_reg_path(regid string) string {
+ return location_col_path() + slash(regid)
}
// snapshot_col_path returns the string "/snapshots"
@@ -65,11 +55,6 @@ func snapshot_col_path() string {
return slash("snapshots")
}
-// snapshot_path returns the string "/snapshots/"
-func snapshot_path(snapid string) string {
- return snapshot_col_path() + slash(snapid)
-}
-
// lan_col_path returns the string "/datacenters//lans"
func lan_col_path(dcid string) string {
return dc_path(dcid) + slash("lans")
@@ -115,12 +100,6 @@ func volume_path(dcid, volid string) string {
return volume_col_path(dcid) + slash(volid)
}
-// lan_nic_col_path returns the string /datacenters//lans//nics
-func lan_nic_col(dcid, lanid string) string {
- return lan_path(dcid, lanid) + slash("nics")
-
-}
-
// balnic_col_path returns the string "/loadbalancers//balancednics"
func balnic_col_path(dcid, lbalid string) string {
return lbal_path(dcid, lbalid) + slash("balancednics")
@@ -171,3 +150,67 @@ func fwrule_col_path(dcid, srvid, nicid string) string {
func fwrule_path(dcid, srvid, nicid, fwruleid string) string {
return fwrule_col_path(dcid, srvid, nicid) + slash(fwruleid)
}
+
+// contract_resource_path returns the string "/contracts"
+func contract_resource_path() string {
+ return slash("contracts")
+}
+
+func um() string {
+ return slash("um")
+}
+
+// um_groups returns the string "/groups"
+func um_groups() string {
+ return um() + slash("groups")
+}
+
+// um_group_path returns the string "/groups/groupid"
+func um_group_path(grpid string) string {
+ return um_groups() + slash(grpid)
+}
+
+// um_group_shares returns the string "groups/{groupId}/shares"
+func um_group_shares(grpid string) string {
+ return um() + slash("groups") + slash(grpid) + slash("shares")
+}
+
+// um_group_share_path returns the string "groups/{groupId}/shares/{resourceId}"
+func um_group_share_path(grpid string, resourceid string) string {
+ return um() + slash("groups") + slash(grpid) + slash("shares") + slash(resourceid)
+}
+
+// um_group_users returns the string "/groups/groupid/users"
+func um_group_users(grpid string) string {
+ return um() + slash("groups") + slash(grpid) + slash("users")
+}
+
+// um_group_users_path returns the string "/groups/groupid/users/userid"
+func um_group_users_path(grpid string, usrid string) string {
+ return um() + slash("groups") + slash(grpid) + slash("users") + slash(usrid)
+}
+
+// um_users returns the string "/users"
+func um_users() string {
+ return um() + slash("users")
+}
+
+// um_users returns the string "/users/usrid"
+func um_users_path(usrid string) string {
+ return um() + slash("users") + slash(usrid)
+}
+
+// um_resources returns the string "/resources"
+func um_resources() string {
+ return um() + slash("resources")
+}
+
+// um_resources_type returns the string "/resources/resourceType"
+func um_resources_type(restype string) string {
+ return um() + slash("resources") + slash(restype)
+}
+
+// um_resources_type_path returns the string "resources/{resourceType}/{resourceId}"
+func um_resources_type_path(restype string, resourceid string) string {
+ return um() + slash("resources") + slash(restype) + slash(resourceid)
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go
index b5f21c17d..893b23ca5 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/req.go
@@ -9,15 +9,18 @@ import (
)
//FullHeader is the standard header to include with all http requests except is_patch and is_command
-const FullHeader = "application/vnd.profitbricks.resource+json"
+const FullHeader = "application/json"
+
+var AgentHeader = "profitbricks-sdk-go/3.0.1"
//PatchHeader is used with is_patch .
-const PatchHeader = "application/vnd.profitbricks.partial-properties+json"
+const PatchHeader = "application/json"
//CommandHeader is used with is_command
const CommandHeader = "application/x-www-form-urlencoded"
var Depth = "5"
+var Pretty = true
// SetDepth is used to set Depth
func SetDepth(newdepth string) string {
@@ -25,6 +28,12 @@ func SetDepth(newdepth string) string {
return Depth
}
+// SetDepth is used to set Depth
+func SetPretty(pretty bool) bool {
+ Pretty = pretty
+ return Pretty
+}
+
// mk_url either:
// returns the path (if it`s a full url)
// or
@@ -32,7 +41,8 @@ func SetDepth(newdepth string) string {
func mk_url(path string) string {
if strings.HasPrefix(path, "http") {
//REMOVE AFTER TESTING
- path := strings.Replace(path, "https://api.profitbricks.com/rest/v2", Endpoint, 1)
+ //FIXME @jasmin Is this still relevant?
+ path := strings.Replace(path, "https://api.profitbricks.com/cloudapi/v3", Endpoint, 1)
// END REMOVE
return path
}
@@ -48,6 +58,7 @@ func mk_url(path string) string {
func do(req *http.Request) Resp {
client := &http.Client{}
req.SetBasicAuth(Username, Passwd)
+ req.Header.Add("User-Agent", AgentHeader)
resp, err := client.Do(req)
if err != nil {
panic(err)
@@ -67,6 +78,7 @@ func is_delete(path string) Resp {
url := mk_url(path)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Content-Type", FullHeader)
+ req.Header.Add("User-Agent", AgentHeader)
return do(req)
}
@@ -76,5 +88,6 @@ func is_command(path string, jason string) Resp {
body := json.RawMessage(jason)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(body))
req.Header.Add("Content-Type", CommandHeader)
+ req.Header.Add("User-Agent", AgentHeader)
return do(req)
}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go
index 023ae1a4a..6ce284d37 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/request.go
@@ -3,6 +3,7 @@ package profitbricks
import (
"encoding/json"
"net/http"
+ "time"
)
type RequestStatus struct {
@@ -26,6 +27,55 @@ type RequestTarget struct {
Status string `json:"status,omitempty"`
}
+type Requests struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Request `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Request struct {
+ ID string `json:"id"`
+ Type string `json:"type"`
+ Href string `json:"href"`
+ Metadata struct {
+ CreatedDate time.Time `json:"createdDate"`
+ CreatedBy string `json:"createdBy"`
+ Etag string `json:"etag"`
+ RequestStatus struct {
+ ID string `json:"id"`
+ Type string `json:"type"`
+ Href string `json:"href"`
+ } `json:"requestStatus"`
+ } `json:"metadata"`
+ Properties struct {
+ Method string `json:"method"`
+ Headers interface{} `json:"headers"`
+ Body interface{} `json:"body"`
+ URL string `json:"url"`
+ } `json:"properties"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+func ListRequests() Requests {
+ url := mk_url("/requests") + `?depth=` + Depth
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toRequests(do(req))
+}
+
+func GetRequest(req_id string) Request {
+ url := mk_url("/requests/"+req_id) + `?depth=` + Depth
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toRequest(do(req))
+}
+
func GetRequestStatus(path string) RequestStatus {
url := mk_url(path) + `?depth=` + Depth
req, _ := http.NewRequest("GET", url, nil)
@@ -41,3 +91,21 @@ func toRequestStatus(resp Resp) RequestStatus {
server.StatusCode = resp.StatusCode
return server
}
+
+func toRequests(resp Resp) Requests {
+ var server Requests
+ json.Unmarshal(resp.Body, &server)
+ server.Response = string(resp.Body)
+ server.Headers = &resp.Headers
+ server.StatusCode = resp.StatusCode
+ return server
+}
+
+func toRequest(resp Resp) Request {
+ var server Request
+ json.Unmarshal(resp.Body, &server)
+ server.Response = string(resp.Body)
+ server.Headers = &resp.Headers
+ server.StatusCode = resp.StatusCode
+ return server
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go
index 12d68e0d2..b0449db37 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/resp.go
@@ -15,13 +15,6 @@ func MkJson(i interface{}) string {
return string(jason)
}
-// MetaData is a map for metadata returned in a Resp.Body
-type StringMap map[string]string
-
-type StringIfaceMap map[string]interface{}
-
-type StringCollectionMap map[string]Collection
-
// Resp is the struct returned by all Rest request functions
type Resp struct {
Req *http.Request
@@ -37,25 +30,3 @@ func (r *Resp) PrintHeaders() {
}
}
-
-type Id_Type_Href struct {
- Id string `json:"id"`
- Type string `json:"type"`
- Href string `json:"href"`
-}
-
-type MetaData StringIfaceMap
-
-type Instance struct {
- Id_Type_Href
- MetaData StringMap `json:"metaData,omitempty"`
- Properties StringIfaceMap `json:"properties,omitempty"`
- Entities StringCollectionMap `json:"entities,omitempty"`
- Resp Resp `json:"-"`
-}
-
-type Collection struct {
- Id_Type_Href
- Items []Instance `json:"items,omitempty"`
- Resp Resp `json:"-"`
-}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/server.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/server.go
index 256d57985..d876a0efd 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/server.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/server.go
@@ -3,20 +3,19 @@ package profitbricks
import (
"bytes"
"encoding/json"
- "fmt"
"net/http"
)
type Server struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties ServerProperties `json:"properties,omitempty"`
- Entities *ServerEntities `json:"entities,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties ServerProperties `json:"properties,omitempty"`
+ Entities *ServerEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type ServerProperties struct {
@@ -81,7 +80,6 @@ func GetServer(dcid, srvid string) Server {
path := server_path(dcid, srvid)
url := mk_url(path) + `?depth=` + Depth
req, _ := http.NewRequest("GET", url, nil)
- fmt.Println(path)
req.Header.Add("Content-Type", FullHeader)
return toServer(do(req))
}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/snapshot.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/snapshot.go
index a5f54c04f..225414be3 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/snapshot.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/snapshot.go
@@ -7,14 +7,14 @@ import (
)
type Snapshot struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties SnapshotProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata Metadata `json:"metadata,omitempty"`
+ Properties SnapshotProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type SnapshotProperties struct {
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/test_helpers.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/test_helpers.go
index 35df1f929..c3a26137a 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/test_helpers.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/test_helpers.go
@@ -2,9 +2,48 @@ package profitbricks
import (
"fmt"
+ "os"
+ "strings"
"time"
)
+func mkVolume(dcID string) string {
+
+ var request = Volume{
+ Properties: VolumeProperties{
+ Size: 2,
+ Name: "Volume Test",
+ Type: "HDD",
+ ImagePassword: "test1234",
+ ImageAlias: "ubuntu:latest",
+ },
+ }
+
+ resp := CreateVolume(dcID, request)
+ waitTillProvisioned(resp.Headers.Get("Location"))
+ return resp.Id
+}
+
+func mkipid(name string) string {
+ var obj = IpBlock{
+ Properties: IpBlockProperties{
+ Name: "GO SDK Test",
+ Size: 1,
+ Location: "us/las",
+ },
+ }
+
+ resp := ReserveIpBlock(obj)
+ return resp.Id
+}
+
+func mksnapshotId(name string, dcId string) string {
+ svolumeId := mkVolume(dcId)
+ resp := CreateSnapshot(dcId, svolumeId, name, "description")
+ waitTillProvisioned(resp.Headers.Get("Location"))
+ return resp.Id
+}
+
func mkdcid(name string) string {
request := Datacenter{
Properties: DatacenterProperties{
@@ -14,11 +53,6 @@ func mkdcid(name string) string {
},
}
dc := CreateDatacenter(request)
- fmt.Println("===========================")
- fmt.Println("Created a DC " + name)
- fmt.Println("Created a DC id " + dc.Id)
- fmt.Println(dc.StatusCode)
- fmt.Println("===========================")
return dc.Id
}
@@ -31,42 +65,82 @@ func mksrvid(srv_dcid string) string {
},
}
srv := CreateServer(srv_dcid, req)
- fmt.Println("===========================")
- fmt.Println("Created a server " + srv.Id)
- fmt.Println(srv.StatusCode)
- fmt.Println("===========================")
-
waitTillProvisioned(srv.Headers.Get("Location"))
return srv.Id
}
func mknic(lbal_dcid, serverid string) string {
var request = Nic{
- Properties: NicProperties{
- Name: "GO SDK Original Nic",
- Lan: 1,
+ Properties: &NicProperties{
+ Lan: 1,
+ Name: "GO SDK Test",
+ Nat: false,
+ Dhcp: true,
+ FirewallActive: true,
+ Ips: []string{"10.0.0.1"},
},
}
resp := CreateNic(lbal_dcid, serverid, request)
- fmt.Println("===========================")
- fmt.Println("created a nic at server " + serverid)
+ waitTillProvisioned(resp.Headers.Get("Location"))
+ return resp.Id
+}
- fmt.Println("created a nic with id " + resp.Id)
- fmt.Println(resp.StatusCode)
- fmt.Println("===========================")
+func mknic_custom(lbal_dcid, serverid string, lanid int, ips []string) string {
+ var request = Nic{
+ Properties: &NicProperties{
+ Lan: lanid,
+ Name: "GO SDK Test",
+ Nat: false,
+ Dhcp: true,
+ FirewallActive: true,
+ Ips: ips,
+ },
+ }
+
+ resp := CreateNic(lbal_dcid, serverid, request)
+ waitTillProvisioned(resp.Headers.Get("Location"))
return resp.Id
}
func waitTillProvisioned(path string) {
- waitCount := 20
- fmt.Println(path)
+ waitCount := 120
for i := 0; i < waitCount; i++ {
request := GetRequestStatus(path)
if request.Metadata.Status == "DONE" {
break
}
- time.Sleep(10 * time.Second)
+ time.Sleep(1 * time.Second)
i++
}
}
+
+func getImageId(location string, imageName string, imageType string) string {
+ if imageName == "" {
+ return ""
+ }
+
+ SetAuth(os.Getenv("PROFITBRICKS_USERNAME"), os.Getenv("PROFITBRICKS_PASSWORD"))
+
+ images := ListImages()
+ if images.StatusCode > 299 {
+ fmt.Printf("Error while fetching the list of images %s", images.Response)
+ }
+
+ if len(images.Items) > 0 {
+ for _, i := range images.Items {
+ imgName := ""
+ if i.Properties.Name != "" {
+ imgName = i.Properties.Name
+ }
+
+ if imageType == "SSD" {
+ imageType = "HDD"
+ }
+ if imgName != "" && strings.Contains(strings.ToLower(imgName), strings.ToLower(imageName)) && i.Properties.ImageType == imageType && i.Properties.Location == location && i.Properties.Public == true {
+ return i.Id
+ }
+ }
+ }
+ return ""
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/usermanagment.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/usermanagment.go
new file mode 100644
index 000000000..fe7ef9b7d
--- /dev/null
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/usermanagment.go
@@ -0,0 +1,402 @@
+package profitbricks
+
+import (
+ "bytes"
+ "encoding/json"
+ "net/http"
+ "strconv"
+)
+
+type Groups struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Group `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Group struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Properties GroupProperties `json:"properties,omitempty"`
+ Entities *GroupEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type GroupProperties struct {
+ Name string `json:"name,omitempty"`
+ CreateDataCenter *bool `json:"createDataCenter,omitempty"`
+ CreateSnapshot *bool `json:"createSnapshot,omitempty"`
+ ReserveIp *bool `json:"reserveIp,omitempty"`
+ AccessActivityLog *bool `json:"accessActivityLog,omitempty"`
+}
+
+type GroupEntities struct {
+ Users Users `json:"users,omitempty"`
+ Resources Resources `json:"resources,omitempty"`
+}
+
+type Users struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []User `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type User struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties *UserProperties `json:"properties,omitempty"`
+ Entities *UserEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type UserProperties struct {
+ Firstname string `json:"firstname,omitempty"`
+ Lastname string `json:"lastname,omitempty"`
+ Email string `json:"email,omitempty"`
+ Password string `json:"password,omitempty"`
+ Administrator bool `json:"administrator,omitempty"`
+ ForceSecAuth bool `json:"forceSecAuth,omitempty"`
+ SecAuthActive bool `json:"secAuthActive,omitempty"`
+}
+
+type UserEntities struct {
+ Groups Groups `json:"groups,omitempty"`
+ Owns Owns `json:"owns,omitempty"`
+}
+
+type Resources struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Resource `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Resource struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Entities *ResourceEntities `json:"entities,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type ResourceEntities struct {
+ Groups Groups `json:"groups,omitempty"`
+}
+
+type Owns struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Entity `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Entity struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Shares struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Items []Share `json:"items,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type Share struct {
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Properties ShareProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
+}
+
+type ShareProperties struct {
+ EditPrivilege *bool `json:"editPrivilege,omitempty"`
+ SharePrivilege *bool `json:"sharePrivilege,omitempty"`
+}
+
+//Group fucntions
+func ListGroups() Groups {
+ path := um_groups()
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toGroups(resp)
+}
+
+func GetGroup(groupid string) Group {
+ path := um_group_path(groupid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toGroup(do(req))
+}
+
+func CreateGroup(grp Group) Group {
+ obj, _ := json.Marshal(grp)
+ path := um_groups()
+ url := mk_url(path)
+ req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
+ req.Header.Add("Content-Type", FullHeader)
+
+ return toGroup(do(req))
+}
+
+func UpdateGroup(groupid string, obj Group) Group {
+ jason_patch := []byte(MkJson(obj))
+ path := um_group_path(groupid)
+ url := mk_url(path) + `?depth=` + Depth
+ req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(jason_patch))
+ req.Header.Add("Content-Type", PatchHeader)
+ return toGroup(do(req))
+}
+
+func DeleteGroup(groupid string) Resp {
+ path := um_group_path(groupid)
+ return is_delete(path)
+}
+
+func toGroup(resp Resp) Group {
+ var grp Group
+ json.Unmarshal(resp.Body, &grp)
+ grp.Response = string(resp.Body)
+ grp.Headers = &resp.Headers
+ grp.StatusCode = resp.StatusCode
+ return grp
+}
+
+func toGroups(resp Resp) Groups {
+ var col Groups
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
+
+//Shares functions
+func ListShares(grpid string) Shares {
+ path := um_group_shares(grpid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toShares(resp)
+}
+
+func GetShare(groupid string, resourceid string) Share {
+ path := um_group_share_path(groupid, resourceid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toShare(do(req))
+}
+
+func AddShare(share Share, groupid string, resourceid string) Share {
+ obj, _ := json.Marshal(share)
+ path := um_group_share_path(groupid, resourceid)
+ url := mk_url(path)
+ req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
+ req.Header.Add("Content-Type", FullHeader)
+
+ return toShare(do(req))
+}
+
+func UpdateShare(groupid string, resourceid string, obj Share) Share {
+ jason_patch := []byte(MkJson(obj))
+ path := um_group_share_path(groupid, resourceid)
+ url := mk_url(path) + `?depth=` + Depth
+ req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(jason_patch))
+ req.Header.Add("Content-Type", PatchHeader)
+ return toShare(do(req))
+}
+
+func DeleteShare(groupid string, resourceid string) Resp {
+ path := um_group_share_path(groupid, resourceid)
+ return is_delete(path)
+}
+
+func toShare(resp Resp) Share {
+ var shr Share
+ json.Unmarshal(resp.Body, &shr)
+ shr.Response = string(resp.Body)
+ shr.Headers = &resp.Headers
+ shr.StatusCode = resp.StatusCode
+ return shr
+}
+
+func toShares(resp Resp) Shares {
+ var col Shares
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
+
+//Users in a group
+func ListGroupUsers(groupid string) Users {
+ path := um_group_users(groupid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toUsers(resp)
+}
+
+func AddUserToGroup(groupid string, userid string) User {
+ var usr User
+ usr.Id = userid
+ obj, _ := json.Marshal(usr)
+ path := um_group_users(groupid)
+ url := mk_url(path)
+ req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
+ req.Header.Add("Content-Type", FullHeader)
+
+ return toUser(do(req))
+}
+
+func DeleteUserFromGroup(groupid string, userid string) Resp {
+ path := um_group_users_path(groupid, userid)
+ return is_delete(path)
+}
+
+func toUser(resp Resp) User {
+ var usr User
+ json.Unmarshal(resp.Body, &usr)
+ usr.Response = string(resp.Body)
+ usr.Headers = &resp.Headers
+ usr.StatusCode = resp.StatusCode
+ return usr
+}
+
+func toUsers(resp Resp) Users {
+ var col Users
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
+
+//Users
+func ListUsers() Users {
+ path := um_users()
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toUsers(resp)
+}
+
+func GetUser(usrid string) User {
+ path := um_users_path(usrid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ return toUser(do(req))
+}
+
+func CreateUser(usr User) User {
+ obj, _ := json.Marshal(usr)
+ path := um_users()
+ url := mk_url(path)
+ req, _ := http.NewRequest("POST", url, bytes.NewBuffer(obj))
+ req.Header.Add("Content-Type", FullHeader)
+
+ return toUser(do(req))
+}
+
+func UpdateUser(userid string, obj User) User {
+ jason_patch := []byte(MkJson(obj))
+ path := um_users_path(userid)
+ url := mk_url(path)
+ req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(jason_patch))
+ req.Header.Add("Content-Type", PatchHeader)
+ return toUser(do(req))
+}
+
+func DeleteUser(groupid string) Resp {
+ path := um_users_path(groupid)
+ return is_delete(path)
+}
+
+//Resources
+func ListResources() Resources {
+ path := um_resources()
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toResources(resp)
+}
+
+func GetResourceByType(resourcetype string, resourceid string) Resource {
+ path := um_resources_type_path(resourcetype, resourceid)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toResource(resp)
+}
+
+func ListResourcesByType(resourcetype string) Resources {
+ path := um_resources_type(resourcetype)
+ url := mk_url(path) + `?depth=` + Depth + `&pretty=` + strconv.FormatBool(Pretty)
+ req, _ := http.NewRequest("GET", url, nil)
+ req.Header.Add("Content-Type", FullHeader)
+ resp := do(req)
+ return toResources(resp)
+}
+
+func toResources(resp Resp) Resources {
+ var col Resources
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
+
+func toResource(resp Resp) Resource {
+ var col Resource
+ json.Unmarshal(resp.Body, &col)
+ col.Response = string(resp.Body)
+ col.Headers = &resp.Headers
+ col.StatusCode = resp.StatusCode
+ return col
+}
diff --git a/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go b/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go
index 2982448d7..ebab8c4ee 100644
--- a/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go
+++ b/vendor/github.com/profitbricks/profitbricks-sdk-go/volume.go
@@ -4,24 +4,27 @@ import (
"bytes"
"encoding/json"
"net/http"
+ "net/url"
)
type Volume struct {
- Id string `json:"id,omitempty"`
- Type_ string `json:"type,omitempty"`
- Href string `json:"href,omitempty"`
- Metadata *DatacenterElementMetadata `json:"metadata,omitempty"`
- Properties VolumeProperties `json:"properties,omitempty"`
- Response string `json:"Response,omitempty"`
- Headers *http.Header `json:"headers,omitempty"`
- StatusCode int `json:"headers,omitempty"`
+ Id string `json:"id,omitempty"`
+ Type_ string `json:"type,omitempty"`
+ Href string `json:"href,omitempty"`
+ Metadata *Metadata `json:"metadata,omitempty"`
+ Properties VolumeProperties `json:"properties,omitempty"`
+ Response string `json:"Response,omitempty"`
+ Headers *http.Header `json:"headers,omitempty"`
+ StatusCode int `json:"headers,omitempty"`
}
type VolumeProperties struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Size int `json:"size,omitempty"`
+ AvailabilityZone string `json:"availabilityZone,omitempty"`
Image string `json:"image,omitempty"`
+ ImageAlias string `json:"imageAlias,omitempty"`
ImagePassword string `json:"imagePassword,omitempty"`
SshKeys []string `json:"sshKeys,omitempty"`
Bus string `json:"bus,omitempty"`
@@ -95,12 +98,14 @@ func DeleteVolume(dcid, volid string) Resp {
return is_delete(path)
}
-func CreateSnapshot(dcid string, volid string, name string) Snapshot {
+func CreateSnapshot(dcid string, volid string, name string, description string) Snapshot {
var path = volume_path(dcid, volid)
path = path + "/create-snapshot"
- url := mk_url(path)
- body := json.RawMessage("name=" + name)
- req, _ := http.NewRequest("POST", url, bytes.NewBuffer(body))
+ req_url := mk_url(path)
+ data := url.Values{}
+ data.Set("name", name)
+ data.Add("description", description)
+ req, _ := http.NewRequest("POST", req_url, bytes.NewBufferString(data.Encode()))
req.Header.Add("Content-Type", CommandHeader)
return toSnapshot(do(req))
}
diff --git a/vendor/vendor.json b/vendor/vendor.json
index e1719e3e4..2c378680a 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -854,6 +854,12 @@
"path": "github.com/pmezard/go-difflib/difflib",
"revision": "792786c7400a136282c1664665ae0a8db921c6c2"
},
+ {
+ "checksumSHA1": "Kq0fF7R65dDcGReuhf47O3LQgrY=",
+ "path": "github.com/profitbricks/profitbricks-sdk-go",
+ "revision": "7bdb11aecb0e457ea23c86898c6b49bfc0eb4bb1",
+ "revisionTime": "2017-08-01T13:52:49Z"
+ },
{
"checksumSHA1": "TvF3ym5sZVNqGlUOS9HgOIl/sZM=",
"path": "github.com/satori/go.uuid",
From ea76b5a6935d5535123e2f2ecf283e68eb69731a Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Thu, 10 Aug 2017 11:46:38 -0700
Subject: [PATCH 076/122] Show scp output on error
---
communicator/ssh/communicator.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go
index a6a7f9cf9..99ce03f67 100644
--- a/communicator/ssh/communicator.go
+++ b/communicator/ssh/communicator.go
@@ -693,6 +693,11 @@ func (c *comm) scpSession(scpCommand string, f func(io.Writer, *bufio.Reader) er
// Otherwise, we have an ExitErorr, meaning we can just read
// the exit status
log.Printf("non-zero exit status: %d", exitErr.ExitStatus())
+ stdoutB, err := ioutil.ReadAll(stdoutR)
+ if err != nil {
+ return err
+ }
+ log.Printf("scp output: %s", stdoutB)
// If we exited with status 127, it means SCP isn't available.
// Return a more descriptive error for that.
From b05643cd47cd3a2cb23e3427fb7d200d0b1126e4 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Thu, 10 Aug 2017 16:56:28 -0700
Subject: [PATCH 077/122] increase telemetry report timeout
---
packer/telemetry.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packer/telemetry.go b/packer/telemetry.go
index 5e66acd19..b8f94b11a 100644
--- a/packer/telemetry.go
+++ b/packer/telemetry.go
@@ -113,7 +113,7 @@ func (c *CheckpointTelemetry) Finalize(command string, errCode int, err error) e
}
params.Payload = extra
- ctx, cancel := context.WithTimeout(context.Background(), 550*time.Millisecond)
+ ctx, cancel := context.WithTimeout(context.Background(), 750*time.Millisecond)
defer cancel()
return checkpoint.Report(ctx, params)
From 2d3b639c7bb484f2461785e0561185423c370619 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Thu, 10 Aug 2017 17:02:23 -0700
Subject: [PATCH 078/122] don't need a waitgroup for uploading files
---
packer/rpc/communicator.go | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/packer/rpc/communicator.go b/packer/rpc/communicator.go
index bb085bd49..fbfe0c538 100644
--- a/packer/rpc/communicator.go
+++ b/packer/rpc/communicator.go
@@ -111,8 +111,7 @@ func (c *communicator) Start(cmd *packer.RemoteCmd) (err error) {
var finished CommandFinished
decoder := gob.NewDecoder(conn)
- err = decoder.Decode(&finished)
- if err != nil {
+ if err := decoder.Decode(&finished); err != nil {
log.Printf("[ERR] Error decoding response stream %d: %s",
responseStreamId, err)
cmd.SetExited(123)
@@ -130,12 +129,7 @@ func (c *communicator) Start(cmd *packer.RemoteCmd) (err error) {
func (c *communicator) Upload(path string, r io.Reader, fi *os.FileInfo) (err error) {
// Pipe the reader through to the connection
streamId := c.mux.NextId()
- var wg sync.WaitGroup
- wg.Add(1)
- go func() {
- defer wg.Done()
- serveSingleCopy("uploadData", c.mux, streamId, nil, r)
- }()
+ go serveSingleCopy("uploadData", c.mux, streamId, nil, r)
args := CommunicatorUploadArgs{
Path: path,
@@ -147,7 +141,6 @@ func (c *communicator) Upload(path string, r io.Reader, fi *os.FileInfo) (err er
}
err = c.client.Call("Communicator.Upload", &args, new(interface{}))
- wg.Wait()
return
}
From db7f860d9137ee3a85977efcbfa119b46c05a725 Mon Sep 17 00:00:00 2001
From: cstuntz
Date: Fri, 11 Aug 2017 10:43:05 -0700
Subject: [PATCH 079/122] Adding tagging back to spot instances, after they're
created
---
.../amazon/common/step_run_source_instance.go | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go
index 12de73adb..6642a3032 100644
--- a/builder/amazon/common/step_run_source_instance.go
+++ b/builder/amazon/common/step_run_source_instance.go
@@ -9,8 +9,10 @@ import (
"time"
"github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/ec2"
+ retry "github.com/hashicorp/packer/common"
"github.com/hashicorp/packer/packer"
"github.com/hashicorp/packer/template/interpolate"
"github.com/mitchellh/multistep"
@@ -270,6 +272,30 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
return multistep.ActionHalt
}
instanceId = *spotResp.SpotInstanceRequests[0].InstanceId
+
+ // Retry creating tags for about 2.5 minutes
+ err = retry.Retry(0.2, 30, 11, func(_ uint) (bool, error) {
+ _, err := ec2conn.CreateTags(&ec2.CreateTagsInput{
+ Tags: ec2Tags,
+ Resources: []*string{spotResp.SpotInstanceRequests[0].InstanceId},
+ })
+ if err == nil {
+ return true, nil
+ }
+ if awsErr, ok := err.(awserr.Error); ok {
+ if awsErr.Code() == "InvalidInstanceID.NotFound" {
+ return false, nil
+ }
+ }
+ return true, err
+ })
+
+ if err != nil {
+ err := fmt.Errorf("Error tagging source instance: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
}
// Set the instance ID so that the cleanup works properly
From f3a03dd650d38ea559487fd14a1fa58df2518094 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 11 Aug 2017 11:17:35 -0700
Subject: [PATCH 080/122] update changelog
---
CHANGELOG.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c6238a5f9..a6e2e40fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,8 @@
* command/push: fix handling of symlinks. [GH-5226]
* builder/amazon: Don't delete snapshots we didn't create. [GH-5211]
* builder/docker: Correctly handle case when uploading an empty directory. [GH-5234]
+* command/push: Don't push variables if they are unspecified. Reverts to
+ behavior in 1.0.1. [GH-5235]
## 1.0.3 (July 17, 2017)
@@ -60,7 +62,7 @@
provisioner stdout [GH-4719]
* post-processor/checksum: Fix interpolation of "output". [GH-5112]
* push: Push vars in packer config, not just those set from command line and in
- var-file. [GH-4992]
+ var-file. [GH-5101]
## 1.0.2 (June 21, 2017)
From 754c80d217ae5b8a410f87ef19983ce642d434ae Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 11 Aug 2017 12:31:05 -0700
Subject: [PATCH 081/122] create default tags as well
---
.../amazon/common/step_run_source_instance.go | 75 ++++++++++---------
1 file changed, 41 insertions(+), 34 deletions(-)
diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go
index 6642a3032..5a864a5e4 100644
--- a/builder/amazon/common/step_run_source_instance.go
+++ b/builder/amazon/common/step_run_source_instance.go
@@ -135,6 +135,13 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
}
var instanceId string
+
+ ui.Say("Adding tags to source instance")
+ if _, exists := s.Tags["Name"]; !exists {
+ s.Tags["Name"] = "Packer Builder"
+ }
+
+ createTagsAfterInstanceStarts := true
ec2Tags, err := ConvertToEC2Tags(s.Tags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
if err != nil {
err := fmt.Errorf("Error tagging source instance: %s", err)
@@ -142,17 +149,10 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
ui.Error(err.Error())
return multistep.ActionHalt
}
-
ReportTags(ui, ec2Tags)
if spotPrice == "" || spotPrice == "0" {
- var runTag ec2.TagSpecification
- runTag.SetResourceType("instance")
- runTag.SetTags(ec2Tags)
-
- runTags := []*ec2.TagSpecification{&runTag}
-
runOpts := &ec2.RunInstancesInput{
ImageId: &s.SourceAMI,
InstanceType: &s.InstanceType,
@@ -163,7 +163,16 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
BlockDeviceMappings: s.BlockDevices.BuildLaunchDevices(),
Placement: &ec2.Placement{AvailabilityZone: &s.AvailabilityZone},
EbsOptimized: &s.EbsOptimized,
- TagSpecifications: runTags,
+ }
+
+ if len(ec2Tags) > 0 {
+ runTags := &ec2.TagSpecification{
+ ResourceType: aws.String("instance"),
+ Tags: ec2Tags,
+ }
+
+ runOpts.SetTagSpecifications([]*ec2.TagSpecification{runTags})
+ createTagsAfterInstanceStarts = false
}
if keyName != "" {
@@ -273,29 +282,6 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
}
instanceId = *spotResp.SpotInstanceRequests[0].InstanceId
- // Retry creating tags for about 2.5 minutes
- err = retry.Retry(0.2, 30, 11, func(_ uint) (bool, error) {
- _, err := ec2conn.CreateTags(&ec2.CreateTagsInput{
- Tags: ec2Tags,
- Resources: []*string{spotResp.SpotInstanceRequests[0].InstanceId},
- })
- if err == nil {
- return true, nil
- }
- if awsErr, ok := err.(awserr.Error); ok {
- if awsErr.Code() == "InvalidInstanceID.NotFound" {
- return false, nil
- }
- }
- return true, err
- })
-
- if err != nil {
- err := fmt.Errorf("Error tagging source instance: %s", err)
- state.Put("error", err)
- ui.Error(err.Error())
- return multistep.ActionHalt
- }
}
// Set the instance ID so that the cleanup works properly
@@ -319,9 +305,30 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
instance := latestInstance.(*ec2.Instance)
- ui.Say("Adding tags to source instance")
- if _, exists := s.Tags["Name"]; !exists {
- s.Tags["Name"] = "Packer Builder"
+ if createTagsAfterInstanceStarts {
+ // Retry creating tags for about 2.5 minutes
+ err = retry.Retry(0.2, 30, 11, func(_ uint) (bool, error) {
+ _, err := ec2conn.CreateTags(&ec2.CreateTagsInput{
+ Tags: ec2Tags,
+ Resources: []*string{instance.InstanceId},
+ })
+ if err == nil {
+ return true, nil
+ }
+ if awsErr, ok := err.(awserr.Error); ok {
+ if awsErr.Code() == "InvalidInstanceID.NotFound" {
+ return false, nil
+ }
+ }
+ return true, err
+ })
+
+ if err != nil {
+ err := fmt.Errorf("Error tagging source instance: %s", err)
+ state.Put("error", err)
+ ui.Error(err.Error())
+ return multistep.ActionHalt
+ }
}
if s.Debug {
From 16773bed6aac49e4e512546320a80812de47c200 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 11 Aug 2017 13:07:00 -0700
Subject: [PATCH 082/122] update aws-sdk-go to v1.10.23 (2017-08-10)
---
vendor/github.com/aws/aws-sdk-go/CHANGELOG.md | 97 +
vendor/github.com/aws/aws-sdk-go/README.md | 2 +-
.../aws/aws-sdk-go/aws/context_1_6.go | 6 +-
.../aws/aws-sdk-go/aws/convert_types.go | 18 +
.../aws/aws-sdk-go/aws/endpoints/defaults.go | 11 +-
.../aws/aws-sdk-go/aws/endpoints/doc.go | 4 +-
.../request/connection_reset_error_other.go | 11 -
.../aws/aws-sdk-go/aws/request/request.go | 2 +-
.../aws/aws-sdk-go/aws/request/retryer.go | 4 +-
.../aws/aws-sdk-go/aws/session/env_config.go | 2 +-
.../aws/aws-sdk-go/aws/signer/v4/v4.go | 64 +-
.../github.com/aws/aws-sdk-go/aws/version.go | 2 +-
.../aws/aws-sdk-go/service/ec2/api.go | 5020 +++++++++--------
.../aws/aws-sdk-go/service/ec2/doc.go | 64 +-
.../aws/aws-sdk-go/service/ec2/waiters.go | 67 +-
.../aws/aws-sdk-go/service/ecr/api.go | 323 +-
.../aws/aws-sdk-go/service/ecr/doc.go | 64 +-
.../aws/aws-sdk-go/service/s3/api.go | 1406 +++--
.../aws/aws-sdk-go/service/s3/doc.go | 64 +-
.../service/s3/s3iface/interface.go | 2 +-
.../aws/aws-sdk-go/service/s3/waiters.go | 8 +-
.../aws/aws-sdk-go/service/sts/api.go | 133 +-
.../aws/aws-sdk-go/service/sts/doc.go | 64 +-
vendor/vendor.json | 290 +-
24 files changed, 3957 insertions(+), 3771 deletions(-)
delete mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go
diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
index 681429cd8..b52655b67 100644
--- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
@@ -1,3 +1,100 @@
+Release v1.10.23 (2017-08-10)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Enable BatchDetachPolicy
+* `service/codebuild`: Updates service API
+ * Supporting Bitbucket as source type in AWS CodeBuild.
+
+Release v1.10.22 (2017-08-09)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service documentation
+ * Documentation updates for RDS.
+
+Release v1.10.21 (2017-08-09)
+===
+
+### Service Client Updates
+* `service/elasticbeanstalk`: Updates service API and documentation
+ * Add support for paginating the result of DescribeEnvironments Include the ARN of described environments in DescribeEnvironments output
+
+### SDK Enhancements
+* `aws`: Add pointer conversion utilities to transform int64 to time.Time [#1433](https://github.com/aws/aws-sdk-go/pull/1433)
+ * Adds `SecondsTimeValue` and `MillisecondsTimeValue` utilities.
+
+Release v1.10.20 (2017-08-01)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * AWS CodeDeploy now supports the use of multiple tag groups in a single deployment group (an intersection of tags) to identify the instances for a deployment. When you create or update a deployment group, use the new ec2TagSet and onPremisesTagSet structures to specify up to three groups of tags. Only instances that are identified by at least one tag in each of the tag groups are included in the deployment group.
+* `service/config`: Updates service API and documentation
+* `service/ec2`: Updates service waiters
+ * Ec2 SpotInstanceRequestFulfilled waiter update
+* `service/elasticloadbalancingv2`: Updates service waiters
+* `service/email`: Updates service API, documentation, paginators, and examples
+ * This update adds information about publishing email open and click events. This update also adds information about publishing email events to Amazon Simple Notification Service (Amazon SNS).
+* `service/pinpoint`: Updates service API and documentation
+ * This release of the Pinpoint SDK enables App management - create, delete, update operations, Raw Content delivery for APNs and GCM campaign messages and From Address override.
+
+Release v1.10.19 (2017-08-01)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/inspector`: Updates service API, documentation, and paginators
+ * Inspector's StopAssessmentRun API has been updated with a new input option - stopAction. This request parameter can be set to either START_EVALUATION or SKIP_EVALUATION. START_EVALUATION (the default value, and the previous behavior) stops the AWS agent data collection and begins the results evaluation for findings generation based on the data collected so far. SKIP_EVALUATION cancels the assessment run immediately, after which no findings are generated.
+* `service/ssm`: Updates service API and documentation
+ * Adds a SendAutomationSignal API to SSM Service. This API is used to send a signal to an automation execution to change the current behavior or status of the execution.
+
+Release v1.10.18 (2017-07-27)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * The CreateDefaultVPC API enables you to create a new default VPC . You no longer need to contact AWS support, if your default VPC has been deleted.
+* `service/kinesisanalytics`: Updates service API and documentation
+ * Added additional exception types and clarified documentation.
+
+Release v1.10.17 (2017-07-27)
+===
+
+### Service Client Updates
+* `service/dynamodb`: Updates service documentation and examples
+ * Corrected a typo.
+* `service/ec2`: Updates service API and documentation
+ * Amazon EC2 Elastic GPUs allow you to easily attach low-cost graphics acceleration to current generation EC2 instances. With Amazon EC2 Elastic GPUs, you can configure the right amount of graphics acceleration to your particular workload without being constrained by fixed hardware configurations and limited GPU selection.
+* `service/monitoring`: Updates service documentation
+ * This release adds high resolution features to CloudWatch, with support for Custom Metrics down to 1 second and Alarms down to 10 seconds.
+
+Release v1.10.16 (2017-07-26)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Cloud Directory adds support for additional batch operations.
+* `service/cloudformation`: Updates service API and documentation
+ * AWS CloudFormation StackSets enables you to manage stacks across multiple accounts and regions.
+
+### SDK Enhancements
+* `aws/signer/v4`: Optimize V4 signer's header duplicate space stripping. [#1417](https://github.com/aws/aws-sdk-go/pull/1417)
+
+Release v1.10.15 (2017-07-24)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API, documentation, and waiters
+ * Amazon AppStream 2.0 image builders and fleets can now access applications and network resources that rely on Microsoft Active Directory (AD) for authentication and permissions. This new feature allows you to join your streaming instances to your AD, so you can use your existing AD user management tools.
+* `service/ec2`: Updates service API and documentation
+ * Spot Fleet tagging capability allows customers to automatically tag instances launched by Spot Fleet. You can use this feature to label or distinguish instances created by distinct Spot Fleets. Tagging your EC2 instances also enables you to see instance cost allocation by tag in your AWS bill.
+
+### SDK Bugs
+* `aws/signer/v4`: Fix out of bounds panic in stripExcessSpaces [#1412](https://github.com/aws/aws-sdk-go/pull/1412)
+ * Fixes the out of bands panic in stripExcessSpaces caused by an incorrect calculation of the stripToIdx value. Simplified to code also.
+ * Fixes [#1411](https://github.com/aws/aws-sdk-go/issues/1411)
Release v1.10.14 (2017-07-20)
===
diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md
index 559697f66..d5e048a5f 100644
--- a/vendor/github.com/aws/aws-sdk-go/README.md
+++ b/vendor/github.com/aws/aws-sdk-go/README.md
@@ -167,7 +167,7 @@ and configures the S3 service client to use that role for API requests.
// Create service client value configured for credentials
// from assumed role.
- svc := s3.New(sess, &aws.Config{Credentials: creds})/
+ svc := s3.New(sess, &aws.Config{Credentials: creds})
```
See the [credentials][credentials_pkg] package documentation for more information on credential
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
index e8cf93d26..8fdda5303 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
@@ -4,9 +4,9 @@ package aws
import "time"
-// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This
-// is copied to provide a 1.6 and 1.5 safe version of context that is compatible
-// with Go 1.7's Context.
+// An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to
+// provide a 1.6 and 1.5 safe version of context that is compatible with Go
+// 1.7's Context.
//
// An emptyCtx is never canceled, has no values, and has no deadline. It is not
// struct{}, since vars of this type must have distinct addresses.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
index 3b73a7da7..ff5d58e06 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
@@ -311,6 +311,24 @@ func TimeValue(v *time.Time) time.Time {
return time.Time{}
}
+// SecondsTimeValue converts an int64 pointer to a time.Time value
+// representing seconds since Epoch or time.Time{} if the pointer is nil.
+func SecondsTimeValue(v *int64) time.Time {
+ if v != nil {
+ return time.Unix((*v / 1000), 0)
+ }
+ return time.Time{}
+}
+
+// MillisecondsTimeValue converts an int64 pointer to a time.Time value
+// representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
+func MillisecondsTimeValue(v *int64) time.Time {
+ if v != nil {
+ return time.Unix(0, (*v * 1000000))
+ }
+ return time.Time{}
+}
+
// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC".
// The result is undefined if the Unix time cannot be represented by an int64.
// Which includes calling TimeUnixMilli on a zero Time is undefined.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
index ba0c07b25..899087ec5 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
@@ -537,10 +537,13 @@ var awsPartition = partition{
"codestar": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"cognito-identity": service{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
index a0e9bc454..84316b92c 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
@@ -21,12 +21,12 @@
// partitions := resolver.(endpoints.EnumPartitions).Partitions()
//
// for _, p := range partitions {
-// fmt.Println("Regions for", p.Name)
+// fmt.Println("Regions for", p.ID())
// for id, _ := range p.Regions() {
// fmt.Println("*", id)
// }
//
-// fmt.Println("Services for", p.Name)
+// fmt.Println("Services for", p.ID())
// for id, _ := range p.Services() {
// fmt.Println("*", id)
// }
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go
deleted file mode 100644
index daf9eca43..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build appengine plan9
-
-package request
-
-import (
- "strings"
-)
-
-func isErrConnectionReset(err error) bool {
- return strings.Contains(err.Error(), "connection reset")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
index 299dc379d..088ba5290 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
@@ -24,7 +24,7 @@ const (
// ErrCodeRead is an error that is returned during HTTP reads.
ErrCodeRead = "ReadError"
- // ErrCodeResponseTimeout is the connection timeout error that is recieved
+ // ErrCodeResponseTimeout is the connection timeout error that is received
// during body reads.
ErrCodeResponseTimeout = "ResponseTimeout"
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
index 2c05dbdc2..f35fef213 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
@@ -70,8 +70,8 @@ func isCodeExpiredCreds(code string) bool {
}
var validParentCodes = map[string]struct{}{
- ErrCodeSerialization: struct{}{},
- ErrCodeRead: struct{}{},
+ ErrCodeSerialization: {},
+ ErrCodeRead: {},
}
type temporaryError interface {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
index 7357e545a..4b102f8f2 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
@@ -76,7 +76,7 @@ type envConfig struct {
SharedConfigFile string
// Sets the path to a custom Credentials Authroity (CA) Bundle PEM file
- // that the SDK will use instead of the the system's root CA bundle.
+ // that the SDK will use instead of the system's root CA bundle.
// Only use this if you want to configure the SDK to use a custom set
// of CAs.
//
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
index b7da95ab6..d68905acb 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
@@ -55,7 +55,6 @@
package v4
import (
- "bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
@@ -614,8 +613,8 @@ func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
strings.Join(ctx.SignedHeaderVals[k], ",")
}
}
-
- ctx.canonicalHeaders = strings.Join(stripExcessSpaces(headerValues), "\n")
+ stripExcessSpaces(headerValues)
+ ctx.canonicalHeaders = strings.Join(headerValues, "\n")
}
func (ctx *signingCtx) buildCanonicalString() {
@@ -717,45 +716,46 @@ func makeSha256Reader(reader io.ReadSeeker) []byte {
return hash.Sum(nil)
}
-const doubleSpaces = " "
+const doubleSpace = " "
-var doubleSpaceBytes = []byte(doubleSpaces)
+// stripExcessSpaces will rewrite the passed in slice's string values to not
+// contain muliple side-by-side spaces.
+func stripExcessSpaces(vals []string) {
+ var j, k, l, m, spaces int
+ for i, str := range vals {
+ // Trim trailing spaces
+ for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- {
+ }
-func stripExcessSpaces(headerVals []string) []string {
- vals := make([]string, len(headerVals))
- for i, str := range headerVals {
- // Trim leading and trailing spaces
- trimmed := strings.TrimSpace(str)
+ // Trim leading spaces
+ for k = 0; k < j && str[k] == ' '; k++ {
+ }
+ str = str[k : j+1]
- idx := strings.Index(trimmed, doubleSpaces)
- if idx < 0 {
- vals[i] = trimmed
+ // Strip multiple spaces.
+ j = strings.Index(str, doubleSpace)
+ if j < 0 {
+ vals[i] = str
continue
}
- buf := []byte(trimmed)
- for idx > -1 {
- stripToIdx := -1
- for j := idx + 1; j < len(buf); j++ {
- if buf[j] != ' ' {
- buf = append(buf[:idx+1], buf[j:]...)
- stripToIdx = j - idx - 1
- break
- }
- }
-
- if stripToIdx >= 0 {
- // Find next double space
- idx = bytes.Index(buf[stripToIdx:], doubleSpaceBytes)
- if idx >= 0 {
- idx += stripToIdx
+ buf := []byte(str)
+ for k, m, l = j, j, len(buf); k < l; k++ {
+ if buf[k] == ' ' {
+ if spaces == 0 {
+ // First space.
+ buf[m] = buf[k]
+ m++
}
+ spaces++
} else {
- idx = -1
+ // End of multiple spaces.
+ spaces = 0
+ buf[m] = buf[k]
+ m++
}
}
- vals[i] = string(buf)
+ vals[i] = string(buf[:m])
}
- return vals
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go
index 6abe02e04..7a4f26e39 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go
@@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.10.14"
+const SDKVersion = "1.10.23"
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
index bd13ab77e..da2809630 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
@@ -17,19 +17,18 @@ const opAcceptReservedInstancesExchangeQuote = "AcceptReservedInstancesExchangeQ
// AcceptReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the
// client's request for the AcceptReservedInstancesExchangeQuote operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AcceptReservedInstancesExchangeQuote for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AcceptReservedInstancesExchangeQuote method directly
-// instead.
+// See AcceptReservedInstancesExchangeQuote for more information on using the AcceptReservedInstancesExchangeQuote
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AcceptReservedInstancesExchangeQuoteRequest method.
// req, resp := client.AcceptReservedInstancesExchangeQuoteRequest(params)
@@ -93,19 +92,18 @@ const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection"
// AcceptVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the AcceptVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AcceptVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AcceptVpcPeeringConnection method directly
-// instead.
+// See AcceptVpcPeeringConnection for more information on using the AcceptVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AcceptVpcPeeringConnectionRequest method.
// req, resp := client.AcceptVpcPeeringConnectionRequest(params)
@@ -171,19 +169,18 @@ const opAllocateAddress = "AllocateAddress"
// AllocateAddressRequest generates a "aws/request.Request" representing the
// client's request for the AllocateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AllocateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AllocateAddress method directly
-// instead.
+// See AllocateAddress for more information on using the AllocateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AllocateAddressRequest method.
// req, resp := client.AllocateAddressRequest(params)
@@ -250,19 +247,18 @@ const opAllocateHosts = "AllocateHosts"
// AllocateHostsRequest generates a "aws/request.Request" representing the
// client's request for the AllocateHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AllocateHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AllocateHosts method directly
-// instead.
+// See AllocateHosts for more information on using the AllocateHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AllocateHostsRequest method.
// req, resp := client.AllocateHostsRequest(params)
@@ -327,19 +323,18 @@ const opAssignIpv6Addresses = "AssignIpv6Addresses"
// AssignIpv6AddressesRequest generates a "aws/request.Request" representing the
// client's request for the AssignIpv6Addresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssignIpv6Addresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssignIpv6Addresses method directly
-// instead.
+// See AssignIpv6Addresses for more information on using the AssignIpv6Addresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssignIpv6AddressesRequest method.
// req, resp := client.AssignIpv6AddressesRequest(params)
@@ -409,19 +404,18 @@ const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses"
// AssignPrivateIpAddressesRequest generates a "aws/request.Request" representing the
// client's request for the AssignPrivateIpAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssignPrivateIpAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssignPrivateIpAddresses method directly
-// instead.
+// See AssignPrivateIpAddresses for more information on using the AssignPrivateIpAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssignPrivateIpAddressesRequest method.
// req, resp := client.AssignPrivateIpAddressesRequest(params)
@@ -496,19 +490,18 @@ const opAssociateAddress = "AssociateAddress"
// AssociateAddressRequest generates a "aws/request.Request" representing the
// client's request for the AssociateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateAddress method directly
-// instead.
+// See AssociateAddress for more information on using the AssociateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateAddressRequest method.
// req, resp := client.AssociateAddressRequest(params)
@@ -594,19 +587,18 @@ const opAssociateDhcpOptions = "AssociateDhcpOptions"
// AssociateDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the AssociateDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateDhcpOptions method directly
-// instead.
+// See AssociateDhcpOptions for more information on using the AssociateDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateDhcpOptionsRequest method.
// req, resp := client.AssociateDhcpOptionsRequest(params)
@@ -682,19 +674,18 @@ const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile"
// AssociateIamInstanceProfileRequest generates a "aws/request.Request" representing the
// client's request for the AssociateIamInstanceProfile operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateIamInstanceProfile for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateIamInstanceProfile method directly
-// instead.
+// See AssociateIamInstanceProfile for more information on using the AssociateIamInstanceProfile
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateIamInstanceProfileRequest method.
// req, resp := client.AssociateIamInstanceProfileRequest(params)
@@ -758,19 +749,18 @@ const opAssociateRouteTable = "AssociateRouteTable"
// AssociateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the AssociateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateRouteTable method directly
-// instead.
+// See AssociateRouteTable for more information on using the AssociateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateRouteTableRequest method.
// req, resp := client.AssociateRouteTableRequest(params)
@@ -840,19 +830,18 @@ const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock"
// AssociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the AssociateSubnetCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateSubnetCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateSubnetCidrBlock method directly
-// instead.
+// See AssociateSubnetCidrBlock for more information on using the AssociateSubnetCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateSubnetCidrBlockRequest method.
// req, resp := client.AssociateSubnetCidrBlockRequest(params)
@@ -917,19 +906,18 @@ const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock"
// AssociateVpcCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the AssociateVpcCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateVpcCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateVpcCidrBlock method directly
-// instead.
+// See AssociateVpcCidrBlock for more information on using the AssociateVpcCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateVpcCidrBlockRequest method.
// req, resp := client.AssociateVpcCidrBlockRequest(params)
@@ -993,19 +981,18 @@ const opAttachClassicLinkVpc = "AttachClassicLinkVpc"
// AttachClassicLinkVpcRequest generates a "aws/request.Request" representing the
// client's request for the AttachClassicLinkVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachClassicLinkVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachClassicLinkVpc method directly
-// instead.
+// See AttachClassicLinkVpc for more information on using the AttachClassicLinkVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachClassicLinkVpcRequest method.
// req, resp := client.AttachClassicLinkVpcRequest(params)
@@ -1079,19 +1066,18 @@ const opAttachInternetGateway = "AttachInternetGateway"
// AttachInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the AttachInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachInternetGateway method directly
-// instead.
+// See AttachInternetGateway for more information on using the AttachInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachInternetGatewayRequest method.
// req, resp := client.AttachInternetGatewayRequest(params)
@@ -1158,19 +1144,18 @@ const opAttachNetworkInterface = "AttachNetworkInterface"
// AttachNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the AttachNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachNetworkInterface method directly
-// instead.
+// See AttachNetworkInterface for more information on using the AttachNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachNetworkInterfaceRequest method.
// req, resp := client.AttachNetworkInterfaceRequest(params)
@@ -1233,19 +1218,18 @@ const opAttachVolume = "AttachVolume"
// AttachVolumeRequest generates a "aws/request.Request" representing the
// client's request for the AttachVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachVolume method directly
-// instead.
+// See AttachVolume for more information on using the AttachVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachVolumeRequest method.
// req, resp := client.AttachVolumeRequest(params)
@@ -1337,19 +1321,18 @@ const opAttachVpnGateway = "AttachVpnGateway"
// AttachVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the AttachVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachVpnGateway method directly
-// instead.
+// See AttachVpnGateway for more information on using the AttachVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachVpnGatewayRequest method.
// req, resp := client.AttachVpnGatewayRequest(params)
@@ -1417,19 +1400,18 @@ const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress"
// AuthorizeSecurityGroupEgressRequest generates a "aws/request.Request" representing the
// client's request for the AuthorizeSecurityGroupEgress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AuthorizeSecurityGroupEgress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AuthorizeSecurityGroupEgress method directly
-// instead.
+// See AuthorizeSecurityGroupEgress for more information on using the AuthorizeSecurityGroupEgress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AuthorizeSecurityGroupEgressRequest method.
// req, resp := client.AuthorizeSecurityGroupEgressRequest(params)
@@ -1510,19 +1492,18 @@ const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress"
// AuthorizeSecurityGroupIngressRequest generates a "aws/request.Request" representing the
// client's request for the AuthorizeSecurityGroupIngress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AuthorizeSecurityGroupIngress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AuthorizeSecurityGroupIngress method directly
-// instead.
+// See AuthorizeSecurityGroupIngress for more information on using the AuthorizeSecurityGroupIngress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AuthorizeSecurityGroupIngressRequest method.
// req, resp := client.AuthorizeSecurityGroupIngressRequest(params)
@@ -1603,19 +1584,18 @@ const opBundleInstance = "BundleInstance"
// BundleInstanceRequest generates a "aws/request.Request" representing the
// client's request for the BundleInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BundleInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BundleInstance method directly
-// instead.
+// See BundleInstance for more information on using the BundleInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BundleInstanceRequest method.
// req, resp := client.BundleInstanceRequest(params)
@@ -1686,19 +1666,18 @@ const opCancelBundleTask = "CancelBundleTask"
// CancelBundleTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelBundleTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelBundleTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelBundleTask method directly
-// instead.
+// See CancelBundleTask for more information on using the CancelBundleTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelBundleTaskRequest method.
// req, resp := client.CancelBundleTaskRequest(params)
@@ -1761,19 +1740,18 @@ const opCancelConversionTask = "CancelConversionTask"
// CancelConversionTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelConversionTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelConversionTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelConversionTask method directly
-// instead.
+// See CancelConversionTask for more information on using the CancelConversionTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelConversionTaskRequest method.
// req, resp := client.CancelConversionTaskRequest(params)
@@ -1845,19 +1823,18 @@ const opCancelExportTask = "CancelExportTask"
// CancelExportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelExportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelExportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelExportTask method directly
-// instead.
+// See CancelExportTask for more information on using the CancelExportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelExportTaskRequest method.
// req, resp := client.CancelExportTaskRequest(params)
@@ -1925,19 +1902,18 @@ const opCancelImportTask = "CancelImportTask"
// CancelImportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelImportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelImportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelImportTask method directly
-// instead.
+// See CancelImportTask for more information on using the CancelImportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelImportTaskRequest method.
// req, resp := client.CancelImportTaskRequest(params)
@@ -2000,19 +1976,18 @@ const opCancelReservedInstancesListing = "CancelReservedInstancesListing"
// CancelReservedInstancesListingRequest generates a "aws/request.Request" representing the
// client's request for the CancelReservedInstancesListing operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelReservedInstancesListing for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelReservedInstancesListing method directly
-// instead.
+// See CancelReservedInstancesListing for more information on using the CancelReservedInstancesListing
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelReservedInstancesListingRequest method.
// req, resp := client.CancelReservedInstancesListingRequest(params)
@@ -2079,19 +2054,18 @@ const opCancelSpotFleetRequests = "CancelSpotFleetRequests"
// CancelSpotFleetRequestsRequest generates a "aws/request.Request" representing the
// client's request for the CancelSpotFleetRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelSpotFleetRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelSpotFleetRequests method directly
-// instead.
+// See CancelSpotFleetRequests for more information on using the CancelSpotFleetRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelSpotFleetRequestsRequest method.
// req, resp := client.CancelSpotFleetRequestsRequest(params)
@@ -2161,19 +2135,18 @@ const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests"
// CancelSpotInstanceRequestsRequest generates a "aws/request.Request" representing the
// client's request for the CancelSpotInstanceRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelSpotInstanceRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelSpotInstanceRequests method directly
-// instead.
+// See CancelSpotInstanceRequests for more information on using the CancelSpotInstanceRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelSpotInstanceRequestsRequest method.
// req, resp := client.CancelSpotInstanceRequestsRequest(params)
@@ -2244,19 +2217,18 @@ const opConfirmProductInstance = "ConfirmProductInstance"
// ConfirmProductInstanceRequest generates a "aws/request.Request" representing the
// client's request for the ConfirmProductInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ConfirmProductInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ConfirmProductInstance method directly
-// instead.
+// See ConfirmProductInstance for more information on using the ConfirmProductInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ConfirmProductInstanceRequest method.
// req, resp := client.ConfirmProductInstanceRequest(params)
@@ -2322,19 +2294,18 @@ const opCopyImage = "CopyImage"
// CopyImageRequest generates a "aws/request.Request" representing the
// client's request for the CopyImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopyImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopyImage method directly
-// instead.
+// See CopyImage for more information on using the CopyImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopyImageRequest method.
// req, resp := client.CopyImageRequest(params)
@@ -2403,19 +2374,18 @@ const opCopySnapshot = "CopySnapshot"
// CopySnapshotRequest generates a "aws/request.Request" representing the
// client's request for the CopySnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopySnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopySnapshot method directly
-// instead.
+// See CopySnapshot for more information on using the CopySnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopySnapshotRequest method.
// req, resp := client.CopySnapshotRequest(params)
@@ -2497,19 +2467,18 @@ const opCreateCustomerGateway = "CreateCustomerGateway"
// CreateCustomerGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateCustomerGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateCustomerGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateCustomerGateway method directly
-// instead.
+// See CreateCustomerGateway for more information on using the CreateCustomerGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateCustomerGatewayRequest method.
// req, resp := client.CreateCustomerGatewayRequest(params)
@@ -2592,23 +2561,108 @@ func (c *EC2) CreateCustomerGatewayWithContext(ctx aws.Context, input *CreateCus
return out, req.Send()
}
+const opCreateDefaultVpc = "CreateDefaultVpc"
+
+// CreateDefaultVpcRequest generates a "aws/request.Request" representing the
+// client's request for the CreateDefaultVpc operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateDefaultVpc for more information on using the CreateDefaultVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateDefaultVpcRequest method.
+// req, resp := client.CreateDefaultVpcRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc
+func (c *EC2) CreateDefaultVpcRequest(input *CreateDefaultVpcInput) (req *request.Request, output *CreateDefaultVpcOutput) {
+ op := &request.Operation{
+ Name: opCreateDefaultVpc,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateDefaultVpcInput{}
+ }
+
+ output = &CreateDefaultVpcOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateDefaultVpc API operation for Amazon Elastic Compute Cloud.
+//
+// Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet
+// in each Availability Zone. For more information about the components of a
+// default VPC, see Default VPC and Default Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html)
+// in the Amazon Virtual Private Cloud User Guide. You cannot specify the components
+// of the default VPC yourself.
+//
+// You can create a default VPC if you deleted your previous default VPC. You
+// cannot have more than one default VPC per region.
+//
+// If your account supports EC2-Classic, you cannot use this action to create
+// a default VPC in a region that supports EC2-Classic. If you want a default
+// VPC in a region that supports EC2-Classic, see "I really want a default VPC
+// for my existing EC2 account. Is that possible?" in the Default VPCs FAQ (http://aws.amazon.com/vpc/faqs/#Default_VPCs).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateDefaultVpc for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc
+func (c *EC2) CreateDefaultVpc(input *CreateDefaultVpcInput) (*CreateDefaultVpcOutput, error) {
+ req, out := c.CreateDefaultVpcRequest(input)
+ return out, req.Send()
+}
+
+// CreateDefaultVpcWithContext is the same as CreateDefaultVpc with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateDefaultVpc for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateDefaultVpcWithContext(ctx aws.Context, input *CreateDefaultVpcInput, opts ...request.Option) (*CreateDefaultVpcOutput, error) {
+ req, out := c.CreateDefaultVpcRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opCreateDhcpOptions = "CreateDhcpOptions"
// CreateDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the CreateDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateDhcpOptions method directly
-// instead.
+// See CreateDhcpOptions for more information on using the CreateDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateDhcpOptionsRequest method.
// req, resp := client.CreateDhcpOptionsRequest(params)
@@ -2710,19 +2764,18 @@ const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway"
// CreateEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateEgressOnlyInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateEgressOnlyInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateEgressOnlyInternetGateway method directly
-// instead.
+// See CreateEgressOnlyInternetGateway for more information on using the CreateEgressOnlyInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateEgressOnlyInternetGatewayRequest method.
// req, resp := client.CreateEgressOnlyInternetGatewayRequest(params)
@@ -2788,19 +2841,18 @@ const opCreateFlowLogs = "CreateFlowLogs"
// CreateFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the CreateFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateFlowLogs method directly
-// instead.
+// See CreateFlowLogs for more information on using the CreateFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateFlowLogsRequest method.
// req, resp := client.CreateFlowLogsRequest(params)
@@ -2872,19 +2924,18 @@ const opCreateFpgaImage = "CreateFpgaImage"
// CreateFpgaImageRequest generates a "aws/request.Request" representing the
// client's request for the CreateFpgaImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateFpgaImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateFpgaImage method directly
-// instead.
+// See CreateFpgaImage for more information on using the CreateFpgaImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateFpgaImageRequest method.
// req, resp := client.CreateFpgaImageRequest(params)
@@ -2954,19 +3005,18 @@ const opCreateImage = "CreateImage"
// CreateImageRequest generates a "aws/request.Request" representing the
// client's request for the CreateImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateImage method directly
-// instead.
+// See CreateImage for more information on using the CreateImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateImageRequest method.
// req, resp := client.CreateImageRequest(params)
@@ -3038,19 +3088,18 @@ const opCreateInstanceExportTask = "CreateInstanceExportTask"
// CreateInstanceExportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CreateInstanceExportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateInstanceExportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateInstanceExportTask method directly
-// instead.
+// See CreateInstanceExportTask for more information on using the CreateInstanceExportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateInstanceExportTaskRequest method.
// req, resp := client.CreateInstanceExportTaskRequest(params)
@@ -3118,19 +3167,18 @@ const opCreateInternetGateway = "CreateInternetGateway"
// CreateInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateInternetGateway method directly
-// instead.
+// See CreateInternetGateway for more information on using the CreateInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateInternetGatewayRequest method.
// req, resp := client.CreateInternetGatewayRequest(params)
@@ -3197,19 +3245,18 @@ const opCreateKeyPair = "CreateKeyPair"
// CreateKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the CreateKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateKeyPair method directly
-// instead.
+// See CreateKeyPair for more information on using the CreateKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateKeyPairRequest method.
// req, resp := client.CreateKeyPairRequest(params)
@@ -3283,19 +3330,18 @@ const opCreateNatGateway = "CreateNatGateway"
// CreateNatGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateNatGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNatGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNatGateway method directly
-// instead.
+// See CreateNatGateway for more information on using the CreateNatGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNatGatewayRequest method.
// req, resp := client.CreateNatGatewayRequest(params)
@@ -3363,19 +3409,18 @@ const opCreateNetworkAcl = "CreateNetworkAcl"
// CreateNetworkAclRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkAcl method directly
-// instead.
+// See CreateNetworkAcl for more information on using the CreateNetworkAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkAclRequest method.
// req, resp := client.CreateNetworkAclRequest(params)
@@ -3442,19 +3487,18 @@ const opCreateNetworkAclEntry = "CreateNetworkAclEntry"
// CreateNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkAclEntry method directly
-// instead.
+// See CreateNetworkAclEntry for more information on using the CreateNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkAclEntryRequest method.
// req, resp := client.CreateNetworkAclEntryRequest(params)
@@ -3535,19 +3579,18 @@ const opCreateNetworkInterface = "CreateNetworkInterface"
// CreateNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkInterface method directly
-// instead.
+// See CreateNetworkInterface for more information on using the CreateNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkInterfaceRequest method.
// req, resp := client.CreateNetworkInterfaceRequest(params)
@@ -3614,19 +3657,18 @@ const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission"
// CreateNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkInterfacePermission operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkInterfacePermission for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkInterfacePermission method directly
-// instead.
+// See CreateNetworkInterfacePermission for more information on using the CreateNetworkInterfacePermission
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkInterfacePermissionRequest method.
// req, resp := client.CreateNetworkInterfacePermissionRequest(params)
@@ -3693,19 +3735,18 @@ const opCreatePlacementGroup = "CreatePlacementGroup"
// CreatePlacementGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreatePlacementGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreatePlacementGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreatePlacementGroup method directly
-// instead.
+// See CreatePlacementGroup for more information on using the CreatePlacementGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreatePlacementGroupRequest method.
// req, resp := client.CreatePlacementGroupRequest(params)
@@ -3775,19 +3816,18 @@ const opCreateReservedInstancesListing = "CreateReservedInstancesListing"
// CreateReservedInstancesListingRequest generates a "aws/request.Request" representing the
// client's request for the CreateReservedInstancesListing operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateReservedInstancesListing for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateReservedInstancesListing method directly
-// instead.
+// See CreateReservedInstancesListing for more information on using the CreateReservedInstancesListing
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateReservedInstancesListingRequest method.
// req, resp := client.CreateReservedInstancesListingRequest(params)
@@ -3873,19 +3913,18 @@ const opCreateRoute = "CreateRoute"
// CreateRouteRequest generates a "aws/request.Request" representing the
// client's request for the CreateRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateRoute method directly
-// instead.
+// See CreateRoute for more information on using the CreateRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateRouteRequest method.
// req, resp := client.CreateRouteRequest(params)
@@ -3967,19 +4006,18 @@ const opCreateRouteTable = "CreateRouteTable"
// CreateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the CreateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateRouteTable method directly
-// instead.
+// See CreateRouteTable for more information on using the CreateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateRouteTableRequest method.
// req, resp := client.CreateRouteTableRequest(params)
@@ -4046,19 +4084,18 @@ const opCreateSecurityGroup = "CreateSecurityGroup"
// CreateSecurityGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateSecurityGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSecurityGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSecurityGroup method directly
-// instead.
+// See CreateSecurityGroup for more information on using the CreateSecurityGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSecurityGroupRequest method.
// req, resp := client.CreateSecurityGroupRequest(params)
@@ -4147,19 +4184,18 @@ const opCreateSnapshot = "CreateSnapshot"
// CreateSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the CreateSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSnapshot method directly
-// instead.
+// See CreateSnapshot for more information on using the CreateSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSnapshotRequest method.
// req, resp := client.CreateSnapshotRequest(params)
@@ -4249,19 +4285,18 @@ const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription"
// CreateSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the CreateSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSpotDatafeedSubscription method directly
-// instead.
+// See CreateSpotDatafeedSubscription for more information on using the CreateSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSpotDatafeedSubscriptionRequest method.
// req, resp := client.CreateSpotDatafeedSubscriptionRequest(params)
@@ -4327,19 +4362,18 @@ const opCreateSubnet = "CreateSubnet"
// CreateSubnetRequest generates a "aws/request.Request" representing the
// client's request for the CreateSubnet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSubnet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSubnet method directly
-// instead.
+// See CreateSubnet for more information on using the CreateSubnet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSubnetRequest method.
// req, resp := client.CreateSubnetRequest(params)
@@ -4429,19 +4463,18 @@ const opCreateTags = "CreateTags"
// CreateTagsRequest generates a "aws/request.Request" representing the
// client's request for the CreateTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateTags method directly
-// instead.
+// See CreateTags for more information on using the CreateTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateTagsRequest method.
// req, resp := client.CreateTagsRequest(params)
@@ -4514,19 +4547,18 @@ const opCreateVolume = "CreateVolume"
// CreateVolumeRequest generates a "aws/request.Request" representing the
// client's request for the CreateVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVolume method directly
-// instead.
+// See CreateVolume for more information on using the CreateVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVolumeRequest method.
// req, resp := client.CreateVolumeRequest(params)
@@ -4607,19 +4639,18 @@ const opCreateVpc = "CreateVpc"
// CreateVpcRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpc method directly
-// instead.
+// See CreateVpc for more information on using the CreateVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcRequest method.
// req, resp := client.CreateVpcRequest(params)
@@ -4700,19 +4731,18 @@ const opCreateVpcEndpoint = "CreateVpcEndpoint"
// CreateVpcEndpointRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpcEndpoint operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpcEndpoint for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpcEndpoint method directly
-// instead.
+// See CreateVpcEndpoint for more information on using the CreateVpcEndpoint
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcEndpointRequest method.
// req, resp := client.CreateVpcEndpointRequest(params)
@@ -4781,19 +4811,18 @@ const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection"
// CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpcPeeringConnection method directly
-// instead.
+// See CreateVpcPeeringConnection for more information on using the CreateVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcPeeringConnectionRequest method.
// req, resp := client.CreateVpcPeeringConnectionRequest(params)
@@ -4866,19 +4895,18 @@ const opCreateVpnConnection = "CreateVpnConnection"
// CreateVpnConnectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnConnection method directly
-// instead.
+// See CreateVpnConnection for more information on using the CreateVpnConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnConnectionRequest method.
// req, resp := client.CreateVpnConnectionRequest(params)
@@ -4960,19 +4988,18 @@ const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute"
// CreateVpnConnectionRouteRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnConnectionRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnConnectionRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnConnectionRoute method directly
-// instead.
+// See CreateVpnConnectionRoute for more information on using the CreateVpnConnectionRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnConnectionRouteRequest method.
// req, resp := client.CreateVpnConnectionRouteRequest(params)
@@ -5044,19 +5071,18 @@ const opCreateVpnGateway = "CreateVpnGateway"
// CreateVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnGateway method directly
-// instead.
+// See CreateVpnGateway for more information on using the CreateVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnGatewayRequest method.
// req, resp := client.CreateVpnGatewayRequest(params)
@@ -5125,19 +5151,18 @@ const opDeleteCustomerGateway = "DeleteCustomerGateway"
// DeleteCustomerGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteCustomerGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteCustomerGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteCustomerGateway method directly
-// instead.
+// See DeleteCustomerGateway for more information on using the DeleteCustomerGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteCustomerGatewayRequest method.
// req, resp := client.DeleteCustomerGatewayRequest(params)
@@ -5203,19 +5228,18 @@ const opDeleteDhcpOptions = "DeleteDhcpOptions"
// DeleteDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteDhcpOptions method directly
-// instead.
+// See DeleteDhcpOptions for more information on using the DeleteDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteDhcpOptionsRequest method.
// req, resp := client.DeleteDhcpOptionsRequest(params)
@@ -5283,19 +5307,18 @@ const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway"
// DeleteEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteEgressOnlyInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteEgressOnlyInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteEgressOnlyInternetGateway method directly
-// instead.
+// See DeleteEgressOnlyInternetGateway for more information on using the DeleteEgressOnlyInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteEgressOnlyInternetGatewayRequest method.
// req, resp := client.DeleteEgressOnlyInternetGatewayRequest(params)
@@ -5358,19 +5381,18 @@ const opDeleteFlowLogs = "DeleteFlowLogs"
// DeleteFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteFlowLogs method directly
-// instead.
+// See DeleteFlowLogs for more information on using the DeleteFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteFlowLogsRequest method.
// req, resp := client.DeleteFlowLogsRequest(params)
@@ -5433,19 +5455,18 @@ const opDeleteInternetGateway = "DeleteInternetGateway"
// DeleteInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteInternetGateway method directly
-// instead.
+// See DeleteInternetGateway for more information on using the DeleteInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteInternetGatewayRequest method.
// req, resp := client.DeleteInternetGatewayRequest(params)
@@ -5511,19 +5532,18 @@ const opDeleteKeyPair = "DeleteKeyPair"
// DeleteKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the DeleteKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteKeyPair method directly
-// instead.
+// See DeleteKeyPair for more information on using the DeleteKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteKeyPairRequest method.
// req, resp := client.DeleteKeyPairRequest(params)
@@ -5588,19 +5608,18 @@ const opDeleteNatGateway = "DeleteNatGateway"
// DeleteNatGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNatGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNatGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNatGateway method directly
-// instead.
+// See DeleteNatGateway for more information on using the DeleteNatGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNatGatewayRequest method.
// req, resp := client.DeleteNatGatewayRequest(params)
@@ -5665,19 +5684,18 @@ const opDeleteNetworkAcl = "DeleteNetworkAcl"
// DeleteNetworkAclRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkAcl method directly
-// instead.
+// See DeleteNetworkAcl for more information on using the DeleteNetworkAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkAclRequest method.
// req, resp := client.DeleteNetworkAclRequest(params)
@@ -5743,19 +5761,18 @@ const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry"
// DeleteNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkAclEntry method directly
-// instead.
+// See DeleteNetworkAclEntry for more information on using the DeleteNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkAclEntryRequest method.
// req, resp := client.DeleteNetworkAclEntryRequest(params)
@@ -5821,19 +5838,18 @@ const opDeleteNetworkInterface = "DeleteNetworkInterface"
// DeleteNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkInterface method directly
-// instead.
+// See DeleteNetworkInterface for more information on using the DeleteNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkInterfaceRequest method.
// req, resp := client.DeleteNetworkInterfaceRequest(params)
@@ -5899,19 +5915,18 @@ const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission"
// DeleteNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkInterfacePermission operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkInterfacePermission for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkInterfacePermission method directly
-// instead.
+// See DeleteNetworkInterfacePermission for more information on using the DeleteNetworkInterfacePermission
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkInterfacePermissionRequest method.
// req, resp := client.DeleteNetworkInterfacePermissionRequest(params)
@@ -5977,19 +5992,18 @@ const opDeletePlacementGroup = "DeletePlacementGroup"
// DeletePlacementGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeletePlacementGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeletePlacementGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeletePlacementGroup method directly
-// instead.
+// See DeletePlacementGroup for more information on using the DeletePlacementGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeletePlacementGroupRequest method.
// req, resp := client.DeletePlacementGroupRequest(params)
@@ -6057,19 +6071,18 @@ const opDeleteRoute = "DeleteRoute"
// DeleteRouteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRoute method directly
-// instead.
+// See DeleteRoute for more information on using the DeleteRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRouteRequest method.
// req, resp := client.DeleteRouteRequest(params)
@@ -6134,19 +6147,18 @@ const opDeleteRouteTable = "DeleteRouteTable"
// DeleteRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRouteTable method directly
-// instead.
+// See DeleteRouteTable for more information on using the DeleteRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRouteTableRequest method.
// req, resp := client.DeleteRouteTableRequest(params)
@@ -6213,19 +6225,18 @@ const opDeleteSecurityGroup = "DeleteSecurityGroup"
// DeleteSecurityGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSecurityGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSecurityGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSecurityGroup method directly
-// instead.
+// See DeleteSecurityGroup for more information on using the DeleteSecurityGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSecurityGroupRequest method.
// req, resp := client.DeleteSecurityGroupRequest(params)
@@ -6294,19 +6305,18 @@ const opDeleteSnapshot = "DeleteSnapshot"
// DeleteSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSnapshot method directly
-// instead.
+// See DeleteSnapshot for more information on using the DeleteSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSnapshotRequest method.
// req, resp := client.DeleteSnapshotRequest(params)
@@ -6385,19 +6395,18 @@ const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription"
// DeleteSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSpotDatafeedSubscription method directly
-// instead.
+// See DeleteSpotDatafeedSubscription for more information on using the DeleteSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSpotDatafeedSubscriptionRequest method.
// req, resp := client.DeleteSpotDatafeedSubscriptionRequest(params)
@@ -6462,19 +6471,18 @@ const opDeleteSubnet = "DeleteSubnet"
// DeleteSubnetRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSubnet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSubnet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSubnet method directly
-// instead.
+// See DeleteSubnet for more information on using the DeleteSubnet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSubnetRequest method.
// req, resp := client.DeleteSubnetRequest(params)
@@ -6540,19 +6548,18 @@ const opDeleteTags = "DeleteTags"
// DeleteTagsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteTags method directly
-// instead.
+// See DeleteTags for more information on using the DeleteTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteTagsRequest method.
// req, resp := client.DeleteTagsRequest(params)
@@ -6621,19 +6628,18 @@ const opDeleteVolume = "DeleteVolume"
// DeleteVolumeRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVolume method directly
-// instead.
+// See DeleteVolume for more information on using the DeleteVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVolumeRequest method.
// req, resp := client.DeleteVolumeRequest(params)
@@ -6704,19 +6710,18 @@ const opDeleteVpc = "DeleteVpc"
// DeleteVpcRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpc method directly
-// instead.
+// See DeleteVpc for more information on using the DeleteVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcRequest method.
// req, resp := client.DeleteVpcRequest(params)
@@ -6785,19 +6790,18 @@ const opDeleteVpcEndpoints = "DeleteVpcEndpoints"
// DeleteVpcEndpointsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpcEndpoints operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpcEndpoints for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpcEndpoints method directly
-// instead.
+// See DeleteVpcEndpoints for more information on using the DeleteVpcEndpoints
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcEndpointsRequest method.
// req, resp := client.DeleteVpcEndpointsRequest(params)
@@ -6861,19 +6865,18 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection"
// DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpcPeeringConnection method directly
-// instead.
+// See DeleteVpcPeeringConnection for more information on using the DeleteVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcPeeringConnectionRequest method.
// req, resp := client.DeleteVpcPeeringConnectionRequest(params)
@@ -6939,19 +6942,18 @@ const opDeleteVpnConnection = "DeleteVpnConnection"
// DeleteVpnConnectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnConnection method directly
-// instead.
+// See DeleteVpnConnection for more information on using the DeleteVpnConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnConnectionRequest method.
// req, resp := client.DeleteVpnConnectionRequest(params)
@@ -7025,19 +7027,18 @@ const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute"
// DeleteVpnConnectionRouteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnConnectionRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnConnectionRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnConnectionRoute method directly
-// instead.
+// See DeleteVpnConnectionRoute for more information on using the DeleteVpnConnectionRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnConnectionRouteRequest method.
// req, resp := client.DeleteVpnConnectionRouteRequest(params)
@@ -7105,19 +7106,18 @@ const opDeleteVpnGateway = "DeleteVpnGateway"
// DeleteVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnGateway method directly
-// instead.
+// See DeleteVpnGateway for more information on using the DeleteVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnGatewayRequest method.
// req, resp := client.DeleteVpnGatewayRequest(params)
@@ -7186,19 +7186,18 @@ const opDeregisterImage = "DeregisterImage"
// DeregisterImageRequest generates a "aws/request.Request" representing the
// client's request for the DeregisterImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeregisterImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeregisterImage method directly
-// instead.
+// See DeregisterImage for more information on using the DeregisterImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeregisterImageRequest method.
// req, resp := client.DeregisterImageRequest(params)
@@ -7266,19 +7265,18 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes"
// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAccountAttributes operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAccountAttributes for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAccountAttributes method directly
-// instead.
+// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAccountAttributesRequest method.
// req, resp := client.DescribeAccountAttributesRequest(params)
@@ -7359,19 +7357,18 @@ const opDescribeAddresses = "DescribeAddresses"
// DescribeAddressesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAddresses method directly
-// instead.
+// See DescribeAddresses for more information on using the DescribeAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAddressesRequest method.
// req, resp := client.DescribeAddressesRequest(params)
@@ -7438,19 +7435,18 @@ const opDescribeAvailabilityZones = "DescribeAvailabilityZones"
// DescribeAvailabilityZonesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAvailabilityZones operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAvailabilityZones for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAvailabilityZones method directly
-// instead.
+// See DescribeAvailabilityZones for more information on using the DescribeAvailabilityZones
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAvailabilityZonesRequest method.
// req, resp := client.DescribeAvailabilityZonesRequest(params)
@@ -7519,19 +7515,18 @@ const opDescribeBundleTasks = "DescribeBundleTasks"
// DescribeBundleTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeBundleTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeBundleTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeBundleTasks method directly
-// instead.
+// See DescribeBundleTasks for more information on using the DescribeBundleTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeBundleTasksRequest method.
// req, resp := client.DescribeBundleTasksRequest(params)
@@ -7599,19 +7594,18 @@ const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances"
// DescribeClassicLinkInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeClassicLinkInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeClassicLinkInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeClassicLinkInstances method directly
-// instead.
+// See DescribeClassicLinkInstances for more information on using the DescribeClassicLinkInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeClassicLinkInstancesRequest method.
// req, resp := client.DescribeClassicLinkInstancesRequest(params)
@@ -7677,19 +7671,18 @@ const opDescribeConversionTasks = "DescribeConversionTasks"
// DescribeConversionTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeConversionTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeConversionTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeConversionTasks method directly
-// instead.
+// See DescribeConversionTasks for more information on using the DescribeConversionTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeConversionTasksRequest method.
// req, resp := client.DescribeConversionTasksRequest(params)
@@ -7756,19 +7749,18 @@ const opDescribeCustomerGateways = "DescribeCustomerGateways"
// DescribeCustomerGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeCustomerGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeCustomerGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeCustomerGateways method directly
-// instead.
+// See DescribeCustomerGateways for more information on using the DescribeCustomerGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeCustomerGatewaysRequest method.
// req, resp := client.DescribeCustomerGatewaysRequest(params)
@@ -7835,19 +7827,18 @@ const opDescribeDhcpOptions = "DescribeDhcpOptions"
// DescribeDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeDhcpOptions method directly
-// instead.
+// See DescribeDhcpOptions for more information on using the DescribeDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeDhcpOptionsRequest method.
// req, resp := client.DescribeDhcpOptionsRequest(params)
@@ -7913,19 +7904,18 @@ const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways
// DescribeEgressOnlyInternetGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeEgressOnlyInternetGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeEgressOnlyInternetGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeEgressOnlyInternetGateways method directly
-// instead.
+// See DescribeEgressOnlyInternetGateways for more information on using the DescribeEgressOnlyInternetGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeEgressOnlyInternetGatewaysRequest method.
// req, resp := client.DescribeEgressOnlyInternetGatewaysRequest(params)
@@ -7984,23 +7974,97 @@ func (c *EC2) DescribeEgressOnlyInternetGatewaysWithContext(ctx aws.Context, inp
return out, req.Send()
}
+const opDescribeElasticGpus = "DescribeElasticGpus"
+
+// DescribeElasticGpusRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeElasticGpus operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeElasticGpus for more information on using the DescribeElasticGpus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeElasticGpusRequest method.
+// req, resp := client.DescribeElasticGpusRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus
+func (c *EC2) DescribeElasticGpusRequest(input *DescribeElasticGpusInput) (req *request.Request, output *DescribeElasticGpusOutput) {
+ op := &request.Operation{
+ Name: opDescribeElasticGpus,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeElasticGpusInput{}
+ }
+
+ output = &DescribeElasticGpusOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeElasticGpus API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the Elastic GPUs associated with your instances. For more information
+// about Elastic GPUs, see Amazon EC2 Elastic GPUs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-gpus.html).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeElasticGpus for usage and error information.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus
+func (c *EC2) DescribeElasticGpus(input *DescribeElasticGpusInput) (*DescribeElasticGpusOutput, error) {
+ req, out := c.DescribeElasticGpusRequest(input)
+ return out, req.Send()
+}
+
+// DescribeElasticGpusWithContext is the same as DescribeElasticGpus with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeElasticGpus for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeElasticGpusWithContext(ctx aws.Context, input *DescribeElasticGpusInput, opts ...request.Option) (*DescribeElasticGpusOutput, error) {
+ req, out := c.DescribeElasticGpusRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDescribeExportTasks = "DescribeExportTasks"
// DescribeExportTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeExportTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeExportTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeExportTasks method directly
-// instead.
+// See DescribeExportTasks for more information on using the DescribeExportTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeExportTasksRequest method.
// req, resp := client.DescribeExportTasksRequest(params)
@@ -8063,19 +8127,18 @@ const opDescribeFlowLogs = "DescribeFlowLogs"
// DescribeFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeFlowLogs method directly
-// instead.
+// See DescribeFlowLogs for more information on using the DescribeFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeFlowLogsRequest method.
// req, resp := client.DescribeFlowLogsRequest(params)
@@ -8140,19 +8203,18 @@ const opDescribeFpgaImages = "DescribeFpgaImages"
// DescribeFpgaImagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeFpgaImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeFpgaImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeFpgaImages method directly
-// instead.
+// See DescribeFpgaImages for more information on using the DescribeFpgaImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeFpgaImagesRequest method.
// req, resp := client.DescribeFpgaImagesRequest(params)
@@ -8217,19 +8279,18 @@ const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings"
// DescribeHostReservationOfferingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHostReservationOfferings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHostReservationOfferings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHostReservationOfferings method directly
-// instead.
+// See DescribeHostReservationOfferings for more information on using the DescribeHostReservationOfferings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostReservationOfferingsRequest method.
// req, resp := client.DescribeHostReservationOfferingsRequest(params)
@@ -8300,19 +8361,18 @@ const opDescribeHostReservations = "DescribeHostReservations"
// DescribeHostReservationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHostReservations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHostReservations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHostReservations method directly
-// instead.
+// See DescribeHostReservations for more information on using the DescribeHostReservations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostReservationsRequest method.
// req, resp := client.DescribeHostReservationsRequest(params)
@@ -8376,19 +8436,18 @@ const opDescribeHosts = "DescribeHosts"
// DescribeHostsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHosts method directly
-// instead.
+// See DescribeHosts for more information on using the DescribeHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostsRequest method.
// req, resp := client.DescribeHostsRequest(params)
@@ -8455,19 +8514,18 @@ const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAsso
// DescribeIamInstanceProfileAssociationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIamInstanceProfileAssociations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIamInstanceProfileAssociations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIamInstanceProfileAssociations method directly
-// instead.
+// See DescribeIamInstanceProfileAssociations for more information on using the DescribeIamInstanceProfileAssociations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIamInstanceProfileAssociationsRequest method.
// req, resp := client.DescribeIamInstanceProfileAssociationsRequest(params)
@@ -8530,19 +8588,18 @@ const opDescribeIdFormat = "DescribeIdFormat"
// DescribeIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIdFormat method directly
-// instead.
+// See DescribeIdFormat for more information on using the DescribeIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIdFormatRequest method.
// req, resp := client.DescribeIdFormatRequest(params)
@@ -8618,19 +8675,18 @@ const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat"
// DescribeIdentityIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIdentityIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIdentityIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIdentityIdFormat method directly
-// instead.
+// See DescribeIdentityIdFormat for more information on using the DescribeIdentityIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIdentityIdFormatRequest method.
// req, resp := client.DescribeIdentityIdFormatRequest(params)
@@ -8704,19 +8760,18 @@ const opDescribeImageAttribute = "DescribeImageAttribute"
// DescribeImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImageAttribute method directly
-// instead.
+// See DescribeImageAttribute for more information on using the DescribeImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImageAttributeRequest method.
// req, resp := client.DescribeImageAttributeRequest(params)
@@ -8780,19 +8835,18 @@ const opDescribeImages = "DescribeImages"
// DescribeImagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImages method directly
-// instead.
+// See DescribeImages for more information on using the DescribeImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImagesRequest method.
// req, resp := client.DescribeImagesRequest(params)
@@ -8861,19 +8915,18 @@ const opDescribeImportImageTasks = "DescribeImportImageTasks"
// DescribeImportImageTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImportImageTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImportImageTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImportImageTasks method directly
-// instead.
+// See DescribeImportImageTasks for more information on using the DescribeImportImageTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImportImageTasksRequest method.
// req, resp := client.DescribeImportImageTasksRequest(params)
@@ -8937,19 +8990,18 @@ const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks"
// DescribeImportSnapshotTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImportSnapshotTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImportSnapshotTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImportSnapshotTasks method directly
-// instead.
+// See DescribeImportSnapshotTasks for more information on using the DescribeImportSnapshotTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImportSnapshotTasksRequest method.
// req, resp := client.DescribeImportSnapshotTasksRequest(params)
@@ -9012,19 +9064,18 @@ const opDescribeInstanceAttribute = "DescribeInstanceAttribute"
// DescribeInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstanceAttribute method directly
-// instead.
+// See DescribeInstanceAttribute for more information on using the DescribeInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstanceAttributeRequest method.
// req, resp := client.DescribeInstanceAttributeRequest(params)
@@ -9091,19 +9142,18 @@ const opDescribeInstanceStatus = "DescribeInstanceStatus"
// DescribeInstanceStatusRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstanceStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstanceStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstanceStatus method directly
-// instead.
+// See DescribeInstanceStatus for more information on using the DescribeInstanceStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstanceStatusRequest method.
// req, resp := client.DescribeInstanceStatusRequest(params)
@@ -9243,19 +9293,18 @@ const opDescribeInstances = "DescribeInstances"
// DescribeInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstances method directly
-// instead.
+// See DescribeInstances for more information on using the DescribeInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstancesRequest method.
// req, resp := client.DescribeInstancesRequest(params)
@@ -9389,19 +9438,18 @@ const opDescribeInternetGateways = "DescribeInternetGateways"
// DescribeInternetGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInternetGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInternetGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInternetGateways method directly
-// instead.
+// See DescribeInternetGateways for more information on using the DescribeInternetGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInternetGatewaysRequest method.
// req, resp := client.DescribeInternetGatewaysRequest(params)
@@ -9464,19 +9512,18 @@ const opDescribeKeyPairs = "DescribeKeyPairs"
// DescribeKeyPairsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeKeyPairs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeKeyPairs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeKeyPairs method directly
-// instead.
+// See DescribeKeyPairs for more information on using the DescribeKeyPairs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeKeyPairsRequest method.
// req, resp := client.DescribeKeyPairsRequest(params)
@@ -9542,19 +9589,18 @@ const opDescribeMovingAddresses = "DescribeMovingAddresses"
// DescribeMovingAddressesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeMovingAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeMovingAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeMovingAddresses method directly
-// instead.
+// See DescribeMovingAddresses for more information on using the DescribeMovingAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeMovingAddressesRequest method.
// req, resp := client.DescribeMovingAddressesRequest(params)
@@ -9619,19 +9665,18 @@ const opDescribeNatGateways = "DescribeNatGateways"
// DescribeNatGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNatGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNatGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNatGateways method directly
-// instead.
+// See DescribeNatGateways for more information on using the DescribeNatGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNatGatewaysRequest method.
// req, resp := client.DescribeNatGatewaysRequest(params)
@@ -9750,19 +9795,18 @@ const opDescribeNetworkAcls = "DescribeNetworkAcls"
// DescribeNetworkAclsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkAcls operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkAcls for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkAcls method directly
-// instead.
+// See DescribeNetworkAcls for more information on using the DescribeNetworkAcls
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkAclsRequest method.
// req, resp := client.DescribeNetworkAclsRequest(params)
@@ -9828,19 +9872,18 @@ const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute"
// DescribeNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkInterfaceAttribute method directly
-// instead.
+// See DescribeNetworkInterfaceAttribute for more information on using the DescribeNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkInterfaceAttributeRequest method.
// req, resp := client.DescribeNetworkInterfaceAttributeRequest(params)
@@ -9904,19 +9947,18 @@ const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissio
// DescribeNetworkInterfacePermissionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkInterfacePermissions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkInterfacePermissions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkInterfacePermissions method directly
-// instead.
+// See DescribeNetworkInterfacePermissions for more information on using the DescribeNetworkInterfacePermissions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkInterfacePermissionsRequest method.
// req, resp := client.DescribeNetworkInterfacePermissionsRequest(params)
@@ -9979,19 +10021,18 @@ const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces"
// DescribeNetworkInterfacesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkInterfaces operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkInterfaces for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkInterfaces method directly
-// instead.
+// See DescribeNetworkInterfaces for more information on using the DescribeNetworkInterfaces
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkInterfacesRequest method.
// req, resp := client.DescribeNetworkInterfacesRequest(params)
@@ -10054,19 +10095,18 @@ const opDescribePlacementGroups = "DescribePlacementGroups"
// DescribePlacementGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribePlacementGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribePlacementGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribePlacementGroups method directly
-// instead.
+// See DescribePlacementGroups for more information on using the DescribePlacementGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribePlacementGroupsRequest method.
// req, resp := client.DescribePlacementGroupsRequest(params)
@@ -10131,19 +10171,18 @@ const opDescribePrefixLists = "DescribePrefixLists"
// DescribePrefixListsRequest generates a "aws/request.Request" representing the
// client's request for the DescribePrefixLists operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribePrefixLists for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribePrefixLists method directly
-// instead.
+// See DescribePrefixLists for more information on using the DescribePrefixLists
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribePrefixListsRequest method.
// req, resp := client.DescribePrefixListsRequest(params)
@@ -10210,19 +10249,18 @@ const opDescribeRegions = "DescribeRegions"
// DescribeRegionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRegions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeRegions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeRegions method directly
-// instead.
+// See DescribeRegions for more information on using the DescribeRegions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeRegionsRequest method.
// req, resp := client.DescribeRegionsRequest(params)
@@ -10288,19 +10326,18 @@ const opDescribeReservedInstances = "DescribeReservedInstances"
// DescribeReservedInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstances method directly
-// instead.
+// See DescribeReservedInstances for more information on using the DescribeReservedInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesRequest method.
// req, resp := client.DescribeReservedInstancesRequest(params)
@@ -10366,19 +10403,18 @@ const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings"
// DescribeReservedInstancesListingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesListings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesListings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesListings method directly
-// instead.
+// See DescribeReservedInstancesListings for more information on using the DescribeReservedInstancesListings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesListingsRequest method.
// req, resp := client.DescribeReservedInstancesListingsRequest(params)
@@ -10462,19 +10498,18 @@ const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModif
// DescribeReservedInstancesModificationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesModifications operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesModifications for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesModifications method directly
-// instead.
+// See DescribeReservedInstancesModifications for more information on using the DescribeReservedInstancesModifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesModificationsRequest method.
// req, resp := client.DescribeReservedInstancesModificationsRequest(params)
@@ -10599,19 +10634,18 @@ const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings
// DescribeReservedInstancesOfferingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesOfferings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesOfferings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesOfferings method directly
-// instead.
+// See DescribeReservedInstancesOfferings for more information on using the DescribeReservedInstancesOfferings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesOfferingsRequest method.
// req, resp := client.DescribeReservedInstancesOfferingsRequest(params)
@@ -10741,19 +10775,18 @@ const opDescribeRouteTables = "DescribeRouteTables"
// DescribeRouteTablesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRouteTables operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeRouteTables for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeRouteTables method directly
-// instead.
+// See DescribeRouteTables for more information on using the DescribeRouteTables
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeRouteTablesRequest method.
// req, resp := client.DescribeRouteTablesRequest(params)
@@ -10824,19 +10857,18 @@ const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvaila
// DescribeScheduledInstanceAvailabilityRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScheduledInstanceAvailability operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeScheduledInstanceAvailability for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeScheduledInstanceAvailability method directly
-// instead.
+// See DescribeScheduledInstanceAvailability for more information on using the DescribeScheduledInstanceAvailability
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeScheduledInstanceAvailabilityRequest method.
// req, resp := client.DescribeScheduledInstanceAvailabilityRequest(params)
@@ -10907,19 +10939,18 @@ const opDescribeScheduledInstances = "DescribeScheduledInstances"
// DescribeScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeScheduledInstances method directly
-// instead.
+// See DescribeScheduledInstances for more information on using the DescribeScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeScheduledInstancesRequest method.
// req, resp := client.DescribeScheduledInstancesRequest(params)
@@ -10982,19 +11013,18 @@ const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences"
// DescribeSecurityGroupReferencesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSecurityGroupReferences operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSecurityGroupReferences for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSecurityGroupReferences method directly
-// instead.
+// See DescribeSecurityGroupReferences for more information on using the DescribeSecurityGroupReferences
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSecurityGroupReferencesRequest method.
// req, resp := client.DescribeSecurityGroupReferencesRequest(params)
@@ -11058,19 +11088,18 @@ const opDescribeSecurityGroups = "DescribeSecurityGroups"
// DescribeSecurityGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSecurityGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSecurityGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSecurityGroups method directly
-// instead.
+// See DescribeSecurityGroups for more information on using the DescribeSecurityGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSecurityGroupsRequest method.
// req, resp := client.DescribeSecurityGroupsRequest(params)
@@ -11140,19 +11169,18 @@ const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute"
// DescribeSnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSnapshotAttribute method directly
-// instead.
+// See DescribeSnapshotAttribute for more information on using the DescribeSnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSnapshotAttributeRequest method.
// req, resp := client.DescribeSnapshotAttributeRequest(params)
@@ -11219,19 +11247,18 @@ const opDescribeSnapshots = "DescribeSnapshots"
// DescribeSnapshotsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSnapshots operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSnapshots for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSnapshots method directly
-// instead.
+// See DescribeSnapshots for more information on using the DescribeSnapshots
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSnapshotsRequest method.
// req, resp := client.DescribeSnapshotsRequest(params)
@@ -11395,19 +11422,18 @@ const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription"
// DescribeSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotDatafeedSubscription method directly
-// instead.
+// See DescribeSpotDatafeedSubscription for more information on using the DescribeSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotDatafeedSubscriptionRequest method.
// req, resp := client.DescribeSpotDatafeedSubscriptionRequest(params)
@@ -11472,19 +11498,18 @@ const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances"
// DescribeSpotFleetInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetInstances method directly
-// instead.
+// See DescribeSpotFleetInstances for more information on using the DescribeSpotFleetInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetInstancesRequest method.
// req, resp := client.DescribeSpotFleetInstancesRequest(params)
@@ -11547,19 +11572,18 @@ const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory"
// DescribeSpotFleetRequestHistoryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetRequestHistory operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetRequestHistory for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetRequestHistory method directly
-// instead.
+// See DescribeSpotFleetRequestHistory for more information on using the DescribeSpotFleetRequestHistory
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetRequestHistoryRequest method.
// req, resp := client.DescribeSpotFleetRequestHistoryRequest(params)
@@ -11627,19 +11651,18 @@ const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests"
// DescribeSpotFleetRequestsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetRequests method directly
-// instead.
+// See DescribeSpotFleetRequests for more information on using the DescribeSpotFleetRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetRequestsRequest method.
// req, resp := client.DescribeSpotFleetRequestsRequest(params)
@@ -11761,19 +11784,18 @@ const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests"
// DescribeSpotInstanceRequestsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotInstanceRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotInstanceRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotInstanceRequests method directly
-// instead.
+// See DescribeSpotInstanceRequests for more information on using the DescribeSpotInstanceRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotInstanceRequestsRequest method.
// req, resp := client.DescribeSpotInstanceRequestsRequest(params)
@@ -11850,19 +11872,18 @@ const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory"
// DescribeSpotPriceHistoryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotPriceHistory operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotPriceHistory for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotPriceHistory method directly
-// instead.
+// See DescribeSpotPriceHistory for more information on using the DescribeSpotPriceHistory
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotPriceHistoryRequest method.
// req, resp := client.DescribeSpotPriceHistoryRequest(params)
@@ -11988,19 +12009,18 @@ const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups"
// DescribeStaleSecurityGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeStaleSecurityGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeStaleSecurityGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeStaleSecurityGroups method directly
-// instead.
+// See DescribeStaleSecurityGroups for more information on using the DescribeStaleSecurityGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeStaleSecurityGroupsRequest method.
// req, resp := client.DescribeStaleSecurityGroupsRequest(params)
@@ -12066,19 +12086,18 @@ const opDescribeSubnets = "DescribeSubnets"
// DescribeSubnetsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSubnets operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSubnets for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSubnets method directly
-// instead.
+// See DescribeSubnets for more information on using the DescribeSubnets
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSubnetsRequest method.
// req, resp := client.DescribeSubnetsRequest(params)
@@ -12144,19 +12163,18 @@ const opDescribeTags = "DescribeTags"
// DescribeTagsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeTags method directly
-// instead.
+// See DescribeTags for more information on using the DescribeTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeTagsRequest method.
// req, resp := client.DescribeTagsRequest(params)
@@ -12278,19 +12296,18 @@ const opDescribeVolumeAttribute = "DescribeVolumeAttribute"
// DescribeVolumeAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumeAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumeAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumeAttribute method directly
-// instead.
+// See DescribeVolumeAttribute for more information on using the DescribeVolumeAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumeAttributeRequest method.
// req, resp := client.DescribeVolumeAttributeRequest(params)
@@ -12357,19 +12374,18 @@ const opDescribeVolumeStatus = "DescribeVolumeStatus"
// DescribeVolumeStatusRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumeStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumeStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumeStatus method directly
-// instead.
+// See DescribeVolumeStatus for more information on using the DescribeVolumeStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumeStatusRequest method.
// req, resp := client.DescribeVolumeStatusRequest(params)
@@ -12522,19 +12538,18 @@ const opDescribeVolumes = "DescribeVolumes"
// DescribeVolumesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumes operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumes for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumes method directly
-// instead.
+// See DescribeVolumes for more information on using the DescribeVolumes
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumesRequest method.
// req, resp := client.DescribeVolumesRequest(params)
@@ -12663,19 +12678,18 @@ const opDescribeVolumesModifications = "DescribeVolumesModifications"
// DescribeVolumesModificationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumesModifications operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumesModifications for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumesModifications method directly
-// instead.
+// See DescribeVolumesModifications for more information on using the DescribeVolumesModifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumesModificationsRequest method.
// req, resp := client.DescribeVolumesModificationsRequest(params)
@@ -12750,19 +12764,18 @@ const opDescribeVpcAttribute = "DescribeVpcAttribute"
// DescribeVpcAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcAttribute method directly
-// instead.
+// See DescribeVpcAttribute for more information on using the DescribeVpcAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcAttributeRequest method.
// req, resp := client.DescribeVpcAttributeRequest(params)
@@ -12826,19 +12839,18 @@ const opDescribeVpcClassicLink = "DescribeVpcClassicLink"
// DescribeVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcClassicLink method directly
-// instead.
+// See DescribeVpcClassicLink for more information on using the DescribeVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcClassicLinkRequest method.
// req, resp := client.DescribeVpcClassicLinkRequest(params)
@@ -12901,19 +12913,18 @@ const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport"
// DescribeVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcClassicLinkDnsSupport method directly
-// instead.
+// See DescribeVpcClassicLinkDnsSupport for more information on using the DescribeVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcClassicLinkDnsSupportRequest method.
// req, resp := client.DescribeVpcClassicLinkDnsSupportRequest(params)
@@ -12982,19 +12993,18 @@ const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices"
// DescribeVpcEndpointServicesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcEndpointServices operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcEndpointServices for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcEndpointServices method directly
-// instead.
+// See DescribeVpcEndpointServices for more information on using the DescribeVpcEndpointServices
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcEndpointServicesRequest method.
// req, resp := client.DescribeVpcEndpointServicesRequest(params)
@@ -13058,19 +13068,18 @@ const opDescribeVpcEndpoints = "DescribeVpcEndpoints"
// DescribeVpcEndpointsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcEndpoints operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcEndpoints for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcEndpoints method directly
-// instead.
+// See DescribeVpcEndpoints for more information on using the DescribeVpcEndpoints
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcEndpointsRequest method.
// req, resp := client.DescribeVpcEndpointsRequest(params)
@@ -13133,19 +13142,18 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections"
// DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcPeeringConnections operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcPeeringConnections for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcPeeringConnections method directly
-// instead.
+// See DescribeVpcPeeringConnections for more information on using the DescribeVpcPeeringConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcPeeringConnectionsRequest method.
// req, resp := client.DescribeVpcPeeringConnectionsRequest(params)
@@ -13208,19 +13216,18 @@ const opDescribeVpcs = "DescribeVpcs"
// DescribeVpcsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcs method directly
-// instead.
+// See DescribeVpcs for more information on using the DescribeVpcs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcsRequest method.
// req, resp := client.DescribeVpcsRequest(params)
@@ -13283,19 +13290,18 @@ const opDescribeVpnConnections = "DescribeVpnConnections"
// DescribeVpnConnectionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpnConnections operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpnConnections for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpnConnections method directly
-// instead.
+// See DescribeVpnConnections for more information on using the DescribeVpnConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpnConnectionsRequest method.
// req, resp := client.DescribeVpnConnectionsRequest(params)
@@ -13362,19 +13368,18 @@ const opDescribeVpnGateways = "DescribeVpnGateways"
// DescribeVpnGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpnGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpnGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpnGateways method directly
-// instead.
+// See DescribeVpnGateways for more information on using the DescribeVpnGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpnGatewaysRequest method.
// req, resp := client.DescribeVpnGatewaysRequest(params)
@@ -13441,19 +13446,18 @@ const opDetachClassicLinkVpc = "DetachClassicLinkVpc"
// DetachClassicLinkVpcRequest generates a "aws/request.Request" representing the
// client's request for the DetachClassicLinkVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachClassicLinkVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachClassicLinkVpc method directly
-// instead.
+// See DetachClassicLinkVpc for more information on using the DetachClassicLinkVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachClassicLinkVpcRequest method.
// req, resp := client.DetachClassicLinkVpcRequest(params)
@@ -13518,19 +13522,18 @@ const opDetachInternetGateway = "DetachInternetGateway"
// DetachInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DetachInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachInternetGateway method directly
-// instead.
+// See DetachInternetGateway for more information on using the DetachInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachInternetGatewayRequest method.
// req, resp := client.DetachInternetGatewayRequest(params)
@@ -13597,19 +13600,18 @@ const opDetachNetworkInterface = "DetachNetworkInterface"
// DetachNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the DetachNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachNetworkInterface method directly
-// instead.
+// See DetachNetworkInterface for more information on using the DetachNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachNetworkInterfaceRequest method.
// req, resp := client.DetachNetworkInterfaceRequest(params)
@@ -13674,19 +13676,18 @@ const opDetachVolume = "DetachVolume"
// DetachVolumeRequest generates a "aws/request.Request" representing the
// client's request for the DetachVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachVolume method directly
-// instead.
+// See DetachVolume for more information on using the DetachVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachVolumeRequest method.
// req, resp := client.DetachVolumeRequest(params)
@@ -13762,19 +13763,18 @@ const opDetachVpnGateway = "DetachVpnGateway"
// DetachVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DetachVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachVpnGateway method directly
-// instead.
+// See DetachVpnGateway for more information on using the DetachVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachVpnGatewayRequest method.
// req, resp := client.DetachVpnGatewayRequest(params)
@@ -13846,19 +13846,18 @@ const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation"
// DisableVgwRoutePropagationRequest generates a "aws/request.Request" representing the
// client's request for the DisableVgwRoutePropagation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVgwRoutePropagation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVgwRoutePropagation method directly
-// instead.
+// See DisableVgwRoutePropagation for more information on using the DisableVgwRoutePropagation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVgwRoutePropagationRequest method.
// req, resp := client.DisableVgwRoutePropagationRequest(params)
@@ -13924,19 +13923,18 @@ const opDisableVpcClassicLink = "DisableVpcClassicLink"
// DisableVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the DisableVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVpcClassicLink method directly
-// instead.
+// See DisableVpcClassicLink for more information on using the DisableVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVpcClassicLinkRequest method.
// req, resp := client.DisableVpcClassicLinkRequest(params)
@@ -14000,19 +13998,18 @@ const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport"
// DisableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the DisableVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVpcClassicLinkDnsSupport method directly
-// instead.
+// See DisableVpcClassicLinkDnsSupport for more information on using the DisableVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVpcClassicLinkDnsSupportRequest method.
// req, resp := client.DisableVpcClassicLinkDnsSupportRequest(params)
@@ -14079,19 +14076,18 @@ const opDisassociateAddress = "DisassociateAddress"
// DisassociateAddressRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateAddress method directly
-// instead.
+// See DisassociateAddress for more information on using the DisassociateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateAddressRequest method.
// req, resp := client.DisassociateAddressRequest(params)
@@ -14164,19 +14160,18 @@ const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile"
// DisassociateIamInstanceProfileRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateIamInstanceProfile operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateIamInstanceProfile for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateIamInstanceProfile method directly
-// instead.
+// See DisassociateIamInstanceProfile for more information on using the DisassociateIamInstanceProfile
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateIamInstanceProfileRequest method.
// req, resp := client.DisassociateIamInstanceProfileRequest(params)
@@ -14241,19 +14236,18 @@ const opDisassociateRouteTable = "DisassociateRouteTable"
// DisassociateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateRouteTable method directly
-// instead.
+// See DisassociateRouteTable for more information on using the DisassociateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateRouteTableRequest method.
// req, resp := client.DisassociateRouteTableRequest(params)
@@ -14323,19 +14317,18 @@ const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock"
// DisassociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateSubnetCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateSubnetCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateSubnetCidrBlock method directly
-// instead.
+// See DisassociateSubnetCidrBlock for more information on using the DisassociateSubnetCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateSubnetCidrBlockRequest method.
// req, resp := client.DisassociateSubnetCidrBlockRequest(params)
@@ -14400,19 +14393,18 @@ const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock"
// DisassociateVpcCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateVpcCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateVpcCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateVpcCidrBlock method directly
-// instead.
+// See DisassociateVpcCidrBlock for more information on using the DisassociateVpcCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateVpcCidrBlockRequest method.
// req, resp := client.DisassociateVpcCidrBlockRequest(params)
@@ -14477,19 +14469,18 @@ const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation"
// EnableVgwRoutePropagationRequest generates a "aws/request.Request" representing the
// client's request for the EnableVgwRoutePropagation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVgwRoutePropagation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVgwRoutePropagation method directly
-// instead.
+// See EnableVgwRoutePropagation for more information on using the EnableVgwRoutePropagation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVgwRoutePropagationRequest method.
// req, resp := client.EnableVgwRoutePropagationRequest(params)
@@ -14555,19 +14546,18 @@ const opEnableVolumeIO = "EnableVolumeIO"
// EnableVolumeIORequest generates a "aws/request.Request" representing the
// client's request for the EnableVolumeIO operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVolumeIO for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVolumeIO method directly
-// instead.
+// See EnableVolumeIO for more information on using the EnableVolumeIO
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVolumeIORequest method.
// req, resp := client.EnableVolumeIORequest(params)
@@ -14633,19 +14623,18 @@ const opEnableVpcClassicLink = "EnableVpcClassicLink"
// EnableVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the EnableVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVpcClassicLink method directly
-// instead.
+// See EnableVpcClassicLink for more information on using the EnableVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVpcClassicLinkRequest method.
// req, resp := client.EnableVpcClassicLinkRequest(params)
@@ -14714,19 +14703,18 @@ const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport"
// EnableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the EnableVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVpcClassicLinkDnsSupport method directly
-// instead.
+// See EnableVpcClassicLinkDnsSupport for more information on using the EnableVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVpcClassicLinkDnsSupportRequest method.
// req, resp := client.EnableVpcClassicLinkDnsSupportRequest(params)
@@ -14795,19 +14783,18 @@ const opGetConsoleOutput = "GetConsoleOutput"
// GetConsoleOutputRequest generates a "aws/request.Request" representing the
// client's request for the GetConsoleOutput operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetConsoleOutput for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetConsoleOutput method directly
-// instead.
+// See GetConsoleOutput for more information on using the GetConsoleOutput
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetConsoleOutputRequest method.
// req, resp := client.GetConsoleOutputRequest(params)
@@ -14887,19 +14874,18 @@ const opGetConsoleScreenshot = "GetConsoleScreenshot"
// GetConsoleScreenshotRequest generates a "aws/request.Request" representing the
// client's request for the GetConsoleScreenshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetConsoleScreenshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetConsoleScreenshot method directly
-// instead.
+// See GetConsoleScreenshot for more information on using the GetConsoleScreenshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetConsoleScreenshotRequest method.
// req, resp := client.GetConsoleScreenshotRequest(params)
@@ -14964,19 +14950,18 @@ const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview"
// GetHostReservationPurchasePreviewRequest generates a "aws/request.Request" representing the
// client's request for the GetHostReservationPurchasePreview operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetHostReservationPurchasePreview for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetHostReservationPurchasePreview method directly
-// instead.
+// See GetHostReservationPurchasePreview for more information on using the GetHostReservationPurchasePreview
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetHostReservationPurchasePreviewRequest method.
// req, resp := client.GetHostReservationPurchasePreviewRequest(params)
@@ -15044,19 +15029,18 @@ const opGetPasswordData = "GetPasswordData"
// GetPasswordDataRequest generates a "aws/request.Request" representing the
// client's request for the GetPasswordData operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetPasswordData for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetPasswordData method directly
-// instead.
+// See GetPasswordData for more information on using the GetPasswordData
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetPasswordDataRequest method.
// req, resp := client.GetPasswordDataRequest(params)
@@ -15132,19 +15116,18 @@ const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote"
// GetReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the
// client's request for the GetReservedInstancesExchangeQuote operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetReservedInstancesExchangeQuote for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetReservedInstancesExchangeQuote method directly
-// instead.
+// See GetReservedInstancesExchangeQuote for more information on using the GetReservedInstancesExchangeQuote
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetReservedInstancesExchangeQuoteRequest method.
// req, resp := client.GetReservedInstancesExchangeQuoteRequest(params)
@@ -15209,19 +15192,18 @@ const opImportImage = "ImportImage"
// ImportImageRequest generates a "aws/request.Request" representing the
// client's request for the ImportImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportImage method directly
-// instead.
+// See ImportImage for more information on using the ImportImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportImageRequest method.
// req, resp := client.ImportImageRequest(params)
@@ -15287,19 +15269,18 @@ const opImportInstance = "ImportInstance"
// ImportInstanceRequest generates a "aws/request.Request" representing the
// client's request for the ImportInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportInstance method directly
-// instead.
+// See ImportInstance for more information on using the ImportInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportInstanceRequest method.
// req, resp := client.ImportInstanceRequest(params)
@@ -15368,19 +15349,18 @@ const opImportKeyPair = "ImportKeyPair"
// ImportKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the ImportKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportKeyPair method directly
-// instead.
+// See ImportKeyPair for more information on using the ImportKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportKeyPairRequest method.
// req, resp := client.ImportKeyPairRequest(params)
@@ -15450,19 +15430,18 @@ const opImportSnapshot = "ImportSnapshot"
// ImportSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the ImportSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportSnapshot method directly
-// instead.
+// See ImportSnapshot for more information on using the ImportSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportSnapshotRequest method.
// req, resp := client.ImportSnapshotRequest(params)
@@ -15525,19 +15504,18 @@ const opImportVolume = "ImportVolume"
// ImportVolumeRequest generates a "aws/request.Request" representing the
// client's request for the ImportVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportVolume method directly
-// instead.
+// See ImportVolume for more information on using the ImportVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportVolumeRequest method.
// req, resp := client.ImportVolumeRequest(params)
@@ -15604,19 +15582,18 @@ const opModifyHosts = "ModifyHosts"
// ModifyHostsRequest generates a "aws/request.Request" representing the
// client's request for the ModifyHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyHosts method directly
-// instead.
+// See ModifyHosts for more information on using the ModifyHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyHostsRequest method.
// req, resp := client.ModifyHostsRequest(params)
@@ -15685,19 +15662,18 @@ const opModifyIdFormat = "ModifyIdFormat"
// ModifyIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the ModifyIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyIdFormat method directly
-// instead.
+// See ModifyIdFormat for more information on using the ModifyIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyIdFormatRequest method.
// req, resp := client.ModifyIdFormatRequest(params)
@@ -15776,19 +15752,18 @@ const opModifyIdentityIdFormat = "ModifyIdentityIdFormat"
// ModifyIdentityIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the ModifyIdentityIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyIdentityIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyIdentityIdFormat method directly
-// instead.
+// See ModifyIdentityIdFormat for more information on using the ModifyIdentityIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyIdentityIdFormatRequest method.
// req, resp := client.ModifyIdentityIdFormatRequest(params)
@@ -15867,19 +15842,18 @@ const opModifyImageAttribute = "ModifyImageAttribute"
// ModifyImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyImageAttribute method directly
-// instead.
+// See ModifyImageAttribute for more information on using the ModifyImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyImageAttributeRequest method.
// req, resp := client.ModifyImageAttributeRequest(params)
@@ -15953,19 +15927,18 @@ const opModifyInstanceAttribute = "ModifyInstanceAttribute"
// ModifyInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyInstanceAttribute method directly
-// instead.
+// See ModifyInstanceAttribute for more information on using the ModifyInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyInstanceAttributeRequest method.
// req, resp := client.ModifyInstanceAttributeRequest(params)
@@ -16035,19 +16008,18 @@ const opModifyInstancePlacement = "ModifyInstancePlacement"
// ModifyInstancePlacementRequest generates a "aws/request.Request" representing the
// client's request for the ModifyInstancePlacement operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyInstancePlacement for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyInstancePlacement method directly
-// instead.
+// See ModifyInstancePlacement for more information on using the ModifyInstancePlacement
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyInstancePlacementRequest method.
// req, resp := client.ModifyInstancePlacementRequest(params)
@@ -16128,19 +16100,18 @@ const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute"
// ModifyNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyNetworkInterfaceAttribute method directly
-// instead.
+// See ModifyNetworkInterfaceAttribute for more information on using the ModifyNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyNetworkInterfaceAttributeRequest method.
// req, resp := client.ModifyNetworkInterfaceAttributeRequest(params)
@@ -16206,19 +16177,18 @@ const opModifyReservedInstances = "ModifyReservedInstances"
// ModifyReservedInstancesRequest generates a "aws/request.Request" representing the
// client's request for the ModifyReservedInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyReservedInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyReservedInstances method directly
-// instead.
+// See ModifyReservedInstances for more information on using the ModifyReservedInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyReservedInstancesRequest method.
// req, resp := client.ModifyReservedInstancesRequest(params)
@@ -16287,19 +16257,18 @@ const opModifySnapshotAttribute = "ModifySnapshotAttribute"
// ModifySnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifySnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySnapshotAttribute method directly
-// instead.
+// See ModifySnapshotAttribute for more information on using the ModifySnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySnapshotAttributeRequest method.
// req, resp := client.ModifySnapshotAttributeRequest(params)
@@ -16376,19 +16345,18 @@ const opModifySpotFleetRequest = "ModifySpotFleetRequest"
// ModifySpotFleetRequestRequest generates a "aws/request.Request" representing the
// client's request for the ModifySpotFleetRequest operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySpotFleetRequest for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySpotFleetRequest method directly
-// instead.
+// See ModifySpotFleetRequest for more information on using the ModifySpotFleetRequest
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySpotFleetRequestRequest method.
// req, resp := client.ModifySpotFleetRequestRequest(params)
@@ -16470,19 +16438,18 @@ const opModifySubnetAttribute = "ModifySubnetAttribute"
// ModifySubnetAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifySubnetAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySubnetAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySubnetAttribute method directly
-// instead.
+// See ModifySubnetAttribute for more information on using the ModifySubnetAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySubnetAttributeRequest method.
// req, resp := client.ModifySubnetAttributeRequest(params)
@@ -16547,19 +16514,18 @@ const opModifyVolume = "ModifyVolume"
// ModifyVolumeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVolume method directly
-// instead.
+// See ModifyVolume for more information on using the ModifyVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVolumeRequest method.
// req, resp := client.ModifyVolumeRequest(params)
@@ -16654,19 +16620,18 @@ const opModifyVolumeAttribute = "ModifyVolumeAttribute"
// ModifyVolumeAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVolumeAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVolumeAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVolumeAttribute method directly
-// instead.
+// See ModifyVolumeAttribute for more information on using the ModifyVolumeAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVolumeAttributeRequest method.
// req, resp := client.ModifyVolumeAttributeRequest(params)
@@ -16740,19 +16705,18 @@ const opModifyVpcAttribute = "ModifyVpcAttribute"
// ModifyVpcAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcAttribute method directly
-// instead.
+// See ModifyVpcAttribute for more information on using the ModifyVpcAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcAttributeRequest method.
// req, resp := client.ModifyVpcAttributeRequest(params)
@@ -16817,19 +16781,18 @@ const opModifyVpcEndpoint = "ModifyVpcEndpoint"
// ModifyVpcEndpointRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcEndpoint operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcEndpoint for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcEndpoint method directly
-// instead.
+// See ModifyVpcEndpoint for more information on using the ModifyVpcEndpoint
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcEndpointRequest method.
// req, resp := client.ModifyVpcEndpointRequest(params)
@@ -16894,19 +16857,18 @@ const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions"
// ModifyVpcPeeringConnectionOptionsRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcPeeringConnectionOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcPeeringConnectionOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcPeeringConnectionOptions method directly
-// instead.
+// See ModifyVpcPeeringConnectionOptions for more information on using the ModifyVpcPeeringConnectionOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcPeeringConnectionOptionsRequest method.
// req, resp := client.ModifyVpcPeeringConnectionOptionsRequest(params)
@@ -16988,19 +16950,18 @@ const opMonitorInstances = "MonitorInstances"
// MonitorInstancesRequest generates a "aws/request.Request" representing the
// client's request for the MonitorInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See MonitorInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the MonitorInstances method directly
-// instead.
+// See MonitorInstances for more information on using the MonitorInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the MonitorInstancesRequest method.
// req, resp := client.MonitorInstancesRequest(params)
@@ -17068,19 +17029,18 @@ const opMoveAddressToVpc = "MoveAddressToVpc"
// MoveAddressToVpcRequest generates a "aws/request.Request" representing the
// client's request for the MoveAddressToVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See MoveAddressToVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the MoveAddressToVpc method directly
-// instead.
+// See MoveAddressToVpc for more information on using the MoveAddressToVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the MoveAddressToVpcRequest method.
// req, resp := client.MoveAddressToVpcRequest(params)
@@ -17149,19 +17109,18 @@ const opPurchaseHostReservation = "PurchaseHostReservation"
// PurchaseHostReservationRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseHostReservation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseHostReservation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseHostReservation method directly
-// instead.
+// See PurchaseHostReservation for more information on using the PurchaseHostReservation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseHostReservationRequest method.
// req, resp := client.PurchaseHostReservationRequest(params)
@@ -17227,19 +17186,18 @@ const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering"
// PurchaseReservedInstancesOfferingRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseReservedInstancesOffering operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseReservedInstancesOffering for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseReservedInstancesOffering method directly
-// instead.
+// See PurchaseReservedInstancesOffering for more information on using the PurchaseReservedInstancesOffering
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseReservedInstancesOfferingRequest method.
// req, resp := client.PurchaseReservedInstancesOfferingRequest(params)
@@ -17311,19 +17269,18 @@ const opPurchaseScheduledInstances = "PurchaseScheduledInstances"
// PurchaseScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseScheduledInstances method directly
-// instead.
+// See PurchaseScheduledInstances for more information on using the PurchaseScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseScheduledInstancesRequest method.
// req, resp := client.PurchaseScheduledInstancesRequest(params)
@@ -17395,19 +17352,18 @@ const opRebootInstances = "RebootInstances"
// RebootInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RebootInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RebootInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RebootInstances method directly
-// instead.
+// See RebootInstances for more information on using the RebootInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RebootInstancesRequest method.
// req, resp := client.RebootInstancesRequest(params)
@@ -17482,19 +17438,18 @@ const opRegisterImage = "RegisterImage"
// RegisterImageRequest generates a "aws/request.Request" representing the
// client's request for the RegisterImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RegisterImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RegisterImage method directly
-// instead.
+// See RegisterImage for more information on using the RegisterImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RegisterImageRequest method.
// req, resp := client.RegisterImageRequest(params)
@@ -17585,19 +17540,18 @@ const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection"
// RejectVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the RejectVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RejectVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RejectVpcPeeringConnection method directly
-// instead.
+// See RejectVpcPeeringConnection for more information on using the RejectVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RejectVpcPeeringConnectionRequest method.
// req, resp := client.RejectVpcPeeringConnectionRequest(params)
@@ -17664,19 +17618,18 @@ const opReleaseAddress = "ReleaseAddress"
// ReleaseAddressRequest generates a "aws/request.Request" representing the
// client's request for the ReleaseAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReleaseAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReleaseAddress method directly
-// instead.
+// See ReleaseAddress for more information on using the ReleaseAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReleaseAddressRequest method.
// req, resp := client.ReleaseAddressRequest(params)
@@ -17755,19 +17708,18 @@ const opReleaseHosts = "ReleaseHosts"
// ReleaseHostsRequest generates a "aws/request.Request" representing the
// client's request for the ReleaseHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReleaseHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReleaseHosts method directly
-// instead.
+// See ReleaseHosts for more information on using the ReleaseHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReleaseHostsRequest method.
// req, resp := client.ReleaseHostsRequest(params)
@@ -17841,19 +17793,18 @@ const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssocia
// ReplaceIamInstanceProfileAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceIamInstanceProfileAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceIamInstanceProfileAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceIamInstanceProfileAssociation method directly
-// instead.
+// See ReplaceIamInstanceProfileAssociation for more information on using the ReplaceIamInstanceProfileAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceIamInstanceProfileAssociationRequest method.
// req, resp := client.ReplaceIamInstanceProfileAssociationRequest(params)
@@ -17921,19 +17872,18 @@ const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation"
// ReplaceNetworkAclAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceNetworkAclAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceNetworkAclAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceNetworkAclAssociation method directly
-// instead.
+// See ReplaceNetworkAclAssociation for more information on using the ReplaceNetworkAclAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceNetworkAclAssociationRequest method.
// req, resp := client.ReplaceNetworkAclAssociationRequest(params)
@@ -17999,19 +17949,18 @@ const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry"
// ReplaceNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceNetworkAclEntry method directly
-// instead.
+// See ReplaceNetworkAclEntry for more information on using the ReplaceNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceNetworkAclEntryRequest method.
// req, resp := client.ReplaceNetworkAclEntryRequest(params)
@@ -18078,19 +18027,18 @@ const opReplaceRoute = "ReplaceRoute"
// ReplaceRouteRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceRoute method directly
-// instead.
+// See ReplaceRoute for more information on using the ReplaceRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceRouteRequest method.
// req, resp := client.ReplaceRouteRequest(params)
@@ -18161,19 +18109,18 @@ const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation"
// ReplaceRouteTableAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceRouteTableAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceRouteTableAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceRouteTableAssociation method directly
-// instead.
+// See ReplaceRouteTableAssociation for more information on using the ReplaceRouteTableAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceRouteTableAssociationRequest method.
// req, resp := client.ReplaceRouteTableAssociationRequest(params)
@@ -18244,19 +18191,18 @@ const opReportInstanceStatus = "ReportInstanceStatus"
// ReportInstanceStatusRequest generates a "aws/request.Request" representing the
// client's request for the ReportInstanceStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReportInstanceStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReportInstanceStatus method directly
-// instead.
+// See ReportInstanceStatus for more information on using the ReportInstanceStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReportInstanceStatusRequest method.
// req, resp := client.ReportInstanceStatusRequest(params)
@@ -18327,19 +18273,18 @@ const opRequestSpotFleet = "RequestSpotFleet"
// RequestSpotFleetRequest generates a "aws/request.Request" representing the
// client's request for the RequestSpotFleet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RequestSpotFleet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RequestSpotFleet method directly
-// instead.
+// See RequestSpotFleet for more information on using the RequestSpotFleet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RequestSpotFleetRequest method.
// req, resp := client.RequestSpotFleetRequest(params)
@@ -18418,19 +18363,18 @@ const opRequestSpotInstances = "RequestSpotInstances"
// RequestSpotInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RequestSpotInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RequestSpotInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RequestSpotInstances method directly
-// instead.
+// See RequestSpotInstances for more information on using the RequestSpotInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RequestSpotInstancesRequest method.
// req, resp := client.RequestSpotInstancesRequest(params)
@@ -18498,19 +18442,18 @@ const opResetImageAttribute = "ResetImageAttribute"
// ResetImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetImageAttribute method directly
-// instead.
+// See ResetImageAttribute for more information on using the ResetImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetImageAttributeRequest method.
// req, resp := client.ResetImageAttributeRequest(params)
@@ -18577,19 +18520,18 @@ const opResetInstanceAttribute = "ResetInstanceAttribute"
// ResetInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetInstanceAttribute method directly
-// instead.
+// See ResetInstanceAttribute for more information on using the ResetInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetInstanceAttributeRequest method.
// req, resp := client.ResetInstanceAttributeRequest(params)
@@ -18662,19 +18604,18 @@ const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute"
// ResetNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetNetworkInterfaceAttribute method directly
-// instead.
+// See ResetNetworkInterfaceAttribute for more information on using the ResetNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetNetworkInterfaceAttributeRequest method.
// req, resp := client.ResetNetworkInterfaceAttributeRequest(params)
@@ -18740,19 +18681,18 @@ const opResetSnapshotAttribute = "ResetSnapshotAttribute"
// ResetSnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetSnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetSnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetSnapshotAttribute method directly
-// instead.
+// See ResetSnapshotAttribute for more information on using the ResetSnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetSnapshotAttributeRequest method.
// req, resp := client.ResetSnapshotAttributeRequest(params)
@@ -18821,19 +18761,18 @@ const opRestoreAddressToClassic = "RestoreAddressToClassic"
// RestoreAddressToClassicRequest generates a "aws/request.Request" representing the
// client's request for the RestoreAddressToClassic operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RestoreAddressToClassic for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RestoreAddressToClassic method directly
-// instead.
+// See RestoreAddressToClassic for more information on using the RestoreAddressToClassic
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RestoreAddressToClassicRequest method.
// req, resp := client.RestoreAddressToClassicRequest(params)
@@ -18899,19 +18838,18 @@ const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress"
// RevokeSecurityGroupEgressRequest generates a "aws/request.Request" representing the
// client's request for the RevokeSecurityGroupEgress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RevokeSecurityGroupEgress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RevokeSecurityGroupEgress method directly
-// instead.
+// See RevokeSecurityGroupEgress for more information on using the RevokeSecurityGroupEgress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RevokeSecurityGroupEgressRequest method.
// req, resp := client.RevokeSecurityGroupEgressRequest(params)
@@ -18987,19 +18925,18 @@ const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress"
// RevokeSecurityGroupIngressRequest generates a "aws/request.Request" representing the
// client's request for the RevokeSecurityGroupIngress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RevokeSecurityGroupIngress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RevokeSecurityGroupIngress method directly
-// instead.
+// See RevokeSecurityGroupIngress for more information on using the RevokeSecurityGroupIngress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RevokeSecurityGroupIngressRequest method.
// req, resp := client.RevokeSecurityGroupIngressRequest(params)
@@ -19074,19 +19011,18 @@ const opRunInstances = "RunInstances"
// RunInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RunInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RunInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RunInstances method directly
-// instead.
+// See RunInstances for more information on using the RunInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RunInstancesRequest method.
// req, resp := client.RunInstancesRequest(params)
@@ -19197,19 +19133,18 @@ const opRunScheduledInstances = "RunScheduledInstances"
// RunScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RunScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RunScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RunScheduledInstances method directly
-// instead.
+// See RunScheduledInstances for more information on using the RunScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RunScheduledInstancesRequest method.
// req, resp := client.RunScheduledInstancesRequest(params)
@@ -19282,19 +19217,18 @@ const opStartInstances = "StartInstances"
// StartInstancesRequest generates a "aws/request.Request" representing the
// client's request for the StartInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See StartInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the StartInstances method directly
-// instead.
+// See StartInstances for more information on using the StartInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the StartInstancesRequest method.
// req, resp := client.StartInstancesRequest(params)
@@ -19375,19 +19309,18 @@ const opStopInstances = "StopInstances"
// StopInstancesRequest generates a "aws/request.Request" representing the
// client's request for the StopInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See StopInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the StopInstances method directly
-// instead.
+// See StopInstances for more information on using the StopInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the StopInstancesRequest method.
// req, resp := client.StopInstancesRequest(params)
@@ -19479,19 +19412,18 @@ const opTerminateInstances = "TerminateInstances"
// TerminateInstancesRequest generates a "aws/request.Request" representing the
// client's request for the TerminateInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See TerminateInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the TerminateInstances method directly
-// instead.
+// See TerminateInstances for more information on using the TerminateInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the TerminateInstancesRequest method.
// req, resp := client.TerminateInstancesRequest(params)
@@ -19578,19 +19510,18 @@ const opUnassignIpv6Addresses = "UnassignIpv6Addresses"
// UnassignIpv6AddressesRequest generates a "aws/request.Request" representing the
// client's request for the UnassignIpv6Addresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnassignIpv6Addresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnassignIpv6Addresses method directly
-// instead.
+// See UnassignIpv6Addresses for more information on using the UnassignIpv6Addresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnassignIpv6AddressesRequest method.
// req, resp := client.UnassignIpv6AddressesRequest(params)
@@ -19653,19 +19584,18 @@ const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses"
// UnassignPrivateIpAddressesRequest generates a "aws/request.Request" representing the
// client's request for the UnassignPrivateIpAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnassignPrivateIpAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnassignPrivateIpAddresses method directly
-// instead.
+// See UnassignPrivateIpAddresses for more information on using the UnassignPrivateIpAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnassignPrivateIpAddressesRequest method.
// req, resp := client.UnassignPrivateIpAddressesRequest(params)
@@ -19730,19 +19660,18 @@ const opUnmonitorInstances = "UnmonitorInstances"
// UnmonitorInstancesRequest generates a "aws/request.Request" representing the
// client's request for the UnmonitorInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnmonitorInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnmonitorInstances method directly
-// instead.
+// See UnmonitorInstances for more information on using the UnmonitorInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnmonitorInstancesRequest method.
// req, resp := client.UnmonitorInstancesRequest(params)
@@ -23761,6 +23690,59 @@ func (s *CreateCustomerGatewayOutput) SetCustomerGateway(v *CustomerGateway) *Cr
return s
}
+// Contains the parameters for CreateDefaultVpc.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcRequest
+type CreateDefaultVpcInput struct {
+ _ struct{} `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"`
+}
+
+// String returns the string representation
+func (s CreateDefaultVpcInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateDefaultVpcInput) GoString() string {
+ return s.String()
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateDefaultVpcInput) SetDryRun(v bool) *CreateDefaultVpcInput {
+ s.DryRun = &v
+ return s
+}
+
+// Contains the output of CreateDefaultVpc.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcResult
+type CreateDefaultVpcOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the VPC.
+ Vpc *Vpc `locationName:"vpc" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateDefaultVpcOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateDefaultVpcOutput) GoString() string {
+ return s.String()
+}
+
+// SetVpc sets the Vpc field's value.
+func (s *CreateDefaultVpcOutput) SetVpc(v *Vpc) *CreateDefaultVpcOutput {
+ s.Vpc = v
+ return s
+}
+
// Contains the parameters for CreateDhcpOptions.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptionsRequest
type CreateDhcpOptionsInput struct {
@@ -25094,6 +25076,7 @@ func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface)
return s
}
+// Contains the parameters for CreateNetworkInterfacePermission.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionRequest
type CreateNetworkInterfacePermissionInput struct {
_ struct{} `type:"structure"`
@@ -25177,6 +25160,7 @@ func (s *CreateNetworkInterfacePermissionInput) SetPermission(v string) *CreateN
return s
}
+// Contains the output of CreateNetworkInterfacePermission.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionResult
type CreateNetworkInterfacePermissionOutput struct {
_ struct{} `type:"structure"`
@@ -27665,6 +27649,7 @@ func (s DeleteNetworkInterfaceOutput) GoString() string {
return s.String()
}
+// Contains the parameters for DeleteNetworkInterfacePermission.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionRequest
type DeleteNetworkInterfacePermissionInput struct {
_ struct{} `type:"structure"`
@@ -27726,6 +27711,7 @@ func (s *DeleteNetworkInterfacePermissionInput) SetNetworkInterfacePermissionId(
return s
}
+// Contains the output for DeleteNetworkInterfacePermission.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionResult
type DeleteNetworkInterfacePermissionOutput struct {
_ struct{} `type:"structure"`
@@ -29665,6 +29651,126 @@ func (s *DescribeEgressOnlyInternetGatewaysOutput) SetNextToken(v string) *Descr
return s
}
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpusRequest
+type DescribeElasticGpusInput struct {
+ _ struct{} `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"`
+
+ // One or more Elastic GPU IDs.
+ ElasticGpuIds []*string `locationName:"ElasticGpuId" locationNameList:"item" type:"list"`
+
+ // One or more filters.
+ //
+ // * availability-zone - The Availability Zone in which the Elastic GPU resides.
+ //
+ // * elastic-gpu-health - The status of the Elastic GPU (OK | IMPAIRED).
+ //
+ // * elastic-gpu-state - The state of the Elastic GPU (ATTACHED).
+ //
+ // * elastic-gpu-type - The type of Elastic GPU; for example, eg1.medium.
+ //
+ // * instance-id - The ID of the instance to which the Elastic GPU is associated.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to request the next page of results.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeElasticGpusInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeElasticGpusInput) GoString() string {
+ return s.String()
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeElasticGpusInput) SetDryRun(v bool) *DescribeElasticGpusInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetElasticGpuIds sets the ElasticGpuIds field's value.
+func (s *DescribeElasticGpusInput) SetElasticGpuIds(v []*string) *DescribeElasticGpusInput {
+ s.ElasticGpuIds = v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeElasticGpusInput) SetFilters(v []*Filter) *DescribeElasticGpusInput {
+ s.Filters = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeElasticGpusInput) SetMaxResults(v int64) *DescribeElasticGpusInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeElasticGpusInput) SetNextToken(v string) *DescribeElasticGpusInput {
+ s.NextToken = &v
+ return s
+}
+
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpusResult
+type DescribeElasticGpusOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the Elastic GPUs.
+ ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" type:"list"`
+
+ // The total number of items to return. If the total number of items available
+ // is more than the value specified in max-items then a Next-Token will be provided
+ // in the output that you can use to resume pagination.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // 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"`
+}
+
+// String returns the string representation
+func (s DescribeElasticGpusOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeElasticGpusOutput) GoString() string {
+ return s.String()
+}
+
+// SetElasticGpuSet sets the ElasticGpuSet field's value.
+func (s *DescribeElasticGpusOutput) SetElasticGpuSet(v []*ElasticGpus) *DescribeElasticGpusOutput {
+ s.ElasticGpuSet = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeElasticGpusOutput) SetMaxResults(v int64) *DescribeElasticGpusOutput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeElasticGpusOutput) SetNextToken(v string) *DescribeElasticGpusOutput {
+ s.NextToken = &v
+ return s
+}
+
// Contains the parameters for DescribeExportTasks.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasksRequest
type DescribeExportTasksInput struct {
@@ -32411,6 +32517,7 @@ func (s *DescribeNetworkInterfaceAttributeOutput) SetSourceDestCheck(v *Attribut
return s
}
+// Contains the parameters for DescribeNetworkInterfacePermissions.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsRequest
type DescribeNetworkInterfacePermissionsInput struct {
_ struct{} `type:"structure"`
@@ -32477,6 +32584,7 @@ func (s *DescribeNetworkInterfacePermissionsInput) SetNextToken(v string) *Descr
return s
}
+// Contains the output for DescribeNetworkInterfacePermissions.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsResult
type DescribeNetworkInterfacePermissionsOutput struct {
_ struct{} `type:"structure"`
@@ -38475,6 +38583,193 @@ func (s *EgressOnlyInternetGateway) SetEgressOnlyInternetGatewayId(v string) *Eg
return s
}
+// Describes the association between an instance and an Elastic GPU.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuAssociation
+type ElasticGpuAssociation struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the association.
+ ElasticGpuAssociationId *string `locationName:"elasticGpuAssociationId" type:"string"`
+
+ // The state of the association between the instance and the Elastic GPU.
+ ElasticGpuAssociationState *string `locationName:"elasticGpuAssociationState" type:"string"`
+
+ // The time the Elastic GPU was associated with the instance.
+ ElasticGpuAssociationTime *string `locationName:"elasticGpuAssociationTime" type:"string"`
+
+ // The ID of the Elastic GPU.
+ ElasticGpuId *string `locationName:"elasticGpuId" type:"string"`
+}
+
+// String returns the string representation
+func (s ElasticGpuAssociation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpuAssociation) GoString() string {
+ return s.String()
+}
+
+// SetElasticGpuAssociationId sets the ElasticGpuAssociationId field's value.
+func (s *ElasticGpuAssociation) SetElasticGpuAssociationId(v string) *ElasticGpuAssociation {
+ s.ElasticGpuAssociationId = &v
+ return s
+}
+
+// SetElasticGpuAssociationState sets the ElasticGpuAssociationState field's value.
+func (s *ElasticGpuAssociation) SetElasticGpuAssociationState(v string) *ElasticGpuAssociation {
+ s.ElasticGpuAssociationState = &v
+ return s
+}
+
+// SetElasticGpuAssociationTime sets the ElasticGpuAssociationTime field's value.
+func (s *ElasticGpuAssociation) SetElasticGpuAssociationTime(v string) *ElasticGpuAssociation {
+ s.ElasticGpuAssociationTime = &v
+ return s
+}
+
+// SetElasticGpuId sets the ElasticGpuId field's value.
+func (s *ElasticGpuAssociation) SetElasticGpuId(v string) *ElasticGpuAssociation {
+ s.ElasticGpuId = &v
+ return s
+}
+
+// Describes the status of an Elastic GPU.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuHealth
+type ElasticGpuHealth struct {
+ _ struct{} `type:"structure"`
+
+ // The health status.
+ Status *string `locationName:"status" type:"string" enum:"ElasticGpuStatus"`
+}
+
+// String returns the string representation
+func (s ElasticGpuHealth) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpuHealth) GoString() string {
+ return s.String()
+}
+
+// SetStatus sets the Status field's value.
+func (s *ElasticGpuHealth) SetStatus(v string) *ElasticGpuHealth {
+ s.Status = &v
+ return s
+}
+
+// A specification for an Elastic GPU.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuSpecification
+type ElasticGpuSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The type of Elastic GPU.
+ //
+ // Type is a required field
+ Type *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ElasticGpuSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpuSpecification) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ElasticGpuSpecification) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ElasticGpuSpecification"}
+ if s.Type == nil {
+ invalidParams.Add(request.NewErrParamRequired("Type"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetType sets the Type field's value.
+func (s *ElasticGpuSpecification) SetType(v string) *ElasticGpuSpecification {
+ s.Type = &v
+ return s
+}
+
+// Describes an Elastic GPU.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpus
+type ElasticGpus struct {
+ _ struct{} `type:"structure"`
+
+ // The Availability Zone in the which the Elastic GPU resides.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The status of the Elastic GPU.
+ ElasticGpuHealth *ElasticGpuHealth `locationName:"elasticGpuHealth" type:"structure"`
+
+ // The ID of the Elastic GPU.
+ ElasticGpuId *string `locationName:"elasticGpuId" type:"string"`
+
+ // The state of the Elastic GPU.
+ ElasticGpuState *string `locationName:"elasticGpuState" type:"string" enum:"ElasticGpuState"`
+
+ // The type of Elastic GPU.
+ ElasticGpuType *string `locationName:"elasticGpuType" type:"string"`
+
+ // The ID of the instance to which the Elastic GPU is attached.
+ InstanceId *string `locationName:"instanceId" type:"string"`
+}
+
+// String returns the string representation
+func (s ElasticGpus) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpus) GoString() string {
+ return s.String()
+}
+
+// SetAvailabilityZone sets the AvailabilityZone field's value.
+func (s *ElasticGpus) SetAvailabilityZone(v string) *ElasticGpus {
+ s.AvailabilityZone = &v
+ return s
+}
+
+// SetElasticGpuHealth sets the ElasticGpuHealth field's value.
+func (s *ElasticGpus) SetElasticGpuHealth(v *ElasticGpuHealth) *ElasticGpus {
+ s.ElasticGpuHealth = v
+ return s
+}
+
+// SetElasticGpuId sets the ElasticGpuId field's value.
+func (s *ElasticGpus) SetElasticGpuId(v string) *ElasticGpus {
+ s.ElasticGpuId = &v
+ return s
+}
+
+// SetElasticGpuState sets the ElasticGpuState field's value.
+func (s *ElasticGpus) SetElasticGpuState(v string) *ElasticGpus {
+ s.ElasticGpuState = &v
+ return s
+}
+
+// SetElasticGpuType sets the ElasticGpuType field's value.
+func (s *ElasticGpus) SetElasticGpuType(v string) *ElasticGpus {
+ s.ElasticGpuType = &v
+ return s
+}
+
+// SetInstanceId sets the InstanceId field's value.
+func (s *ElasticGpus) SetInstanceId(v string) *ElasticGpus {
+ s.InstanceId = &v
+ return s
+}
+
// Contains the parameters for EnableVgwRoutePropagation.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagationRequest
type EnableVgwRoutePropagationInput struct {
@@ -42116,6 +42411,9 @@ type Instance struct {
// Optimized instance.
EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+ // The Elastic GPU associated with the instance.
+ ElasticGpuAssociations []*ElasticGpuAssociation `locationName:"elasticGpuAssociationSet" locationNameList:"item" type:"list"`
+
// Specifies whether enhanced networking with ENA is enabled.
EnaSupport *bool `locationName:"enaSupport" type:"boolean"`
@@ -42273,6 +42571,12 @@ func (s *Instance) SetEbsOptimized(v bool) *Instance {
return s
}
+// SetElasticGpuAssociations sets the ElasticGpuAssociations field's value.
+func (s *Instance) SetElasticGpuAssociations(v []*ElasticGpuAssociation) *Instance {
+ s.ElasticGpuAssociations = v
+ return s
+}
+
// SetEnaSupport sets the EnaSupport field's value.
func (s *Instance) SetEnaSupport(v bool) *Instance {
s.EnaSupport = &v
@@ -51701,6 +52005,9 @@ type RunInstancesInput struct {
// Default: false
EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+ // An Elastic GPU to associate with the instance.
+ ElasticGpuSpecification []*ElasticGpuSpecification `locationNameList:"item" type:"list"`
+
// The IAM instance profile.
IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
@@ -51848,6 +52155,16 @@ func (s *RunInstancesInput) Validate() error {
if s.MinCount == nil {
invalidParams.Add(request.NewErrParamRequired("MinCount"))
}
+ if s.ElasticGpuSpecification != nil {
+ for i, v := range s.ElasticGpuSpecification {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecification", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
if s.Monitoring != nil {
if err := s.Monitoring.Validate(); err != nil {
invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams))
@@ -51906,6 +52223,12 @@ func (s *RunInstancesInput) SetEbsOptimized(v bool) *RunInstancesInput {
return s
}
+// SetElasticGpuSpecification sets the ElasticGpuSpecification field's value.
+func (s *RunInstancesInput) SetElasticGpuSpecification(v []*ElasticGpuSpecification) *RunInstancesInput {
+ s.ElasticGpuSpecification = v
+ return s
+}
+
// SetIamInstanceProfile sets the IamInstanceProfile field's value.
func (s *RunInstancesInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RunInstancesInput {
s.IamInstanceProfile = v
@@ -54039,6 +54362,9 @@ type SpotFleetLaunchSpecification struct {
// subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".
SubnetId *string `locationName:"subnetId" type:"string"`
+ // The tags to apply during creation.
+ TagSpecifications []*SpotFleetTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"`
+
// The user data to make available to the instances. If you are using an AWS
// SDK or command line tool, Base64-encoding is performed for you, and you can
// load the text from a file. Otherwise, you must provide Base64-encoded text.
@@ -54174,6 +54500,12 @@ func (s *SpotFleetLaunchSpecification) SetSubnetId(v string) *SpotFleetLaunchSpe
return s
}
+// SetTagSpecifications sets the TagSpecifications field's value.
+func (s *SpotFleetLaunchSpecification) SetTagSpecifications(v []*SpotFleetTagSpecification) *SpotFleetLaunchSpecification {
+ s.TagSpecifications = v
+ return s
+}
+
// SetUserData sets the UserData field's value.
func (s *SpotFleetLaunchSpecification) SetUserData(v string) *SpotFleetLaunchSpecification {
s.UserData = &v
@@ -54483,6 +54815,41 @@ func (s *SpotFleetRequestConfigData) SetValidUntil(v time.Time) *SpotFleetReques
return s
}
+// The tags for a Spot fleet resource.
+// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetTagSpecification
+type SpotFleetTagSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The type of resource. Currently, the only resource type that is supported
+ // is instance.
+ ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"`
+
+ // The tags.
+ Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s SpotFleetTagSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotFleetTagSpecification) GoString() string {
+ return s.String()
+}
+
+// SetResourceType sets the ResourceType field's value.
+func (s *SpotFleetTagSpecification) SetResourceType(v string) *SpotFleetTagSpecification {
+ s.ResourceType = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *SpotFleetTagSpecification) SetTags(v []*Tag) *SpotFleetTagSpecification {
+ s.Tags = v
+ return s
+}
+
// Describes a Spot instance request.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceRequest
type SpotInstanceRequest struct {
@@ -58036,6 +58403,19 @@ const (
DomainTypeStandard = "standard"
)
+const (
+ // ElasticGpuStateAttached is a ElasticGpuState enum value
+ ElasticGpuStateAttached = "ATTACHED"
+)
+
+const (
+ // ElasticGpuStatusOk is a ElasticGpuStatus enum value
+ ElasticGpuStatusOk = "OK"
+
+ // ElasticGpuStatusImpaired is a ElasticGpuStatus enum value
+ ElasticGpuStatusImpaired = "IMPAIRED"
+)
+
const (
// EventCodeInstanceReboot is a EventCode enum value
EventCodeInstanceReboot = "instance-reboot"
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
index 4aa6618b4..547167782 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
@@ -15,69 +15,17 @@
//
// Using the Client
//
-// To use the client for Amazon Elastic Compute Cloud you will first need
-// to create a new instance of it.
+// To Amazon Elastic Compute Cloud with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := ec2.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
+// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
-// See aws package's Config type for more information on configuration options.
+// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon Elastic Compute Cloud client EC2 for more
-// information on creating the service's client.
+// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#New
-//
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.AcceptReservedInstancesExchangeQuote(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("AcceptReservedInstancesExchangeQuote result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.AcceptReservedInstancesExchangeQuoteWithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package ec2
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
index c0a655fa0..6914a666b 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
@@ -11,7 +11,7 @@ import (
// WaitUntilBundleTaskComplete uses the Amazon EC2 API operation
// DescribeBundleTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilBundleTaskComplete(input *DescribeBundleTasksInput) error {
return c.WaitUntilBundleTaskCompleteWithContext(aws.BackgroundContext(), input)
@@ -62,7 +62,7 @@ func (c *EC2) WaitUntilBundleTaskCompleteWithContext(ctx aws.Context, input *Des
// WaitUntilConversionTaskCancelled uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskCancelled(input *DescribeConversionTasksInput) error {
return c.WaitUntilConversionTaskCancelledWithContext(aws.BackgroundContext(), input)
@@ -108,7 +108,7 @@ func (c *EC2) WaitUntilConversionTaskCancelledWithContext(ctx aws.Context, input
// WaitUntilConversionTaskCompleted uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskCompleted(input *DescribeConversionTasksInput) error {
return c.WaitUntilConversionTaskCompletedWithContext(aws.BackgroundContext(), input)
@@ -164,7 +164,7 @@ func (c *EC2) WaitUntilConversionTaskCompletedWithContext(ctx aws.Context, input
// WaitUntilConversionTaskDeleted uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskDeleted(input *DescribeConversionTasksInput) error {
return c.WaitUntilConversionTaskDeletedWithContext(aws.BackgroundContext(), input)
@@ -210,7 +210,7 @@ func (c *EC2) WaitUntilConversionTaskDeletedWithContext(ctx aws.Context, input *
// WaitUntilCustomerGatewayAvailable uses the Amazon EC2 API operation
// DescribeCustomerGateways to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error {
return c.WaitUntilCustomerGatewayAvailableWithContext(aws.BackgroundContext(), input)
@@ -266,7 +266,7 @@ func (c *EC2) WaitUntilCustomerGatewayAvailableWithContext(ctx aws.Context, inpu
// WaitUntilExportTaskCancelled uses the Amazon EC2 API operation
// DescribeExportTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilExportTaskCancelled(input *DescribeExportTasksInput) error {
return c.WaitUntilExportTaskCancelledWithContext(aws.BackgroundContext(), input)
@@ -312,7 +312,7 @@ func (c *EC2) WaitUntilExportTaskCancelledWithContext(ctx aws.Context, input *De
// WaitUntilExportTaskCompleted uses the Amazon EC2 API operation
// DescribeExportTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilExportTaskCompleted(input *DescribeExportTasksInput) error {
return c.WaitUntilExportTaskCompletedWithContext(aws.BackgroundContext(), input)
@@ -358,7 +358,7 @@ func (c *EC2) WaitUntilExportTaskCompletedWithContext(ctx aws.Context, input *De
// WaitUntilImageAvailable uses the Amazon EC2 API operation
// DescribeImages to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilImageAvailable(input *DescribeImagesInput) error {
return c.WaitUntilImageAvailableWithContext(aws.BackgroundContext(), input)
@@ -409,7 +409,7 @@ func (c *EC2) WaitUntilImageAvailableWithContext(ctx aws.Context, input *Describ
// WaitUntilImageExists uses the Amazon EC2 API operation
// DescribeImages to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilImageExists(input *DescribeImagesInput) error {
return c.WaitUntilImageExistsWithContext(aws.BackgroundContext(), input)
@@ -460,7 +460,7 @@ func (c *EC2) WaitUntilImageExistsWithContext(ctx aws.Context, input *DescribeIm
// WaitUntilInstanceExists uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceExists(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceExistsWithContext(aws.BackgroundContext(), input)
@@ -511,7 +511,7 @@ func (c *EC2) WaitUntilInstanceExistsWithContext(ctx aws.Context, input *Describ
// WaitUntilInstanceRunning uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceRunning(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceRunningWithContext(aws.BackgroundContext(), input)
@@ -577,7 +577,7 @@ func (c *EC2) WaitUntilInstanceRunningWithContext(ctx aws.Context, input *Descri
// WaitUntilInstanceStatusOk uses the Amazon EC2 API operation
// DescribeInstanceStatus to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceStatusOk(input *DescribeInstanceStatusInput) error {
return c.WaitUntilInstanceStatusOkWithContext(aws.BackgroundContext(), input)
@@ -628,7 +628,7 @@ func (c *EC2) WaitUntilInstanceStatusOkWithContext(ctx aws.Context, input *Descr
// WaitUntilInstanceStopped uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceStopped(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceStoppedWithContext(aws.BackgroundContext(), input)
@@ -684,7 +684,7 @@ func (c *EC2) WaitUntilInstanceStoppedWithContext(ctx aws.Context, input *Descri
// WaitUntilInstanceTerminated uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input)
@@ -740,7 +740,7 @@ func (c *EC2) WaitUntilInstanceTerminatedWithContext(ctx aws.Context, input *Des
// WaitUntilKeyPairExists uses the Amazon EC2 API operation
// DescribeKeyPairs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error {
return c.WaitUntilKeyPairExistsWithContext(aws.BackgroundContext(), input)
@@ -791,7 +791,7 @@ func (c *EC2) WaitUntilKeyPairExistsWithContext(ctx aws.Context, input *Describe
// WaitUntilNatGatewayAvailable uses the Amazon EC2 API operation
// DescribeNatGateways to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilNatGatewayAvailable(input *DescribeNatGatewaysInput) error {
return c.WaitUntilNatGatewayAvailableWithContext(aws.BackgroundContext(), input)
@@ -857,7 +857,7 @@ func (c *EC2) WaitUntilNatGatewayAvailableWithContext(ctx aws.Context, input *De
// WaitUntilNetworkInterfaceAvailable uses the Amazon EC2 API operation
// DescribeNetworkInterfaces to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterfacesInput) error {
return c.WaitUntilNetworkInterfaceAvailableWithContext(aws.BackgroundContext(), input)
@@ -908,7 +908,7 @@ func (c *EC2) WaitUntilNetworkInterfaceAvailableWithContext(ctx aws.Context, inp
// WaitUntilPasswordDataAvailable uses the Amazon EC2 API operation
// GetPasswordData to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilPasswordDataAvailable(input *GetPasswordDataInput) error {
return c.WaitUntilPasswordDataAvailableWithContext(aws.BackgroundContext(), input)
@@ -954,7 +954,7 @@ func (c *EC2) WaitUntilPasswordDataAvailableWithContext(ctx aws.Context, input *
// WaitUntilSnapshotCompleted uses the Amazon EC2 API operation
// DescribeSnapshots to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSnapshotCompleted(input *DescribeSnapshotsInput) error {
return c.WaitUntilSnapshotCompletedWithContext(aws.BackgroundContext(), input)
@@ -1000,7 +1000,7 @@ func (c *EC2) WaitUntilSnapshotCompletedWithContext(ctx aws.Context, input *Desc
// WaitUntilSpotInstanceRequestFulfilled uses the Amazon EC2 API operation
// DescribeSpotInstanceRequests to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSpotInstanceRequestFulfilled(input *DescribeSpotInstanceRequestsInput) error {
return c.WaitUntilSpotInstanceRequestFulfilledWithContext(aws.BackgroundContext(), input)
@@ -1045,6 +1045,11 @@ func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context,
Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "system-error",
},
+ {
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
+ Expected: "InvalidSpotInstanceRequestID.NotFound",
+ },
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
@@ -1066,7 +1071,7 @@ func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context,
// WaitUntilSubnetAvailable uses the Amazon EC2 API operation
// DescribeSubnets to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSubnetAvailable(input *DescribeSubnetsInput) error {
return c.WaitUntilSubnetAvailableWithContext(aws.BackgroundContext(), input)
@@ -1112,7 +1117,7 @@ func (c *EC2) WaitUntilSubnetAvailableWithContext(ctx aws.Context, input *Descri
// WaitUntilSystemStatusOk uses the Amazon EC2 API operation
// DescribeInstanceStatus to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSystemStatusOk(input *DescribeInstanceStatusInput) error {
return c.WaitUntilSystemStatusOkWithContext(aws.BackgroundContext(), input)
@@ -1158,7 +1163,7 @@ func (c *EC2) WaitUntilSystemStatusOkWithContext(ctx aws.Context, input *Describ
// WaitUntilVolumeAvailable uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeAvailable(input *DescribeVolumesInput) error {
return c.WaitUntilVolumeAvailableWithContext(aws.BackgroundContext(), input)
@@ -1209,7 +1214,7 @@ func (c *EC2) WaitUntilVolumeAvailableWithContext(ctx aws.Context, input *Descri
// WaitUntilVolumeDeleted uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeDeleted(input *DescribeVolumesInput) error {
return c.WaitUntilVolumeDeletedWithContext(aws.BackgroundContext(), input)
@@ -1260,7 +1265,7 @@ func (c *EC2) WaitUntilVolumeDeletedWithContext(ctx aws.Context, input *Describe
// WaitUntilVolumeInUse uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeInUse(input *DescribeVolumesInput) error {
return c.WaitUntilVolumeInUseWithContext(aws.BackgroundContext(), input)
@@ -1311,7 +1316,7 @@ func (c *EC2) WaitUntilVolumeInUseWithContext(ctx aws.Context, input *DescribeVo
// WaitUntilVpcAvailable uses the Amazon EC2 API operation
// DescribeVpcs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcAvailable(input *DescribeVpcsInput) error {
return c.WaitUntilVpcAvailableWithContext(aws.BackgroundContext(), input)
@@ -1357,7 +1362,7 @@ func (c *EC2) WaitUntilVpcAvailableWithContext(ctx aws.Context, input *DescribeV
// WaitUntilVpcExists uses the Amazon EC2 API operation
// DescribeVpcs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcExists(input *DescribeVpcsInput) error {
return c.WaitUntilVpcExistsWithContext(aws.BackgroundContext(), input)
@@ -1408,7 +1413,7 @@ func (c *EC2) WaitUntilVpcExistsWithContext(ctx aws.Context, input *DescribeVpcs
// WaitUntilVpcPeeringConnectionDeleted uses the Amazon EC2 API operation
// DescribeVpcPeeringConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcPeeringConnectionDeleted(input *DescribeVpcPeeringConnectionsInput) error {
return c.WaitUntilVpcPeeringConnectionDeletedWithContext(aws.BackgroundContext(), input)
@@ -1459,7 +1464,7 @@ func (c *EC2) WaitUntilVpcPeeringConnectionDeletedWithContext(ctx aws.Context, i
// WaitUntilVpcPeeringConnectionExists uses the Amazon EC2 API operation
// DescribeVpcPeeringConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcPeeringConnectionExists(input *DescribeVpcPeeringConnectionsInput) error {
return c.WaitUntilVpcPeeringConnectionExistsWithContext(aws.BackgroundContext(), input)
@@ -1510,7 +1515,7 @@ func (c *EC2) WaitUntilVpcPeeringConnectionExistsWithContext(ctx aws.Context, in
// WaitUntilVpnConnectionAvailable uses the Amazon EC2 API operation
// DescribeVpnConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpnConnectionAvailable(input *DescribeVpnConnectionsInput) error {
return c.WaitUntilVpnConnectionAvailableWithContext(aws.BackgroundContext(), input)
@@ -1566,7 +1571,7 @@ func (c *EC2) WaitUntilVpnConnectionAvailableWithContext(ctx aws.Context, input
// WaitUntilVpnConnectionDeleted uses the Amazon EC2 API operation
// DescribeVpnConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpnConnectionDeleted(input *DescribeVpnConnectionsInput) error {
return c.WaitUntilVpnConnectionDeletedWithContext(aws.BackgroundContext(), input)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
index c06242daa..f9136852f 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go
@@ -14,19 +14,18 @@ const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability"
// BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the
// client's request for the BatchCheckLayerAvailability operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BatchCheckLayerAvailability for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BatchCheckLayerAvailability method directly
-// instead.
+// See BatchCheckLayerAvailability for more information on using the BatchCheckLayerAvailability
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BatchCheckLayerAvailabilityRequest method.
// req, resp := client.BatchCheckLayerAvailabilityRequest(params)
@@ -107,19 +106,18 @@ const opBatchDeleteImage = "BatchDeleteImage"
// BatchDeleteImageRequest generates a "aws/request.Request" representing the
// client's request for the BatchDeleteImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BatchDeleteImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BatchDeleteImage method directly
-// instead.
+// See BatchDeleteImage for more information on using the BatchDeleteImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BatchDeleteImageRequest method.
// req, resp := client.BatchDeleteImageRequest(params)
@@ -203,19 +201,18 @@ const opBatchGetImage = "BatchGetImage"
// BatchGetImageRequest generates a "aws/request.Request" representing the
// client's request for the BatchGetImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BatchGetImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BatchGetImage method directly
-// instead.
+// See BatchGetImage for more information on using the BatchGetImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BatchGetImageRequest method.
// req, resp := client.BatchGetImageRequest(params)
@@ -292,19 +289,18 @@ const opCompleteLayerUpload = "CompleteLayerUpload"
// CompleteLayerUploadRequest generates a "aws/request.Request" representing the
// client's request for the CompleteLayerUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CompleteLayerUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CompleteLayerUpload method directly
-// instead.
+// See CompleteLayerUpload for more information on using the CompleteLayerUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CompleteLayerUploadRequest method.
// req, resp := client.CompleteLayerUploadRequest(params)
@@ -403,19 +399,18 @@ const opCreateRepository = "CreateRepository"
// CreateRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the CreateRepository operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateRepository for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateRepository method directly
-// instead.
+// See CreateRepository for more information on using the CreateRepository
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateRepositoryRequest method.
// req, resp := client.CreateRepositoryRequest(params)
@@ -496,19 +491,18 @@ const opDeleteRepository = "DeleteRepository"
// DeleteRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRepository operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRepository for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRepository method directly
-// instead.
+// See DeleteRepository for more information on using the DeleteRepository
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRepositoryRequest method.
// req, resp := client.DeleteRepositoryRequest(params)
@@ -589,19 +583,18 @@ const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy"
// DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRepositoryPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRepositoryPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRepositoryPolicy method directly
-// instead.
+// See DeleteRepositoryPolicy for more information on using the DeleteRepositoryPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRepositoryPolicyRequest method.
// req, resp := client.DeleteRepositoryPolicyRequest(params)
@@ -681,19 +674,18 @@ const opDescribeImages = "DescribeImages"
// DescribeImagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImages method directly
-// instead.
+// See DescribeImages for more information on using the DescribeImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImagesRequest method.
// req, resp := client.DescribeImagesRequest(params)
@@ -834,19 +826,18 @@ const opDescribeRepositories = "DescribeRepositories"
// DescribeRepositoriesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRepositories operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeRepositories for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeRepositories method directly
-// instead.
+// See DescribeRepositories for more information on using the DescribeRepositories
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeRepositoriesRequest method.
// req, resp := client.DescribeRepositoriesRequest(params)
@@ -978,19 +969,18 @@ const opGetAuthorizationToken = "GetAuthorizationToken"
// GetAuthorizationTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetAuthorizationToken operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetAuthorizationToken for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetAuthorizationToken method directly
-// instead.
+// See GetAuthorizationToken for more information on using the GetAuthorizationToken
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetAuthorizationTokenRequest method.
// req, resp := client.GetAuthorizationTokenRequest(params)
@@ -1069,19 +1059,18 @@ const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer"
// GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the
// client's request for the GetDownloadUrlForLayer operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetDownloadUrlForLayer for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetDownloadUrlForLayer method directly
-// instead.
+// See GetDownloadUrlForLayer for more information on using the GetDownloadUrlForLayer
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetDownloadUrlForLayerRequest method.
// req, resp := client.GetDownloadUrlForLayerRequest(params)
@@ -1170,19 +1159,18 @@ const opGetRepositoryPolicy = "GetRepositoryPolicy"
// GetRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetRepositoryPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetRepositoryPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetRepositoryPolicy method directly
-// instead.
+// See GetRepositoryPolicy for more information on using the GetRepositoryPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetRepositoryPolicyRequest method.
// req, resp := client.GetRepositoryPolicyRequest(params)
@@ -1262,19 +1250,18 @@ const opInitiateLayerUpload = "InitiateLayerUpload"
// InitiateLayerUploadRequest generates a "aws/request.Request" representing the
// client's request for the InitiateLayerUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See InitiateLayerUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the InitiateLayerUpload method directly
-// instead.
+// See InitiateLayerUpload for more information on using the InitiateLayerUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the InitiateLayerUploadRequest method.
// req, resp := client.InitiateLayerUploadRequest(params)
@@ -1354,19 +1341,18 @@ const opListImages = "ListImages"
// ListImagesRequest generates a "aws/request.Request" representing the
// client's request for the ListImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListImages method directly
-// instead.
+// See ListImages for more information on using the ListImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListImagesRequest method.
// req, resp := client.ListImagesRequest(params)
@@ -1504,19 +1490,18 @@ const opPutImage = "PutImage"
// PutImageRequest generates a "aws/request.Request" representing the
// client's request for the PutImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutImage method directly
-// instead.
+// See PutImage for more information on using the PutImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutImageRequest method.
// req, resp := client.PutImageRequest(params)
@@ -1610,19 +1595,18 @@ const opSetRepositoryPolicy = "SetRepositoryPolicy"
// SetRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the SetRepositoryPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See SetRepositoryPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the SetRepositoryPolicy method directly
-// instead.
+// See SetRepositoryPolicy for more information on using the SetRepositoryPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the SetRepositoryPolicyRequest method.
// req, resp := client.SetRepositoryPolicyRequest(params)
@@ -1698,19 +1682,18 @@ const opUploadLayerPart = "UploadLayerPart"
// UploadLayerPartRequest generates a "aws/request.Request" representing the
// client's request for the UploadLayerPart operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UploadLayerPart for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UploadLayerPart method directly
-// instead.
+// See UploadLayerPart for more information on using the UploadLayerPart
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UploadLayerPartRequest method.
// req, resp := client.UploadLayerPartRequest(params)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go
index 004e50f0a..987aa72fa 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go
@@ -17,69 +17,17 @@
//
// Using the Client
//
-// To use the client for Amazon EC2 Container Registry you will first need
-// to create a new instance of it.
+// To Amazon EC2 Container Registry with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := ecr.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
+// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
-// See aws package's Config type for more information on configuration options.
+// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon EC2 Container Registry client ECR for more
-// information on creating the service's client.
+// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/ecr/#New
-//
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.BatchCheckLayerAvailability(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("BatchCheckLayerAvailability result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.BatchCheckLayerAvailabilityWithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package ecr
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
index 8a5fd8e17..e65ef266f 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
@@ -18,19 +18,18 @@ const opAbortMultipartUpload = "AbortMultipartUpload"
// AbortMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the AbortMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AbortMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AbortMultipartUpload method directly
-// instead.
+// See AbortMultipartUpload for more information on using the AbortMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AbortMultipartUploadRequest method.
// req, resp := client.AbortMultipartUploadRequest(params)
@@ -102,19 +101,18 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload"
// CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the CompleteMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CompleteMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CompleteMultipartUpload method directly
-// instead.
+// See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CompleteMultipartUploadRequest method.
// req, resp := client.CompleteMultipartUploadRequest(params)
@@ -177,19 +175,18 @@ const opCopyObject = "CopyObject"
// CopyObjectRequest generates a "aws/request.Request" representing the
// client's request for the CopyObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopyObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopyObject method directly
-// instead.
+// See CopyObject for more information on using the CopyObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopyObjectRequest method.
// req, resp := client.CopyObjectRequest(params)
@@ -258,19 +255,18 @@ const opCreateBucket = "CreateBucket"
// CreateBucketRequest generates a "aws/request.Request" representing the
// client's request for the CreateBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateBucket method directly
-// instead.
+// See CreateBucket for more information on using the CreateBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateBucketRequest method.
// req, resp := client.CreateBucketRequest(params)
@@ -341,19 +337,18 @@ const opCreateMultipartUpload = "CreateMultipartUpload"
// CreateMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the CreateMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateMultipartUpload method directly
-// instead.
+// See CreateMultipartUpload for more information on using the CreateMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateMultipartUploadRequest method.
// req, resp := client.CreateMultipartUploadRequest(params)
@@ -422,19 +417,18 @@ const opDeleteBucket = "DeleteBucket"
// DeleteBucketRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucket method directly
-// instead.
+// See DeleteBucket for more information on using the DeleteBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketRequest method.
// req, resp := client.DeleteBucketRequest(params)
@@ -500,19 +494,18 @@ const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration
// DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketAnalyticsConfiguration method directly
-// instead.
+// See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
// req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
@@ -578,19 +571,18 @@ const opDeleteBucketCors = "DeleteBucketCors"
// DeleteBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketCors method directly
-// instead.
+// See DeleteBucketCors for more information on using the DeleteBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketCorsRequest method.
// req, resp := client.DeleteBucketCorsRequest(params)
@@ -655,19 +647,18 @@ const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration
// DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketInventoryConfiguration method directly
-// instead.
+// See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
// req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
@@ -733,19 +724,18 @@ const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
// DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketLifecycle method directly
-// instead.
+// See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketLifecycleRequest method.
// req, resp := client.DeleteBucketLifecycleRequest(params)
@@ -810,19 +800,18 @@ const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
// DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketMetricsConfiguration method directly
-// instead.
+// See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
// req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
@@ -888,19 +877,18 @@ const opDeleteBucketPolicy = "DeleteBucketPolicy"
// DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketPolicy method directly
-// instead.
+// See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketPolicyRequest method.
// req, resp := client.DeleteBucketPolicyRequest(params)
@@ -965,19 +953,18 @@ const opDeleteBucketReplication = "DeleteBucketReplication"
// DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketReplication method directly
-// instead.
+// See DeleteBucketReplication for more information on using the DeleteBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketReplicationRequest method.
// req, resp := client.DeleteBucketReplicationRequest(params)
@@ -1042,19 +1029,18 @@ const opDeleteBucketTagging = "DeleteBucketTagging"
// DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketTagging method directly
-// instead.
+// See DeleteBucketTagging for more information on using the DeleteBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketTaggingRequest method.
// req, resp := client.DeleteBucketTaggingRequest(params)
@@ -1119,19 +1105,18 @@ const opDeleteBucketWebsite = "DeleteBucketWebsite"
// DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketWebsite method directly
-// instead.
+// See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketWebsiteRequest method.
// req, resp := client.DeleteBucketWebsiteRequest(params)
@@ -1196,19 +1181,18 @@ const opDeleteObject = "DeleteObject"
// DeleteObjectRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObject method directly
-// instead.
+// See DeleteObject for more information on using the DeleteObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectRequest method.
// req, resp := client.DeleteObjectRequest(params)
@@ -1273,19 +1257,18 @@ const opDeleteObjectTagging = "DeleteObjectTagging"
// DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObjectTagging method directly
-// instead.
+// See DeleteObjectTagging for more information on using the DeleteObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectTaggingRequest method.
// req, resp := client.DeleteObjectTaggingRequest(params)
@@ -1348,19 +1331,18 @@ const opDeleteObjects = "DeleteObjects"
// DeleteObjectsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObjects operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObjects for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObjects method directly
-// instead.
+// See DeleteObjects for more information on using the DeleteObjects
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectsRequest method.
// req, resp := client.DeleteObjectsRequest(params)
@@ -1424,19 +1406,18 @@ const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
// GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAccelerateConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAccelerateConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAccelerateConfiguration method directly
-// instead.
+// See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
// req, resp := client.GetBucketAccelerateConfigurationRequest(params)
@@ -1499,19 +1480,18 @@ const opGetBucketAcl = "GetBucketAcl"
// GetBucketAclRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAcl method directly
-// instead.
+// See GetBucketAcl for more information on using the GetBucketAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAclRequest method.
// req, resp := client.GetBucketAclRequest(params)
@@ -1574,19 +1554,18 @@ const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
// GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAnalyticsConfiguration method directly
-// instead.
+// See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
// req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
@@ -1650,19 +1629,18 @@ const opGetBucketCors = "GetBucketCors"
// GetBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketCors method directly
-// instead.
+// See GetBucketCors for more information on using the GetBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketCorsRequest method.
// req, resp := client.GetBucketCorsRequest(params)
@@ -1725,19 +1703,18 @@ const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
// GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketInventoryConfiguration method directly
-// instead.
+// See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketInventoryConfigurationRequest method.
// req, resp := client.GetBucketInventoryConfigurationRequest(params)
@@ -1801,19 +1778,18 @@ const opGetBucketLifecycle = "GetBucketLifecycle"
// GetBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLifecycle method directly
-// instead.
+// See GetBucketLifecycle for more information on using the GetBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLifecycleRequest method.
// req, resp := client.GetBucketLifecycleRequest(params)
@@ -1879,19 +1855,18 @@ const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
// GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLifecycleConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLifecycleConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLifecycleConfiguration method directly
-// instead.
+// See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
// req, resp := client.GetBucketLifecycleConfigurationRequest(params)
@@ -1954,19 +1929,18 @@ const opGetBucketLocation = "GetBucketLocation"
// GetBucketLocationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLocation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLocation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLocation method directly
-// instead.
+// See GetBucketLocation for more information on using the GetBucketLocation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLocationRequest method.
// req, resp := client.GetBucketLocationRequest(params)
@@ -2029,19 +2003,18 @@ const opGetBucketLogging = "GetBucketLogging"
// GetBucketLoggingRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLogging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLogging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLogging method directly
-// instead.
+// See GetBucketLogging for more information on using the GetBucketLogging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLoggingRequest method.
// req, resp := client.GetBucketLoggingRequest(params)
@@ -2105,19 +2078,18 @@ const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
// GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketMetricsConfiguration method directly
-// instead.
+// See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketMetricsConfigurationRequest method.
// req, resp := client.GetBucketMetricsConfigurationRequest(params)
@@ -2181,19 +2153,18 @@ const opGetBucketNotification = "GetBucketNotification"
// GetBucketNotificationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketNotification operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketNotification for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketNotification method directly
-// instead.
+// See GetBucketNotification for more information on using the GetBucketNotification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketNotificationRequest method.
// req, resp := client.GetBucketNotificationRequest(params)
@@ -2259,19 +2230,18 @@ const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration
// GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketNotificationConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketNotificationConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketNotificationConfiguration method directly
-// instead.
+// See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketNotificationConfigurationRequest method.
// req, resp := client.GetBucketNotificationConfigurationRequest(params)
@@ -2334,19 +2304,18 @@ const opGetBucketPolicy = "GetBucketPolicy"
// GetBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketPolicy method directly
-// instead.
+// See GetBucketPolicy for more information on using the GetBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketPolicyRequest method.
// req, resp := client.GetBucketPolicyRequest(params)
@@ -2409,19 +2378,18 @@ const opGetBucketReplication = "GetBucketReplication"
// GetBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketReplication method directly
-// instead.
+// See GetBucketReplication for more information on using the GetBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketReplicationRequest method.
// req, resp := client.GetBucketReplicationRequest(params)
@@ -2484,19 +2452,18 @@ const opGetBucketRequestPayment = "GetBucketRequestPayment"
// GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketRequestPayment operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketRequestPayment for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketRequestPayment method directly
-// instead.
+// See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketRequestPaymentRequest method.
// req, resp := client.GetBucketRequestPaymentRequest(params)
@@ -2559,19 +2526,18 @@ const opGetBucketTagging = "GetBucketTagging"
// GetBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketTagging method directly
-// instead.
+// See GetBucketTagging for more information on using the GetBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketTaggingRequest method.
// req, resp := client.GetBucketTaggingRequest(params)
@@ -2634,19 +2600,18 @@ const opGetBucketVersioning = "GetBucketVersioning"
// GetBucketVersioningRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketVersioning operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketVersioning for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketVersioning method directly
-// instead.
+// See GetBucketVersioning for more information on using the GetBucketVersioning
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketVersioningRequest method.
// req, resp := client.GetBucketVersioningRequest(params)
@@ -2709,19 +2674,18 @@ const opGetBucketWebsite = "GetBucketWebsite"
// GetBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketWebsite method directly
-// instead.
+// See GetBucketWebsite for more information on using the GetBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketWebsiteRequest method.
// req, resp := client.GetBucketWebsiteRequest(params)
@@ -2784,19 +2748,18 @@ const opGetObject = "GetObject"
// GetObjectRequest generates a "aws/request.Request" representing the
// client's request for the GetObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObject method directly
-// instead.
+// See GetObject for more information on using the GetObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectRequest method.
// req, resp := client.GetObjectRequest(params)
@@ -2864,19 +2827,18 @@ const opGetObjectAcl = "GetObjectAcl"
// GetObjectAclRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectAcl method directly
-// instead.
+// See GetObjectAcl for more information on using the GetObjectAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectAclRequest method.
// req, resp := client.GetObjectAclRequest(params)
@@ -2944,19 +2906,18 @@ const opGetObjectTagging = "GetObjectTagging"
// GetObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectTagging method directly
-// instead.
+// See GetObjectTagging for more information on using the GetObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectTaggingRequest method.
// req, resp := client.GetObjectTaggingRequest(params)
@@ -3019,19 +2980,18 @@ const opGetObjectTorrent = "GetObjectTorrent"
// GetObjectTorrentRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectTorrent operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectTorrent for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectTorrent method directly
-// instead.
+// See GetObjectTorrent for more information on using the GetObjectTorrent
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectTorrentRequest method.
// req, resp := client.GetObjectTorrentRequest(params)
@@ -3094,19 +3054,18 @@ const opHeadBucket = "HeadBucket"
// HeadBucketRequest generates a "aws/request.Request" representing the
// client's request for the HeadBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See HeadBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the HeadBucket method directly
-// instead.
+// See HeadBucket for more information on using the HeadBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the HeadBucketRequest method.
// req, resp := client.HeadBucketRequest(params)
@@ -3177,19 +3136,18 @@ const opHeadObject = "HeadObject"
// HeadObjectRequest generates a "aws/request.Request" representing the
// client's request for the HeadObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See HeadObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the HeadObject method directly
-// instead.
+// See HeadObject for more information on using the HeadObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the HeadObjectRequest method.
// req, resp := client.HeadObjectRequest(params)
@@ -3257,19 +3215,18 @@ const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
// ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketAnalyticsConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketAnalyticsConfigurations method directly
-// instead.
+// See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
// req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
@@ -3332,19 +3289,18 @@ const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
// ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketInventoryConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketInventoryConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketInventoryConfigurations method directly
-// instead.
+// See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
// req, resp := client.ListBucketInventoryConfigurationsRequest(params)
@@ -3407,19 +3363,18 @@ const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
// ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketMetricsConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketMetricsConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketMetricsConfigurations method directly
-// instead.
+// See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
// req, resp := client.ListBucketMetricsConfigurationsRequest(params)
@@ -3482,19 +3437,18 @@ const opListBuckets = "ListBuckets"
// ListBucketsRequest generates a "aws/request.Request" representing the
// client's request for the ListBuckets operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBuckets for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBuckets method directly
-// instead.
+// See ListBuckets for more information on using the ListBuckets
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketsRequest method.
// req, resp := client.ListBucketsRequest(params)
@@ -3557,19 +3511,18 @@ const opListMultipartUploads = "ListMultipartUploads"
// ListMultipartUploadsRequest generates a "aws/request.Request" representing the
// client's request for the ListMultipartUploads operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListMultipartUploads for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListMultipartUploads method directly
-// instead.
+// See ListMultipartUploads for more information on using the ListMultipartUploads
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListMultipartUploadsRequest method.
// req, resp := client.ListMultipartUploadsRequest(params)
@@ -3688,19 +3641,18 @@ const opListObjectVersions = "ListObjectVersions"
// ListObjectVersionsRequest generates a "aws/request.Request" representing the
// client's request for the ListObjectVersions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjectVersions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjectVersions method directly
-// instead.
+// See ListObjectVersions for more information on using the ListObjectVersions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectVersionsRequest method.
// req, resp := client.ListObjectVersionsRequest(params)
@@ -3819,19 +3771,18 @@ const opListObjects = "ListObjects"
// ListObjectsRequest generates a "aws/request.Request" representing the
// client's request for the ListObjects operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjects for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjects method directly
-// instead.
+// See ListObjects for more information on using the ListObjects
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectsRequest method.
// req, resp := client.ListObjectsRequest(params)
@@ -3957,19 +3908,18 @@ const opListObjectsV2 = "ListObjectsV2"
// ListObjectsV2Request generates a "aws/request.Request" representing the
// client's request for the ListObjectsV2 operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjectsV2 for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjectsV2 method directly
-// instead.
+// See ListObjectsV2 for more information on using the ListObjectsV2
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectsV2Request method.
// req, resp := client.ListObjectsV2Request(params)
@@ -4096,19 +4046,18 @@ const opListParts = "ListParts"
// ListPartsRequest generates a "aws/request.Request" representing the
// client's request for the ListParts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListParts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListParts method directly
-// instead.
+// See ListParts for more information on using the ListParts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListPartsRequest method.
// req, resp := client.ListPartsRequest(params)
@@ -4227,19 +4176,18 @@ const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
// PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAccelerateConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAccelerateConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAccelerateConfiguration method directly
-// instead.
+// See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
// req, resp := client.PutBucketAccelerateConfigurationRequest(params)
@@ -4304,19 +4252,18 @@ const opPutBucketAcl = "PutBucketAcl"
// PutBucketAclRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAcl method directly
-// instead.
+// See PutBucketAcl for more information on using the PutBucketAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAclRequest method.
// req, resp := client.PutBucketAclRequest(params)
@@ -4381,19 +4328,18 @@ const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
// PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAnalyticsConfiguration method directly
-// instead.
+// See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
// req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
@@ -4459,19 +4405,18 @@ const opPutBucketCors = "PutBucketCors"
// PutBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketCors method directly
-// instead.
+// See PutBucketCors for more information on using the PutBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketCorsRequest method.
// req, resp := client.PutBucketCorsRequest(params)
@@ -4536,19 +4481,18 @@ const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
// PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketInventoryConfiguration method directly
-// instead.
+// See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketInventoryConfigurationRequest method.
// req, resp := client.PutBucketInventoryConfigurationRequest(params)
@@ -4614,19 +4558,18 @@ const opPutBucketLifecycle = "PutBucketLifecycle"
// PutBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLifecycle method directly
-// instead.
+// See PutBucketLifecycle for more information on using the PutBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLifecycleRequest method.
// req, resp := client.PutBucketLifecycleRequest(params)
@@ -4694,19 +4637,18 @@ const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
// PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLifecycleConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLifecycleConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLifecycleConfiguration method directly
-// instead.
+// See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
// req, resp := client.PutBucketLifecycleConfigurationRequest(params)
@@ -4772,19 +4714,18 @@ const opPutBucketLogging = "PutBucketLogging"
// PutBucketLoggingRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLogging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLogging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLogging method directly
-// instead.
+// See PutBucketLogging for more information on using the PutBucketLogging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLoggingRequest method.
// req, resp := client.PutBucketLoggingRequest(params)
@@ -4851,19 +4792,18 @@ const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
// PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketMetricsConfiguration method directly
-// instead.
+// See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketMetricsConfigurationRequest method.
// req, resp := client.PutBucketMetricsConfigurationRequest(params)
@@ -4929,19 +4869,18 @@ const opPutBucketNotification = "PutBucketNotification"
// PutBucketNotificationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketNotification operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketNotification for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketNotification method directly
-// instead.
+// See PutBucketNotification for more information on using the PutBucketNotification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketNotificationRequest method.
// req, resp := client.PutBucketNotificationRequest(params)
@@ -5009,19 +4948,18 @@ const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration
// PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketNotificationConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketNotificationConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketNotificationConfiguration method directly
-// instead.
+// See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketNotificationConfigurationRequest method.
// req, resp := client.PutBucketNotificationConfigurationRequest(params)
@@ -5086,19 +5024,18 @@ const opPutBucketPolicy = "PutBucketPolicy"
// PutBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketPolicy method directly
-// instead.
+// See PutBucketPolicy for more information on using the PutBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketPolicyRequest method.
// req, resp := client.PutBucketPolicyRequest(params)
@@ -5164,19 +5101,18 @@ const opPutBucketReplication = "PutBucketReplication"
// PutBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketReplication method directly
-// instead.
+// See PutBucketReplication for more information on using the PutBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketReplicationRequest method.
// req, resp := client.PutBucketReplicationRequest(params)
@@ -5242,19 +5178,18 @@ const opPutBucketRequestPayment = "PutBucketRequestPayment"
// PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketRequestPayment operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketRequestPayment for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketRequestPayment method directly
-// instead.
+// See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketRequestPaymentRequest method.
// req, resp := client.PutBucketRequestPaymentRequest(params)
@@ -5323,19 +5258,18 @@ const opPutBucketTagging = "PutBucketTagging"
// PutBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketTagging method directly
-// instead.
+// See PutBucketTagging for more information on using the PutBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketTaggingRequest method.
// req, resp := client.PutBucketTaggingRequest(params)
@@ -5400,19 +5334,18 @@ const opPutBucketVersioning = "PutBucketVersioning"
// PutBucketVersioningRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketVersioning operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketVersioning for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketVersioning method directly
-// instead.
+// See PutBucketVersioning for more information on using the PutBucketVersioning
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketVersioningRequest method.
// req, resp := client.PutBucketVersioningRequest(params)
@@ -5478,19 +5411,18 @@ const opPutBucketWebsite = "PutBucketWebsite"
// PutBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketWebsite method directly
-// instead.
+// See PutBucketWebsite for more information on using the PutBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketWebsiteRequest method.
// req, resp := client.PutBucketWebsiteRequest(params)
@@ -5555,19 +5487,18 @@ const opPutObject = "PutObject"
// PutObjectRequest generates a "aws/request.Request" representing the
// client's request for the PutObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObject method directly
-// instead.
+// See PutObject for more information on using the PutObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectRequest method.
// req, resp := client.PutObjectRequest(params)
@@ -5630,19 +5561,18 @@ const opPutObjectAcl = "PutObjectAcl"
// PutObjectAclRequest generates a "aws/request.Request" representing the
// client's request for the PutObjectAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObjectAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObjectAcl method directly
-// instead.
+// See PutObjectAcl for more information on using the PutObjectAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectAclRequest method.
// req, resp := client.PutObjectAclRequest(params)
@@ -5711,19 +5641,18 @@ const opPutObjectTagging = "PutObjectTagging"
// PutObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the PutObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObjectTagging method directly
-// instead.
+// See PutObjectTagging for more information on using the PutObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectTaggingRequest method.
// req, resp := client.PutObjectTaggingRequest(params)
@@ -5786,19 +5715,18 @@ const opRestoreObject = "RestoreObject"
// RestoreObjectRequest generates a "aws/request.Request" representing the
// client's request for the RestoreObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RestoreObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RestoreObject method directly
-// instead.
+// See RestoreObject for more information on using the RestoreObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RestoreObjectRequest method.
// req, resp := client.RestoreObjectRequest(params)
@@ -5866,19 +5794,18 @@ const opUploadPart = "UploadPart"
// UploadPartRequest generates a "aws/request.Request" representing the
// client's request for the UploadPart operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UploadPart for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UploadPart method directly
-// instead.
+// See UploadPart for more information on using the UploadPart
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UploadPartRequest method.
// req, resp := client.UploadPartRequest(params)
@@ -5947,19 +5874,18 @@ const opUploadPartCopy = "UploadPartCopy"
// UploadPartCopyRequest generates a "aws/request.Request" representing the
// client's request for the UploadPartCopy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UploadPartCopy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UploadPartCopy method directly
-// instead.
+// See UploadPartCopy for more information on using the UploadPartCopy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UploadPartCopyRequest method.
// req, resp := client.UploadPartCopyRequest(params)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
index f045fd0db..30068d159 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
@@ -10,69 +10,17 @@
//
// Using the Client
//
-// To use the client for Amazon Simple Storage Service you will first need
-// to create a new instance of it.
+// To Amazon Simple Storage Service with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := s3.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
+// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
-// See aws package's Config type for more information on configuration options.
+// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon Simple Storage Service client S3 for more
-// information on creating the service's client.
+// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New
-//
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.AbortMultipartUpload(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("AbortMultipartUpload result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.AbortMultipartUploadWithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
index 8c1e33437..34e71df0f 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
@@ -21,7 +21,7 @@ import (
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the the SDK's request pipeline.
+// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // Amazon Simple Storage Service.
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
index cccfa8c2b..2596c694b 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
@@ -11,7 +11,7 @@ import (
// WaitUntilBucketExists uses the Amazon S3 API operation
// HeadBucket to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input)
@@ -72,7 +72,7 @@ func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucket
// WaitUntilBucketNotExists uses the Amazon S3 API operation
// HeadBucket to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error {
return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input)
@@ -118,7 +118,7 @@ func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBuc
// WaitUntilObjectExists uses the Amazon S3 API operation
// HeadObject to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error {
return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input)
@@ -169,7 +169,7 @@ func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObject
// WaitUntilObjectNotExists uses the Amazon S3 API operation
// HeadObject to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error {
return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
index e5c105fed..3b8be4378 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
@@ -14,19 +14,18 @@ const opAssumeRole = "AssumeRole"
// AssumeRoleRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRole operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRole for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRole method directly
-// instead.
+// See AssumeRole for more information on using the AssumeRole
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleRequest method.
// req, resp := client.AssumeRoleRequest(params)
@@ -195,19 +194,18 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML"
// AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRoleWithSAML operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRoleWithSAML for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRoleWithSAML method directly
-// instead.
+// See AssumeRoleWithSAML for more information on using the AssumeRoleWithSAML
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleWithSAMLRequest method.
// req, resp := client.AssumeRoleWithSAMLRequest(params)
@@ -369,19 +367,18 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
// AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRoleWithWebIdentity operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRoleWithWebIdentity for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRoleWithWebIdentity method directly
-// instead.
+// See AssumeRoleWithWebIdentity for more information on using the AssumeRoleWithWebIdentity
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleWithWebIdentityRequest method.
// req, resp := client.AssumeRoleWithWebIdentityRequest(params)
@@ -572,19 +569,18 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
// DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the
// client's request for the DecodeAuthorizationMessage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DecodeAuthorizationMessage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DecodeAuthorizationMessage method directly
-// instead.
+// See DecodeAuthorizationMessage for more information on using the DecodeAuthorizationMessage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DecodeAuthorizationMessageRequest method.
// req, resp := client.DecodeAuthorizationMessageRequest(params)
@@ -685,19 +681,18 @@ const opGetCallerIdentity = "GetCallerIdentity"
// GetCallerIdentityRequest generates a "aws/request.Request" representing the
// client's request for the GetCallerIdentity operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetCallerIdentity for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetCallerIdentity method directly
-// instead.
+// See GetCallerIdentity for more information on using the GetCallerIdentity
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetCallerIdentityRequest method.
// req, resp := client.GetCallerIdentityRequest(params)
@@ -761,19 +756,18 @@ const opGetFederationToken = "GetFederationToken"
// GetFederationTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetFederationToken operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetFederationToken for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetFederationToken method directly
-// instead.
+// See GetFederationToken for more information on using the GetFederationToken
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetFederationTokenRequest method.
// req, resp := client.GetFederationTokenRequest(params)
@@ -931,19 +925,18 @@ const opGetSessionToken = "GetSessionToken"
// GetSessionTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetSessionToken operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetSessionToken for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetSessionToken method directly
-// instead.
+// See GetSessionToken for more information on using the GetSessionToken
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetSessionTokenRequest method.
// req, resp := client.GetSessionTokenRequest(params)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
index d2af518cf..a43fa8055 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
@@ -56,69 +56,17 @@
//
// Using the Client
//
-// To use the client for AWS Security Token Service you will first need
-// to create a new instance of it.
+// To AWS Security Token Service with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := sts.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
+// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
-// See aws package's Config type for more information on configuration options.
+// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS Security Token Service client STS for more
-// information on creating the service's client.
+// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New
-//
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.AssumeRole(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("AssumeRole result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.AssumeRoleWithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package sts
diff --git a/vendor/vendor.json b/vendor/vendor.json
index f44e0645c..5836301f7 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -146,244 +146,244 @@
"revision": "4239b77079c7b5d1243b7b4736304ce8ddb6f0f2"
},
{
- "checksumSHA1": "iaZ47V/I1vENvGiQOJa3tnl3KvI=",
+ "checksumSHA1": "7vSTKBRZq6azJnhm1k6XmNxu97M=",
"path": "github.com/aws/aws-sdk-go",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "U/rOAHRye5xCbfe0DfXPFHrIXHs=",
+ "checksumSHA1": "BRgDFkYJonSbN+/ugKMUuSXkS4c=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/awserr",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/awsutil",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "n98FANpNeRT5kf6pizdpI7nm6Sw=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/client",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/client/metadata",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "7/8j/q0TWtOgXyvEcv4B2Dhl00o=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/corehandlers",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "Y+cPwQL0dZMyqp3wI+KJWmA9KQ8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "JEYqmF83O5n5bHkupAzA6STm0no=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "ZdtYh3ZHSgP/WEIaqwJHTEhpkbs=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/defaults",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "/EXbk/z2TWjWc1Hvb4QYs3Wmhb8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/ec2metadata",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "vUT1+nhQHFsMQ9AQtF+3jbEOmjM=",
+ "checksumSHA1": "W45tSKW4ZVgBk9H4lx5RbGi9OVg=",
"path": "github.com/aws/aws-sdk-go/aws/endpoints",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "P6f+a0npro0KI5CESeKTWhRtBuE=",
+ "checksumSHA1": "Rdm9v0vpqsO1Ka9rwktfL19D8A8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/request",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "Y20DEtMtbfE9qTtmoi2NYV1x7aA=",
+ "checksumSHA1": "SK5Mn4Ga9+equOQTYA1DTSb3LWY=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/session",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "M11PbBLBimxBByeaakhFkhp7t7s=",
+ "checksumSHA1": "1+ZxEwzc1Vz8X2l+kXkS2iATtas=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/aws/signer/v4",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "04ypv4x12l4q0TksA1zEVsmgpvw=",
"path": "github.com/aws/aws-sdk-go/internal/shareddefaults",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "wk7EyvDaHwb5qqoOP/4d3cV0708=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "1QmQ3FqV37w0Zi44qv8pA1GeR0A=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/ec2query",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "O6hcK24yI6w7FA+g4Pbr+eQ7pys=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "R00RL5jJXRYq1iiK1+PGvMfvXyM=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "ZqY5RWavBLWTo6j9xqdyBEaNFRk=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/query",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "Drt1JfLMa0DQEZLWrnMlTWaIcC8=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "VCTh+dEaqqhog5ncy/WTt9+/gFM=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/restxml",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "0qYPUga28aQVkxZgBR3Z86AbGUQ=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "Eo9yODN5U99BK0pMzoqnBm7PCrY=",
@@ -391,62 +391,62 @@
"path": "github.com/aws/aws-sdk-go/private/waiter",
"revision": "1bd588c8b2dba4da57dd4664b2b2750d260a5915",
"revisionTime": "2017-02-24T22:28:38Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "rvrD573aOLM1/jTHHqjbA/w/Kc8=",
+ "checksumSHA1": "1mbCBXbu6m8bfRAq1+7Cul4VXkU=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/ec2",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "Lwqoi9aWc+j6dzkgt06LLR7i1XA=",
+ "checksumSHA1": "YNq7YhasHn9ceelWX2aG0Cg0Ga0=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/ecr",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "2ow2XQ9RCOgOwyJKHt7bibwWv8M=",
+ "checksumSHA1": "SEKg+cGyOj6dKdK5ltUHsoL4R4Y=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "4b8bqkOCj9omK0Pm0UXVLGg+yRQ=",
+ "checksumSHA1": "RVrBBPDYg3ViwQDLBanFehkdqkM=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3/s3iface",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "LlIpD3fzngPXshFh/5tuCWlrYzI=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/s3/s3manager",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
- "checksumSHA1": "VH5y62f+SDyEIqnTibiPtQ687i8=",
+ "checksumSHA1": "MerduaV3PxtZAWvOGpgoBIglo38=",
"comment": "v1.7.1",
"path": "github.com/aws/aws-sdk-go/service/sts",
- "revision": "afd601335e2a72d43caa3af6bd2abe512fcc3bfd",
- "revisionTime": "2017-07-20T23:32:15Z",
- "version": "v1.10.14",
- "versionExact": "v1.10.14"
+ "revision": "dd3acff9dc16f9a6fd87f6b4501590a532e7206a",
+ "revisionTime": "2017-08-10T20:40:06Z",
+ "version": "v1.10.23",
+ "versionExact": "v1.10.23"
},
{
"checksumSHA1": "7SbTaY0kaYxgQrG3/9cjrI+BcyU=",
From 8be7b880a52dff722df03a739ceeb874cb7fd99c Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 11 Aug 2017 14:35:14 -0700
Subject: [PATCH 083/122] update changelog in preparation for v1.0.4
---
CHANGELOG.md | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a6e2e40fa..8e7212019 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,22 +1,30 @@
-## UNRELEASED
+## 1.0.4 (August 11, 2017)
### IMPROVEMENTS:
* builder/alicloud: Increase polling timeout. [GH-5148]
+* builder/azure: Add `private_virtual_network_with_public_ip` option to
+ optionally obtain a public IP. [GH-5222]
+* builder/googlecompute: use a more portable method of obtaining zone.
+ [GH-5192]
+* builder/hyperv: Properly interpolate user variables in template. [GH-5184]
* builder/parallels: Remove soon to be removed --vmtype flag in createvm.
[GH-5172]
* contrib: add json files to zsh completion. [GH-5195]
-* builder/hyperv: Properly interpolate user variables in template. [GH-5184]
### BUG FIXES:
+
+* builder/amazon: Don't delete snapshots we didn't create. [GH-5211]
* builder/amazon: fix builds when using the null communicator. [GH-5217]
+* builder/docker: Correctly handle case when uploading an empty directory.
+ [GH-5234]
+* command/push: Don't push variables if they are unspecified. Reverts to
+ behavior in 1.0.1. [GH-5235]
+* command/push: fix handling of symlinks. [GH-5226]
* core: Strip query parameters from ISO URLs when checking against a checksum
file. [GH-5181]
-* command/push: fix handling of symlinks. [GH-5226]
-* builder/amazon: Don't delete snapshots we didn't create. [GH-5211]
-* builder/docker: Correctly handle case when uploading an empty directory. [GH-5234]
-* command/push: Don't push variables if they are unspecified. Reverts to
- behavior in 1.0.1. [GH-5235]
+* provisioner/ansible-remote: Fix issue where packer could hang communicating
+ with ansible-remote. [GH-5146]
## 1.0.3 (July 17, 2017)
From 1dd4ecb8fc3aeaf02c93dc52aa487cac53b12a9b Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 11 Aug 2017 14:35:47 -0700
Subject: [PATCH 084/122] prepare for v1.0.4
---
version/version.go | 2 +-
website/config.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/version/version.go b/version/version.go
index 83d206c8b..6c7fbfc69 100644
--- a/version/version.go
+++ b/version/version.go
@@ -14,7 +14,7 @@ const Version = "1.0.4"
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc.
-const VersionPrerelease = "dev"
+const VersionPrerelease = ""
func FormattedVersion() string {
var versionString bytes.Buffer
diff --git a/website/config.rb b/website/config.rb
index 482309b3b..1b3a07ff6 100644
--- a/website/config.rb
+++ b/website/config.rb
@@ -2,7 +2,7 @@ set :base_url, "https://www.packer.io/"
activate :hashicorp do |h|
h.name = "packer"
- h.version = "1.0.3"
+ h.version = "1.0.4"
h.github_slug = "hashicorp/packer"
h.website_root = "website"
end
From 4c3e6f36bad3d096ca649e2cfd23ab70bb2d6383 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 11 Aug 2017 14:40:32 -0700
Subject: [PATCH 085/122] Cut version 1.0.4
From 850ae8ac6592f00e6a6eec305dab3f71e2915672 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 11 Aug 2017 14:46:28 -0700
Subject: [PATCH 086/122] prepare for next release
---
CHANGELOG.md | 2 ++
version/version.go | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e7212019..c2476a9f7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,5 @@
+## UNRELEASED
+
## 1.0.4 (August 11, 2017)
### IMPROVEMENTS:
diff --git a/version/version.go b/version/version.go
index 6c7fbfc69..cae0ca8b1 100644
--- a/version/version.go
+++ b/version/version.go
@@ -9,12 +9,12 @@ import (
var GitCommit string
// The main version number that is being run at the moment.
-const Version = "1.0.4"
+const Version = "1.1.0"
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc.
-const VersionPrerelease = ""
+const VersionPrerelease = "dev"
func FormattedVersion() string {
var versionString bytes.Buffer
From 7192c46e46b2f0c1b30a7ab2092440f677ef69bf Mon Sep 17 00:00:00 2001
From: Brett Russ
Date: Fri, 11 Aug 2017 21:26:16 -0400
Subject: [PATCH 087/122] sudo prefix the command which cleans up
`/srv/{salt,pillar}` as these are created with sudo in the packer driven salt
bootstrapper
---
provisioner/salt-masterless/provisioner.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go
index b2eefd0ea..5c67feb07 100644
--- a/provisioner/salt-masterless/provisioner.go
+++ b/provisioner/salt-masterless/provisioner.go
@@ -384,7 +384,7 @@ func (p *Provisioner) createDir(ui packer.Ui, comm packer.Communicator, dir stri
func (p *Provisioner) removeDir(ui packer.Ui, comm packer.Communicator, dir string) error {
ui.Message(fmt.Sprintf("Removing directory: %s", dir))
cmd := &packer.RemoteCmd{
- Command: fmt.Sprintf("rm -rf '%s'", dir),
+ Command: fmt.Sprintf(p.sudo("rm -rf '%s'"), dir),
}
if err := cmd.StartWithUi(comm, ui); err != nil {
return err
From 43c19b49e077487b3c1762fa15302af531e280b3 Mon Sep 17 00:00:00 2001
From: Matthew Hooker
Date: Fri, 11 Aug 2017 19:03:24 -0700
Subject: [PATCH 088/122] update changelog
---
CHANGELOG.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c2476a9f7..61bb406bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
## UNRELEASED
+### IMPROVEMENTS:
+
+* provisioner/salt-masterless: Also use sudo to clean up if we used sudo to install. [GH-5240]
+
+
## 1.0.4 (August 11, 2017)
### IMPROVEMENTS:
From 07f7183b648790edfca6391bdb91e0c04b3ab9d2 Mon Sep 17 00:00:00 2001
From: Sergei A Mamonov
Date: Mon, 17 Jul 2017 19:08:33 +0300
Subject: [PATCH 089/122] Add docker container dir to template
---
builder/docker/config.go | 29 ++++++++++++++++-----------
builder/docker/step_connect_docker.go | 2 +-
builder/docker/step_run.go | 2 +-
3 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/builder/docker/config.go b/builder/docker/config.go
index 7ba1f4587..3f8f4d427 100644
--- a/builder/docker/config.go
+++ b/builder/docker/config.go
@@ -23,18 +23,19 @@ type Config struct {
common.PackerConfig `mapstructure:",squash"`
Comm communicator.Config `mapstructure:",squash"`
- Commit bool
- Discard bool
- ExportPath string `mapstructure:"export_path"`
- Image string
- Pty bool
- Pull bool
- RunCommand []string `mapstructure:"run_command"`
- Volumes map[string]string
- Privileged bool `mapstructure:"privileged"`
- Author string
- Changes []string
- Message string
+ Commit bool
+ Discard bool
+ ExportPath string `mapstructure:"export_path"`
+ Image string
+ Pty bool
+ Pull bool
+ RunCommand []string `mapstructure:"run_command"`
+ Volumes map[string]string
+ Privileged bool `mapstructure:"privileged"`
+ Author string
+ Changes []string
+ Message string
+ ContainerDir string `mapstructure:"container_dir"`
// This is used to login to dockerhub to pull a private base container. For
// pushing to dockerhub, see the docker post-processors
@@ -112,6 +113,10 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
}
+ if c.ContainerDir == "" {
+ c.ContainerDir = "/packer-files"
+ }
+
if c.EcrLogin && c.LoginServer == "" {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("ECR login requires login server to be provided."))
}
diff --git a/builder/docker/step_connect_docker.go b/builder/docker/step_connect_docker.go
index f84d369c2..7acde2ff0 100644
--- a/builder/docker/step_connect_docker.go
+++ b/builder/docker/step_connect_docker.go
@@ -24,7 +24,7 @@ func (s *StepConnectDocker) Run(state multistep.StateBag) multistep.StepAction {
comm := &Communicator{
ContainerId: containerId,
HostDir: tempDir,
- ContainerDir: "/packer-files",
+ ContainerDir: config.ContainerDir,
Version: version,
Config: config,
}
diff --git a/builder/docker/step_run.go b/builder/docker/step_run.go
index 92803f932..5a56d8d7d 100644
--- a/builder/docker/step_run.go
+++ b/builder/docker/step_run.go
@@ -26,7 +26,7 @@ func (s *StepRun) Run(state multistep.StateBag) multistep.StepAction {
for host, container := range config.Volumes {
runConfig.Volumes[host] = container
}
- runConfig.Volumes[tempDir] = "/packer-files"
+ runConfig.Volumes[tempDir] = config.ContainerDir
ui.Say("Starting docker container...")
containerId, err := driver.StartContainer(&runConfig)
From 0b4e8474e2692f84bab469f20c61599ecfe586b8 Mon Sep 17 00:00:00 2001
From: Sergei A Mamonov
Date: Mon, 17 Jul 2017 22:38:03 +0300
Subject: [PATCH 090/122] Add docker container_dir to docs
---
website/source/docs/builders/docker.html.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/website/source/docs/builders/docker.html.md b/website/source/docs/builders/docker.html.md
index c82765406..7fab6d09b 100644
--- a/website/source/docs/builders/docker.html.md
+++ b/website/source/docs/builders/docker.html.md
@@ -204,6 +204,10 @@ You must specify (only) one of `commit`, `discard`, or `export_path`.
mount into this container. The key of the object is the host path, the value
is the container path.
+- `container_dir` (string) - The directory inside container to mount
+ temp directory from host server for work [file provisioner](/docs/provisioners/file.html).
+ By default this is set to `/packer-files`.
+
## Using the Artifact: Export
Once the tar artifact has been generated, you will likely want to import, tag,
From cd84b1792335868b2f333d670861665c1b0440b7 Mon Sep 17 00:00:00 2001
From: Sean Chittenden
Date: Fri, 11 Aug 2017 15:13:55 -0700
Subject: [PATCH 091/122] Fix building packer on GOOS=solaris
Update to golang/x/sys/unix is coming in the subsequent commit.
---
builder/amazon/chroot/lockfile_unix.go | 7 ++++---
packer/config_file_unix.go | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/builder/amazon/chroot/lockfile_unix.go b/builder/amazon/chroot/lockfile_unix.go
index 43e92af21..0d0f8c8f7 100644
--- a/builder/amazon/chroot/lockfile_unix.go
+++ b/builder/amazon/chroot/lockfile_unix.go
@@ -4,7 +4,8 @@ package chroot
import (
"os"
- "syscall"
+
+ "golang.org/x/sys/unix"
)
// See: http://linux.die.net/include/sys/file.h
@@ -13,7 +14,7 @@ const LOCK_NB = 4
const LOCK_UN = 8
func lockFile(f *os.File) error {
- err := syscall.Flock(int(f.Fd()), LOCK_EX)
+ err := unix.Flock(int(f.Fd()), LOCK_EX)
if err != nil {
return err
}
@@ -22,5 +23,5 @@ func lockFile(f *os.File) error {
}
func unlockFile(f *os.File) error {
- return syscall.Flock(int(f.Fd()), LOCK_UN)
+ return unix.Flock(int(f.Fd()), LOCK_UN)
}
diff --git a/packer/config_file_unix.go b/packer/config_file_unix.go
index 82260c2a2..512ac42ed 100644
--- a/packer/config_file_unix.go
+++ b/packer/config_file_unix.go
@@ -1,4 +1,4 @@
-// +build darwin freebsd linux netbsd openbsd
+// +build darwin freebsd linux netbsd openbsd solaris
package packer
From 2393d94beb6026593b6e8cddafd3ca5eecc3a632 Mon Sep 17 00:00:00 2001
From: Sean Chittenden
Date: Mon, 14 Aug 2017 11:09:22 -0700
Subject: [PATCH 092/122] Update golang/x/sys/unix to `master`
`master` contains the necessary fixes required to support `flock(3C)`
on `GOOS=solaris`.
---
vendor/golang.org/x/sys/unix/README.md | 173 +
vendor/golang.org/x/sys/unix/asm.s | 10 -
...sm_dragonfly_386.s => asm_linux_mips64x.s} | 17 +-
.../golang.org/x/sys/unix/asm_linux_mipsx.s | 31 +
.../golang.org/x/sys/unix/asm_linux_s390x.s | 28 +
.../golang.org/x/sys/unix/asm_openbsd_arm.s | 29 +
.../golang.org/x/sys/unix/asm_solaris_amd64.s | 4 +-
.../golang.org/x/sys/unix/bluetooth_linux.go | 35 +
vendor/golang.org/x/sys/unix/cap_freebsd.go | 195 +
vendor/golang.org/x/sys/unix/dev_linux.go | 42 +
vendor/golang.org/x/sys/unix/dirent.go | 102 +
vendor/golang.org/x/sys/unix/endian_big.go | 9 +
vendor/golang.org/x/sys/unix/endian_little.go | 9 +
.../x/sys/unix/errors_freebsd_386.go | 227 ++
.../x/sys/unix/errors_freebsd_amd64.go | 227 ++
.../x/sys/unix/errors_freebsd_arm.go | 226 ++
vendor/golang.org/x/sys/unix/file_unix.go | 27 +
vendor/golang.org/x/sys/unix/flock.go | 2 -
.../x/sys/unix/flock_linux_32bit.go | 2 +-
.../x/sys/unix/gccgo_linux_sparc64.go | 20 +
vendor/golang.org/x/sys/unix/mkall.sh | 139 +-
vendor/golang.org/x/sys/unix/mkerrors.sh | 97 +-
vendor/golang.org/x/sys/unix/mksyscall.pl | 33 +-
.../x/sys/unix/mksyscall_solaris.pl | 25 +-
.../golang.org/x/sys/unix/mksysnum_darwin.pl | 2 +-
.../x/sys/unix/mksysnum_dragonfly.pl | 2 +-
.../golang.org/x/sys/unix/mksysnum_freebsd.pl | 15 +-
.../golang.org/x/sys/unix/mksysnum_linux.pl | 58 -
.../golang.org/x/sys/unix/mksysnum_netbsd.pl | 2 +-
.../golang.org/x/sys/unix/mksysnum_openbsd.pl | 2 +-
.../golang.org/x/sys/unix/openbsd_pledge.go | 38 +
vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 11 +-
vendor/golang.org/x/sys/unix/syscall.go | 7 +-
vendor/golang.org/x/sys/unix/syscall_bsd.go | 18 +-
.../golang.org/x/sys/unix/syscall_darwin.go | 87 +-
.../x/sys/unix/syscall_darwin_386.go | 2 -
.../x/sys/unix/syscall_darwin_amd64.go | 4 -
.../x/sys/unix/syscall_darwin_arm.go | 2 -
.../x/sys/unix/syscall_darwin_arm64.go | 2 -
.../x/sys/unix/syscall_dragonfly.go | 64 +-
.../x/sys/unix/syscall_dragonfly_amd64.go | 2 -
.../golang.org/x/sys/unix/syscall_freebsd.go | 88 +-
.../x/sys/unix/syscall_freebsd_386.go | 2 -
.../x/sys/unix/syscall_freebsd_amd64.go | 2 -
.../x/sys/unix/syscall_freebsd_arm.go | 2 -
vendor/golang.org/x/sys/unix/syscall_linux.go | 498 ++-
.../x/sys/unix/syscall_linux_386.go | 15 +-
.../x/sys/unix/syscall_linux_amd64.go | 20 +-
.../x/sys/unix/syscall_linux_amd64_gc.go | 13 +
.../x/sys/unix/syscall_linux_arm.go | 34 +-
.../x/sys/unix/syscall_linux_arm64.go | 50 +-
.../x/sys/unix/syscall_linux_mips64x.go | 209 +
.../x/sys/unix/syscall_linux_mipsx.go | 239 ++
.../x/sys/unix/syscall_linux_ppc64x.go | 43 +-
.../x/sys/unix/syscall_linux_s390x.go | 328 ++
.../x/sys/unix/syscall_linux_sparc64.go | 169 +
.../golang.org/x/sys/unix/syscall_netbsd.go | 36 +-
.../x/sys/unix/syscall_netbsd_386.go | 2 -
.../x/sys/unix/syscall_netbsd_amd64.go | 2 -
.../x/sys/unix/syscall_netbsd_arm.go | 2 -
.../golang.org/x/sys/unix/syscall_openbsd.go | 36 +-
.../x/sys/unix/syscall_openbsd_386.go | 2 -
.../x/sys/unix/syscall_openbsd_amd64.go | 2 -
...ragonfly_386.go => syscall_openbsd_arm.go} | 31 +-
.../golang.org/x/sys/unix/syscall_solaris.go | 129 +-
.../x/sys/unix/syscall_solaris_amd64.go | 2 -
vendor/golang.org/x/sys/unix/syscall_unix.go | 6 +-
.../golang.org/x/sys/unix/syscall_unix_gc.go | 15 +
vendor/golang.org/x/sys/unix/types_darwin.go | 250 --
.../golang.org/x/sys/unix/types_dragonfly.go | 242 --
vendor/golang.org/x/sys/unix/types_freebsd.go | 353 --
vendor/golang.org/x/sys/unix/types_linux.go | 406 --
vendor/golang.org/x/sys/unix/types_netbsd.go | 232 --
vendor/golang.org/x/sys/unix/types_openbsd.go | 244 --
vendor/golang.org/x/sys/unix/types_solaris.go | 260 --
.../x/sys/unix/zerrors_darwin_386.go | 103 +-
.../x/sys/unix/zerrors_darwin_amd64.go | 103 +-
.../x/sys/unix/zerrors_darwin_arm.go | 392 +-
.../x/sys/unix/zerrors_darwin_arm64.go | 103 +-
.../x/sys/unix/zerrors_dragonfly_amd64.go | 56 +-
.../x/sys/unix/zerrors_freebsd_386.go | 2865 +++++++-------
.../x/sys/unix/zerrors_freebsd_amd64.go | 2871 +++++++-------
.../x/sys/unix/zerrors_freebsd_arm.go | 2860 +++++++-------
.../x/sys/unix/zerrors_linux_386.go | 3285 +++++++++-------
.../x/sys/unix/zerrors_linux_amd64.go | 3287 +++++++++-------
.../x/sys/unix/zerrors_linux_arm.go | 3215 ++++++++-------
.../x/sys/unix/zerrors_linux_arm64.go | 3350 ++++++++--------
.../x/sys/unix/zerrors_linux_mips.go | 2189 +++++++++++
.../x/sys/unix/zerrors_linux_mips64.go | 2189 +++++++++++
.../x/sys/unix/zerrors_linux_mips64le.go | 2189 +++++++++++
.../x/sys/unix/zerrors_linux_mipsle.go | 2189 +++++++++++
.../x/sys/unix/zerrors_linux_ppc64.go | 3494 +++++++++--------
.../x/sys/unix/zerrors_linux_ppc64le.go | 3493 ++++++++--------
.../x/sys/unix/zerrors_linux_s390x.go | 2242 +++++++++++
.../x/sys/unix/zerrors_linux_sparc64.go | 2142 ++++++++++
...ragonfly_386.go => zerrors_openbsd_arm.go} | 1002 ++---
.../x/sys/unix/zerrors_solaris_amd64.go | 49 +-
.../x/sys/unix/zsyscall_darwin_386.go | 237 +-
.../x/sys/unix/zsyscall_darwin_amd64.go | 253 +-
.../x/sys/unix/zsyscall_darwin_arm.go | 237 +-
.../x/sys/unix/zsyscall_darwin_arm64.go | 221 +-
.../x/sys/unix/zsyscall_dragonfly_amd64.go | 47 +-
.../x/sys/unix/zsyscall_freebsd_386.go | 266 +-
.../x/sys/unix/zsyscall_freebsd_amd64.go | 266 +-
.../x/sys/unix/zsyscall_freebsd_arm.go | 266 +-
.../x/sys/unix/zsyscall_linux_386.go | 519 ++-
.../x/sys/unix/zsyscall_linux_amd64.go | 520 ++-
.../x/sys/unix/zsyscall_linux_arm.go | 501 ++-
.../x/sys/unix/zsyscall_linux_arm64.go | 493 ++-
.../x/sys/unix/zsyscall_linux_mips.go | 2111 ++++++++++
.../x/sys/unix/zsyscall_linux_mips64.go | 2105 ++++++++++
.../x/sys/unix/zsyscall_linux_mips64le.go | 2105 ++++++++++
.../x/sys/unix/zsyscall_linux_mipsle.go | 2111 ++++++++++
.../x/sys/unix/zsyscall_linux_ppc64.go | 561 ++-
.../x/sys/unix/zsyscall_linux_ppc64le.go | 561 ++-
.../x/sys/unix/zsyscall_linux_s390x.go | 1937 +++++++++
.../x/sys/unix/zsyscall_linux_sparc64.go | 1833 +++++++++
.../x/sys/unix/zsyscall_netbsd_386.go | 31 +-
.../x/sys/unix/zsyscall_netbsd_amd64.go | 31 +-
.../x/sys/unix/zsyscall_netbsd_arm.go | 31 +-
.../x/sys/unix/zsyscall_openbsd_386.go | 33 +-
.../x/sys/unix/zsyscall_openbsd_amd64.go | 33 +-
...agonfly_386.go => zsyscall_openbsd_arm.go} | 229 +-
.../x/sys/unix/zsyscall_solaris_amd64.go | 195 +-
.../x/sys/unix/zsysnum_darwin_arm.go | 110 +-
.../x/sys/unix/zsysnum_darwin_arm64.go | 50 +-
.../x/sys/unix/zsysnum_dragonfly_386.go | 304 --
.../x/sys/unix/zsysnum_dragonfly_amd64.go | 21 +-
.../x/sys/unix/zsysnum_freebsd_386.go | 686 ++--
.../x/sys/unix/zsysnum_freebsd_amd64.go | 686 ++--
.../x/sys/unix/zsysnum_freebsd_arm.go | 686 ++--
.../x/sys/unix/zsysnum_linux_386.go | 39 +-
.../x/sys/unix/zsysnum_linux_amd64.go | 24 +-
.../x/sys/unix/zsysnum_linux_arm.go | 37 +-
.../x/sys/unix/zsysnum_linux_arm64.go | 17 +-
.../x/sys/unix/zsysnum_linux_mips.go | 374 ++
.../x/sys/unix/zsysnum_linux_mips64.go | 334 ++
.../x/sys/unix/zsysnum_linux_mips64le.go | 334 ++
.../x/sys/unix/zsysnum_linux_mipsle.go | 374 ++
.../x/sys/unix/zsysnum_linux_ppc64.go | 13 +-
.../x/sys/unix/zsysnum_linux_ppc64le.go | 20 +-
.../x/sys/unix/zsysnum_linux_s390x.go | 331 ++
.../x/sys/unix/zsysnum_linux_sparc64.go | 348 ++
.../x/sys/unix/zsysnum_openbsd_arm.go | 213 +
.../x/sys/unix/ztypes_darwin_386.go | 19 +-
.../x/sys/unix/ztypes_darwin_amd64.go | 14 +-
.../x/sys/unix/ztypes_darwin_arm.go | 14 +
.../x/sys/unix/ztypes_darwin_arm64.go | 14 +
.../x/sys/unix/ztypes_dragonfly_amd64.go | 6 +-
.../x/sys/unix/ztypes_freebsd_386.go | 79 +-
.../x/sys/unix/ztypes_freebsd_amd64.go | 75 +-
.../x/sys/unix/ztypes_freebsd_arm.go | 87 +-
.../golang.org/x/sys/unix/ztypes_linux_386.go | 122 +-
.../x/sys/unix/ztypes_linux_amd64.go | 152 +-
.../golang.org/x/sys/unix/ztypes_linux_arm.go | 122 +-
.../x/sys/unix/ztypes_linux_arm64.go | 144 +-
.../x/sys/unix/ztypes_linux_mips.go | 688 ++++
.../x/sys/unix/ztypes_linux_mips64.go | 693 ++++
.../x/sys/unix/ztypes_linux_mips64le.go | 693 ++++
.../x/sys/unix/ztypes_linux_mipsle.go | 688 ++++
.../x/sys/unix/ztypes_linux_ppc64.go | 152 +-
.../x/sys/unix/ztypes_linux_ppc64le.go | 152 +-
.../x/sys/unix/ztypes_linux_s390x.go | 718 ++++
.../x/sys/unix/ztypes_linux_sparc64.go | 666 ++++
...dragonfly_386.go => ztypes_openbsd_arm.go} | 293 +-
.../x/sys/unix/ztypes_solaris_amd64.go | 24 +-
vendor/vendor.json | 5 +-
167 files changed, 58383 insertions(+), 19630 deletions(-)
create mode 100644 vendor/golang.org/x/sys/unix/README.md
delete mode 100644 vendor/golang.org/x/sys/unix/asm.s
rename vendor/golang.org/x/sys/unix/{asm_dragonfly_386.s => asm_linux_mips64x.s} (56%)
create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_s390x.s
create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
create mode 100644 vendor/golang.org/x/sys/unix/bluetooth_linux.go
create mode 100644 vendor/golang.org/x/sys/unix/cap_freebsd.go
create mode 100644 vendor/golang.org/x/sys/unix/dev_linux.go
create mode 100644 vendor/golang.org/x/sys/unix/dirent.go
create mode 100644 vendor/golang.org/x/sys/unix/endian_big.go
create mode 100644 vendor/golang.org/x/sys/unix/endian_little.go
create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_386.go
create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
create mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
create mode 100644 vendor/golang.org/x/sys/unix/file_unix.go
create mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_linux.pl
create mode 100644 vendor/golang.org/x/sys/unix/openbsd_pledge.go
create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
rename vendor/golang.org/x/sys/unix/{syscall_dragonfly_386.go => syscall_openbsd_arm.go} (51%)
create mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_gc.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_darwin.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_dragonfly.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_freebsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_linux.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_netbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_openbsd.go
delete mode 100644 vendor/golang.org/x/sys/unix/types_solaris.go
create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
rename vendor/golang.org/x/sys/unix/{zerrors_dragonfly_386.go => zerrors_openbsd_arm.go} (65%)
create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
rename vendor/golang.org/x/sys/unix/{zsyscall_dragonfly_386.go => zsyscall_openbsd_arm.go} (87%)
delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_386.go
create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
rename vendor/golang.org/x/sys/unix/{ztypes_dragonfly_386.go => ztypes_openbsd_arm.go} (58%)
diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md
new file mode 100644
index 000000000..bc6f6031f
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/README.md
@@ -0,0 +1,173 @@
+# Building `sys/unix`
+
+The sys/unix package provides access to the raw system call interface of the
+underlying operating system. See: https://godoc.org/golang.org/x/sys/unix
+
+Porting Go to a new architecture/OS combination or adding syscalls, types, or
+constants to an existing architecture/OS pair requires some manual effort;
+however, there are tools that automate much of the process.
+
+## Build Systems
+
+There are currently two ways we generate the necessary files. We are currently
+migrating the build system to use containers so the builds are reproducible.
+This is being done on an OS-by-OS basis. Please update this documentation as
+components of the build system change.
+
+### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`)
+
+The old build system generates the Go files based on the C header files
+present on your system. This means that files
+for a given GOOS/GOARCH pair must be generated on a system with that OS and
+architecture. This also means that the generated code can differ from system
+to system, based on differences in the header files.
+
+To avoid this, if you are using the old build system, only generate the Go
+files on an installation with unmodified header files. It is also important to
+keep track of which version of the OS the files were generated from (ex.
+Darwin 14 vs Darwin 15). This makes it easier to track the progress of changes
+and have each OS upgrade correspond to a single change.
+
+To build the files for your current OS and architecture, make sure GOOS and
+GOARCH are set correctly and run `mkall.sh`. This will generate the files for
+your specific system. Running `mkall.sh -n` shows the commands that will be run.
+
+Requirements: bash, perl, go
+
+### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`)
+
+The new build system uses a Docker container to generate the go files directly
+from source checkouts of the kernel and various system libraries. This means
+that on any platform that supports Docker, all the files using the new build
+system can be generated at once, and generated files will not change based on
+what the person running the scripts has installed on their computer.
+
+The OS specific files for the new build system are located in the `${GOOS}`
+directory, and the build is coordinated by the `${GOOS}/mkall.go` program. When
+the kernel or system library updates, modify the Dockerfile at
+`${GOOS}/Dockerfile` to checkout the new release of the source.
+
+To build all the files under the new build system, you must be on an amd64/Linux
+system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will
+then generate all of the files for all of the GOOS/GOARCH pairs in the new build
+system. Running `mkall.sh -n` shows the commands that will be run.
+
+Requirements: bash, perl, go, docker
+
+## Component files
+
+This section describes the various files used in the code generation process.
+It also contains instructions on how to modify these files to add a new
+architecture/OS or to add additional syscalls, types, or constants. Note that
+if you are using the new build system, the scripts cannot be called normally.
+They must be called from within the docker container.
+
+### asm files
+
+The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system
+call dispatch. There are three entry points:
+```
+ func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
+ func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
+ func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
+```
+The first and second are the standard ones; they differ only in how many
+arguments can be passed to the kernel. The third is for low-level use by the
+ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
+let it know that a system call is running.
+
+When porting Go to an new architecture/OS, this file must be implemented for
+each GOOS/GOARCH pair.
+
+### mksysnum
+
+Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl`
+for the old system). This script takes in a list of header files containing the
+syscall number declarations and parses them to produce the corresponding list of
+Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
+constants.
+
+Adding new syscall numbers is mostly done by running the build on a sufficiently
+new installation of the target OS (or updating the source checkouts for the
+new build system). However, depending on the OS, you make need to update the
+parsing in mksysnum.
+
+### mksyscall.pl
+
+The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
+hand-written Go files which implement system calls (for unix, the specific OS,
+or the specific OS/Architecture pair respectively) that need special handling
+and list `//sys` comments giving prototypes for ones that can be generated.
+
+The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts
+them into syscalls. This requires the name of the prototype in the comment to
+match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
+prototype can be exported (capitalized) or not.
+
+Adding a new syscall often just requires adding a new `//sys` function prototype
+with the desired arguments and a capitalized name so it is exported. However, if
+you want the interface to the syscall to be different, often one will make an
+unexported `//sys` prototype, an then write a custom wrapper in
+`syscall_${GOOS}.go`.
+
+### types files
+
+For each OS, there is a hand-written Go file at `${GOOS}/types.go` (or
+`types_${GOOS}.go` on the old system). This file includes standard C headers and
+creates Go type aliases to the corresponding C types. The file is then fed
+through godef to get the Go compatible definitions. Finally, the generated code
+is fed though mkpost.go to format the code correctly and remove any hidden or
+private identifiers. This cleaned-up code is written to
+`ztypes_${GOOS}_${GOARCH}.go`.
+
+The hardest part about preparing this file is figuring out which headers to
+include and which symbols need to be `#define`d to get the actual data
+structures that pass through to the kernel system calls. Some C libraries
+preset alternate versions for binary compatibility and translate them on the
+way in and out of system calls, but there is almost always a `#define` that can
+get the real ones.
+See `types_darwin.go` and `linux/types.go` for examples.
+
+To add a new type, add in the necessary include statement at the top of the
+file (if it is not already there) and add in a type alias line. Note that if
+your type is significantly different on different architectures, you may need
+some `#if/#elif` macros in your include statements.
+
+### mkerrors.sh
+
+This script is used to generate the system's various constants. This doesn't
+just include the error numbers and error strings, but also the signal numbers
+an a wide variety of miscellaneous constants. The constants come from the list
+of include files in the `includes_${uname}` variable. A regex then picks out
+the desired `#define` statements, and generates the corresponding Go constants.
+The error numbers and strings are generated from `#include `, and the
+signal numbers and strings are generated from `#include `. All of
+these constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program,
+`_errors.c`, which prints out all the constants.
+
+To add a constant, add the header that includes it to the appropriate variable.
+Then, edit the regex (if necessary) to match the desired constant. Avoid making
+the regex too broad to avoid matching unintended constants.
+
+
+## Generated files
+
+### `zerror_${GOOS}_${GOARCH}.go`
+
+A file containing all of the system's generated error numbers, error strings,
+signal numbers, and constants. Generated by `mkerrors.sh` (see above).
+
+### `zsyscall_${GOOS}_${GOARCH}.go`
+
+A file containing all the generated syscalls for a specific GOOS and GOARCH.
+Generated by `mksyscall.pl` (see above).
+
+### `zsysnum_${GOOS}_${GOARCH}.go`
+
+A list of numeric constants for all the syscall number of the specific GOOS
+and GOARCH. Generated by mksysnum (see above).
+
+### `ztypes_${GOOS}_${GOARCH}.go`
+
+A file containing Go types for passing into (or returning from) syscalls.
+Generated by godefs and the types file (see above).
diff --git a/vendor/golang.org/x/sys/unix/asm.s b/vendor/golang.org/x/sys/unix/asm.s
deleted file mode 100644
index 8ed2fdb94..000000000
--- a/vendor/golang.org/x/sys/unix/asm.s
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 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.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT ·use(SB),NOSPLIT,$0
- RET
diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_386.s b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
similarity index 56%
rename from vendor/golang.org/x/sys/unix/asm_dragonfly_386.s
rename to vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
index 7e55e0d31..724e580c4 100644
--- a/vendor/golang.org/x/sys/unix/asm_dragonfly_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
@@ -1,29 +1,28 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2015 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.
+// +build linux
+// +build mips64 mips64le
// +build !gccgo
#include "textflag.h"
//
-// System call support for 386, FreeBSD
+// System calls for mips64, Linux
//
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
-TEXT ·Syscall(SB),NOSPLIT,$0-32
+TEXT ·Syscall(SB),NOSPLIT,$0-56
JMP syscall·Syscall(SB)
-TEXT ·Syscall6(SB),NOSPLIT,$0-44
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
JMP syscall·Syscall6(SB)
-TEXT ·Syscall9(SB),NOSPLIT,$0-56
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-32
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
JMP syscall·RawSyscall(SB)
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-44
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
new file mode 100644
index 000000000..2ea425755
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
@@ -0,0 +1,31 @@
+// Copyright 2016 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.
+
+// +build linux
+// +build mips mipsle
+// +build !gccgo
+
+#include "textflag.h"
+
+//
+// System calls for mips, Linux
+//
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT ·Syscall(SB),NOSPLIT,$0-28
+ JMP syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-40
+ JMP syscall·Syscall6(SB)
+
+TEXT ·Syscall9(SB),NOSPLIT,$0-52
+ JMP syscall·Syscall9(SB)
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-28
+ JMP syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
+ JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
new file mode 100644
index 000000000..11889859f
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
@@ -0,0 +1,28 @@
+// Copyright 2016 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.
+
+// +build s390x
+// +build linux
+// +build !gccgo
+
+#include "textflag.h"
+
+//
+// System calls for s390x, Linux
+//
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT ·Syscall(SB),NOSPLIT,$0-56
+ BR syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
+ BR syscall·Syscall6(SB)
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
+ BR syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
+ BR syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
new file mode 100644
index 000000000..469bfa100
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
@@ -0,0 +1,29 @@
+// Copyright 2017 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.
+
+// +build !gccgo
+
+#include "textflag.h"
+
+//
+// System call support for ARM, OpenBSD
+//
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT ·Syscall(SB),NOSPLIT,$0-28
+ B syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-40
+ B syscall·Syscall6(SB)
+
+TEXT ·Syscall9(SB),NOSPLIT,$0-52
+ B syscall·Syscall9(SB)
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-28
+ B syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
+ B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
index 43ed17a05..ded8260f3 100644
--- a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
@@ -10,8 +10,8 @@
// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
//
-TEXT ·sysvicall6(SB),NOSPLIT,$0-64
+TEXT ·sysvicall6(SB),NOSPLIT,$0-88
JMP syscall·sysvicall6(SB)
-TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64
+TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
JMP syscall·rawSysvicall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/bluetooth_linux.go b/vendor/golang.org/x/sys/unix/bluetooth_linux.go
new file mode 100644
index 000000000..6e3229697
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/bluetooth_linux.go
@@ -0,0 +1,35 @@
+// Copyright 2016 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.
+
+// Bluetooth sockets and messages
+
+package unix
+
+// Bluetooth Protocols
+const (
+ BTPROTO_L2CAP = 0
+ BTPROTO_HCI = 1
+ BTPROTO_SCO = 2
+ BTPROTO_RFCOMM = 3
+ BTPROTO_BNEP = 4
+ BTPROTO_CMTP = 5
+ BTPROTO_HIDP = 6
+ BTPROTO_AVDTP = 7
+)
+
+const (
+ HCI_CHANNEL_RAW = 0
+ HCI_CHANNEL_USER = 1
+ HCI_CHANNEL_MONITOR = 2
+ HCI_CHANNEL_CONTROL = 3
+)
+
+// Socketoption Level
+const (
+ SOL_BLUETOOTH = 0x112
+ SOL_HCI = 0x0
+ SOL_L2CAP = 0x6
+ SOL_RFCOMM = 0x12
+ SOL_SCO = 0x11
+)
diff --git a/vendor/golang.org/x/sys/unix/cap_freebsd.go b/vendor/golang.org/x/sys/unix/cap_freebsd.go
new file mode 100644
index 000000000..83b6bceab
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/cap_freebsd.go
@@ -0,0 +1,195 @@
+// Copyright 2017 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.
+
+// +build freebsd
+
+package unix
+
+import (
+ errorspkg "errors"
+ "fmt"
+)
+
+// Go implementation of C mostly found in /usr/src/sys/kern/subr_capability.c
+
+const (
+ // This is the version of CapRights this package understands. See C implementation for parallels.
+ capRightsGoVersion = CAP_RIGHTS_VERSION_00
+ capArSizeMin = CAP_RIGHTS_VERSION_00 + 2
+ capArSizeMax = capRightsGoVersion + 2
+)
+
+var (
+ bit2idx = []int{
+ -1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1,
+ 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ }
+)
+
+func capidxbit(right uint64) int {
+ return int((right >> 57) & 0x1f)
+}
+
+func rightToIndex(right uint64) (int, error) {
+ idx := capidxbit(right)
+ if idx < 0 || idx >= len(bit2idx) {
+ return -2, fmt.Errorf("index for right 0x%x out of range", right)
+ }
+ return bit2idx[idx], nil
+}
+
+func caprver(right uint64) int {
+ return int(right >> 62)
+}
+
+func capver(rights *CapRights) int {
+ return caprver(rights.Rights[0])
+}
+
+func caparsize(rights *CapRights) int {
+ return capver(rights) + 2
+}
+
+// CapRightsSet sets the permissions in setrights in rights.
+func CapRightsSet(rights *CapRights, setrights []uint64) error {
+ // This is essentially a copy of cap_rights_vset()
+ if capver(rights) != CAP_RIGHTS_VERSION_00 {
+ return fmt.Errorf("bad rights version %d", capver(rights))
+ }
+
+ n := caparsize(rights)
+ if n < capArSizeMin || n > capArSizeMax {
+ return errorspkg.New("bad rights size")
+ }
+
+ for _, right := range setrights {
+ if caprver(right) != CAP_RIGHTS_VERSION_00 {
+ return errorspkg.New("bad right version")
+ }
+ i, err := rightToIndex(right)
+ if err != nil {
+ return err
+ }
+ if i >= n {
+ return errorspkg.New("index overflow")
+ }
+ if capidxbit(rights.Rights[i]) != capidxbit(right) {
+ return errorspkg.New("index mismatch")
+ }
+ rights.Rights[i] |= right
+ if capidxbit(rights.Rights[i]) != capidxbit(right) {
+ return errorspkg.New("index mismatch (after assign)")
+ }
+ }
+
+ return nil
+}
+
+// CapRightsClear clears the permissions in clearrights from rights.
+func CapRightsClear(rights *CapRights, clearrights []uint64) error {
+ // This is essentially a copy of cap_rights_vclear()
+ if capver(rights) != CAP_RIGHTS_VERSION_00 {
+ return fmt.Errorf("bad rights version %d", capver(rights))
+ }
+
+ n := caparsize(rights)
+ if n < capArSizeMin || n > capArSizeMax {
+ return errorspkg.New("bad rights size")
+ }
+
+ for _, right := range clearrights {
+ if caprver(right) != CAP_RIGHTS_VERSION_00 {
+ return errorspkg.New("bad right version")
+ }
+ i, err := rightToIndex(right)
+ if err != nil {
+ return err
+ }
+ if i >= n {
+ return errorspkg.New("index overflow")
+ }
+ if capidxbit(rights.Rights[i]) != capidxbit(right) {
+ return errorspkg.New("index mismatch")
+ }
+ rights.Rights[i] &= ^(right & 0x01FFFFFFFFFFFFFF)
+ if capidxbit(rights.Rights[i]) != capidxbit(right) {
+ return errorspkg.New("index mismatch (after assign)")
+ }
+ }
+
+ return nil
+}
+
+// CapRightsIsSet checks whether all the permissions in setrights are present in rights.
+func CapRightsIsSet(rights *CapRights, setrights []uint64) (bool, error) {
+ // This is essentially a copy of cap_rights_is_vset()
+ if capver(rights) != CAP_RIGHTS_VERSION_00 {
+ return false, fmt.Errorf("bad rights version %d", capver(rights))
+ }
+
+ n := caparsize(rights)
+ if n < capArSizeMin || n > capArSizeMax {
+ return false, errorspkg.New("bad rights size")
+ }
+
+ for _, right := range setrights {
+ if caprver(right) != CAP_RIGHTS_VERSION_00 {
+ return false, errorspkg.New("bad right version")
+ }
+ i, err := rightToIndex(right)
+ if err != nil {
+ return false, err
+ }
+ if i >= n {
+ return false, errorspkg.New("index overflow")
+ }
+ if capidxbit(rights.Rights[i]) != capidxbit(right) {
+ return false, errorspkg.New("index mismatch")
+ }
+ if (rights.Rights[i] & right) != right {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func capright(idx uint64, bit uint64) uint64 {
+ return ((1 << (57 + idx)) | bit)
+}
+
+// CapRightsInit returns a pointer to an initialised CapRights structure filled with rights.
+// See man cap_rights_init(3) and rights(4).
+func CapRightsInit(rights []uint64) (*CapRights, error) {
+ var r CapRights
+ r.Rights[0] = (capRightsGoVersion << 62) | capright(0, 0)
+ r.Rights[1] = capright(1, 0)
+
+ err := CapRightsSet(&r, rights)
+ if err != nil {
+ return nil, err
+ }
+ return &r, nil
+}
+
+// CapRightsLimit reduces the operations permitted on fd to at most those contained in rights.
+// The capability rights on fd can never be increased by CapRightsLimit.
+// See man cap_rights_limit(2) and rights(4).
+func CapRightsLimit(fd uintptr, rights *CapRights) error {
+ return capRightsLimit(int(fd), rights)
+}
+
+// CapRightsGet returns a CapRights structure containing the operations permitted on fd.
+// See man cap_rights_get(3) and rights(4).
+func CapRightsGet(fd uintptr) (*CapRights, error) {
+ r, err := CapRightsInit(nil)
+ if err != nil {
+ return nil, err
+ }
+ err = capRightsGet(capRightsGoVersion, int(fd), r)
+ if err != nil {
+ return nil, err
+ }
+ return r, nil
+}
diff --git a/vendor/golang.org/x/sys/unix/dev_linux.go b/vendor/golang.org/x/sys/unix/dev_linux.go
new file mode 100644
index 000000000..c902c39e8
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/dev_linux.go
@@ -0,0 +1,42 @@
+// Copyright 2017 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.
+
+// Functions to access/create device major and minor numbers matching the
+// encoding used by the Linux kernel and glibc.
+//
+// The information below is extracted and adapted from bits/sysmacros.h in the
+// glibc sources:
+//
+// dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
+// default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
+// number and m is a hex digit of the minor number. This is backward compatible
+// with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
+// backward compatible with the Linux kernel, which for some architectures uses
+// 32-bit dev_t, encoded as mmmM MMmm.
+
+package unix
+
+// Major returns the major component of a Linux device number.
+func Major(dev uint64) uint32 {
+ major := uint32((dev & 0x00000000000fff00) >> 8)
+ major |= uint32((dev & 0xfffff00000000000) >> 32)
+ return major
+}
+
+// Minor returns the minor component of a Linux device number.
+func Minor(dev uint64) uint32 {
+ minor := uint32((dev & 0x00000000000000ff) >> 0)
+ minor |= uint32((dev & 0x00000ffffff00000) >> 12)
+ return minor
+}
+
+// Mkdev returns a Linux device number generated from the given major and minor
+// components.
+func Mkdev(major, minor uint32) uint64 {
+ dev := uint64((major & 0x00000fff) << 8)
+ dev |= uint64((major & 0xfffff000) << 32)
+ dev |= uint64((minor & 0x000000ff) << 0)
+ dev |= uint64((minor & 0xffffff00) << 12)
+ return dev
+}
diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go
new file mode 100644
index 000000000..bd475812b
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/dirent.go
@@ -0,0 +1,102 @@
+// Copyright 2009 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.
+
+// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+
+package unix
+
+import "unsafe"
+
+// readInt returns the size-bytes unsigned integer in native byte order at offset off.
+func readInt(b []byte, off, size uintptr) (u uint64, ok bool) {
+ if len(b) < int(off+size) {
+ return 0, false
+ }
+ if isBigEndian {
+ return readIntBE(b[off:], size), true
+ }
+ return readIntLE(b[off:], size), true
+}
+
+func readIntBE(b []byte, size uintptr) uint64 {
+ switch size {
+ case 1:
+ return uint64(b[0])
+ case 2:
+ _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint64(b[1]) | uint64(b[0])<<8
+ case 4:
+ _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24
+ case 8:
+ _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
+ uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
+ default:
+ panic("syscall: readInt with unsupported size")
+ }
+}
+
+func readIntLE(b []byte, size uintptr) uint64 {
+ switch size {
+ case 1:
+ return uint64(b[0])
+ case 2:
+ _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint64(b[0]) | uint64(b[1])<<8
+ case 4:
+ _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24
+ case 8:
+ _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
+ return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
+ uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ default:
+ panic("syscall: readInt with unsupported size")
+ }
+}
+
+// ParseDirent parses up to max directory entries in buf,
+// appending the names to names. It returns the number of
+// bytes consumed from buf, the number of entries added
+// to names, and the new names slice.
+func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
+ origlen := len(buf)
+ count = 0
+ for max != 0 && len(buf) > 0 {
+ reclen, ok := direntReclen(buf)
+ if !ok || reclen > uint64(len(buf)) {
+ return origlen, count, names
+ }
+ rec := buf[:reclen]
+ buf = buf[reclen:]
+ ino, ok := direntIno(rec)
+ if !ok {
+ break
+ }
+ if ino == 0 { // File absent in directory.
+ continue
+ }
+ const namoff = uint64(unsafe.Offsetof(Dirent{}.Name))
+ namlen, ok := direntNamlen(rec)
+ if !ok || namoff+namlen > uint64(len(rec)) {
+ break
+ }
+ name := rec[namoff : namoff+namlen]
+ for i, c := range name {
+ if c == 0 {
+ name = name[:i]
+ break
+ }
+ }
+ // Check for useless names before allocating a string.
+ if string(name) == "." || string(name) == ".." {
+ continue
+ }
+ max--
+ count++
+ names = append(names, string(name))
+ }
+ return origlen - len(buf), count, names
+}
diff --git a/vendor/golang.org/x/sys/unix/endian_big.go b/vendor/golang.org/x/sys/unix/endian_big.go
new file mode 100644
index 000000000..5e9269063
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/endian_big.go
@@ -0,0 +1,9 @@
+// Copyright 2016 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.
+//
+// +build ppc64 s390x mips mips64
+
+package unix
+
+const isBigEndian = true
diff --git a/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/golang.org/x/sys/unix/endian_little.go
new file mode 100644
index 000000000..085df2d8d
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/endian_little.go
@@ -0,0 +1,9 @@
+// Copyright 2016 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.
+//
+// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
+
+package unix
+
+const isBigEndian = false
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_386.go b/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
new file mode 100644
index 000000000..c56bc8b05
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
@@ -0,0 +1,227 @@
+// Copyright 2017 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.
+
+// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
+// them here for backwards compatibility.
+
+package unix
+
+const (
+ IFF_SMART = 0x20
+ IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
+ IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
+ IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BSC = 0x53
+ IFT_CCTEMUL = 0x3d
+ IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
+ IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0xf2
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
+ IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
+ IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
+ IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_IPXIP = 0xf9
+ IFT_ISDN = 0x3f
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
+ IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
+ IFT_L3IPXVLAN = 0x89
+ IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
+ IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PFLOG = 0xf6
+ IFT_PFSYNC = 0xf7
+ IFT_PLC = 0xae
+ IFT_POS = 0xab
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
+ IFT_PROPMUX = 0x36
+ IFT_PROPWIRELESSP2P = 0x9d
+ IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf1
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
+ IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
+ IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
+ IFT_STARLAN = 0xb
+ IFT_STF = 0xd7
+ IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
+ IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
+ IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VOICEEM = 0x64
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_X213 = 0x5d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IPPROTO_MAXID = 0x34
+ IPV6_FAITH = 0x1d
+ IP_FAITH = 0x16
+ MAP_NORESERVE = 0x40
+ MAP_RENAME = 0x20
+ NET_RT_MAXID = 0x6
+ RTF_PRCLONING = 0x10000
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ SIOCADDRT = 0x8030720a
+ SIOCALIFADDR = 0x8118691b
+ SIOCDELRT = 0x8030720b
+ SIOCDLIFADDR = 0x8118691d
+ SIOCGLIFADDR = 0xc118691c
+ SIOCGLIFPHYADDR = 0xc118694b
+ SIOCSLIFPHYADDR = 0x8118694a
+)
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
new file mode 100644
index 000000000..3e9771175
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
@@ -0,0 +1,227 @@
+// Copyright 2017 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.
+
+// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
+// them here for backwards compatibility.
+
+package unix
+
+const (
+ IFF_SMART = 0x20
+ IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
+ IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
+ IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BSC = 0x53
+ IFT_CCTEMUL = 0x3d
+ IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
+ IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0xf2
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
+ IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
+ IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
+ IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_IPXIP = 0xf9
+ IFT_ISDN = 0x3f
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
+ IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
+ IFT_L3IPXVLAN = 0x89
+ IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
+ IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PFLOG = 0xf6
+ IFT_PFSYNC = 0xf7
+ IFT_PLC = 0xae
+ IFT_POS = 0xab
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
+ IFT_PROPMUX = 0x36
+ IFT_PROPWIRELESSP2P = 0x9d
+ IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf1
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
+ IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
+ IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
+ IFT_STARLAN = 0xb
+ IFT_STF = 0xd7
+ IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
+ IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
+ IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VOICEEM = 0x64
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_X213 = 0x5d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IPPROTO_MAXID = 0x34
+ IPV6_FAITH = 0x1d
+ IP_FAITH = 0x16
+ MAP_NORESERVE = 0x40
+ MAP_RENAME = 0x20
+ NET_RT_MAXID = 0x6
+ RTF_PRCLONING = 0x10000
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ SIOCADDRT = 0x8040720a
+ SIOCALIFADDR = 0x8118691b
+ SIOCDELRT = 0x8040720b
+ SIOCDLIFADDR = 0x8118691d
+ SIOCGLIFADDR = 0xc118691c
+ SIOCGLIFPHYADDR = 0xc118694b
+ SIOCSLIFPHYADDR = 0x8118694a
+)
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
new file mode 100644
index 000000000..856dca325
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_arm.go
@@ -0,0 +1,226 @@
+// Copyright 2017 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 unix
+
+const (
+ IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
+ IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
+ IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BSC = 0x53
+ IFT_CCTEMUL = 0x3d
+ IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
+ IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
+ IFT_ETHER = 0x6
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
+ IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
+ IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
+ IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_ISDN = 0x3f
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
+ IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
+ IFT_L3IPXVLAN = 0x89
+ IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
+ IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PFLOG = 0xf6
+ IFT_PFSYNC = 0xf7
+ IFT_PLC = 0xae
+ IFT_POS = 0xab
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
+ IFT_PROPMUX = 0x36
+ IFT_PROPWIRELESSP2P = 0x9d
+ IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf1
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
+ IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
+ IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
+ IFT_STARLAN = 0xb
+ IFT_STF = 0xd7
+ IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
+ IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
+ IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VOICEEM = 0x64
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_X213 = 0x5d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+
+ // missing constants on FreeBSD-11.1-RELEASE, copied from old values in ztypes_freebsd_arm.go
+ IFF_SMART = 0x20
+ IFT_FAITH = 0xf2
+ IFT_IPXIP = 0xf9
+ IPPROTO_MAXID = 0x34
+ IPV6_FAITH = 0x1d
+ IP_FAITH = 0x16
+ MAP_NORESERVE = 0x40
+ MAP_RENAME = 0x20
+ NET_RT_MAXID = 0x6
+ RTF_PRCLONING = 0x10000
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ SIOCADDRT = 0x8030720a
+ SIOCALIFADDR = 0x8118691b
+ SIOCDELRT = 0x8030720b
+ SIOCDLIFADDR = 0x8118691d
+ SIOCGLIFADDR = 0xc118691c
+ SIOCGLIFPHYADDR = 0xc118694b
+ SIOCSLIFPHYADDR = 0x8118694a
+)
diff --git a/vendor/golang.org/x/sys/unix/file_unix.go b/vendor/golang.org/x/sys/unix/file_unix.go
new file mode 100644
index 000000000..47f6a83f2
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/file_unix.go
@@ -0,0 +1,27 @@
+// Copyright 2017 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 unix
+
+import (
+ "os"
+ "syscall"
+)
+
+// FIXME: unexported function from os
+// syscallMode returns the syscall-specific mode bits from Go's portable mode bits.
+func syscallMode(i os.FileMode) (o uint32) {
+ o |= uint32(i.Perm())
+ if i&os.ModeSetuid != 0 {
+ o |= syscall.S_ISUID
+ }
+ if i&os.ModeSetgid != 0 {
+ o |= syscall.S_ISGID
+ }
+ if i&os.ModeSticky != 0 {
+ o |= syscall.S_ISVTX
+ }
+ // No mapping for Go's ModeTemporary (plan9 only).
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/flock.go b/vendor/golang.org/x/sys/unix/flock.go
index ce67a5952..2994ce75f 100644
--- a/vendor/golang.org/x/sys/unix/flock.go
+++ b/vendor/golang.org/x/sys/unix/flock.go
@@ -1,5 +1,3 @@
-// +build linux darwin freebsd openbsd netbsd dragonfly
-
// Copyright 2014 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.
diff --git a/vendor/golang.org/x/sys/unix/flock_linux_32bit.go b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
index 362831c3f..fc0e50e03 100644
--- a/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
+++ b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
@@ -1,4 +1,4 @@
-// +build linux,386 linux,arm
+// +build linux,386 linux,arm linux,mips linux,mipsle
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
new file mode 100644
index 000000000..56332692c
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
@@ -0,0 +1,20 @@
+// Copyright 2016 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.
+
+// +build gccgo,linux,sparc64
+
+package unix
+
+import "syscall"
+
+//extern sysconf
+func realSysconf(name int) int64
+
+func sysconf(name int) (n int64, err syscall.Errno) {
+ r := realSysconf(name)
+ if r < 0 {
+ return 0, syscall.GetErrno()
+ }
+ return r, 0
+}
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index de95a4bbc..09b3c7ab6 100755
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -3,75 +3,9 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-# The unix package provides access to the raw system call
-# interface of the underlying operating system. Porting Go to
-# a new architecture/operating system combination requires
-# some manual effort, though there are tools that automate
-# much of the process. The auto-generated files have names
-# beginning with z.
-#
-# This script runs or (given -n) prints suggested commands to generate z files
-# for the current system. Running those commands is not automatic.
-# This script is documentation more than anything else.
-#
-# * asm_${GOOS}_${GOARCH}.s
-#
-# This hand-written assembly file implements system call dispatch.
-# There are three entry points:
-#
-# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-#
-# The first and second are the standard ones; they differ only in
-# how many arguments can be passed to the kernel.
-# The third is for low-level use by the ForkExec wrapper;
-# unlike the first two, it does not call into the scheduler to
-# let it know that a system call is running.
-#
-# * syscall_${GOOS}.go
-#
-# This hand-written Go file implements system calls that need
-# special handling and lists "//sys" comments giving prototypes
-# for ones that can be auto-generated. Mksyscall reads those
-# comments to generate the stubs.
-#
-# * syscall_${GOOS}_${GOARCH}.go
-#
-# Same as syscall_${GOOS}.go except that it contains code specific
-# to ${GOOS} on one particular architecture.
-#
-# * types_${GOOS}.c
-#
-# This hand-written C file includes standard C headers and then
-# creates typedef or enum names beginning with a dollar sign
-# (use of $ in variable names is a gcc extension). The hardest
-# part about preparing this file is figuring out which headers to
-# include and which symbols need to be #defined to get the
-# actual data structures that pass through to the kernel system calls.
-# Some C libraries present alternate versions for binary compatibility
-# and translate them on the way in and out of system calls, but
-# there is almost always a #define that can get the real ones.
-# See types_darwin.c and types_linux.c for examples.
-#
-# * zerror_${GOOS}_${GOARCH}.go
-#
-# This machine-generated file defines the system's error numbers,
-# error strings, and signal numbers. The generator is "mkerrors.sh".
-# Usually no arguments are needed, but mkerrors.sh will pass its
-# arguments on to godefs.
-#
-# * zsyscall_${GOOS}_${GOARCH}.go
-#
-# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
-#
-# * zsysnum_${GOOS}_${GOARCH}.go
-#
-# Generated by mksysnum_${GOOS}.
-#
-# * ztypes_${GOOS}_${GOARCH}.go
-#
-# Generated by godefs; see types_${GOOS}.c above.
+# This script runs or (given -n) prints suggested commands to generate files for
+# the Architecture/OS specified by the GOARCH and GOOS environment variables.
+# See README.md for more information about how the build system works.
GOOSARCH="${GOOS}_${GOARCH}"
@@ -84,11 +18,14 @@ zsysctl="zsysctl_$GOOSARCH.go"
mksysnum=
mktypes=
run="sh"
+cmd=""
case "$1" in
-syscalls)
for i in zsyscall*go
do
+ # Run the command line that appears in the first line
+ # of the generated file to regenerate it.
sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
rm _$i
done
@@ -96,6 +33,7 @@ case "$1" in
;;
-n)
run="cat"
+ cmd="echo"
shift
esac
@@ -107,6 +45,14 @@ case "$#" in
exit 2
esac
+if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
+ # Use then new build system
+ # Files generated through docker (use $cmd so you can Ctl-C the build or run)
+ $cmd docker build --tag generate:$GOOS $GOOS
+ $cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS
+ exit
+fi
+
GOOSARCH_in=syscall_$GOOSARCH.go
case "$GOOSARCH" in
_* | *_ | _)
@@ -126,7 +72,7 @@ darwin_amd64)
;;
darwin_arm)
mkerrors="$mkerrors"
- mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
+ mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
darwin_arm64)
@@ -161,53 +107,13 @@ freebsd_arm)
mkerrors="$mkerrors"
mksyscall="./mksyscall.pl -l32 -arm"
mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- # Let the type of C char be singed for making the bare syscall
+ # Let the type of C char be signed for making the bare syscall
# API consistent across over platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
-linux_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_amd64)
- unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1)
- if [ "$unistd_h" = "" ]; then
- echo >&2 cannot find unistd_64.h
- exit 1
- fi
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_arm64)
- unistd_h=$(ls -1 /usr/include/asm/unistd.h /usr/include/asm-generic/unistd.h 2>/dev/null | head -1)
- if [ "$unistd_h" = "" ]; then
- echo >&2 cannot find unistd_64.h
- exit 1
- fi
- mksysnum="./mksysnum_linux.pl $unistd_h"
- # Let the type of C char be singed for making the bare syscall
- # API consistent across over platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_ppc64)
- GOOSARCH_in=syscall_linux_ppc64x.go
- unistd_h=/usr/include/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-linux_ppc64le)
- GOOSARCH_in=syscall_linux_ppc64x.go
- unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h
+linux_sparc64)
+ GOOSARCH_in=syscall_linux_sparc64.go
+ unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
mkerrors="$mkerrors -m64"
mksysnum="./mksysnum_linux.pl $unistd_h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
@@ -262,13 +168,12 @@ esac
syscall_goos="syscall_bsd.go $syscall_goos"
;;
esac
- if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
+ if [ -n "$mksyscall" ]; then echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
;;
esac
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
if [ -n "$mktypes" ]; then
- echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go";
- echo "$mktypes types_$GOOS.go | gofmt >>ztypes_$GOOSARCH.go";
+ echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go";
fi
) | $run
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index c40d788c4..08dd77518 100755
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -16,6 +16,15 @@ if test -z "$GOARCH" -o -z "$GOOS"; then
exit 1
fi
+# Check that we are using the new build system if we should
+if [[ "$GOOS" -eq "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
+ if [[ "$GOLANG_SYS_BUILD" -ne "docker" ]]; then
+ echo 1>&2 "In the new build system, mkerrors should not be called directly."
+ echo 1>&2 "See README.md"
+ exit 1
+ fi
+fi
+
CC=${CC:-cc}
if [[ "$GOOS" -eq "solaris" ]]; then
@@ -36,6 +45,7 @@ includes_Darwin='
#include
#include
#include
+#include
#include
#include
#include
@@ -66,6 +76,7 @@ includes_DragonFly='
'
includes_FreeBSD='
+#include
#include
#include
#include
@@ -102,8 +113,39 @@ includes_Linux='
#endif
#define _GNU_SOURCE
+// is broken on powerpc64, as it fails to include definitions of
+// these structures. We just include them copied from .
+#if defined(__powerpc__)
+struct sgttyb {
+ char sg_ispeed;
+ char sg_ospeed;
+ char sg_erase;
+ char sg_kill;
+ short sg_flags;
+};
+
+struct tchars {
+ char t_intrc;
+ char t_quitc;
+ char t_startc;
+ char t_stopc;
+ char t_eofc;
+ char t_brkc;
+};
+
+struct ltchars {
+ char t_suspc;
+ char t_dsuspc;
+ char t_rprntc;
+ char t_flushc;
+ char t_werasc;
+ char t_lnextc;
+};
+#endif
+
#include
#include
+#include
#include
#include
#include
@@ -113,20 +155,32 @@ includes_Linux='
#include
#include
#include
+#include
#include
+#include
#include
#include
#include
#include
#include
+#include
#include
+#include
+#include
#include
+#include
+#include
#include
#include
#include
#include
+#include
+#include
#include
#include
+#include
+#include
+#include
#include
#include
@@ -141,6 +195,21 @@ includes_Linux='
#ifndef PTRACE_SETREGS
#define PTRACE_SETREGS 0xd
#endif
+
+#ifndef SOL_NETLINK
+#define SOL_NETLINK 270
+#endif
+
+#ifdef SOL_BLUETOOTH
+// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
+// but it is already in bluetooth_linux.go
+#undef SOL_BLUETOOTH
+#endif
+
+// Certain constants are missing from the fs/crypto UAPI
+#define FS_KEY_DESC_PREFIX "fscrypt:"
+#define FS_KEY_DESC_PREFIX_SIZE 8
+#define FS_MAX_KEY_SIZE 64
'
includes_NetBSD='
@@ -304,15 +373,16 @@ ccflags="$@"
$2 ~ /^IN_/ ||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
+ $2 ~ /^FALLOC_/ ||
$2 == "ICMPV6_FILTER" ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||
$2 == "IFNAMSIZ" ||
$2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
$2 ~ /^SYSCTL_VERS/ ||
- $2 ~ /^(MS|MNT)_/ ||
+ $2 ~ /^(MS|MNT|UMOUNT)_/ ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
- $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
+ $2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
$2 !~ "NLA_TYPE_MASK" &&
@@ -326,14 +396,27 @@ ccflags="$@"
$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
$2 ~ /^BIOC/ ||
$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
- $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
+ $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
$2 ~ /^CLONE_[A-Z_]+/ ||
$2 !~ /^(BPF_TIMEVAL)$/ &&
$2 ~ /^(BPF|DLT)_/ ||
$2 ~ /^CLOCK_/ ||
+ $2 ~ /^CAN_/ ||
+ $2 ~ /^CAP_/ ||
+ $2 ~ /^ALG_/ ||
+ $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
+ $2 ~ /^GRND_/ ||
+ $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
+ $2 ~ /^KEYCTL_/ ||
+ $2 ~ /^PERF_EVENT_IOC_/ ||
+ $2 ~ /^SECCOMP_MODE_/ ||
+ $2 ~ /^SPLICE_/ ||
+ $2 ~ /^(VM|VMADDR)_/ ||
+ $2 ~ /^XATTR_(CREATE|REPLACE)/ ||
$2 !~ "WMESGLEN" &&
- $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
+ $2 ~ /^W[A-Z0-9]+$/ ||
+ $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
@@ -368,7 +451,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags |
sort >_signal.grep
echo '// mkerrors.sh' "$@"
-echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
+echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
echo
echo "// +build ${GOARCH},${GOOS}"
echo
@@ -430,7 +513,7 @@ intcmp(const void *a, const void *b)
int
main(void)
{
- int i, j, e;
+ int i, e;
char buf[1024], *p;
printf("\n\n// Error table\n");
@@ -447,7 +530,7 @@ main(void)
printf("\t%d: \"%s\",\n", e, buf);
}
printf("}\n\n");
-
+
printf("\n\n// Signal table\n");
printf("var signals = [...]string {\n");
qsort(signals, nelem(signals), sizeof signals[0], intcmp);
diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl
index b1e7766da..fb929b4ce 100755
--- a/vendor/golang.org/x/sys/unix/mksyscall.pl
+++ b/vendor/golang.org/x/sys/unix/mksyscall.pl
@@ -29,6 +29,7 @@ my $openbsd = 0;
my $netbsd = 0;
my $dragonfly = 0;
my $arm = 0; # 64-bit value should use (even, odd)-pair
+my $tags = ""; # build tags
if($ARGV[0] eq "-b32") {
$_32bit = "big-endian";
@@ -57,17 +58,27 @@ if($ARGV[0] eq "-arm") {
$arm = 1;
shift;
}
+if($ARGV[0] eq "-tags") {
+ shift;
+ $tags = $ARGV[0];
+ shift;
+}
if($ARGV[0] =~ /^-/) {
- print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
+ print STDERR "usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
exit 1;
}
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
+# Check that we are using the new build system if we should
+if($ENV{'GOOS'} eq "linux" && $ENV{'GOARCH'} ne "sparc64") {
+ if($ENV{'GOLANG_SYS_BUILD'} ne "docker") {
+ print STDERR "In the new build system, mksyscall should not be called directly.\n";
+ print STDERR "See README.md\n";
+ exit 1;
+ }
}
+
sub parseparamlist($) {
my ($list) = @_;
$list =~ s/^\s*//;
@@ -132,7 +143,6 @@ while(<>) {
# Prepare arguments to Syscall.
my @args = ();
- my @uses = ();
my $n = 0;
foreach my $p (@in) {
my ($name, $type) = parseparam($p);
@@ -143,14 +153,12 @@ while(<>) {
$text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
$n++;
} elsif($type eq "string") {
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
$text .= "\tvar _p$n *byte\n";
$text .= "\t_p$n, _ = BytePtrFromString($name)\n";
push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
$n++;
} elsif($type =~ /^\[\](.*)/) {
# Convert slice into pointer, length.
@@ -185,7 +193,7 @@ while(<>) {
}
} elsif($type eq "int64" && $_32bit ne "") {
if(@args % 2 && $arm) {
- # arm abi specifies 64-bit argument uses
+ # arm abi specifies 64-bit argument uses
# (even, odd) pair
push @args, "0"
}
@@ -278,11 +286,8 @@ while(<>) {
} else {
$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
}
- foreach my $use (@uses) {
- $text .= "\t$use\n";
- }
$text .= $body;
-
+
if ($plan9 && $ret[2] eq "e1") {
$text .= "\tif int32(r0) == -1 {\n";
$text .= "\t\terr = e1\n";
@@ -305,9 +310,9 @@ if($errors) {
print <) {
# Prepare arguments to Syscall.
my @args = ();
- my @uses = ();
my $n = 0;
foreach my $p (@in) {
my ($name, $type) = parseparam($p);
@@ -149,14 +149,12 @@ while(<>) {
$text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
$n++;
} elsif($type eq "string") {
print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
$text .= "\tvar _p$n $strconvtype\n";
$text .= "\t_p$n, _ = $strconvfunc($name)\n";
push @args, "uintptr(unsafe.Pointer(_p$n))";
- push @uses, "use(unsafe.Pointer(_p$n))";
$n++;
} elsif($type =~ /^\[\](.*)/) {
# Convert slice into pointer, length.
@@ -243,9 +241,6 @@ while(<>) {
} else {
$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
}
- foreach my $use (@uses) {
- $text .= "\t$use\n";
- }
$text .= $body;
if ($do_errno) {
@@ -263,9 +258,9 @@ if($errors) {
print <){
if($name eq 'SYS_SYS_EXIT'){
$name = 'SYS_EXIT';
}
- if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){
- next
- }
print " $name = $num; // $proto\n";
-
- # We keep Capsicum syscall numbers for FreeBSD
- # 9-STABLE here because we are not sure whether they
- # are mature and stable.
- if($num == 513){
- print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n";
- print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n";
- print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n";
- print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n";
- }
}
}
diff --git a/vendor/golang.org/x/sys/unix/mksysnum_linux.pl b/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
deleted file mode 100755
index 4d4017deb..000000000
--- a/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 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.
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
- print STDERR "GOARCH or GOOS not defined in environment\n";
- exit 1;
-}
-
-my $command = "mksysnum_linux.pl ". join(' ', @ARGV);
-
-print < 999){
- # ignore deprecated syscalls that are no longer implemented
- # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716
- return;
- }
- $name =~ y/a-z/A-Z/;
- print " SYS_$name = $num;\n";
-}
-
-my $prev;
-open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc";
-while(){
- if(/^#define __NR_syscalls\s+/) {
- # ignore redefinitions of __NR_syscalls
- }
- elsif(/^#define __NR_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){
- $prev = $2;
- fmt($1, $2);
- }
- elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){
- fmt($1, $prev+$2)
- }
-}
-
-print < len(b) {
+ if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {
return nil, nil, EINVAL
}
return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil
diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go
index 6442a9939..85e35020e 100644
--- a/vendor/golang.org/x/sys/unix/syscall.go
+++ b/vendor/golang.org/x/sys/unix/syscall.go
@@ -21,8 +21,6 @@
// holds a value of type syscall.Errno.
package unix // import "golang.org/x/sys/unix"
-import "unsafe"
-
// ByteSliceFromString returns a NUL-terminated slice of bytes
// containing the text of s. If s contains a NUL byte at any
// location, it returns (nil, EINVAL).
@@ -68,7 +66,4 @@ func (tv *Timeval) Nano() int64 {
return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
}
-// use is a no-op, but the compiler cannot see that it is.
-// Calling use(p) ensures that p is kept live until that point.
-//go:noescape
-func use(p unsafe.Pointer)
+func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go
index e9671764c..ccb29c75c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go
@@ -470,25 +470,11 @@ func Sysctl(name string) (string, error) {
}
func SysctlArgs(name string, args ...int) (string, error) {
- mib, err := sysctlmib(name, args...)
+ buf, err := SysctlRaw(name, args...)
if err != nil {
return "", err
}
-
- // Find size.
- n := uintptr(0)
- if err := sysctl(mib, nil, &n, nil, 0); err != nil {
- return "", err
- }
- if n == 0 {
- return "", nil
- }
-
- // Read into buffer of that size.
- buf := make([]byte, n)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return "", err
- }
+ n := len(buf)
// Throw away terminating NUL.
if n > 0 && buf[n-1] == '\x00' {
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 0d1771c3f..26b83602b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -76,32 +76,16 @@ func nametomib(name string) (mib []_C_int, err error) {
return buf[0 : n/siz], nil
}
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
@@ -211,6 +195,45 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
/*
* Exposed directly
*/
@@ -226,10 +249,13 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys Dup2(from int, to int) (err error)
//sys Exchangedata(path1 string, path2 string, options int) (err error)
//sys Exit(code int)
+//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchdir(fd int) (err error)
//sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
+//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error)
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -254,23 +280,29 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys Kqueue() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Link(path string, link string) (err error)
+//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
//sys Listen(s int, backlog int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys Mkdir(path string, mode uint32) (err error)
+//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mkfifo(path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
//sys Mprotect(b []byte, prot int) (err error)
+//sys Msync(b []byte, flags int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error)
+//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
+//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error)
+//sys Renameat(fromfd int, from string, tofd int, to string) (err error)
//sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
@@ -291,11 +323,13 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
//sys Symlink(path string, link string) (err error)
+//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
//sys Sync() (err error)
//sys Truncate(path string, length int64) (err error)
//sys Umask(newmask int) (oldmask int)
//sys Undelete(path string) (err error)
//sys Unlink(path string) (err error)
+//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
@@ -485,7 +519,6 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
// Sendmsg_nocancel
// Recvfrom_nocancel
// Accept_nocancel
-// Msync_nocancel
// Fcntl_nocancel
// Select_nocancel
// Fsync_nocancel
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
index 3195c8bf5..c172a3da5 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
@@ -21,8 +21,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
index 7adb98ded..c6c99c13a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
@@ -11,8 +11,6 @@ import (
"unsafe"
)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
@@ -23,8 +21,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
index e47ffd739..d286cf408 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
@@ -19,8 +19,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
index 2560a9599..c33905cdc 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
@@ -21,8 +21,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index fbbe0dce2..7e0210fc9 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -1,8 +1,8 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
+// Copyright 2009 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.
-// FreeBSD system calls.
+// DragonFly BSD system calls.
// This file is compiled as ordinary Go code,
// but it is also input to mksyscall,
// which parses the //sys lines and generates system call stubs.
@@ -34,7 +34,7 @@ func nametomib(name string) (mib []_C_int, err error) {
// NOTE(rsc): It seems strange to set the buffer to have
// size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
+ // as the size. I don't know why the +2 is here, but the
// kernel uses +2 for its own implementation of this function.
// I am scared that if we don't include the +2 here, the kernel
// will silently write 2 words farther than we specify
@@ -56,29 +56,20 @@ func nametomib(name string) (mib []_C_int, err error) {
return buf[0 : n/siz], nil
}
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- reclen := int(16+dirent.Namlen+1+7) & ^7
- buf = buf[reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ namlen, ok := direntNamlen(buf)
+ if !ok {
+ return 0, false
}
- return origlen - len(buf), count, names
+ return (16 + namlen + 1 + 7) &^ 7, true
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
//sysnb pipe() (r int, w int, err error)
@@ -101,6 +92,24 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
return extpwrite(fd, p, 0, offset)
}
+func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ nfd, err = accept4(fd, &rsa, &len, flags)
+ if err != nil {
+ return
+ }
+ if len > SizeofSockaddrAny {
+ panic("RawSockaddrAny too small")
+ }
+ sa, err = anyToSockaddr(&rsa)
+ if err != nil {
+ Close(nfd)
+ nfd = 0
+ }
+ return
+}
+
func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
var _p0 unsafe.Pointer
var bufsize uintptr
@@ -208,6 +217,7 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
//sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
+//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
/*
* Unimplemented
@@ -243,6 +253,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// Kdebug_trace
// Sigreturn
// Mmap
+// Mlock
+// Munlock
// Atsocket
// Kqueue_from_portset_np
// Kqueue_portset
@@ -335,6 +347,8 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
// Lio_listio
// __pthread_cond_wait
// Iopolicysys
+// Mlockall
+// Munlockall
// __pthread_kill
// __pthread_sigmask
// __sigwait
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
index 2ed92590e..da7cb7982 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
@@ -21,8 +21,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = nsec % 1e9 / 1e3
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index ec56ed608..e93356b4f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -54,32 +54,16 @@ func nametomib(name string) (mib []_C_int, err error) {
return buf[0 : n/siz], nil
}
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
//sysnb pipe() (r int, w int, err error)
@@ -368,11 +352,53 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
return s, e
}
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
/*
* Exposed directly
*/
//sys Access(path string, mode uint32) (err error)
//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
+//sys CapEnter() (err error)
+//sys capRightsGet(version int, fd int, rightsp *CapRights) (err error) = SYS___CAP_RIGHTS_GET
+//sys capRightsLimit(fd int, rightsp *CapRights) (err error)
//sys Chdir(path string) (err error)
//sys Chflags(path string, flags int) (err error)
//sys Chmod(path string, mode uint32) (err error)
@@ -395,10 +421,13 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
//sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
//sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
+//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchdir(fd int) (err error)
//sys Fchflags(fd int, flags int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
+//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
@@ -425,9 +454,11 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
//sys Kqueue() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Link(path string, link string) (err error)
+//sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error)
//sys Listen(s int, backlog int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Mkdir(path string, mode uint32) (err error)
+//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mkfifo(path string, mode uint32) (err error)
//sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mlock(b []byte) (err error)
@@ -437,12 +468,15 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
//sys Munlockall() (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error)
+//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
+//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error)
+//sys Renameat(fromfd int, from string, tofd int, to string) (err error)
//sys Revoke(path string) (err error)
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
@@ -464,11 +498,13 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, stat *Statfs_t) (err error)
//sys Symlink(path string, link string) (err error)
+//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
//sys Sync() (err error)
//sys Truncate(path string, length int64) (err error)
//sys Umask(newmask int) (oldmask int)
//sys Undelete(path string) (err error)
//sys Unlink(path string) (err error)
+//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
index 6255d40ff..6a0cd804d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
@@ -21,8 +21,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
index 8b395d596..e142540ef 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
@@ -21,8 +21,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = nsec % 1e9 / 1e3
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
index 4e72d46a8..5504cb125 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
@@ -21,8 +21,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return tv.Sec*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 5048e563b..bb9022571 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -36,10 +36,63 @@ func Creat(path string, mode uint32) (fd int, err error) {
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
}
-//sys linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
+//sys fchmodat(dirfd int, path string, mode uint32) (err error)
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+ // Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior
+ // and check the flags. Otherwise the mode would be applied to the symlink
+ // destination which is not what the user expects.
+ if flags&^AT_SYMLINK_NOFOLLOW != 0 {
+ return EINVAL
+ } else if flags&AT_SYMLINK_NOFOLLOW != 0 {
+ return EOPNOTSUPP
+ }
+ return fchmodat(dirfd, path, mode)
+}
+
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
func Link(oldpath string, newpath string) (err error) {
- return linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0)
+ return Linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0)
}
func Mkdir(path string, mode uint32) (err error) {
@@ -60,10 +113,19 @@ func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
return openat(dirfd, path, flags|O_LARGEFILE, mode)
}
-//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error)
+//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
+
+func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ if len(fds) == 0 {
+ return ppoll(nil, 0, timeout, sigmask)
+ }
+ return ppoll(&fds[0], len(fds), timeout, sigmask)
+}
+
+//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
func Readlink(path string, buf []byte) (n int, err error) {
- return readlinkat(AT_FDCWD, path, buf)
+ return Readlinkat(AT_FDCWD, path, buf)
}
func Rename(oldpath string, newpath string) (err error) {
@@ -71,34 +133,41 @@ func Rename(oldpath string, newpath string) (err error) {
}
func Rmdir(path string) error {
- return unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
+ return Unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
}
-//sys symlinkat(oldpath string, newdirfd int, newpath string) (err error)
+//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
func Symlink(oldpath string, newpath string) (err error) {
- return symlinkat(oldpath, AT_FDCWD, newpath)
+ return Symlinkat(oldpath, AT_FDCWD, newpath)
}
func Unlink(path string) error {
- return unlinkat(AT_FDCWD, path, 0)
+ return Unlinkat(AT_FDCWD, path, 0)
}
-//sys unlinkat(dirfd int, path string, flags int) (err error)
-
-func Unlinkat(dirfd int, path string, flags int) error {
- return unlinkat(dirfd, path, flags)
-}
+//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys utimes(path string, times *[2]Timeval) (err error)
-func Utimes(path string, tv []Timeval) (err error) {
+func Utimes(path string, tv []Timeval) error {
if tv == nil {
+ err := utimensat(AT_FDCWD, path, nil, 0)
+ if err != ENOSYS {
+ return err
+ }
return utimes(path, nil)
}
if len(tv) != 2 {
return EINVAL
}
+ var ts [2]Timespec
+ ts[0] = NsecToTimespec(TimevalToNsec(tv[0]))
+ ts[1] = NsecToTimespec(TimevalToNsec(tv[1]))
+ err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+ if err != ENOSYS {
+ return err
+ }
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
}
@@ -123,8 +192,7 @@ func UtimesNano(path string, ts []Timespec) error {
// in 2.6.22, Released, 8 July 2007) then fall back to utimes
var tv [2]Timeval
for i := 0; i < 2; i++ {
- tv[i].Sec = ts[i].Sec
- tv[i].Usec = ts[i].Nsec / 1000
+ tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
}
return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
}
@@ -284,10 +352,14 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
return
}
-func Mkfifo(path string, mode uint32) (err error) {
+func Mkfifo(path string, mode uint32) error {
return Mknod(path, mode|S_IFIFO, 0)
}
+func Mkfifoat(dirfd int, path string, mode uint32) error {
+ return Mknodat(dirfd, path, mode|S_IFIFO, 0)
+}
+
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
if sa.Port < 0 || sa.Port > 0xFFFF {
return nil, 0, EINVAL
@@ -383,6 +455,181 @@ func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
}
+type SockaddrHCI struct {
+ Dev uint16
+ Channel uint16
+ raw RawSockaddrHCI
+}
+
+func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_BLUETOOTH
+ sa.raw.Dev = sa.Dev
+ sa.raw.Channel = sa.Channel
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil
+}
+
+// SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets.
+// The RxID and TxID fields are used for transport protocol addressing in
+// (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with
+// zero values for CAN_RAW and CAN_BCM sockets as they have no meaning.
+//
+// The SockaddrCAN struct must be bound to the socket file descriptor
+// using Bind before the CAN socket can be used.
+//
+// // Read one raw CAN frame
+// fd, _ := Socket(AF_CAN, SOCK_RAW, CAN_RAW)
+// addr := &SockaddrCAN{Ifindex: index}
+// Bind(fd, addr)
+// frame := make([]byte, 16)
+// Read(fd, frame)
+//
+// The full SocketCAN documentation can be found in the linux kernel
+// archives at: https://www.kernel.org/doc/Documentation/networking/can.txt
+type SockaddrCAN struct {
+ Ifindex int
+ RxID uint32
+ TxID uint32
+ raw RawSockaddrCAN
+}
+
+func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Family = AF_CAN
+ sa.raw.Ifindex = int32(sa.Ifindex)
+ rx := (*[4]byte)(unsafe.Pointer(&sa.RxID))
+ for i := 0; i < 4; i++ {
+ sa.raw.Addr[i] = rx[i]
+ }
+ tx := (*[4]byte)(unsafe.Pointer(&sa.TxID))
+ for i := 0; i < 4; i++ {
+ sa.raw.Addr[i+4] = tx[i]
+ }
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
+}
+
+// SockaddrALG implements the Sockaddr interface for AF_ALG type sockets.
+// SockaddrALG enables userspace access to the Linux kernel's cryptography
+// subsystem. The Type and Name fields specify which type of hash or cipher
+// should be used with a given socket.
+//
+// To create a file descriptor that provides access to a hash or cipher, both
+// Bind and Accept must be used. Once the setup process is complete, input
+// data can be written to the socket, processed by the kernel, and then read
+// back as hash output or ciphertext.
+//
+// Here is an example of using an AF_ALG socket with SHA1 hashing.
+// The initial socket setup process is as follows:
+//
+// // Open a socket to perform SHA1 hashing.
+// fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0)
+// addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"}
+// unix.Bind(fd, addr)
+// // Note: unix.Accept does not work at this time; must invoke accept()
+// // manually using unix.Syscall.
+// hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0)
+//
+// Once a file descriptor has been returned from Accept, it may be used to
+// perform SHA1 hashing. The descriptor is not safe for concurrent use, but
+// may be re-used repeatedly with subsequent Write and Read operations.
+//
+// When hashing a small byte slice or string, a single Write and Read may
+// be used:
+//
+// // Assume hashfd is already configured using the setup process.
+// hash := os.NewFile(hashfd, "sha1")
+// // Hash an input string and read the results. Each Write discards
+// // previous hash state. Read always reads the current state.
+// b := make([]byte, 20)
+// for i := 0; i < 2; i++ {
+// io.WriteString(hash, "Hello, world.")
+// hash.Read(b)
+// fmt.Println(hex.EncodeToString(b))
+// }
+// // Output:
+// // 2ae01472317d1935a84797ec1983ae243fc6aa28
+// // 2ae01472317d1935a84797ec1983ae243fc6aa28
+//
+// For hashing larger byte slices, or byte streams such as those read from
+// a file or socket, use Sendto with MSG_MORE to instruct the kernel to update
+// the hash digest instead of creating a new one for a given chunk and finalizing it.
+//
+// // Assume hashfd and addr are already configured using the setup process.
+// hash := os.NewFile(hashfd, "sha1")
+// // Hash the contents of a file.
+// f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz")
+// b := make([]byte, 4096)
+// for {
+// n, err := f.Read(b)
+// if err == io.EOF {
+// break
+// }
+// unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr)
+// }
+// hash.Read(b)
+// fmt.Println(hex.EncodeToString(b))
+// // Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5
+//
+// For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html.
+type SockaddrALG struct {
+ Type string
+ Name string
+ Feature uint32
+ Mask uint32
+ raw RawSockaddrALG
+}
+
+func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ // Leave room for NUL byte terminator.
+ if len(sa.Type) > 13 {
+ return nil, 0, EINVAL
+ }
+ if len(sa.Name) > 63 {
+ return nil, 0, EINVAL
+ }
+
+ sa.raw.Family = AF_ALG
+ sa.raw.Feat = sa.Feature
+ sa.raw.Mask = sa.Mask
+
+ typ, err := ByteSliceFromString(sa.Type)
+ if err != nil {
+ return nil, 0, err
+ }
+ name, err := ByteSliceFromString(sa.Name)
+ if err != nil {
+ return nil, 0, err
+ }
+
+ copy(sa.raw.Type[:], typ)
+ copy(sa.raw.Name[:], name)
+
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil
+}
+
+// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
+// SockaddrVM provides access to Linux VM sockets: a mechanism that enables
+// bidirectional communication between a hypervisor and its guest virtual
+// machines.
+type SockaddrVM struct {
+ // CID and Port specify a context ID and port address for a VM socket.
+ // Guests have a unique CID, and hosts may have a well-known CID of:
+ // - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
+ // - VMADDR_CID_HOST: refers to other processes on the host.
+ CID uint32
+ Port uint32
+ raw RawSockaddrVM
+}
+
+func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_VSOCK
+ sa.raw.Port = sa.Port
+ sa.raw.Cid = sa.CID
+
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
+}
+
func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_NETLINK:
@@ -452,6 +699,14 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Addr[i] = pp.Addr[i]
}
return sa, nil
+
+ case AF_VSOCK:
+ pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
+ sa := &SockaddrVM{
+ CID: pp.Cid,
+ Port: pp.Port,
+ }
+ return sa, nil
}
return nil, EAFNOSUPPORT
}
@@ -546,10 +801,124 @@ func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {
return &value, err
}
+func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {
+ var value TCPInfo
+ vallen := _Socklen(SizeofTCPInfo)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
}
+// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
+
+// KeyctlInt calls keyctl commands in which each argument is an int.
+// These commands are KEYCTL_REVOKE, KEYCTL_CHOWN, KEYCTL_CLEAR, KEYCTL_LINK,
+// KEYCTL_UNLINK, KEYCTL_NEGATE, KEYCTL_SET_REQKEY_KEYRING, KEYCTL_SET_TIMEOUT,
+// KEYCTL_ASSUME_AUTHORITY, KEYCTL_SESSION_TO_PARENT, KEYCTL_REJECT,
+// KEYCTL_INVALIDATE, and KEYCTL_GET_PERSISTENT.
+//sys KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) = SYS_KEYCTL
+
+// KeyctlBuffer calls keyctl commands in which the third and fourth
+// arguments are a buffer and its length, respectively.
+// These commands are KEYCTL_UPDATE, KEYCTL_READ, and KEYCTL_INSTANTIATE.
+//sys KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) = SYS_KEYCTL
+
+// KeyctlString calls keyctl commands which return a string.
+// These commands are KEYCTL_DESCRIBE and KEYCTL_GET_SECURITY.
+func KeyctlString(cmd int, id int) (string, error) {
+ // We must loop as the string data may change in between the syscalls.
+ // We could allocate a large buffer here to reduce the chance that the
+ // syscall needs to be called twice; however, this is unnecessary as
+ // the performance loss is negligible.
+ var buffer []byte
+ for {
+ // Try to fill the buffer with data
+ length, err := KeyctlBuffer(cmd, id, buffer, 0)
+ if err != nil {
+ return "", err
+ }
+
+ // Check if the data was written
+ if length <= len(buffer) {
+ // Exclude the null terminator
+ return string(buffer[:length-1]), nil
+ }
+
+ // Make a bigger buffer if needed
+ buffer = make([]byte, length)
+ }
+}
+
+// Keyctl commands with special signatures.
+
+// KeyctlGetKeyringID implements the KEYCTL_GET_KEYRING_ID command.
+// See the full documentation at:
+// http://man7.org/linux/man-pages/man3/keyctl_get_keyring_ID.3.html
+func KeyctlGetKeyringID(id int, create bool) (ringid int, err error) {
+ createInt := 0
+ if create {
+ createInt = 1
+ }
+ return KeyctlInt(KEYCTL_GET_KEYRING_ID, id, createInt, 0, 0)
+}
+
+// KeyctlSetperm implements the KEYCTL_SETPERM command. The perm value is the
+// key handle permission mask as described in the "keyctl setperm" section of
+// http://man7.org/linux/man-pages/man1/keyctl.1.html.
+// See the full documentation at:
+// http://man7.org/linux/man-pages/man3/keyctl_setperm.3.html
+func KeyctlSetperm(id int, perm uint32) error {
+ _, err := KeyctlInt(KEYCTL_SETPERM, id, int(perm), 0, 0)
+ return err
+}
+
+//sys keyctlJoin(cmd int, arg2 string) (ret int, err error) = SYS_KEYCTL
+
+// KeyctlJoinSessionKeyring implements the KEYCTL_JOIN_SESSION_KEYRING command.
+// See the full documentation at:
+// http://man7.org/linux/man-pages/man3/keyctl_join_session_keyring.3.html
+func KeyctlJoinSessionKeyring(name string) (ringid int, err error) {
+ return keyctlJoin(KEYCTL_JOIN_SESSION_KEYRING, name)
+}
+
+//sys keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) = SYS_KEYCTL
+
+// KeyctlSearch implements the KEYCTL_SEARCH command.
+// See the full documentation at:
+// http://man7.org/linux/man-pages/man3/keyctl_search.3.html
+func KeyctlSearch(ringid int, keyType, description string, destRingid int) (id int, err error) {
+ return keyctlSearch(KEYCTL_SEARCH, ringid, keyType, description, destRingid)
+}
+
+//sys keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) = SYS_KEYCTL
+
+// KeyctlInstantiateIOV implements the KEYCTL_INSTANTIATE_IOV command. This
+// command is similar to KEYCTL_INSTANTIATE, except that the payload is a slice
+// of Iovec (each of which represents a buffer) instead of a single buffer.
+// See the full documentation at:
+// http://man7.org/linux/man-pages/man3/keyctl_instantiate_iov.3.html
+func KeyctlInstantiateIOV(id int, payload []Iovec, ringid int) error {
+ return keyctlIOV(KEYCTL_INSTANTIATE_IOV, id, payload, ringid)
+}
+
+//sys keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) = SYS_KEYCTL
+
+// KeyctlDHCompute implements the KEYCTL_DH_COMPUTE command. This command
+// computes a Diffie-Hellman shared secret based on the provide params. The
+// secret is written to the provided buffer and the returned size is the number
+// of bytes written (returning an error if there is insufficient space in the
+// buffer). If a nil buffer is passed in, this function returns the minimum
+// buffer length needed to store the appropriate data. Note that this differs
+// from KEYCTL_READ's behavior which always returns the requested payload size.
+// See the full documentation at:
+// http://man7.org/linux/man-pages/man3/keyctl_dh_compute.3.html
+func KeyctlDHCompute(params *KeyctlDHParams, buffer []byte) (size int, err error) {
+ return keyctlDH(KEYCTL_DH_COMPUTE, params, buffer)
+}
+
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var msg Msghdr
var rsa RawSockaddrAny
@@ -683,6 +1052,10 @@ func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
return ptracePeek(PTRACE_PEEKDATA, pid, addr, out)
}
+func PtracePeekUser(pid int, addr uintptr, out []byte) (count int, err error) {
+ return ptracePeek(PTRACE_PEEKUSR, pid, addr, out)
+}
+
func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {
// As for ptracePeek, we need to align our accesses to deal
// with the possibility of straddling an invalid page.
@@ -781,38 +1154,24 @@ func Reboot(cmd int) (err error) {
return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
}
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
func ReadDirent(fd int, buf []byte) (n int, err error) {
return Getdents(fd, buf)
}
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- count = 0
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ reclen, ok := direntReclen(buf)
+ if !ok {
+ return 0, false
}
- return origlen - len(buf), count, names
+ return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
}
//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
@@ -838,23 +1197,24 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
* Direct access
*/
//sys Acct(path string) (err error)
+//sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
//sys Adjtimex(buf *Timex) (state int, err error)
//sys Chdir(path string) (err error)
//sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error)
+//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Dup(oldfd int) (fd int, err error)
//sys Dup3(oldfd int, newfd int, flags int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sysnb EpollCreate1(flag int) (fd int, err error)
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2
//sys Exit(code int) = SYS_EXIT_GROUP
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
//sys Fchdir(fd int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
//sys Fdatasync(fd int) (err error)
@@ -871,7 +1231,9 @@ func Getpgrp() (pid int) {
//sysnb Getpid() (pid int)
//sysnb Getppid() (ppid int)
//sys Getpriority(which int, who int) (prio int, err error)
+//sys Getrandom(buf []byte, flags int) (n int, err error)
//sysnb Getrusage(who int, rusage *Rusage) (err error)
+//sysnb Getsid(pid int) (sid int, err error)
//sysnb Gettid() (tid int)
//sys Getxattr(path string, attr string, dest []byte) (sz int, err error)
//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
@@ -879,22 +1241,27 @@ func Getpgrp() (pid int) {
//sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
//sysnb Kill(pid int, sig syscall.Signal) (err error)
//sys Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG
+//sys Lgetxattr(path string, attr string, dest []byte) (sz int, err error)
//sys Listxattr(path string, dest []byte) (sz int, err error)
+//sys Llistxattr(path string, dest []byte) (sz int, err error)
+//sys Lremovexattr(path string, attr string) (err error)
+//sys Lsetxattr(path string, attr string, data []byte, flags int) (err error)
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Pause() (err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64
+//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Removexattr(path string, attr string) (err error)
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
+//sys RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
//sys Setdomainname(p []byte) (err error)
//sys Sethostname(p []byte) (err error)
//sysnb Setpgid(pid int, pgid int) (err error)
//sysnb Setsid() (pid int, err error)
//sysnb Settimeofday(tv *Timeval) (err error)
+//sys Setns(fd int, nstype int) (err error)
// issue 1435.
// On linux Setuid and Setgid only affects the current thread, not the process.
@@ -912,6 +1279,7 @@ func Setgid(uid int) (err error) {
//sys Setpriority(which int, who int, prio int) (err error)
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
//sys Sync()
+//sys Syncfs(fd int) (err error)
//sysnb Sysinfo(info *Sysinfo_t) (err error)
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
@@ -921,7 +1289,6 @@ func Setgid(uid int) (err error) {
//sys Unmount(target string, flags int) (err error) = SYS_UMOUNT2
//sys Unshare(flags int) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys Utime(path string, buf *Utimbuf) (err error)
//sys write(fd int, p []byte) (n int, err error)
//sys exitThread(code int) (err error) = SYS_EXIT
//sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
@@ -949,12 +1316,31 @@ func Munmap(b []byte) (err error) {
//sys Mlock(b []byte) (err error)
//sys Munlock(b []byte) (err error)
//sys Mlockall(flags int) (err error)
+//sys Msync(b []byte, flags int) (err error)
//sys Munlockall() (err error)
+// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
+// using the specified flags.
+func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
+ n, _, errno := Syscall6(
+ SYS_VMSPLICE,
+ uintptr(fd),
+ uintptr(unsafe.Pointer(&iovs[0])),
+ uintptr(len(iovs)),
+ uintptr(flags),
+ 0,
+ 0,
+ )
+ if errno != 0 {
+ return 0, syscall.Errno(errno)
+ }
+
+ return int(n), nil
+}
+
/*
* Unimplemented
*/
-// AddKey
// AfsSyscall
// Alarm
// ArchPrctl
@@ -970,7 +1356,6 @@ func Munmap(b []byte) (err error) {
// EpollCtlOld
// EpollPwait
// EpollWaitOld
-// Eventfd
// Execve
// Fgetxattr
// Flistxattr
@@ -989,16 +1374,10 @@ func Munmap(b []byte) (err error) {
// IoGetevents
// IoSetup
// IoSubmit
-// Ioctl
// IoprioGet
// IoprioSet
// KexecLoad
-// Keyctl
-// Lgetxattr
-// Llistxattr
// LookupDcookie
-// Lremovexattr
-// Lsetxattr
// Mbind
// MigratePages
// Mincore
@@ -1017,12 +1396,9 @@ func Munmap(b []byte) (err error) {
// Msgget
// Msgrcv
// Msgsnd
-// Msync
// Newfstatat
// Nfsservctl
// Personality
-// Poll
-// Ppoll
// Pselect6
// Ptrace
// Putpmsg
@@ -1031,7 +1407,6 @@ func Munmap(b []byte) (err error) {
// Readahead
// Readv
// RemapFilePages
-// RequestKey
// RestartSyscall
// RtSigaction
// RtSigpending
@@ -1080,7 +1455,6 @@ func Munmap(b []byte) (err error) {
// Utimensat
// Vfork
// Vhangup
-// Vmsplice
// Vserver
// Waitid
// _Sysctl
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index 7171219af..2b881b979 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -24,8 +24,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Sec = int32(nsec / 1e9)
@@ -93,6 +91,8 @@ func Pipe2(p []int, flags int) (err error) {
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Pause() (err error)
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
page := uintptr(offset / 4096)
@@ -181,6 +181,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
//sysnb Gettimeofday(tv *Timeval) (err error)
//sysnb Time(t *Time_t) (tt Time_t, err error)
+//sys Utime(path string, buf *Utimbuf) (err error)
+
// On x86 Linux, all the socket calls go through an extra indirection,
// I think because the 5-register system call interface can't handle
// the 6-argument calls like sendto and recvfrom. Instead the
@@ -386,3 +388,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index ae70c2afc..9516a3fd7 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -6,9 +6,8 @@
package unix
-import "syscall"
-
//sys Dup2(oldfd int, newfd int) (err error)
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
@@ -25,6 +24,7 @@ import "syscall"
//sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error)
+//sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
@@ -61,9 +61,6 @@ import "syscall"
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-//go:noescape
-func gettimeofday(tv *Timeval) (err syscall.Errno)
-
func Gettimeofday(tv *Timeval) (err error) {
errno := gettimeofday(tv)
if errno != 0 {
@@ -86,6 +83,8 @@ func Time(t *Time_t) (tt Time_t, err error) {
return Time_t(tv.Sec), nil
}
+//sys Utime(path string, buf *Utimbuf) (err error)
+
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimespec(nsec int64) (ts Timespec) {
@@ -94,8 +93,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Sec = nsec / 1e9
@@ -144,3 +141,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
new file mode 100644
index 000000000..21a4946ba
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
@@ -0,0 +1,13 @@
+// Copyright 2016 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.
+
+// +build amd64,linux
+// +build !gccgo
+
+package unix
+
+import "syscall"
+
+//go:noescape
+func gettimeofday(tv *Timeval) (err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index abc41c3ea..71d870228 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -108,7 +108,28 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// Vsyscalls on amd64.
//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Pause() (err error)
+
+func Time(t *Time_t) (Time_t, error) {
+ var tv Timeval
+ err := Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+func Utime(path string, buf *Utimbuf) error {
+ tv := []Timeval{
+ {Sec: buf.Actime},
+ {Sec: buf.Modtime},
+ }
+ return Utimes(path, tv)
+}
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
@@ -158,7 +179,7 @@ type rlimit32 struct {
Max uint32
}
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
const rlimInf32 = ^uint32(0)
const rlimInf64 = ^uint64(0)
@@ -231,3 +252,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index f3d72dfd3..4a136396c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -6,8 +6,7 @@
package unix
-const _SYS_dup = SYS_DUP3
-
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
@@ -70,7 +69,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
func Getpagesize() int { return 65536 }
//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
@@ -80,8 +78,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Sec = nsec / 1e9
@@ -89,6 +85,26 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
return
}
+func Time(t *Time_t) (Time_t, error) {
+ var tv Timeval
+ err := Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+func Utime(path string, buf *Utimbuf) error {
+ tv := []Timeval{
+ {Sec: buf.Actime},
+ {Sec: buf.Modtime},
+ }
+ return Utimes(path, tv)
+}
+
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
@@ -133,6 +149,18 @@ func InotifyInit() (fd int, err error) {
return InotifyInit1(0)
}
+func Dup2(oldfd int, newfd int) (err error) {
+ return Dup3(oldfd, newfd, 0)
+}
+
+func Pause() (err error) {
+ _, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove
// these when the deprecated syscalls that the syscall package relies on
// are removed.
@@ -148,3 +176,15 @@ const (
SYS_EPOLL_CREATE = 1042
SYS_EPOLL_WAIT = 1069
)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ var ts *Timespec
+ if timeout >= 0 {
+ ts = new(Timespec)
+ *ts = NsecToTimespec(int64(timeout) * 1e6)
+ }
+ if len(fds) == 0 {
+ return ppoll(nil, 0, ts, nil)
+ }
+ return ppoll(&fds[0], len(fds), ts, nil)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
new file mode 100644
index 000000000..73318e5c6
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -0,0 +1,209 @@
+// Copyright 2015 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.
+
+// +build linux
+// +build mips64 mips64le
+
+package unix
+
+//sys Dup2(oldfd int, newfd int) (err error)
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fstatfs(fd int, buf *Statfs_t) (err error)
+//sys Ftruncate(fd int, length int64) (err error)
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Getuid() (uid int)
+//sys Lchown(path string, uid int, gid int) (err error)
+//sys Listen(s int, n int) (err error)
+//sys Pause() (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
+//sys Setfsgid(gid int) (err error)
+//sys Setfsuid(uid int) (err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb Setresuid(ruid int, euid int, suid int) (err error)
+//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Shutdown(fd int, how int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+//sys Statfs(path string, buf *Statfs_t) (err error)
+//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
+//sys Truncate(path string, length int64) (err error)
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
+
+func Getpagesize() int { return 65536 }
+
+//sysnb Gettimeofday(tv *Timeval) (err error)
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ var tv Timeval
+ err = Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+//sys Utime(path string, buf *Utimbuf) (err error)
+
+func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
+
+func NsecToTimespec(nsec int64) (ts Timespec) {
+ ts.Sec = nsec / 1e9
+ ts.Nsec = nsec % 1e9
+ return
+}
+
+func NsecToTimeval(nsec int64) (tv Timeval) {
+ nsec += 999 // round up to microsecond
+ tv.Sec = nsec / 1e9
+ tv.Usec = nsec % 1e9 / 1e3
+ return
+}
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, 0)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+func Ioperm(from int, num int, on int) (err error) {
+ return ENOSYS
+}
+
+func Iopl(level int) (err error) {
+ return ENOSYS
+}
+
+type stat_t struct {
+ Dev uint32
+ Pad0 [3]int32
+ Ino uint64
+ Mode uint32
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev uint32
+ Pad1 [3]uint32
+ Size int64
+ Atime uint32
+ Atime_nsec uint32
+ Mtime uint32
+ Mtime_nsec uint32
+ Ctime uint32
+ Ctime_nsec uint32
+ Blksize uint32
+ Pad2 uint32
+ Blocks int64
+}
+
+//sys fstat(fd int, st *stat_t) (err error)
+//sys lstat(path string, st *stat_t) (err error)
+//sys stat(path string, st *stat_t) (err error)
+
+func Fstat(fd int, s *Stat_t) (err error) {
+ st := &stat_t{}
+ err = fstat(fd, st)
+ fillStat_t(s, st)
+ return
+}
+
+func Lstat(path string, s *Stat_t) (err error) {
+ st := &stat_t{}
+ err = lstat(path, st)
+ fillStat_t(s, st)
+ return
+}
+
+func Stat(path string, s *Stat_t) (err error) {
+ st := &stat_t{}
+ err = stat(path, st)
+ fillStat_t(s, st)
+ return
+}
+
+func fillStat_t(s *Stat_t, st *stat_t) {
+ s.Dev = st.Dev
+ s.Ino = st.Ino
+ s.Mode = st.Mode
+ s.Nlink = st.Nlink
+ s.Uid = st.Uid
+ s.Gid = st.Gid
+ s.Rdev = st.Rdev
+ s.Size = st.Size
+ s.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)}
+ s.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)}
+ s.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)}
+ s.Blksize = st.Blksize
+ s.Blocks = st.Blocks
+}
+
+func (r *PtraceRegs) PC() uint64 { return r.Epc }
+
+func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint64(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint64(length)
+}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
new file mode 100644
index 000000000..b83d93fdf
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -0,0 +1,239 @@
+// Copyright 2016 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.
+
+// +build linux
+// +build mips mipsle
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
+
+//sys Dup2(oldfd int, newfd int) (err error)
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getuid() (uid int)
+//sys Lchown(path string, uid int, gid int) (err error)
+//sys Listen(s int, n int) (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
+//sys Setfsgid(gid int) (err error)
+//sys Setfsuid(uid int) (err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb Setresuid(ruid int, euid int, suid int) (err error)
+
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Shutdown(fd int, how int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+
+//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
+//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+
+//sysnb InotifyInit() (fd int, err error)
+//sys Ioperm(from int, num int, on int) (err error)
+//sys Iopl(level int) (err error)
+
+//sysnb Gettimeofday(tv *Timeval) (err error)
+//sysnb Time(t *Time_t) (tt Time_t, err error)
+
+//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
+//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
+//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
+
+//sys Utime(path string, buf *Utimbuf) (err error)
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Pause() (err error)
+
+func Fstatfs(fd int, buf *Statfs_t) (err error) {
+ _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
+ if e != 0 {
+ err = errnoErr(e)
+ }
+ return
+}
+
+func Statfs(path string, buf *Statfs_t) (err error) {
+ p, err := BytePtrFromString(path)
+ if err != nil {
+ return err
+ }
+ _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(p)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
+ if e != 0 {
+ err = errnoErr(e)
+ }
+ return
+}
+
+func Seek(fd int, offset int64, whence int) (off int64, err error) {
+ _, _, e := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offset>>32), uintptr(offset), uintptr(unsafe.Pointer(&off)), uintptr(whence), 0)
+ if e != 0 {
+ err = errnoErr(e)
+ }
+ return
+}
+
+func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
+
+func NsecToTimespec(nsec int64) (ts Timespec) {
+ ts.Sec = int32(nsec / 1e9)
+ ts.Nsec = int32(nsec % 1e9)
+ return
+}
+
+func NsecToTimeval(nsec int64) (tv Timeval) {
+ nsec += 999 // round up to microsecond
+ tv.Sec = int32(nsec / 1e9)
+ tv.Usec = int32(nsec % 1e9 / 1e3)
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, 0)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
+
+func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
+ page := uintptr(offset / 4096)
+ if offset != int64(page)*4096 {
+ return 0, EINVAL
+ }
+ return mmap2(addr, length, prot, flags, fd, page)
+}
+
+const rlimInf32 = ^uint32(0)
+const rlimInf64 = ^uint64(0)
+
+type rlimit32 struct {
+ Cur uint32
+ Max uint32
+}
+
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ err = prlimit(0, resource, nil, rlim)
+ if err != ENOSYS {
+ return err
+ }
+
+ rl := rlimit32{}
+ err = getrlimit(resource, &rl)
+ if err != nil {
+ return
+ }
+
+ if rl.Cur == rlimInf32 {
+ rlim.Cur = rlimInf64
+ } else {
+ rlim.Cur = uint64(rl.Cur)
+ }
+
+ if rl.Max == rlimInf32 {
+ rlim.Max = rlimInf64
+ } else {
+ rlim.Max = uint64(rl.Max)
+ }
+ return
+}
+
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
+ err = prlimit(0, resource, rlim, nil)
+ if err != ENOSYS {
+ return err
+ }
+
+ rl := rlimit32{}
+ if rlim.Cur == rlimInf64 {
+ rl.Cur = rlimInf32
+ } else if rlim.Cur < uint64(rlimInf32) {
+ rl.Cur = uint32(rlim.Cur)
+ } else {
+ return EINVAL
+ }
+ if rlim.Max == rlimInf64 {
+ rl.Max = rlimInf32
+ } else if rlim.Max < uint64(rlimInf32) {
+ rl.Max = uint32(rlim.Max)
+ } else {
+ return EINVAL
+ }
+
+ return setrlimit(resource, &rl)
+}
+
+func (r *PtraceRegs) PC() uint64 { return r.Epc }
+
+func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint32(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
+
+func Getpagesize() int { return 4096 }
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index 67eed6334..60770f627 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -7,6 +7,8 @@
package unix
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Dup2(oldfd int, newfd int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
@@ -16,11 +18,13 @@ package unix
//sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
//sysnb Getuid() (uid int)
+//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error)
+//sys Pause() (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
@@ -62,6 +66,8 @@ func Getpagesize() int { return 65536 }
//sysnb Gettimeofday(tv *Timeval) (err error)
//sysnb Time(t *Time_t) (tt Time_t, err error)
+//sys Utime(path string, buf *Utimbuf) (err error)
+
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimespec(nsec int64) (ts Timespec) {
@@ -70,8 +76,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Sec = nsec / 1e9
@@ -94,3 +98,38 @@ func (msghdr *Msghdr) SetControllen(length int) {
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
+
+//sysnb pipe(p *[2]_C_int) (err error)
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe(&pp)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
new file mode 100644
index 000000000..1708a4bbf
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -0,0 +1,328 @@
+// Copyright 2016 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.
+
+// +build s390x,linux
+
+package unix
+
+import (
+ "unsafe"
+)
+
+//sys Dup2(oldfd int, newfd int) (err error)
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fstat(fd int, stat *Stat_t) (err error)
+//sys Fstatfs(fd int, buf *Statfs_t) (err error)
+//sys Ftruncate(fd int, length int64) (err error)
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Getuid() (uid int)
+//sysnb InotifyInit() (fd int, err error)
+//sys Lchown(path string, uid int, gid int) (err error)
+//sys Lstat(path string, stat *Stat_t) (err error)
+//sys Pause() (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
+//sys Setfsgid(gid int) (err error)
+//sys Setfsuid(uid int) (err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb Setresuid(ruid int, euid int, suid int) (err error)
+//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+//sys Stat(path string, stat *Stat_t) (err error)
+//sys Statfs(path string, buf *Statfs_t) (err error)
+//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
+//sys Truncate(path string, length int64) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+
+func Getpagesize() int { return 4096 }
+
+//sysnb Gettimeofday(tv *Timeval) (err error)
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ var tv Timeval
+ err = Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+//sys Utime(path string, buf *Utimbuf) (err error)
+
+func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
+
+func NsecToTimespec(nsec int64) (ts Timespec) {
+ ts.Sec = nsec / 1e9
+ ts.Nsec = nsec % 1e9
+ return
+}
+
+func NsecToTimeval(nsec int64) (tv Timeval) {
+ nsec += 999 // round up to microsecond
+ tv.Sec = nsec / 1e9
+ tv.Usec = nsec % 1e9 / 1e3
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+func Ioperm(from int, num int, on int) (err error) {
+ return ENOSYS
+}
+
+func Iopl(level int) (err error) {
+ return ENOSYS
+}
+
+func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }
+
+func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint64(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint64(length)
+}
+
+// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
+// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in .
+func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
+ mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)}
+ r0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0)
+ xaddr = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// On s390x Linux, all the socket calls go through an extra indirection.
+// The arguments to the underlying system call (SYS_SOCKETCALL) are the
+// number below and a pointer to an array of uintptr.
+const (
+ // see linux/net.h
+ netSocket = 1
+ netBind = 2
+ netConnect = 3
+ netListen = 4
+ netAccept = 5
+ netGetSockName = 6
+ netGetPeerName = 7
+ netSocketPair = 8
+ netSend = 9
+ netRecv = 10
+ netSendTo = 11
+ netRecvFrom = 12
+ netShutdown = 13
+ netSetSockOpt = 14
+ netGetSockOpt = 15
+ netSendMsg = 16
+ netRecvMsg = 17
+ netAccept4 = 18
+ netRecvMMsg = 19
+ netSendMMsg = 20
+)
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
+ args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
+ fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(fd), nil
+}
+
+func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
+ args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
+ fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(fd), nil
+}
+
+func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
+ args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
+ _, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
+ args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
+ _, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func socketpair(domain int, typ int, flags int, fd *[2]int32) error {
+ args := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))}
+ _, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) error {
+ args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
+ _, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) error {
+ args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
+ _, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func socket(domain int, typ int, proto int) (int, error) {
+ args := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)}
+ fd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(fd), nil
+}
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error {
+ args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))}
+ _, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
+ args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
+ _, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) {
+ var base uintptr
+ if len(p) > 0 {
+ base = uintptr(unsafe.Pointer(&p[0]))
+ }
+ args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))}
+ n, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(n), nil
+}
+
+func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error {
+ var base uintptr
+ if len(p) > 0 {
+ base = uintptr(unsafe.Pointer(&p[0]))
+ }
+ args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)}
+ _, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func recvmsg(s int, msg *Msghdr, flags int) (int, error) {
+ args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
+ n, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(n), nil
+}
+
+func sendmsg(s int, msg *Msghdr, flags int) (int, error) {
+ args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
+ n, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(n), nil
+}
+
+func Listen(s int, n int) error {
+ args := [2]uintptr{uintptr(s), uintptr(n)}
+ _, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+func Shutdown(s, how int) error {
+ args := [2]uintptr{uintptr(s), uintptr(how)}
+ _, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0)
+ if err != 0 {
+ return err
+ }
+ return nil
+}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
new file mode 100644
index 000000000..20b7454d7
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -0,0 +1,169 @@
+// Copyright 2009 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.
+
+// +build sparc64,linux
+
+package unix
+
+import (
+ "sync/atomic"
+ "syscall"
+)
+
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Dup2(oldfd int, newfd int) (err error)
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fstat(fd int, stat *Stat_t) (err error)
+//sys Fstatfs(fd int, buf *Statfs_t) (err error)
+//sys Ftruncate(fd int, length int64) (err error)
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Getuid() (uid int)
+//sysnb InotifyInit() (fd int, err error)
+//sys Lchown(path string, uid int, gid int) (err error)
+//sys Listen(s int, n int) (err error)
+//sys Lstat(path string, stat *Stat_t) (err error)
+//sys Pause() (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
+//sys Setfsgid(gid int) (err error)
+//sys Setfsuid(uid int) (err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb Setresuid(ruid int, euid int, suid int) (err error)
+//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Shutdown(fd int, how int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+//sys Stat(path string, stat *Stat_t) (err error)
+//sys Statfs(path string, buf *Statfs_t) (err error)
+//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
+//sys Truncate(path string, length int64) (err error)
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
+
+func sysconf(name int) (n int64, err syscall.Errno)
+
+// pageSize caches the value of Getpagesize, since it can't change
+// once the system is booted.
+var pageSize int64 // accessed atomically
+
+func Getpagesize() int {
+ n := atomic.LoadInt64(&pageSize)
+ if n == 0 {
+ n, _ = sysconf(_SC_PAGESIZE)
+ atomic.StoreInt64(&pageSize, n)
+ }
+ return int(n)
+}
+
+func Ioperm(from int, num int, on int) (err error) {
+ return ENOSYS
+}
+
+func Iopl(level int) (err error) {
+ return ENOSYS
+}
+
+//sysnb Gettimeofday(tv *Timeval) (err error)
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ var tv Timeval
+ err = Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+//sys Utime(path string, buf *Utimbuf) (err error)
+
+func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
+
+func NsecToTimespec(nsec int64) (ts Timespec) {
+ ts.Sec = nsec / 1e9
+ ts.Nsec = nsec % 1e9
+ return
+}
+
+func NsecToTimeval(nsec int64) (tv Timeval) {
+ nsec += 999 // round up to microsecond
+ tv.Sec = nsec / 1e9
+ tv.Usec = int32(nsec % 1e9 / 1e3)
+ return
+}
+
+func (r *PtraceRegs) PC() uint64 { return r.Tpc }
+
+func (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = pc }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint64(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint64(length)
+}
+
+//sysnb pipe(p *[2]_C_int) (err error)
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe(&pp)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index c4e945cd6..01f6a48c8 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -93,32 +93,16 @@ func nametomib(name string) (mib []_C_int, err error) {
return mib, nil
}
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
//sysnb pipe() (fd1 int, fd2 int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
index 1b0e1af12..afaca0983 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
@@ -16,8 +16,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
index 1b6dcbe35..a6ff04ce5 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
@@ -16,8 +16,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
index 87d1d6fed..68a6969b2 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
@@ -16,8 +16,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index 246131d2a..c0d2b6c80 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -53,32 +53,16 @@ func nametomib(name string) (mib []_C_int, err error) {
return nil, EINVAL
}
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Fileno == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:dirent.Namlen])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
//sysnb pipe(p *[2]_C_int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
index 9529b20e8..a66ddc59c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
@@ -16,8 +16,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
index fc6402946..0776c1faf 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
@@ -16,8 +16,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = nsec % 1e9 / 1e3
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
similarity index 51%
rename from vendor/golang.org/x/sys/unix/syscall_dragonfly_386.go
rename to vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
index 41c2e6978..14ddaf3f3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
@@ -1,32 +1,27 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2017 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.
-// +build 386,dragonfly
+// +build arm,openbsd
package unix
-import (
- "syscall"
- "unsafe"
-)
+import "syscall"
-func Getpagesize() int { return 4096 }
+func Getpagesize() int { return syscall.Getpagesize() }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
+ ts.Sec = int64(nsec / 1e9)
ts.Nsec = int32(nsec % 1e9)
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
+ tv.Sec = int64(nsec / 1e9)
return
}
@@ -47,17 +42,3 @@ func (msghdr *Msghdr) SetControllen(length int) {
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index eb489b159..0d4e5c4e6 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -44,46 +44,36 @@ func clen(n []byte) int {
return len(n)
}
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- for max != 0 && len(buf) > 0 {
- dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
- if dirent.Reclen == 0 {
- buf = nil
- break
- }
- buf = buf[dirent.Reclen:]
- if dirent.Ino == 0 { // File absent in directory.
- continue
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
- var name = string(bytes[0:clen(bytes[:])])
- if name == "." || name == ".." { // Useless names
- continue
- }
- max--
- count++
- names = append(names, name)
- }
- return origlen - len(buf), count, names
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
}
-func pipe() (r uintptr, w uintptr, err uintptr)
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ reclen, ok := direntReclen(buf)
+ if !ok {
+ return 0, false
+ }
+ return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
+}
+
+//sysnb pipe(p *[2]_C_int) (n int, err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
- r0, w0, e1 := pipe()
- if e1 != 0 {
- err = syscall.Errno(e1)
+ var pp [2]_C_int
+ n, err := pipe(&pp)
+ if n != 0 {
+ return err
}
- p[0], p[1] = int(r0), int(w0)
- return
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return nil
}
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
@@ -269,24 +259,34 @@ func (w WaitStatus) StopSignal() syscall.Signal {
func (w WaitStatus) TrapCause() int { return -1 }
-func wait4(pid uintptr, wstatus *WaitStatus, options uintptr, rusage *Rusage) (wpid uintptr, err uintptr)
+//sys wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error)
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- r0, e1 := wait4(uintptr(pid), wstatus, uintptr(options), rusage)
- if e1 != 0 {
- err = syscall.Errno(e1)
+func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) {
+ var status _C_int
+ rpid, err := wait4(int32(pid), &status, options, rusage)
+ wpid := int(rpid)
+ if wpid == -1 {
+ return wpid, err
}
- return int(r0), err
+ if wstatus != nil {
+ *wstatus = WaitStatus(status)
+ }
+ return wpid, nil
}
-func gethostname() (name string, err uintptr)
+//sys gethostname(buf []byte) (n int, err error)
func Gethostname() (name string, err error) {
- name, e1 := gethostname()
- if e1 != 0 {
- err = syscall.Errno(e1)
+ var buf [MaxHostNameLen]byte
+ n, err := gethostname(buf[:])
+ if n != 0 {
+ return "", err
}
- return name, err
+ n = clen(buf[:])
+ if n < 1 {
+ return "", EFAULT
+ }
+ return string(buf[:n]), nil
}
//sys utimes(path string, times *[2]Timeval) (err error)
@@ -422,7 +422,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
return
}
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var msg Msghdr
@@ -441,7 +441,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
iov.Base = &dummy
iov.SetLen(1)
}
- msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
+ msg.Accrightslen = int32(len(oob))
}
msg.Iov = &iov
msg.Iovlen = 1
@@ -461,7 +461,7 @@ func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
return
}
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
var ptr unsafe.Pointer
@@ -487,7 +487,7 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
iov.Base = &dummy
iov.SetLen(1)
}
- msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
+ msg.Accrightslen = int32(len(oob))
}
msg.Iov = &iov
msg.Iovlen = 1
@@ -519,43 +519,43 @@ func Acct(path string) (err error) {
* Expose the ioctl function
*/
-//sys ioctl(fd int, req int, arg uintptr) (err error)
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
-func IoctlSetInt(fd int, req int, value int) (err error) {
+func IoctlSetInt(fd int, req uint, value int) (err error) {
return ioctl(fd, req, uintptr(value))
}
-func IoctlSetWinsize(fd int, req int, value *Winsize) (err error) {
+func IoctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
-func IoctlSetTermios(fd int, req int, value *Termios) (err error) {
+func IoctlSetTermios(fd int, req uint, value *Termios) (err error) {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
-func IoctlSetTermio(fd int, req int, value *Termio) (err error) {
+func IoctlSetTermio(fd int, req uint, value *Termio) (err error) {
return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
}
-func IoctlGetInt(fd int, req int) (int, error) {
+func IoctlGetInt(fd int, req uint) (int, error) {
var value int
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return value, err
}
-func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
var value Winsize
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
-func IoctlGetTermios(fd int, req int) (*Termios, error) {
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
var value Termios
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
}
-func IoctlGetTermio(fd int, req int) (*Termio, error) {
+func IoctlGetTermio(fd int, req uint) (*Termio, error) {
var value Termio
err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
return &value, err
@@ -581,8 +581,10 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) {
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Fdatasync(fd int) (err error)
+//sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
+//sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error)
//sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error)
//sysnb Getgid() (gid int)
//sysnb Getpid() (pid int)
@@ -599,7 +601,7 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) {
//sys Kill(pid int, signum syscall.Signal) (err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error) = libsocket.listen
+//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_llisten
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Madvise(b []byte, advice int) (err error)
//sys Mkdir(path string, mode uint32) (err error)
@@ -639,6 +641,7 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) {
//sysnb Setuid(uid int) (err error)
//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
//sys Stat(path string, stat *Stat_t) (err error)
+//sys Statvfs(path string, vfsstat *Statvfs_t) (err error)
//sys Symlink(path string, link string) (err error)
//sys Sync() (err error)
//sysnb Times(tms *Tms) (ticks uintptr, err error)
@@ -652,15 +655,15 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) {
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys Utime(path string, buf *Utimbuf) (err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_bind
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_connect
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
//sys munmap(addr uintptr, length uintptr) (err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto
-//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_sendto
+//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.__xnet_socket
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.__xnet_socketpair
//sys write(fd int, p []byte) (n int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.__xnet_getsockopt
//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername
//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
index 2e44630cd..5aff62c3b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
@@ -14,8 +14,6 @@ func NsecToTimespec(nsec int64) (ts Timespec) {
return
}
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
func NsecToTimeval(nsec int64) (tv Timeval) {
nsec += 999 // round up to microsecond
tv.Usec = nsec % 1e9 / 1e3
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index b46b25028..3ed8a91f5 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -23,6 +23,7 @@ const (
darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8
dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4
+ solaris64Bit = runtime.GOOS == "solaris" && sizeofPtr == 8
)
// Do the interface allocations only once for common
@@ -49,11 +50,6 @@ func errnoErr(e syscall.Errno) error {
return e
}
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
// Mmap manager, for use by operating system-specific implementations.
type mmapper struct {
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
new file mode 100644
index 000000000..4cb8e8edf
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
@@ -0,0 +1,15 @@
+// Copyright 2016 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.
+
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build !gccgo
+
+package unix
+
+import "syscall"
+
+func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go
deleted file mode 100644
index 115326182..000000000
--- a/vendor/golang.org/x/sys/unix/types_darwin.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright 2009 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.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define __DARWIN_UNIX03 0
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timeval32 C.struct_timeval32
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat64
-
-type Statfs_t C.struct_statfs64
-
-type Flock_t C.struct_flock
-
-type Fstore_t C.struct_fstore
-
-type Radvisory_t C.struct_radvisory
-
-type Fbootstraptransfer_t C.struct_fbootstraptransfer
-
-type Log2phys_t C.struct_log2phys
-
-type Fsid C.struct_fsid
-
-type Dirent C.struct_dirent
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfmaMsghdr2 C.struct_ifma_msghdr2
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-// fchmodat-like syscalls.
-
-const (
- AT_FDCWD = C.AT_FDCWD
- AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-)
diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go
deleted file mode 100644
index f3c971dff..000000000
--- a/vendor/golang.org/x/sys/unix/types_dragonfly.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright 2009 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.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.struct_fsid
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go
deleted file mode 100644
index ae24557ad..000000000
--- a/vendor/golang.org/x/sys/unix/types_freebsd.go
+++ /dev/null
@@ -1,353 +0,0 @@
-// Copyright 2009 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.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// This structure is a duplicate of stat on FreeBSD 8-STABLE.
-// See /usr/include/sys/stat.h.
-struct stat8 {
-#undef st_atimespec st_atim
-#undef st_mtimespec st_mtim
-#undef st_ctimespec st_ctim
-#undef st_birthtimespec st_birthtim
- __dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- __dev_t st_rdev;
-#if __BSD_VISIBLE
- struct timespec st_atimespec;
- struct timespec st_mtimespec;
- struct timespec st_ctimespec;
-#else
- time_t st_atime;
- long __st_atimensec;
- time_t st_mtime;
- long __st_mtimensec;
- time_t st_ctime;
- long __st_ctimensec;
-#endif
- off_t st_size;
- blkcnt_t st_blocks;
- blksize_t st_blksize;
- fflags_t st_flags;
- __uint32_t st_gen;
- __int32_t st_lspare;
-#if __BSD_VISIBLE
- struct timespec st_birthtimespec;
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
-#else
- time_t st_birthtime;
- long st_birthtimensec;
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
- unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
-#endif
-};
-
-// This structure is a duplicate of if_data on FreeBSD 8-STABLE.
-// See /usr/include/net/if.h.
-struct if_data8 {
- u_char ifi_type;
- u_char ifi_physical;
- u_char ifi_addrlen;
- u_char ifi_hdrlen;
- u_char ifi_link_state;
- u_char ifi_spare_char1;
- u_char ifi_spare_char2;
- u_char ifi_datalen;
- u_long ifi_mtu;
- u_long ifi_metric;
- u_long ifi_baudrate;
- u_long ifi_ipackets;
- u_long ifi_ierrors;
- u_long ifi_opackets;
- u_long ifi_oerrors;
- u_long ifi_collisions;
- u_long ifi_ibytes;
- u_long ifi_obytes;
- u_long ifi_imcasts;
- u_long ifi_omcasts;
- u_long ifi_iqdrops;
- u_long ifi_noproto;
- u_long ifi_hwassist;
- time_t ifi_epoch;
- struct timeval ifi_lastchange;
-};
-
-// This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE.
-// See /usr/include/net/if.h.
-struct if_msghdr8 {
- u_short ifm_msglen;
- u_char ifm_version;
- u_char ifm_type;
- int ifm_addrs;
- int ifm_flags;
- u_short ifm_index;
- struct if_data8 ifm_data;
-};
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
- S_IFMT = C.S_IFMT
- S_IFIFO = C.S_IFIFO
- S_IFCHR = C.S_IFCHR
- S_IFDIR = C.S_IFDIR
- S_IFBLK = C.S_IFBLK
- S_IFREG = C.S_IFREG
- S_IFLNK = C.S_IFLNK
- S_IFSOCK = C.S_IFSOCK
- S_ISUID = C.S_ISUID
- S_ISGID = C.S_ISGID
- S_ISVTX = C.S_ISVTX
- S_IRUSR = C.S_IRUSR
- S_IWUSR = C.S_IWUSR
- S_IXUSR = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat8
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.struct_fsid
-
-// Advice to Fadvise
-
-const (
- FADV_NORMAL = C.POSIX_FADV_NORMAL
- FADV_RANDOM = C.POSIX_FADV_RANDOM
- FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
- FADV_WILLNEED = C.POSIX_FADV_WILLNEED
- FADV_DONTNEED = C.POSIX_FADV_DONTNEED
- FADV_NOREUSE = C.POSIX_FADV_NOREUSE
-)
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPMreqn = C.sizeof_struct_ip_mreqn
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- sizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr8
- sizeofIfData = C.sizeof_struct_if_data
- SizeofIfData = C.sizeof_struct_if_data8
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type ifMsghdr C.struct_if_msghdr
-
-type IfMsghdr C.struct_if_msghdr8
-
-type ifData C.struct_if_data
-
-type IfData C.struct_if_data8
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfZbuf = C.sizeof_struct_bpf_zbuf
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
- SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfZbuf C.struct_bpf_zbuf
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfZbufHeader C.struct_bpf_zbuf_header
-
-// Terminal handling
-
-type Termios C.struct_termios
diff --git a/vendor/golang.org/x/sys/unix/types_linux.go b/vendor/golang.org/x/sys/unix/types_linux.go
deleted file mode 100644
index d5275875f..000000000
--- a/vendor/golang.org/x/sys/unix/types_linux.go
+++ /dev/null
@@ -1,406 +0,0 @@
-// Copyright 2009 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.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#define _FILE_OFFSET_BITS 64
-#define _GNU_SOURCE
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#ifdef TCSETS2
-// On systems that have "struct termios2" use this as type Termios.
-typedef struct termios2 termios_t;
-#else
-typedef struct termios termios_t;
-#endif
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_ll s5;
- struct sockaddr_nl s6;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// copied from /usr/include/linux/un.h
-struct my_sockaddr_un {
- sa_family_t sun_family;
-#if defined(__ARM_EABI__) || defined(__powerpc64__)
- // on ARM char is by default unsigned
- signed char sun_path[108];
-#else
- char sun_path[108];
-#endif
-};
-
-#ifdef __ARM_EABI__
-typedef struct user_regs PtraceRegs;
-#elif defined(__aarch64__)
-typedef struct user_pt_regs PtraceRegs;
-#elif defined(__powerpc64__)
-typedef struct pt_regs PtraceRegs;
-#else
-typedef struct user_regs_struct PtraceRegs;
-#endif
-
-// The real epoll_event is a union, and godefs doesn't handle it well.
-struct my_epoll_event {
- uint32_t events;
-#ifdef __ARM_EABI__
- // padding is not specified in linux/eventpoll.h but added to conform to the
- // alignment requirements of EABI
- int32_t padFd;
-#endif
- int32_t fd;
- int32_t pad;
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
- PathMax = C.PATH_MAX
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timex C.struct_timex
-
-type Time_t C.time_t
-
-type Tms C.struct_tms
-
-type Utimbuf C.struct_utimbuf
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-type Flock_t C.struct_flock
-
-// Advice to Fadvise
-
-const (
- FADV_NORMAL = C.POSIX_FADV_NORMAL
- FADV_RANDOM = C.POSIX_FADV_RANDOM
- FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
- FADV_WILLNEED = C.POSIX_FADV_WILLNEED
- FADV_DONTNEED = C.POSIX_FADV_DONTNEED
- FADV_NOREUSE = C.POSIX_FADV_NOREUSE
-)
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_my_sockaddr_un
-
-type RawSockaddrLinklayer C.struct_sockaddr_ll
-
-type RawSockaddrNetlink C.struct_sockaddr_nl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-type Ucred C.struct_ucred
-
-type TCPInfo C.struct_tcp_info
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll
- SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPMreqn = C.sizeof_struct_ip_mreqn
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
- SizeofUcred = C.sizeof_struct_ucred
- SizeofTCPInfo = C.sizeof_struct_tcp_info
-)
-
-// Netlink routing and interface messages
-
-const (
- IFA_UNSPEC = C.IFA_UNSPEC
- IFA_ADDRESS = C.IFA_ADDRESS
- IFA_LOCAL = C.IFA_LOCAL
- IFA_LABEL = C.IFA_LABEL
- IFA_BROADCAST = C.IFA_BROADCAST
- IFA_ANYCAST = C.IFA_ANYCAST
- IFA_CACHEINFO = C.IFA_CACHEINFO
- IFA_MULTICAST = C.IFA_MULTICAST
- IFLA_UNSPEC = C.IFLA_UNSPEC
- IFLA_ADDRESS = C.IFLA_ADDRESS
- IFLA_BROADCAST = C.IFLA_BROADCAST
- IFLA_IFNAME = C.IFLA_IFNAME
- IFLA_MTU = C.IFLA_MTU
- IFLA_LINK = C.IFLA_LINK
- IFLA_QDISC = C.IFLA_QDISC
- IFLA_STATS = C.IFLA_STATS
- IFLA_COST = C.IFLA_COST
- IFLA_PRIORITY = C.IFLA_PRIORITY
- IFLA_MASTER = C.IFLA_MASTER
- IFLA_WIRELESS = C.IFLA_WIRELESS
- IFLA_PROTINFO = C.IFLA_PROTINFO
- IFLA_TXQLEN = C.IFLA_TXQLEN
- IFLA_MAP = C.IFLA_MAP
- IFLA_WEIGHT = C.IFLA_WEIGHT
- IFLA_OPERSTATE = C.IFLA_OPERSTATE
- IFLA_LINKMODE = C.IFLA_LINKMODE
- IFLA_LINKINFO = C.IFLA_LINKINFO
- IFLA_NET_NS_PID = C.IFLA_NET_NS_PID
- IFLA_IFALIAS = C.IFLA_IFALIAS
- IFLA_MAX = C.IFLA_MAX
- RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE
- RT_SCOPE_SITE = C.RT_SCOPE_SITE
- RT_SCOPE_LINK = C.RT_SCOPE_LINK
- RT_SCOPE_HOST = C.RT_SCOPE_HOST
- RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE
- RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC
- RT_TABLE_COMPAT = C.RT_TABLE_COMPAT
- RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT
- RT_TABLE_MAIN = C.RT_TABLE_MAIN
- RT_TABLE_LOCAL = C.RT_TABLE_LOCAL
- RT_TABLE_MAX = C.RT_TABLE_MAX
- RTA_UNSPEC = C.RTA_UNSPEC
- RTA_DST = C.RTA_DST
- RTA_SRC = C.RTA_SRC
- RTA_IIF = C.RTA_IIF
- RTA_OIF = C.RTA_OIF
- RTA_GATEWAY = C.RTA_GATEWAY
- RTA_PRIORITY = C.RTA_PRIORITY
- RTA_PREFSRC = C.RTA_PREFSRC
- RTA_METRICS = C.RTA_METRICS
- RTA_MULTIPATH = C.RTA_MULTIPATH
- RTA_FLOW = C.RTA_FLOW
- RTA_CACHEINFO = C.RTA_CACHEINFO
- RTA_TABLE = C.RTA_TABLE
- RTN_UNSPEC = C.RTN_UNSPEC
- RTN_UNICAST = C.RTN_UNICAST
- RTN_LOCAL = C.RTN_LOCAL
- RTN_BROADCAST = C.RTN_BROADCAST
- RTN_ANYCAST = C.RTN_ANYCAST
- RTN_MULTICAST = C.RTN_MULTICAST
- RTN_BLACKHOLE = C.RTN_BLACKHOLE
- RTN_UNREACHABLE = C.RTN_UNREACHABLE
- RTN_PROHIBIT = C.RTN_PROHIBIT
- RTN_THROW = C.RTN_THROW
- RTN_NAT = C.RTN_NAT
- RTN_XRESOLVE = C.RTN_XRESOLVE
- RTNLGRP_NONE = C.RTNLGRP_NONE
- RTNLGRP_LINK = C.RTNLGRP_LINK
- RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY
- RTNLGRP_NEIGH = C.RTNLGRP_NEIGH
- RTNLGRP_TC = C.RTNLGRP_TC
- RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR
- RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE
- RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE
- RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE
- RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR
- RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE
- RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE
- RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO
- RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX
- RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE
- RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT
- SizeofNlMsghdr = C.sizeof_struct_nlmsghdr
- SizeofNlMsgerr = C.sizeof_struct_nlmsgerr
- SizeofRtGenmsg = C.sizeof_struct_rtgenmsg
- SizeofNlAttr = C.sizeof_struct_nlattr
- SizeofRtAttr = C.sizeof_struct_rtattr
- SizeofIfInfomsg = C.sizeof_struct_ifinfomsg
- SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg
- SizeofRtMsg = C.sizeof_struct_rtmsg
- SizeofRtNexthop = C.sizeof_struct_rtnexthop
-)
-
-type NlMsghdr C.struct_nlmsghdr
-
-type NlMsgerr C.struct_nlmsgerr
-
-type RtGenmsg C.struct_rtgenmsg
-
-type NlAttr C.struct_nlattr
-
-type RtAttr C.struct_rtattr
-
-type IfInfomsg C.struct_ifinfomsg
-
-type IfAddrmsg C.struct_ifaddrmsg
-
-type RtMsg C.struct_rtmsg
-
-type RtNexthop C.struct_rtnexthop
-
-// Linux socket filter
-
-const (
- SizeofSockFilter = C.sizeof_struct_sock_filter
- SizeofSockFprog = C.sizeof_struct_sock_fprog
-)
-
-type SockFilter C.struct_sock_filter
-
-type SockFprog C.struct_sock_fprog
-
-// Inotify
-
-type InotifyEvent C.struct_inotify_event
-
-const SizeofInotifyEvent = C.sizeof_struct_inotify_event
-
-// Ptrace
-
-// Register structures
-type PtraceRegs C.PtraceRegs
-
-// Misc
-
-type FdSet C.fd_set
-
-type Sysinfo_t C.struct_sysinfo
-
-type Utsname C.struct_utsname
-
-type Ustat_t C.struct_ustat
-
-type EpollEvent C.struct_my_epoll_event
-
-const (
- AT_FDCWD = C.AT_FDCWD
- AT_REMOVEDIR = C.AT_REMOVEDIR
- AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-)
-
-// Terminal handling
-
-type Termios C.termios_t
diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go
deleted file mode 100644
index d15f93d19..000000000
--- a/vendor/golang.org/x/sys/unix/types_netbsd.go
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright 2009 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.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include