diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 565bcd006dc..fec2de82244 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -49,53 +49,53 @@ }, { "ImportPath": "github.com/aws/aws-sdk-go/aws", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { - "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints", + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { - "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query", + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { - "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query", + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { - "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest", + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { - "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { - "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4", + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ec2", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elb", - "Comment": "v0.9.9", - "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" + "Comment": "v0.9.16-3-g4944a94", + "Rev": "4944a94a3b092d1dad8a964415700a70f55e580a" }, { "ImportPath": "github.com/beorn7/perks/quantile", diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config.go index a72f702229f..cd2aade289f 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config.go @@ -7,8 +7,8 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" ) -// The default number of retries for a service. The value of -1 indicates that -// the service specific retry default will be used. +// DefaultRetries is the default number of retries for a service. The value of +// -1 indicates that the service specific retry default will be used. const DefaultRetries = -1 // A Config provides service configuration for service clients. By default, diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go index 2fcb391a288..597feb4fa44 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go @@ -20,7 +20,7 @@ type lener interface { Len() int } -// BuildContentLength builds the content length of a request based on the body, +// BuildContentLengthHandler builds the content length of a request based on the body, // 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. var BuildContentLengthHandler = request.NamedHandler{"core.BuildContentLengthHandler", func(r *request.Request) { diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go index a2219773411..c70d422dfb0 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go @@ -10,7 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws/request" ) -// ValidateParameters is a request handler to validate the input parameters. +// ValidateParametersHandler is a request handler to validate the input parameters. // Validating parameters only has meaning if done prior to the request being sent. var ValidateParametersHandler = request.NamedHandler{"core.ValidateParametersHandler", func(r *request.Request) { if r.ParamsFilled() { diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index 2834a088aab..5dd71f02e80 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -53,8 +53,8 @@ import ( "time" ) -// Create an empty Credential object that can be used as dummy placeholder -// credentials for requests that do not need signed. +// AnonymousCredentials is an empty Credential object that can be used as +// dummy placeholder credentials for requests that do not need signed. // // This Credentials can be used to configure a service to not sign requests // when making service API calls. For example, when accessing public diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go index d230df6f9fa..73a12c9129a 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go @@ -2,7 +2,9 @@ package ec2metadata import ( "io/ioutil" + "net" "net/http" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -88,7 +90,19 @@ func copyConfig(config *Config) *aws.Config { } if c.HTTPClient == nil { - c.HTTPClient = http.DefaultClient + c.HTTPClient = &http.Client{ + Transport: &http.Transport{ + Proxy: http.ProxyFromEnvironment, + Dial: (&net.Dialer{ + // use a shorter timeout than default because the metadata + // service is local if it is running, and to fail faster + // if not running on an ec2 instance. + Timeout: 5 * time.Second, + KeepAlive: 30 * time.Second, + }).Dial, + TLSHandshakeTimeout: 10 * time.Second, + }, + } } if c.Logger == nil { c.Logger = aws.NewDefaultLogger() diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/retryer.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/retryer.go index f03b0c65960..52667510257 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/retryer.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/retryer.go @@ -24,6 +24,8 @@ var retryableCodes = map[string]struct{}{ "ThrottlingException": {}, "RequestLimitExceeded": {}, "RequestThrottled": {}, + "LimitExceededException": {}, // Deleting 10+ DynamoDb tables at once + "TooManyRequestsException": {}, // Lambda functions } // credsExpiredCodes is a collection of error codes which signify the credentials diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/default_retryer.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/default_retryer.go index e642d16b716..c3dd0fa35a1 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/default_retryer.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/default_retryer.go @@ -34,11 +34,9 @@ func (d DefaultRetryer) MaxRetries() uint { return uint(aws.IntValue(d.Service.Config.MaxRetries)) } -var seededRand = rand.New(rand.NewSource(time.Now().UnixNano())) - // RetryRules returns the delay duration before retrying this request again func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration { - delay := int(math.Pow(2, float64(r.RetryCount))) * (seededRand.Intn(30) + 30) + delay := int(math.Pow(2, float64(r.RetryCount))) * (rand.Intn(30) + 30) return time.Duration(delay) * time.Millisecond } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/service.go index 7205212e19b..38aa5d51484 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/service.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/service.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws/corehandlers" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/service/serviceinfo" - "github.com/aws/aws-sdk-go/internal/endpoints" + "github.com/aws/aws-sdk-go/private/endpoints" ) // A Service implements the base service request and response handling diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/version.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/version.go index f89f1e112fa..b7de9e35190 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/version.go +++ b/Godeps/_workspace/src/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 = "0.9.9" +const SDKVersion = "0.9.16" diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go similarity index 100% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints.go diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.json b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json similarity index 95% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.json rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json index 4c588090a9c..62b8231d48b 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.json +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints.json @@ -25,6 +25,10 @@ "endpoint": "", "signingRegion": "us-east-1" }, + "*/data.iot": { + "endpoint": "", + "signingRegion": "us-east-1" + }, "*/iam": { "endpoint": "iam.amazonaws.com", "signingRegion": "us-east-1" diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_map.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go similarity index 96% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_map.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go index 894c1a64341..62fdc16bdd7 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_map.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/endpoints/endpoints_map.go @@ -26,6 +26,10 @@ var endpointsMap = endpointStruct{ Endpoint: "", SigningRegion: "us-east-1", }, + "*/data.iot": { + Endpoint: "", + SigningRegion: "us-east-1", + }, "*/iam": { Endpoint: "iam.amazonaws.com", SigningRegion: "us-east-1", diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go similarity index 81% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go index fabe9b3c304..8e646140b30 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go @@ -1,14 +1,14 @@ // Package ec2query provides serialisation of AWS EC2 requests and responses. package ec2query -//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/input/ec2.json build_test.go +//go:generate go run ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/ec2.json build_test.go import ( "net/url" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/protocol/query/queryutil" + "github.com/aws/aws-sdk-go/private/protocol/query/queryutil" ) // Build builds a request for the EC2 protocol. diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go similarity index 88% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go index bb0f0158889..658190f7051 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go @@ -1,6 +1,6 @@ package ec2query -//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/output/ec2.json unmarshal_test.go +//go:generate go run ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/ec2.json unmarshal_test.go import ( "encoding/xml" @@ -8,7 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil" + "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" ) // Unmarshal unmarshals a response body for the EC2 protocol. diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/build.go similarity index 81% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/build.go index 83ed8758ef9..b6b0b54d25d 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/build.go @@ -1,14 +1,14 @@ // Package query provides serialisation of AWS query requests, and responses. package query -//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/input/query.json build_test.go +//go:generate go run ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/query.json build_test.go import ( "net/url" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/protocol/query/queryutil" + "github.com/aws/aws-sdk-go/private/protocol/query/queryutil" ) // Build builds a request for an AWS Query service. diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/queryutil/queryutil.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go similarity index 100% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/queryutil/queryutil.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go similarity index 78% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go index a374f88b14f..1fcab1d1a13 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go @@ -1,13 +1,13 @@ package query -//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/output/query.json unmarshal_test.go +//go:generate go run ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/query.json unmarshal_test.go import ( "encoding/xml" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil" + "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" ) // Unmarshal unmarshals a response for an AWS Query service. diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go similarity index 100% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/build.go similarity index 67% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/build.go index 326e96cc625..87352bc60de 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/build.go @@ -6,6 +6,7 @@ import ( "encoding/base64" "fmt" "io" + "net/http" "net/url" "path" "reflect" @@ -23,6 +24,8 @@ const RFC822 = "Mon, 2 Jan 2006 15:04:05 GMT" // Whether the byte value can be sent without escaping in AWS URLs var noEscape [256]bool +var errValueNotSet = fmt.Errorf("value not set") + func init() { for i := 0; i < len(noEscape); i++ { // AWS expects every character except these to be escaped @@ -67,16 +70,18 @@ func buildLocationElements(r *request.Request, v reflect.Value) { continue } + var err error switch field.Tag.Get("location") { case "headers": // header maps - buildHeaderMap(r, m, field.Tag.Get("locationName")) + err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag.Get("locationName")) case "header": - buildHeader(r, m, name) + err = buildHeader(&r.HTTPRequest.Header, m, name) case "uri": - buildURI(r, m, name) + err = buildURI(r.HTTPRequest.URL, m, name) case "querystring": - buildQueryString(r, m, name, query) + err = buildQueryString(query, m, name) } + r.Error = err } if r.Error != nil { return @@ -112,45 +117,77 @@ func buildBody(r *request.Request, v reflect.Value) { } } -func buildHeader(r *request.Request, v reflect.Value, name string) { +func buildHeader(header *http.Header, v reflect.Value, name string) error { str, err := convertType(v) - if err != nil { - r.Error = awserr.New("SerializationError", "failed to encode REST request", err) - } else if str != nil { - r.HTTPRequest.Header.Add(name, *str) + if err == errValueNotSet { + return nil + } else if err != nil { + return awserr.New("SerializationError", "failed to encode REST request", err) } + + header.Add(name, str) + + return nil } -func buildHeaderMap(r *request.Request, v reflect.Value, prefix string) { +func buildHeaderMap(header *http.Header, v reflect.Value, prefix string) error { for _, key := range v.MapKeys() { str, err := convertType(v.MapIndex(key)) - if err != nil { - r.Error = awserr.New("SerializationError", "failed to encode REST request", err) - } else if str != nil { - r.HTTPRequest.Header.Add(prefix+key.String(), *str) + if err == errValueNotSet { + continue + } else if err != nil { + return awserr.New("SerializationError", "failed to encode REST request", err) + } + + header.Add(prefix+key.String(), str) } + return nil } -func buildURI(r *request.Request, v reflect.Value, name string) { +func buildURI(u *url.URL, v reflect.Value, name string) error { value, err := convertType(v) - if err != nil { - r.Error = awserr.New("SerializationError", "failed to encode REST request", err) - } else if value != nil { - uri := r.HTTPRequest.URL.Path - uri = strings.Replace(uri, "{"+name+"}", EscapePath(*value, true), -1) - uri = strings.Replace(uri, "{"+name+"+}", EscapePath(*value, false), -1) - r.HTTPRequest.URL.Path = uri + if err == errValueNotSet { + return nil + } else if err != nil { + return awserr.New("SerializationError", "failed to encode REST request", err) } + + uri := u.Path + uri = strings.Replace(uri, "{"+name+"}", EscapePath(value, true), -1) + uri = strings.Replace(uri, "{"+name+"+}", EscapePath(value, false), -1) + u.Path = uri + + return nil } -func buildQueryString(r *request.Request, v reflect.Value, name string, query url.Values) { - str, err := convertType(v) - if err != nil { - r.Error = awserr.New("SerializationError", "failed to encode REST request", err) - } else if str != nil { - query.Set(name, *str) +func buildQueryString(query url.Values, v reflect.Value, name string) error { + switch value := v.Interface().(type) { + case []*string: + for _, item := range value { + query.Add(name, *item) + } + case map[string]*string: + for key, item := range value { + query.Add(key, *item) + } + case map[string][]*string: + for key, items := range value { + for _, item := range items { + query.Add(key, *item) + } + } + default: + str, err := convertType(v) + if err == errValueNotSet { + return nil + } else if err != nil { + return awserr.New("SerializationError", "failed to encode REST request", err) + } + query.Set(name, str) } + + return nil } func updatePath(url *url.URL, urlPath string) { @@ -189,10 +226,10 @@ func EscapePath(path string, encodeSep bool) string { return buf.String() } -func convertType(v reflect.Value) (*string, error) { +func convertType(v reflect.Value) (string, error) { v = reflect.Indirect(v) if !v.IsValid() { - return nil, nil + return "", errValueNotSet } var str string @@ -211,7 +248,7 @@ func convertType(v reflect.Value) (*string, error) { str = value.UTC().Format(RFC822) default: err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type()) - return nil, err + return "", err } - return &str, nil + return str, nil } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/payload.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go similarity index 100% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/payload.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go similarity index 100% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go similarity index 100% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/build.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go similarity index 100% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/unmarshal.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/xml_to_struct.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go similarity index 100% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil/xml_to_struct.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4.go similarity index 99% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4.go index fc7bc35350e..ac7adfc959d 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4/v4.go @@ -17,7 +17,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/protocol/rest" + "github.com/aws/aws-sdk-go/private/protocol/rest" ) const ( diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/api.go index 34f6d43759f..ab339f88bab 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -1567,7 +1567,7 @@ func (c *AutoScaling) TerminateInstanceInAutoScalingGroupRequest(input *Terminat // Terminates the specified instance and optionally adjusts the desired group // size. // -// This call simply makes a termination request. The instances is not terminated +// This call simply makes a termination request. The instance is not terminated // immediately. func (c *AutoScaling) TerminateInstanceInAutoScalingGroup(input *TerminateInstanceInAutoScalingGroupInput) (*TerminateInstanceInAutoScalingGroupOutput, error) { req, out := c.TerminateInstanceInAutoScalingGroupRequest(input) @@ -1826,7 +1826,7 @@ type BlockDeviceMapping struct { // fails the health check. NoDevice *bool `type:"boolean"` - // The name of the virtual device, ephemeral0 to ephemeral3. + // The name of the virtual device (for example, ephemeral0). VirtualName *string `min:"1" type:"string"` metadataBlockDeviceMapping `json:"-" xml:"-"` @@ -1909,8 +1909,8 @@ type CreateAutoScalingGroupInput struct { // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. // - // If this parameter is not specified, the default value is 300. For more information, - // see Understanding Auto Scaling Cooldowns (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/Cooldown.html) + // The default is 300. For more information, see Understanding Auto Scaling + // Cooldowns (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/Cooldown.html) // in the Auto Scaling Developer Guide. DefaultCooldown *int64 `type:"integer"` @@ -1936,7 +1936,8 @@ type CreateAutoScalingGroupInput struct { // The service to use for the health checks. The valid values are EC2 and ELB. // // By default, health checks use Amazon EC2 instance status checks to determine - // the health of an instance. For more information, see Health Checks (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/healthcheck.html). + // the health of an instance. For more information, see Health Checks (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/healthcheck.html) + // in the Auto Scaling Developer Guide. HealthCheckType *string `min:"1" type:"string"` // The ID of the EC2 instance used to create a launch configuration for the @@ -2118,7 +2119,7 @@ type CreateLaunchConfigurationInput struct { // The instance type of the EC2 instance. For information about available instance // types, see Available Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) - // in the Amazon Elastic Cloud Compute User Guide. + // in the Amazon Elastic Compute Cloud User Guide. InstanceType *string `min:"1" type:"string"` // The ID of the kernel associated with the AMI. @@ -3496,7 +3497,8 @@ type DisableMetricsCollectionInput struct { // The name or Amazon Resource Name (ARN) of the group. AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // One or more metrics. If you omit this parameter, all metrics are disabled. + // One or more of the following metrics. If you omit this parameter, all metrics + // are disabled. // // GroupMinSize // @@ -3557,11 +3559,18 @@ type Ebs struct { // Default: true DeleteOnTermination *bool `type:"boolean"` + // Indicates whether the volume should be encrypted. Encrypted EBS volumes must + // be attached to instances that support Amazon EBS encryption. Volumes that + // are created from encrypted snapshots are automatically encrypted. There is + // no way to create an encrypted volume from an unencrypted snapshot or an unencrypted + // volume from an encrypted snapshot. For more information, see Amazon EBS Encryption + // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in + // the Amazon Elastic Compute Cloud User Guide. + Encrypted *bool `type:"boolean"` + // For Provisioned IOPS (SSD) volumes only. The number of I/O operations per // second (IOPS) to provision for the volume. // - // Valid values: Range is 100 to 4000. - // // Default: None Iops *int64 `min:"100" type:"integer"` @@ -3612,7 +3621,8 @@ type EnableMetricsCollectionInput struct { // value is 1Minute. Granularity *string `min:"1" type:"string" required:"true"` - // One or more metrics. If you omit this parameter, all metrics are enabled. + // One or more of the following metrics. If you omit this parameter, all metrics + // are enabled. // // GroupMinSize // @@ -3674,7 +3684,7 @@ type EnabledMetric struct { // The granularity of the metric. The only valid value is 1Minute. Granularity *string `min:"1" type:"string"` - // The name of the metric. + // One of the following metrics: // // GroupMinSize // @@ -3952,7 +3962,8 @@ type Group struct { MinSize *int64 `type:"integer" required:"true"` // The name of the placement group into which you'll launch your instances, - // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html). + // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) + // in the Amazon Elastic Compute Cloud User Guide. PlacementGroup *string `min:"1" type:"string"` // The current state of the group when DeleteAutoScalingGroup is in progress. @@ -4090,8 +4101,7 @@ func (s InstanceMonitoring) GoString() string { // Describes a launch configuration. type LaunchConfiguration struct { - // Specifies whether the instances are associated with a public IP address (true) - // or not (false). + // [EC2-VPC] Indicates whether to assign a public IP address to each instance. AssociatePublicIpAddress *bool `type:"boolean"` // A block device mapping, which specifies the block devices for the instance. @@ -4192,14 +4202,14 @@ type LifecycleHook struct { // are CONTINUE and ABANDON. The default value is CONTINUE. DefaultResult *string `type:"string"` - // The maximum length of time an instance can remain in a Pending:Wait or Terminating:Wait - // state. Currently, the maximum is set to 48 hours. + // The maximum time, in seconds, that an instance can remain in a Pending:Wait + // or Terminating:Wait state. The default is 172800 seconds (48 hours). GlobalTimeout *int64 `type:"integer"` - // The amount of time that can elapse before the lifecycle hook times out. When - // the lifecycle hook times out, Auto Scaling performs the action defined in - // the DefaultResult parameter. You can prevent the lifecycle hook from timing - // out by calling RecordLifecycleActionHeartbeat. + // The maximum time, in seconds, that can elapse before the lifecycle hook times + // out. The default is 3600 seconds (1 hour). When the lifecycle hook times + // out, Auto Scaling performs the action defined in the DefaultResult parameter. + // You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat. HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. @@ -4248,7 +4258,7 @@ type LoadBalancerState struct { // The name of the load balancer. LoadBalancerName *string `min:"1" type:"string"` - // The state of the load balancer. + // One of the following load balancer states: // // Adding - The instances in the group are being registered with the load // balancer. @@ -4281,7 +4291,7 @@ func (s LoadBalancerState) GoString() string { // Describes a metric. type MetricCollectionType struct { - // The metric. + // One of the following metrics: // // GroupMinSize // @@ -4344,7 +4354,7 @@ type NotificationConfiguration struct { // The name of the group. AutoScalingGroupName *string `min:"1" type:"string"` - // The types of events for an action to start. + // One of the following event notification types: // // autoscaling:EC2_INSTANCE_LAUNCH // @@ -4383,7 +4393,7 @@ func (s NotificationConfiguration) GoString() string { // For more information, see Auto Scaling Processes (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/US_SuspendResume.html#process-types) // in the Auto Scaling Developer Guide. type ProcessType struct { - // The name of the process. + // One of the following processes: // // Launch // @@ -4430,11 +4440,11 @@ type PutLifecycleHookInput struct { // is ABANDON. DefaultResult *string `type:"string"` - // Defines the amount of time, in seconds, that can elapse before the lifecycle - // hook times out. When the lifecycle hook times out, Auto Scaling performs - // the action defined in the DefaultResult parameter. You can prevent the lifecycle - // hook from timing out by calling RecordLifecycleActionHeartbeat. The default - // value for this parameter is 3600 seconds (1 hour). + // The amount of time, in seconds, that can elapse before the lifecycle hook + // times out. When the lifecycle hook times out, Auto Scaling performs the action + // defined in the DefaultResult parameter. You can prevent the lifecycle hook + // from timing out by calling RecordLifecycleActionHeartbeat. The default is + // 3600 seconds (1 hour). HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. @@ -5257,7 +5267,7 @@ type TerminateInstanceInAutoScalingGroupInput struct { // The ID of the EC2 instance. InstanceId *string `min:"1" type:"string" required:"true"` - // If true, terminating this instance also decrements the size of the Auto Scaling + // If true, terminating the instance also decrements the size of the Auto Scaling // group. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"` @@ -5308,7 +5318,8 @@ type UpdateAutoScalingGroupInput struct { // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. For more information, see Understanding - // Auto Scaling Cooldowns (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/Cooldown.html). + // Auto Scaling Cooldowns (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/Cooldown.html) + // in the Auto Scaling Developer Guide. DefaultCooldown *int64 `type:"integer"` // The number of EC2 instances that should be running in the Auto Scaling group. @@ -5319,7 +5330,8 @@ type UpdateAutoScalingGroupInput struct { // The amount of time, in seconds, that Auto Scaling waits before checking the // health status of an instance. The grace period begins when the instance passes // the system status and instance status checks from Amazon EC2. For more information, - // see . + // see Health Checks (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/healthcheck.html) + // in the Auto Scaling Developer Guide. HealthCheckGracePeriod *int64 `type:"integer"` // The type of health check for the instances in the Auto Scaling group. The @@ -5337,7 +5349,8 @@ type UpdateAutoScalingGroupInput struct { MinSize *int64 `type:"integer"` // The name of the placement group into which you'll launch your instances, - // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html). + // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) + // in the Amazon Elastic Compute Cloud User Guide. PlacementGroup *string `min:"1" type:"string"` // A standalone termination policy or a list of termination policies used to diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/service.go index d17015ad746..32f85f67fac 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/service.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/service.go @@ -8,8 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/service" "github.com/aws/aws-sdk-go/aws/service/serviceinfo" - "github.com/aws/aws-sdk-go/internal/protocol/query" - "github.com/aws/aws-sdk-go/internal/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/query" + "github.com/aws/aws-sdk-go/private/signer/v4" ) // Auto Scaling is designed to automatically launch or terminate EC2 instances diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go index 0327851d607..b4c238a5fb0 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -696,6 +696,13 @@ func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput } // Cancels the specified Spot fleet requests. +// +// After you cancel a Spot fleet request, the Spot fleet launches no new Spot +// instances. You must specify whether the Spot fleet should also terminate +// its Spot instances. If you terminate the instances, the Spot fleet request +// enters the cancelled_terminating state. Otherwise, the Spot fleet request +// enters the cancelled_running state and the instances continue to run until +// they are interrupted or you terminate them manually. func (c *EC2) CancelSpotFleetRequests(input *CancelSpotFleetRequestsInput) (*CancelSpotFleetRequestsOutput, error) { req, out := c.CancelSpotFleetRequestsRequest(input) err := req.Send() @@ -5169,6 +5176,52 @@ func (c *EC2) ModifySnapshotAttribute(input *ModifySnapshotAttributeInput) (*Mod return out, err } +const opModifySpotFleetRequest = "ModifySpotFleetRequest" + +// ModifySpotFleetRequestRequest generates a request for the ModifySpotFleetRequest operation. +func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput) (req *request.Request, output *ModifySpotFleetRequestOutput) { + op := &request.Operation{ + Name: opModifySpotFleetRequest, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifySpotFleetRequestInput{} + } + + req = c.newRequest(op, input, output) + output = &ModifySpotFleetRequestOutput{} + req.Data = output + return +} + +// Modifies the specified Spot fleet request. +// +// While the Spot fleet request is being modified, it is in the modifying state. +// +// To scale up your Spot fleet, increase its target capacity. The Spot fleet +// launches the additional Spot instances according to the allocation strategy +// for the Spot fleet request. If the allocation strategy is lowestPrice, the +// Spot fleet launches instances using the Spot pool with the lowest price. +// If the allocation strategy is diversified, the Spot fleet distributes the +// instances across the Spot pools. +// +// To scale down your Spot fleet, decrease its target capacity. First, the +// Spot fleet cancels any open bids that exceed the new target capacity. You +// can request that the Spot fleet terminate Spot instances until the size of +// the fleet no longer exceeds the new target capacity. If the allocation strategy +// is lowestPrice, the Spot fleet terminates the instances with the highest +// price per unit. If the allocation strategy is diversified, the Spot fleet +// terminates instances across the Spot pools. Alternatively, you can request +// that the Spot fleet keep the fleet at its current size, but not replace any +// Spot instances that are interrupted or that you terminate manually. +func (c *EC2) ModifySpotFleetRequest(input *ModifySpotFleetRequestInput) (*ModifySpotFleetRequestOutput, error) { + req, out := c.ModifySpotFleetRequestRequest(input) + err := req.Send() + return out, err +} + const opModifySubnetAttribute = "ModifySubnetAttribute" // ModifySubnetAttributeRequest generates a request for the ModifySubnetAttribute operation. @@ -7196,7 +7249,7 @@ type AvailabilityZone struct { // The name of the region. RegionName *string `locationName:"regionName" type:"string"` - // The state of the Availability Zone (available | impaired | unavailable). + // The state of the Availability Zone. State *string `locationName:"zoneState" type:"string" enum:"AvailabilityZoneState"` // The name of the Availability Zone. @@ -10995,7 +11048,8 @@ type DescribeAvailabilityZonesInput struct { // region-name - The name of the region for the Availability Zone (for example, // us-east-1). // - // state - The state of the Availability Zone (available | impaired | unavailable). + // state - The state of the Availability Zone (available | information | + // impaired | unavailable). // // zone-name - The name of the Availability Zone (for example, us-east-1a). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -16201,11 +16255,15 @@ type EventInformation struct { // // The following are the error events. // - // iamFleetRoleInvalid - Spot fleet did not have the required permissions + // iamFleetRoleInvalid - The Spot fleet did not have the required permissions // either to launch or terminate an instance. // + // launchSpecTemporarilyBlacklisted - The configuration is not valid and + // several attempts to launch instances have failed. For more information, see + // the description of the event. + // // spotFleetRequestConfigurationInvalid - The configuration is not valid. - // For more information, see the description. + // For more information, see the description of the event. // // spotInstanceCountLimitExceeded - You've reached the limit on the number // of Spot instances that you can launch. @@ -16229,6 +16287,11 @@ type EventInformation struct { // that the instances were terminated, if the request was created with TerminateInstancesWithExpiration // set. // + // modify_in_progress - A request to modify the Spot fleet request was accepted + // and is in progress. + // + // modify_successful - The Spot fleet request was modified. + // // price_update - The bid price for a launch configuration was adjusted because // it was too high. This change is permanent. // @@ -18358,10 +18421,9 @@ type LaunchSpecification struct { // The ID of the RAM disk. RamdiskId *string `locationName:"ramdiskId" type:"string"` - // One or more security groups. To request an instance in a nondefault VPC, - // you must specify the ID of the security group. To request an instance in - // EC2-Classic or a default VPC, you can specify the name or the ID of the security - // group. + // One or more security groups. When requesting instances in a VPC, you must + // specify the IDs of the security groups. When requesting instances in EC2-Classic, + // you can specify the names or the IDs of the security groups. SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The ID of the subnet in which to launch the instance. @@ -18751,6 +18813,58 @@ func (s ModifySnapshotAttributeOutput) GoString() string { return s.String() } +// Contains the parameters for ModifySpotFleetRequest. +type ModifySpotFleetRequestInput struct { + // Indicates whether running Spot instances should be terminated if the target + // capacity of the Spot fleet request is decreased below the current size of + // the Spot fleet. + ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` + + // The ID of the Spot fleet request. + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + + // The size of the fleet. + TargetCapacity *int64 `locationName:"targetCapacity" type:"integer"` + + metadataModifySpotFleetRequestInput `json:"-" xml:"-"` +} + +type metadataModifySpotFleetRequestInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s ModifySpotFleetRequestInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySpotFleetRequestInput) GoString() string { + return s.String() +} + +// Contains the output of ModifySpotFleetRequest. +type ModifySpotFleetRequestOutput struct { + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` + + metadataModifySpotFleetRequestOutput `json:"-" xml:"-"` +} + +type metadataModifySpotFleetRequestOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s ModifySpotFleetRequestOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySpotFleetRequestOutput) GoString() string { + return s.String() +} + type ModifySubnetAttributeInput struct { // Specify true to indicate that instances launched into the specified subnet // should be assigned public IP address. @@ -20466,6 +20580,18 @@ type RequestSpotInstancesInput struct { // Default: Instances are launched in any available Availability Zone. AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` + // The required duration for the Spot instances, in minutes. This value must + // be a multiple of 60 (60, 120, 180, 240, 300, or 360). + // + // The duration period starts as soon as your Spot instance receives its instance + // ID. At the end of the duration period, Amazon EC2 marks the Spot instance + // for termination and provides a Spot instance termination notice, which gives + // the instance a two-minute warning before it terminates. + // + // Note that you can't specify an Availability Zone group or a launch group + // if you specify a required duration. + BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` + // Unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -22060,10 +22186,9 @@ type SpotFleetLaunchSpecification struct { // The ID of the RAM disk. RamdiskId *string `locationName:"ramdiskId" type:"string"` - // One or more security groups. To request an instance in a nondefault VPC, - // you must specify the ID of the security group. To request an instance in - // EC2-Classic or a default VPC, you can specify the name or the ID of the security - // group. + // One or more security groups. When requesting instances in a VPC, you must + // specify the IDs of the security groups. When requesting instances in EC2-Classic, + // you can specify the names or the IDs of the security groups. SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The bid price per unit hour for the specified instance type. If this value @@ -22130,6 +22255,9 @@ func (s SpotFleetMonitoring) GoString() string { // Describes a Spot fleet request. type SpotFleetRequestConfig struct { + // The creation date and time of the request. + CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + // Information about the configuration of the Spot fleet request. SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"` @@ -22158,7 +22286,7 @@ func (s SpotFleetRequestConfig) GoString() string { // Describes the configuration of a Spot fleet request. type SpotFleetRequestConfigData struct { - // Determines how to allocate the target capacity across the Spot pools specified + // Indicates how to allocate the target capacity across the Spot pools specified // by the Spot fleet request. The default is lowestPrice. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` @@ -22167,6 +22295,11 @@ type SpotFleetRequestConfigData struct { // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` + // Indicates whether running Spot instances should be terminated if the target + // capacity of the Spot fleet request is decreased below the current size of + // the Spot fleet. + ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` + // Grants the Spot fleet permission to terminate Spot instances on your behalf // when you cancel its Spot fleet request using CancelSpotFleetRequests or when // the Spot fleet request expires, if you set terminateInstancesWithExpiration. @@ -22213,13 +22346,20 @@ func (s SpotFleetRequestConfigData) GoString() string { return s.String() } -// Describe a Spot instance request. +// Describes a Spot instance request. type SpotInstanceRequest struct { + // If you specified a required duration and your request was fulfilled, this + // is the fixed hourly price in effect for the Spot instance while it runs. + ActualBlockHourlyPrice *string `locationName:"actualBlockHourlyPrice" type:"string"` + // The Availability Zone group. If you specify the same Availability Zone group // for all Spot instance requests, all Spot instances are launched in the same // Availability Zone. AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` + // The required duration for the Spot instance, in minutes. + BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` + // The date and time when the Spot instance request was created, in UTC format // (for example, YYYY-MM-DDTHH:MM:SSZ). CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` @@ -22247,7 +22387,7 @@ type SpotInstanceRequest struct { // The ID of the Spot instance request. SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` - // The maximum hourly price (bid) for any Spot instance launched to fulfill + // The maximum hourly price (bid) for the Spot instance launched to fulfill // the request. SpotPrice *string `locationName:"spotPrice" type:"string"` @@ -22267,16 +22407,13 @@ type SpotInstanceRequest struct { Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // If this is a one-time request, the request becomes active at this date and - // time and remains active until all instances launch, the request expires, - // or the request is canceled. If the request is persistent, the request becomes - // active at this date and time and remains active until it expires or is canceled. + // The request becomes active at this date and time. ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` // The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // If this is a one-time request, the request remains active until all instances - // launch, the request is canceled, or this date is reached. If the request - // is persistent, it remains active until it is canceled or this date is reached. + // If this is a one-time request, it remains active until all instances launch, + // the request is canceled, or this date is reached. If the request is persistent, + // it remains active until it is canceled or this date is reached. ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` metadataSpotInstanceRequest `json:"-" xml:"-"` @@ -23721,6 +23858,12 @@ const ( const ( // @enum AvailabilityZoneState AvailabilityZoneStateAvailable = "available" + // @enum AvailabilityZoneState + AvailabilityZoneStateInformation = "information" + // @enum AvailabilityZoneState + AvailabilityZoneStateImpaired = "impaired" + // @enum AvailabilityZoneState + AvailabilityZoneStateUnavailable = "unavailable" ) const ( @@ -23736,6 +23879,8 @@ const ( BatchStateCancelledRunning = "cancelled_running" // @enum BatchState BatchStateCancelledTerminating = "cancelled_terminating" + // @enum BatchState + BatchStateModifying = "modifying" ) const ( @@ -23852,6 +23997,13 @@ const ( EventTypeError = "error" ) +const ( + // @enum ExcessCapacityTerminationPolicy + ExcessCapacityTerminationPolicyNoTermination = "noTermination" + // @enum ExcessCapacityTerminationPolicy + ExcessCapacityTerminationPolicyDefault = "default" +) + const ( // @enum ExportEnvironment ExportEnvironmentCitrix = "citrix" diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go index e10a2aa1f8b..88a209d1608 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go @@ -630,6 +630,10 @@ type EC2API interface { ModifySnapshotAttribute(*ec2.ModifySnapshotAttributeInput) (*ec2.ModifySnapshotAttributeOutput, error) + ModifySpotFleetRequestRequest(*ec2.ModifySpotFleetRequestInput) (*request.Request, *ec2.ModifySpotFleetRequestOutput) + + ModifySpotFleetRequest(*ec2.ModifySpotFleetRequestInput) (*ec2.ModifySpotFleetRequestOutput, error) + ModifySubnetAttributeRequest(*ec2.ModifySubnetAttributeInput) (*request.Request, *ec2.ModifySubnetAttributeOutput) ModifySubnetAttribute(*ec2.ModifySubnetAttributeInput) (*ec2.ModifySubnetAttributeOutput, error) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go index 102c8fe026d..fb20e805b9f 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go @@ -8,8 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/service" "github.com/aws/aws-sdk-go/aws/service/serviceinfo" - "github.com/aws/aws-sdk-go/internal/protocol/ec2query" - "github.com/aws/aws-sdk-go/internal/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/ec2query" + "github.com/aws/aws-sdk-go/private/signer/v4" ) // Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity @@ -32,7 +32,7 @@ func New(config *aws.Config) *EC2 { ServiceInfo: serviceinfo.ServiceInfo{ Config: defaults.DefaultConfig.Merge(config), ServiceName: "ec2", - APIVersion: "2015-04-15", + APIVersion: "2015-10-01", }, } service.Initialize() diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/service.go index 20eda10fe43..e9908006e00 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/service.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/service.go @@ -8,8 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/service" "github.com/aws/aws-sdk-go/aws/service/serviceinfo" - "github.com/aws/aws-sdk-go/internal/protocol/query" - "github.com/aws/aws-sdk-go/internal/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/query" + "github.com/aws/aws-sdk-go/private/signer/v4" ) // Elastic Load Balancing distributes incoming traffic across your EC2 instances.