diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 9c062320831..d3403545098 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -30,58 +30,53 @@ }, { "ImportPath": "github.com/aws/aws-sdk-go/aws", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/internal/apierr", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ec2", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elb", - "Comment": "v0.6.0-7-gcea3a42", - "Rev": "cea3a425fc2d887d102e406ec2f8b37a57abd82f" + "Comment": "v0.9.9", + "Rev": "c4ae871ffc03691a7b039fa751a1e7afee56e920" }, { "ImportPath": "github.com/beorn7/perks/quantile", diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr/error.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr/error.go index cf54d89d1ed..a52743bef1c 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr/error.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr/error.go @@ -10,23 +10,23 @@ package awserr // // Example: // -// output, err := s3manage.Upload(svc, input, opts) -// if err != nil { -// if awsErr, ok := err.(awserr.Error); ok { -// // Get error details -// log.Println("Error:", err.Code(), err.Message()) +// output, err := s3manage.Upload(svc, input, opts) +// if err != nil { +// if awsErr, ok := err.(awserr.Error); ok { +// // Get error details +// log.Println("Error:", err.Code(), err.Message()) // -// Prints out full error message, including original error if there was one. -// log.Println("Error:", err.Error()) +// // Prints out full error message, including original error if there was one. +// log.Println("Error:", err.Error()) // -// // Get original error -// if origErr := err.Err(); origErr != nil { -// // operate on original error. -// } -// } else { -// fmt.Println(err.Error()) -// } -// } +// // Get original error +// if origErr := err.Err(); origErr != nil { +// // operate on original error. +// } +// } else { +// fmt.Println(err.Error()) +// } +// } // type Error interface { // Satisfy the generic error interface. @@ -42,6 +42,17 @@ type Error interface { OrigErr() error } +// New returns an Error object described by the code, message, and origErr. +// +// If origErr satisfies the Error interface it will not be wrapped within a new +// Error object and will instead be returned. +func New(code, message string, origErr error) Error { + if e, ok := origErr.(Error); ok && e != nil { + return e + } + return newBaseError(code, message, origErr) +} + // A RequestFailure is an interface to extract request failure information from // an Error such as the request ID of the failed request returned by a service. // RequestFailures may not always have a requestID value if the request failed @@ -86,3 +97,9 @@ type RequestFailure interface { // to a connection error. RequestID() string } + +// NewRequestFailure returns a new request error wrapper for the given Error +// provided. +func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure { + return newRequestError(err, statusCode, reqID) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/apierr/error.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr/types.go similarity index 54% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/apierr/error.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr/types.go index c45555a9f00..003a6e8067e 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/apierr/error.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr/types.go @@ -1,14 +1,28 @@ -// Package apierr represents API error types. -package apierr +package awserr import "fmt" -// A BaseError wraps the code and message which defines an error. It also +// SprintError returns a string of the formatted error code. +// +// Both extra and origErr are optional. If they are included their lines +// will be added, but if they are not included their lines will be ignored. +func SprintError(code, message, extra string, origErr error) string { + msg := fmt.Sprintf("%s: %s", code, message) + if extra != "" { + msg = fmt.Sprintf("%s\n\t%s", msg, extra) + } + if origErr != nil { + msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error()) + } + return msg +} + +// A baseError wraps the code and message which defines an error. It also // can be used to wrap an original error object. // // Should be used as the root for errors satisfying the awserr.Error. Also // for any error which does not fit into a specific error wrapper type. -type BaseError struct { +type baseError struct { // Classification of error code string @@ -20,7 +34,7 @@ type BaseError struct { origErr error } -// New returns an error object for the code, message, and err. +// newBaseError returns an error object for the code, message, and err. // // code is a short no whitespace phrase depicting the classification of // the error that is being created. @@ -28,8 +42,8 @@ type BaseError struct { // message is the free flow string containing detailed information about the error. // // origErr is the error object which will be nested under the new error to be returned. -func New(code, message string, origErr error) *BaseError { - return &BaseError{ +func newBaseError(code, message string, origErr error) *baseError { + return &baseError{ code: code, message: message, origErr: origErr, @@ -41,75 +55,56 @@ func New(code, message string, origErr error) *BaseError { // See ErrorWithExtra for formatting. // // Satisfies the error interface. -func (b *BaseError) Error() string { - return b.ErrorWithExtra("") +func (b baseError) Error() string { + return SprintError(b.code, b.message, "", b.origErr) } // String returns the string representation of the error. // Alias for Error to satisfy the stringer interface. -func (b *BaseError) String() string { +func (b baseError) String() string { return b.Error() } // Code returns the short phrase depicting the classification of the error. -func (b *BaseError) Code() string { +func (b baseError) Code() string { return b.code } // Message returns the error details message. -func (b *BaseError) Message() string { +func (b baseError) Message() string { return b.message } // OrigErr returns the original error if one was set. Nil is returned if no error // was set. -func (b *BaseError) OrigErr() error { +func (b baseError) OrigErr() error { return b.origErr } -// ErrorWithExtra is a helper method to add an extra string to the stratified -// error message. The extra message will be added on the next line below the -// error message like the following: -// -// : -// -// -// If there is a original error the error will be included on a new line. -// -// : -// -// caused by: -func (b *BaseError) ErrorWithExtra(extra string) string { - msg := fmt.Sprintf("%s: %s", b.code, b.message) - if extra != "" { - msg = fmt.Sprintf("%s\n\t%s", msg, extra) - } - if b.origErr != nil { - msg = fmt.Sprintf("%s\ncaused by: %s", msg, b.origErr.Error()) - } - return msg -} +// So that the Error interface type can be included as an anonymous field +// in the requestError struct and not conflict with the error.Error() method. +type awsError Error -// A RequestError wraps a request or service error. +// A requestError wraps a request or service error. // -// Composed of BaseError for code, message, and original error. -type RequestError struct { - *BaseError +// Composed of baseError for code, message, and original error. +type requestError struct { + awsError statusCode int requestID string } -// NewRequestError returns a wrapped error with additional information for request +// newRequestError returns a wrapped error with additional information for request // status code, and service requestID. // // Should be used to wrap all request which involve service requests. Even if // the request failed without a service response, but had an HTTP status code // that may be meaningful. // -// Also wraps original errors via the BaseError. -func NewRequestError(base *BaseError, statusCode int, requestID string) *RequestError { - return &RequestError{ - BaseError: base, +// Also wraps original errors via the baseError. +func newRequestError(err Error, statusCode int, requestID string) *requestError { + return &requestError{ + awsError: err, statusCode: statusCode, requestID: requestID, } @@ -117,23 +112,24 @@ func NewRequestError(base *BaseError, statusCode int, requestID string) *Request // Error returns the string representation of the error. // Satisfies the error interface. -func (r *RequestError) Error() string { - return r.ErrorWithExtra(fmt.Sprintf("status code: %d, request id: [%s]", - r.statusCode, r.requestID)) +func (r requestError) Error() string { + extra := fmt.Sprintf("status code: %d, request id: %s", + r.statusCode, r.requestID) + return SprintError(r.Code(), r.Message(), extra, r.OrigErr()) } // String returns the string representation of the error. // Alias for Error to satisfy the stringer interface. -func (r *RequestError) String() string { +func (r requestError) String() string { return r.Error() } // StatusCode returns the wrapped status code for the error -func (r *RequestError) StatusCode() int { +func (r requestError) StatusCode() int { return r.statusCode } // RequestID returns the wrapped requestID -func (r *RequestError) RequestID() string { +func (r requestError) RequestID() string { return r.requestID } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy.go index 99a11567f59..f91743c6e1d 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy.go @@ -70,12 +70,20 @@ func rcopy(dst, src reflect.Value, root bool) { } } case reflect.Slice: + if src.IsNil() { + break + } + s := reflect.MakeSlice(src.Type(), src.Len(), src.Cap()) dst.Set(s) for i := 0; i < src.Len(); i++ { rcopy(dst.Index(i), src.Index(i), false) } case reflect.Map: + if src.IsNil() { + break + } + s := reflect.MakeMap(src.Type()) dst.Set(s) for _, k := range src.MapKeys() { diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go index 4ae04ac1dd2..4f26241a2b8 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go @@ -27,7 +27,7 @@ func ExampleCopy() { awsutil.Copy(&f2, f1) // Print the result - fmt.Println(awsutil.StringValue(f2)) + fmt.Println(awsutil.Prettify(f2)) // Output: // { @@ -80,18 +80,26 @@ func TestCopy(t *testing.T) { func TestCopyIgnoreNilMembers(t *testing.T) { type Foo struct { A *string + B []string + C map[string]string } f := &Foo{} assert.Nil(t, f.A) + assert.Nil(t, f.B) + assert.Nil(t, f.C) var f2 Foo awsutil.Copy(&f2, f) assert.Nil(t, f2.A) + assert.Nil(t, f2.B) + assert.Nil(t, f2.C) fcopy := awsutil.CopyOf(f) f3 := fcopy.(*Foo) assert.Nil(t, f3.A) + assert.Nil(t, f3.B) + assert.Nil(t, f3.C) } func TestCopyPrimitive(t *testing.T) { @@ -183,7 +191,7 @@ func ExampleCopyOf() { var f2 *Foo = v.(*Foo) // Print the result - fmt.Println(awsutil.StringValue(f2)) + fmt.Println(awsutil.Prettify(f2)) // Output: // { diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go index 7ae01efe427..905d82385ec 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go @@ -81,6 +81,12 @@ func rValuesAtPath(v interface{}, path string, create bool, caseSensitive bool) value = reflect.Indirect(value) } + if value.Kind() == reflect.Slice || value.Kind() == reflect.Map { + if !create && value.IsNil() { + value = reflect.ValueOf(nil) + } + } + if value.IsValid() { nextvals = append(nextvals, value) } @@ -118,6 +124,12 @@ func rValuesAtPath(v interface{}, path string, create bool, caseSensitive bool) } value = reflect.Indirect(value.Index(i)) + if value.Kind() == reflect.Slice || value.Kind() == reflect.Map { + if !create && value.IsNil() { + value = reflect.ValueOf(nil) + } + } + if value.IsValid() { nextvals = append(nextvals, value) } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go index 1262cf6bef1..0da6b06fddc 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go @@ -16,8 +16,8 @@ type Struct struct { } var data = Struct{ - A: []Struct{Struct{C: "value1"}, Struct{C: "value2"}, Struct{C: "value3"}}, - z: []Struct{Struct{C: "value1"}, Struct{C: "value2"}, Struct{C: "value3"}}, + A: []Struct{{C: "value1"}, {C: "value2"}, {C: "value3"}}, + z: []Struct{{C: "value1"}, {C: "value2"}, {C: "value3"}}, B: &Struct{B: &Struct{C: "terminal"}, D: &Struct{C: "terminal2"}}, C: "initial", } @@ -44,6 +44,7 @@ func TestValueAtPathFailure(t *testing.T) { assert.Equal(t, []interface{}{}, awsutil.ValuesAtPath(data, "B.B.C.Z")) assert.Equal(t, []interface{}(nil), awsutil.ValuesAtPath(data, "z[-1].C")) assert.Equal(t, []interface{}{}, awsutil.ValuesAtPath(nil, "A.B.C")) + assert.Equal(t, []interface{}{}, awsutil.ValuesAtPath(Struct{}, "A")) } func TestSetValueAtPathSuccess(t *testing.T) { @@ -62,4 +63,6 @@ func TestSetValueAtPathSuccess(t *testing.T) { var s2 Struct awsutil.SetValueAtAnyPath(&s2, "b.b.c", "test0") assert.Equal(t, "test0", s2.B.B.C) + awsutil.SetValueAtAnyPath(&s2, "A", []Struct{{}}) + assert.Equal(t, []Struct{{}}, s2.A) } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go similarity index 83% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go index 09673a12ed2..0de3eaa0f63 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go @@ -8,16 +8,16 @@ import ( "strings" ) -// StringValue returns the string representation of a value. -func StringValue(i interface{}) string { +// Prettify returns the string representation of a value. +func Prettify(i interface{}) string { var buf bytes.Buffer - stringValue(reflect.ValueOf(i), 0, &buf) + prettify(reflect.ValueOf(i), 0, &buf) return buf.String() } -// stringValue will recursively walk value v to build a textual +// prettify will recursively walk value v to build a textual // representation of the value. -func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) { +func prettify(v reflect.Value, indent int, buf *bytes.Buffer) { for v.Kind() == reflect.Ptr { v = v.Elem() } @@ -52,7 +52,7 @@ func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) { val := v.FieldByName(n) buf.WriteString(strings.Repeat(" ", indent+2)) buf.WriteString(n + ": ") - stringValue(val, indent+2, buf) + prettify(val, indent+2, buf) if i < len(names)-1 { buf.WriteString(",\n") @@ -68,7 +68,7 @@ func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) { buf.WriteString("[" + nl) for i := 0; i < v.Len(); i++ { buf.WriteString(id2) - stringValue(v.Index(i), indent+2, buf) + prettify(v.Index(i), indent+2, buf) if i < v.Len()-1 { buf.WriteString("," + nl) @@ -82,7 +82,7 @@ func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) { for i, k := range v.MapKeys() { buf.WriteString(strings.Repeat(" ", indent+2)) buf.WriteString(k.String() + ": ") - stringValue(v.MapIndex(k), indent+2, buf) + prettify(v.MapIndex(k), indent+2, buf) if i < v.Len()-1 { buf.WriteString(",\n") 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 bd805f36b80..a72f702229f 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 @@ -1,172 +1,239 @@ package aws import ( - "io" "net/http" - "os" "time" "github.com/aws/aws-sdk-go/aws/credentials" ) -// DefaultChainCredentials is a Credentials which will find the first available -// credentials Value from the list of Providers. -// -// This should be used in the default case. Once the type of credentials are -// known switching to the specific Credentials will be more efficient. -var DefaultChainCredentials = credentials.NewChainCredentials( - []credentials.Provider{ - &credentials.EnvProvider{}, - &credentials.SharedCredentialsProvider{Filename: "", Profile: ""}, - &credentials.EC2RoleProvider{ExpiryWindow: 5 * time.Minute}, - }) - // 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 -// DefaultConfig is the default all service configuration will be based off of. -var DefaultConfig = &Config{ - Credentials: DefaultChainCredentials, - Endpoint: "", - Region: os.Getenv("AWS_REGION"), - DisableSSL: false, - ManualSend: false, - HTTPClient: http.DefaultClient, - LogHTTPBody: false, - LogLevel: 0, - Logger: os.Stdout, - MaxRetries: DefaultRetries, - DisableParamValidation: false, - DisableComputeChecksums: false, - S3ForcePathStyle: false, -} - -// A Config provides service configuration +// A Config provides service configuration for service clients. By default, +// all clients will use the {defaults.DefaultConfig} structure. type Config struct { - Credentials *credentials.Credentials - Endpoint string - Region string - DisableSSL bool - ManualSend bool - HTTPClient *http.Client - LogHTTPBody bool - LogLevel uint - Logger io.Writer - MaxRetries int - DisableParamValidation bool - DisableComputeChecksums bool - S3ForcePathStyle bool + // The credentials object to use when signing requests. Defaults to + // {defaults.DefaultChainCredentials}. + Credentials *credentials.Credentials + + // An optional endpoint URL (hostname only or fully qualified URI) + // that overrides the default generated endpoint for a client. Set this + // to `""` to use the default generated endpoint. + // + // @note You must still provide a `Region` value when specifying an + // endpoint for a client. + Endpoint *string + + // 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" + // document. + // + // @see http://docs.aws.amazon.com/general/latest/gr/rande.html + // AWS Regions and Endpoints + Region *string + + // Set this to `true` to disable SSL when sending requests. Defaults + // to `false`. + DisableSSL *bool + + // The HTTP client to use when sending requests. Defaults to + // `http.DefaultClient`. + HTTPClient *http.Client + + // An integer value representing the logging level. The default log level + // is zero (LogOff), which represents no logging. To enable logging set + // to a LogLevel Value. + LogLevel *LogLevelType + + // The logger writer interface to write logging messages to. Defaults to + // standard out. + Logger Logger + + // The maximum number of times that a request will be retried for failures. + // Defaults to -1, which defers the max retry setting to the service specific + // configuration. + MaxRetries *int + + // Disables semantic parameter validation, which validates input for missing + // required fields and/or other semantic request input errors. + DisableParamValidation *bool + + // Disables the computation of request and response checksums, e.g., + // CRC32 checksums in Amazon DynamoDB. + DisableComputeChecksums *bool + + // Set this to `true` to force the request to use path-style addressing, + // i.e., `http://s3.amazonaws.com/BUCKET/KEY`. By default, the S3 client will + // use virtual hosted bucket addressing when possible + // (`http://BUCKET.s3.amazonaws.com/KEY`). + // + // @note This configuration option is specific to the Amazon S3 service. + // @see http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html + // Amazon S3: Virtual Hosting of Buckets + S3ForcePathStyle *bool + + SleepDelay func(time.Duration) } -// Copy will return a shallow copy of the Config object. -func (c Config) Copy() Config { - dst := Config{} - dst.Credentials = c.Credentials - dst.Endpoint = c.Endpoint - dst.Region = c.Region - dst.DisableSSL = c.DisableSSL - dst.ManualSend = c.ManualSend - dst.HTTPClient = c.HTTPClient - dst.LogLevel = c.LogLevel - dst.Logger = c.Logger - dst.MaxRetries = c.MaxRetries - dst.DisableParamValidation = c.DisableParamValidation - dst.DisableComputeChecksums = c.DisableComputeChecksums - dst.S3ForcePathStyle = c.S3ForcePathStyle - - return dst +// NewConfig returns a new Config pointer that can be chained with builder methods to +// set multiple configuration values inline without using pointers. +// +// svc := s3.New(aws.NewConfig().WithRegion("us-west-2").WithMaxRetries(10)) +// +func NewConfig() *Config { + return &Config{} } -// Merge merges the newcfg attribute values into this Config. Each attribute -// will be merged into this config if the newcfg attribute's value is non-zero. -// Due to this, newcfg attributes with zero values cannot be merged in. For -// example bool attributes cannot be cleared using Merge, and must be explicitly -// set on the Config structure. -func (c Config) Merge(newcfg *Config) *Config { - if newcfg == nil { +// WithCredentials sets a config Credentials value returning a Config pointer +// for chaining. +func (c *Config) WithCredentials(creds *credentials.Credentials) *Config { + c.Credentials = creds + return c +} + +// WithEndpoint sets a config Endpoint value returning a Config pointer for +// chaining. +func (c *Config) WithEndpoint(endpoint string) *Config { + c.Endpoint = &endpoint + return c +} + +// WithRegion sets a config Region value returning a Config pointer for +// chaining. +func (c *Config) WithRegion(region string) *Config { + c.Region = ®ion + return c +} + +// WithDisableSSL sets a config DisableSSL value returning a Config pointer +// for chaining. +func (c *Config) WithDisableSSL(disable bool) *Config { + c.DisableSSL = &disable + return c +} + +// WithHTTPClient sets a config HTTPClient value returning a Config pointer +// for chaining. +func (c *Config) WithHTTPClient(client *http.Client) *Config { + c.HTTPClient = client + return c +} + +// WithMaxRetries sets a config MaxRetries value returning a Config pointer +// for chaining. +func (c *Config) WithMaxRetries(max int) *Config { + c.MaxRetries = &max + return c +} + +// WithDisableParamValidation sets a config DisableParamValidation value +// returning a Config pointer for chaining. +func (c *Config) WithDisableParamValidation(disable bool) *Config { + c.DisableParamValidation = &disable + return c +} + +// WithDisableComputeChecksums sets a config DisableComputeChecksums value +// returning a Config pointer for chaining. +func (c *Config) WithDisableComputeChecksums(disable bool) *Config { + c.DisableComputeChecksums = &disable + return c +} + +// WithLogLevel sets a config LogLevel value returning a Config pointer for +// chaining. +func (c *Config) WithLogLevel(level LogLevelType) *Config { + c.LogLevel = &level + return c +} + +// WithLogger sets a config Logger value returning a Config pointer for +// chaining. +func (c *Config) WithLogger(logger Logger) *Config { + c.Logger = logger + return c +} + +// WithS3ForcePathStyle sets a config S3ForcePathStyle value returning a Config +// pointer for chaining. +func (c *Config) WithS3ForcePathStyle(force bool) *Config { + c.S3ForcePathStyle = &force + return c +} + +// WithSleepDelay overrides the function used to sleep while waiting for the +// next retry. Defaults to time.Sleep. +func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config { + c.SleepDelay = fn + return c +} + +// Merge returns a new Config with the other Config's attribute values merged into +// this Config. If the other Config's attribute is nil it will not be merged into +// the new Config to be returned. +func (c Config) Merge(other *Config) *Config { + if other == nil { return &c } - cfg := Config{} + dst := c - if newcfg != nil && newcfg.Credentials != nil { - cfg.Credentials = newcfg.Credentials - } else { - cfg.Credentials = c.Credentials + if other.Credentials != nil { + dst.Credentials = other.Credentials } - if newcfg != nil && newcfg.Endpoint != "" { - cfg.Endpoint = newcfg.Endpoint - } else { - cfg.Endpoint = c.Endpoint + if other.Endpoint != nil { + dst.Endpoint = other.Endpoint } - if newcfg != nil && newcfg.Region != "" { - cfg.Region = newcfg.Region - } else { - cfg.Region = c.Region + if other.Region != nil { + dst.Region = other.Region } - if newcfg != nil && newcfg.DisableSSL { - cfg.DisableSSL = newcfg.DisableSSL - } else { - cfg.DisableSSL = c.DisableSSL + if other.DisableSSL != nil { + dst.DisableSSL = other.DisableSSL } - if newcfg != nil && newcfg.ManualSend { - cfg.ManualSend = newcfg.ManualSend - } else { - cfg.ManualSend = c.ManualSend + if other.HTTPClient != nil { + dst.HTTPClient = other.HTTPClient } - if newcfg != nil && newcfg.HTTPClient != nil { - cfg.HTTPClient = newcfg.HTTPClient - } else { - cfg.HTTPClient = c.HTTPClient + if other.LogLevel != nil { + dst.LogLevel = other.LogLevel } - if newcfg != nil && newcfg.LogHTTPBody { - cfg.LogHTTPBody = newcfg.LogHTTPBody - } else { - cfg.LogHTTPBody = c.LogHTTPBody + if other.Logger != nil { + dst.Logger = other.Logger } - if newcfg != nil && newcfg.LogLevel != 0 { - cfg.LogLevel = newcfg.LogLevel - } else { - cfg.LogLevel = c.LogLevel + if other.MaxRetries != nil { + dst.MaxRetries = other.MaxRetries } - if newcfg != nil && newcfg.Logger != nil { - cfg.Logger = newcfg.Logger - } else { - cfg.Logger = c.Logger + if other.DisableParamValidation != nil { + dst.DisableParamValidation = other.DisableParamValidation } - if newcfg != nil && newcfg.MaxRetries != DefaultRetries { - cfg.MaxRetries = newcfg.MaxRetries - } else { - cfg.MaxRetries = c.MaxRetries + if other.DisableComputeChecksums != nil { + dst.DisableComputeChecksums = other.DisableComputeChecksums } - if newcfg != nil && newcfg.DisableParamValidation { - cfg.DisableParamValidation = newcfg.DisableParamValidation - } else { - cfg.DisableParamValidation = c.DisableParamValidation + if other.S3ForcePathStyle != nil { + dst.S3ForcePathStyle = other.S3ForcePathStyle } - if newcfg != nil && newcfg.DisableComputeChecksums { - cfg.DisableComputeChecksums = newcfg.DisableComputeChecksums - } else { - cfg.DisableComputeChecksums = c.DisableComputeChecksums + if other.SleepDelay != nil { + dst.SleepDelay = other.SleepDelay } - if newcfg != nil && newcfg.S3ForcePathStyle { - cfg.S3ForcePathStyle = newcfg.S3ForcePathStyle - } else { - cfg.S3ForcePathStyle = c.S3ForcePathStyle - } - - return &cfg + return &dst +} + +// Copy will return a shallow copy of the Config object. +func (c Config) Copy() *Config { + dst := c + return &dst } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config_test.go new file mode 100644 index 00000000000..c4320ca1ede --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/config_test.go @@ -0,0 +1,80 @@ +package aws + +import ( + "net/http" + "reflect" + "testing" + + "github.com/aws/aws-sdk-go/aws/credentials" +) + +var testCredentials = credentials.NewStaticCredentials("AKID", "SECRET", "SESSION") + +var copyTestConfig = Config{ + Credentials: testCredentials, + Endpoint: String("CopyTestEndpoint"), + Region: String("COPY_TEST_AWS_REGION"), + DisableSSL: Bool(true), + HTTPClient: http.DefaultClient, + LogLevel: LogLevel(LogDebug), + Logger: NewDefaultLogger(), + MaxRetries: Int(DefaultRetries), + DisableParamValidation: Bool(true), + DisableComputeChecksums: Bool(true), + S3ForcePathStyle: Bool(true), +} + +func TestCopy(t *testing.T) { + want := copyTestConfig + got := copyTestConfig.Copy() + if !reflect.DeepEqual(*got, want) { + t.Errorf("Copy() = %+v", got) + t.Errorf(" want %+v", want) + } +} + +func TestCopyReturnsNewInstance(t *testing.T) { + want := copyTestConfig + got := copyTestConfig.Copy() + if got == &want { + t.Errorf("Copy() = %p; want different instance as source %p", got, &want) + } +} + +var mergeTestZeroValueConfig = Config{} + +var mergeTestConfig = Config{ + Credentials: testCredentials, + Endpoint: String("MergeTestEndpoint"), + Region: String("MERGE_TEST_AWS_REGION"), + DisableSSL: Bool(true), + HTTPClient: http.DefaultClient, + LogLevel: LogLevel(LogDebug), + Logger: NewDefaultLogger(), + MaxRetries: Int(10), + DisableParamValidation: Bool(true), + DisableComputeChecksums: Bool(true), + S3ForcePathStyle: Bool(true), +} + +var mergeTests = []struct { + cfg *Config + in *Config + want *Config +}{ + {&Config{}, nil, &Config{}}, + {&Config{}, &mergeTestZeroValueConfig, &Config{}}, + {&Config{}, &mergeTestConfig, &mergeTestConfig}, +} + +func TestMerge(t *testing.T) { + for i, tt := range mergeTests { + got := tt.cfg.Merge(tt.in) + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("Config %d %+v", i, tt.cfg) + t.Errorf(" Merge(%+v)", tt.in) + t.Errorf(" got %+v", got) + t.Errorf(" want %+v", tt.want) + } + } +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types.go new file mode 100644 index 00000000000..d6a7b08dffe --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types.go @@ -0,0 +1,357 @@ +package aws + +import "time" + +// String returns a pointer to of the string value passed in. +func String(v string) *string { + return &v +} + +// StringValue returns the value of the string pointer passed in or +// "" if the pointer is nil. +func StringValue(v *string) string { + if v != nil { + return *v + } + return "" +} + +// StringSlice converts a slice of string values into a slice of +// string pointers +func StringSlice(src []string) []*string { + dst := make([]*string, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// StringValueSlice converts a slice of string pointers into a slice of +// string values +func StringValueSlice(src []*string) []string { + dst := make([]string, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// StringMap converts a string map of string values into a string +// map of string pointers +func StringMap(src map[string]string) map[string]*string { + dst := make(map[string]*string) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// StringValueMap converts a string map of string pointers into a string +// map of string values +func StringValueMap(src map[string]*string) map[string]string { + dst := make(map[string]string) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Bool returns a pointer to of the bool value passed in. +func Bool(v bool) *bool { + return &v +} + +// BoolValue returns the value of the bool pointer passed in or +// false if the pointer is nil. +func BoolValue(v *bool) bool { + if v != nil { + return *v + } + return false +} + +// BoolSlice converts a slice of bool values into a slice of +// bool pointers +func BoolSlice(src []bool) []*bool { + dst := make([]*bool, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// BoolValueSlice converts a slice of bool pointers into a slice of +// bool values +func BoolValueSlice(src []*bool) []bool { + dst := make([]bool, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// BoolMap converts a string map of bool values into a string +// map of bool pointers +func BoolMap(src map[string]bool) map[string]*bool { + dst := make(map[string]*bool) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// BoolValueMap converts a string map of bool pointers into a string +// map of bool values +func BoolValueMap(src map[string]*bool) map[string]bool { + dst := make(map[string]bool) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int returns a pointer to of the int value passed in. +func Int(v int) *int { + return &v +} + +// IntValue returns the value of the int pointer passed in or +// 0 if the pointer is nil. +func IntValue(v *int) int { + if v != nil { + return *v + } + return 0 +} + +// IntSlice converts a slice of int values into a slice of +// int pointers +func IntSlice(src []int) []*int { + dst := make([]*int, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// IntValueSlice converts a slice of int pointers into a slice of +// int values +func IntValueSlice(src []*int) []int { + dst := make([]int, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// IntMap converts a string map of int values into a string +// map of int pointers +func IntMap(src map[string]int) map[string]*int { + dst := make(map[string]*int) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// IntValueMap converts a string map of int pointers into a string +// map of int values +func IntValueMap(src map[string]*int) map[string]int { + dst := make(map[string]int) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Int64 returns a pointer to of the int64 value passed in. +func Int64(v int64) *int64 { + return &v +} + +// Int64Value returns the value of the int64 pointer passed in or +// 0 if the pointer is nil. +func Int64Value(v *int64) int64 { + if v != nil { + return *v + } + return 0 +} + +// Int64Slice converts a slice of int64 values into a slice of +// int64 pointers +func Int64Slice(src []int64) []*int64 { + dst := make([]*int64, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Int64ValueSlice converts a slice of int64 pointers into a slice of +// int64 values +func Int64ValueSlice(src []*int64) []int64 { + dst := make([]int64, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Int64Map converts a string map of int64 values into a string +// map of int64 pointers +func Int64Map(src map[string]int64) map[string]*int64 { + dst := make(map[string]*int64) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Int64ValueMap converts a string map of int64 pointers into a string +// map of int64 values +func Int64ValueMap(src map[string]*int64) map[string]int64 { + dst := make(map[string]int64) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Float64 returns a pointer to of the float64 value passed in. +func Float64(v float64) *float64 { + return &v +} + +// Float64Value returns the value of the float64 pointer passed in or +// 0 if the pointer is nil. +func Float64Value(v *float64) float64 { + if v != nil { + return *v + } + return 0 +} + +// Float64Slice converts a slice of float64 values into a slice of +// float64 pointers +func Float64Slice(src []float64) []*float64 { + dst := make([]*float64, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// Float64ValueSlice converts a slice of float64 pointers into a slice of +// float64 values +func Float64ValueSlice(src []*float64) []float64 { + dst := make([]float64, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// Float64Map converts a string map of float64 values into a string +// map of float64 pointers +func Float64Map(src map[string]float64) map[string]*float64 { + dst := make(map[string]*float64) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// Float64ValueMap converts a string map of float64 pointers into a string +// map of float64 values +func Float64ValueMap(src map[string]*float64) map[string]float64 { + dst := make(map[string]float64) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} + +// Time returns a pointer to of the time.Time value passed in. +func Time(v time.Time) *time.Time { + return &v +} + +// TimeValue returns the value of the time.Time pointer passed in or +// time.Time{} if the pointer is nil. +func TimeValue(v *time.Time) time.Time { + if v != nil { + return *v + } + return time.Time{} +} + +// TimeSlice converts a slice of time.Time values into a slice of +// time.Time pointers +func TimeSlice(src []time.Time) []*time.Time { + dst := make([]*time.Time, len(src)) + for i := 0; i < len(src); i++ { + dst[i] = &(src[i]) + } + return dst +} + +// TimeValueSlice converts a slice of time.Time pointers into a slice of +// time.Time values +func TimeValueSlice(src []*time.Time) []time.Time { + dst := make([]time.Time, len(src)) + for i := 0; i < len(src); i++ { + if src[i] != nil { + dst[i] = *(src[i]) + } + } + return dst +} + +// TimeMap converts a string map of time.Time values into a string +// map of time.Time pointers +func TimeMap(src map[string]time.Time) map[string]*time.Time { + dst := make(map[string]*time.Time) + for k, val := range src { + v := val + dst[k] = &v + } + return dst +} + +// TimeValueMap converts a string map of time.Time pointers into a string +// map of time.Time values +func TimeValueMap(src map[string]*time.Time) map[string]time.Time { + dst := make(map[string]time.Time) + for k, val := range src { + if val != nil { + dst[k] = *val + } + } + return dst +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types_test.go new file mode 100644 index 00000000000..df7a3e5d2de --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convert_types_test.go @@ -0,0 +1,437 @@ +package aws + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +var testCasesStringSlice = [][]string{ + {"a", "b", "c", "d", "e"}, + {"a", "b", "", "", "e"}, +} + +func TestStringSlice(t *testing.T) { + for idx, in := range testCasesStringSlice { + if in == nil { + continue + } + out := StringSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := StringValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesStringValueSlice = [][]*string{ + {String("a"), String("b"), nil, String("c")}, +} + +func TestStringValueSlice(t *testing.T) { + for idx, in := range testCasesStringValueSlice { + if in == nil { + continue + } + out := StringValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := StringSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesStringMap = []map[string]string{ + {"a": "1", "b": "2", "c": "3"}, +} + +func TestStringMap(t *testing.T) { + for idx, in := range testCasesStringMap { + if in == nil { + continue + } + out := StringMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := StringValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesBoolSlice = [][]bool{ + {true, true, false, false}, +} + +func TestBoolSlice(t *testing.T) { + for idx, in := range testCasesBoolSlice { + if in == nil { + continue + } + out := BoolSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := BoolValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesBoolValueSlice = [][]*bool{} + +func TestBoolValueSlice(t *testing.T) { + for idx, in := range testCasesBoolValueSlice { + if in == nil { + continue + } + out := BoolValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := BoolSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesBoolMap = []map[string]bool{ + {"a": true, "b": false, "c": true}, +} + +func TestBoolMap(t *testing.T) { + for idx, in := range testCasesBoolMap { + if in == nil { + continue + } + out := BoolMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := BoolValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesIntSlice = [][]int{ + {1, 2, 3, 4}, +} + +func TestIntSlice(t *testing.T) { + for idx, in := range testCasesIntSlice { + if in == nil { + continue + } + out := IntSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := IntValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesIntValueSlice = [][]*int{} + +func TestIntValueSlice(t *testing.T) { + for idx, in := range testCasesIntValueSlice { + if in == nil { + continue + } + out := IntValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := IntSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesIntMap = []map[string]int{ + {"a": 3, "b": 2, "c": 1}, +} + +func TestIntMap(t *testing.T) { + for idx, in := range testCasesIntMap { + if in == nil { + continue + } + out := IntMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := IntValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesInt64Slice = [][]int64{ + {1, 2, 3, 4}, +} + +func TestInt64Slice(t *testing.T) { + for idx, in := range testCasesInt64Slice { + if in == nil { + continue + } + out := Int64Slice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Int64ValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesInt64ValueSlice = [][]*int64{} + +func TestInt64ValueSlice(t *testing.T) { + for idx, in := range testCasesInt64ValueSlice { + if in == nil { + continue + } + out := Int64ValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := Int64Slice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesInt64Map = []map[string]int64{ + {"a": 3, "b": 2, "c": 1}, +} + +func TestInt64Map(t *testing.T) { + for idx, in := range testCasesInt64Map { + if in == nil { + continue + } + out := Int64Map(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Int64ValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesFloat64Slice = [][]float64{ + {1, 2, 3, 4}, +} + +func TestFloat64Slice(t *testing.T) { + for idx, in := range testCasesFloat64Slice { + if in == nil { + continue + } + out := Float64Slice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Float64ValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesFloat64ValueSlice = [][]*float64{} + +func TestFloat64ValueSlice(t *testing.T) { + for idx, in := range testCasesFloat64ValueSlice { + if in == nil { + continue + } + out := Float64ValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := Float64Slice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesFloat64Map = []map[string]float64{ + {"a": 3, "b": 2, "c": 1}, +} + +func TestFloat64Map(t *testing.T) { + for idx, in := range testCasesFloat64Map { + if in == nil { + continue + } + out := Float64Map(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := Float64ValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesTimeSlice = [][]time.Time{ + {time.Now(), time.Now().AddDate(100, 0, 0)}, +} + +func TestTimeSlice(t *testing.T) { + for idx, in := range testCasesTimeSlice { + if in == nil { + continue + } + out := TimeSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := TimeValueSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} + +var testCasesTimeValueSlice = [][]*time.Time{} + +func TestTimeValueSlice(t *testing.T) { + for idx, in := range testCasesTimeValueSlice { + if in == nil { + continue + } + out := TimeValueSlice(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + if in[i] == nil { + assert.Empty(t, out[i], "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx) + } + } + + out2 := TimeSlice(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + for i := range out2 { + if in[i] == nil { + assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx) + } else { + assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx) + } + } + } +} + +var testCasesTimeMap = []map[string]time.Time{ + {"a": time.Now().AddDate(-100, 0, 0), "b": time.Now()}, +} + +func TestTimeMap(t *testing.T) { + for idx, in := range testCasesTimeMap { + if in == nil { + continue + } + out := TimeMap(in) + assert.Len(t, out, len(in), "Unexpected len at idx %d", idx) + for i := range out { + assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx) + } + + out2 := TimeValueMap(out) + assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx) + assert.Equal(t, in, out2, "Unexpected value at idx %d", idx) + } +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handler_functions.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go similarity index 58% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handler_functions.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go index e15ab8291f7..2fcb391a288 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handler_functions.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go @@ -1,4 +1,4 @@ -package aws +package corehandlers import ( "bytes" @@ -9,16 +9,12 @@ import ( "net/url" "regexp" "strconv" - "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/request" ) -var sleepDelay = func(delay time.Duration) { - time.Sleep(delay) -} - // Interface for matching types which also have a Len method. type lener interface { Len() int @@ -27,7 +23,7 @@ type lener interface { // BuildContentLength 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. -func BuildContentLength(r *Request) { +var BuildContentLengthHandler = request.NamedHandler{"core.BuildContentLengthHandler", func(r *request.Request) { if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" { length, _ := strconv.ParseInt(slength, 10, 64) r.HTTPRequest.ContentLength = length @@ -41,27 +37,27 @@ func BuildContentLength(r *Request) { case lener: length = int64(body.Len()) case io.Seeker: - r.bodyStart, _ = body.Seek(0, 1) + r.BodyStart, _ = body.Seek(0, 1) end, _ := body.Seek(0, 2) - body.Seek(r.bodyStart, 0) // make sure to seek back to original location - length = end - r.bodyStart + body.Seek(r.BodyStart, 0) // make sure to seek back to original location + length = end - r.BodyStart default: panic("Cannot get length of body, must provide `ContentLength`") } r.HTTPRequest.ContentLength = length r.HTTPRequest.Header.Set("Content-Length", fmt.Sprintf("%d", length)) -} +}} // UserAgentHandler is a request handler for injecting User agent into requests. -func UserAgentHandler(r *Request) { - r.HTTPRequest.Header.Set("User-Agent", SDKName+"/"+SDKVersion) -} +var UserAgentHandler = request.NamedHandler{"core.UserAgentHandler", func(r *request.Request) { + r.HTTPRequest.Header.Set("User-Agent", aws.SDKName+"/"+aws.SDKVersion) +}} -var reStatusCode = regexp.MustCompile(`^(\d+)`) +var reStatusCode = regexp.MustCompile(`^(\d{3})`) // SendHandler is a request handler to send service request using HTTP client. -func SendHandler(r *Request) { +var SendHandler = request.NamedHandler{"core.SendHandler", func(r *request.Request) { var err error r.HTTPResponse, err = r.Service.Config.HTTPClient.Do(r.HTTPRequest) if err != nil { @@ -69,8 +65,8 @@ func SendHandler(r *Request) { // 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 { - if s := reStatusCode.FindStringSubmatch(e.Error()); s != nil { + 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), @@ -80,68 +76,61 @@ func SendHandler(r *Request) { return } } + 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 = apierr.New("RequestError", "send request failed", err) - r.Retryable.Set(true) // network errors are retryable + r.Error = awserr.New("RequestError", "send request failed", err) + r.Retryable = aws.Bool(true) // network errors are retryable } -} +}} // ValidateResponseHandler is a request handler to validate service response. -func ValidateResponseHandler(r *Request) { +var ValidateResponseHandler = request.NamedHandler{"core.ValidateResponseHandler", func(r *request.Request) { if r.HTTPResponse.StatusCode == 0 || r.HTTPResponse.StatusCode >= 300 { // this may be replaced by an UnmarshalError handler - r.Error = apierr.New("UnknownError", "unknown error", nil) + r.Error = awserr.New("UnknownError", "unknown error", nil) } -} +}} // AfterRetryHandler performs final checks to determine if the request should // be retried and how long to delay. -func AfterRetryHandler(r *Request) { +var AfterRetryHandler = request.NamedHandler{"core.AfterRetryHandler", 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.IsSet() { - r.Retryable.Set(r.Service.ShouldRetry(r)) + if r.Retryable == nil { + r.Retryable = aws.Bool(r.ShouldRetry(r)) } if r.WillRetry() { - r.RetryDelay = r.Service.RetryRules(r) - sleepDelay(r.RetryDelay) + r.RetryDelay = r.RetryRules(r) + r.Service.Config.SleepDelay(r.RetryDelay) // when the expired token exception occurs the credentials // need to be expired locally so that the next request to // get credentials will trigger a credentials refresh. - if r.Error != nil { - if err, ok := r.Error.(awserr.Error); ok { - if isCodeExpiredCreds(err.Code()) { - r.Config.Credentials.Expire() - // The credentials will need to be resigned with new credentials - r.signed = false - } - } + if r.IsErrorExpired() { + r.Service.Config.Credentials.Expire() } r.RetryCount++ r.Error = nil } -} - -var ( - // ErrMissingRegion is an error that is returned if region configuration is - // not found. - ErrMissingRegion error = apierr.New("MissingRegion", "could not find region configuration", nil) - - // ErrMissingEndpoint is an error that is returned if an endpoint cannot be - // resolved for a service. - ErrMissingEndpoint error = apierr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil) -) +}} // ValidateEndpointHandler is a request handler to validate a request had the // appropriate Region and Endpoint set. Will set r.Error if the endpoint or // region is not valid. -func ValidateEndpointHandler(r *Request) { - if r.Service.SigningRegion == "" && r.Service.Config.Region == "" { - r.Error = ErrMissingRegion +var ValidateEndpointHandler = request.NamedHandler{"core.ValidateEndpointHandler", func(r *request.Request) { + if r.Service.SigningRegion == "" && aws.StringValue(r.Service.Config.Region) == "" { + r.Error = aws.ErrMissingRegion } else if r.Service.Endpoint == "" { - r.Error = ErrMissingEndpoint + r.Error = aws.ErrMissingEndpoint } -} +}} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go new file mode 100644 index 00000000000..214adcab088 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go @@ -0,0 +1,107 @@ +package corehandlers_test + +import ( + "fmt" + "net/http" + "os" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/corehandlers" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/service" +) + +func TestValidateEndpointHandler(t *testing.T) { + os.Clearenv() + svc := service.New(aws.NewConfig().WithRegion("us-west-2")) + svc.Handlers.Clear() + svc.Handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler) + + req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) + err := req.Build() + + assert.NoError(t, err) +} + +func TestValidateEndpointHandlerErrorRegion(t *testing.T) { + os.Clearenv() + svc := service.New(nil) + svc.Handlers.Clear() + svc.Handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler) + + req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) + err := req.Build() + + assert.Error(t, err) + assert.Equal(t, aws.ErrMissingRegion, err) +} + +type mockCredsProvider struct { + expired bool + retrieveCalled bool +} + +func (m *mockCredsProvider) Retrieve() (credentials.Value, error) { + m.retrieveCalled = true + return credentials.Value{}, nil +} + +func (m *mockCredsProvider) IsExpired() bool { + return m.expired +} + +func TestAfterRetryRefreshCreds(t *testing.T) { + os.Clearenv() + credProvider := &mockCredsProvider{} + svc := service.New(&aws.Config{Credentials: credentials.NewCredentials(credProvider), MaxRetries: aws.Int(1)}) + + svc.Handlers.Clear() + svc.Handlers.ValidateResponse.PushBack(func(r *request.Request) { + r.Error = awserr.New("UnknownError", "", nil) + r.HTTPResponse = &http.Response{StatusCode: 400} + }) + svc.Handlers.UnmarshalError.PushBack(func(r *request.Request) { + r.Error = awserr.New("ExpiredTokenException", "", nil) + }) + svc.Handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler) + + assert.True(t, svc.Config.Credentials.IsExpired(), "Expect to start out expired") + assert.False(t, credProvider.retrieveCalled) + + req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) + req.Send() + + assert.True(t, svc.Config.Credentials.IsExpired()) + assert.False(t, credProvider.retrieveCalled) + + _, err := svc.Config.Credentials.Get() + assert.NoError(t, err) + assert.True(t, credProvider.retrieveCalled) +} + +type testSendHandlerTransport struct{} + +func (t *testSendHandlerTransport) RoundTrip(r *http.Request) (*http.Response, error) { + return nil, fmt.Errorf("mock error") +} + +func TestSendHandlerError(t *testing.T) { + svc := service.New(&aws.Config{ + HTTPClient: &http.Client{ + Transport: &testSendHandlerTransport{}, + }, + }) + svc.Handlers.Clear() + svc.Handlers.Send.PushBackNamed(corehandlers.SendHandler) + r := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) + + r.Send() + + assert.Error(t, r.Error) + assert.NotNil(t, r.HTTPResponse) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go new file mode 100644 index 00000000000..a2219773411 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go @@ -0,0 +1,144 @@ +package corehandlers + +import ( + "fmt" + "reflect" + "strconv" + "strings" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" +) + +// ValidateParameters 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() { + v := validator{errors: []string{}} + v.validateAny(reflect.ValueOf(r.Params), "") + + if count := len(v.errors); count > 0 { + format := "%d validation errors:\n- %s" + msg := fmt.Sprintf(format, count, strings.Join(v.errors, "\n- ")) + r.Error = awserr.New("InvalidParameter", msg, nil) + } + } +}} + +// A validator validates values. Collects validations errors which occurs. +type validator struct { + errors []string +} + +// validateAny will validate any struct, slice or map type. All validations +// are also performed recursively for nested types. +func (v *validator) validateAny(value reflect.Value, path string) { + value = reflect.Indirect(value) + if !value.IsValid() { + return + } + + switch value.Kind() { + case reflect.Struct: + v.validateStruct(value, path) + case reflect.Slice: + for i := 0; i < value.Len(); i++ { + v.validateAny(value.Index(i), path+fmt.Sprintf("[%d]", i)) + } + case reflect.Map: + for _, n := range value.MapKeys() { + v.validateAny(value.MapIndex(n), path+fmt.Sprintf("[%q]", n.String())) + } + } +} + +// validateStruct will validate the struct value's fields. If the structure has +// nested types those types will be validated also. +func (v *validator) validateStruct(value reflect.Value, path string) { + prefix := "." + if path == "" { + prefix = "" + } + + for i := 0; i < value.Type().NumField(); i++ { + f := value.Type().Field(i) + if strings.ToLower(f.Name[0:1]) == f.Name[0:1] { + continue + } + fvalue := value.FieldByName(f.Name) + + err := validateField(f, fvalue, validateFieldRequired, validateFieldMin) + if err != nil { + v.errors = append(v.errors, fmt.Sprintf("%s: %s", err.Error(), path+prefix+f.Name)) + continue + } + + v.validateAny(fvalue, path+prefix+f.Name) + } +} + +type validatorFunc func(f reflect.StructField, fvalue reflect.Value) error + +func validateField(f reflect.StructField, fvalue reflect.Value, funcs ...validatorFunc) error { + for _, fn := range funcs { + if err := fn(f, fvalue); err != nil { + return err + } + } + return nil +} + +// Validates that a field has a valid value provided for required fields. +func validateFieldRequired(f reflect.StructField, fvalue reflect.Value) error { + if f.Tag.Get("required") == "" { + return nil + } + + switch fvalue.Kind() { + case reflect.Ptr, reflect.Slice, reflect.Map: + if fvalue.IsNil() { + return fmt.Errorf("missing required parameter") + } + default: + if !fvalue.IsValid() { + return fmt.Errorf("missing required parameter") + } + } + return nil +} + +// Validates that if a value is provided for a field, that value must be at +// least a minimum length. +func validateFieldMin(f reflect.StructField, fvalue reflect.Value) error { + minStr := f.Tag.Get("min") + if minStr == "" { + return nil + } + min, _ := strconv.ParseInt(minStr, 10, 64) + + kind := fvalue.Kind() + if kind == reflect.Ptr { + if fvalue.IsNil() { + return nil + } + fvalue = fvalue.Elem() + } + + switch fvalue.Kind() { + case reflect.String: + if int64(fvalue.Len()) < min { + return fmt.Errorf("field too short, minimum length %d", min) + } + case reflect.Slice, reflect.Map: + if fvalue.IsNil() { + return nil + } + if int64(fvalue.Len()) < min { + return fmt.Errorf("field too short, minimum length %d", min) + } + + // TODO min can also apply to number minimum value. + + } + return nil +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go new file mode 100644 index 00000000000..db483ba408b --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go @@ -0,0 +1,134 @@ +package corehandlers_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/corehandlers" + "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/stretchr/testify/require" +) + +var testSvc = func() *service.Service { + s := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: &aws.Config{}, + ServiceName: "mock-service", + APIVersion: "2015-01-01", + }, + } + return s +}() + +type StructShape struct { + RequiredList []*ConditionalStructShape `required:"true"` + RequiredMap map[string]*ConditionalStructShape `required:"true"` + RequiredBool *bool `required:"true"` + OptionalStruct *ConditionalStructShape + + hiddenParameter *string + + metadataStructureShape +} + +type metadataStructureShape struct { + SDKShapeTraits bool +} + +type ConditionalStructShape struct { + Name *string `required:"true"` + SDKShapeTraits bool +} + +func TestNoErrors(t *testing.T) { + input := &StructShape{ + RequiredList: []*ConditionalStructShape{}, + RequiredMap: map[string]*ConditionalStructShape{ + "key1": {Name: aws.String("Name")}, + "key2": {Name: aws.String("Name")}, + }, + RequiredBool: aws.Bool(true), + OptionalStruct: &ConditionalStructShape{Name: aws.String("Name")}, + } + + req := testSvc.NewRequest(&request.Operation{}, input, nil) + corehandlers.ValidateParametersHandler.Fn(req) + require.NoError(t, req.Error) +} + +func TestMissingRequiredParameters(t *testing.T) { + input := &StructShape{} + req := testSvc.NewRequest(&request.Operation{}, input, nil) + corehandlers.ValidateParametersHandler.Fn(req) + + require.Error(t, req.Error) + assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code()) + assert.Equal(t, "3 validation errors:\n- missing required parameter: RequiredList\n- missing required parameter: RequiredMap\n- missing required parameter: RequiredBool", req.Error.(awserr.Error).Message()) +} + +func TestNestedMissingRequiredParameters(t *testing.T) { + input := &StructShape{ + RequiredList: []*ConditionalStructShape{{}}, + RequiredMap: map[string]*ConditionalStructShape{ + "key1": {Name: aws.String("Name")}, + "key2": {}, + }, + RequiredBool: aws.Bool(true), + OptionalStruct: &ConditionalStructShape{}, + } + + req := testSvc.NewRequest(&request.Operation{}, input, nil) + corehandlers.ValidateParametersHandler.Fn(req) + + require.Error(t, req.Error) + assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code()) + assert.Equal(t, "3 validation errors:\n- missing required parameter: RequiredList[0].Name\n- missing required parameter: RequiredMap[\"key2\"].Name\n- missing required parameter: OptionalStruct.Name", req.Error.(awserr.Error).Message()) +} + +type testInput struct { + StringField string `min:"5"` + PtrStrField *string `min:"2"` + ListField []string `min:"3"` + MapField map[string]string `min:"4"` +} + +var testsFieldMin = []struct { + err awserr.Error + in testInput +}{ + { + err: awserr.New("InvalidParameter", "1 validation errors:\n- field too short, minimum length 5: StringField", nil), + in: testInput{StringField: "abcd"}, + }, + { + err: awserr.New("InvalidParameter", "2 validation errors:\n- field too short, minimum length 5: StringField\n- field too short, minimum length 3: ListField", nil), + in: testInput{StringField: "abcd", ListField: []string{"a", "b"}}, + }, + { + err: awserr.New("InvalidParameter", "3 validation errors:\n- field too short, minimum length 5: StringField\n- field too short, minimum length 3: ListField\n- field too short, minimum length 4: MapField", nil), + in: testInput{StringField: "abcd", ListField: []string{"a", "b"}, MapField: map[string]string{"a": "a", "b": "b"}}, + }, + { + err: awserr.New("InvalidParameter", "1 validation errors:\n- field too short, minimum length 2: PtrStrField", nil), + in: testInput{StringField: "abcde", PtrStrField: aws.String("v")}, + }, + { + err: nil, + in: testInput{StringField: "abcde", PtrStrField: aws.String("value"), + ListField: []string{"a", "b", "c"}, MapField: map[string]string{"a": "a", "b": "b", "c": "c", "d": "d"}}, + }, +} + +func TestValidateFieldMinParameter(t *testing.T) { + for i, c := range testsFieldMin { + req := testSvc.NewRequest(&request.Operation{}, &c.in, nil) + corehandlers.ValidateParametersHandler.Fn(req) + + require.Equal(t, c.err, req.Error, "%d case failed", i) + } +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go index 196be7c1728..7f509ca83ca 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go @@ -1,13 +1,15 @@ package credentials import ( - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" ) var ( // ErrNoValidProvidersFoundInChain Is returned when there are no valid // providers in the ChainProvider. - ErrNoValidProvidersFoundInChain = apierr.New("NoCredentialProviders", "no valid providers in chain", nil) + // + // @readonly + ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders", "no valid providers in chain", nil) ) // A ChainProvider will search for a provider which returns credentials @@ -36,7 +38,9 @@ var ( // &EnvProvider{}, // &EC2RoleProvider{}, // }) -// creds.Retrieve() +// +// // Usage of ChainCredentials with aws.Config +// svc := ec2.New(&aws.Config{Credentials: creds}) // type ChainProvider struct { Providers []Provider diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go index 1a275fcac25..4fba22f29f4 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider_test.go @@ -3,15 +3,15 @@ package credentials import ( "testing" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" "github.com/stretchr/testify/assert" ) func TestChainProviderGet(t *testing.T) { p := &ChainProvider{ Providers: []Provider{ - &stubProvider{err: apierr.New("FirstError", "first provider error", nil)}, - &stubProvider{err: apierr.New("SecondError", "second provider error", nil)}, + &stubProvider{err: awserr.New("FirstError", "first provider error", nil)}, + &stubProvider{err: awserr.New("SecondError", "second provider error", nil)}, &stubProvider{ creds: Value{ AccessKeyID: "AKID", @@ -62,8 +62,8 @@ func TestChainProviderWithNoProvider(t *testing.T) { func TestChainProviderWithNoValidProvider(t *testing.T) { p := &ChainProvider{ Providers: []Provider{ - &stubProvider{err: apierr.New("FirstError", "first provider error", nil)}, - &stubProvider{err: apierr.New("SecondError", "second provider error", nil)}, + &stubProvider{err: awserr.New("FirstError", "first provider error", nil)}, + &stubProvider{err: awserr.New("SecondError", "second provider error", nil)}, }, } 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 6f6ec03127e..2834a088aab 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 @@ -63,6 +63,7 @@ import ( // svc := s3.New(&aws.Config{Credentials: AnonymousCredentials}) // // Access public S3 buckets. // +// @readonly var AnonymousCredentials = NewStaticCredentials("", "", "") // A Value is the AWS credentials value for individual credential fields. @@ -93,6 +94,50 @@ type Provider interface { IsExpired() bool } +// A Expiry provides shared expiration logic to be used by credentials +// providers to implement expiry functionality. +// +// The best method to use this struct is as an anonymous field within the +// provider's struct. +// +// Example: +// type EC2RoleProvider struct { +// Expiry +// ... +// } +type Expiry struct { + // The date/time when to expire on + expiration time.Time + + // If set will be used by IsExpired to determine the current time. + // Defaults to time.Now if CurrentTime is not set. Available for testing + // to be able to mock out the current time. + CurrentTime func() time.Time +} + +// SetExpiration sets the expiration IsExpired will check when called. +// +// If window is greater than 0 the expiration time will be reduced by the +// window value. +// +// Using a window is helpful to trigger credentials to expire sooner than +// the expiration time given to ensure no requests are made with expired +// tokens. +func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) { + e.expiration = expiration + if window > 0 { + e.expiration = e.expiration.Add(-window) + } +} + +// IsExpired returns if the credentials are expired. +func (e *Expiry) IsExpired() bool { + if e.CurrentTime == nil { + e.CurrentTime = time.Now + } + return e.expiration.Before(e.CurrentTime()) +} + // A Credentials provides synchronous safe retrieval of AWS credentials Value. // Credentials will cache the credentials value until they expire. Once the value // expires the next Get will attempt to retrieve valid credentials. @@ -173,6 +218,3 @@ func (c *Credentials) IsExpired() bool { func (c *Credentials) isExpired() bool { return c.forceRefresh || c.provider.IsExpired() } - -// Provide a stub-able time.Now for unit tests so expiry can be tested. -var currentTime = time.Now diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go index 779bb0da4a8..99c2b47742e 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/credentials_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/internal/apierr" "github.com/stretchr/testify/assert" ) @@ -40,7 +39,7 @@ func TestCredentialsGet(t *testing.T) { } func TestCredentialsGetWithError(t *testing.T) { - c := NewCredentials(&stubProvider{err: apierr.New("provider error", "", nil), expired: true}) + c := NewCredentials(&stubProvider{err: awserr.New("provider error", "", nil), expired: true}) _, err := c.Get() assert.Equal(t, "provider error", err.(awserr.Error).Code(), "Expected provider error") diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2_role_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2_role_provider_test.go deleted file mode 100644 index 5232a1dcafd..00000000000 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2_role_provider_test.go +++ /dev/null @@ -1,114 +0,0 @@ -package credentials - -import ( - "fmt" - "github.com/stretchr/testify/assert" - "net/http" - "net/http/httptest" - "testing" - "time" -) - -func initTestServer(expireOn string) *httptest.Server { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.RequestURI == "/" { - fmt.Fprintln(w, "/creds") - } else { - fmt.Fprintf(w, `{ - "AccessKeyId" : "accessKey", - "SecretAccessKey" : "secret", - "Token" : "token", - "Expiration" : "%s" -}`, expireOn) - } - })) - - return server -} - -func TestEC2RoleProvider(t *testing.T) { - server := initTestServer("2014-12-16T01:51:37Z") - defer server.Close() - - p := &EC2RoleProvider{Client: http.DefaultClient, Endpoint: server.URL} - - creds, err := p.Retrieve() - assert.Nil(t, err, "Expect no error") - - assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match") - assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match") - assert.Equal(t, "token", creds.SessionToken, "Expect session token to match") -} - -func TestEC2RoleProviderIsExpired(t *testing.T) { - server := initTestServer("2014-12-16T01:51:37Z") - defer server.Close() - - p := &EC2RoleProvider{Client: http.DefaultClient, Endpoint: server.URL} - defer func() { - currentTime = time.Now - }() - currentTime = func() time.Time { - return time.Date(2014, 12, 15, 21, 26, 0, 0, time.UTC) - } - - assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.") - - _, err := p.Retrieve() - assert.Nil(t, err, "Expect no error") - - assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.") - - currentTime = func() time.Time { - return time.Date(3014, 12, 15, 21, 26, 0, 0, time.UTC) - } - - assert.True(t, p.IsExpired(), "Expect creds to be expired.") -} - -func TestEC2RoleProviderExpiryWindowIsExpired(t *testing.T) { - server := initTestServer("2014-12-16T01:51:37Z") - defer server.Close() - - p := &EC2RoleProvider{Client: http.DefaultClient, Endpoint: server.URL, ExpiryWindow: time.Hour * 1} - defer func() { - currentTime = time.Now - }() - currentTime = func() time.Time { - return time.Date(2014, 12, 15, 0, 51, 37, 0, time.UTC) - } - - assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.") - - _, err := p.Retrieve() - assert.Nil(t, err, "Expect no error") - - assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.") - - currentTime = func() time.Time { - return time.Date(2014, 12, 16, 0, 55, 37, 0, time.UTC) - } - - assert.True(t, p.IsExpired(), "Expect creds to be expired.") -} - -func BenchmarkEC2RoleProvider(b *testing.B) { - server := initTestServer("2014-12-16T01:51:37Z") - defer server.Close() - - p := &EC2RoleProvider{Client: http.DefaultClient, Endpoint: server.URL} - _, err := p.Retrieve() - if err != nil { - b.Fatal(err) - } - - b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - _, err := p.Retrieve() - if err != nil { - b.Fatal(err) - } - } - }) -} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2_role_provider.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go similarity index 58% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2_role_provider.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go index ed0c8ba9cd4..946a117206e 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2_role_provider.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go @@ -1,24 +1,25 @@ -package credentials +package ec2rolecreds import ( "bufio" "encoding/json" "fmt" - "net/http" + "path" + "strings" "time" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/ec2metadata" ) -const metadataCredentialsEndpoint = "http://169.254.169.254/latest/meta-data/iam/security-credentials/" - // A EC2RoleProvider retrieves credentials from the EC2 service, and keeps track if // those credentials are expired. // // Example how to configure the EC2RoleProvider with custom http Client, Endpoint // or ExpiryWindow // -// p := &credentials.EC2RoleProvider{ +// p := &ec2rolecreds.EC2RoleProvider{ // // Pass in a custom timeout to be used when requesting // // IAM EC2 Role credentials. // Client: &http.Client{ @@ -31,13 +32,11 @@ const metadataCredentialsEndpoint = "http://169.254.169.254/latest/meta-data/iam // // specified the credentials will be expired early // ExpiryWindow: 0, // } -// type EC2RoleProvider struct { - // Endpoint must be fully quantified URL - Endpoint string + credentials.Expiry - // HTTP client to use when connecting to EC2 service - Client *http.Client + // EC2Metadata client to use when connecting to EC2 metadata service + Client *ec2metadata.Client // ExpiryWindow will allow the credentials to trigger refreshing prior to // the credentials actually expiring. This is beneficial so race conditions @@ -49,12 +48,9 @@ type EC2RoleProvider struct { // // If ExpiryWindow is 0 or less it will be ignored. ExpiryWindow time.Duration - - // The date/time at which the credentials expire. - expiresOn time.Time } -// NewEC2RoleCredentials returns a pointer to a new Credentials object +// NewCredentials returns a pointer to a new Credentials object // wrapping the EC2RoleProvider. // // Takes a custom http.Client which can be configured for custom handling of @@ -66,9 +62,8 @@ type EC2RoleProvider struct { // Window is the expiry window that will be subtracted from the expiry returned // by the role credential request. This is done so that the credentials will // expire sooner than their actual lifespan. -func NewEC2RoleCredentials(client *http.Client, endpoint string, window time.Duration) *Credentials { - return NewCredentials(&EC2RoleProvider{ - Endpoint: endpoint, +func NewCredentials(client *ec2metadata.Client, window time.Duration) *credentials.Credentials { + return credentials.NewCredentials(&EC2RoleProvider{ Client: client, ExpiryWindow: window, }) @@ -77,73 +72,67 @@ func NewEC2RoleCredentials(client *http.Client, endpoint string, window time.Dur // Retrieve retrieves credentials from the EC2 service. // Error will be returned if the request fails, or unable to extract // the desired credentials. -func (m *EC2RoleProvider) Retrieve() (Value, error) { +func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) { if m.Client == nil { - m.Client = http.DefaultClient - } - if m.Endpoint == "" { - m.Endpoint = metadataCredentialsEndpoint + m.Client = ec2metadata.New(nil) } - credsList, err := requestCredList(m.Client, m.Endpoint) + credsList, err := requestCredList(m.Client) if err != nil { - return Value{}, err + return credentials.Value{}, err } if len(credsList) == 0 { - return Value{}, apierr.New("EmptyEC2RoleList", "empty EC2 Role list", nil) + return credentials.Value{}, awserr.New("EmptyEC2RoleList", "empty EC2 Role list", nil) } credsName := credsList[0] - roleCreds, err := requestCred(m.Client, m.Endpoint, credsName) + roleCreds, err := requestCred(m.Client, credsName) if err != nil { - return Value{}, err + return credentials.Value{}, err } - m.expiresOn = roleCreds.Expiration - if m.ExpiryWindow > 0 { - // Offset based on expiry window if set. - m.expiresOn = m.expiresOn.Add(-m.ExpiryWindow) - } + m.SetExpiration(roleCreds.Expiration, m.ExpiryWindow) - return Value{ + return credentials.Value{ AccessKeyID: roleCreds.AccessKeyID, SecretAccessKey: roleCreds.SecretAccessKey, SessionToken: roleCreds.Token, }, nil } -// IsExpired returns if the credentials are expired. -func (m *EC2RoleProvider) IsExpired() bool { - return m.expiresOn.Before(currentTime()) -} - // A ec2RoleCredRespBody provides the shape for deserializing credential // request responses. type ec2RoleCredRespBody struct { + // Success State Expiration time.Time AccessKeyID string SecretAccessKey string Token string + + // Error state + Code string + Message string } +const iamSecurityCredsPath = "/iam/security-credentials" + // requestCredList requests a list of credentials from the EC2 service. // If there are no credentials, or there is an error making or receiving the request -func requestCredList(client *http.Client, endpoint string) ([]string, error) { - resp, err := client.Get(endpoint) +func requestCredList(client *ec2metadata.Client) ([]string, error) { + resp, err := client.GetMetadata(iamSecurityCredsPath) if err != nil { - return nil, apierr.New("ListEC2Role", "failed to list EC2 Roles", err) + return nil, awserr.New("EC2RoleRequestError", "failed to list EC2 Roles", err) } - defer resp.Body.Close() credsList := []string{} - s := bufio.NewScanner(resp.Body) + s := bufio.NewScanner(strings.NewReader(resp)) for s.Scan() { credsList = append(credsList, s.Text()) } if err := s.Err(); err != nil { - return nil, apierr.New("ReadEC2Role", "failed to read list of EC2 Roles", err) + return nil, awserr.New("SerializationError", "failed to read list of EC2 Roles", err) } return credsList, nil @@ -153,20 +142,26 @@ func requestCredList(client *http.Client, endpoint string) ([]string, error) { // // If the credentials cannot be found, or there is an error reading the response // and error will be returned. -func requestCred(client *http.Client, endpoint, credsName string) (*ec2RoleCredRespBody, error) { - resp, err := client.Get(endpoint + credsName) +func requestCred(client *ec2metadata.Client, credsName string) (ec2RoleCredRespBody, error) { + resp, err := client.GetMetadata(path.Join(iamSecurityCredsPath, credsName)) if err != nil { - return nil, apierr.New("GetEC2RoleCredentials", - fmt.Sprintf("failed to get %s EC2 Role credentials", credsName), - err) + return ec2RoleCredRespBody{}, + awserr.New("EC2RoleRequestError", + fmt.Sprintf("failed to get %s EC2 Role credentials", credsName), + err) } - defer resp.Body.Close() - respCreds := &ec2RoleCredRespBody{} - if err := json.NewDecoder(resp.Body).Decode(respCreds); err != nil { - return nil, apierr.New("DecodeEC2RoleCredentials", - fmt.Sprintf("failed to decode %s EC2 Role credentials", credsName), - err) + respCreds := ec2RoleCredRespBody{} + if err := json.NewDecoder(strings.NewReader(resp)).Decode(&respCreds); err != nil { + return ec2RoleCredRespBody{}, + awserr.New("SerializationError", + fmt.Sprintf("failed to decode %s EC2 Role credentials", credsName), + err) + } + + if respCreds.Code != "Success" { + // If an error code was returned something failed requesting the role. + return ec2RoleCredRespBody{}, awserr.New(respCreds.Code, respCreds.Message, nil) } return respCreds, nil diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider_test.go new file mode 100644 index 00000000000..cd0cbc97e06 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider_test.go @@ -0,0 +1,161 @@ +package ec2rolecreds_test + +import ( + "fmt" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/stretchr/testify/assert" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" + "github.com/aws/aws-sdk-go/aws/ec2metadata" +) + +const credsRespTmpl = `{ + "Code": "Success", + "Type": "AWS-HMAC", + "AccessKeyId" : "accessKey", + "SecretAccessKey" : "secret", + "Token" : "token", + "Expiration" : "%s", + "LastUpdated" : "2009-11-23T0:00:00Z" +}` + +const credsFailRespTmpl = `{ + "Code": "ErrorCode", + "Message": "ErrorMsg", + "LastUpdated": "2009-11-23T0:00:00Z" +}` + +func initTestServer(expireOn string, failAssume bool) *httptest.Server { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == "/latest/meta-data/iam/security-credentials" { + fmt.Fprintln(w, "RoleName") + } else if r.URL.Path == "/latest/meta-data/iam/security-credentials/RoleName" { + if failAssume { + fmt.Fprintf(w, credsFailRespTmpl) + } else { + fmt.Fprintf(w, credsRespTmpl, expireOn) + } + } else { + http.Error(w, "bad request", http.StatusBadRequest) + } + })) + + return server +} + +func TestEC2RoleProvider(t *testing.T) { + server := initTestServer("2014-12-16T01:51:37Z", false) + defer server.Close() + + p := &ec2rolecreds.EC2RoleProvider{ + Client: ec2metadata.New(&ec2metadata.Config{Endpoint: aws.String(server.URL + "/latest")}), + } + + creds, err := p.Retrieve() + assert.Nil(t, err, "Expect no error") + + assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match") + assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match") + assert.Equal(t, "token", creds.SessionToken, "Expect session token to match") +} + +func TestEC2RoleProviderFailAssume(t *testing.T) { + server := initTestServer("2014-12-16T01:51:37Z", true) + defer server.Close() + + p := &ec2rolecreds.EC2RoleProvider{ + Client: ec2metadata.New(&ec2metadata.Config{Endpoint: aws.String(server.URL + "/latest")}), + } + + creds, err := p.Retrieve() + assert.Error(t, err, "Expect error") + + e := err.(awserr.Error) + assert.Equal(t, "ErrorCode", e.Code()) + assert.Equal(t, "ErrorMsg", e.Message()) + assert.Nil(t, e.OrigErr()) + + assert.Equal(t, "", creds.AccessKeyID, "Expect access key ID to match") + assert.Equal(t, "", creds.SecretAccessKey, "Expect secret access key to match") + assert.Equal(t, "", creds.SessionToken, "Expect session token to match") +} + +func TestEC2RoleProviderIsExpired(t *testing.T) { + server := initTestServer("2014-12-16T01:51:37Z", false) + defer server.Close() + + p := &ec2rolecreds.EC2RoleProvider{ + Client: ec2metadata.New(&ec2metadata.Config{Endpoint: aws.String(server.URL + "/latest")}), + } + p.CurrentTime = func() time.Time { + return time.Date(2014, 12, 15, 21, 26, 0, 0, time.UTC) + } + + assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.") + + _, err := p.Retrieve() + assert.Nil(t, err, "Expect no error") + + assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.") + + p.CurrentTime = func() time.Time { + return time.Date(3014, 12, 15, 21, 26, 0, 0, time.UTC) + } + + assert.True(t, p.IsExpired(), "Expect creds to be expired.") +} + +func TestEC2RoleProviderExpiryWindowIsExpired(t *testing.T) { + server := initTestServer("2014-12-16T01:51:37Z", false) + defer server.Close() + + p := &ec2rolecreds.EC2RoleProvider{ + Client: ec2metadata.New(&ec2metadata.Config{Endpoint: aws.String(server.URL + "/latest")}), + ExpiryWindow: time.Hour * 1, + } + p.CurrentTime = func() time.Time { + return time.Date(2014, 12, 15, 0, 51, 37, 0, time.UTC) + } + + assert.True(t, p.IsExpired(), "Expect creds to be expired before retrieve.") + + _, err := p.Retrieve() + assert.Nil(t, err, "Expect no error") + + assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve.") + + p.CurrentTime = func() time.Time { + return time.Date(2014, 12, 16, 0, 55, 37, 0, time.UTC) + } + + assert.True(t, p.IsExpired(), "Expect creds to be expired.") +} + +func BenchmarkEC2RoleProvider(b *testing.B) { + server := initTestServer("2014-12-16T01:51:37Z", false) + defer server.Close() + + p := &ec2rolecreds.EC2RoleProvider{ + Client: ec2metadata.New(&ec2metadata.Config{Endpoint: aws.String(server.URL + "/latest")}), + } + _, err := p.Retrieve() + if err != nil { + b.Fatal(err) + } + + b.ResetTimer() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + _, err := p.Retrieve() + if err != nil { + b.Fatal(err) + } + } + }) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go index e9c575292ed..043e861d6f2 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go @@ -3,24 +3,30 @@ package credentials import ( "os" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" ) var ( // ErrAccessKeyIDNotFound is returned when the AWS Access Key ID can't be // found in the process's environment. - ErrAccessKeyIDNotFound = apierr.New("EnvAccessKeyNotFound", "AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment", nil) + // + // @readonly + ErrAccessKeyIDNotFound = awserr.New("EnvAccessKeyNotFound", "AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment", nil) + // ErrSecretAccessKeyNotFound is returned when the AWS Secret Access Key // can't be found in the process's environment. - ErrSecretAccessKeyNotFound = apierr.New("EnvSecretNotFound", "AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment", nil) + // + // @readonly + ErrSecretAccessKeyNotFound = awserr.New("EnvSecretNotFound", "AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment", nil) ) // A EnvProvider retrieves credentials from the environment variables of the // running process. Environment credentials never expire. // // 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 +// +// * 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/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go index d61b140be46..fac6d78c41e 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go @@ -7,12 +7,14 @@ import ( "github.com/vaughan0/go-ini" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" ) var ( // ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found. - ErrSharedCredentialsHomeNotFound = apierr.New("UserHomeNotFound", "user home directory not found.", nil) + // + // @readonly + ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil) ) // A SharedCredentialsProvider retrieves credentials from the current user's home @@ -20,8 +22,12 @@ var ( // // Profile ini file example: $HOME/.aws/credentials type SharedCredentialsProvider struct { - // Path to the shared credentials file. If empty will default to current user's - // home directory. + // Path to the shared credentials file. + // + // If empty will look for "AWS_SHARED_CREDENTIALS_FILE" env variable. If the + // env value is empty will default to current user's home directory. + // Linux/OSX: "$HOME/.aws/credentials" + // Windows: "%USERPROFILE%\.aws\credentials" Filename string // AWS Profile to extract credentials from the shared credentials file. If empty @@ -72,20 +78,20 @@ func (p *SharedCredentialsProvider) IsExpired() bool { func loadProfile(filename, profile string) (Value, error) { config, err := ini.LoadFile(filename) if err != nil { - return Value{}, apierr.New("SharedCredsLoad", "failed to load shared credentials file", err) + return Value{}, awserr.New("SharedCredsLoad", "failed to load shared credentials file", err) } iniProfile := config.Section(profile) id, ok := iniProfile["aws_access_key_id"] if !ok { - return Value{}, apierr.New("SharedCredsAccessKey", + return Value{}, awserr.New("SharedCredsAccessKey", fmt.Sprintf("shared credentials %s in %s did not contain aws_access_key_id", profile, filename), nil) } secret, ok := iniProfile["aws_secret_access_key"] if !ok { - return Value{}, apierr.New("SharedCredsSecret", + return Value{}, awserr.New("SharedCredsSecret", fmt.Sprintf("shared credentials %s in %s did not contain aws_secret_access_key", profile, filename), nil) } @@ -104,6 +110,10 @@ 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") diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go index 3621d56eddc..1d9983f2ce1 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go @@ -31,6 +31,19 @@ func TestSharedCredentialsProviderIsExpired(t *testing.T) { assert.False(t, p.IsExpired(), "Expect creds to not be expired after retrieve") } +func TestSharedCredentialsProviderWithAWS_SHARED_CREDENTIALS_FILE(t *testing.T) { + os.Clearenv() + os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "example.ini") + p := SharedCredentialsProvider{} + creds, err := p.Retrieve() + + assert.Nil(t, err, "Expect no error") + + assert.Equal(t, "accessKey", creds.AccessKeyID, "Expect access key ID to match") + assert.Equal(t, "secret", creds.SecretAccessKey, "Expect secret access key to match") + assert.Equal(t, "token", creds.SessionToken, "Expect session token to match") +} + func TestSharedCredentialsProviderWithAWS_PROFILE(t *testing.T) { os.Clearenv() os.Setenv("AWS_PROFILE", "no_token") @@ -66,12 +79,10 @@ func BenchmarkSharedCredentialsProvider(b *testing.B) { } b.ResetTimer() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - _, err := p.Retrieve() - if err != nil { - b.Fatal(err) - } + for i := 0; i < b.N; i++ { + _, err := p.Retrieve() + if err != nil { + b.Fatal(err) } - }) + } } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go index 4466cd263cc..530a9ac2f36 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go @@ -1,12 +1,14 @@ package credentials import ( - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" ) var ( // ErrStaticCredentialsEmpty is emitted when static credentials are empty. - ErrStaticCredentialsEmpty = apierr.New("EmptyStaticCreds", "static credentials are empty", nil) + // + // @readonly + ErrStaticCredentialsEmpty = awserr.New("EmptyStaticCreds", "static credentials are empty", nil) ) // A StaticProvider is a set of credentials which are set pragmatically, diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go new file mode 100644 index 00000000000..7a4459f8046 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go @@ -0,0 +1,125 @@ +// Package stscreds are credential Providers to retrieve STS AWS credentials. +// +// STS provides multiple ways to retrieve credentials which can be used when making +// future AWS service API operation calls. +package stscreds + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/service/sts" +) + +// AssumeRoler represents the minimal subset of the STS client API used by this provider. +type AssumeRoler interface { + AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) +} + +// AssumeRoleProvider retrieves temporary credentials from the STS service, and +// keeps track of their expiration time. This provider must be used explicitly, +// as it is not included in the credentials chain. +// +// Example how to configure a service to use this provider: +// +// config := &aws.Config{ +// Credentials: stscreds.NewCredentials(nil, "arn-of-the-role-to-assume", 10*time.Second), +// }) +// // Use config for creating your AWS service. +// +// Example how to obtain customised credentials: +// +// provider := &stscreds.Provider{ +// // Extend the duration to 1 hour. +// Duration: time.Hour, +// // Custom role name. +// RoleSessionName: "custom-session-name", +// } +// creds := credentials.NewCredentials(provider) +// +type AssumeRoleProvider struct { + credentials.Expiry + + // Custom STS client. If not set the default STS client will be used. + Client AssumeRoler + + // Role to be assumed. + RoleARN string + + // Session name, if you wish to reuse the credentials elsewhere. + RoleSessionName string + + // Expiry duration of the STS credentials. Defaults to 15 minutes if not set. + Duration time.Duration + + // Optional ExternalID to pass along, defaults to nil if not set. + ExternalID *string + + // ExpiryWindow will allow the credentials to trigger refreshing prior to + // the credentials actually expiring. This is beneficial so race conditions + // with expiring credentials do not cause request to fail unexpectedly + // due to ExpiredTokenException exceptions. + // + // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true + // 10 seconds before the credentials are actually expired. + // + // If ExpiryWindow is 0 or less it will be ignored. + ExpiryWindow time.Duration +} + +// NewCredentials returns a pointer to a new Credentials object wrapping the +// AssumeRoleProvider. The credentials will expire every 15 minutes and the +// role will be named after a nanosecond timestamp of this operation. +// +// The sts and roleARN parameters are used for building the "AssumeRole" call. +// Pass nil as sts to use the default client. +// +// Window is the expiry window that will be subtracted from the expiry returned +// by the role credential request. This is done so that the credentials will +// expire sooner than their actual lifespan. +func NewCredentials(client AssumeRoler, roleARN string, window time.Duration) *credentials.Credentials { + return credentials.NewCredentials(&AssumeRoleProvider{ + Client: client, + RoleARN: roleARN, + ExpiryWindow: window, + }) +} + +// Retrieve generates a new set of temporary credentials using STS. +func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) { + + // Apply defaults where parameters are not set. + if p.Client == nil { + p.Client = sts.New(nil) + } + if p.RoleSessionName == "" { + // Try to work out a role name that will hopefully end up unique. + p.RoleSessionName = fmt.Sprintf("%d", time.Now().UTC().UnixNano()) + } + if p.Duration == 0 { + // Expire as often as AWS permits. + p.Duration = 15 * time.Minute + } + + roleOutput, err := p.Client.AssumeRole(&sts.AssumeRoleInput{ + DurationSeconds: aws.Int64(int64(p.Duration / time.Second)), + RoleArn: aws.String(p.RoleARN), + RoleSessionName: aws.String(p.RoleSessionName), + ExternalId: p.ExternalID, + }) + + if err != nil { + return credentials.Value{}, err + } + + // We will proactively generate new credentials before they expire. + p.SetExpiration(*roleOutput.Credentials.Expiration, p.ExpiryWindow) + + return credentials.Value{ + AccessKeyID: *roleOutput.Credentials.AccessKeyId, + SecretAccessKey: *roleOutput.Credentials.SecretAccessKey, + SessionToken: *roleOutput.Credentials.SessionToken, + }, nil +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider_test.go new file mode 100644 index 00000000000..f5b97c0053b --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider_test.go @@ -0,0 +1,59 @@ +package stscreds + +import ( + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/sts" + "github.com/stretchr/testify/assert" +) + +type stubSTS struct { +} + +func (s *stubSTS) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) { + expiry := time.Now().Add(60 * time.Minute) + return &sts.AssumeRoleOutput{ + Credentials: &sts.Credentials{ + // Just reflect the role arn to the provider. + AccessKeyId: input.RoleArn, + SecretAccessKey: aws.String("assumedSecretAccessKey"), + SessionToken: aws.String("assumedSessionToken"), + Expiration: &expiry, + }, + }, nil +} + +func TestAssumeRoleProvider(t *testing.T) { + stub := &stubSTS{} + p := &AssumeRoleProvider{ + Client: stub, + RoleARN: "roleARN", + } + + creds, err := p.Retrieve() + assert.Nil(t, err, "Expect no error") + + assert.Equal(t, "roleARN", creds.AccessKeyID, "Expect access key ID to be reflected role ARN") + assert.Equal(t, "assumedSecretAccessKey", creds.SecretAccessKey, "Expect secret access key to match") + assert.Equal(t, "assumedSessionToken", creds.SessionToken, "Expect session token to match") +} + +func BenchmarkAssumeRoleProvider(b *testing.B) { + stub := &stubSTS{} + p := &AssumeRoleProvider{ + Client: stub, + RoleARN: "roleARN", + } + + b.ResetTimer() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + _, err := p.Retrieve() + if err != nil { + b.Fatal(err) + } + } + }) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults.go new file mode 100644 index 00000000000..2f161b57f1d --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -0,0 +1,39 @@ +package defaults + +import ( + "net/http" + "os" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" +) + +// DefaultChainCredentials is a Credentials which will find the first available +// credentials Value from the list of Providers. +// +// This should be used in the default case. Once the type of credentials are +// known switching to the specific Credentials will be more efficient. +var DefaultChainCredentials = credentials.NewChainCredentials( + []credentials.Provider{ + &credentials.EnvProvider{}, + &credentials.SharedCredentialsProvider{Filename: "", Profile: ""}, + &ec2rolecreds.EC2RoleProvider{ExpiryWindow: 5 * time.Minute}, + }) + +// DefaultConfig is the default all service configuration will be based off of. +// By default, all clients use this structure for initialization options unless +// a custom configuration object is passed in. +// +// You may modify this global structure to change all default configuration +// in the SDK. Note that configuration options are copied by value, so any +// modifications must happen before constructing a client. +var DefaultConfig = aws.NewConfig(). + WithCredentials(DefaultChainCredentials). + WithRegion(os.Getenv("AWS_REGION")). + WithHTTPClient(http.DefaultClient). + WithMaxRetries(aws.DefaultRetries). + WithLogger(aws.NewDefaultLogger()). + WithLogLevel(aws.LogOff). + WithSleepDelay(time.Sleep) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go new file mode 100644 index 00000000000..9d784b6e6ab --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go @@ -0,0 +1,43 @@ +package ec2metadata + +import ( + "path" + + "github.com/aws/aws-sdk-go/aws/request" +) + +// GetMetadata uses the path provided to request +func (c *Client) GetMetadata(p string) (string, error) { + op := &request.Operation{ + Name: "GetMetadata", + HTTPMethod: "GET", + HTTPPath: path.Join("/", "meta-data", p), + } + + output := &metadataOutput{} + req := request.New(c.Service.ServiceInfo, c.Service.Handlers, c.Service.Retryer, op, nil, output) + + return output.Content, req.Send() +} + +// Region returns the region the instance is running in. +func (c *Client) Region() (string, error) { + resp, err := c.GetMetadata("placement/availability-zone") + if err != nil { + return "", err + } + + // returns region without the suffix. Eg: us-west-2a becomes us-west-2 + return resp[:len(resp)-1], nil +} + +// Available returns if the application has access to the EC2 Metadata service. +// Can be used to determine if application is running within an EC2 Instance and +// the metadata service is available. +func (c *Client) Available() bool { + if _, err := c.GetMetadata("instance-id"); err != nil { + return false + } + + return true +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go new file mode 100644 index 00000000000..61ab62a5305 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go @@ -0,0 +1,100 @@ +package ec2metadata_test + +import ( + "bytes" + "io/ioutil" + "net/http" + "net/http/httptest" + "path" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/ec2metadata" + "github.com/aws/aws-sdk-go/aws/request" +) + +func initTestServer(path string, resp string) *httptest.Server { + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.RequestURI != path { + http.Error(w, "not found", http.StatusNotFound) + return + } + + w.Write([]byte(resp)) + })) +} + +func TestEndpoint(t *testing.T) { + c := ec2metadata.New(&ec2metadata.Config{}) + op := &request.Operation{ + Name: "GetMetadata", + HTTPMethod: "GET", + HTTPPath: path.Join("/", "meta-data", "testpath"), + } + + req := c.Service.NewRequest(op, nil, nil) + assert.Equal(t, "http://169.254.169.254/latest", req.Service.Endpoint) + assert.Equal(t, "http://169.254.169.254/latest/meta-data/testpath", req.HTTPRequest.URL.String()) +} + +func TestGetMetadata(t *testing.T) { + server := initTestServer( + "/latest/meta-data/some/path", + "success", // real response includes suffix + ) + defer server.Close() + c := ec2metadata.New(&ec2metadata.Config{Endpoint: aws.String(server.URL + "/latest")}) + + resp, err := c.GetMetadata("some/path") + + assert.NoError(t, err) + assert.Equal(t, "success", resp) +} + +func TestGetRegion(t *testing.T) { + server := initTestServer( + "/latest/meta-data/placement/availability-zone", + "us-west-2a", // real response includes suffix + ) + defer server.Close() + c := ec2metadata.New(&ec2metadata.Config{Endpoint: aws.String(server.URL + "/latest")}) + + region, err := c.Region() + + assert.NoError(t, err) + assert.Equal(t, "us-west-2", region) +} + +func TestMetadataAvailable(t *testing.T) { + server := initTestServer( + "/latest/meta-data/instance-id", + "instance-id", + ) + defer server.Close() + c := ec2metadata.New(&ec2metadata.Config{Endpoint: aws.String(server.URL + "/latest")}) + + available := c.Available() + + assert.True(t, available) +} + +func TestMetadataNotAvailable(t *testing.T) { + c := ec2metadata.New(nil) + c.Handlers.Send.Clear() + c.Handlers.Send.PushBack(func(r *request.Request) { + r.HTTPResponse = &http.Response{ + StatusCode: int(0), + Status: http.StatusText(int(0)), + Body: ioutil.NopCloser(bytes.NewReader([]byte{})), + } + r.Error = awserr.New("RequestError", "send request failed", nil) + r.Retryable = aws.Bool(true) // network errors are retryable + }) + + available := c.Available() + + assert.False(t, available) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go new file mode 100644 index 00000000000..d230df6f9fa --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go @@ -0,0 +1,135 @@ +package ec2metadata + +import ( + "io/ioutil" + "net/http" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/service" + "github.com/aws/aws-sdk-go/aws/service/serviceinfo" +) + +// DefaultRetries states the default number of times the service client will +// attempt to retry a failed request before failing. +const DefaultRetries = 3 + +// A Config provides the configuration for the EC2 Metadata service. +type Config struct { + // An optional endpoint URL (hostname only or fully qualified URI) + // that overrides the default service endpoint for a client. Set this + // to nil, or `""` to use the default service endpoint. + Endpoint *string + + // The HTTP client to use when sending requests. Defaults to + // `http.DefaultClient`. + HTTPClient *http.Client + + // An integer value representing the logging level. The default log level + // is zero (LogOff), which represents no logging. To enable logging set + // to a LogLevel Value. + Logger aws.Logger + + // The logger writer interface to write logging messages to. Defaults to + // standard out. + LogLevel *aws.LogLevelType + + // The maximum number of times that a request will be retried for failures. + // Defaults to DefaultRetries for the number of retries to be performed + // per request. + MaxRetries *int +} + +// A Client is an EC2 Metadata service Client. +type Client struct { + *service.Service +} + +// New creates a new instance of the EC2 Metadata service client. +// +// In the general use case the configuration for this service client should not +// be needed and `nil` can be provided. Configuration is only needed if the +// `ec2metadata.Config` defaults need to be overridden. Eg. Setting LogLevel. +// +// @note This configuration will NOT be merged with the default AWS service +// client configuration `defaults.DefaultConfig`. Due to circular dependencies +// with the defaults package and credentials EC2 Role Provider. +func New(config *Config) *Client { + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: copyConfig(config), + ServiceName: "Client", + Endpoint: "http://169.254.169.254/latest", + APIVersion: "latest", + }, + } + service.Initialize() + service.Handlers.Unmarshal.PushBack(unmarshalHandler) + service.Handlers.UnmarshalError.PushBack(unmarshalError) + service.Handlers.Validate.Clear() + service.Handlers.Validate.PushBack(validateEndpointHandler) + + return &Client{service} +} + +func copyConfig(config *Config) *aws.Config { + if config == nil { + config = &Config{} + } + c := &aws.Config{ + Credentials: credentials.AnonymousCredentials, + Endpoint: config.Endpoint, + HTTPClient: config.HTTPClient, + Logger: config.Logger, + LogLevel: config.LogLevel, + MaxRetries: config.MaxRetries, + } + + if c.HTTPClient == nil { + c.HTTPClient = http.DefaultClient + } + if c.Logger == nil { + c.Logger = aws.NewDefaultLogger() + } + if c.LogLevel == nil { + c.LogLevel = aws.LogLevel(aws.LogOff) + } + if c.MaxRetries == nil { + c.MaxRetries = aws.Int(DefaultRetries) + } + + return c +} + +type metadataOutput struct { + Content string +} + +func unmarshalHandler(r *request.Request) { + defer r.HTTPResponse.Body.Close() + b, err := ioutil.ReadAll(r.HTTPResponse.Body) + if err != nil { + r.Error = awserr.New("SerializationError", "unable to unmarshal EC2 metadata respose", err) + } + + data := r.Data.(*metadataOutput) + data.Content = string(b) +} + +func unmarshalError(r *request.Request) { + defer r.HTTPResponse.Body.Close() + _, err := ioutil.ReadAll(r.HTTPResponse.Body) + if err != nil { + r.Error = awserr.New("SerializationError", "unable to unmarshal EC2 metadata error respose", err) + } + + // TODO extract the error... +} + +func validateEndpointHandler(r *request.Request) { + if r.Service.Endpoint == "" { + r.Error = aws.ErrMissingEndpoint + } +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/errors.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/errors.go new file mode 100644 index 00000000000..db2f481b01b --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/errors.go @@ -0,0 +1,17 @@ +package aws + +import "github.com/aws/aws-sdk-go/aws/awserr" + +var ( + // ErrMissingRegion is an error that is returned if region configuration is + // not found. + // + // @readonly + ErrMissingRegion error = awserr.New("MissingRegion", "could not find region configuration", nil) + + // ErrMissingEndpoint is an error that is returned if an endpoint cannot be + // resolved for a service. + // + // @readonly + ErrMissingEndpoint error = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil) +) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handler_functions_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handler_functions_test.go deleted file mode 100644 index 822db9fe207..00000000000 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handler_functions_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package aws - -import ( - "net/http" - "os" - "testing" - - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/internal/apierr" - "github.com/stretchr/testify/assert" -) - -func TestValidateEndpointHandler(t *testing.T) { - os.Clearenv() - svc := NewService(&Config{Region: "us-west-2"}) - svc.Handlers.Clear() - svc.Handlers.Validate.PushBack(ValidateEndpointHandler) - - req := NewRequest(svc, &Operation{Name: "Operation"}, nil, nil) - err := req.Build() - - assert.NoError(t, err) -} - -func TestValidateEndpointHandlerErrorRegion(t *testing.T) { - os.Clearenv() - svc := NewService(nil) - svc.Handlers.Clear() - svc.Handlers.Validate.PushBack(ValidateEndpointHandler) - - req := NewRequest(svc, &Operation{Name: "Operation"}, nil, nil) - err := req.Build() - - assert.Error(t, err) - assert.Equal(t, ErrMissingRegion, err) -} - -type mockCredsProvider struct { - expired bool - retreiveCalled bool -} - -func (m *mockCredsProvider) Retrieve() (credentials.Value, error) { - m.retreiveCalled = true - return credentials.Value{}, nil -} - -func (m *mockCredsProvider) IsExpired() bool { - return m.expired -} - -func TestAfterRetryRefreshCreds(t *testing.T) { - os.Clearenv() - credProvider := &mockCredsProvider{} - svc := NewService(&Config{Credentials: credentials.NewCredentials(credProvider), MaxRetries: 1}) - - svc.Handlers.Clear() - svc.Handlers.ValidateResponse.PushBack(func(r *Request) { - r.Error = apierr.New("UnknownError", "", nil) - r.HTTPResponse = &http.Response{StatusCode: 400} - }) - svc.Handlers.UnmarshalError.PushBack(func(r *Request) { - r.Error = apierr.New("ExpiredTokenException", "", nil) - }) - svc.Handlers.AfterRetry.PushBack(func(r *Request) { - AfterRetryHandler(r) - }) - - assert.True(t, svc.Config.Credentials.IsExpired(), "Expect to start out expired") - assert.False(t, credProvider.retreiveCalled) - - req := NewRequest(svc, &Operation{Name: "Operation"}, nil, nil) - req.Send() - - assert.True(t, svc.Config.Credentials.IsExpired()) - assert.False(t, credProvider.retreiveCalled) - - _, err := svc.Config.Credentials.Get() - assert.NoError(t, err) - assert.True(t, credProvider.retreiveCalled) -} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handlers_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handlers_test.go deleted file mode 100644 index 26776f6da6c..00000000000 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handlers_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package aws - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestHandlerList(t *testing.T) { - s := "" - r := &Request{} - l := HandlerList{} - l.PushBack(func(r *Request) { - s += "a" - r.Data = s - }) - l.Run(r) - assert.Equal(t, "a", s) - assert.Equal(t, "a", r.Data) -} - -func TestMultipleHandlers(t *testing.T) { - r := &Request{} - l := HandlerList{} - l.PushBack(func(r *Request) { r.Data = nil }) - l.PushFront(func(r *Request) { r.Data = Boolean(true) }) - l.Run(r) - if r.Data != nil { - t.Error("Expected handler to execute") - } -} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/logger.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/logger.go new file mode 100644 index 00000000000..f5369487384 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/logger.go @@ -0,0 +1,98 @@ +package aws + +import ( + "log" + "os" +) + +// A LogLevelType defines the level logging should be performed at. Used to instruct +// the SDK which statements should be logged. +type LogLevelType uint + +// LogLevel returns the pointer to a LogLevel. Should be used to workaround +// not being able to take the address of a non-composite literal. +func LogLevel(l LogLevelType) *LogLevelType { + return &l +} + +// Value returns the LogLevel value or the default value LogOff if the LogLevel +// is nil. Safe to use on nil value LogLevelTypes. +func (l *LogLevelType) Value() LogLevelType { + if l != nil { + return *l + } + return LogOff +} + +// 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. +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 +// to LogOff comparison. +func (l *LogLevelType) AtLeast(v LogLevelType) bool { + c := l.Value() + return c >= v +} + +const ( + // LogOff states that no logging should be performed by the SDK. This is the + // default state of the SDK, and should be use to disable all logging. + LogOff LogLevelType = iota * 0x1000 + + // LogDebug state that debug output should be logged by the SDK. This should + // be used to inspect request made and responses received. + LogDebug +) + +// Debug Logging Sub Levels +const ( + // LogDebugWithSigning states that the SDK should log request signing and + // presigning events. This should be used to log the signing details of + // requests for debugging. Will also enable LogDebug. + LogDebugWithSigning LogLevelType = LogDebug | (1 << iota) + + // LogDebugWithHTTPBody states the SDK should log HTTP request and response + // HTTP bodys in addition to the headers and path. This should be used to + // see the body content of requests and responses made while using the SDK + // Will also enable LogDebug. + LogDebugWithHTTPBody + + // LogDebugWithRequestRetries states the SDK should log when service requests will + // be retried. This should be used to log when you want to log when service + // requests are being retried. Will also enable LogDebug. + LogDebugWithRequestRetries + + // LogDebugWithRequestErrors states the SDK should log when service requests fail + // to build, send, validate, or unmarshal. + LogDebugWithRequestErrors +) + +// A Logger is a minimalistic interface for the SDK to log messages to. Should +// be used to provide custom logging writers for the SDK to use. +type Logger interface { + Log(...interface{}) +} + +// NewDefaultLogger returns a Logger which will write log messages to stdout, and +// use same formatting runes as the stdlib log.Logger +func NewDefaultLogger() Logger { + return &defaultLogger{ + logger: log.New(os.Stdout, "", log.LstdFlags), + } +} + +// A defaultLogger provides a minimalistic logger satisfying the Logger interface. +type defaultLogger struct { + logger *log.Logger +} + +// Log logs the parameters to the stdlib logger. See log.Println. +func (l defaultLogger) Log(args ...interface{}) { + l.logger.Println(args...) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/param_validator.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/param_validator.go deleted file mode 100644 index 7c1377281df..00000000000 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/param_validator.go +++ /dev/null @@ -1,89 +0,0 @@ -package aws - -import ( - "fmt" - "reflect" - "strings" - - "github.com/aws/aws-sdk-go/internal/apierr" -) - -// ValidateParameters is a request handler to validate the input parameters. -// Validating parameters only has meaning if done prior to the request being sent. -func ValidateParameters(r *Request) { - if r.ParamsFilled() { - v := validator{errors: []string{}} - v.validateAny(reflect.ValueOf(r.Params), "") - - if count := len(v.errors); count > 0 { - format := "%d validation errors:\n- %s" - msg := fmt.Sprintf(format, count, strings.Join(v.errors, "\n- ")) - r.Error = apierr.New("InvalidParameter", msg, nil) - } - } -} - -// A validator validates values. Collects validations errors which occurs. -type validator struct { - errors []string -} - -// validateAny will validate any struct, slice or map type. All validations -// are also performed recursively for nested types. -func (v *validator) validateAny(value reflect.Value, path string) { - value = reflect.Indirect(value) - if !value.IsValid() { - return - } - - switch value.Kind() { - case reflect.Struct: - v.validateStruct(value, path) - case reflect.Slice: - for i := 0; i < value.Len(); i++ { - v.validateAny(value.Index(i), path+fmt.Sprintf("[%d]", i)) - } - case reflect.Map: - for _, n := range value.MapKeys() { - v.validateAny(value.MapIndex(n), path+fmt.Sprintf("[%q]", n.String())) - } - } -} - -// validateStruct will validate the struct value's fields. If the structure has -// nested types those types will be validated also. -func (v *validator) validateStruct(value reflect.Value, path string) { - prefix := "." - if path == "" { - prefix = "" - } - - for i := 0; i < value.Type().NumField(); i++ { - f := value.Type().Field(i) - if strings.ToLower(f.Name[0:1]) == f.Name[0:1] { - continue - } - fvalue := value.FieldByName(f.Name) - - notset := false - if f.Tag.Get("required") != "" { - switch fvalue.Kind() { - case reflect.Ptr, reflect.Slice, reflect.Map: - if fvalue.IsNil() { - notset = true - } - default: - if !fvalue.IsValid() { - notset = true - } - } - } - - if notset { - msg := "missing required parameter: " + path + prefix + f.Name - v.errors = append(v.errors, msg) - } else { - v.validateAny(fvalue, path+prefix+f.Name) - } - } -} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/param_validator_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/param_validator_test.go deleted file mode 100644 index 66515673070..00000000000 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/param_validator_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package aws_test - -import ( - "testing" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/stretchr/testify/assert" -) - -var service = func() *aws.Service { - s := &aws.Service{ - Config: &aws.Config{}, - ServiceName: "mock-service", - APIVersion: "2015-01-01", - } - return s -}() - -type StructShape struct { - RequiredList []*ConditionalStructShape `required:"true"` - RequiredMap map[string]*ConditionalStructShape `required:"true"` - RequiredBool *bool `required:"true"` - OptionalStruct *ConditionalStructShape - - hiddenParameter *string - - metadataStructureShape -} - -type metadataStructureShape struct { - SDKShapeTraits bool -} - -type ConditionalStructShape struct { - Name *string `required:"true"` - SDKShapeTraits bool -} - -func TestNoErrors(t *testing.T) { - input := &StructShape{ - RequiredList: []*ConditionalStructShape{}, - RequiredMap: map[string]*ConditionalStructShape{ - "key1": &ConditionalStructShape{Name: aws.String("Name")}, - "key2": &ConditionalStructShape{Name: aws.String("Name")}, - }, - RequiredBool: aws.Boolean(true), - OptionalStruct: &ConditionalStructShape{Name: aws.String("Name")}, - } - - req := aws.NewRequest(service, &aws.Operation{}, input, nil) - aws.ValidateParameters(req) - assert.NoError(t, req.Error) -} - -func TestMissingRequiredParameters(t *testing.T) { - input := &StructShape{} - req := aws.NewRequest(service, &aws.Operation{}, input, nil) - aws.ValidateParameters(req) - - assert.Error(t, req.Error) - assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code()) - assert.Equal(t, "3 validation errors:\n- missing required parameter: RequiredList\n- missing required parameter: RequiredMap\n- missing required parameter: RequiredBool", req.Error.(awserr.Error).Message()) -} - -func TestNestedMissingRequiredParameters(t *testing.T) { - input := &StructShape{ - RequiredList: []*ConditionalStructShape{&ConditionalStructShape{}}, - RequiredMap: map[string]*ConditionalStructShape{ - "key1": &ConditionalStructShape{Name: aws.String("Name")}, - "key2": &ConditionalStructShape{}, - }, - RequiredBool: aws.Boolean(true), - OptionalStruct: &ConditionalStructShape{}, - } - - req := aws.NewRequest(service, &aws.Operation{}, input, nil) - aws.ValidateParameters(req) - - assert.Error(t, req.Error) - assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code()) - assert.Equal(t, "3 validation errors:\n- missing required parameter: RequiredList[0].Name\n- missing required parameter: RequiredMap[\"key2\"].Name\n- missing required parameter: OptionalStruct.Name", req.Error.(awserr.Error).Message()) - -} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handlers.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers.go similarity index 57% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handlers.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers.go index 1968cb9f8b1..85bc122e7b3 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/handlers.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers.go @@ -1,4 +1,4 @@ -package aws +package request // A Handlers provides a collection of request handlers for various // stages of handling requests. @@ -15,8 +15,8 @@ type Handlers struct { AfterRetry HandlerList } -// copy returns of this handler's lists. -func (h *Handlers) copy() Handlers { +// Copy returns of this handler's lists. +func (h *Handlers) Copy() Handlers { return Handlers{ Validate: h.Validate.copy(), Build: h.Build.copy(), @@ -47,19 +47,25 @@ func (h *Handlers) Clear() { // A HandlerList manages zero or more handlers in a list. type HandlerList struct { - list []func(*Request) + list []NamedHandler +} + +// A NamedHandler is a struct that contains a name and function callback. +type NamedHandler struct { + Name string + Fn func(*Request) } // copy creates a copy of the handler list. func (l *HandlerList) copy() HandlerList { var n HandlerList - n.list = append([]func(*Request){}, l.list...) + n.list = append([]NamedHandler{}, l.list...) return n } // Clear clears the handler list. func (l *HandlerList) Clear() { - l.list = []func(*Request){} + l.list = []NamedHandler{} } // Len returns the number of handlers in the list. @@ -67,19 +73,40 @@ func (l *HandlerList) Len() int { return len(l.list) } -// PushBack pushes handlers f to the back of the handler list. -func (l *HandlerList) PushBack(f ...func(*Request)) { - l.list = append(l.list, f...) +// 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 handlers f to the front of the handler list. -func (l *HandlerList) PushFront(f ...func(*Request)) { - l.list = append(f, l.list...) +// 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...) +} + +// PushBackNamed pushes named handler f to the back of the handler list. +func (l *HandlerList) PushBackNamed(n NamedHandler) { + l.list = append(l.list, n) +} + +// 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...) +} + +// 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.list = newlist } // Run executes all handlers in the list with a given request object. func (l *HandlerList) Run(r *Request) { for _, f := range l.list { - f(r) + f.Fn(r) } } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers_test.go new file mode 100644 index 00000000000..2ff05a8154e --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/handlers_test.go @@ -0,0 +1,47 @@ +package request_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +func TestHandlerList(t *testing.T) { + s := "" + r := &request.Request{} + l := request.HandlerList{} + l.PushBack(func(r *request.Request) { + s += "a" + r.Data = s + }) + l.Run(r) + assert.Equal(t, "a", s) + assert.Equal(t, "a", r.Data) +} + +func TestMultipleHandlers(t *testing.T) { + r := &request.Request{} + l := request.HandlerList{} + l.PushBack(func(r *request.Request) { r.Data = nil }) + l.PushFront(func(r *request.Request) { r.Data = aws.Bool(true) }) + l.Run(r) + if r.Data != nil { + t.Error("Expected handler to execute") + } +} + +func TestNamedHandlers(t *testing.T) { + l := request.HandlerList{} + named := request.NamedHandler{"Name", func(r *request.Request) {}} + named2 := request.NamedHandler{"NotName", func(r *request.Request) {}} + l.PushBackNamed(named) + l.PushBackNamed(named) + l.PushBackNamed(named2) + l.PushBack(func(r *request.Request) {}) + assert.Equal(t, 4, l.Len()) + l.Remove(named) + assert.Equal(t, 2, l.Len()) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request.go similarity index 79% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request.go index df5885fcb4b..70c28b88316 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request.go @@ -1,7 +1,8 @@ -package aws +package request import ( "bytes" + "fmt" "io" "io/ioutil" "net/http" @@ -10,12 +11,15 @@ import ( "strings" "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/service/serviceinfo" ) // A Request is the service request to be made. type Request struct { - *Service + Retryer + Service serviceinfo.ServiceInfo Handlers Handlers Time time.Time ExpireTime time.Duration @@ -23,17 +27,16 @@ type Request struct { HTTPRequest *http.Request HTTPResponse *http.Response Body io.ReadSeeker - bodyStart int64 // offset from beginning of Body that the request body starts + BodyStart int64 // offset from beginning of Body that the request body starts Params interface{} Error error Data interface{} RequestID string RetryCount uint - Retryable SettableBool + Retryable *bool RetryDelay time.Duration - built bool - signed bool + built bool } // An Operation is the service API operation to be made. @@ -52,13 +55,13 @@ type Paginator struct { TruncationToken string } -// NewRequest returns a new Request pointer for the service API +// New returns a new Request pointer for the service API // operation and parameters. // // Params is any value of input parameters to be the request payload. // Data is pointer value to an object which the request's response // payload will be deserialized to. -func NewRequest(service *Service, operation *Operation, params interface{}, data interface{}) *Request { +func New(service serviceinfo.ServiceInfo, handlers Handlers, retryer Retryer, operation *Operation, params interface{}, data interface{}) *Request { method := operation.HTTPMethod if method == "" { method = "POST" @@ -72,8 +75,9 @@ func NewRequest(service *Service, operation *Operation, params interface{}, data httpReq.URL, _ = url.Parse(service.Endpoint + p) r := &Request{ + Retryer: retryer, Service: service, - Handlers: service.Handlers.copy(), + Handlers: handlers.Copy(), Time: time.Now(), ExpireTime: 0, Operation: operation, @@ -90,7 +94,7 @@ func NewRequest(service *Service, operation *Operation, params interface{}, data // WillRetry returns if the request's can be retried. func (r *Request) WillRetry() bool { - return r.Error != nil && r.Retryable.Get() && r.RetryCount < r.Service.MaxRetries() + return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries() } // ParamsFilled returns if the request's parameters have been populated @@ -135,6 +139,20 @@ func (r *Request) Presign(expireTime time.Duration) (string, error) { return r.HTTPRequest.URL.String(), nil } +func debugLogReqError(r *Request, stage string, retrying bool, err error) { + if !r.Service.Config.LogLevel.Matches(aws.LogDebugWithRequestErrors) { + return + } + + retryStr := "not retrying" + if retrying { + retryStr = "will retry" + } + + r.Service.Config.Logger.Log(fmt.Sprintf("DEBUG: %s %s/%s failed, %s, error %v", + stage, r.Service.ServiceName, r.Operation.Name, retryStr, err)) +} + // Build will build the request's object so it can be signed and sent // to the service. Build will also validate all the request's parameters. // Anny additional build Handlers set on this request will be run @@ -150,6 +168,7 @@ func (r *Request) Build() error { r.Error = nil r.Handlers.Validate.Run(r) if r.Error != nil { + debugLogReqError(r, "Validate Request", false, r.Error) return r.Error } r.Handlers.Build.Run(r) @@ -164,17 +183,13 @@ func (r *Request) Build() error { // Send will build the request prior to signing. All Sign Handlers will // be executed in the order they were set. func (r *Request) Sign() error { - if r.signed { - return r.Error - } - r.Build() if r.Error != nil { + debugLogReqError(r, "Build Request", false, r.Error) return r.Error } r.Handlers.Sign.Run(r) - r.signed = r.Error != nil return r.Error } @@ -189,42 +204,57 @@ func (r *Request) Send() error { return r.Error } - if r.Retryable.Get() { + if aws.BoolValue(r.Retryable) { + if r.Service.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) { + r.Service.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d", + r.Service.ServiceName, r.Operation.Name, r.RetryCount)) + } + // Re-seek the body back to the original point in for a retry so that // send will send the body's contents again in the upcoming request. - r.Body.Seek(r.bodyStart, 0) + r.Body.Seek(r.BodyStart, 0) + r.HTTPRequest.Body = ioutil.NopCloser(r.Body) } - r.Retryable.Reset() + r.Retryable = nil r.Handlers.Send.Run(r) if r.Error != nil { + err := r.Error r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { + debugLogReqError(r, "Send Request", false, r.Error) return r.Error } + debugLogReqError(r, "Send Request", true, err) continue } r.Handlers.UnmarshalMeta.Run(r) r.Handlers.ValidateResponse.Run(r) if r.Error != nil { + err := r.Error r.Handlers.UnmarshalError.Run(r) r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { + debugLogReqError(r, "Validate Response", false, r.Error) return r.Error } + debugLogReqError(r, "Validate Response", true, err) continue } r.Handlers.Unmarshal.Run(r) if r.Error != nil { + err := r.Error r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { + debugLogReqError(r, "Unmarshal Response", false, r.Error) return r.Error } + debugLogReqError(r, "Unmarshal Response", true, err) continue } @@ -285,7 +315,7 @@ func (r *Request) NextPage() *Request { } data := reflect.New(reflect.TypeOf(r.Data).Elem()).Interface() - nr := NewRequest(r.Service, r.Operation, awsutil.CopyOf(r.Params), data) + nr := New(r.Service, r.Handlers, r.Retryer, r.Operation, awsutil.CopyOf(r.Params), data) for i, intok := range nr.Operation.InputTokens { awsutil.SetValueAtAnyPath(nr.Params, intok, tokens[i]) } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request_pagination_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go similarity index 59% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request_pagination_test.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go index eabd9aea7a4..c0f151eeea6 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request_pagination_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go @@ -1,13 +1,15 @@ -package aws_test +package request_test import ( "testing" + "github.com/stretchr/testify/assert" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/internal/test/unit" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/s3" - "github.com/stretchr/testify/assert" ) var _ = unit.Imported @@ -19,16 +21,16 @@ func TestPagination(t *testing.T) { reqNum := 0 resps := []*dynamodb.ListTablesOutput{ - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table5")}}, + {TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")}, + {TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")}, + {TableNames: []*string{aws.String("Table5")}}, } db.Handlers.Send.Clear() // mock sending db.Handlers.Unmarshal.Clear() db.Handlers.UnmarshalMeta.Clear() db.Handlers.ValidateResponse.Clear() - db.Handlers.Build.PushBack(func(r *aws.Request) { + db.Handlers.Build.PushBack(func(r *request.Request) { in := r.Params.(*dynamodb.ListTablesInput) if in == nil { tokens = append(tokens, "") @@ -36,12 +38,12 @@ func TestPagination(t *testing.T) { tokens = append(tokens, *in.ExclusiveStartTableName) } }) - db.Handlers.Unmarshal.PushBack(func(r *aws.Request) { + db.Handlers.Unmarshal.PushBack(func(r *request.Request) { r.Data = resps[reqNum] reqNum++ }) - params := &dynamodb.ListTablesInput{Limit: aws.Long(2)} + params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)} err := db.ListTablesPages(params, func(p *dynamodb.ListTablesOutput, last bool) bool { numPages++ for _, t := range p.TableNames { @@ -71,16 +73,16 @@ func TestPaginationEachPage(t *testing.T) { reqNum := 0 resps := []*dynamodb.ListTablesOutput{ - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table5")}}, + {TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")}, + {TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")}, + {TableNames: []*string{aws.String("Table5")}}, } db.Handlers.Send.Clear() // mock sending db.Handlers.Unmarshal.Clear() db.Handlers.UnmarshalMeta.Clear() db.Handlers.ValidateResponse.Clear() - db.Handlers.Build.PushBack(func(r *aws.Request) { + db.Handlers.Build.PushBack(func(r *request.Request) { in := r.Params.(*dynamodb.ListTablesInput) if in == nil { tokens = append(tokens, "") @@ -88,12 +90,12 @@ func TestPaginationEachPage(t *testing.T) { tokens = append(tokens, *in.ExclusiveStartTableName) } }) - db.Handlers.Unmarshal.PushBack(func(r *aws.Request) { + db.Handlers.Unmarshal.PushBack(func(r *request.Request) { r.Data = resps[reqNum] reqNum++ }) - params := &dynamodb.ListTablesInput{Limit: aws.Long(2)} + params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)} req, _ := db.ListTablesRequest(params) err := req.EachPage(func(p interface{}, last bool) bool { numPages++ @@ -124,21 +126,21 @@ func TestPaginationEarlyExit(t *testing.T) { reqNum := 0 resps := []*dynamodb.ListTablesOutput{ - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("Table5")}}, + {TableNames: []*string{aws.String("Table1"), aws.String("Table2")}, LastEvaluatedTableName: aws.String("Table2")}, + {TableNames: []*string{aws.String("Table3"), aws.String("Table4")}, LastEvaluatedTableName: aws.String("Table4")}, + {TableNames: []*string{aws.String("Table5")}}, } db.Handlers.Send.Clear() // mock sending db.Handlers.Unmarshal.Clear() db.Handlers.UnmarshalMeta.Clear() db.Handlers.ValidateResponse.Clear() - db.Handlers.Unmarshal.PushBack(func(r *aws.Request) { + db.Handlers.Unmarshal.PushBack(func(r *request.Request) { r.Data = resps[reqNum] reqNum++ }) - params := &dynamodb.ListTablesInput{Limit: aws.Long(2)} + params := &dynamodb.ListTablesInput{Limit: aws.Int64(2)} err := db.ListTablesPages(params, func(p *dynamodb.ListTablesOutput, last bool) bool { numPages++ if numPages == 2 { @@ -164,7 +166,7 @@ func TestSkipPagination(t *testing.T) { client.Handlers.Unmarshal.Clear() client.Handlers.UnmarshalMeta.Clear() client.Handlers.ValidateResponse.Clear() - client.Handlers.Unmarshal.PushBack(func(r *aws.Request) { + client.Handlers.Unmarshal.PushBack(func(r *request.Request) { r.Data = &s3.HeadBucketOutput{} }) @@ -189,17 +191,17 @@ func TestPaginationTruncation(t *testing.T) { reqNum := &count resps := []*s3.ListObjectsOutput{ - &s3.ListObjectsOutput{IsTruncated: aws.Boolean(true), Contents: []*s3.Object{&s3.Object{Key: aws.String("Key1")}}}, - &s3.ListObjectsOutput{IsTruncated: aws.Boolean(true), Contents: []*s3.Object{&s3.Object{Key: aws.String("Key2")}}}, - &s3.ListObjectsOutput{IsTruncated: aws.Boolean(false), Contents: []*s3.Object{&s3.Object{Key: aws.String("Key3")}}}, - &s3.ListObjectsOutput{IsTruncated: aws.Boolean(true), Contents: []*s3.Object{&s3.Object{Key: aws.String("Key4")}}}, + {IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key1")}}}, + {IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key2")}}}, + {IsTruncated: aws.Bool(false), Contents: []*s3.Object{{Key: aws.String("Key3")}}}, + {IsTruncated: aws.Bool(true), Contents: []*s3.Object{{Key: aws.String("Key4")}}}, } client.Handlers.Send.Clear() // mock sending client.Handlers.Unmarshal.Clear() client.Handlers.UnmarshalMeta.Clear() client.Handlers.ValidateResponse.Clear() - client.Handlers.Unmarshal.PushBack(func(r *aws.Request) { + client.Handlers.Unmarshal.PushBack(func(r *request.Request) { r.Data = resps[*reqNum] *reqNum++ }) @@ -218,7 +220,7 @@ func TestPaginationTruncation(t *testing.T) { // Try again without truncation token at all count = 0 resps[1].IsTruncated = nil - resps[2].IsTruncated = aws.Boolean(true) + resps[2].IsTruncated = aws.Bool(true) results = []string{} err = client.ListObjectsPages(params, func(p *s3.ListObjectsOutput, last bool) bool { results = append(results, *p.Contents[0].Key) @@ -232,20 +234,20 @@ func TestPaginationTruncation(t *testing.T) { // Benchmarks var benchResps = []*dynamodb.ListTablesOutput{ - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, - &dynamodb.ListTablesOutput{TableNames: []*string{aws.String("TABLE")}}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE"), aws.String("NXT")}, LastEvaluatedTableName: aws.String("NXT")}, + {TableNames: []*string{aws.String("TABLE")}}, } var benchDb = func() *dynamodb.DynamoDB { @@ -260,12 +262,12 @@ var benchDb = func() *dynamodb.DynamoDB { func BenchmarkCodegenIterator(b *testing.B) { reqNum := 0 db := benchDb() - db.Handlers.Unmarshal.PushBack(func(r *aws.Request) { + db.Handlers.Unmarshal.PushBack(func(r *request.Request) { r.Data = benchResps[reqNum] reqNum++ }) - input := &dynamodb.ListTablesInput{Limit: aws.Long(2)} + input := &dynamodb.ListTablesInput{Limit: aws.Int64(2)} iter := func(fn func(*dynamodb.ListTablesOutput, bool) bool) error { page, _ := db.ListTablesRequest(input) for ; page != nil; page = page.NextPage() { @@ -289,12 +291,12 @@ func BenchmarkCodegenIterator(b *testing.B) { func BenchmarkEachPageIterator(b *testing.B) { reqNum := 0 db := benchDb() - db.Handlers.Unmarshal.PushBack(func(r *aws.Request) { + db.Handlers.Unmarshal.PushBack(func(r *request.Request) { r.Data = benchResps[reqNum] reqNum++ }) - input := &dynamodb.ListTablesInput{Limit: aws.Long(2)} + input := &dynamodb.ListTablesInput{Limit: aws.Int64(2)} for i := 0; i < b.N; i++ { reqNum = 0 req, _ := db.ListTablesRequest(input) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_test.go similarity index 58% rename from Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request_test.go rename to Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_test.go index 27507f039d3..6cea0bd2fff 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/request_test.go @@ -1,4 +1,4 @@ -package aws +package request_test import ( "bytes" @@ -7,13 +7,14 @@ import ( "io" "io/ioutil" "net/http" - "reflect" "testing" "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/service" "github.com/stretchr/testify/assert" ) @@ -25,7 +26,7 @@ func body(str string) io.ReadCloser { return ioutil.NopCloser(bytes.NewReader([]byte(str))) } -func unmarshal(req *Request) { +func unmarshal(req *request.Request) { defer req.HTTPResponse.Body.Close() if req.Data != nil { json.NewDecoder(req.HTTPResponse.Body).Decode(req.Data) @@ -33,15 +34,15 @@ func unmarshal(req *Request) { return } -func unmarshalError(req *Request) { +func unmarshalError(req *request.Request) { bodyBytes, err := ioutil.ReadAll(req.HTTPResponse.Body) if err != nil { - req.Error = apierr.New("UnmarshaleError", req.HTTPResponse.Status, err) + req.Error = awserr.New("UnmarshaleError", req.HTTPResponse.Status, err) return } if len(bodyBytes) == 0 { - req.Error = apierr.NewRequestError( - apierr.New("UnmarshaleError", req.HTTPResponse.Status, fmt.Errorf("empty body")), + req.Error = awserr.NewRequestFailure( + awserr.New("UnmarshaleError", req.HTTPResponse.Status, fmt.Errorf("empty body")), req.HTTPResponse.StatusCode, "", ) @@ -49,11 +50,11 @@ func unmarshalError(req *Request) { } var jsonErr jsonErrorResponse if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil { - req.Error = apierr.New("UnmarshaleError", "JSON unmarshal", err) + req.Error = awserr.New("UnmarshaleError", "JSON unmarshal", err) return } - req.Error = apierr.NewRequestError( - apierr.New(jsonErr.Code, jsonErr.Message, nil), + req.Error = awserr.NewRequestFailure( + awserr.New(jsonErr.Code, jsonErr.Message, nil), req.HTTPResponse.StatusCode, "", ) @@ -68,22 +69,22 @@ type jsonErrorResponse struct { func TestRequestRecoverRetry5xx(t *testing.T) { reqNum := 0 reqs := []http.Response{ - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 501, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 200, Body: body(`{"data":"valid"}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 501, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 200, Body: body(`{"data":"valid"}`)}, } - s := NewService(&Config{MaxRetries: 10}) + s := service.New(aws.NewConfig().WithMaxRetries(10)) s.Handlers.Validate.Clear() s.Handlers.Unmarshal.PushBack(unmarshal) s.Handlers.UnmarshalError.PushBack(unmarshalError) s.Handlers.Send.Clear() // mock sending - s.Handlers.Send.PushBack(func(r *Request) { + s.Handlers.Send.PushBack(func(r *request.Request) { r.HTTPResponse = &reqs[reqNum] reqNum++ }) out := &testData{} - r := NewRequest(s, &Operation{Name: "Operation"}, nil, out) + r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out) err := r.Send() assert.Nil(t, err) assert.Equal(t, 2, int(r.RetryCount)) @@ -94,22 +95,22 @@ func TestRequestRecoverRetry5xx(t *testing.T) { func TestRequestRecoverRetry4xxRetryable(t *testing.T) { reqNum := 0 reqs := []http.Response{ - http.Response{StatusCode: 400, Body: body(`{"__type":"Throttling","message":"Rate exceeded."}`)}, - http.Response{StatusCode: 429, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)}, - http.Response{StatusCode: 200, Body: body(`{"data":"valid"}`)}, + {StatusCode: 400, Body: body(`{"__type":"Throttling","message":"Rate exceeded."}`)}, + {StatusCode: 429, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)}, + {StatusCode: 200, Body: body(`{"data":"valid"}`)}, } - s := NewService(&Config{MaxRetries: 10}) + s := service.New(aws.NewConfig().WithMaxRetries(10)) s.Handlers.Validate.Clear() s.Handlers.Unmarshal.PushBack(unmarshal) s.Handlers.UnmarshalError.PushBack(unmarshalError) s.Handlers.Send.Clear() // mock sending - s.Handlers.Send.PushBack(func(r *Request) { + s.Handlers.Send.PushBack(func(r *request.Request) { r.HTTPResponse = &reqs[reqNum] reqNum++ }) out := &testData{} - r := NewRequest(s, &Operation{Name: "Operation"}, nil, out) + r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out) err := r.Send() assert.Nil(t, err) assert.Equal(t, 2, int(r.RetryCount)) @@ -118,16 +119,16 @@ func TestRequestRecoverRetry4xxRetryable(t *testing.T) { // test that retries don't occur for 4xx status codes with a response type that can't be retried func TestRequest4xxUnretryable(t *testing.T) { - s := NewService(&Config{MaxRetries: 10}) + s := service.New(aws.NewConfig().WithMaxRetries(10)) s.Handlers.Validate.Clear() s.Handlers.Unmarshal.PushBack(unmarshal) s.Handlers.UnmarshalError.PushBack(unmarshalError) s.Handlers.Send.Clear() // mock sending - s.Handlers.Send.PushBack(func(r *Request) { + s.Handlers.Send.PushBack(func(r *request.Request) { r.HTTPResponse = &http.Response{StatusCode: 401, Body: body(`{"__type":"SignatureDoesNotMatch","message":"Signature does not match."}`)} }) out := &testData{} - r := NewRequest(s, &Operation{Name: "Operation"}, nil, out) + r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out) err := r.Send() assert.NotNil(t, err) if e, ok := err.(awserr.RequestFailure); ok { @@ -142,28 +143,28 @@ func TestRequest4xxUnretryable(t *testing.T) { func TestRequestExhaustRetries(t *testing.T) { delays := []time.Duration{} - sleepDelay = func(delay time.Duration) { + sleepDelay := func(delay time.Duration) { delays = append(delays, delay) } reqNum := 0 reqs := []http.Response{ - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, - http.Response{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, + {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)}, } - s := NewService(&Config{MaxRetries: -1}) + s := service.New(aws.NewConfig().WithMaxRetries(aws.DefaultRetries).WithSleepDelay(sleepDelay)) s.Handlers.Validate.Clear() s.Handlers.Unmarshal.PushBack(unmarshal) s.Handlers.UnmarshalError.PushBack(unmarshalError) s.Handlers.Send.Clear() // mock sending - s.Handlers.Send.PushBack(func(r *Request) { + s.Handlers.Send.PushBack(func(r *request.Request) { r.HTTPResponse = &reqs[reqNum] reqNum++ }) - r := NewRequest(s, &Operation{Name: "Operation"}, nil, nil) + r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, nil) err := r.Send() assert.NotNil(t, err) if e, ok := err.(awserr.RequestFailure); ok { @@ -174,18 +175,25 @@ func TestRequestExhaustRetries(t *testing.T) { assert.Equal(t, "UnknownError", err.(awserr.Error).Code()) assert.Equal(t, "An error occurred.", err.(awserr.Error).Message()) assert.Equal(t, 3, int(r.RetryCount)) - assert.True(t, reflect.DeepEqual([]time.Duration{30 * time.Millisecond, 60 * time.Millisecond, 120 * time.Millisecond}, delays)) + + expectDelays := []struct{ min, max time.Duration }{{30, 59}, {60, 118}, {120, 236}} + for i, v := range delays { + min := expectDelays[i].min * time.Millisecond + max := expectDelays[i].max * time.Millisecond + assert.True(t, min <= v && v <= max, + "Expect delay to be within range, i:%d, v:%s, min:%s, max:%s", i, v, min, max) + } } // test that the request is retried after the credentials are expired. func TestRequestRecoverExpiredCreds(t *testing.T) { reqNum := 0 reqs := []http.Response{ - http.Response{StatusCode: 400, Body: body(`{"__type":"ExpiredTokenException","message":"expired token"}`)}, - http.Response{StatusCode: 200, Body: body(`{"data":"valid"}`)}, + {StatusCode: 400, Body: body(`{"__type":"ExpiredTokenException","message":"expired token"}`)}, + {StatusCode: 200, Body: body(`{"data":"valid"}`)}, } - s := NewService(&Config{MaxRetries: 10, Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "")}) + s := service.New(&aws.Config{MaxRetries: aws.Int(10), Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "")}) s.Handlers.Validate.Clear() s.Handlers.Unmarshal.PushBack(unmarshal) s.Handlers.UnmarshalError.PushBack(unmarshalError) @@ -193,21 +201,21 @@ func TestRequestRecoverExpiredCreds(t *testing.T) { credExpiredBeforeRetry := false credExpiredAfterRetry := false - s.Handlers.AfterRetry.PushBack(func(r *Request) { - credExpiredAfterRetry = r.Config.Credentials.IsExpired() + s.Handlers.AfterRetry.PushBack(func(r *request.Request) { + credExpiredAfterRetry = r.Service.Config.Credentials.IsExpired() }) s.Handlers.Sign.Clear() - s.Handlers.Sign.PushBack(func(r *Request) { - r.Config.Credentials.Get() + s.Handlers.Sign.PushBack(func(r *request.Request) { + r.Service.Config.Credentials.Get() }) s.Handlers.Send.Clear() // mock sending - s.Handlers.Send.PushBack(func(r *Request) { + s.Handlers.Send.PushBack(func(r *request.Request) { r.HTTPResponse = &reqs[reqNum] reqNum++ }) out := &testData{} - r := NewRequest(s, &Operation{Name: "Operation"}, nil, out) + r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out) err := r.Send() assert.Nil(t, err) 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 new file mode 100644 index 00000000000..f03b0c65960 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/request/retryer.go @@ -0,0 +1,71 @@ +package request + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws/awserr" +) + +// Retryer is an interface to control retry logic for a given service. +// The default implementation used by most services is the service.DefaultRetryer +// structure, which contains basic retry logic using exponential backoff. +type Retryer interface { + RetryRules(*Request) time.Duration + ShouldRetry(*Request) bool + MaxRetries() uint +} + +// retryableCodes is a collection of service response codes which are retry-able +// without any further action. +var retryableCodes = map[string]struct{}{ + "RequestError": {}, + "ProvisionedThroughputExceededException": {}, + "Throttling": {}, + "ThrottlingException": {}, + "RequestLimitExceeded": {}, + "RequestThrottled": {}, +} + +// credsExpiredCodes is a collection of error codes which signify the credentials +// need to be refreshed. Expired tokens require refreshing of credentials, and +// resigning before the request can be retried. +var credsExpiredCodes = map[string]struct{}{ + "ExpiredToken": {}, + "ExpiredTokenException": {}, + "RequestExpired": {}, // EC2 Only +} + +func isCodeRetryable(code string) bool { + if _, ok := retryableCodes[code]; ok { + return true + } + + return isCodeExpiredCreds(code) +} + +func isCodeExpiredCreds(code string) bool { + _, ok := credsExpiredCodes[code] + return ok +} + +// 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()) + } + } + 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()) + } + } + return false +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service.go deleted file mode 100644 index 7e8e229ba4f..00000000000 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service.go +++ /dev/null @@ -1,177 +0,0 @@ -package aws - -import ( - "fmt" - "math" - "net/http" - "net/http/httputil" - "regexp" - "time" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/internal/endpoints" -) - -// A Service implements the base service request and response handling -// used by all services. -type Service struct { - Config *Config - Handlers Handlers - ManualSend bool - ServiceName string - APIVersion string - Endpoint string - SigningName string - SigningRegion string - JSONVersion string - TargetPrefix string - RetryRules func(*Request) time.Duration - ShouldRetry func(*Request) bool - DefaultMaxRetries uint -} - -var schemeRE = regexp.MustCompile("^([^:]+)://") - -// NewService will return a pointer to a new Server object initialized. -func NewService(config *Config) *Service { - svc := &Service{Config: config} - svc.Initialize() - return svc -} - -// Initialize initializes the service. -func (s *Service) Initialize() { - if s.Config == nil { - s.Config = &Config{} - } - if s.Config.HTTPClient == nil { - s.Config.HTTPClient = http.DefaultClient - } - - if s.RetryRules == nil { - s.RetryRules = retryRules - } - - if s.ShouldRetry == nil { - s.ShouldRetry = shouldRetry - } - - s.DefaultMaxRetries = 3 - s.Handlers.Validate.PushBack(ValidateEndpointHandler) - s.Handlers.Build.PushBack(UserAgentHandler) - s.Handlers.Sign.PushBack(BuildContentLength) - s.Handlers.Send.PushBack(SendHandler) - s.Handlers.AfterRetry.PushBack(AfterRetryHandler) - s.Handlers.ValidateResponse.PushBack(ValidateResponseHandler) - s.AddDebugHandlers() - s.buildEndpoint() - - if !s.Config.DisableParamValidation { - s.Handlers.Validate.PushBack(ValidateParameters) - } -} - -// buildEndpoint builds the endpoint values the service will use to make requests with. -func (s *Service) buildEndpoint() { - if s.Config.Endpoint != "" { - s.Endpoint = s.Config.Endpoint - } else { - s.Endpoint, s.SigningRegion = - endpoints.EndpointForRegion(s.ServiceName, s.Config.Region) - } - - if s.Endpoint != "" && !schemeRE.MatchString(s.Endpoint) { - scheme := "https" - if s.Config.DisableSSL { - scheme = "http" - } - s.Endpoint = scheme + "://" + s.Endpoint - } -} - -// AddDebugHandlers injects debug logging handlers into the service to log request -// debug information. -func (s *Service) AddDebugHandlers() { - out := s.Config.Logger - if s.Config.LogLevel == 0 { - return - } - - s.Handlers.Send.PushFront(func(r *Request) { - logBody := r.Config.LogHTTPBody - dumpedBody, _ := httputil.DumpRequestOut(r.HTTPRequest, logBody) - - fmt.Fprintf(out, "---[ REQUEST POST-SIGN ]-----------------------------\n") - fmt.Fprintf(out, "%s\n", string(dumpedBody)) - fmt.Fprintf(out, "-----------------------------------------------------\n") - }) - s.Handlers.Send.PushBack(func(r *Request) { - fmt.Fprintf(out, "---[ RESPONSE ]--------------------------------------\n") - if r.HTTPResponse != nil { - logBody := r.Config.LogHTTPBody - dumpedBody, _ := httputil.DumpResponse(r.HTTPResponse, logBody) - fmt.Fprintf(out, "%s\n", string(dumpedBody)) - } else if r.Error != nil { - fmt.Fprintf(out, "%s\n", r.Error) - } - fmt.Fprintf(out, "-----------------------------------------------------\n") - }) -} - -// MaxRetries returns the number of maximum returns the service will use to make -// an individual API request. -func (s *Service) MaxRetries() uint { - if s.Config.MaxRetries < 0 { - return s.DefaultMaxRetries - } - return uint(s.Config.MaxRetries) -} - -// retryRules returns the delay duration before retrying this request again -func retryRules(r *Request) time.Duration { - delay := time.Duration(math.Pow(2, float64(r.RetryCount))) * 30 - return delay * time.Millisecond -} - -// retryableCodes is a collection of service response codes which are retry-able -// without any further action. -var retryableCodes = map[string]struct{}{ - "RequestError": struct{}{}, - "ProvisionedThroughputExceededException": struct{}{}, - "Throttling": struct{}{}, -} - -// credsExpiredCodes is a collection of error codes which signify the credentials -// need to be refreshed. Expired tokens require refreshing of credentials, and -// resigning before the request can be retried. -var credsExpiredCodes = map[string]struct{}{ - "ExpiredToken": struct{}{}, - "ExpiredTokenException": struct{}{}, - "RequestExpired": struct{}{}, // EC2 Only -} - -func isCodeRetryable(code string) bool { - if _, ok := retryableCodes[code]; ok { - return true - } - - return isCodeExpiredCreds(code) -} - -func isCodeExpiredCreds(code string) bool { - _, ok := credsExpiredCodes[code] - return ok -} - -// shouldRetry returns if the request should be retried. -func shouldRetry(r *Request) bool { - if r.HTTPResponse.StatusCode >= 500 { - return true - } - if r.Error != nil { - if err, ok := r.Error.(awserr.Error); ok { - return isCodeRetryable(err.Code()) - } - } - return false -} 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 new file mode 100644 index 00000000000..e642d16b716 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/default_retryer.go @@ -0,0 +1,51 @@ +package service + +import ( + "math" + "math/rand" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// DefaultRetryer implements basic retry logic using exponential backoff for +// most services. If you want to implement custom retry logic, implement the +// request.Retryer interface or create a structure type that composes this +// struct and override the specific methods. For example, to override only +// the MaxRetries method: +// +// type retryer struct { +// service.DefaultRetryer +// } +// +// // This implementation always has 100 max retries +// func (d retryer) MaxRetries() uint { return 100 } +type DefaultRetryer struct { + *Service +} + +// MaxRetries returns the number of maximum returns the service will use to make +// an individual API request. +func (d DefaultRetryer) MaxRetries() uint { + if aws.IntValue(d.Service.Config.MaxRetries) < 0 { + return d.DefaultMaxRetries + } + 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) + return time.Duration(delay) * time.Millisecond +} + +// ShouldRetry returns if the request should be retried. +func (d DefaultRetryer) ShouldRetry(r *request.Request) bool { + if r.HTTPResponse.StatusCode >= 500 { + return true + } + return r.IsErrorRetryable() +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/service.go new file mode 100644 index 00000000000..7205212e19b --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/service.go @@ -0,0 +1,133 @@ +package service + +import ( + "fmt" + "io/ioutil" + "net/http" + "net/http/httputil" + "regexp" + "time" + + "github.com/aws/aws-sdk-go/aws" + "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" +) + +// A Service implements the base service request and response handling +// used by all services. +type Service struct { + serviceinfo.ServiceInfo + request.Retryer + DefaultMaxRetries uint + Handlers request.Handlers +} + +var schemeRE = regexp.MustCompile("^([^:]+)://") + +// New will return a pointer to a new Server object initialized. +func New(config *aws.Config) *Service { + svc := &Service{ServiceInfo: serviceinfo.ServiceInfo{Config: config}} + svc.Initialize() + return svc +} + +// Initialize initializes the service. +func (s *Service) Initialize() { + if s.Config == nil { + s.Config = &aws.Config{} + } + if s.Config.HTTPClient == nil { + s.Config.HTTPClient = http.DefaultClient + } + if s.Config.SleepDelay == nil { + s.Config.SleepDelay = time.Sleep + } + + s.Retryer = DefaultRetryer{s} + s.DefaultMaxRetries = 3 + s.Handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler) + s.Handlers.Build.PushBackNamed(corehandlers.UserAgentHandler) + s.Handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler) + s.Handlers.Send.PushBackNamed(corehandlers.SendHandler) + s.Handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler) + s.Handlers.ValidateResponse.PushBackNamed(corehandlers.ValidateResponseHandler) + if !aws.BoolValue(s.Config.DisableParamValidation) { + s.Handlers.Validate.PushBackNamed(corehandlers.ValidateParametersHandler) + } + s.AddDebugHandlers() + s.buildEndpoint() +} + +// NewRequest returns a new Request pointer for the service API +// operation and parameters. +func (s *Service) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request { + return request.New(s.ServiceInfo, s.Handlers, s.Retryer, operation, params, data) +} + +// buildEndpoint builds the endpoint values the service will use to make requests with. +func (s *Service) buildEndpoint() { + if aws.StringValue(s.Config.Endpoint) != "" { + s.Endpoint = *s.Config.Endpoint + } else if s.Endpoint == "" { + s.Endpoint, s.SigningRegion = + endpoints.EndpointForRegion(s.ServiceName, aws.StringValue(s.Config.Region)) + } + + if s.Endpoint != "" && !schemeRE.MatchString(s.Endpoint) { + scheme := "https" + if aws.BoolValue(s.Config.DisableSSL) { + scheme = "http" + } + s.Endpoint = scheme + "://" + s.Endpoint + } +} + +// AddDebugHandlers injects debug logging handlers into the service to log request +// debug information. +func (s *Service) AddDebugHandlers() { + if !s.Config.LogLevel.AtLeast(aws.LogDebug) { + return + } + + s.Handlers.Send.PushFront(logRequest) + s.Handlers.Send.PushBack(logResponse) +} + +const logReqMsg = `DEBUG: Request %s/%s Details: +---[ REQUEST POST-SIGN ]----------------------------- +%s +-----------------------------------------------------` + +func logRequest(r *request.Request) { + logBody := r.Service.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) + dumpedBody, _ := httputil.DumpRequestOut(r.HTTPRequest, logBody) + + 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.Body.Seek(r.BodyStart, 0) + r.HTTPRequest.Body = ioutil.NopCloser(r.Body) + } + + r.Service.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.Service.ServiceName, r.Operation.Name, string(dumpedBody))) +} + +const logRespMsg = `DEBUG: Response %s/%s Details: +---[ RESPONSE ]-------------------------------------- +%s +-----------------------------------------------------` + +func logResponse(r *request.Request) { + var msg = "no reponse data" + if r.HTTPResponse != nil { + logBody := r.Service.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) + dumpedBody, _ := httputil.DumpResponse(r.HTTPResponse, logBody) + msg = string(dumpedBody) + } else if r.Error != nil { + msg = r.Error.Error() + } + r.Service.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.Service.ServiceName, r.Operation.Name, msg)) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/serviceinfo/service_info.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/serviceinfo/service_info.go new file mode 100644 index 00000000000..a920e96a967 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/service/serviceinfo/service_info.go @@ -0,0 +1,15 @@ +package serviceinfo + +import "github.com/aws/aws-sdk-go/aws" + +// ServiceInfo wraps immutable data from the service.Service structure. +type ServiceInfo struct { + Config *aws.Config + ServiceName string + APIVersion string + Endpoint string + SigningName string + SigningRegion string + JSONVersion string + TargetPrefix string +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types.go index 7801cb689a5..846b732dda1 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types.go @@ -1,36 +1,10 @@ package aws import ( - "fmt" "io" - "time" + "sync" ) -// String converts a Go string into a string pointer. -func String(v string) *string { - return &v -} - -// Boolean converts a Go bool into a boolean pointer. -func Boolean(v bool) *bool { - return &v -} - -// Long converts a Go int64 into a long pointer. -func Long(v int64) *int64 { - return &v -} - -// Double converts a Go float64 into a double pointer. -func Double(v float64) *float64 { - return &v -} - -// Time converts a Go Time into a Time pointer -func Time(t time.Time) *time.Time { - return &t -} - // ReadSeekCloser wraps a io.Reader returning a ReaderSeakerCloser func ReadSeekCloser(r io.Reader) ReaderSeekerCloser { return ReaderSeekerCloser{r} @@ -81,51 +55,34 @@ func (r ReaderSeekerCloser) Close() error { return nil } -// A SettableBool provides a boolean value which includes the state if -// the value was set or unset. The set state is in addition to the value's -// value(true|false) -type SettableBool struct { - value bool - set bool +// A WriteAtBuffer provides a in memory buffer supporting the io.WriterAt interface +// Can be used with the s3manager.Downloader to download content to a buffer +// in memory. Safe to use concurrently. +type WriteAtBuffer struct { + buf []byte + m sync.Mutex } -// SetBool returns a SettableBool with a value set -func SetBool(value bool) SettableBool { - return SettableBool{value: value, set: true} -} +// WriteAt writes a slice of bytes to a buffer starting at the position provided +// The number of bytes written will be returned, or error. Can overwrite previous +// written slices if the write ats overlap. +func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error) { + b.m.Lock() + defer b.m.Unlock() -// Get returns the value. Will always be false if the SettableBool was not set. -func (b *SettableBool) Get() bool { - if !b.set { - return false + expLen := pos + int64(len(p)) + if int64(len(b.buf)) < expLen { + newBuf := make([]byte, expLen) + copy(newBuf, b.buf) + b.buf = newBuf } - return b.value + copy(b.buf[pos:], p) + return len(p), nil } -// Set sets the value and updates the state that the value has been set. -func (b *SettableBool) Set(value bool) { - b.value = value - b.set = true -} - -// IsSet returns if the value has been set -func (b *SettableBool) IsSet() bool { - return b.set -} - -// Reset resets the state and value of the SettableBool to its initial default -// state of not set and zero value. -func (b *SettableBool) Reset() { - b.value = false - b.set = false -} - -// String returns the string representation of the value if set. Zero if not set. -func (b *SettableBool) String() string { - return fmt.Sprintf("%t", b.Get()) -} - -// GoString returns the string representation of the SettableBool value and state -func (b *SettableBool) GoString() string { - return fmt.Sprintf("Bool{value:%t, set:%t}", b.value, b.set) +// Bytes returns a slice of bytes written to the buffer. +func (b *WriteAtBuffer) Bytes() []byte { + b.m.Lock() + defer b.m.Unlock() + return b.buf[:len(b.buf):len(b.buf)] } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types_test.go new file mode 100644 index 00000000000..a4ed20e7d22 --- /dev/null +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/types_test.go @@ -0,0 +1,56 @@ +package aws + +import ( + "math/rand" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestWriteAtBuffer(t *testing.T) { + b := &WriteAtBuffer{} + + n, err := b.WriteAt([]byte{1}, 0) + assert.NoError(t, err) + assert.Equal(t, 1, n) + + n, err = b.WriteAt([]byte{1, 1, 1}, 5) + assert.NoError(t, err) + assert.Equal(t, 3, n) + + n, err = b.WriteAt([]byte{2}, 1) + assert.NoError(t, err) + assert.Equal(t, 1, n) + + n, err = b.WriteAt([]byte{3}, 2) + assert.NoError(t, err) + assert.Equal(t, 1, n) + + assert.Equal(t, []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes()) +} + +func BenchmarkWriteAtBuffer(b *testing.B) { + buf := &WriteAtBuffer{} + r := rand.New(rand.NewSource(1)) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + to := r.Intn(10) * 4096 + bs := make([]byte, to) + buf.WriteAt(bs, r.Int63n(10)*4096) + } +} + +func BenchmarkWriteAtBufferParallel(b *testing.B) { + buf := &WriteAtBuffer{} + r := rand.New(rand.NewSource(1)) + + b.ResetTimer() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + to := r.Intn(10) * 4096 + bs := make([]byte, to) + buf.WriteAt(bs, r.Int63n(10)*4096) + } + }) +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/version.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/version.go index 7c156dbe2a2..f89f1e112fa 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.6.0" +const SDKVersion = "0.9.9" diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go index 32e87c8a4a4..d040cccd57d 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints.go @@ -2,6 +2,7 @@ package endpoints //go:generate go run ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go +//go:generate gofmt -s -w endpoints_map.go import "strings" diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_map.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/endpoints/endpoints_map.go index 637fcbe43aa..894c1a64341 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/internal/endpoints/endpoints_map.go @@ -15,74 +15,74 @@ type endpointEntry struct { var endpointsMap = endpointStruct{ Version: 2, Endpoints: map[string]endpointEntry{ - "*/*": endpointEntry{ + "*/*": { Endpoint: "{service}.{region}.amazonaws.com", }, - "*/cloudfront": endpointEntry{ + "*/cloudfront": { Endpoint: "cloudfront.amazonaws.com", SigningRegion: "us-east-1", }, - "*/cloudsearchdomain": endpointEntry{ + "*/cloudsearchdomain": { Endpoint: "", SigningRegion: "us-east-1", }, - "*/iam": endpointEntry{ + "*/iam": { Endpoint: "iam.amazonaws.com", SigningRegion: "us-east-1", }, - "*/importexport": endpointEntry{ + "*/importexport": { Endpoint: "importexport.amazonaws.com", SigningRegion: "us-east-1", }, - "*/route53": endpointEntry{ + "*/route53": { Endpoint: "route53.amazonaws.com", SigningRegion: "us-east-1", }, - "*/sts": endpointEntry{ + "*/sts": { Endpoint: "sts.amazonaws.com", SigningRegion: "us-east-1", }, - "ap-northeast-1/s3": endpointEntry{ + "ap-northeast-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "ap-southeast-1/s3": endpointEntry{ + "ap-southeast-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "ap-southeast-2/s3": endpointEntry{ + "ap-southeast-2/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "cn-north-1/*": endpointEntry{ + "cn-north-1/*": { Endpoint: "{service}.{region}.amazonaws.com.cn", }, - "eu-central-1/s3": endpointEntry{ + "eu-central-1/s3": { Endpoint: "{service}.{region}.amazonaws.com", }, - "eu-west-1/s3": endpointEntry{ + "eu-west-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "sa-east-1/s3": endpointEntry{ + "sa-east-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "us-east-1/s3": endpointEntry{ + "us-east-1/s3": { Endpoint: "s3.amazonaws.com", }, - "us-east-1/sdb": endpointEntry{ + "us-east-1/sdb": { Endpoint: "sdb.amazonaws.com", SigningRegion: "us-east-1", }, - "us-gov-west-1/iam": endpointEntry{ + "us-gov-west-1/iam": { Endpoint: "iam.us-gov.amazonaws.com", }, - "us-gov-west-1/s3": endpointEntry{ + "us-gov-west-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "us-gov-west-1/sts": endpointEntry{ + "us-gov-west-1/sts": { Endpoint: "sts.us-gov-west-1.amazonaws.com", }, - "us-west-1/s3": endpointEntry{ + "us-west-1/s3": { Endpoint: "s3-{region}.amazonaws.com", }, - "us-west-2/s3": endpointEntry{ + "us-west-2/s3": { Endpoint: "s3-{region}.amazonaws.com", }, }, diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go index bdf2bc4f825..fabe9b3c304 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/internal/protocol/ec2query/build.go @@ -6,19 +6,19 @@ package ec2query import ( "net/url" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/apierr" + "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" ) // Build builds a request for the EC2 protocol. -func Build(r *aws.Request) { +func Build(r *request.Request) { body := url.Values{ "Action": {r.Operation.Name}, "Version": {r.Service.APIVersion}, } if err := queryutil.Parse(body, r.Params, true); err != nil { - r.Error = apierr.New("Marshal", "failed encoding EC2 Query request", err) + r.Error = awserr.New("SerializationError", "failed encoding EC2 Query request", err) } if r.ExpireTime == 0 { diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go index f267f021587..8b2e59a8ae0 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go @@ -1,10 +1,6 @@ package ec2query_test import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/protocol/ec2query" - "github.com/aws/aws-sdk-go/internal/signer/v4" - "bytes" "encoding/json" "encoding/xml" @@ -15,7 +11,14 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/defaults" + "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/protocol/xml/xmlutil" + "github.com/aws/aws-sdk-go/internal/signer/v4" "github.com/aws/aws-sdk-go/internal/util" "github.com/stretchr/testify/assert" ) @@ -31,17 +34,18 @@ var _ = util.Trim("") var _ = url.Values{} var _ = io.EOF -// InputService1ProtocolTest is a client for InputService1ProtocolTest. type InputService1ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService1ProtocolTest client. func NewInputService1ProtocolTest(config *aws.Config) *InputService1ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice1protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice1protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -57,38 +61,47 @@ func NewInputService1ProtocolTest(config *aws.Config) *InputService1ProtocolTest // newRequest creates a new request for a InputService1ProtocolTest operation and runs any // custom request initialization. -func (c *InputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputShape) (req *aws.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) { +const opInputService1TestCaseOperation1 = "OperationName" - if opInputService1TestCaseOperation1 == nil { - opInputService1TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation. +func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation1Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService1TestCaseOperation1, } if input == nil { - input = &InputService1TestShapeInputShape{} + input = &InputService1TestShapeInputService1TestCaseOperation1Input{} } - req = c.newRequest(opInputService1TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService1TestShapeInputService1TestCaseOperation1Output{} req.Data = output return } -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputShape) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { +func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation1Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { req, out := c.InputService1TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService1TestCaseOperation1 *aws.Operation +type InputService1TestShapeInputService1TestCaseOperation1Input struct { + Bar *string `type:"string"` + + Foo *string `type:"string"` + + metadataInputService1TestShapeInputService1TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService1TestShapeInputService1TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService1TestShapeInputService1TestCaseOperation1Output struct { metadataInputService1TestShapeInputService1TestCaseOperation1Output `json:"-" xml:"-"` @@ -98,29 +111,18 @@ type metadataInputService1TestShapeInputService1TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService1TestShapeInputShape struct { - Bar *string `type:"string"` - - Foo *string `type:"string"` - - metadataInputService1TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService1TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService2ProtocolTest is a client for InputService2ProtocolTest. type InputService2ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService2ProtocolTest client. func NewInputService2ProtocolTest(config *aws.Config) *InputService2ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice2protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice2protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -136,38 +138,49 @@ func NewInputService2ProtocolTest(config *aws.Config) *InputService2ProtocolTest // newRequest creates a new request for a InputService2ProtocolTest operation and runs any // custom request initialization. -func (c *InputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation. -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputShape) (req *aws.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) { +const opInputService2TestCaseOperation1 = "OperationName" - if opInputService2TestCaseOperation1 == nil { - opInputService2TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation. +func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService2TestCaseOperation1, } if input == nil { - input = &InputService2TestShapeInputShape{} + input = &InputService2TestShapeInputService2TestCaseOperation1Input{} } - req = c.newRequest(opInputService2TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService2TestShapeInputService2TestCaseOperation1Output{} req.Data = output return } -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputShape) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { +func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { req, out := c.InputService2TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService2TestCaseOperation1 *aws.Operation +type InputService2TestShapeInputService2TestCaseOperation1Input struct { + Bar *string `locationName:"barLocationName" type:"string"` + + Foo *string `type:"string"` + + Yuck *string `locationName:"yuckLocationName" queryName:"yuckQueryName" type:"string"` + + metadataInputService2TestShapeInputService2TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService2TestShapeInputService2TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService2TestShapeInputService2TestCaseOperation1Output struct { metadataInputService2TestShapeInputService2TestCaseOperation1Output `json:"-" xml:"-"` @@ -177,31 +190,18 @@ type metadataInputService2TestShapeInputService2TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService2TestShapeInputShape struct { - Bar *string `locationName:"barLocationName" type:"string"` - - Foo *string `type:"string"` - - Yuck *string `locationName:"yuckLocationName" queryName:"yuckQueryName" type:"string"` - - metadataInputService2TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService2TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService3ProtocolTest is a client for InputService3ProtocolTest. type InputService3ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService3ProtocolTest client. func NewInputService3ProtocolTest(config *aws.Config) *InputService3ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice3protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice3protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -217,38 +217,45 @@ func NewInputService3ProtocolTest(config *aws.Config) *InputService3ProtocolTest // newRequest creates a new request for a InputService3ProtocolTest operation and runs any // custom request initialization. -func (c *InputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputShape) (req *aws.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) { +const opInputService3TestCaseOperation1 = "OperationName" - if opInputService3TestCaseOperation1 == nil { - opInputService3TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation. +func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation1Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService3TestCaseOperation1, } if input == nil { - input = &InputService3TestShapeInputShape{} + input = &InputService3TestShapeInputService3TestCaseOperation1Input{} } - req = c.newRequest(opInputService3TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService3TestShapeInputService3TestCaseOperation1Output{} req.Data = output return } -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { +func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation1Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { req, out := c.InputService3TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService3TestCaseOperation1 *aws.Operation +type InputService3TestShapeInputService3TestCaseOperation1Input struct { + StructArg *InputService3TestShapeStructType `locationName:"Struct" type:"structure"` + + metadataInputService3TestShapeInputService3TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService3TestShapeInputService3TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService3TestShapeInputService3TestCaseOperation1Output struct { metadataInputService3TestShapeInputService3TestCaseOperation1Output `json:"-" xml:"-"` @@ -258,16 +265,6 @@ type metadataInputService3TestShapeInputService3TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService3TestShapeInputShape struct { - StructArg *InputService3TestShapeStructType `locationName:"Struct" type:"structure"` - - metadataInputService3TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService3TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - type InputService3TestShapeStructType struct { ScalarArg *string `locationName:"Scalar" type:"string"` @@ -278,17 +275,18 @@ type metadataInputService3TestShapeStructType struct { SDKShapeTraits bool `type:"structure"` } -// InputService4ProtocolTest is a client for InputService4ProtocolTest. type InputService4ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService4ProtocolTest client. func NewInputService4ProtocolTest(config *aws.Config) *InputService4ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice4protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice4protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -304,38 +302,45 @@ func NewInputService4ProtocolTest(config *aws.Config) *InputService4ProtocolTest // newRequest creates a new request for a InputService4ProtocolTest operation and runs any // custom request initialization. -func (c *InputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputShape) (req *aws.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) { +const opInputService4TestCaseOperation1 = "OperationName" - if opInputService4TestCaseOperation1 == nil { - opInputService4TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation. +func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService4TestCaseOperation1, } if input == nil { - input = &InputService4TestShapeInputShape{} + input = &InputService4TestShapeInputService4TestCaseOperation1Input{} } - req = c.newRequest(opInputService4TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService4TestShapeInputService4TestCaseOperation1Output{} req.Data = output return } -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { +func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { req, out := c.InputService4TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService4TestCaseOperation1 *aws.Operation +type InputService4TestShapeInputService4TestCaseOperation1Input struct { + ListArg []*string `type:"list"` + + metadataInputService4TestShapeInputService4TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService4TestShapeInputService4TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService4TestShapeInputService4TestCaseOperation1Output struct { metadataInputService4TestShapeInputService4TestCaseOperation1Output `json:"-" xml:"-"` @@ -345,27 +350,18 @@ type metadataInputService4TestShapeInputService4TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService4TestShapeInputShape struct { - ListArg []*string `type:"list"` - - metadataInputService4TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService4TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService5ProtocolTest is a client for InputService5ProtocolTest. type InputService5ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService5ProtocolTest client. func NewInputService5ProtocolTest(config *aws.Config) *InputService5ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice5protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice5protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -381,38 +377,45 @@ func NewInputService5ProtocolTest(config *aws.Config) *InputService5ProtocolTest // newRequest creates a new request for a InputService5ProtocolTest operation and runs any // custom request initialization. -func (c *InputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputShape) (req *aws.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) { +const opInputService5TestCaseOperation1 = "OperationName" - if opInputService5TestCaseOperation1 == nil { - opInputService5TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation. +func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService5TestCaseOperation1, } if input == nil { - input = &InputService5TestShapeInputShape{} + input = &InputService5TestShapeInputService5TestCaseOperation1Input{} } - req = c.newRequest(opInputService5TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService5TestShapeInputService5TestCaseOperation1Output{} req.Data = output return } -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputShape) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { +func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { req, out := c.InputService5TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService5TestCaseOperation1 *aws.Operation +type InputService5TestShapeInputService5TestCaseOperation1Input struct { + ListArg []*string `locationName:"ListMemberName" locationNameList:"item" type:"list"` + + metadataInputService5TestShapeInputService5TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService5TestShapeInputService5TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService5TestShapeInputService5TestCaseOperation1Output struct { metadataInputService5TestShapeInputService5TestCaseOperation1Output `json:"-" xml:"-"` @@ -422,27 +425,18 @@ type metadataInputService5TestShapeInputService5TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService5TestShapeInputShape struct { - ListArg []*string `locationName:"ListMemberName" locationNameList:"item" type:"list"` - - metadataInputService5TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService5TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService6ProtocolTest is a client for InputService6ProtocolTest. type InputService6ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService6ProtocolTest client. func NewInputService6ProtocolTest(config *aws.Config) *InputService6ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice6protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice6protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -458,38 +452,45 @@ func NewInputService6ProtocolTest(config *aws.Config) *InputService6ProtocolTest // newRequest creates a new request for a InputService6ProtocolTest operation and runs any // custom request initialization. -func (c *InputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation. -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputShape) (req *aws.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) { +const opInputService6TestCaseOperation1 = "OperationName" - if opInputService6TestCaseOperation1 == nil { - opInputService6TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation. +func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService6TestCaseOperation1, } if input == nil { - input = &InputService6TestShapeInputShape{} + input = &InputService6TestShapeInputService6TestCaseOperation1Input{} } - req = c.newRequest(opInputService6TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService6TestShapeInputService6TestCaseOperation1Output{} req.Data = output return } -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputShape) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { +func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { req, out := c.InputService6TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService6TestCaseOperation1 *aws.Operation +type InputService6TestShapeInputService6TestCaseOperation1Input struct { + ListArg []*string `locationName:"ListMemberName" queryName:"ListQueryName" locationNameList:"item" type:"list"` + + metadataInputService6TestShapeInputService6TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService6TestShapeInputService6TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService6TestShapeInputService6TestCaseOperation1Output struct { metadataInputService6TestShapeInputService6TestCaseOperation1Output `json:"-" xml:"-"` @@ -499,27 +500,18 @@ type metadataInputService6TestShapeInputService6TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService6TestShapeInputShape struct { - ListArg []*string `locationName:"ListMemberName" queryName:"ListQueryName" locationNameList:"item" type:"list"` - - metadataInputService6TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService6TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService7ProtocolTest is a client for InputService7ProtocolTest. type InputService7ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService7ProtocolTest client. func NewInputService7ProtocolTest(config *aws.Config) *InputService7ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice7protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice7protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -535,38 +527,45 @@ func NewInputService7ProtocolTest(config *aws.Config) *InputService7ProtocolTest // newRequest creates a new request for a InputService7ProtocolTest operation and runs any // custom request initialization. -func (c *InputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputShape) (req *aws.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) { +const opInputService7TestCaseOperation1 = "OperationName" - if opInputService7TestCaseOperation1 == nil { - opInputService7TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation. +func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService7TestCaseOperation1, } if input == nil { - input = &InputService7TestShapeInputShape{} + input = &InputService7TestShapeInputService7TestCaseOperation1Input{} } - req = c.newRequest(opInputService7TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService7TestShapeInputService7TestCaseOperation1Output{} req.Data = output return } -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputShape) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { +func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { req, out := c.InputService7TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService7TestCaseOperation1 *aws.Operation +type InputService7TestShapeInputService7TestCaseOperation1Input struct { + BlobArg []byte `type:"blob"` + + metadataInputService7TestShapeInputService7TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService7TestShapeInputService7TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService7TestShapeInputService7TestCaseOperation1Output struct { metadataInputService7TestShapeInputService7TestCaseOperation1Output `json:"-" xml:"-"` @@ -576,27 +575,18 @@ type metadataInputService7TestShapeInputService7TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService7TestShapeInputShape struct { - BlobArg []byte `type:"blob"` - - metadataInputService7TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService7TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService8ProtocolTest is a client for InputService8ProtocolTest. type InputService8ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService8ProtocolTest client. func NewInputService8ProtocolTest(config *aws.Config) *InputService8ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice8protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice8protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -612,38 +602,45 @@ func NewInputService8ProtocolTest(config *aws.Config) *InputService8ProtocolTest // newRequest creates a new request for a InputService8ProtocolTest operation and runs any // custom request initialization. -func (c *InputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation. -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputShape) (req *aws.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) { +const opInputService8TestCaseOperation1 = "OperationName" - if opInputService8TestCaseOperation1 == nil { - opInputService8TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation. +func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService8TestCaseOperation1, } if input == nil { - input = &InputService8TestShapeInputShape{} + input = &InputService8TestShapeInputService8TestCaseOperation1Input{} } - req = c.newRequest(opInputService8TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService8TestShapeInputService8TestCaseOperation1Output{} req.Data = output return } -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputShape) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { +func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { req, out := c.InputService8TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService8TestCaseOperation1 *aws.Operation +type InputService8TestShapeInputService8TestCaseOperation1Input struct { + TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + metadataInputService8TestShapeInputService8TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService8TestShapeInputService8TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService8TestShapeInputService8TestCaseOperation1Output struct { metadataInputService8TestShapeInputService8TestCaseOperation1Output `json:"-" xml:"-"` @@ -653,16 +650,6 @@ type metadataInputService8TestShapeInputService8TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService8TestShapeInputShape struct { - TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"` - - metadataInputService8TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService8TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - // // Tests begin here // @@ -671,7 +658,7 @@ func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) { svc := NewInputService1ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService1TestShapeInputShape{ + input := &InputService1TestShapeInputService1TestCaseOperation1Input{ Bar: aws.String("val2"), Foo: aws.String("val1"), } @@ -698,7 +685,7 @@ func TestInputService2ProtocolTestStructureWithLocationNameAndQueryNameAppliedTo svc := NewInputService2ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService2TestShapeInputShape{ + input := &InputService2TestShapeInputService2TestCaseOperation1Input{ Bar: aws.String("val2"), Foo: aws.String("val1"), Yuck: aws.String("val3"), @@ -726,7 +713,7 @@ func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) { svc := NewInputService3ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService3TestShapeInputShape{ + input := &InputService3TestShapeInputService3TestCaseOperation1Input{ StructArg: &InputService3TestShapeStructType{ ScalarArg: aws.String("foo"), }, @@ -754,7 +741,7 @@ func TestInputService4ProtocolTestListTypesCase1(t *testing.T) { svc := NewInputService4ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService4TestShapeInputShape{ + input := &InputService4TestShapeInputService4TestCaseOperation1Input{ ListArg: []*string{ aws.String("foo"), aws.String("bar"), @@ -784,7 +771,7 @@ func TestInputService5ProtocolTestListWithLocationNameAppliedToMemberCase1(t *te svc := NewInputService5ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService5TestShapeInputShape{ + input := &InputService5TestShapeInputService5TestCaseOperation1Input{ ListArg: []*string{ aws.String("a"), aws.String("b"), @@ -814,7 +801,7 @@ func TestInputService6ProtocolTestListWithLocationNameAndQueryNameCase1(t *testi svc := NewInputService6ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService6TestShapeInputShape{ + input := &InputService6TestShapeInputService6TestCaseOperation1Input{ ListArg: []*string{ aws.String("a"), aws.String("b"), @@ -844,7 +831,7 @@ func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) { svc := NewInputService7ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService7TestShapeInputShape{ + input := &InputService7TestShapeInputService7TestCaseOperation1Input{ BlobArg: []byte("foo"), } req, _ := svc.InputService7TestCaseOperation1Request(input) @@ -870,7 +857,7 @@ func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) { svc := NewInputService8ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService8TestShapeInputShape{ + input := &InputService8TestShapeInputService8TestCaseOperation1Input{ TimeArg: aws.Time(time.Unix(1422172800, 0)), } req, _ := svc.InputService8TestCaseOperation1Request(input) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go index b25ece116fb..bb0f0158889 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/internal/protocol/ec2query/unmarshal.go @@ -6,26 +6,26 @@ import ( "encoding/xml" "io" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/apierr" + "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" ) // Unmarshal unmarshals a response body for the EC2 protocol. -func Unmarshal(r *aws.Request) { +func Unmarshal(r *request.Request) { defer r.HTTPResponse.Body.Close() if r.DataFilled() { decoder := xml.NewDecoder(r.HTTPResponse.Body) err := xmlutil.UnmarshalXML(r.Data, decoder, "") if err != nil { - r.Error = apierr.New("Unmarshal", "failed decoding EC2 Query response", err) + r.Error = awserr.New("SerializationError", "failed decoding EC2 Query response", err) return } } } // UnmarshalMeta unmarshals response headers for the EC2 protocol. -func UnmarshalMeta(r *aws.Request) { +func UnmarshalMeta(r *request.Request) { // TODO implement unmarshaling of request IDs } @@ -37,16 +37,16 @@ type xmlErrorResponse struct { } // UnmarshalError unmarshals a response error for the EC2 protocol. -func UnmarshalError(r *aws.Request) { +func UnmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() resp := &xmlErrorResponse{} err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) if err != nil && err != io.EOF { - r.Error = apierr.New("Unmarshal", "failed decoding EC2 Query error response", err) + r.Error = awserr.New("SerializationError", "failed decoding EC2 Query error response", err) } else { - r.Error = apierr.NewRequestError( - apierr.New(resp.Code, resp.Message, nil), + r.Error = awserr.NewRequestFailure( + awserr.New(resp.Code, resp.Message, nil), r.HTTPResponse.StatusCode, resp.RequestID, ) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go index 058f47801c0..3d7b0430bdc 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go @@ -1,10 +1,6 @@ package ec2query_test import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/protocol/ec2query" - "github.com/aws/aws-sdk-go/internal/signer/v4" - "bytes" "encoding/json" "encoding/xml" @@ -15,7 +11,14 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/defaults" + "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/protocol/xml/xmlutil" + "github.com/aws/aws-sdk-go/internal/signer/v4" "github.com/aws/aws-sdk-go/internal/util" "github.com/stretchr/testify/assert" ) @@ -31,17 +34,18 @@ var _ = util.Trim("") var _ = url.Values{} var _ = io.EOF -// OutputService1ProtocolTest is a client for OutputService1ProtocolTest. type OutputService1ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService1ProtocolTest client. func NewOutputService1ProtocolTest(config *aws.Config) *OutputService1ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice1protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice1protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -57,39 +61,36 @@ func NewOutputService1ProtocolTest(config *aws.Config) *OutputService1ProtocolTe // newRequest creates a new request for a OutputService1ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *aws.Request, output *OutputService1TestShapeOutputShape) { +const opOutputService1TestCaseOperation1 = "OperationName" - if opOutputService1TestCaseOperation1 == nil { - opOutputService1TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation. +func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService1TestCaseOperation1, } if input == nil { input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{} } - req = c.newRequest(opOutputService1TestCaseOperation1, input, output) - output = &OutputService1TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputShape, error) { +func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) { req, out := c.OutputService1TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService1TestCaseOperation1 *aws.Operation - type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { metadataOutputService1TestShapeOutputService1TestCaseOperation1Input `json:"-" xml:"-"` } @@ -98,7 +99,7 @@ type metadataOutputService1TestShapeOutputService1TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService1TestShapeOutputShape struct { +type OutputService1TestShapeOutputService1TestCaseOperation1Output struct { Char *string `type:"character"` Double *float64 `type:"double"` @@ -115,24 +116,25 @@ type OutputService1TestShapeOutputShape struct { TrueBool *bool `type:"boolean"` - metadataOutputService1TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService1TestShapeOutputService1TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService1TestShapeOutputShape struct { +type metadataOutputService1TestShapeOutputService1TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService2ProtocolTest is a client for OutputService2ProtocolTest. type OutputService2ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService2ProtocolTest client. func NewOutputService2ProtocolTest(config *aws.Config) *OutputService2ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice2protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice2protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -148,39 +150,36 @@ func NewOutputService2ProtocolTest(config *aws.Config) *OutputService2ProtocolTe // newRequest creates a new request for a OutputService2ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation. -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *aws.Request, output *OutputService2TestShapeOutputShape) { +const opOutputService2TestCaseOperation1 = "OperationName" - if opOutputService2TestCaseOperation1 == nil { - opOutputService2TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation. +func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService2TestCaseOperation1, } if input == nil { input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{} } - req = c.newRequest(opOutputService2TestCaseOperation1, input, output) - output = &OutputService2TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputShape, error) { +func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { req, out := c.OutputService2TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService2TestCaseOperation1 *aws.Operation - type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { metadataOutputService2TestShapeOutputService2TestCaseOperation1Input `json:"-" xml:"-"` } @@ -189,27 +188,28 @@ type metadataOutputService2TestShapeOutputService2TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService2TestShapeOutputShape struct { +type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { Blob []byte `type:"blob"` - metadataOutputService2TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService2TestShapeOutputService2TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService2TestShapeOutputShape struct { +type metadataOutputService2TestShapeOutputService2TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService3ProtocolTest is a client for OutputService3ProtocolTest. type OutputService3ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService3ProtocolTest client. func NewOutputService3ProtocolTest(config *aws.Config) *OutputService3ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice3protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice3protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -225,39 +225,36 @@ func NewOutputService3ProtocolTest(config *aws.Config) *OutputService3ProtocolTe // newRequest creates a new request for a OutputService3ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation. -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *aws.Request, output *OutputService3TestShapeOutputShape) { +const opOutputService3TestCaseOperation1 = "OperationName" - if opOutputService3TestCaseOperation1 == nil { - opOutputService3TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation. +func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService3TestCaseOperation1, } if input == nil { input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{} } - req = c.newRequest(opOutputService3TestCaseOperation1, input, output) - output = &OutputService3TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputShape, error) { +func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { req, out := c.OutputService3TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService3TestCaseOperation1 *aws.Operation - type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { metadataOutputService3TestShapeOutputService3TestCaseOperation1Input `json:"-" xml:"-"` } @@ -266,27 +263,28 @@ type metadataOutputService3TestShapeOutputService3TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService3TestShapeOutputShape struct { +type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { ListMember []*string `type:"list"` - metadataOutputService3TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService3TestShapeOutputService3TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService3TestShapeOutputShape struct { +type metadataOutputService3TestShapeOutputService3TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService4ProtocolTest is a client for OutputService4ProtocolTest. type OutputService4ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService4ProtocolTest client. func NewOutputService4ProtocolTest(config *aws.Config) *OutputService4ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice4protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice4protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -302,39 +300,36 @@ func NewOutputService4ProtocolTest(config *aws.Config) *OutputService4ProtocolTe // newRequest creates a new request for a OutputService4ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation. -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *aws.Request, output *OutputService4TestShapeOutputShape) { +const opOutputService4TestCaseOperation1 = "OperationName" - if opOutputService4TestCaseOperation1 == nil { - opOutputService4TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation. +func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService4TestCaseOperation1, } if input == nil { input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{} } - req = c.newRequest(opOutputService4TestCaseOperation1, input, output) - output = &OutputService4TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputShape, error) { +func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { req, out := c.OutputService4TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService4TestCaseOperation1 *aws.Operation - type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { metadataOutputService4TestShapeOutputService4TestCaseOperation1Input `json:"-" xml:"-"` } @@ -343,27 +338,28 @@ type metadataOutputService4TestShapeOutputService4TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService4TestShapeOutputShape struct { +type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { ListMember []*string `locationNameList:"item" type:"list"` - metadataOutputService4TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService4TestShapeOutputService4TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService4TestShapeOutputShape struct { +type metadataOutputService4TestShapeOutputService4TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService5ProtocolTest is a client for OutputService5ProtocolTest. type OutputService5ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService5ProtocolTest client. func NewOutputService5ProtocolTest(config *aws.Config) *OutputService5ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice5protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice5protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -379,39 +375,36 @@ func NewOutputService5ProtocolTest(config *aws.Config) *OutputService5ProtocolTe // newRequest creates a new request for a OutputService5ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation. -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *aws.Request, output *OutputService5TestShapeOutputShape) { +const opOutputService5TestCaseOperation1 = "OperationName" - if opOutputService5TestCaseOperation1 == nil { - opOutputService5TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation. +func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService5TestCaseOperation1, } if input == nil { input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{} } - req = c.newRequest(opOutputService5TestCaseOperation1, input, output) - output = &OutputService5TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputShape, error) { +func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { req, out := c.OutputService5TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService5TestCaseOperation1 *aws.Operation - type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { metadataOutputService5TestShapeOutputService5TestCaseOperation1Input `json:"-" xml:"-"` } @@ -420,27 +413,28 @@ type metadataOutputService5TestShapeOutputService5TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService5TestShapeOutputShape struct { +type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { ListMember []*string `type:"list" flattened:"true"` - metadataOutputService5TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService5TestShapeOutputService5TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService5TestShapeOutputShape struct { +type metadataOutputService5TestShapeOutputService5TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService6ProtocolTest is a client for OutputService6ProtocolTest. type OutputService6ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService6ProtocolTest client. func NewOutputService6ProtocolTest(config *aws.Config) *OutputService6ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice6protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice6protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -456,39 +450,36 @@ func NewOutputService6ProtocolTest(config *aws.Config) *OutputService6ProtocolTe // newRequest creates a new request for a OutputService6ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation. -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *aws.Request, output *OutputService6TestShapeOutputShape) { +const opOutputService6TestCaseOperation1 = "OperationName" - if opOutputService6TestCaseOperation1 == nil { - opOutputService6TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation. +func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService6TestCaseOperation1, } if input == nil { input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{} } - req = c.newRequest(opOutputService6TestCaseOperation1, input, output) - output = &OutputService6TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputShape, error) { +func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { req, out := c.OutputService6TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService6TestCaseOperation1 *aws.Operation - type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { metadataOutputService6TestShapeOutputService6TestCaseOperation1Input `json:"-" xml:"-"` } @@ -497,13 +488,13 @@ type metadataOutputService6TestShapeOutputService6TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService6TestShapeOutputShape struct { +type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { Map map[string]*OutputService6TestShapeStructureType `type:"map"` - metadataOutputService6TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService6TestShapeOutputService6TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService6TestShapeOutputShape struct { +type metadataOutputService6TestShapeOutputService6TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } @@ -517,17 +508,18 @@ type metadataOutputService6TestShapeStructureType struct { SDKShapeTraits bool `type:"structure"` } -// OutputService7ProtocolTest is a client for OutputService7ProtocolTest. type OutputService7ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService7ProtocolTest client. func NewOutputService7ProtocolTest(config *aws.Config) *OutputService7ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice7protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice7protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -543,39 +535,36 @@ func NewOutputService7ProtocolTest(config *aws.Config) *OutputService7ProtocolTe // newRequest creates a new request for a OutputService7ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation. -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *aws.Request, output *OutputService7TestShapeOutputShape) { +const opOutputService7TestCaseOperation1 = "OperationName" - if opOutputService7TestCaseOperation1 == nil { - opOutputService7TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation. +func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService7TestCaseOperation1, } if input == nil { input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{} } - req = c.newRequest(opOutputService7TestCaseOperation1, input, output) - output = &OutputService7TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputShape, error) { +func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { req, out := c.OutputService7TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService7TestCaseOperation1 *aws.Operation - type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { metadataOutputService7TestShapeOutputService7TestCaseOperation1Input `json:"-" xml:"-"` } @@ -584,27 +573,28 @@ type metadataOutputService7TestShapeOutputService7TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService7TestShapeOutputShape struct { +type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { Map map[string]*string `type:"map" flattened:"true"` - metadataOutputService7TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService7TestShapeOutputService7TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService7TestShapeOutputShape struct { +type metadataOutputService7TestShapeOutputService7TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService8ProtocolTest is a client for OutputService8ProtocolTest. type OutputService8ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService8ProtocolTest client. func NewOutputService8ProtocolTest(config *aws.Config) *OutputService8ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice8protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice8protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -620,39 +610,36 @@ func NewOutputService8ProtocolTest(config *aws.Config) *OutputService8ProtocolTe // newRequest creates a new request for a OutputService8ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation. -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *aws.Request, output *OutputService8TestShapeOutputShape) { +const opOutputService8TestCaseOperation1 = "OperationName" - if opOutputService8TestCaseOperation1 == nil { - opOutputService8TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation. +func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService8TestCaseOperation1, } if input == nil { input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{} } - req = c.newRequest(opOutputService8TestCaseOperation1, input, output) - output = &OutputService8TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputShape, error) { +func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { req, out := c.OutputService8TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService8TestCaseOperation1 *aws.Operation - type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { metadataOutputService8TestShapeOutputService8TestCaseOperation1Input `json:"-" xml:"-"` } @@ -661,13 +648,13 @@ type metadataOutputService8TestShapeOutputService8TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService8TestShapeOutputShape struct { +type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"` - metadataOutputService8TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService8TestShapeOutputService8TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService8TestShapeOutputShape struct { +type metadataOutputService8TestShapeOutputService8TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build.go index 0f17031a0d8..83ed8758ef9 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/internal/protocol/query/build.go @@ -6,19 +6,19 @@ package query import ( "net/url" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/apierr" + "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" ) // Build builds a request for an AWS Query service. -func Build(r *aws.Request) { +func Build(r *request.Request) { body := url.Values{ "Action": {r.Operation.Name}, "Version": {r.Service.APIVersion}, } if err := queryutil.Parse(body, r.Params, false); err != nil { - r.Error = apierr.New("Marshal", "failed encoding Query request", err) + r.Error = awserr.New("SerializationError", "failed encoding Query request", err) return } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build_test.go index da266758b4f..7b29fd79d74 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/build_test.go @@ -1,10 +1,6 @@ package query_test import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/protocol/query" - "github.com/aws/aws-sdk-go/internal/signer/v4" - "bytes" "encoding/json" "encoding/xml" @@ -15,7 +11,14 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/defaults" + "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/protocol/xml/xmlutil" + "github.com/aws/aws-sdk-go/internal/signer/v4" "github.com/aws/aws-sdk-go/internal/util" "github.com/stretchr/testify/assert" ) @@ -31,17 +34,18 @@ var _ = util.Trim("") var _ = url.Values{} var _ = io.EOF -// InputService1ProtocolTest is a client for InputService1ProtocolTest. type InputService1ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService1ProtocolTest client. func NewInputService1ProtocolTest(config *aws.Config) *InputService1ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice1protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice1protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -57,38 +61,47 @@ func NewInputService1ProtocolTest(config *aws.Config) *InputService1ProtocolTest // newRequest creates a new request for a InputService1ProtocolTest operation and runs any // custom request initialization. -func (c *InputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation. -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputShape) (req *aws.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) { +const opInputService1TestCaseOperation1 = "OperationName" - if opInputService1TestCaseOperation1 == nil { - opInputService1TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation. +func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputService1TestCaseOperation1Input) (req *request.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService1TestCaseOperation1, } if input == nil { - input = &InputService1TestShapeInputShape{} + input = &InputService1TestShapeInputService1TestCaseOperation1Input{} } - req = c.newRequest(opInputService1TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService1TestShapeInputService1TestCaseOperation1Output{} req.Data = output return } -func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputShape) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { +func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputService1TestCaseOperation1Input) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) { req, out := c.InputService1TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService1TestCaseOperation1 *aws.Operation +type InputService1TestShapeInputService1TestCaseOperation1Input struct { + Bar *string `type:"string"` + + Foo *string `type:"string"` + + metadataInputService1TestShapeInputService1TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService1TestShapeInputService1TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService1TestShapeInputService1TestCaseOperation1Output struct { metadataInputService1TestShapeInputService1TestCaseOperation1Output `json:"-" xml:"-"` @@ -98,29 +111,18 @@ type metadataInputService1TestShapeInputService1TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService1TestShapeInputShape struct { - Bar *string `type:"string"` - - Foo *string `type:"string"` - - metadataInputService1TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService1TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService2ProtocolTest is a client for InputService2ProtocolTest. type InputService2ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService2ProtocolTest client. func NewInputService2ProtocolTest(config *aws.Config) *InputService2ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice2protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice2protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -136,38 +138,45 @@ func NewInputService2ProtocolTest(config *aws.Config) *InputService2ProtocolTest // newRequest creates a new request for a InputService2ProtocolTest operation and runs any // custom request initialization. -func (c *InputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation. -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputShape) (req *aws.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) { +const opInputService2TestCaseOperation1 = "OperationName" - if opInputService2TestCaseOperation1 == nil { - opInputService2TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation. +func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputService2TestCaseOperation1Input) (req *request.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService2TestCaseOperation1, } if input == nil { - input = &InputService2TestShapeInputShape{} + input = &InputService2TestShapeInputService2TestCaseOperation1Input{} } - req = c.newRequest(opInputService2TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService2TestShapeInputService2TestCaseOperation1Output{} req.Data = output return } -func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputShape) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { +func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputService2TestCaseOperation1Input) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) { req, out := c.InputService2TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService2TestCaseOperation1 *aws.Operation +type InputService2TestShapeInputService2TestCaseOperation1Input struct { + StructArg *InputService2TestShapeStructType `type:"structure"` + + metadataInputService2TestShapeInputService2TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService2TestShapeInputService2TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService2TestShapeInputService2TestCaseOperation1Output struct { metadataInputService2TestShapeInputService2TestCaseOperation1Output `json:"-" xml:"-"` @@ -177,16 +186,6 @@ type metadataInputService2TestShapeInputService2TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService2TestShapeInputShape struct { - StructArg *InputService2TestShapeStructType `type:"structure"` - - metadataInputService2TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService2TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - type InputService2TestShapeStructType struct { ScalarArg *string `type:"string"` @@ -197,17 +196,18 @@ type metadataInputService2TestShapeStructType struct { SDKShapeTraits bool `type:"structure"` } -// InputService3ProtocolTest is a client for InputService3ProtocolTest. type InputService3ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService3ProtocolTest client. func NewInputService3ProtocolTest(config *aws.Config) *InputService3ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice3protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice3protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -223,66 +223,46 @@ func NewInputService3ProtocolTest(config *aws.Config) *InputService3ProtocolTest // newRequest creates a new request for a InputService3ProtocolTest operation and runs any // custom request initialization. -func (c *InputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputShape) (req *aws.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) { +const opInputService3TestCaseOperation1 = "OperationName" - if opInputService3TestCaseOperation1 == nil { - opInputService3TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation. +func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputService3TestCaseOperation1Input) (req *request.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService3TestCaseOperation1, } if input == nil { - input = &InputService3TestShapeInputShape{} + input = &InputService3TestShapeInputService3TestCaseOperation1Input{} } - req = c.newRequest(opInputService3TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService3TestShapeInputService3TestCaseOperation1Output{} req.Data = output return } -func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { +func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputService3TestCaseOperation1Input) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) { req, out := c.InputService3TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService3TestCaseOperation1 *aws.Operation +type InputService3TestShapeInputService3TestCaseOperation1Input struct { + ListArg []*string `type:"list"` -// InputService3TestCaseOperation2Request generates a request for the InputService3TestCaseOperation2 operation. -func (c *InputService3ProtocolTest) InputService3TestCaseOperation2Request(input *InputService3TestShapeInputShape) (req *aws.Request, output *InputService3TestShapeInputService3TestCaseOperation2Output) { - - if opInputService3TestCaseOperation2 == nil { - opInputService3TestCaseOperation2 = &aws.Operation{ - Name: "OperationName", - } - } - - if input == nil { - input = &InputService3TestShapeInputShape{} - } - - req = c.newRequest(opInputService3TestCaseOperation2, input, output) - output = &InputService3TestShapeInputService3TestCaseOperation2Output{} - req.Data = output - return + metadataInputService3TestShapeInputService3TestCaseOperation1Input `json:"-" xml:"-"` } -func (c *InputService3ProtocolTest) InputService3TestCaseOperation2(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation2Output, error) { - req, out := c.InputService3TestCaseOperation2Request(input) - err := req.Send() - return out, err +type metadataInputService3TestShapeInputService3TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` } -var opInputService3TestCaseOperation2 *aws.Operation - type InputService3TestShapeInputService3TestCaseOperation1Output struct { metadataInputService3TestShapeInputService3TestCaseOperation1Output `json:"-" xml:"-"` } @@ -291,35 +271,18 @@ type metadataInputService3TestShapeInputService3TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService3TestShapeInputService3TestCaseOperation2Output struct { - metadataInputService3TestShapeInputService3TestCaseOperation2Output `json:"-" xml:"-"` -} - -type metadataInputService3TestShapeInputService3TestCaseOperation2Output struct { - SDKShapeTraits bool `type:"structure"` -} - -type InputService3TestShapeInputShape struct { - ListArg []*string `type:"list"` - - metadataInputService3TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService3TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService4ProtocolTest is a client for InputService4ProtocolTest. type InputService4ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService4ProtocolTest client. func NewInputService4ProtocolTest(config *aws.Config) *InputService4ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice4protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice4protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -335,66 +298,48 @@ func NewInputService4ProtocolTest(config *aws.Config) *InputService4ProtocolTest // newRequest creates a new request for a InputService4ProtocolTest operation and runs any // custom request initialization. -func (c *InputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputShape) (req *aws.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) { +const opInputService4TestCaseOperation1 = "OperationName" - if opInputService4TestCaseOperation1 == nil { - opInputService4TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation. +func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputService4TestCaseOperation1Input) (req *request.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService4TestCaseOperation1, } if input == nil { - input = &InputService4TestShapeInputShape{} + input = &InputService4TestShapeInputService4TestCaseOperation1Input{} } - req = c.newRequest(opInputService4TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService4TestShapeInputService4TestCaseOperation1Output{} req.Data = output return } -func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { +func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputService4TestCaseOperation1Input) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) { req, out := c.InputService4TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService4TestCaseOperation1 *aws.Operation +type InputService4TestShapeInputService4TestCaseOperation1Input struct { + ListArg []*string `type:"list" flattened:"true"` -// InputService4TestCaseOperation2Request generates a request for the InputService4TestCaseOperation2 operation. -func (c *InputService4ProtocolTest) InputService4TestCaseOperation2Request(input *InputService4TestShapeInputShape) (req *aws.Request, output *InputService4TestShapeInputService4TestCaseOperation2Output) { + ScalarArg *string `type:"string"` - if opInputService4TestCaseOperation2 == nil { - opInputService4TestCaseOperation2 = &aws.Operation{ - Name: "OperationName", - } - } - - if input == nil { - input = &InputService4TestShapeInputShape{} - } - - req = c.newRequest(opInputService4TestCaseOperation2, input, output) - output = &InputService4TestShapeInputService4TestCaseOperation2Output{} - req.Data = output - return + metadataInputService4TestShapeInputService4TestCaseOperation1Input `json:"-" xml:"-"` } -func (c *InputService4ProtocolTest) InputService4TestCaseOperation2(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation2Output, error) { - req, out := c.InputService4TestCaseOperation2Request(input) - err := req.Send() - return out, err +type metadataInputService4TestShapeInputService4TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` } -var opInputService4TestCaseOperation2 *aws.Operation - type InputService4TestShapeInputService4TestCaseOperation1Output struct { metadataInputService4TestShapeInputService4TestCaseOperation1Output `json:"-" xml:"-"` } @@ -403,37 +348,18 @@ type metadataInputService4TestShapeInputService4TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService4TestShapeInputService4TestCaseOperation2Output struct { - metadataInputService4TestShapeInputService4TestCaseOperation2Output `json:"-" xml:"-"` -} - -type metadataInputService4TestShapeInputService4TestCaseOperation2Output struct { - SDKShapeTraits bool `type:"structure"` -} - -type InputService4TestShapeInputShape struct { - ListArg []*string `type:"list" flattened:"true"` - - ScalarArg *string `type:"string"` - - metadataInputService4TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService4TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService5ProtocolTest is a client for InputService5ProtocolTest. type InputService5ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService5ProtocolTest client. func NewInputService5ProtocolTest(config *aws.Config) *InputService5ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice5protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice5protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -449,66 +375,48 @@ func NewInputService5ProtocolTest(config *aws.Config) *InputService5ProtocolTest // newRequest creates a new request for a InputService5ProtocolTest operation and runs any // custom request initialization. -func (c *InputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputShape) (req *aws.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) { +const opInputService5TestCaseOperation1 = "OperationName" - if opInputService5TestCaseOperation1 == nil { - opInputService5TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation. +func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputService5TestCaseOperation1Input) (req *request.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService5TestCaseOperation1, } if input == nil { - input = &InputService5TestShapeInputShape{} + input = &InputService5TestShapeInputService5TestCaseOperation1Input{} } - req = c.newRequest(opInputService5TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService5TestShapeInputService5TestCaseOperation1Output{} req.Data = output return } -func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputShape) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { +func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputService5TestCaseOperation1Input) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) { req, out := c.InputService5TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService5TestCaseOperation1 *aws.Operation +type InputService5TestShapeInputService5TestCaseOperation1Input struct { + ListArg []*string `locationNameList:"ListArgLocation" type:"list" flattened:"true"` -// InputService5TestCaseOperation2Request generates a request for the InputService5TestCaseOperation2 operation. -func (c *InputService5ProtocolTest) InputService5TestCaseOperation2Request(input *InputService5TestShapeInputShape) (req *aws.Request, output *InputService5TestShapeInputService5TestCaseOperation2Output) { + ScalarArg *string `type:"string"` - if opInputService5TestCaseOperation2 == nil { - opInputService5TestCaseOperation2 = &aws.Operation{ - Name: "OperationName", - } - } - - if input == nil { - input = &InputService5TestShapeInputShape{} - } - - req = c.newRequest(opInputService5TestCaseOperation2, input, output) - output = &InputService5TestShapeInputService5TestCaseOperation2Output{} - req.Data = output - return + metadataInputService5TestShapeInputService5TestCaseOperation1Input `json:"-" xml:"-"` } -func (c *InputService5ProtocolTest) InputService5TestCaseOperation2(input *InputService5TestShapeInputShape) (*InputService5TestShapeInputService5TestCaseOperation2Output, error) { - req, out := c.InputService5TestCaseOperation2Request(input) - err := req.Send() - return out, err +type metadataInputService5TestShapeInputService5TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` } -var opInputService5TestCaseOperation2 *aws.Operation - type InputService5TestShapeInputService5TestCaseOperation1Output struct { metadataInputService5TestShapeInputService5TestCaseOperation1Output `json:"-" xml:"-"` } @@ -517,35 +425,18 @@ type metadataInputService5TestShapeInputService5TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService5TestShapeInputService5TestCaseOperation2Output struct { - metadataInputService5TestShapeInputService5TestCaseOperation2Output `json:"-" xml:"-"` -} - -type metadataInputService5TestShapeInputService5TestCaseOperation2Output struct { - SDKShapeTraits bool `type:"structure"` -} - -type InputService5TestShapeInputShape struct { - MapArg map[string]*string `type:"map"` - - metadataInputService5TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService5TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService6ProtocolTest is a client for InputService6ProtocolTest. type InputService6ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService6ProtocolTest client. func NewInputService6ProtocolTest(config *aws.Config) *InputService6ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice6protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice6protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -561,38 +452,45 @@ func NewInputService6ProtocolTest(config *aws.Config) *InputService6ProtocolTest // newRequest creates a new request for a InputService6ProtocolTest operation and runs any // custom request initialization. -func (c *InputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation. -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputShape) (req *aws.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) { +const opInputService6TestCaseOperation1 = "OperationName" - if opInputService6TestCaseOperation1 == nil { - opInputService6TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation. +func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputService6TestCaseOperation1Input) (req *request.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService6TestCaseOperation1, } if input == nil { - input = &InputService6TestShapeInputShape{} + input = &InputService6TestShapeInputService6TestCaseOperation1Input{} } - req = c.newRequest(opInputService6TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService6TestShapeInputService6TestCaseOperation1Output{} req.Data = output return } -func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputShape) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { +func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputService6TestCaseOperation1Input) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) { req, out := c.InputService6TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService6TestCaseOperation1 *aws.Operation +type InputService6TestShapeInputService6TestCaseOperation1Input struct { + MapArg map[string]*string `type:"map"` + + metadataInputService6TestShapeInputService6TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService6TestShapeInputService6TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService6TestShapeInputService6TestCaseOperation1Output struct { metadataInputService6TestShapeInputService6TestCaseOperation1Output `json:"-" xml:"-"` @@ -602,27 +500,18 @@ type metadataInputService6TestShapeInputService6TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService6TestShapeInputShape struct { - MapArg map[string]*string `locationNameKey:"TheKey" locationNameValue:"TheValue" type:"map"` - - metadataInputService6TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService6TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService7ProtocolTest is a client for InputService7ProtocolTest. type InputService7ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService7ProtocolTest client. func NewInputService7ProtocolTest(config *aws.Config) *InputService7ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice7protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice7protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -638,38 +527,45 @@ func NewInputService7ProtocolTest(config *aws.Config) *InputService7ProtocolTest // newRequest creates a new request for a InputService7ProtocolTest operation and runs any // custom request initialization. -func (c *InputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation. -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputShape) (req *aws.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) { +const opInputService7TestCaseOperation1 = "OperationName" - if opInputService7TestCaseOperation1 == nil { - opInputService7TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation. +func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputService7TestCaseOperation1Input) (req *request.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService7TestCaseOperation1, } if input == nil { - input = &InputService7TestShapeInputShape{} + input = &InputService7TestShapeInputService7TestCaseOperation1Input{} } - req = c.newRequest(opInputService7TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService7TestShapeInputService7TestCaseOperation1Output{} req.Data = output return } -func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputShape) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { +func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputService7TestCaseOperation1Input) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) { req, out := c.InputService7TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService7TestCaseOperation1 *aws.Operation +type InputService7TestShapeInputService7TestCaseOperation1Input struct { + BlobArg []byte `type:"blob"` + + metadataInputService7TestShapeInputService7TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService7TestShapeInputService7TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService7TestShapeInputService7TestCaseOperation1Output struct { metadataInputService7TestShapeInputService7TestCaseOperation1Output `json:"-" xml:"-"` @@ -679,27 +575,18 @@ type metadataInputService7TestShapeInputService7TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService7TestShapeInputShape struct { - BlobArg []byte `type:"blob"` - - metadataInputService7TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService7TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService8ProtocolTest is a client for InputService8ProtocolTest. type InputService8ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService8ProtocolTest client. func NewInputService8ProtocolTest(config *aws.Config) *InputService8ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice8protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice8protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -715,38 +602,45 @@ func NewInputService8ProtocolTest(config *aws.Config) *InputService8ProtocolTest // newRequest creates a new request for a InputService8ProtocolTest operation and runs any // custom request initialization. -func (c *InputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation. -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputShape) (req *aws.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) { +const opInputService8TestCaseOperation1 = "OperationName" - if opInputService8TestCaseOperation1 == nil { - opInputService8TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation. +func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputService8TestCaseOperation1Input) (req *request.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService8TestCaseOperation1, } if input == nil { - input = &InputService8TestShapeInputShape{} + input = &InputService8TestShapeInputService8TestCaseOperation1Input{} } - req = c.newRequest(opInputService8TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService8TestShapeInputService8TestCaseOperation1Output{} req.Data = output return } -func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputShape) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { +func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputService8TestCaseOperation1Input) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) { req, out := c.InputService8TestCaseOperation1Request(input) err := req.Send() return out, err } -var opInputService8TestCaseOperation1 *aws.Operation +type InputService8TestShapeInputService8TestCaseOperation1Input struct { + TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"` + + metadataInputService8TestShapeInputService8TestCaseOperation1Input `json:"-" xml:"-"` +} + +type metadataInputService8TestShapeInputService8TestCaseOperation1Input struct { + SDKShapeTraits bool `type:"structure"` +} type InputService8TestShapeInputService8TestCaseOperation1Output struct { metadataInputService8TestShapeInputService8TestCaseOperation1Output `json:"-" xml:"-"` @@ -756,27 +650,18 @@ type metadataInputService8TestShapeInputService8TestCaseOperation1Output struct SDKShapeTraits bool `type:"structure"` } -type InputService8TestShapeInputShape struct { - TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"` - - metadataInputService8TestShapeInputShape `json:"-" xml:"-"` -} - -type metadataInputService8TestShapeInputShape struct { - SDKShapeTraits bool `type:"structure"` -} - -// InputService9ProtocolTest is a client for InputService9ProtocolTest. type InputService9ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new InputService9ProtocolTest client. func NewInputService9ProtocolTest(config *aws.Config) *InputService9ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "inputservice9protocoltest", - APIVersion: "2014-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "inputservice9protocoltest", + APIVersion: "2014-01-01", + }, } service.Initialize() @@ -792,26 +677,25 @@ func NewInputService9ProtocolTest(config *aws.Config) *InputService9ProtocolTest // newRequest creates a new request for a InputService9ProtocolTest operation and runs any // custom request initialization. -func (c *InputService9ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *InputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// InputService9TestCaseOperation1Request generates a request for the InputService9TestCaseOperation1 operation. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) { +const opInputService9TestCaseOperation1 = "OperationName" - if opInputService9TestCaseOperation1 == nil { - opInputService9TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// InputService9TestCaseOperation1Request generates a request for the InputService9TestCaseOperation1 operation. +func (c *InputService9ProtocolTest) InputService9TestCaseOperation1Request(input *InputService9TestShapeInputShape) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation1Output) { + op := &request.Operation{ + Name: opInputService9TestCaseOperation1, } if input == nil { input = &InputService9TestShapeInputShape{} } - req = c.newRequest(opInputService9TestCaseOperation1, input, output) + req = c.newRequest(op, input, output) output = &InputService9TestShapeInputService9TestCaseOperation1Output{} req.Data = output return @@ -823,22 +707,19 @@ func (c *InputService9ProtocolTest) InputService9TestCaseOperation1(input *Input return out, err } -var opInputService9TestCaseOperation1 *aws.Operation +const opInputService9TestCaseOperation2 = "OperationName" // InputService9TestCaseOperation2Request generates a request for the InputService9TestCaseOperation2 operation. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation2Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation2Output) { - - if opInputService9TestCaseOperation2 == nil { - opInputService9TestCaseOperation2 = &aws.Operation{ - Name: "OperationName", - } +func (c *InputService9ProtocolTest) InputService9TestCaseOperation2Request(input *InputService9TestShapeInputShape) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation2Output) { + op := &request.Operation{ + Name: opInputService9TestCaseOperation2, } if input == nil { input = &InputService9TestShapeInputShape{} } - req = c.newRequest(opInputService9TestCaseOperation2, input, output) + req = c.newRequest(op, input, output) output = &InputService9TestShapeInputService9TestCaseOperation2Output{} req.Data = output return @@ -850,22 +731,19 @@ func (c *InputService9ProtocolTest) InputService9TestCaseOperation2(input *Input return out, err } -var opInputService9TestCaseOperation2 *aws.Operation +const opInputService9TestCaseOperation3 = "OperationName" // InputService9TestCaseOperation3Request generates a request for the InputService9TestCaseOperation3 operation. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation3Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation3Output) { - - if opInputService9TestCaseOperation3 == nil { - opInputService9TestCaseOperation3 = &aws.Operation{ - Name: "OperationName", - } +func (c *InputService9ProtocolTest) InputService9TestCaseOperation3Request(input *InputService9TestShapeInputShape) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation3Output) { + op := &request.Operation{ + Name: opInputService9TestCaseOperation3, } if input == nil { input = &InputService9TestShapeInputShape{} } - req = c.newRequest(opInputService9TestCaseOperation3, input, output) + req = c.newRequest(op, input, output) output = &InputService9TestShapeInputService9TestCaseOperation3Output{} req.Data = output return @@ -877,22 +755,19 @@ func (c *InputService9ProtocolTest) InputService9TestCaseOperation3(input *Input return out, err } -var opInputService9TestCaseOperation3 *aws.Operation +const opInputService9TestCaseOperation4 = "OperationName" // InputService9TestCaseOperation4Request generates a request for the InputService9TestCaseOperation4 operation. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation4Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation4Output) { - - if opInputService9TestCaseOperation4 == nil { - opInputService9TestCaseOperation4 = &aws.Operation{ - Name: "OperationName", - } +func (c *InputService9ProtocolTest) InputService9TestCaseOperation4Request(input *InputService9TestShapeInputShape) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation4Output) { + op := &request.Operation{ + Name: opInputService9TestCaseOperation4, } if input == nil { input = &InputService9TestShapeInputShape{} } - req = c.newRequest(opInputService9TestCaseOperation4, input, output) + req = c.newRequest(op, input, output) output = &InputService9TestShapeInputService9TestCaseOperation4Output{} req.Data = output return @@ -904,22 +779,19 @@ func (c *InputService9ProtocolTest) InputService9TestCaseOperation4(input *Input return out, err } -var opInputService9TestCaseOperation4 *aws.Operation +const opInputService9TestCaseOperation5 = "OperationName" // InputService9TestCaseOperation5Request generates a request for the InputService9TestCaseOperation5 operation. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation5Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation5Output) { - - if opInputService9TestCaseOperation5 == nil { - opInputService9TestCaseOperation5 = &aws.Operation{ - Name: "OperationName", - } +func (c *InputService9ProtocolTest) InputService9TestCaseOperation5Request(input *InputService9TestShapeInputShape) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation5Output) { + op := &request.Operation{ + Name: opInputService9TestCaseOperation5, } if input == nil { input = &InputService9TestShapeInputShape{} } - req = c.newRequest(opInputService9TestCaseOperation5, input, output) + req = c.newRequest(op, input, output) output = &InputService9TestShapeInputService9TestCaseOperation5Output{} req.Data = output return @@ -931,22 +803,19 @@ func (c *InputService9ProtocolTest) InputService9TestCaseOperation5(input *Input return out, err } -var opInputService9TestCaseOperation5 *aws.Operation +const opInputService9TestCaseOperation6 = "OperationName" // InputService9TestCaseOperation6Request generates a request for the InputService9TestCaseOperation6 operation. -func (c *InputService9ProtocolTest) InputService9TestCaseOperation6Request(input *InputService9TestShapeInputShape) (req *aws.Request, output *InputService9TestShapeInputService9TestCaseOperation6Output) { - - if opInputService9TestCaseOperation6 == nil { - opInputService9TestCaseOperation6 = &aws.Operation{ - Name: "OperationName", - } +func (c *InputService9ProtocolTest) InputService9TestCaseOperation6Request(input *InputService9TestShapeInputShape) (req *request.Request, output *InputService9TestShapeInputService9TestCaseOperation6Output) { + op := &request.Operation{ + Name: opInputService9TestCaseOperation6, } if input == nil { input = &InputService9TestShapeInputShape{} } - req = c.newRequest(opInputService9TestCaseOperation6, input, output) + req = c.newRequest(op, input, output) output = &InputService9TestShapeInputService9TestCaseOperation6Output{} req.Data = output return @@ -958,8 +827,6 @@ func (c *InputService9ProtocolTest) InputService9TestCaseOperation6(input *Input return out, err } -var opInputService9TestCaseOperation6 *aws.Operation - type InputService9TestShapeInputService9TestCaseOperation1Output struct { metadataInputService9TestShapeInputService9TestCaseOperation1Output `json:"-" xml:"-"` } @@ -1042,7 +909,7 @@ func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) { svc := NewInputService1ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService1TestShapeInputShape{ + input := &InputService1TestShapeInputService1TestCaseOperation1Input{ Bar: aws.String("val2"), Foo: aws.String("val1"), } @@ -1069,7 +936,7 @@ func TestInputService2ProtocolTestNestedStructureMembersCase1(t *testing.T) { svc := NewInputService2ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService2TestShapeInputShape{ + input := &InputService2TestShapeInputService2TestCaseOperation1Input{ StructArg: &InputService2TestShapeStructType{ ScalarArg: aws.String("foo"), }, @@ -1097,7 +964,7 @@ func TestInputService3ProtocolTestListTypesCase1(t *testing.T) { svc := NewInputService3ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService3TestShapeInputShape{ + input := &InputService3TestShapeInputService3TestCaseOperation1Input{ ListArg: []*string{ aws.String("foo"), aws.String("bar"), @@ -1123,37 +990,11 @@ func TestInputService3ProtocolTestListTypesCase1(t *testing.T) { } -func TestInputService3ProtocolTestListTypesCase2(t *testing.T) { - svc := NewInputService3ProtocolTest(nil) - svc.Endpoint = "https://test" - - input := &InputService3TestShapeInputShape{ - ListArg: []*string{}, - } - req, _ := svc.InputService3TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - assert.Equal(t, util.Trim(`Action=OperationName&ListArg=&Version=2014-01-01`), util.Trim(string(body))) - - // assert URL - assert.Equal(t, "https://test/", r.URL.String()) - - // assert headers - -} - func TestInputService4ProtocolTestFlattenedListCase1(t *testing.T) { svc := NewInputService4ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService4TestShapeInputShape{ + input := &InputService4TestShapeInputService4TestCaseOperation1Input{ ListArg: []*string{ aws.String("a"), aws.String("b"), @@ -1180,15 +1021,19 @@ func TestInputService4ProtocolTestFlattenedListCase1(t *testing.T) { } -func TestInputService4ProtocolTestFlattenedListCase2(t *testing.T) { - svc := NewInputService4ProtocolTest(nil) +func TestInputService5ProtocolTestFlattenedListWithLocationNameCase1(t *testing.T) { + svc := NewInputService5ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService4TestShapeInputShape{ - ListArg: []*string{}, + input := &InputService5TestShapeInputService5TestCaseOperation1Input{ + ListArg: []*string{ + aws.String("a"), + aws.String("b"), + aws.String("c"), + }, ScalarArg: aws.String("foo"), } - req, _ := svc.InputService4TestCaseOperation2Request(input) + req, _ := svc.InputService5TestCaseOperation1Request(input) r := req.HTTPRequest // build request @@ -1198,7 +1043,7 @@ func TestInputService4ProtocolTestFlattenedListCase2(t *testing.T) { // assert body assert.NotNil(t, r.Body) body, _ := ioutil.ReadAll(r.Body) - assert.Equal(t, util.Trim(`Action=OperationName&ListArg=&ScalarArg=foo&Version=2014-01-01`), util.Trim(string(body))) + assert.Equal(t, util.Trim(`Action=OperationName&ListArgLocation.1=a&ListArgLocation.2=b&ListArgLocation.3=c&ScalarArg=foo&Version=2014-01-01`), util.Trim(string(body))) // assert URL assert.Equal(t, "https://test/", r.URL.String()) @@ -1207,17 +1052,17 @@ func TestInputService4ProtocolTestFlattenedListCase2(t *testing.T) { } -func TestInputService5ProtocolTestSerializeMapTypeCase1(t *testing.T) { - svc := NewInputService5ProtocolTest(nil) +func TestInputService6ProtocolTestSerializeMapTypeCase1(t *testing.T) { + svc := NewInputService6ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService5TestShapeInputShape{ + input := &InputService6TestShapeInputService6TestCaseOperation1Input{ MapArg: map[string]*string{ "key1": aws.String("val1"), "key2": aws.String("val2"), }, } - req, _ := svc.InputService5TestCaseOperation1Request(input) + req, _ := svc.InputService6TestCaseOperation1Request(input) r := req.HTTPRequest // build request @@ -1236,66 +1081,11 @@ func TestInputService5ProtocolTestSerializeMapTypeCase1(t *testing.T) { } -func TestInputService5ProtocolTestSerializeMapTypeCase2(t *testing.T) { - svc := NewInputService5ProtocolTest(nil) - svc.Endpoint = "https://test" - - input := &InputService5TestShapeInputShape{ - MapArg: map[string]*string{}, - } - req, _ := svc.InputService5TestCaseOperation2Request(input) - r := req.HTTPRequest - - // build request - query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - assert.Equal(t, util.Trim(`Action=OperationName&MapArg=&Version=2014-01-01`), util.Trim(string(body))) - - // assert URL - assert.Equal(t, "https://test/", r.URL.String()) - - // assert headers - -} - -func TestInputService6ProtocolTestSerializeMapTypeWithLocationNameCase1(t *testing.T) { - svc := NewInputService6ProtocolTest(nil) - svc.Endpoint = "https://test" - - input := &InputService6TestShapeInputShape{ - MapArg: map[string]*string{ - "key1": aws.String("val1"), - "key2": aws.String("val2"), - }, - } - req, _ := svc.InputService6TestCaseOperation1Request(input) - r := req.HTTPRequest - - // build request - query.Build(req) - assert.NoError(t, req.Error) - - // assert body - assert.NotNil(t, r.Body) - body, _ := ioutil.ReadAll(r.Body) - assert.Equal(t, util.Trim(`Action=OperationName&MapArg.entry.1.TheKey=key1&MapArg.entry.1.TheValue=val1&MapArg.entry.2.TheKey=key2&MapArg.entry.2.TheValue=val2&Version=2014-01-01`), util.Trim(string(body))) - - // assert URL - assert.Equal(t, "https://test/", r.URL.String()) - - // assert headers - -} - func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) { svc := NewInputService7ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService7TestShapeInputShape{ + input := &InputService7TestShapeInputService7TestCaseOperation1Input{ BlobArg: []byte("foo"), } req, _ := svc.InputService7TestCaseOperation1Request(input) @@ -1321,7 +1111,7 @@ func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) { svc := NewInputService8ProtocolTest(nil) svc.Endpoint = "https://test" - input := &InputService8TestShapeInputShape{ + input := &InputService8TestShapeInputService8TestCaseOperation1Input{ TimeArg: aws.Time(time.Unix(1422172800, 0)), } req, _ := svc.InputService8TestCaseOperation1Request(input) @@ -1442,10 +1232,10 @@ func TestInputService9ProtocolTestRecursiveShapesCase4(t *testing.T) { input := &InputService9TestShapeInputShape{ RecursiveStruct: &InputService9TestShapeRecursiveStructType{ RecursiveList: []*InputService9TestShapeRecursiveStructType{ - &InputService9TestShapeRecursiveStructType{ + { NoRecurse: aws.String("foo"), }, - &InputService9TestShapeRecursiveStructType{ + { NoRecurse: aws.String("bar"), }, }, @@ -1477,10 +1267,10 @@ func TestInputService9ProtocolTestRecursiveShapesCase5(t *testing.T) { input := &InputService9TestShapeInputShape{ RecursiveStruct: &InputService9TestShapeRecursiveStructType{ RecursiveList: []*InputService9TestShapeRecursiveStructType{ - &InputService9TestShapeRecursiveStructType{ + { NoRecurse: aws.String("foo"), }, - &InputService9TestShapeRecursiveStructType{ + { RecursiveStruct: &InputService9TestShapeRecursiveStructType{ NoRecurse: aws.String("bar"), }, @@ -1514,10 +1304,10 @@ func TestInputService9ProtocolTestRecursiveShapesCase6(t *testing.T) { input := &InputService9TestShapeInputShape{ RecursiveStruct: &InputService9TestShapeRecursiveStructType{ RecursiveMap: map[string]*InputService9TestShapeRecursiveStructType{ - "bar": &InputService9TestShapeRecursiveStructType{ + "bar": { NoRecurse: aws.String("bar"), }, - "foo": &InputService9TestShapeRecursiveStructType{ + "foo": { NoRecurse: aws.String("foo"), }, }, diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal.go index 8acdd2274c3..a374f88b14f 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/internal/protocol/query/unmarshal.go @@ -5,25 +5,25 @@ package query import ( "encoding/xml" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/apierr" + "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" ) // Unmarshal unmarshals a response for an AWS Query service. -func Unmarshal(r *aws.Request) { +func Unmarshal(r *request.Request) { defer r.HTTPResponse.Body.Close() if r.DataFilled() { decoder := xml.NewDecoder(r.HTTPResponse.Body) err := xmlutil.UnmarshalXML(r.Data, decoder, r.Operation.Name+"Result") if err != nil { - r.Error = apierr.New("Unmarshal", "failed decoding Query response", err) + r.Error = awserr.New("SerializationError", "failed decoding Query response", err) return } } } // UnmarshalMeta unmarshals header response values for an AWS Query service. -func UnmarshalMeta(r *aws.Request) { +func UnmarshalMeta(r *request.Request) { // TODO implement unmarshaling of request IDs } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go index deb529524aa..08609d92088 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_error.go @@ -4,8 +4,8 @@ import ( "encoding/xml" "io" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" ) type xmlErrorResponse struct { @@ -16,16 +16,16 @@ type xmlErrorResponse struct { } // UnmarshalError unmarshals an error response for an AWS Query service. -func UnmarshalError(r *aws.Request) { +func UnmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() resp := &xmlErrorResponse{} err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) if err != nil && err != io.EOF { - r.Error = apierr.New("Unmarshal", "failed to decode query XML error response", err) + r.Error = awserr.New("SerializationError", "failed to decode query XML error response", err) } else { - r.Error = apierr.NewRequestError( - apierr.New(resp.Code, resp.Message, nil), + r.Error = awserr.NewRequestFailure( + awserr.New(resp.Code, resp.Message, nil), r.HTTPResponse.StatusCode, resp.RequestID, ) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_test.go index a17f56ccd58..a0dcfc43adb 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/query/unmarshal_test.go @@ -1,10 +1,6 @@ package query_test import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/protocol/query" - "github.com/aws/aws-sdk-go/internal/signer/v4" - "bytes" "encoding/json" "encoding/xml" @@ -15,7 +11,14 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/defaults" + "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/protocol/xml/xmlutil" + "github.com/aws/aws-sdk-go/internal/signer/v4" "github.com/aws/aws-sdk-go/internal/util" "github.com/stretchr/testify/assert" ) @@ -31,17 +34,18 @@ var _ = util.Trim("") var _ = url.Values{} var _ = io.EOF -// OutputService1ProtocolTest is a client for OutputService1ProtocolTest. type OutputService1ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService1ProtocolTest client. func NewOutputService1ProtocolTest(config *aws.Config) *OutputService1ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice1protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice1protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -57,39 +61,36 @@ func NewOutputService1ProtocolTest(config *aws.Config) *OutputService1ProtocolTe // newRequest creates a new request for a OutputService1ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService1ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation. -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *aws.Request, output *OutputService1TestShapeOutputShape) { +const opOutputService1TestCaseOperation1 = "OperationName" - if opOutputService1TestCaseOperation1 == nil { - opOutputService1TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation. +func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *request.Request, output *OutputService1TestShapeOutputService1TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService1TestCaseOperation1, } if input == nil { input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{} } - req = c.newRequest(opOutputService1TestCaseOperation1, input, output) - output = &OutputService1TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService1TestShapeOutputService1TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputShape, error) { +func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputService1TestCaseOperation1Output, error) { req, out := c.OutputService1TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService1TestCaseOperation1 *aws.Operation - type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { metadataOutputService1TestShapeOutputService1TestCaseOperation1Input `json:"-" xml:"-"` } @@ -98,7 +99,7 @@ type metadataOutputService1TestShapeOutputService1TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService1TestShapeOutputShape struct { +type OutputService1TestShapeOutputService1TestCaseOperation1Output struct { Char *string `type:"character"` Double *float64 `type:"double"` @@ -117,24 +118,25 @@ type OutputService1TestShapeOutputShape struct { TrueBool *bool `type:"boolean"` - metadataOutputService1TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService1TestShapeOutputService1TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService1TestShapeOutputShape struct { +type metadataOutputService1TestShapeOutputService1TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService2ProtocolTest is a client for OutputService2ProtocolTest. type OutputService2ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService2ProtocolTest client. func NewOutputService2ProtocolTest(config *aws.Config) *OutputService2ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice2protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice2protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -150,39 +152,36 @@ func NewOutputService2ProtocolTest(config *aws.Config) *OutputService2ProtocolTe // newRequest creates a new request for a OutputService2ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService2ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation. -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *aws.Request, output *OutputService2TestShapeOutputShape) { +const opOutputService2TestCaseOperation1 = "OperationName" - if opOutputService2TestCaseOperation1 == nil { - opOutputService2TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation. +func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *request.Request, output *OutputService2TestShapeOutputService2TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService2TestCaseOperation1, } if input == nil { input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{} } - req = c.newRequest(opOutputService2TestCaseOperation1, input, output) - output = &OutputService2TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService2TestShapeOutputService2TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputShape, error) { +func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputService2TestCaseOperation1Output, error) { req, out := c.OutputService2TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService2TestCaseOperation1 *aws.Operation - type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { metadataOutputService2TestShapeOutputService2TestCaseOperation1Input `json:"-" xml:"-"` } @@ -191,29 +190,30 @@ type metadataOutputService2TestShapeOutputService2TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService2TestShapeOutputShape struct { +type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { Num *int64 `type:"integer"` Str *string `type:"string"` - metadataOutputService2TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService2TestShapeOutputService2TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService2TestShapeOutputShape struct { +type metadataOutputService2TestShapeOutputService2TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService3ProtocolTest is a client for OutputService3ProtocolTest. type OutputService3ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService3ProtocolTest client. func NewOutputService3ProtocolTest(config *aws.Config) *OutputService3ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice3protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice3protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -229,39 +229,36 @@ func NewOutputService3ProtocolTest(config *aws.Config) *OutputService3ProtocolTe // newRequest creates a new request for a OutputService3ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService3ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation. -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *aws.Request, output *OutputService3TestShapeOutputShape) { +const opOutputService3TestCaseOperation1 = "OperationName" - if opOutputService3TestCaseOperation1 == nil { - opOutputService3TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation. +func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *request.Request, output *OutputService3TestShapeOutputService3TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService3TestCaseOperation1, } if input == nil { input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{} } - req = c.newRequest(opOutputService3TestCaseOperation1, input, output) - output = &OutputService3TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService3TestShapeOutputService3TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputShape, error) { +func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputService3TestCaseOperation1Output, error) { req, out := c.OutputService3TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService3TestCaseOperation1 *aws.Operation - type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { metadataOutputService3TestShapeOutputService3TestCaseOperation1Input `json:"-" xml:"-"` } @@ -270,27 +267,28 @@ type metadataOutputService3TestShapeOutputService3TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService3TestShapeOutputShape struct { +type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { Blob []byte `type:"blob"` - metadataOutputService3TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService3TestShapeOutputService3TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService3TestShapeOutputShape struct { +type metadataOutputService3TestShapeOutputService3TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService4ProtocolTest is a client for OutputService4ProtocolTest. type OutputService4ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService4ProtocolTest client. func NewOutputService4ProtocolTest(config *aws.Config) *OutputService4ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice4protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice4protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -306,39 +304,36 @@ func NewOutputService4ProtocolTest(config *aws.Config) *OutputService4ProtocolTe // newRequest creates a new request for a OutputService4ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService4ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation. -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *aws.Request, output *OutputService4TestShapeOutputShape) { +const opOutputService4TestCaseOperation1 = "OperationName" - if opOutputService4TestCaseOperation1 == nil { - opOutputService4TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation. +func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *request.Request, output *OutputService4TestShapeOutputService4TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService4TestCaseOperation1, } if input == nil { input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{} } - req = c.newRequest(opOutputService4TestCaseOperation1, input, output) - output = &OutputService4TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService4TestShapeOutputService4TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputShape, error) { +func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputService4TestCaseOperation1Output, error) { req, out := c.OutputService4TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService4TestCaseOperation1 *aws.Operation - type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { metadataOutputService4TestShapeOutputService4TestCaseOperation1Input `json:"-" xml:"-"` } @@ -347,27 +342,28 @@ type metadataOutputService4TestShapeOutputService4TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService4TestShapeOutputShape struct { +type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { ListMember []*string `type:"list"` - metadataOutputService4TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService4TestShapeOutputService4TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService4TestShapeOutputShape struct { +type metadataOutputService4TestShapeOutputService4TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService5ProtocolTest is a client for OutputService5ProtocolTest. type OutputService5ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService5ProtocolTest client. func NewOutputService5ProtocolTest(config *aws.Config) *OutputService5ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice5protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice5protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -383,39 +379,36 @@ func NewOutputService5ProtocolTest(config *aws.Config) *OutputService5ProtocolTe // newRequest creates a new request for a OutputService5ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService5ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation. -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *aws.Request, output *OutputService5TestShapeOutputShape) { +const opOutputService5TestCaseOperation1 = "OperationName" - if opOutputService5TestCaseOperation1 == nil { - opOutputService5TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation. +func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *request.Request, output *OutputService5TestShapeOutputService5TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService5TestCaseOperation1, } if input == nil { input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{} } - req = c.newRequest(opOutputService5TestCaseOperation1, input, output) - output = &OutputService5TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService5TestShapeOutputService5TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputShape, error) { +func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputService5TestCaseOperation1Output, error) { req, out := c.OutputService5TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService5TestCaseOperation1 *aws.Operation - type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { metadataOutputService5TestShapeOutputService5TestCaseOperation1Input `json:"-" xml:"-"` } @@ -424,27 +417,28 @@ type metadataOutputService5TestShapeOutputService5TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService5TestShapeOutputShape struct { +type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { ListMember []*string `locationNameList:"item" type:"list"` - metadataOutputService5TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService5TestShapeOutputService5TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService5TestShapeOutputShape struct { +type metadataOutputService5TestShapeOutputService5TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService6ProtocolTest is a client for OutputService6ProtocolTest. type OutputService6ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService6ProtocolTest client. func NewOutputService6ProtocolTest(config *aws.Config) *OutputService6ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice6protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice6protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -460,39 +454,36 @@ func NewOutputService6ProtocolTest(config *aws.Config) *OutputService6ProtocolTe // newRequest creates a new request for a OutputService6ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService6ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation. -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *aws.Request, output *OutputService6TestShapeOutputShape) { +const opOutputService6TestCaseOperation1 = "OperationName" - if opOutputService6TestCaseOperation1 == nil { - opOutputService6TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation. +func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *request.Request, output *OutputService6TestShapeOutputService6TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService6TestCaseOperation1, } if input == nil { input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{} } - req = c.newRequest(opOutputService6TestCaseOperation1, input, output) - output = &OutputService6TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService6TestShapeOutputService6TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputShape, error) { +func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputService6TestCaseOperation1Output, error) { req, out := c.OutputService6TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService6TestCaseOperation1 *aws.Operation - type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { metadataOutputService6TestShapeOutputService6TestCaseOperation1Input `json:"-" xml:"-"` } @@ -501,27 +492,28 @@ type metadataOutputService6TestShapeOutputService6TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService6TestShapeOutputShape struct { +type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { ListMember []*string `type:"list" flattened:"true"` - metadataOutputService6TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService6TestShapeOutputService6TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService6TestShapeOutputShape struct { +type metadataOutputService6TestShapeOutputService6TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService7ProtocolTest is a client for OutputService7ProtocolTest. type OutputService7ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService7ProtocolTest client. func NewOutputService7ProtocolTest(config *aws.Config) *OutputService7ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice7protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice7protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -537,39 +529,36 @@ func NewOutputService7ProtocolTest(config *aws.Config) *OutputService7ProtocolTe // newRequest creates a new request for a OutputService7ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService7ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation. -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *aws.Request, output *OutputService7TestShapeOutputShape) { +const opOutputService7TestCaseOperation1 = "OperationName" - if opOutputService7TestCaseOperation1 == nil { - opOutputService7TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation. +func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *request.Request, output *OutputService7TestShapeOutputService7TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService7TestCaseOperation1, } if input == nil { input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{} } - req = c.newRequest(opOutputService7TestCaseOperation1, input, output) - output = &OutputService7TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService7TestShapeOutputService7TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputShape, error) { +func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputService7TestCaseOperation1Output, error) { req, out := c.OutputService7TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService7TestCaseOperation1 *aws.Operation - type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { metadataOutputService7TestShapeOutputService7TestCaseOperation1Input `json:"-" xml:"-"` } @@ -578,27 +567,28 @@ type metadataOutputService7TestShapeOutputService7TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService7TestShapeOutputShape struct { +type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { ListMember []*string `type:"list" flattened:"true"` - metadataOutputService7TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService7TestShapeOutputService7TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService7TestShapeOutputShape struct { +type metadataOutputService7TestShapeOutputService7TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService8ProtocolTest is a client for OutputService8ProtocolTest. type OutputService8ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService8ProtocolTest client. func NewOutputService8ProtocolTest(config *aws.Config) *OutputService8ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice8protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice8protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -614,39 +604,36 @@ func NewOutputService8ProtocolTest(config *aws.Config) *OutputService8ProtocolTe // newRequest creates a new request for a OutputService8ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService8ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation. -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *aws.Request, output *OutputService8TestShapeOutputShape) { +const opOutputService8TestCaseOperation1 = "OperationName" - if opOutputService8TestCaseOperation1 == nil { - opOutputService8TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation. +func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *request.Request, output *OutputService8TestShapeOutputService8TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService8TestCaseOperation1, } if input == nil { input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{} } - req = c.newRequest(opOutputService8TestCaseOperation1, input, output) - output = &OutputService8TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService8TestShapeOutputService8TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputShape, error) { +func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputService8TestCaseOperation1Output, error) { req, out := c.OutputService8TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService8TestCaseOperation1 *aws.Operation - type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { metadataOutputService8TestShapeOutputService8TestCaseOperation1Input `json:"-" xml:"-"` } @@ -655,13 +642,13 @@ type metadataOutputService8TestShapeOutputService8TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService8TestShapeOutputShape struct { +type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { List []*OutputService8TestShapeStructureShape `type:"list"` - metadataOutputService8TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService8TestShapeOutputService8TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService8TestShapeOutputShape struct { +type metadataOutputService8TestShapeOutputService8TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } @@ -679,17 +666,18 @@ type metadataOutputService8TestShapeStructureShape struct { SDKShapeTraits bool `type:"structure"` } -// OutputService9ProtocolTest is a client for OutputService9ProtocolTest. type OutputService9ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService9ProtocolTest client. func NewOutputService9ProtocolTest(config *aws.Config) *OutputService9ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice9protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice9protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -705,39 +693,36 @@ func NewOutputService9ProtocolTest(config *aws.Config) *OutputService9ProtocolTe // newRequest creates a new request for a OutputService9ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService9ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService9ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService9TestCaseOperation1Request generates a request for the OutputService9TestCaseOperation1 operation. -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *aws.Request, output *OutputService9TestShapeOutputShape) { +const opOutputService9TestCaseOperation1 = "OperationName" - if opOutputService9TestCaseOperation1 == nil { - opOutputService9TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService9TestCaseOperation1Request generates a request for the OutputService9TestCaseOperation1 operation. +func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1Request(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (req *request.Request, output *OutputService9TestShapeOutputService9TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService9TestCaseOperation1, } if input == nil { input = &OutputService9TestShapeOutputService9TestCaseOperation1Input{} } - req = c.newRequest(opOutputService9TestCaseOperation1, input, output) - output = &OutputService9TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService9TestShapeOutputService9TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputShape, error) { +func (c *OutputService9ProtocolTest) OutputService9TestCaseOperation1(input *OutputService9TestShapeOutputService9TestCaseOperation1Input) (*OutputService9TestShapeOutputService9TestCaseOperation1Output, error) { req, out := c.OutputService9TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService9TestCaseOperation1 *aws.Operation - type OutputService9TestShapeOutputService9TestCaseOperation1Input struct { metadataOutputService9TestShapeOutputService9TestCaseOperation1Input `json:"-" xml:"-"` } @@ -746,13 +731,13 @@ type metadataOutputService9TestShapeOutputService9TestCaseOperation1Input struct SDKShapeTraits bool `type:"structure"` } -type OutputService9TestShapeOutputShape struct { +type OutputService9TestShapeOutputService9TestCaseOperation1Output struct { List []*OutputService9TestShapeStructureShape `type:"list" flattened:"true"` - metadataOutputService9TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService9TestShapeOutputService9TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService9TestShapeOutputShape struct { +type metadataOutputService9TestShapeOutputService9TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } @@ -770,17 +755,18 @@ type metadataOutputService9TestShapeStructureShape struct { SDKShapeTraits bool `type:"structure"` } -// OutputService10ProtocolTest is a client for OutputService10ProtocolTest. type OutputService10ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService10ProtocolTest client. func NewOutputService10ProtocolTest(config *aws.Config) *OutputService10ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice10protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice10protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -796,39 +782,36 @@ func NewOutputService10ProtocolTest(config *aws.Config) *OutputService10Protocol // newRequest creates a new request for a OutputService10ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService10ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService10ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService10TestCaseOperation1Request generates a request for the OutputService10TestCaseOperation1 operation. -func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *aws.Request, output *OutputService10TestShapeOutputShape) { +const opOutputService10TestCaseOperation1 = "OperationName" - if opOutputService10TestCaseOperation1 == nil { - opOutputService10TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService10TestCaseOperation1Request generates a request for the OutputService10TestCaseOperation1 operation. +func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1Request(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (req *request.Request, output *OutputService10TestShapeOutputService10TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService10TestCaseOperation1, } if input == nil { input = &OutputService10TestShapeOutputService10TestCaseOperation1Input{} } - req = c.newRequest(opOutputService10TestCaseOperation1, input, output) - output = &OutputService10TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService10TestShapeOutputService10TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputShape, error) { +func (c *OutputService10ProtocolTest) OutputService10TestCaseOperation1(input *OutputService10TestShapeOutputService10TestCaseOperation1Input) (*OutputService10TestShapeOutputService10TestCaseOperation1Output, error) { req, out := c.OutputService10TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService10TestCaseOperation1 *aws.Operation - type OutputService10TestShapeOutputService10TestCaseOperation1Input struct { metadataOutputService10TestShapeOutputService10TestCaseOperation1Input `json:"-" xml:"-"` } @@ -837,27 +820,28 @@ type metadataOutputService10TestShapeOutputService10TestCaseOperation1Input stru SDKShapeTraits bool `type:"structure"` } -type OutputService10TestShapeOutputShape struct { +type OutputService10TestShapeOutputService10TestCaseOperation1Output struct { List []*string `locationNameList:"NamedList" type:"list" flattened:"true"` - metadataOutputService10TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService10TestShapeOutputService10TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService10TestShapeOutputShape struct { +type metadataOutputService10TestShapeOutputService10TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService11ProtocolTest is a client for OutputService11ProtocolTest. type OutputService11ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService11ProtocolTest client. func NewOutputService11ProtocolTest(config *aws.Config) *OutputService11ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice11protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice11protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -873,39 +857,36 @@ func NewOutputService11ProtocolTest(config *aws.Config) *OutputService11Protocol // newRequest creates a new request for a OutputService11ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService11ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService11ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService11TestCaseOperation1Request generates a request for the OutputService11TestCaseOperation1 operation. -func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *aws.Request, output *OutputService11TestShapeOutputShape) { +const opOutputService11TestCaseOperation1 = "OperationName" - if opOutputService11TestCaseOperation1 == nil { - opOutputService11TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService11TestCaseOperation1Request generates a request for the OutputService11TestCaseOperation1 operation. +func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1Request(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (req *request.Request, output *OutputService11TestShapeOutputService11TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService11TestCaseOperation1, } if input == nil { input = &OutputService11TestShapeOutputService11TestCaseOperation1Input{} } - req = c.newRequest(opOutputService11TestCaseOperation1, input, output) - output = &OutputService11TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService11TestShapeOutputService11TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputShape, error) { +func (c *OutputService11ProtocolTest) OutputService11TestCaseOperation1(input *OutputService11TestShapeOutputService11TestCaseOperation1Input) (*OutputService11TestShapeOutputService11TestCaseOperation1Output, error) { req, out := c.OutputService11TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService11TestCaseOperation1 *aws.Operation - type OutputService11TestShapeOutputService11TestCaseOperation1Input struct { metadataOutputService11TestShapeOutputService11TestCaseOperation1Input `json:"-" xml:"-"` } @@ -914,13 +895,13 @@ type metadataOutputService11TestShapeOutputService11TestCaseOperation1Input stru SDKShapeTraits bool `type:"structure"` } -type OutputService11TestShapeOutputShape struct { +type OutputService11TestShapeOutputService11TestCaseOperation1Output struct { Map map[string]*OutputService11TestShapeStructType `type:"map"` - metadataOutputService11TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService11TestShapeOutputService11TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService11TestShapeOutputShape struct { +type metadataOutputService11TestShapeOutputService11TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } @@ -934,17 +915,18 @@ type metadataOutputService11TestShapeStructType struct { SDKShapeTraits bool `type:"structure"` } -// OutputService12ProtocolTest is a client for OutputService12ProtocolTest. type OutputService12ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService12ProtocolTest client. func NewOutputService12ProtocolTest(config *aws.Config) *OutputService12ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice12protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice12protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -960,39 +942,36 @@ func NewOutputService12ProtocolTest(config *aws.Config) *OutputService12Protocol // newRequest creates a new request for a OutputService12ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService12ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService12ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService12TestCaseOperation1Request generates a request for the OutputService12TestCaseOperation1 operation. -func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *aws.Request, output *OutputService12TestShapeOutputShape) { +const opOutputService12TestCaseOperation1 = "OperationName" - if opOutputService12TestCaseOperation1 == nil { - opOutputService12TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService12TestCaseOperation1Request generates a request for the OutputService12TestCaseOperation1 operation. +func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1Request(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (req *request.Request, output *OutputService12TestShapeOutputService12TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService12TestCaseOperation1, } if input == nil { input = &OutputService12TestShapeOutputService12TestCaseOperation1Input{} } - req = c.newRequest(opOutputService12TestCaseOperation1, input, output) - output = &OutputService12TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService12TestShapeOutputService12TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputShape, error) { +func (c *OutputService12ProtocolTest) OutputService12TestCaseOperation1(input *OutputService12TestShapeOutputService12TestCaseOperation1Input) (*OutputService12TestShapeOutputService12TestCaseOperation1Output, error) { req, out := c.OutputService12TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService12TestCaseOperation1 *aws.Operation - type OutputService12TestShapeOutputService12TestCaseOperation1Input struct { metadataOutputService12TestShapeOutputService12TestCaseOperation1Input `json:"-" xml:"-"` } @@ -1001,27 +980,28 @@ type metadataOutputService12TestShapeOutputService12TestCaseOperation1Input stru SDKShapeTraits bool `type:"structure"` } -type OutputService12TestShapeOutputShape struct { +type OutputService12TestShapeOutputService12TestCaseOperation1Output struct { Map map[string]*string `type:"map" flattened:"true"` - metadataOutputService12TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService12TestShapeOutputService12TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService12TestShapeOutputShape struct { +type metadataOutputService12TestShapeOutputService12TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService13ProtocolTest is a client for OutputService13ProtocolTest. type OutputService13ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService13ProtocolTest client. func NewOutputService13ProtocolTest(config *aws.Config) *OutputService13ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice13protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice13protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -1037,39 +1017,36 @@ func NewOutputService13ProtocolTest(config *aws.Config) *OutputService13Protocol // newRequest creates a new request for a OutputService13ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService13ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService13ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService13TestCaseOperation1Request generates a request for the OutputService13TestCaseOperation1 operation. -func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1Request(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (req *aws.Request, output *OutputService13TestShapeOutputShape) { +const opOutputService13TestCaseOperation1 = "OperationName" - if opOutputService13TestCaseOperation1 == nil { - opOutputService13TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService13TestCaseOperation1Request generates a request for the OutputService13TestCaseOperation1 operation. +func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1Request(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (req *request.Request, output *OutputService13TestShapeOutputService13TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService13TestCaseOperation1, } if input == nil { input = &OutputService13TestShapeOutputService13TestCaseOperation1Input{} } - req = c.newRequest(opOutputService13TestCaseOperation1, input, output) - output = &OutputService13TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService13TestShapeOutputService13TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (*OutputService13TestShapeOutputShape, error) { +func (c *OutputService13ProtocolTest) OutputService13TestCaseOperation1(input *OutputService13TestShapeOutputService13TestCaseOperation1Input) (*OutputService13TestShapeOutputService13TestCaseOperation1Output, error) { req, out := c.OutputService13TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService13TestCaseOperation1 *aws.Operation - type OutputService13TestShapeOutputService13TestCaseOperation1Input struct { metadataOutputService13TestShapeOutputService13TestCaseOperation1Input `json:"-" xml:"-"` } @@ -1078,27 +1055,28 @@ type metadataOutputService13TestShapeOutputService13TestCaseOperation1Input stru SDKShapeTraits bool `type:"structure"` } -type OutputService13TestShapeOutputShape struct { +type OutputService13TestShapeOutputService13TestCaseOperation1Output struct { Map map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` - metadataOutputService13TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService13TestShapeOutputService13TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService13TestShapeOutputShape struct { +type metadataOutputService13TestShapeOutputService13TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } -// OutputService14ProtocolTest is a client for OutputService14ProtocolTest. type OutputService14ProtocolTest struct { - *aws.Service + *service.Service } // New returns a new OutputService14ProtocolTest client. func NewOutputService14ProtocolTest(config *aws.Config) *OutputService14ProtocolTest { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "outputservice14protocoltest", - APIVersion: "", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "outputservice14protocoltest", + APIVersion: "", + }, } service.Initialize() @@ -1114,39 +1092,36 @@ func NewOutputService14ProtocolTest(config *aws.Config) *OutputService14Protocol // newRequest creates a new request for a OutputService14ProtocolTest operation and runs any // custom request initialization. -func (c *OutputService14ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *OutputService14ProtocolTest) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) return req } -// OutputService14TestCaseOperation1Request generates a request for the OutputService14TestCaseOperation1 operation. -func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1Request(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (req *aws.Request, output *OutputService14TestShapeOutputShape) { +const opOutputService14TestCaseOperation1 = "OperationName" - if opOutputService14TestCaseOperation1 == nil { - opOutputService14TestCaseOperation1 = &aws.Operation{ - Name: "OperationName", - } +// OutputService14TestCaseOperation1Request generates a request for the OutputService14TestCaseOperation1 operation. +func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1Request(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (req *request.Request, output *OutputService14TestShapeOutputService14TestCaseOperation1Output) { + op := &request.Operation{ + Name: opOutputService14TestCaseOperation1, } if input == nil { input = &OutputService14TestShapeOutputService14TestCaseOperation1Input{} } - req = c.newRequest(opOutputService14TestCaseOperation1, input, output) - output = &OutputService14TestShapeOutputShape{} + req = c.newRequest(op, input, output) + output = &OutputService14TestShapeOutputService14TestCaseOperation1Output{} req.Data = output return } -func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (*OutputService14TestShapeOutputShape, error) { +func (c *OutputService14ProtocolTest) OutputService14TestCaseOperation1(input *OutputService14TestShapeOutputService14TestCaseOperation1Input) (*OutputService14TestShapeOutputService14TestCaseOperation1Output, error) { req, out := c.OutputService14TestCaseOperation1Request(input) err := req.Send() return out, err } -var opOutputService14TestCaseOperation1 *aws.Operation - type OutputService14TestShapeOutputService14TestCaseOperation1Input struct { metadataOutputService14TestShapeOutputService14TestCaseOperation1Input `json:"-" xml:"-"` } @@ -1155,13 +1130,13 @@ type metadataOutputService14TestShapeOutputService14TestCaseOperation1Input stru SDKShapeTraits bool `type:"structure"` } -type OutputService14TestShapeOutputShape struct { +type OutputService14TestShapeOutputService14TestCaseOperation1Output struct { Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"` - metadataOutputService14TestShapeOutputShape `json:"-" xml:"-"` + metadataOutputService14TestShapeOutputService14TestCaseOperation1Output `json:"-" xml:"-"` } -type metadataOutputService14TestShapeOutputShape struct { +type metadataOutputService14TestShapeOutputService14TestCaseOperation1Output struct { SDKShapeTraits bool `type:"structure"` } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/build.go index 38c4512bea1..326e96cc625 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/internal/protocol/rest/build.go @@ -1,4 +1,4 @@ -// Package rest provides RESTful serialisation of AWS requests and responses. +// Package rest provides RESTful serialization of AWS requests and responses. package rest import ( @@ -13,8 +13,8 @@ import ( "strings" "time" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" ) // RFC822 returns an RFC822 formatted timestamp for AWS protocols @@ -37,7 +37,7 @@ func init() { } // Build builds the REST component of a service request. -func Build(r *aws.Request) { +func Build(r *request.Request) { if r.ParamsFilled() { v := reflect.ValueOf(r.Params).Elem() buildLocationElements(r, v) @@ -45,7 +45,7 @@ func Build(r *aws.Request) { } } -func buildLocationElements(r *aws.Request, v reflect.Value) { +func buildLocationElements(r *request.Request, v reflect.Value) { query := r.HTTPRequest.URL.Query() for i := 0; i < v.NumField(); i++ { @@ -87,7 +87,7 @@ func buildLocationElements(r *aws.Request, v reflect.Value) { updatePath(r.HTTPRequest.URL, r.HTTPRequest.URL.Path) } -func buildBody(r *aws.Request, v reflect.Value) { +func buildBody(r *request.Request, v reflect.Value) { if field, ok := v.Type().FieldByName("SDKShapeTraits"); ok { if payloadName := field.Tag.Get("payload"); payloadName != "" { pfield, _ := v.Type().FieldByName(payloadName) @@ -102,7 +102,7 @@ func buildBody(r *aws.Request, v reflect.Value) { case string: r.SetStringBody(reader) default: - r.Error = apierr.New("Marshal", + r.Error = awserr.New("SerializationError", "failed to encode REST request", fmt.Errorf("unknown payload type %s", payload.Type())) } @@ -112,30 +112,30 @@ func buildBody(r *aws.Request, v reflect.Value) { } } -func buildHeader(r *aws.Request, v reflect.Value, name string) { +func buildHeader(r *request.Request, v reflect.Value, name string) { str, err := convertType(v) if err != nil { - r.Error = apierr.New("Marshal", "failed to encode REST request", err) + r.Error = awserr.New("SerializationError", "failed to encode REST request", err) } else if str != nil { r.HTTPRequest.Header.Add(name, *str) } } -func buildHeaderMap(r *aws.Request, v reflect.Value, prefix string) { +func buildHeaderMap(r *request.Request, v reflect.Value, prefix string) { for _, key := range v.MapKeys() { str, err := convertType(v.MapIndex(key)) if err != nil { - r.Error = apierr.New("Marshal", "failed to encode REST request", err) + r.Error = awserr.New("SerializationError", "failed to encode REST request", err) } else if str != nil { r.HTTPRequest.Header.Add(prefix+key.String(), *str) } } } -func buildURI(r *aws.Request, v reflect.Value, name string) { +func buildURI(r *request.Request, v reflect.Value, name string) { value, err := convertType(v) if err != nil { - r.Error = apierr.New("Marshal", "failed to encode REST request", err) + 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) @@ -144,10 +144,10 @@ func buildURI(r *aws.Request, v reflect.Value, name string) { } } -func buildQueryString(r *aws.Request, v reflect.Value, name string, query url.Values) { +func buildQueryString(r *request.Request, v reflect.Value, name string, query url.Values) { str, err := convertType(v) if err != nil { - r.Error = apierr.New("Marshal", "failed to encode REST request", err) + r.Error = awserr.New("SerializationError", "failed to encode REST request", err) } else if str != nil { query.Set(name, *str) } @@ -156,8 +156,13 @@ func buildQueryString(r *aws.Request, v reflect.Value, name string, query url.Va func updatePath(url *url.URL, urlPath string) { scheme, query := url.Scheme, url.RawQuery + hasSlash := strings.HasSuffix(urlPath, "/") + // clean up path urlPath = path.Clean(urlPath) + if hasSlash && !strings.HasSuffix(urlPath, "/") { + urlPath += "/" + } // get formatted URL minus scheme so we can build this into Opaque url.Scheme, url.Path, url.RawQuery = "", "", "" diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go index 009c5c95098..06d9accbacb 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/rest/unmarshal.go @@ -11,19 +11,28 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/internal/apierr" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" ) // Unmarshal unmarshals the REST component of a response in a REST service. -func Unmarshal(r *aws.Request) { +func Unmarshal(r *request.Request) { if r.DataFilled() { v := reflect.Indirect(reflect.ValueOf(r.Data)) unmarshalBody(r, v) + } +} + +// UnmarshalMeta unmarshals the REST metadata of a response in a REST service +func UnmarshalMeta(r *request.Request) { + r.RequestID = r.HTTPResponse.Header.Get("X-Amzn-Requestid") + if r.DataFilled() { + v := reflect.Indirect(reflect.ValueOf(r.Data)) unmarshalLocationElements(r, v) } } -func unmarshalBody(r *aws.Request, v reflect.Value) { +func unmarshalBody(r *request.Request, v reflect.Value) { if field, ok := v.Type().FieldByName("SDKShapeTraits"); ok { if payloadName := field.Tag.Get("payload"); payloadName != "" { pfield, _ := v.Type().FieldByName(payloadName) @@ -34,14 +43,14 @@ func unmarshalBody(r *aws.Request, v reflect.Value) { case []byte: b, err := ioutil.ReadAll(r.HTTPResponse.Body) if err != nil { - r.Error = apierr.New("Unmarshal", "failed to decode REST response", err) + r.Error = awserr.New("SerializationError", "failed to decode REST response", err) } else { payload.Set(reflect.ValueOf(b)) } case *string: b, err := ioutil.ReadAll(r.HTTPResponse.Body) if err != nil { - r.Error = apierr.New("Unmarshal", "failed to decode REST response", err) + r.Error = awserr.New("SerializationError", "failed to decode REST response", err) } else { str := string(b) payload.Set(reflect.ValueOf(&str)) @@ -53,7 +62,7 @@ func unmarshalBody(r *aws.Request, v reflect.Value) { case "aws.ReadSeekCloser", "io.ReadCloser": payload.Set(reflect.ValueOf(r.HTTPResponse.Body)) default: - r.Error = apierr.New("Unmarshal", + r.Error = awserr.New("SerializationError", "failed to decode REST response", fmt.Errorf("unknown payload type %s", payload.Type())) } @@ -64,7 +73,7 @@ func unmarshalBody(r *aws.Request, v reflect.Value) { } } -func unmarshalLocationElements(r *aws.Request, v reflect.Value) { +func unmarshalLocationElements(r *request.Request, v reflect.Value) { for i := 0; i < v.NumField(); i++ { m, field := v.Field(i), v.Type().Field(i) if n := field.Name; n[0:1] == strings.ToLower(n[0:1]) { @@ -83,14 +92,14 @@ func unmarshalLocationElements(r *aws.Request, v reflect.Value) { case "header": err := unmarshalHeader(m, r.HTTPResponse.Header.Get(name)) if err != nil { - r.Error = apierr.New("Unmarshal", "failed to decode REST response", err) + r.Error = awserr.New("SerializationError", "failed to decode REST response", err) break } case "headers": prefix := field.Tag.Get("locationName") err := unmarshalHeaderMap(m, r.HTTPResponse.Header, prefix) if err != nil { - r.Error = apierr.New("Unmarshal", "failed to decode REST response", err) + r.Error = awserr.New("SerializationError", "failed to decode REST response", err) break } } 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/internal/protocol/xml/xmlutil/unmarshal.go index a7b7a60b2ec..5e4fe210b36 100644 --- 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/internal/protocol/xml/xmlutil/unmarshal.go @@ -114,7 +114,7 @@ func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) error { for _, a := range node.Attr { if name == a.Name.Local { // turn this into a text node for de-serializing - elems = []*XMLNode{&XMLNode{Text: a.Value}} + elems = []*XMLNode{{Text: a.Value}} } } } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4.go index 8efda142091..fc7bc35350e 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/internal/signer/v4/v4.go @@ -14,10 +14,10 @@ import ( "strings" "time" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/internal/protocol/rest" - "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" ) const ( @@ -34,18 +34,17 @@ var ignoredHeaders = map[string]bool{ } type signer struct { - Request *http.Request - Time time.Time - ExpireTime time.Duration - ServiceName string - Region string - AccessKeyID string - SecretAccessKey string - SessionToken string - Query url.Values - Body io.ReadSeeker - Debug uint - Logger io.Writer + Request *http.Request + Time time.Time + ExpireTime time.Duration + ServiceName string + Region string + CredValues credentials.Value + Credentials *credentials.Credentials + Query url.Values + Body io.ReadSeeker + Debug aws.LogLevelType + Logger aws.Logger isPresign bool formattedTime string @@ -65,21 +64,16 @@ type signer struct { // Will sign the requests with the service config's Credentials object // Signing is skipped if the credentials is the credentials.AnonymousCredentials // object. -func Sign(req *aws.Request) { +func Sign(req *request.Request) { // If the request does not need to be signed ignore the signing of the // request if the AnonymousCredentials object is used. if req.Service.Config.Credentials == credentials.AnonymousCredentials { return } - creds, err := req.Service.Config.Credentials.Get() - if err != nil { - req.Error = err - return - } region := req.Service.SigningRegion if region == "" { - region = req.Service.Config.Region + region = aws.StringValue(req.Service.Config.Region) } name := req.Service.SigningName @@ -88,53 +82,86 @@ func Sign(req *aws.Request) { } s := signer{ - Request: req.HTTPRequest, - Time: req.Time, - ExpireTime: req.ExpireTime, - Query: req.HTTPRequest.URL.Query(), - Body: req.Body, - ServiceName: name, - Region: region, - AccessKeyID: creds.AccessKeyID, - SecretAccessKey: creds.SecretAccessKey, - SessionToken: creds.SessionToken, - Debug: req.Service.Config.LogLevel, - Logger: req.Service.Config.Logger, + Request: req.HTTPRequest, + Time: req.Time, + ExpireTime: req.ExpireTime, + Query: req.HTTPRequest.URL.Query(), + Body: req.Body, + ServiceName: name, + Region: region, + Credentials: req.Service.Config.Credentials, + Debug: req.Service.Config.LogLevel.Value(), + Logger: req.Service.Config.Logger, } - s.sign() - return + + req.Error = s.sign() } -func (v4 *signer) sign() { +func (v4 *signer) sign() error { if v4.ExpireTime != 0 { v4.isPresign = true } + if v4.isRequestSigned() { + if !v4.Credentials.IsExpired() { + // If the request is already signed, and the credentials have not + // expired yet ignore the signing request. + return nil + } + + // The credentials have expired for this request. The current signing + // is invalid, and needs to be request because the request will fail. + if v4.isPresign { + v4.removePresign() + // Update the request's query string to ensure the values stays in + // sync in the case retrieving the new credentials fails. + v4.Request.URL.RawQuery = v4.Query.Encode() + } + } + + var err error + v4.CredValues, err = v4.Credentials.Get() + if err != nil { + return err + } + if v4.isPresign { v4.Query.Set("X-Amz-Algorithm", authHeaderPrefix) - if v4.SessionToken != "" { - v4.Query.Set("X-Amz-Security-Token", v4.SessionToken) + if v4.CredValues.SessionToken != "" { + v4.Query.Set("X-Amz-Security-Token", v4.CredValues.SessionToken) } else { v4.Query.Del("X-Amz-Security-Token") } - } else if v4.SessionToken != "" { - v4.Request.Header.Set("X-Amz-Security-Token", v4.SessionToken) + } else if v4.CredValues.SessionToken != "" { + v4.Request.Header.Set("X-Amz-Security-Token", v4.CredValues.SessionToken) } v4.build() - if v4.Debug > 0 { - out := v4.Logger - fmt.Fprintf(out, "---[ CANONICAL STRING ]-----------------------------\n") - fmt.Fprintln(out, v4.canonicalString) - fmt.Fprintf(out, "---[ STRING TO SIGN ]--------------------------------\n") - fmt.Fprintln(out, v4.stringToSign) - if v4.isPresign { - fmt.Fprintf(out, "---[ SIGNED URL ]--------------------------------\n") - fmt.Fprintln(out, v4.Request.URL) - } - fmt.Fprintf(out, "-----------------------------------------------------\n") + if v4.Debug.Matches(aws.LogDebugWithSigning) { + v4.logSigningInfo() } + + return nil +} + +const logSignInfoMsg = `DEBUG: Request Signiture: +---[ CANONICAL STRING ]----------------------------- +%s +---[ STRING TO SIGN ]-------------------------------- +%s%s +-----------------------------------------------------` +const logSignedURLMsg = ` +---[ SIGNED URL ]------------------------------------ +%s` + +func (v4 *signer) logSigningInfo() { + signedURLMsg := "" + if v4.isPresign { + signedURLMsg = fmt.Sprintf(logSignedURLMsg, v4.Request.URL.String()) + } + msg := fmt.Sprintf(logSignInfoMsg, v4.canonicalString, v4.stringToSign, signedURLMsg) + v4.Logger.Log(msg) } func (v4 *signer) build() { @@ -152,7 +179,7 @@ func (v4 *signer) build() { v4.Request.URL.RawQuery += "&X-Amz-Signature=" + v4.signature } else { parts := []string{ - authHeaderPrefix + " Credential=" + v4.AccessKeyID + "/" + v4.credentialString, + authHeaderPrefix + " Credential=" + v4.CredValues.AccessKeyID + "/" + v4.credentialString, "SignedHeaders=" + v4.signedHeaders, "Signature=" + v4.signature, } @@ -182,7 +209,7 @@ func (v4 *signer) buildCredentialString() { }, "/") if v4.isPresign { - v4.Query.Set("X-Amz-Credential", v4.AccessKeyID+"/"+v4.credentialString) + v4.Query.Set("X-Amz-Credential", v4.CredValues.AccessKeyID+"/"+v4.credentialString) } } @@ -269,7 +296,7 @@ func (v4 *signer) buildStringToSign() { } func (v4 *signer) buildSignature() { - secret := v4.SecretAccessKey + secret := v4.CredValues.SecretAccessKey date := makeHmac([]byte("AWS4"+secret), []byte(v4.formattedShortTime)) region := makeHmac(date, []byte(v4.Region)) service := makeHmac(region, []byte(v4.ServiceName)) @@ -293,6 +320,29 @@ func (v4 *signer) bodyDigest() string { return hash } +// isRequestSigned returns if the request is currently signed or presigned +func (v4 *signer) isRequestSigned() bool { + if v4.isPresign && v4.Query.Get("X-Amz-Signature") != "" { + return true + } + if v4.Request.Header.Get("Authorization") != "" { + return true + } + + return false +} + +// unsign removes signing flags for both signed and presigned requests. +func (v4 *signer) removePresign() { + v4.Query.Del("X-Amz-Algorithm") + v4.Query.Del("X-Amz-Signature") + v4.Query.Del("X-Amz-Security-Token") + v4.Query.Del("X-Amz-Date") + v4.Query.Del("X-Amz-Expires") + v4.Query.Del("X-Amz-Credential") + v4.Query.Del("X-Amz-SignedHeaders") +} + func makeHmac(key []byte, data []byte) []byte { hash := hmac.New(sha256.New, key) hash.Write(data) @@ -306,21 +356,10 @@ func makeSha256(data []byte) []byte { } func makeSha256Reader(reader io.ReadSeeker) []byte { - packet := make([]byte, 4096) hash := sha256.New() - start, _ := reader.Seek(0, 1) defer reader.Seek(start, 0) - for { - n, err := reader.Read(packet) - if n > 0 { - hash.Write(packet[0:n]) - } - if err == io.EOF || n == 0 { - break - } - } - + io.Copy(hash, reader) return hash.Sum(nil) } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4_test.go index 20f655ac6c7..0ba9ff25f73 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/signer/v4/v4_test.go @@ -8,6 +8,8 @@ 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/aws/service" "github.com/stretchr/testify/assert" ) @@ -22,16 +24,14 @@ func buildSigner(serviceName string, region string, signTime time.Time, expireTi req.Header.Add("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)") return signer{ - Request: req, - Time: signTime, - ExpireTime: expireTime, - Query: req.URL.Query(), - Body: reader, - ServiceName: serviceName, - Region: region, - AccessKeyID: "AKID", - SecretAccessKey: "SECRET", - SessionToken: "SESSION", + Request: req, + Time: signTime, + ExpireTime: expireTime, + Query: req.URL.Query(), + Body: reader, + ServiceName: serviceName, + Region: region, + Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"), } } @@ -118,9 +118,9 @@ func TestSignPrecomputedBodyChecksum(t *testing.T) { } func TestAnonymousCredentials(t *testing.T) { - r := aws.NewRequest( - aws.NewService(&aws.Config{Credentials: credentials.AnonymousCredentials}), - &aws.Operation{ + svc := service.New(&aws.Config{Credentials: credentials.AnonymousCredentials}) + r := svc.NewRequest( + &request.Operation{ Name: "BatchGetItem", HTTPMethod: "POST", HTTPPath: "/", @@ -141,6 +141,97 @@ func TestAnonymousCredentials(t *testing.T) { assert.Empty(t, hQ.Get("X-Amz-Date")) } +func TestIgnoreResignRequestWithValidCreds(t *testing.T) { + svc := service.New(&aws.Config{ + Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"), + Region: aws.String("us-west-2"), + }) + r := svc.NewRequest( + &request.Operation{ + Name: "BatchGetItem", + HTTPMethod: "POST", + HTTPPath: "/", + }, + nil, + nil, + ) + + Sign(r) + sig := r.HTTPRequest.Header.Get("Authorization") + + Sign(r) + assert.Equal(t, sig, r.HTTPRequest.Header.Get("Authorization")) +} + +func TestIgnorePreResignRequestWithValidCreds(t *testing.T) { + svc := service.New(&aws.Config{ + Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"), + Region: aws.String("us-west-2"), + }) + r := svc.NewRequest( + &request.Operation{ + Name: "BatchGetItem", + HTTPMethod: "POST", + HTTPPath: "/", + }, + nil, + nil, + ) + r.ExpireTime = time.Minute * 10 + + Sign(r) + sig := r.HTTPRequest.Header.Get("X-Amz-Signature") + + Sign(r) + assert.Equal(t, sig, r.HTTPRequest.Header.Get("X-Amz-Signature")) +} + +func TestResignRequestExpiredCreds(t *testing.T) { + creds := credentials.NewStaticCredentials("AKID", "SECRET", "SESSION") + svc := service.New(&aws.Config{Credentials: creds}) + r := svc.NewRequest( + &request.Operation{ + Name: "BatchGetItem", + HTTPMethod: "POST", + HTTPPath: "/", + }, + nil, + nil, + ) + Sign(r) + querySig := r.HTTPRequest.Header.Get("Authorization") + + creds.Expire() + + Sign(r) + assert.NotEqual(t, querySig, r.HTTPRequest.Header.Get("Authorization")) +} + +func TestPreResignRequestExpiredCreds(t *testing.T) { + provider := &credentials.StaticProvider{credentials.Value{"AKID", "SECRET", "SESSION"}} + creds := credentials.NewCredentials(provider) + svc := service.New(&aws.Config{Credentials: creds}) + r := svc.NewRequest( + &request.Operation{ + Name: "BatchGetItem", + HTTPMethod: "POST", + HTTPPath: "/", + }, + nil, + nil, + ) + r.ExpireTime = time.Minute * 10 + + Sign(r) + querySig := r.HTTPRequest.URL.Query().Get("X-Amz-Signature") + + creds.Expire() + r.Time = time.Now().Add(time.Hour * 48) + + Sign(r) + assert.NotEqual(t, querySig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature")) +} + func BenchmarkPresignRequest(b *testing.B) { signer := buildSigner("dynamodb", "us-east-1", time.Now(), 300*time.Second, "{}") for i := 0; i < b.N; i++ { 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 7c1443e21f9..34f6d43759f 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 @@ -4,32 +4,27 @@ package autoscaling import ( - "sync" "time" - "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" ) -var oprw sync.Mutex +const opAttachInstances = "AttachInstances" // AttachInstancesRequest generates a request for the AttachInstances operation. -func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req *aws.Request, output *AttachInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAttachInstances == nil { - opAttachInstances = &aws.Operation{ - Name: "AttachInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req *request.Request, output *AttachInstancesOutput) { + op := &request.Operation{ + Name: opAttachInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AttachInstancesInput{} } - req = c.newRequest(opAttachInstances, input, output) + req = c.newRequest(op, input, output) output = &AttachInstancesOutput{} req.Data = output return @@ -37,8 +32,8 @@ func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req * // Attaches one or more EC2 instances to the specified Auto Scaling group. // -// For more information, see Attach Amazon EC2 Instances to Your Existing Auto -// Scaling Group (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/attach-instance-asg.html) +// For more information, see Attach EC2 Instances to Your Auto Scaling Group +// (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/attach-instance-asg.html) // in the Auto Scaling Developer Guide. func (c *AutoScaling) AttachInstances(input *AttachInstancesInput) (*AttachInstancesOutput, error) { req, out := c.AttachInstancesRequest(input) @@ -46,26 +41,55 @@ func (c *AutoScaling) AttachInstances(input *AttachInstancesInput) (*AttachInsta return out, err } -var opAttachInstances *aws.Operation +const opAttachLoadBalancers = "AttachLoadBalancers" + +// AttachLoadBalancersRequest generates a request for the AttachLoadBalancers operation. +func (c *AutoScaling) AttachLoadBalancersRequest(input *AttachLoadBalancersInput) (req *request.Request, output *AttachLoadBalancersOutput) { + op := &request.Operation{ + Name: opAttachLoadBalancers, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AttachLoadBalancersInput{} + } + + req = c.newRequest(op, input, output) + output = &AttachLoadBalancersOutput{} + req.Data = output + return +} + +// Attaches one or more load balancers to the specified Auto Scaling group. +// +// To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers. +// To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers. +// +// For more information, see Attach a Load Balancer to Your Auto Scaling Group +// (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/attach-load-balancer-asg.html) +// in the Auto Scaling Developer Guide. +func (c *AutoScaling) AttachLoadBalancers(input *AttachLoadBalancersInput) (*AttachLoadBalancersOutput, error) { + req, out := c.AttachLoadBalancersRequest(input) + err := req.Send() + return out, err +} + +const opCompleteLifecycleAction = "CompleteLifecycleAction" // CompleteLifecycleActionRequest generates a request for the CompleteLifecycleAction operation. -func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleActionInput) (req *aws.Request, output *CompleteLifecycleActionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCompleteLifecycleAction == nil { - opCompleteLifecycleAction = &aws.Operation{ - Name: "CompleteLifecycleAction", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleActionInput) (req *request.Request, output *CompleteLifecycleActionOutput) { + op := &request.Operation{ + Name: opCompleteLifecycleAction, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CompleteLifecycleActionInput{} } - req = c.newRequest(opCompleteLifecycleAction, input, output) + req = c.newRequest(op, input, output) output = &CompleteLifecycleActionOutput{} req.Data = output return @@ -92,26 +116,21 @@ func (c *AutoScaling) CompleteLifecycleAction(input *CompleteLifecycleActionInpu return out, err } -var opCompleteLifecycleAction *aws.Operation +const opCreateAutoScalingGroup = "CreateAutoScalingGroup" // CreateAutoScalingGroupRequest generates a request for the CreateAutoScalingGroup operation. -func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGroupInput) (req *aws.Request, output *CreateAutoScalingGroupOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateAutoScalingGroup == nil { - opCreateAutoScalingGroup = &aws.Operation{ - Name: "CreateAutoScalingGroup", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGroupInput) (req *request.Request, output *CreateAutoScalingGroupOutput) { + op := &request.Operation{ + Name: opCreateAutoScalingGroup, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateAutoScalingGroupInput{} } - req = c.newRequest(opCreateAutoScalingGroup, input, output) + req = c.newRequest(op, input, output) output = &CreateAutoScalingGroupOutput{} req.Data = output return @@ -121,33 +140,31 @@ func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGrou // // If you exceed your maximum limit of Auto Scaling groups, which by default // is 20 per region, the call fails. For information about viewing and updating -// these limits, see DescribeAccountLimits. +// this limit, see DescribeAccountLimits. +// +// For more information, see Auto Scaling Groups (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/AutoScalingGroup.html) +// in the Auto Scaling Developer Guide. func (c *AutoScaling) CreateAutoScalingGroup(input *CreateAutoScalingGroupInput) (*CreateAutoScalingGroupOutput, error) { req, out := c.CreateAutoScalingGroupRequest(input) err := req.Send() return out, err } -var opCreateAutoScalingGroup *aws.Operation +const opCreateLaunchConfiguration = "CreateLaunchConfiguration" // CreateLaunchConfigurationRequest generates a request for the CreateLaunchConfiguration operation. -func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfigurationInput) (req *aws.Request, output *CreateLaunchConfigurationOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateLaunchConfiguration == nil { - opCreateLaunchConfiguration = &aws.Operation{ - Name: "CreateLaunchConfiguration", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfigurationInput) (req *request.Request, output *CreateLaunchConfigurationOutput) { + op := &request.Operation{ + Name: opCreateLaunchConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateLaunchConfigurationInput{} } - req = c.newRequest(opCreateLaunchConfiguration, input, output) + req = c.newRequest(op, input, output) output = &CreateLaunchConfigurationOutput{} req.Data = output return @@ -157,33 +174,31 @@ func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfig // // If you exceed your maximum limit of launch configurations, which by default // is 100 per region, the call fails. For information about viewing and updating -// these limits, see DescribeAccountLimits. +// this limit, see DescribeAccountLimits. +// +// For more information, see Launch Configurations (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/LaunchConfiguration.html) +// in the Auto Scaling Developer Guide. func (c *AutoScaling) CreateLaunchConfiguration(input *CreateLaunchConfigurationInput) (*CreateLaunchConfigurationOutput, error) { req, out := c.CreateLaunchConfigurationRequest(input) err := req.Send() return out, err } -var opCreateLaunchConfiguration *aws.Operation +const opCreateOrUpdateTags = "CreateOrUpdateTags" // CreateOrUpdateTagsRequest generates a request for the CreateOrUpdateTags operation. -func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) (req *aws.Request, output *CreateOrUpdateTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateOrUpdateTags == nil { - opCreateOrUpdateTags = &aws.Operation{ - Name: "CreateOrUpdateTags", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) (req *request.Request, output *CreateOrUpdateTagsOutput) { + op := &request.Operation{ + Name: opCreateOrUpdateTags, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateOrUpdateTagsInput{} } - req = c.newRequest(opCreateOrUpdateTags, input, output) + req = c.newRequest(op, input, output) output = &CreateOrUpdateTagsOutput{} req.Data = output return @@ -191,10 +206,17 @@ func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) // Creates or updates tags for the specified Auto Scaling group. // -// A tag's definition is composed of a resource ID, resource type, key and -// value, and the propagate flag. Value and the propagate flag are optional -// parameters. See the Request Parameters for more information. For more information, -// see Add, Modify, or Remove Auto Scaling Group Tags (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASTagging.html) +// A tag is defined by its resource ID, resource type, key, value, and propagate +// flag. The value and the propagate flag are optional parameters. The only +// supported resource type is auto-scaling-group, and the resource ID must be +// the name of the group. The PropagateAtLaunch flag determines whether the +// tag is added to instances launched in the group. Valid values are true or +// false. +// +// When you specify a tag with a key that already exists, the operation overwrites +// the previous tag definition, and you do not get an error message. +// +// For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASTagging.html) // in the Auto Scaling Developer Guide. func (c *AutoScaling) CreateOrUpdateTags(input *CreateOrUpdateTagsInput) (*CreateOrUpdateTagsOutput, error) { req, out := c.CreateOrUpdateTagsRequest(input) @@ -202,26 +224,21 @@ func (c *AutoScaling) CreateOrUpdateTags(input *CreateOrUpdateTagsInput) (*Creat return out, err } -var opCreateOrUpdateTags *aws.Operation +const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup" // DeleteAutoScalingGroupRequest generates a request for the DeleteAutoScalingGroup operation. -func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGroupInput) (req *aws.Request, output *DeleteAutoScalingGroupOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteAutoScalingGroup == nil { - opDeleteAutoScalingGroup = &aws.Operation{ - Name: "DeleteAutoScalingGroup", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGroupInput) (req *request.Request, output *DeleteAutoScalingGroupOutput) { + op := &request.Operation{ + Name: opDeleteAutoScalingGroup, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteAutoScalingGroupInput{} } - req = c.newRequest(opDeleteAutoScalingGroup, input, output) + req = c.newRequest(op, input, output) output = &DeleteAutoScalingGroupOutput{} req.Data = output return @@ -231,35 +248,29 @@ func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGrou // // The group must have no instances and no scaling activities in progress. // -// To remove all instances before calling DeleteAutoScalingGroup, you can call -// UpdateAutoScalingGroup to set the minimum and maximum size of the AutoScalingGroup -// to zero. +// To remove all instances before calling DeleteAutoScalingGroup, call UpdateAutoScalingGroup +// to set the minimum and maximum size of the Auto Scaling group to zero. func (c *AutoScaling) DeleteAutoScalingGroup(input *DeleteAutoScalingGroupInput) (*DeleteAutoScalingGroupOutput, error) { req, out := c.DeleteAutoScalingGroupRequest(input) err := req.Send() return out, err } -var opDeleteAutoScalingGroup *aws.Operation +const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration" // DeleteLaunchConfigurationRequest generates a request for the DeleteLaunchConfiguration operation. -func (c *AutoScaling) DeleteLaunchConfigurationRequest(input *DeleteLaunchConfigurationInput) (req *aws.Request, output *DeleteLaunchConfigurationOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteLaunchConfiguration == nil { - opDeleteLaunchConfiguration = &aws.Operation{ - Name: "DeleteLaunchConfiguration", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DeleteLaunchConfigurationRequest(input *DeleteLaunchConfigurationInput) (req *request.Request, output *DeleteLaunchConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteLaunchConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteLaunchConfigurationInput{} } - req = c.newRequest(opDeleteLaunchConfiguration, input, output) + req = c.newRequest(op, input, output) output = &DeleteLaunchConfigurationOutput{} req.Data = output return @@ -276,26 +287,21 @@ func (c *AutoScaling) DeleteLaunchConfiguration(input *DeleteLaunchConfiguration return out, err } -var opDeleteLaunchConfiguration *aws.Operation +const opDeleteLifecycleHook = "DeleteLifecycleHook" // DeleteLifecycleHookRequest generates a request for the DeleteLifecycleHook operation. -func (c *AutoScaling) DeleteLifecycleHookRequest(input *DeleteLifecycleHookInput) (req *aws.Request, output *DeleteLifecycleHookOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteLifecycleHook == nil { - opDeleteLifecycleHook = &aws.Operation{ - Name: "DeleteLifecycleHook", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DeleteLifecycleHookRequest(input *DeleteLifecycleHookInput) (req *request.Request, output *DeleteLifecycleHookOutput) { + op := &request.Operation{ + Name: opDeleteLifecycleHook, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteLifecycleHookInput{} } - req = c.newRequest(opDeleteLifecycleHook, input, output) + req = c.newRequest(op, input, output) output = &DeleteLifecycleHookOutput{} req.Data = output return @@ -311,26 +317,21 @@ func (c *AutoScaling) DeleteLifecycleHook(input *DeleteLifecycleHookInput) (*Del return out, err } -var opDeleteLifecycleHook *aws.Operation +const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration" // DeleteNotificationConfigurationRequest generates a request for the DeleteNotificationConfiguration operation. -func (c *AutoScaling) DeleteNotificationConfigurationRequest(input *DeleteNotificationConfigurationInput) (req *aws.Request, output *DeleteNotificationConfigurationOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteNotificationConfiguration == nil { - opDeleteNotificationConfiguration = &aws.Operation{ - Name: "DeleteNotificationConfiguration", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DeleteNotificationConfigurationRequest(input *DeleteNotificationConfigurationInput) (req *request.Request, output *DeleteNotificationConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteNotificationConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteNotificationConfigurationInput{} } - req = c.newRequest(opDeleteNotificationConfiguration, input, output) + req = c.newRequest(op, input, output) output = &DeleteNotificationConfigurationOutput{} req.Data = output return @@ -343,26 +344,21 @@ func (c *AutoScaling) DeleteNotificationConfiguration(input *DeleteNotificationC return out, err } -var opDeleteNotificationConfiguration *aws.Operation +const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a request for the DeletePolicy operation. -func (c *AutoScaling) DeletePolicyRequest(input *DeletePolicyInput) (req *aws.Request, output *DeletePolicyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeletePolicy == nil { - opDeletePolicy = &aws.Operation{ - Name: "DeletePolicy", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { + op := &request.Operation{ + Name: opDeletePolicy, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeletePolicyInput{} } - req = c.newRequest(opDeletePolicy, input, output) + req = c.newRequest(op, input, output) output = &DeletePolicyOutput{} req.Data = output return @@ -375,26 +371,21 @@ func (c *AutoScaling) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutpu return out, err } -var opDeletePolicy *aws.Operation +const opDeleteScheduledAction = "DeleteScheduledAction" // DeleteScheduledActionRequest generates a request for the DeleteScheduledAction operation. -func (c *AutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *aws.Request, output *DeleteScheduledActionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteScheduledAction == nil { - opDeleteScheduledAction = &aws.Operation{ - Name: "DeleteScheduledAction", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) { + op := &request.Operation{ + Name: opDeleteScheduledAction, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteScheduledActionInput{} } - req = c.newRequest(opDeleteScheduledAction, input, output) + req = c.newRequest(op, input, output) output = &DeleteScheduledActionOutput{} req.Data = output return @@ -407,26 +398,21 @@ func (c *AutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) ( return out, err } -var opDeleteScheduledAction *aws.Operation +const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a request for the DeleteTags operation. -func (c *AutoScaling) DeleteTagsRequest(input *DeleteTagsInput) (req *aws.Request, output *DeleteTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteTags == nil { - opDeleteTags = &aws.Operation{ - Name: "DeleteTags", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { + op := &request.Operation{ + Name: opDeleteTags, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteTagsInput{} } - req = c.newRequest(opDeleteTags, input, output) + req = c.newRequest(op, input, output) output = &DeleteTagsOutput{} req.Data = output return @@ -439,26 +425,21 @@ func (c *AutoScaling) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, err return out, err } -var opDeleteTags *aws.Operation +const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a request for the DescribeAccountLimits operation. -func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *aws.Request, output *DescribeAccountLimitsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeAccountLimits == nil { - opDescribeAccountLimits = &aws.Operation{ - Name: "DescribeAccountLimits", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) { + op := &request.Operation{ + Name: opDescribeAccountLimits, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeAccountLimitsInput{} } - req = c.newRequest(opDescribeAccountLimits, input, output) + req = c.newRequest(op, input, output) output = &DescribeAccountLimitsOutput{} req.Data = output return @@ -467,71 +448,62 @@ func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsI // Describes the current Auto Scaling resource limits for your AWS account. // // For information about requesting an increase in these limits, see AWS Service -// Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). +// Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) +// in the Amazon Web Services General Reference. func (c *AutoScaling) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) { req, out := c.DescribeAccountLimitsRequest(input) err := req.Send() return out, err } -var opDescribeAccountLimits *aws.Operation +const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes" // DescribeAdjustmentTypesRequest generates a request for the DescribeAdjustmentTypes operation. -func (c *AutoScaling) DescribeAdjustmentTypesRequest(input *DescribeAdjustmentTypesInput) (req *aws.Request, output *DescribeAdjustmentTypesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeAdjustmentTypes == nil { - opDescribeAdjustmentTypes = &aws.Operation{ - Name: "DescribeAdjustmentTypes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DescribeAdjustmentTypesRequest(input *DescribeAdjustmentTypesInput) (req *request.Request, output *DescribeAdjustmentTypesOutput) { + op := &request.Operation{ + Name: opDescribeAdjustmentTypes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeAdjustmentTypesInput{} } - req = c.newRequest(opDescribeAdjustmentTypes, input, output) + req = c.newRequest(op, input, output) output = &DescribeAdjustmentTypesOutput{} req.Data = output return } -// Lists the policy adjustment types for use with PutScalingPolicy. +// Describes the policy adjustment types for use with PutScalingPolicy. func (c *AutoScaling) DescribeAdjustmentTypes(input *DescribeAdjustmentTypesInput) (*DescribeAdjustmentTypesOutput, error) { req, out := c.DescribeAdjustmentTypesRequest(input) err := req.Send() return out, err } -var opDescribeAdjustmentTypes *aws.Operation +const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups" // DescribeAutoScalingGroupsRequest generates a request for the DescribeAutoScalingGroups operation. -func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalingGroupsInput) (req *aws.Request, output *DescribeAutoScalingGroupsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeAutoScalingGroups == nil { - opDescribeAutoScalingGroups = &aws.Operation{ - Name: "DescribeAutoScalingGroups", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } +func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalingGroupsInput) (req *request.Request, output *DescribeAutoScalingGroupsOutput) { + op := &request.Operation{ + Name: opDescribeAutoScalingGroups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { input = &DescribeAutoScalingGroupsInput{} } - req = c.newRequest(opDescribeAutoScalingGroups, input, output) + req = c.newRequest(op, input, output) output = &DescribeAutoScalingGroupsOutput{} req.Data = output return @@ -539,10 +511,6 @@ func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalin // Describes one or more Auto Scaling groups. If a list of names is not provided, // the call describes all Auto Scaling groups. -// -// You can specify a maximum number of items to be returned with a single call. -// If there are more items to return, the call returns a token. To get the next -// set of items, repeat the call with the returned token in the NextToken parameter. func (c *AutoScaling) DescribeAutoScalingGroups(input *DescribeAutoScalingGroupsInput) (*DescribeAutoScalingGroupsOutput, error) { req, out := c.DescribeAutoScalingGroupsRequest(input) err := req.Send() @@ -556,32 +524,27 @@ func (c *AutoScaling) DescribeAutoScalingGroupsPages(input *DescribeAutoScalingG }) } -var opDescribeAutoScalingGroups *aws.Operation +const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances" // DescribeAutoScalingInstancesRequest generates a request for the DescribeAutoScalingInstances operation. -func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoScalingInstancesInput) (req *aws.Request, output *DescribeAutoScalingInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeAutoScalingInstances == nil { - opDescribeAutoScalingInstances = &aws.Operation{ - Name: "DescribeAutoScalingInstances", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } +func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoScalingInstancesInput) (req *request.Request, output *DescribeAutoScalingInstancesOutput) { + op := &request.Operation{ + Name: opDescribeAutoScalingInstances, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { input = &DescribeAutoScalingInstancesInput{} } - req = c.newRequest(opDescribeAutoScalingInstances, input, output) + req = c.newRequest(op, input, output) output = &DescribeAutoScalingInstancesOutput{} req.Data = output return @@ -589,11 +552,6 @@ func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoSca // Describes one or more Auto Scaling instances. If a list is not provided, // the call describes all instances. -// -// You can describe up to a maximum of 50 instances with a single call. By -// default, a call returns up to 20 instances. If there are more items to return, -// the call returns a token. To get the next set of items, repeat the call with -// the returned token in the NextToken parameter. func (c *AutoScaling) DescribeAutoScalingInstances(input *DescribeAutoScalingInstancesInput) (*DescribeAutoScalingInstancesOutput, error) { req, out := c.DescribeAutoScalingInstancesRequest(input) err := req.Send() @@ -607,64 +565,54 @@ func (c *AutoScaling) DescribeAutoScalingInstancesPages(input *DescribeAutoScali }) } -var opDescribeAutoScalingInstances *aws.Operation +const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationTypes" // DescribeAutoScalingNotificationTypesRequest generates a request for the DescribeAutoScalingNotificationTypes operation. -func (c *AutoScaling) DescribeAutoScalingNotificationTypesRequest(input *DescribeAutoScalingNotificationTypesInput) (req *aws.Request, output *DescribeAutoScalingNotificationTypesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeAutoScalingNotificationTypes == nil { - opDescribeAutoScalingNotificationTypes = &aws.Operation{ - Name: "DescribeAutoScalingNotificationTypes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DescribeAutoScalingNotificationTypesRequest(input *DescribeAutoScalingNotificationTypesInput) (req *request.Request, output *DescribeAutoScalingNotificationTypesOutput) { + op := &request.Operation{ + Name: opDescribeAutoScalingNotificationTypes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeAutoScalingNotificationTypesInput{} } - req = c.newRequest(opDescribeAutoScalingNotificationTypes, input, output) + req = c.newRequest(op, input, output) output = &DescribeAutoScalingNotificationTypesOutput{} req.Data = output return } -// Lists the notification types that are supported by Auto Scaling. +// Describes the notification types that are supported by Auto Scaling. func (c *AutoScaling) DescribeAutoScalingNotificationTypes(input *DescribeAutoScalingNotificationTypesInput) (*DescribeAutoScalingNotificationTypesOutput, error) { req, out := c.DescribeAutoScalingNotificationTypesRequest(input) err := req.Send() return out, err } -var opDescribeAutoScalingNotificationTypes *aws.Operation +const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations" // DescribeLaunchConfigurationsRequest generates a request for the DescribeLaunchConfigurations operation. -func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchConfigurationsInput) (req *aws.Request, output *DescribeLaunchConfigurationsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeLaunchConfigurations == nil { - opDescribeLaunchConfigurations = &aws.Operation{ - Name: "DescribeLaunchConfigurations", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } +func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchConfigurationsInput) (req *request.Request, output *DescribeLaunchConfigurationsOutput) { + op := &request.Operation{ + Name: opDescribeLaunchConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { input = &DescribeLaunchConfigurationsInput{} } - req = c.newRequest(opDescribeLaunchConfigurations, input, output) + req = c.newRequest(op, input, output) output = &DescribeLaunchConfigurationsOutput{} req.Data = output return @@ -672,10 +620,6 @@ func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchC // Describes one or more launch configurations. If you omit the list of names, // then the call describes all launch configurations. -// -// You can specify a maximum number of items to be returned with a single call. -// If there are more items to return, the call returns a token. To get the next -// set of items, repeat the call with the returned token in the NextToken parameter. func (c *AutoScaling) DescribeLaunchConfigurations(input *DescribeLaunchConfigurationsInput) (*DescribeLaunchConfigurationsOutput, error) { req, out := c.DescribeLaunchConfigurationsRequest(input) err := req.Send() @@ -689,26 +633,21 @@ func (c *AutoScaling) DescribeLaunchConfigurationsPages(input *DescribeLaunchCon }) } -var opDescribeLaunchConfigurations *aws.Operation +const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes" // DescribeLifecycleHookTypesRequest generates a request for the DescribeLifecycleHookTypes operation. -func (c *AutoScaling) DescribeLifecycleHookTypesRequest(input *DescribeLifecycleHookTypesInput) (req *aws.Request, output *DescribeLifecycleHookTypesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeLifecycleHookTypes == nil { - opDescribeLifecycleHookTypes = &aws.Operation{ - Name: "DescribeLifecycleHookTypes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DescribeLifecycleHookTypesRequest(input *DescribeLifecycleHookTypesInput) (req *request.Request, output *DescribeLifecycleHookTypesOutput) { + op := &request.Operation{ + Name: opDescribeLifecycleHookTypes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeLifecycleHookTypesInput{} } - req = c.newRequest(opDescribeLifecycleHookTypes, input, output) + req = c.newRequest(op, input, output) output = &DescribeLifecycleHookTypesOutput{} req.Data = output return @@ -721,26 +660,21 @@ func (c *AutoScaling) DescribeLifecycleHookTypes(input *DescribeLifecycleHookTyp return out, err } -var opDescribeLifecycleHookTypes *aws.Operation +const opDescribeLifecycleHooks = "DescribeLifecycleHooks" // DescribeLifecycleHooksRequest generates a request for the DescribeLifecycleHooks operation. -func (c *AutoScaling) DescribeLifecycleHooksRequest(input *DescribeLifecycleHooksInput) (req *aws.Request, output *DescribeLifecycleHooksOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeLifecycleHooks == nil { - opDescribeLifecycleHooks = &aws.Operation{ - Name: "DescribeLifecycleHooks", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DescribeLifecycleHooksRequest(input *DescribeLifecycleHooksInput) (req *request.Request, output *DescribeLifecycleHooksOutput) { + op := &request.Operation{ + Name: opDescribeLifecycleHooks, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeLifecycleHooksInput{} } - req = c.newRequest(opDescribeLifecycleHooks, input, output) + req = c.newRequest(op, input, output) output = &DescribeLifecycleHooksOutput{} req.Data = output return @@ -753,68 +687,84 @@ func (c *AutoScaling) DescribeLifecycleHooks(input *DescribeLifecycleHooksInput) return out, err } -var opDescribeLifecycleHooks *aws.Operation +const opDescribeLoadBalancers = "DescribeLoadBalancers" + +// DescribeLoadBalancersRequest generates a request for the DescribeLoadBalancers operation. +func (c *AutoScaling) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) { + op := &request.Operation{ + Name: opDescribeLoadBalancers, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeLoadBalancersInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeLoadBalancersOutput{} + req.Data = output + return +} + +// Describes the load balancers for the specified Auto Scaling group. +func (c *AutoScaling) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) { + req, out := c.DescribeLoadBalancersRequest(input) + err := req.Send() + return out, err +} + +const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes" // DescribeMetricCollectionTypesRequest generates a request for the DescribeMetricCollectionTypes operation. -func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetricCollectionTypesInput) (req *aws.Request, output *DescribeMetricCollectionTypesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeMetricCollectionTypes == nil { - opDescribeMetricCollectionTypes = &aws.Operation{ - Name: "DescribeMetricCollectionTypes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetricCollectionTypesInput) (req *request.Request, output *DescribeMetricCollectionTypesOutput) { + op := &request.Operation{ + Name: opDescribeMetricCollectionTypes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeMetricCollectionTypesInput{} } - req = c.newRequest(opDescribeMetricCollectionTypes, input, output) + req = c.newRequest(op, input, output) output = &DescribeMetricCollectionTypesOutput{} req.Data = output return } -// Returns a list of metrics and a corresponding list of granularities for each -// metric. +// Describes the available CloudWatch metrics for Auto Scaling. // -// The GroupStandbyInstances metric is not returned by default. You must explicitly -// request it when calling EnableMetricsCollection. +// Note that the GroupStandbyInstances metric is not returned by default. You +// must explicitly request this metric when calling EnableMetricsCollection. func (c *AutoScaling) DescribeMetricCollectionTypes(input *DescribeMetricCollectionTypesInput) (*DescribeMetricCollectionTypesOutput, error) { req, out := c.DescribeMetricCollectionTypesRequest(input) err := req.Send() return out, err } -var opDescribeMetricCollectionTypes *aws.Operation +const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations" // DescribeNotificationConfigurationsRequest generates a request for the DescribeNotificationConfigurations operation. -func (c *AutoScaling) DescribeNotificationConfigurationsRequest(input *DescribeNotificationConfigurationsInput) (req *aws.Request, output *DescribeNotificationConfigurationsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeNotificationConfigurations == nil { - opDescribeNotificationConfigurations = &aws.Operation{ - Name: "DescribeNotificationConfigurations", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } +func (c *AutoScaling) DescribeNotificationConfigurationsRequest(input *DescribeNotificationConfigurationsInput) (req *request.Request, output *DescribeNotificationConfigurationsOutput) { + op := &request.Operation{ + Name: opDescribeNotificationConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { input = &DescribeNotificationConfigurationsInput{} } - req = c.newRequest(opDescribeNotificationConfigurations, input, output) + req = c.newRequest(op, input, output) output = &DescribeNotificationConfigurationsOutput{} req.Data = output return @@ -835,42 +785,33 @@ func (c *AutoScaling) DescribeNotificationConfigurationsPages(input *DescribeNot }) } -var opDescribeNotificationConfigurations *aws.Operation +const opDescribePolicies = "DescribePolicies" // DescribePoliciesRequest generates a request for the DescribePolicies operation. -func (c *AutoScaling) DescribePoliciesRequest(input *DescribePoliciesInput) (req *aws.Request, output *DescribePoliciesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribePolicies == nil { - opDescribePolicies = &aws.Operation{ - Name: "DescribePolicies", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } +func (c *AutoScaling) DescribePoliciesRequest(input *DescribePoliciesInput) (req *request.Request, output *DescribePoliciesOutput) { + op := &request.Operation{ + Name: opDescribePolicies, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { input = &DescribePoliciesInput{} } - req = c.newRequest(opDescribePolicies, input, output) + req = c.newRequest(op, input, output) output = &DescribePoliciesOutput{} req.Data = output return } // Describes the policies for the specified Auto Scaling group. -// -// You can specify a maximum number of items to be returned with a single call. -// If there are more items to return, the call returns a token. To get the next -// set of items, repeat the call with the returned token in the NextToken parameter. func (c *AutoScaling) DescribePolicies(input *DescribePoliciesInput) (*DescribePoliciesOutput, error) { req, out := c.DescribePoliciesRequest(input) err := req.Send() @@ -884,32 +825,27 @@ func (c *AutoScaling) DescribePoliciesPages(input *DescribePoliciesInput, fn fun }) } -var opDescribePolicies *aws.Operation +const opDescribeScalingActivities = "DescribeScalingActivities" // DescribeScalingActivitiesRequest generates a request for the DescribeScalingActivities operation. -func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *aws.Request, output *DescribeScalingActivitiesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeScalingActivities == nil { - opDescribeScalingActivities = &aws.Operation{ - Name: "DescribeScalingActivities", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } +func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) { + op := &request.Operation{ + Name: opDescribeScalingActivities, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { input = &DescribeScalingActivitiesInput{} } - req = c.newRequest(opDescribeScalingActivities, input, output) + req = c.newRequest(op, input, output) output = &DescribeScalingActivitiesOutput{} req.Data = output return @@ -919,10 +855,6 @@ func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingAct // If you omit the ActivityIds, the call returns all activities from the past // six weeks. Activities are sorted by the start time. Activities still in progress // appear first on the list. -// -// You can specify a maximum number of items to be returned with a single call. -// If there are more items to return, the call returns a token. To get the next -// set of items, repeat the call with the returned token in the NextToken parameter. func (c *AutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) { req, out := c.DescribeScalingActivitiesRequest(input) err := req.Send() @@ -936,72 +868,61 @@ func (c *AutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActiv }) } -var opDescribeScalingActivities *aws.Operation +const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes" // DescribeScalingProcessTypesRequest generates a request for the DescribeScalingProcessTypes operation. -func (c *AutoScaling) DescribeScalingProcessTypesRequest(input *DescribeScalingProcessTypesInput) (req *aws.Request, output *DescribeScalingProcessTypesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeScalingProcessTypes == nil { - opDescribeScalingProcessTypes = &aws.Operation{ - Name: "DescribeScalingProcessTypes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DescribeScalingProcessTypesRequest(input *DescribeScalingProcessTypesInput) (req *request.Request, output *DescribeScalingProcessTypesOutput) { + op := &request.Operation{ + Name: opDescribeScalingProcessTypes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeScalingProcessTypesInput{} } - req = c.newRequest(opDescribeScalingProcessTypes, input, output) + req = c.newRequest(op, input, output) output = &DescribeScalingProcessTypesOutput{} req.Data = output return } -// Returns scaling process types for use in the ResumeProcesses and SuspendProcesses -// actions. +// Describes the scaling process types for use with ResumeProcesses and SuspendProcesses. func (c *AutoScaling) DescribeScalingProcessTypes(input *DescribeScalingProcessTypesInput) (*DescribeScalingProcessTypesOutput, error) { req, out := c.DescribeScalingProcessTypesRequest(input) err := req.Send() return out, err } -var opDescribeScalingProcessTypes *aws.Operation +const opDescribeScheduledActions = "DescribeScheduledActions" // DescribeScheduledActionsRequest generates a request for the DescribeScheduledActions operation. -func (c *AutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *aws.Request, output *DescribeScheduledActionsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeScheduledActions == nil { - opDescribeScheduledActions = &aws.Operation{ - Name: "DescribeScheduledActions", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } +func (c *AutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) { + op := &request.Operation{ + Name: opDescribeScheduledActions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { input = &DescribeScheduledActionsInput{} } - req = c.newRequest(opDescribeScheduledActions, input, output) + req = c.newRequest(op, input, output) output = &DescribeScheduledActionsOutput{} req.Data = output return } -// Lists the actions scheduled for your Auto Scaling group that haven't been -// executed. To list the actions that were already executed, use DescribeScalingActivities. +// Describes the actions scheduled for your Auto Scaling group that haven't +// run. To describe the actions that have already run, use DescribeScalingActivities. func (c *AutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) { req, out := c.DescribeScheduledActionsRequest(input) err := req.Send() @@ -1015,32 +936,27 @@ func (c *AutoScaling) DescribeScheduledActionsPages(input *DescribeScheduledActi }) } -var opDescribeScheduledActions *aws.Operation +const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a request for the DescribeTags operation. -func (c *AutoScaling) DescribeTagsRequest(input *DescribeTagsInput) (req *aws.Request, output *DescribeTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeTags == nil { - opDescribeTags = &aws.Operation{ - Name: "DescribeTags", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxRecords", - TruncationToken: "", - }, - } +func (c *AutoScaling) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { + op := &request.Operation{ + Name: opDescribeTags, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, } if input == nil { input = &DescribeTagsInput{} } - req = c.newRequest(opDescribeTags, input, output) + req = c.newRequest(op, input, output) output = &DescribeTagsOutput{} req.Data = output return @@ -1069,58 +985,48 @@ func (c *AutoScaling) DescribeTagsPages(input *DescribeTagsInput, fn func(p *Des }) } -var opDescribeTags *aws.Operation +const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes" // DescribeTerminationPolicyTypesRequest generates a request for the DescribeTerminationPolicyTypes operation. -func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTerminationPolicyTypesInput) (req *aws.Request, output *DescribeTerminationPolicyTypesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeTerminationPolicyTypes == nil { - opDescribeTerminationPolicyTypes = &aws.Operation{ - Name: "DescribeTerminationPolicyTypes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTerminationPolicyTypesInput) (req *request.Request, output *DescribeTerminationPolicyTypesOutput) { + op := &request.Operation{ + Name: opDescribeTerminationPolicyTypes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeTerminationPolicyTypesInput{} } - req = c.newRequest(opDescribeTerminationPolicyTypes, input, output) + req = c.newRequest(op, input, output) output = &DescribeTerminationPolicyTypesOutput{} req.Data = output return } -// Lists the termination policies supported by Auto Scaling. +// Describes the termination policies supported by Auto Scaling. func (c *AutoScaling) DescribeTerminationPolicyTypes(input *DescribeTerminationPolicyTypesInput) (*DescribeTerminationPolicyTypesOutput, error) { req, out := c.DescribeTerminationPolicyTypesRequest(input) err := req.Send() return out, err } -var opDescribeTerminationPolicyTypes *aws.Operation +const opDetachInstances = "DetachInstances" // DetachInstancesRequest generates a request for the DetachInstances operation. -func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req *aws.Request, output *DetachInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDetachInstances == nil { - opDetachInstances = &aws.Operation{ - Name: "DetachInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req *request.Request, output *DetachInstancesOutput) { + op := &request.Operation{ + Name: opDetachInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DetachInstancesInput{} } - req = c.newRequest(opDetachInstances, input, output) + req = c.newRequest(op, input, output) output = &DetachInstancesOutput{} req.Data = output return @@ -1139,26 +1045,53 @@ func (c *AutoScaling) DetachInstances(input *DetachInstancesInput) (*DetachInsta return out, err } -var opDetachInstances *aws.Operation +const opDetachLoadBalancers = "DetachLoadBalancers" + +// DetachLoadBalancersRequest generates a request for the DetachLoadBalancers operation. +func (c *AutoScaling) DetachLoadBalancersRequest(input *DetachLoadBalancersInput) (req *request.Request, output *DetachLoadBalancersOutput) { + op := &request.Operation{ + Name: opDetachLoadBalancers, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DetachLoadBalancersInput{} + } + + req = c.newRequest(op, input, output) + output = &DetachLoadBalancersOutput{} + req.Data = output + return +} + +// Removes one or more load balancers from the specified Auto Scaling group. +// +// When you detach a load balancer, it enters the Removing state while deregistering +// the instances in the group. When all instances are deregistered, then you +// can no longer describe the load balancer using DescribeLoadBalancers. Note +// that the instances remain running. +func (c *AutoScaling) DetachLoadBalancers(input *DetachLoadBalancersInput) (*DetachLoadBalancersOutput, error) { + req, out := c.DetachLoadBalancersRequest(input) + err := req.Send() + return out, err +} + +const opDisableMetricsCollection = "DisableMetricsCollection" // DisableMetricsCollectionRequest generates a request for the DisableMetricsCollection operation. -func (c *AutoScaling) DisableMetricsCollectionRequest(input *DisableMetricsCollectionInput) (req *aws.Request, output *DisableMetricsCollectionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDisableMetricsCollection == nil { - opDisableMetricsCollection = &aws.Operation{ - Name: "DisableMetricsCollection", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) DisableMetricsCollectionRequest(input *DisableMetricsCollectionInput) (req *request.Request, output *DisableMetricsCollectionOutput) { + op := &request.Operation{ + Name: opDisableMetricsCollection, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DisableMetricsCollectionInput{} } - req = c.newRequest(opDisableMetricsCollection, input, output) + req = c.newRequest(op, input, output) output = &DisableMetricsCollectionOutput{} req.Data = output return @@ -1172,26 +1105,21 @@ func (c *AutoScaling) DisableMetricsCollection(input *DisableMetricsCollectionIn return out, err } -var opDisableMetricsCollection *aws.Operation +const opEnableMetricsCollection = "EnableMetricsCollection" // EnableMetricsCollectionRequest generates a request for the EnableMetricsCollection operation. -func (c *AutoScaling) EnableMetricsCollectionRequest(input *EnableMetricsCollectionInput) (req *aws.Request, output *EnableMetricsCollectionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opEnableMetricsCollection == nil { - opEnableMetricsCollection = &aws.Operation{ - Name: "EnableMetricsCollection", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) EnableMetricsCollectionRequest(input *EnableMetricsCollectionInput) (req *request.Request, output *EnableMetricsCollectionOutput) { + op := &request.Operation{ + Name: opEnableMetricsCollection, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &EnableMetricsCollectionInput{} } - req = c.newRequest(opEnableMetricsCollection, input, output) + req = c.newRequest(op, input, output) output = &EnableMetricsCollectionOutput{} req.Data = output return @@ -1208,26 +1136,21 @@ func (c *AutoScaling) EnableMetricsCollection(input *EnableMetricsCollectionInpu return out, err } -var opEnableMetricsCollection *aws.Operation +const opEnterStandby = "EnterStandby" // EnterStandbyRequest generates a request for the EnterStandby operation. -func (c *AutoScaling) EnterStandbyRequest(input *EnterStandbyInput) (req *aws.Request, output *EnterStandbyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opEnterStandby == nil { - opEnterStandby = &aws.Operation{ - Name: "EnterStandby", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) EnterStandbyRequest(input *EnterStandbyInput) (req *request.Request, output *EnterStandbyOutput) { + op := &request.Operation{ + Name: opEnterStandby, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &EnterStandbyInput{} } - req = c.newRequest(opEnterStandby, input, output) + req = c.newRequest(op, input, output) output = &EnterStandbyOutput{} req.Data = output return @@ -1243,26 +1166,21 @@ func (c *AutoScaling) EnterStandby(input *EnterStandbyInput) (*EnterStandbyOutpu return out, err } -var opEnterStandby *aws.Operation +const opExecutePolicy = "ExecutePolicy" // ExecutePolicyRequest generates a request for the ExecutePolicy operation. -func (c *AutoScaling) ExecutePolicyRequest(input *ExecutePolicyInput) (req *aws.Request, output *ExecutePolicyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opExecutePolicy == nil { - opExecutePolicy = &aws.Operation{ - Name: "ExecutePolicy", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) ExecutePolicyRequest(input *ExecutePolicyInput) (req *request.Request, output *ExecutePolicyOutput) { + op := &request.Operation{ + Name: opExecutePolicy, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ExecutePolicyInput{} } - req = c.newRequest(opExecutePolicy, input, output) + req = c.newRequest(op, input, output) output = &ExecutePolicyOutput{} req.Data = output return @@ -1275,26 +1193,21 @@ func (c *AutoScaling) ExecutePolicy(input *ExecutePolicyInput) (*ExecutePolicyOu return out, err } -var opExecutePolicy *aws.Operation +const opExitStandby = "ExitStandby" // ExitStandbyRequest generates a request for the ExitStandby operation. -func (c *AutoScaling) ExitStandbyRequest(input *ExitStandbyInput) (req *aws.Request, output *ExitStandbyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opExitStandby == nil { - opExitStandby = &aws.Operation{ - Name: "ExitStandby", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) ExitStandbyRequest(input *ExitStandbyInput) (req *request.Request, output *ExitStandbyOutput) { + op := &request.Operation{ + Name: opExitStandby, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ExitStandbyInput{} } - req = c.newRequest(opExitStandby, input, output) + req = c.newRequest(op, input, output) output = &ExitStandbyOutput{} req.Data = output return @@ -1310,26 +1223,21 @@ func (c *AutoScaling) ExitStandby(input *ExitStandbyInput) (*ExitStandbyOutput, return out, err } -var opExitStandby *aws.Operation +const opPutLifecycleHook = "PutLifecycleHook" // PutLifecycleHookRequest generates a request for the PutLifecycleHook operation. -func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req *aws.Request, output *PutLifecycleHookOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opPutLifecycleHook == nil { - opPutLifecycleHook = &aws.Operation{ - Name: "PutLifecycleHook", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req *request.Request, output *PutLifecycleHookOutput) { + op := &request.Operation{ + Name: opPutLifecycleHook, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &PutLifecycleHookInput{} } - req = c.newRequest(opPutLifecycleHook, input, output) + req = c.newRequest(op, input, output) output = &PutLifecycleHookOutput{} req.Data = output return @@ -1353,32 +1261,32 @@ func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req // action. For more information, see Auto Scaling Pending State (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/AutoScalingPendingState.html) // and Auto Scaling Terminating State (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/AutoScalingTerminatingState.html) // in the Auto Scaling Developer Guide. +// +// If you exceed your maximum limit of lifecycle hooks, which by default is +// 50 per region, the call fails. For information about updating this limit, +// see AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) +// in the Amazon Web Services General Reference. func (c *AutoScaling) PutLifecycleHook(input *PutLifecycleHookInput) (*PutLifecycleHookOutput, error) { req, out := c.PutLifecycleHookRequest(input) err := req.Send() return out, err } -var opPutLifecycleHook *aws.Operation +const opPutNotificationConfiguration = "PutNotificationConfiguration" // PutNotificationConfigurationRequest generates a request for the PutNotificationConfiguration operation. -func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotificationConfigurationInput) (req *aws.Request, output *PutNotificationConfigurationOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opPutNotificationConfiguration == nil { - opPutNotificationConfiguration = &aws.Operation{ - Name: "PutNotificationConfiguration", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotificationConfigurationInput) (req *request.Request, output *PutNotificationConfigurationOutput) { + op := &request.Operation{ + Name: opPutNotificationConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &PutNotificationConfigurationInput{} } - req = c.newRequest(opPutNotificationConfiguration, input, output) + req = c.newRequest(op, input, output) output = &PutNotificationConfigurationOutput{} req.Data = output return @@ -1399,26 +1307,21 @@ func (c *AutoScaling) PutNotificationConfiguration(input *PutNotificationConfigu return out, err } -var opPutNotificationConfiguration *aws.Operation +const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a request for the PutScalingPolicy operation. -func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *aws.Request, output *PutScalingPolicyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opPutScalingPolicy == nil { - opPutScalingPolicy = &aws.Operation{ - Name: "PutScalingPolicy", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) { + op := &request.Operation{ + Name: opPutScalingPolicy, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &PutScalingPolicyInput{} } - req = c.newRequest(opPutScalingPolicy, input, output) + req = c.newRequest(op, input, output) output = &PutScalingPolicyOutput{} req.Data = output return @@ -1428,32 +1331,32 @@ func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req // policy, use the existing policy name and set the parameters you want to change. // Any existing parameter not changed in an update to an existing policy is // not changed in this update request. +// +// If you exceed your maximum limit of step adjustments, which by default is +// 20 per region, the call fails. For information about updating this limit, +// see AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) +// in the Amazon Web Services General Reference. func (c *AutoScaling) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) { req, out := c.PutScalingPolicyRequest(input) err := req.Send() return out, err } -var opPutScalingPolicy *aws.Operation +const opPutScheduledUpdateGroupAction = "PutScheduledUpdateGroupAction" // PutScheduledUpdateGroupActionRequest generates a request for the PutScheduledUpdateGroupAction operation. -func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUpdateGroupActionInput) (req *aws.Request, output *PutScheduledUpdateGroupActionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opPutScheduledUpdateGroupAction == nil { - opPutScheduledUpdateGroupAction = &aws.Operation{ - Name: "PutScheduledUpdateGroupAction", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUpdateGroupActionInput) (req *request.Request, output *PutScheduledUpdateGroupActionOutput) { + op := &request.Operation{ + Name: opPutScheduledUpdateGroupAction, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &PutScheduledUpdateGroupActionInput{} } - req = c.newRequest(opPutScheduledUpdateGroupAction, input, output) + req = c.newRequest(op, input, output) output = &PutScheduledUpdateGroupActionOutput{} req.Data = output return @@ -1465,35 +1368,27 @@ func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUp // // For more information, see Scheduled Scaling (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/schedule_time.html) // in the Auto Scaling Developer Guide. -// -// Auto Scaling supports the date and time expressed in "YYYY-MM-DDThh:mm:ssZ" -// format in UTC/GMT only. func (c *AutoScaling) PutScheduledUpdateGroupAction(input *PutScheduledUpdateGroupActionInput) (*PutScheduledUpdateGroupActionOutput, error) { req, out := c.PutScheduledUpdateGroupActionRequest(input) err := req.Send() return out, err } -var opPutScheduledUpdateGroupAction *aws.Operation +const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat" // RecordLifecycleActionHeartbeatRequest generates a request for the RecordLifecycleActionHeartbeat operation. -func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecycleActionHeartbeatInput) (req *aws.Request, output *RecordLifecycleActionHeartbeatOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRecordLifecycleActionHeartbeat == nil { - opRecordLifecycleActionHeartbeat = &aws.Operation{ - Name: "RecordLifecycleActionHeartbeat", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecycleActionHeartbeatInput) (req *request.Request, output *RecordLifecycleActionHeartbeatOutput) { + op := &request.Operation{ + Name: opRecordLifecycleActionHeartbeat, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RecordLifecycleActionHeartbeatInput{} } - req = c.newRequest(opRecordLifecycleActionHeartbeat, input, output) + req = c.newRequest(op, input, output) output = &RecordLifecycleActionHeartbeatOutput{} req.Data = output return @@ -1521,26 +1416,21 @@ func (c *AutoScaling) RecordLifecycleActionHeartbeat(input *RecordLifecycleActio return out, err } -var opRecordLifecycleActionHeartbeat *aws.Operation +const opResumeProcesses = "ResumeProcesses" // ResumeProcessesRequest generates a request for the ResumeProcesses operation. -func (c *AutoScaling) ResumeProcessesRequest(input *ScalingProcessQuery) (req *aws.Request, output *ResumeProcessesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opResumeProcesses == nil { - opResumeProcesses = &aws.Operation{ - Name: "ResumeProcesses", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) ResumeProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *ResumeProcessesOutput) { + op := &request.Operation{ + Name: opResumeProcesses, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ScalingProcessQuery{} } - req = c.newRequest(opResumeProcesses, input, output) + req = c.newRequest(op, input, output) output = &ResumeProcessesOutput{} req.Data = output return @@ -1557,58 +1447,51 @@ func (c *AutoScaling) ResumeProcesses(input *ScalingProcessQuery) (*ResumeProces return out, err } -var opResumeProcesses *aws.Operation +const opSetDesiredCapacity = "SetDesiredCapacity" // SetDesiredCapacityRequest generates a request for the SetDesiredCapacity operation. -func (c *AutoScaling) SetDesiredCapacityRequest(input *SetDesiredCapacityInput) (req *aws.Request, output *SetDesiredCapacityOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opSetDesiredCapacity == nil { - opSetDesiredCapacity = &aws.Operation{ - Name: "SetDesiredCapacity", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) SetDesiredCapacityRequest(input *SetDesiredCapacityInput) (req *request.Request, output *SetDesiredCapacityOutput) { + op := &request.Operation{ + Name: opSetDesiredCapacity, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &SetDesiredCapacityInput{} } - req = c.newRequest(opSetDesiredCapacity, input, output) + req = c.newRequest(op, input, output) output = &SetDesiredCapacityOutput{} req.Data = output return } -// Sets the size of the specified AutoScalingGroup. +// Sets the size of the specified Auto Scaling group. +// +// For more information about desired capacity, see What Is Auto Scaling? (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/WhatIsAutoScaling.html) +// in the Auto Scaling Developer Guide. func (c *AutoScaling) SetDesiredCapacity(input *SetDesiredCapacityInput) (*SetDesiredCapacityOutput, error) { req, out := c.SetDesiredCapacityRequest(input) err := req.Send() return out, err } -var opSetDesiredCapacity *aws.Operation +const opSetInstanceHealth = "SetInstanceHealth" // SetInstanceHealthRequest generates a request for the SetInstanceHealth operation. -func (c *AutoScaling) SetInstanceHealthRequest(input *SetInstanceHealthInput) (req *aws.Request, output *SetInstanceHealthOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opSetInstanceHealth == nil { - opSetInstanceHealth = &aws.Operation{ - Name: "SetInstanceHealth", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) SetInstanceHealthRequest(input *SetInstanceHealthInput) (req *request.Request, output *SetInstanceHealthOutput) { + op := &request.Operation{ + Name: opSetInstanceHealth, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &SetInstanceHealthInput{} } - req = c.newRequest(opSetInstanceHealth, input, output) + req = c.newRequest(op, input, output) output = &SetInstanceHealthOutput{} req.Data = output return @@ -1624,26 +1507,21 @@ func (c *AutoScaling) SetInstanceHealth(input *SetInstanceHealthInput) (*SetInst return out, err } -var opSetInstanceHealth *aws.Operation +const opSuspendProcesses = "SuspendProcesses" // SuspendProcessesRequest generates a request for the SuspendProcesses operation. -func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req *aws.Request, output *SuspendProcessesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opSuspendProcesses == nil { - opSuspendProcesses = &aws.Operation{ - Name: "SuspendProcesses", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *SuspendProcessesOutput) { + op := &request.Operation{ + Name: opSuspendProcesses, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ScalingProcessQuery{} } - req = c.newRequest(opSuspendProcesses, input, output) + req = c.newRequest(op, input, output) output = &SuspendProcessesOutput{} req.Data = output return @@ -1666,26 +1544,21 @@ func (c *AutoScaling) SuspendProcesses(input *ScalingProcessQuery) (*SuspendProc return out, err } -var opSuspendProcesses *aws.Operation +const opTerminateInstanceInAutoScalingGroup = "TerminateInstanceInAutoScalingGroup" // TerminateInstanceInAutoScalingGroupRequest generates a request for the TerminateInstanceInAutoScalingGroup operation. -func (c *AutoScaling) TerminateInstanceInAutoScalingGroupRequest(input *TerminateInstanceInAutoScalingGroupInput) (req *aws.Request, output *TerminateInstanceInAutoScalingGroupOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opTerminateInstanceInAutoScalingGroup == nil { - opTerminateInstanceInAutoScalingGroup = &aws.Operation{ - Name: "TerminateInstanceInAutoScalingGroup", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) TerminateInstanceInAutoScalingGroupRequest(input *TerminateInstanceInAutoScalingGroupInput) (req *request.Request, output *TerminateInstanceInAutoScalingGroupOutput) { + op := &request.Operation{ + Name: opTerminateInstanceInAutoScalingGroup, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &TerminateInstanceInAutoScalingGroupInput{} } - req = c.newRequest(opTerminateInstanceInAutoScalingGroup, input, output) + req = c.newRequest(op, input, output) output = &TerminateInstanceInAutoScalingGroupOutput{} req.Data = output return @@ -1702,96 +1575,89 @@ func (c *AutoScaling) TerminateInstanceInAutoScalingGroup(input *TerminateInstan return out, err } -var opTerminateInstanceInAutoScalingGroup *aws.Operation +const opUpdateAutoScalingGroup = "UpdateAutoScalingGroup" // UpdateAutoScalingGroupRequest generates a request for the UpdateAutoScalingGroup operation. -func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGroupInput) (req *aws.Request, output *UpdateAutoScalingGroupOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opUpdateAutoScalingGroup == nil { - opUpdateAutoScalingGroup = &aws.Operation{ - Name: "UpdateAutoScalingGroup", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGroupInput) (req *request.Request, output *UpdateAutoScalingGroupOutput) { + op := &request.Operation{ + Name: opUpdateAutoScalingGroup, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &UpdateAutoScalingGroupInput{} } - req = c.newRequest(opUpdateAutoScalingGroup, input, output) + req = c.newRequest(op, input, output) output = &UpdateAutoScalingGroupOutput{} req.Data = output return } -// Updates the configuration for the specified AutoScalingGroup. +// Updates the configuration for the specified Auto Scaling group. // -// To update an Auto Scaling group with a launch configuration that has the -// InstanceMonitoring flag set to False, you must first ensure that collection -// of group metrics is disabled. Otherwise, calls to UpdateAutoScalingGroup -// will fail. If you have previously enabled group metrics collection, you can -// disable collection of all group metrics by calling DisableMetricsCollection. +// To update an Auto Scaling group with a launch configuration with InstanceMonitoring +// set to False, you must first disable the collection of group metrics. Otherwise, +// you will get an error. If you have previously enabled the collection of group +// metrics, you can disable it using DisableMetricsCollection. // -// The new settings are registered upon the completion of this call. Any -// launch configuration settings take effect on any triggers after this call -// returns. Scaling activities that are currently in progress aren't affected. +// The new settings are registered upon the completion of this call. Any launch +// configuration settings take effect on any triggers after this call returns. +// Scaling activities that are currently in progress aren't affected. // -// If a new value is specified for MinSize without specifying the value -// for DesiredCapacity, and if the new MinSize is larger than the current size -// of the Auto Scaling group, there will be an implicit call to SetDesiredCapacity -// to set the group to the new MinSize. +// Note the following: // -// If a new value is specified for MaxSize without specifying the value for +// If you specify a new value for MinSize without specifying a value for +// DesiredCapacity, and the new MinSize is larger than the current size of the +// group, we implicitly call SetDesiredCapacity to set the size of the group +// to the new value of MinSize. +// +// If you specify a new value for MaxSize without specifying a value for // DesiredCapacity, and the new MaxSize is smaller than the current size of -// the Auto Scaling group, there will be an implicit call to SetDesiredCapacity -// to set the group to the new MaxSize. +// the group, we implicitly call SetDesiredCapacity to set the size of the group +// to the new value of MaxSize. // -// All other optional parameters are left unchanged if not passed in the -// request. +// All other optional parameters are left unchanged if not specified. func (c *AutoScaling) UpdateAutoScalingGroup(input *UpdateAutoScalingGroupInput) (*UpdateAutoScalingGroupOutput, error) { req, out := c.UpdateAutoScalingGroupRequest(input) err := req.Send() return out, err } -var opUpdateAutoScalingGroup *aws.Operation - -// Describes a long-running process that represents a change to your Auto Scaling -// group, such as changing its size. This can also be a process to replace an -// instance, or a process to perform any other long-running operations. +// Describes scaling activity, which is a long-running process that represents +// a change to your Auto Scaling group, such as changing its size or replacing +// an instance. type Activity struct { // The ID of the activity. - ActivityID *string `locationName:"ActivityId" type:"string" required:"true"` + ActivityId *string `type:"string" required:"true"` // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // The reason the activity was begun. - Cause *string `type:"string" required:"true"` + // The reason the activity began. + Cause *string `min:"1" type:"string" required:"true"` - // A friendly, more verbose description of the scaling activity. + // A friendly, more verbose description of the activity. Description *string `type:"string"` - // The details about the scaling activity. + // The details about the activity. Details *string `type:"string"` - // The end time of this activity. + // The end time of the activity. EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` // A value between 0 and 100 that indicates the progress of the activity. Progress *int64 `type:"integer"` - // The start time of this activity. + // The start time of the activity. StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` // The current status of the activity. - StatusCode *string `type:"string" required:"true"` + StatusCode *string `type:"string" required:"true" enum:"ScalingActivityStatusCode"` // A friendly, more verbose description of the activity status. - StatusMessage *string `type:"string"` + StatusMessage *string `min:"1" type:"string"` metadataActivity `json:"-" xml:"-"` } @@ -1800,14 +1666,24 @@ type metadataActivity struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Activity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Activity) GoString() string { + return s.String() +} + // Describes a policy adjustment type. +// +// For more information, see Dynamic Scaling (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html) +// in the Auto Scaling Developer Guide. type AdjustmentType struct { // The policy adjustment type. The valid values are ChangeInCapacity, ExactCapacity, // and PercentChangeInCapacity. - // - // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html) - // in the Auto Scaling Developer Guide. - AdjustmentType *string `type:"string"` + AdjustmentType *string `min:"1" type:"string"` metadataAdjustmentType `json:"-" xml:"-"` } @@ -1816,13 +1692,23 @@ type metadataAdjustmentType struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AdjustmentType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AdjustmentType) GoString() string { + return s.String() +} + // Describes an alarm. type Alarm struct { // The Amazon Resource Name (ARN) of the alarm. - AlarmARN *string `type:"string"` + AlarmARN *string `min:"1" type:"string"` // The name of the alarm. - AlarmName *string `type:"string"` + AlarmName *string `min:"1" type:"string"` metadataAlarm `json:"-" xml:"-"` } @@ -1831,12 +1717,22 @@ type metadataAlarm struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Alarm) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Alarm) GoString() string { + return s.String() +} + type AttachInstancesInput struct { // The name of the group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // One or more EC2 instance IDs. You must specify at least one ID. - InstanceIDs []*string `locationName:"InstanceIds" type:"list"` + // One or more EC2 instance IDs. + InstanceIds []*string `type:"list"` metadataAttachInstancesInput `json:"-" xml:"-"` } @@ -1845,6 +1741,16 @@ type metadataAttachInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachInstancesInput) GoString() string { + return s.String() +} + type AttachInstancesOutput struct { metadataAttachInstancesOutput `json:"-" xml:"-"` } @@ -1853,23 +1759,75 @@ type metadataAttachInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachInstancesOutput) GoString() string { + return s.String() +} + +type AttachLoadBalancersInput struct { + // The name of the group. + AutoScalingGroupName *string `min:"1" type:"string"` + + // One or more load balancer names. + LoadBalancerNames []*string `type:"list"` + + metadataAttachLoadBalancersInput `json:"-" xml:"-"` +} + +type metadataAttachLoadBalancersInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s AttachLoadBalancersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachLoadBalancersInput) GoString() string { + return s.String() +} + +type AttachLoadBalancersOutput struct { + metadataAttachLoadBalancersOutput `json:"-" xml:"-"` +} + +type metadataAttachLoadBalancersOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s AttachLoadBalancersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachLoadBalancersOutput) GoString() string { + return s.String() +} + // Describes a block device mapping. type BlockDeviceMapping struct { // The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh). - DeviceName *string `type:"string" required:"true"` + DeviceName *string `min:"1" type:"string" required:"true"` // The information about the Amazon EBS volume. - EBS *EBS `locationName:"Ebs" type:"structure"` + Ebs *Ebs `type:"structure"` // Suppresses a device mapping. // - // If NoDevice is set to true for the root device, the instance might fail - // the EC2 health check. Auto Scaling launches a replacement instance if the - // instance fails the health check. + // If this parameter is true for the root device, the instance might fail the + // EC2 health check. Auto Scaling launches a replacement instance if the instance + // fails the health check. NoDevice *bool `type:"boolean"` // The name of the virtual device, ephemeral0 to ephemeral3. - VirtualName *string `type:"string"` + VirtualName *string `min:"1" type:"string"` metadataBlockDeviceMapping `json:"-" xml:"-"` } @@ -1878,9 +1836,19 @@ type metadataBlockDeviceMapping struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s BlockDeviceMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BlockDeviceMapping) GoString() string { + return s.String() +} + type CompleteLifecycleActionInput struct { // The name of the group for the lifecycle hook. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The action for the group to take. This parameter can be either CONTINUE or // ABANDON. @@ -1889,10 +1857,10 @@ type CompleteLifecycleActionInput struct { // A universally unique identifier (UUID) that identifies a specific lifecycle // action associated with an instance. Auto Scaling sends this token to the // notification target you specified when you created the lifecycle hook. - LifecycleActionToken *string `type:"string" required:"true"` + LifecycleActionToken *string `min:"36" type:"string" required:"true"` // The name of the lifecycle hook. - LifecycleHookName *string `type:"string" required:"true"` + LifecycleHookName *string `min:"1" type:"string" required:"true"` metadataCompleteLifecycleActionInput `json:"-" xml:"-"` } @@ -1901,6 +1869,16 @@ type metadataCompleteLifecycleActionInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CompleteLifecycleActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompleteLifecycleActionInput) GoString() string { + return s.String() +} + type CompleteLifecycleActionOutput struct { metadataCompleteLifecycleActionOutput `json:"-" xml:"-"` } @@ -1909,24 +1887,34 @@ type metadataCompleteLifecycleActionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CompleteLifecycleActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompleteLifecycleActionOutput) GoString() string { + return s.String() +} + type CreateAutoScalingGroupInput struct { // The name of the group. This name must be unique within the scope of your // AWS account. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // One or more Availability Zones for the group. This parameter is optional // if you specify subnets using the VPCZoneIdentifier parameter. - AvailabilityZones []*string `type:"list"` + AvailabilityZones []*string `min:"1" type:"list"` // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. // - // If DefaultCooldown 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) + // 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) // in the Auto Scaling Developer Guide. DefaultCooldown *int64 `type:"integer"` - // The number of EC2 instances that should be running in the group. This value + // The number of EC2 instances that should be running in the group. This number // must be greater than or equal to the minimum size of the group and less than // or equal to the maximum size of the group. DesiredCapacity *int64 `type:"integer"` @@ -1949,7 +1937,7 @@ type CreateAutoScalingGroupInput struct { // // 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). - HealthCheckType *string `type:"string"` + HealthCheckType *string `min:"1" type:"string"` // The ID of the EC2 instance used to create a launch configuration for the // group. Alternatively, use the LaunchConfigurationName parameter to specify @@ -1960,14 +1948,14 @@ type CreateAutoScalingGroupInput struct { // derives its attributes from the specified instance, with the exception of // the block device mapping. // - // For more information, see Create an Auto Scaling Group Using an EC2 Instance - // ID (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/create-asg-from-instance.html) + // For more information, see Create an Auto Scaling Group from an EC2 Instance + // (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/create-asg-from-instance.html) // in the Auto Scaling Developer Guide. - InstanceID *string `locationName:"InstanceId" type:"string"` + InstanceId *string `min:"1" type:"string"` // The name of the launch configuration. Alternatively, use the InstanceId parameter // to specify an EC2 instance instead of a launch configuration. - LaunchConfigurationName *string `type:"string"` + LaunchConfigurationName *string `min:"1" type:"string"` // One or more load balancers. // @@ -1982,15 +1970,15 @@ type CreateAutoScalingGroupInput 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). - PlacementGroup *string `type:"string"` + // 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 tag to be created or updated. Each tag should be defined by its resource // type, resource ID, key, value, and a propagate flag. Valid values: key=value, // value=value, propagate=true or false. Value and propagate are optional parameters. // - // For more information, see Add, Modify, or Remove Auto Scaling Group Tags - // (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASTagging.html) + // For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASTagging.html) // in the Auto Scaling Developer Guide. Tags []*Tag `type:"list"` @@ -2008,9 +1996,10 @@ type CreateAutoScalingGroupInput struct { // If you specify subnets and Availability Zones with this call, ensure that // the subnets' Availability Zones match the Availability Zones specified. // - // For more information, see Auto Scaling and Amazon VPC (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html) + // For more information, see Auto Scaling and Amazon Virtual Private Cloud + // (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html) // in the Auto Scaling Developer Guide. - VPCZoneIdentifier *string `type:"string"` + VPCZoneIdentifier *string `min:"1" type:"string"` metadataCreateAutoScalingGroupInput `json:"-" xml:"-"` } @@ -2019,6 +2008,16 @@ type metadataCreateAutoScalingGroupInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateAutoScalingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAutoScalingGroupInput) GoString() string { + return s.String() +} + type CreateAutoScalingGroupOutput struct { metadataCreateAutoScalingGroupOutput `json:"-" xml:"-"` } @@ -2027,20 +2026,30 @@ type metadataCreateAutoScalingGroupOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateAutoScalingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAutoScalingGroupOutput) GoString() string { + return s.String() +} + type CreateLaunchConfigurationInput struct { // Used for groups that launch instances into a virtual private cloud (VPC). // Specifies whether to assign a public IP address to each instance. For more - // information, see Auto Scaling and Amazon VPC (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html) + // information, see Auto Scaling and Amazon Virtual Private Cloud (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html) // in the Auto Scaling Developer Guide. // - // If you specify a value for this parameter, be sure to specify at least - // one subnet using the VPCZoneIdentifier parameter when you create your group. + // If you specify a value for this parameter, be sure to specify at least one + // subnet using the VPCZoneIdentifier parameter when you create your group. // - // Default: If the instance is launched into a default subnet, the default + // Default: If the instance is launched into a default subnet, the default // is true. If the instance is launched into a nondefault subnet, the default - // is false. For more information, see Supported Platforms (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide//as-supported-platforms.html) + // is false. For more information, see Supported Platforms (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) // in the Amazon Elastic Compute Cloud User Guide. - AssociatePublicIPAddress *bool `locationName:"AssociatePublicIpAddress" type:"boolean"` + AssociatePublicIpAddress *bool `type:"boolean"` // One or more mappings that specify how block devices are exposed to the instance. // For more information, see Block Device Mapping (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) @@ -2048,14 +2057,14 @@ type CreateLaunchConfigurationInput struct { BlockDeviceMappings []*BlockDeviceMapping `type:"list"` // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. - // This parameter can only be used if you are launching EC2-Classic instances. + // This parameter is supported only if you are launching EC2-Classic instances. // For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) // in the Amazon Elastic Compute Cloud User Guide. - ClassicLinkVPCID *string `locationName:"ClassicLinkVPCId" type:"string"` + ClassicLinkVPCId *string `min:"1" type:"string"` // The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId. - // This parameter is required if ClassicLinkVPCId is specified, and cannot be - // used otherwise. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) + // This parameter is required if ClassicLinkVPCId is specified, and is not supported + // otherwise. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) // in the Amazon Elastic Compute Cloud User Guide. ClassicLinkVPCSecurityGroups []*string `type:"list"` @@ -2066,23 +2075,23 @@ type CreateLaunchConfigurationInput struct { // types. Additional usage charges apply. For more information, see Amazon EBS-Optimized // Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) // in the Amazon Elastic Compute Cloud User Guide. - EBSOptimized *bool `locationName:"EbsOptimized" type:"boolean"` + EbsOptimized *bool `type:"boolean"` // The name or the Amazon Resource Name (ARN) of the instance profile associated // with the IAM role for the instance. // - // Amazon EC2 instances launched with an IAM role will automatically have AWS - // security credentials available. You can use IAM roles with Auto Scaling to - // automatically enable applications running on your Amazon EC2 instances to - // securely access other AWS resources. For more information, see Launch Auto - // Scaling Instances with an IAM Role (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/us-iam-role.html) + // EC2 instances launched with an IAM role will automatically have AWS security + // credentials available. You can use IAM roles with Auto Scaling to automatically + // enable applications running on your EC2 instances to securely access other + // AWS resources. For more information, see Launch Auto Scaling Instances with + // an IAM Role (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/us-iam-role.html) // in the Auto Scaling Developer Guide. - IAMInstanceProfile *string `locationName:"IamInstanceProfile" type:"string"` + IamInstanceProfile *string `min:"1" type:"string"` // The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances. // For more information, see Finding an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) // in the Amazon Elastic Compute Cloud User Guide. - ImageID *string `locationName:"ImageId" type:"string"` + ImageId *string `min:"1" type:"string"` // The ID of the EC2 instance to use to create the launch configuration. // @@ -2095,53 +2104,54 @@ type CreateLaunchConfigurationInput struct { // For more information, see Create a Launch Configuration Using an EC2 Instance // (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/create-lc-with-instanceID.html) // in the Auto Scaling Developer Guide. - InstanceID *string `locationName:"InstanceId" type:"string"` + InstanceId *string `min:"1" type:"string"` // Enables detailed monitoring if it is disabled. Detailed monitoring is enabled // by default. // - // When detailed monitoring is enabled, Amazon Cloudwatch generates metrics + // When detailed monitoring is enabled, Amazon CloudWatch generates metrics // every minute and your account is charged a fee. When you disable detailed - // monitoring, by specifying False, Cloudwatch generates metrics every 5 minutes. + // monitoring, by specifying False, CloudWatch generates metrics every 5 minutes. // For more information, see Monitor Your Auto Scaling Instances (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-instance-monitoring.html) // in the Auto Scaling Developer Guide. InstanceMonitoring *InstanceMonitoring `type:"structure"` - // The instance type of the Amazon EC2 instance. For information about available - // Amazon EC2 instance types, see Available Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) + // 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. - InstanceType *string `type:"string"` + InstanceType *string `min:"1" type:"string"` - // The ID of the kernel associated with the Amazon EC2 AMI. - KernelID *string `locationName:"KernelId" type:"string"` + // The ID of the kernel associated with the AMI. + KernelId *string `min:"1" type:"string"` // The name of the key pair. For more information, see Amazon EC2 Key Pairs // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in // the Amazon Elastic Compute Cloud User Guide. - KeyName *string `type:"string"` + KeyName *string `min:"1" type:"string"` // The name of the launch configuration. This name must be unique within the // scope of your AWS account. - LaunchConfigurationName *string `type:"string" required:"true"` + LaunchConfigurationName *string `min:"1" type:"string" required:"true"` // The tenancy of the instance. An instance with a tenancy of dedicated runs - // on single-tenant hardware and can only be launched in a VPC. + // on single-tenant hardware and can only be launched into a VPC. // // You must set the value of this parameter to dedicated if want to launch - // Dedicated Instances in a shared tenancy VPC (VPC with instance placement + // Dedicated Instances into a shared tenancy VPC (VPC with instance placement // tenancy attribute set to default). // // If you specify a value for this parameter, be sure to specify at least one - // VPC subnet using the VPCZoneIdentifier parameter when you create your group. + // subnet using the VPCZoneIdentifier parameter when you create your group. // - // For more information, see Auto Scaling and Amazon VPC (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html) + // For more information, see Auto Scaling and Amazon Virtual Private Cloud + // (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html) // in the Auto Scaling Developer Guide. // // Valid values: default | dedicated - PlacementTenancy *string `type:"string"` + PlacementTenancy *string `min:"1" type:"string"` - // The ID of the RAM disk associated with the Amazon EC2 AMI. - RAMDiskID *string `locationName:"RamdiskId" type:"string"` + // The ID of the RAM disk associated with the AMI. + RamdiskId *string `min:"1" type:"string"` // One or more security groups with which to associate the instances. // @@ -2150,7 +2160,7 @@ type CreateLaunchConfigurationInput struct { // groups for EC2-Classic, see Amazon EC2 Security Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) // in the Amazon Elastic Compute Cloud User Guide. // - // If your instances are launched in a VPC, specify security group IDs. For + // If your instances are launched into a VPC, specify security group IDs. For // more information, see Security Groups for Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) // in the Amazon Virtual Private Cloud User Guide. SecurityGroups []*string `type:"list"` @@ -2160,7 +2170,7 @@ type CreateLaunchConfigurationInput struct { // the current Spot market price. For more information, see Launch Spot Instances // in Your Auto Scaling Group (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/US-SpotInstances.html) // in the Auto Scaling Developer Guide. - SpotPrice *string `type:"string"` + SpotPrice *string `min:"1" type:"string"` // The user data to make available to the launched EC2 instances. For more information, // see Instance Metadata and User Data (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) @@ -2177,6 +2187,16 @@ type metadataCreateLaunchConfigurationInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLaunchConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLaunchConfigurationInput) GoString() string { + return s.String() +} + type CreateLaunchConfigurationOutput struct { metadataCreateLaunchConfigurationOutput `json:"-" xml:"-"` } @@ -2185,22 +2205,18 @@ type metadataCreateLaunchConfigurationOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLaunchConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLaunchConfigurationOutput) GoString() string { + return s.String() +} + type CreateOrUpdateTagsInput struct { - // The tag to be created or updated. Each tag should be defined by its resource - // type, resource ID, key, value, and a propagate flag. The resource type and - // resource ID identify the type and name of resource for which the tag is created. - // Currently, auto-scaling-group is the only supported resource type. The valid - // value for the resource ID is groupname. - // - // The PropagateAtLaunch flag defines whether the new tag will be applied to - // instances launched by the group. Valid values are true or false. However, - // instances that are already running will not get the new or updated tag. Likewise, - // when you modify a tag, the updated version will be applied only to new instances - // launched by the group after the change. Running instances that had the previous - // version of the tag will continue to have the older tag. - // - // When you create a tag and a tag of the same name already exists, the operation - // overwrites the previous tag definition, but you will not get an error message. + // One or more tags. Tags []*Tag `type:"list" required:"true"` metadataCreateOrUpdateTagsInput `json:"-" xml:"-"` @@ -2210,6 +2226,16 @@ type metadataCreateOrUpdateTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateOrUpdateTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateOrUpdateTagsInput) GoString() string { + return s.String() +} + type CreateOrUpdateTagsOutput struct { metadataCreateOrUpdateTagsOutput `json:"-" xml:"-"` } @@ -2218,9 +2244,19 @@ type metadataCreateOrUpdateTagsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateOrUpdateTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateOrUpdateTagsOutput) GoString() string { + return s.String() +} + type DeleteAutoScalingGroupInput struct { // The name of the group to delete. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // Specifies that the group will be deleted along with all instances associated // with the group, without waiting for all instances to be terminated. This @@ -2234,6 +2270,16 @@ type metadataDeleteAutoScalingGroupInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteAutoScalingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAutoScalingGroupInput) GoString() string { + return s.String() +} + type DeleteAutoScalingGroupOutput struct { metadataDeleteAutoScalingGroupOutput `json:"-" xml:"-"` } @@ -2242,9 +2288,19 @@ type metadataDeleteAutoScalingGroupOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteAutoScalingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAutoScalingGroupOutput) GoString() string { + return s.String() +} + type DeleteLaunchConfigurationInput struct { // The name of the launch configuration. - LaunchConfigurationName *string `type:"string" required:"true"` + LaunchConfigurationName *string `min:"1" type:"string" required:"true"` metadataDeleteLaunchConfigurationInput `json:"-" xml:"-"` } @@ -2253,6 +2309,16 @@ type metadataDeleteLaunchConfigurationInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLaunchConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLaunchConfigurationInput) GoString() string { + return s.String() +} + type DeleteLaunchConfigurationOutput struct { metadataDeleteLaunchConfigurationOutput `json:"-" xml:"-"` } @@ -2261,12 +2327,22 @@ type metadataDeleteLaunchConfigurationOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLaunchConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLaunchConfigurationOutput) GoString() string { + return s.String() +} + type DeleteLifecycleHookInput struct { // The name of the Auto Scaling group for the lifecycle hook. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The name of the lifecycle hook. - LifecycleHookName *string `type:"string" required:"true"` + LifecycleHookName *string `min:"1" type:"string" required:"true"` metadataDeleteLifecycleHookInput `json:"-" xml:"-"` } @@ -2275,6 +2351,16 @@ type metadataDeleteLifecycleHookInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLifecycleHookInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLifecycleHookInput) GoString() string { + return s.String() +} + type DeleteLifecycleHookOutput struct { metadataDeleteLifecycleHookOutput `json:"-" xml:"-"` } @@ -2283,13 +2369,23 @@ type metadataDeleteLifecycleHookOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLifecycleHookOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLifecycleHookOutput) GoString() string { + return s.String() +} + type DeleteNotificationConfigurationInput struct { // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service // (SNS) topic. - TopicARN *string `type:"string" required:"true"` + TopicARN *string `min:"1" type:"string" required:"true"` metadataDeleteNotificationConfigurationInput `json:"-" xml:"-"` } @@ -2298,6 +2394,16 @@ type metadataDeleteNotificationConfigurationInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteNotificationConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotificationConfigurationInput) GoString() string { + return s.String() +} + type DeleteNotificationConfigurationOutput struct { metadataDeleteNotificationConfigurationOutput `json:"-" xml:"-"` } @@ -2306,12 +2412,22 @@ type metadataDeleteNotificationConfigurationOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteNotificationConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotificationConfigurationOutput) GoString() string { + return s.String() +} + type DeletePolicyInput struct { // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // The name or Amazon Resource Name (ARN) of the policy. - PolicyName *string `type:"string" required:"true"` + PolicyName *string `min:"1" type:"string" required:"true"` metadataDeletePolicyInput `json:"-" xml:"-"` } @@ -2320,6 +2436,16 @@ type metadataDeletePolicyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeletePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePolicyInput) GoString() string { + return s.String() +} + type DeletePolicyOutput struct { metadataDeletePolicyOutput `json:"-" xml:"-"` } @@ -2328,12 +2454,22 @@ type metadataDeletePolicyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeletePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePolicyOutput) GoString() string { + return s.String() +} + type DeleteScheduledActionInput struct { // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // The name of the action to delete. - ScheduledActionName *string `type:"string" required:"true"` + ScheduledActionName *string `min:"1" type:"string" required:"true"` metadataDeleteScheduledActionInput `json:"-" xml:"-"` } @@ -2342,6 +2478,16 @@ type metadataDeleteScheduledActionInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteScheduledActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteScheduledActionInput) GoString() string { + return s.String() +} + type DeleteScheduledActionOutput struct { metadataDeleteScheduledActionOutput `json:"-" xml:"-"` } @@ -2350,6 +2496,16 @@ type metadataDeleteScheduledActionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteScheduledActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteScheduledActionOutput) GoString() string { + return s.String() +} + type DeleteTagsInput struct { // Each tag should be defined by its resource type, resource ID, key, value, // and a propagate flag. Valid values are: Resource type = auto-scaling-group, @@ -2364,6 +2520,16 @@ type metadataDeleteTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsInput) GoString() string { + return s.String() +} + type DeleteTagsOutput struct { metadataDeleteTagsOutput `json:"-" xml:"-"` } @@ -2372,6 +2538,16 @@ type metadataDeleteTagsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsOutput) GoString() string { + return s.String() +} + type DescribeAccountLimitsInput struct { metadataDescribeAccountLimitsInput `json:"-" xml:"-"` } @@ -2380,6 +2556,16 @@ type metadataDescribeAccountLimitsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAccountLimitsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountLimitsInput) GoString() string { + return s.String() +} + type DescribeAccountLimitsOutput struct { // The maximum number of groups allowed for your AWS account. The default limit // is 20 per region. @@ -2396,6 +2582,16 @@ type metadataDescribeAccountLimitsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAccountLimitsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountLimitsOutput) GoString() string { + return s.String() +} + type DescribeAdjustmentTypesInput struct { metadataDescribeAdjustmentTypesInput `json:"-" xml:"-"` } @@ -2404,6 +2600,16 @@ type metadataDescribeAdjustmentTypesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAdjustmentTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAdjustmentTypesInput) GoString() string { + return s.String() +} + type DescribeAdjustmentTypesOutput struct { // The policy adjustment types. AdjustmentTypes []*AdjustmentType `type:"list"` @@ -2415,6 +2621,16 @@ type metadataDescribeAdjustmentTypesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAdjustmentTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAdjustmentTypesOutput) GoString() string { + return s.String() +} + type DescribeAutoScalingGroupsInput struct { // The group names. AutoScalingGroupNames []*string `type:"list"` @@ -2433,6 +2649,16 @@ type metadataDescribeAutoScalingGroupsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAutoScalingGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAutoScalingGroupsInput) GoString() string { + return s.String() +} + type DescribeAutoScalingGroupsOutput struct { // The groups. AutoScalingGroups []*Group `type:"list" required:"true"` @@ -2448,11 +2674,21 @@ type metadataDescribeAutoScalingGroupsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAutoScalingGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAutoScalingGroupsOutput) GoString() string { + return s.String() +} + type DescribeAutoScalingInstancesInput struct { // One or more Auto Scaling instances to describe, up to 50 instances. If you // omit this parameter, all Auto Scaling instances are described. If you specify // an ID that does not exist, it is ignored with no error. - InstanceIDs []*string `locationName:"InstanceIds" type:"list"` + InstanceIds []*string `type:"list"` // The maximum number of items to return with this call. MaxRecords *int64 `type:"integer"` @@ -2468,6 +2704,16 @@ type metadataDescribeAutoScalingInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAutoScalingInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAutoScalingInstancesInput) GoString() string { + return s.String() +} + type DescribeAutoScalingInstancesOutput struct { // The instances. AutoScalingInstances []*InstanceDetails `type:"list"` @@ -2483,6 +2729,16 @@ type metadataDescribeAutoScalingInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAutoScalingInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAutoScalingInstancesOutput) GoString() string { + return s.String() +} + type DescribeAutoScalingNotificationTypesInput struct { metadataDescribeAutoScalingNotificationTypesInput `json:"-" xml:"-"` } @@ -2491,6 +2747,16 @@ type metadataDescribeAutoScalingNotificationTypesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAutoScalingNotificationTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAutoScalingNotificationTypesInput) GoString() string { + return s.String() +} + type DescribeAutoScalingNotificationTypesOutput struct { // One or more of the following notification types: // @@ -2512,6 +2778,16 @@ type metadataDescribeAutoScalingNotificationTypesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAutoScalingNotificationTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAutoScalingNotificationTypesOutput) GoString() string { + return s.String() +} + type DescribeLaunchConfigurationsInput struct { // The launch configuration names. LaunchConfigurationNames []*string `type:"list"` @@ -2530,6 +2806,16 @@ type metadataDescribeLaunchConfigurationsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLaunchConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLaunchConfigurationsInput) GoString() string { + return s.String() +} + type DescribeLaunchConfigurationsOutput struct { // The launch configurations. LaunchConfigurations []*LaunchConfiguration `type:"list" required:"true"` @@ -2545,6 +2831,16 @@ type metadataDescribeLaunchConfigurationsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLaunchConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLaunchConfigurationsOutput) GoString() string { + return s.String() +} + type DescribeLifecycleHookTypesInput struct { metadataDescribeLifecycleHookTypesInput `json:"-" xml:"-"` } @@ -2553,6 +2849,16 @@ type metadataDescribeLifecycleHookTypesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLifecycleHookTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLifecycleHookTypesInput) GoString() string { + return s.String() +} + type DescribeLifecycleHookTypesOutput struct { // One or more of the following notification types: // @@ -2568,9 +2874,19 @@ type metadataDescribeLifecycleHookTypesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLifecycleHookTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLifecycleHookTypesOutput) GoString() string { + return s.String() +} + type DescribeLifecycleHooksInput struct { // The name of the group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The names of one or more lifecycle hooks. LifecycleHookNames []*string `type:"list"` @@ -2582,6 +2898,16 @@ type metadataDescribeLifecycleHooksInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLifecycleHooksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLifecycleHooksInput) GoString() string { + return s.String() +} + type DescribeLifecycleHooksOutput struct { // The lifecycle hooks for the specified group. LifecycleHooks []*LifecycleHook `type:"list"` @@ -2593,6 +2919,69 @@ type metadataDescribeLifecycleHooksOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLifecycleHooksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLifecycleHooksOutput) GoString() string { + return s.String() +} + +type DescribeLoadBalancersInput struct { + // The name of the group. + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` + + // The maximum number of items to return with this call. + MaxRecords *int64 `type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + metadataDescribeLoadBalancersInput `json:"-" xml:"-"` +} + +type metadataDescribeLoadBalancersInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeLoadBalancersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancersInput) GoString() string { + return s.String() +} + +type DescribeLoadBalancersOutput struct { + // The load balancers. + LoadBalancers []*LoadBalancerState `type:"list"` + + // The token to use when requesting the next set of items. If there are no additional + // items to return, the string is empty. + NextToken *string `type:"string"` + + metadataDescribeLoadBalancersOutput `json:"-" xml:"-"` +} + +type metadataDescribeLoadBalancersOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeLoadBalancersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancersOutput) GoString() string { + return s.String() +} + type DescribeMetricCollectionTypesInput struct { metadataDescribeMetricCollectionTypesInput `json:"-" xml:"-"` } @@ -2601,30 +2990,21 @@ type metadataDescribeMetricCollectionTypesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeMetricCollectionTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMetricCollectionTypesInput) GoString() string { + return s.String() +} + type DescribeMetricCollectionTypesOutput struct { - // The granularities for the listed metrics. + // The granularities for the metrics. Granularities []*MetricGranularityType `type:"list"` - // One or more of the following metrics: - // - // GroupMinSize - // - // GroupMaxSize - // - // GroupDesiredCapacity - // - // GroupInServiceInstances - // - // GroupPendingInstances - // - // GroupStandbyInstances - // - // GroupTerminatingInstances - // - // GroupTotalInstances - // - // The GroupStandbyInstances metric is not returned by default. You must - // explicitly request it when calling EnableMetricsCollection. + // One or more metrics. Metrics []*MetricCollectionType `type:"list"` metadataDescribeMetricCollectionTypesOutput `json:"-" xml:"-"` @@ -2634,6 +3014,16 @@ type metadataDescribeMetricCollectionTypesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeMetricCollectionTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMetricCollectionTypesOutput) GoString() string { + return s.String() +} + type DescribeNotificationConfigurationsInput struct { // The name of the group. AutoScalingGroupNames []*string `type:"list"` @@ -2652,6 +3042,16 @@ type metadataDescribeNotificationConfigurationsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeNotificationConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNotificationConfigurationsInput) GoString() string { + return s.String() +} + type DescribeNotificationConfigurationsOutput struct { // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -2667,9 +3067,19 @@ type metadataDescribeNotificationConfigurationsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeNotificationConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNotificationConfigurationsOutput) GoString() string { + return s.String() +} + type DescribePoliciesInput struct { // The name of the group. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // The maximum number of items to be returned with each call. MaxRecords *int64 `type:"integer"` @@ -2684,6 +3094,9 @@ type DescribePoliciesInput struct { // an unknown policy name, it is ignored with no error. PolicyNames []*string `type:"list"` + // One or more policy types. Valid values are SimpleScaling and StepScaling. + PolicyTypes []*string `type:"list"` + metadataDescribePoliciesInput `json:"-" xml:"-"` } @@ -2691,6 +3104,16 @@ type metadataDescribePoliciesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribePoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePoliciesInput) GoString() string { + return s.String() +} + type DescribePoliciesOutput struct { // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -2706,16 +3129,26 @@ type metadataDescribePoliciesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribePoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePoliciesOutput) GoString() string { + return s.String() +} + type DescribeScalingActivitiesInput struct { - // A list containing the activity IDs of the desired scaling activities. If - // this list is omitted, all activities are described. If an AutoScalingGroupName - // is provided, the results are limited to that group. The list of requested - // activities cannot contain more than 50 items. If unknown activities are requested, - // they are ignored with no error. - ActivityIDs []*string `locationName:"ActivityIds" type:"list"` + // The activity IDs of the desired scaling activities. If this list is omitted, + // all activities are described. If the AutoScalingGroupName parameter is provided, + // the results are limited to that group. The list of requested activities cannot + // contain more than 50 items. If unknown activities are requested, they are + // ignored with no error. + ActivityIds []*string `type:"list"` // The name of the group. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // The maximum number of items to return with this call. MaxRecords *int64 `type:"integer"` @@ -2731,6 +3164,16 @@ type metadataDescribeScalingActivitiesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeScalingActivitiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScalingActivitiesInput) GoString() string { + return s.String() +} + type DescribeScalingActivitiesOutput struct { // The scaling activities. Activities []*Activity `type:"list" required:"true"` @@ -2746,6 +3189,16 @@ type metadataDescribeScalingActivitiesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeScalingActivitiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScalingActivitiesOutput) GoString() string { + return s.String() +} + type DescribeScalingProcessTypesInput struct { metadataDescribeScalingProcessTypesInput `json:"-" xml:"-"` } @@ -2754,6 +3207,16 @@ type metadataDescribeScalingProcessTypesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeScalingProcessTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScalingProcessTypesInput) GoString() string { + return s.String() +} + type DescribeScalingProcessTypesOutput struct { // The names of the process types. Processes []*ProcessType `type:"list"` @@ -2765,9 +3228,19 @@ type metadataDescribeScalingProcessTypesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeScalingProcessTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScalingProcessTypesOutput) GoString() string { + return s.String() +} + type DescribeScheduledActionsInput struct { // The name of the group. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // The latest scheduled start time to return. If scheduled action names are // provided, this parameter is ignored. @@ -2800,6 +3273,16 @@ type metadataDescribeScheduledActionsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeScheduledActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledActionsInput) GoString() string { + return s.String() +} + type DescribeScheduledActionsOutput struct { // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -2815,11 +3298,18 @@ type metadataDescribeScheduledActionsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeScheduledActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledActionsOutput) GoString() string { + return s.String() +} + type DescribeTagsInput struct { - // The value of the filter type used to identify the tags to be returned. For - // example, you can filter so that tags are returned according to Auto Scaling - // group, the key and value, or whether the new tag will be applied to instances - // launched after the tag is created (PropagateAtLaunch). + // A filter used to scope the tags to return. Filters []*Filter `type:"list"` // The maximum number of items to return with this call. @@ -2836,6 +3326,16 @@ type metadataDescribeTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsInput) GoString() string { + return s.String() +} + type DescribeTagsOutput struct { // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -2851,6 +3351,16 @@ type metadataDescribeTagsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsOutput) GoString() string { + return s.String() +} + type DescribeTerminationPolicyTypesInput struct { metadataDescribeTerminationPolicyTypesInput `json:"-" xml:"-"` } @@ -2859,10 +3369,19 @@ type metadataDescribeTerminationPolicyTypesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeTerminationPolicyTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTerminationPolicyTypesInput) GoString() string { + return s.String() +} + type DescribeTerminationPolicyTypesOutput struct { - // The Termination policies supported by Auto Scaling. They are: OldestInstance, - // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, and - // Default. + // The termination policies supported by Auto Scaling (OldestInstance, OldestLaunchConfiguration, + // NewestInstance, ClosestToNextInstanceHour, and Default). TerminationPolicyTypes []*string `type:"list"` metadataDescribeTerminationPolicyTypesOutput `json:"-" xml:"-"` @@ -2872,12 +3391,22 @@ type metadataDescribeTerminationPolicyTypesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeTerminationPolicyTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTerminationPolicyTypesOutput) GoString() string { + return s.String() +} + type DetachInstancesInput struct { // The name of the group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // One or more instance IDs. - InstanceIDs []*string `locationName:"InstanceIds" type:"list"` + InstanceIds []*string `type:"list"` // If True, the Auto Scaling group decrements the desired capacity value by // the number of instances detached. @@ -2890,6 +3419,16 @@ type metadataDetachInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DetachInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachInstancesInput) GoString() string { + return s.String() +} + type DetachInstancesOutput struct { // The activities related to detaching the instances from the Auto Scaling group. Activities []*Activity `type:"list"` @@ -2901,11 +3440,63 @@ type metadataDetachInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DetachInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachInstancesOutput) GoString() string { + return s.String() +} + +type DetachLoadBalancersInput struct { + // The name of the group. + AutoScalingGroupName *string `min:"1" type:"string"` + + // One or more load balancer names. + LoadBalancerNames []*string `type:"list"` + + metadataDetachLoadBalancersInput `json:"-" xml:"-"` +} + +type metadataDetachLoadBalancersInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DetachLoadBalancersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachLoadBalancersInput) GoString() string { + return s.String() +} + +type DetachLoadBalancersOutput struct { + metadataDetachLoadBalancersOutput `json:"-" xml:"-"` +} + +type metadataDetachLoadBalancersOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DetachLoadBalancersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachLoadBalancersOutput) GoString() string { + return s.String() +} + type DisableMetricsCollectionInput struct { // The name or Amazon Resource Name (ARN) of the group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // One or more of the following metrics: + // One or more metrics. If you omit this parameter, all metrics are disabled. // // GroupMinSize // @@ -2922,8 +3513,6 @@ type DisableMetricsCollectionInput struct { // GroupTerminatingInstances // // GroupTotalInstances - // - // If you omit this parameter, all metrics are disabled. Metrics []*string `type:"list"` metadataDisableMetricsCollectionInput `json:"-" xml:"-"` @@ -2933,6 +3522,16 @@ type metadataDisableMetricsCollectionInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisableMetricsCollectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableMetricsCollectionInput) GoString() string { + return s.String() +} + type DisableMetricsCollectionOutput struct { metadataDisableMetricsCollectionOutput `json:"-" xml:"-"` } @@ -2941,8 +3540,18 @@ type metadataDisableMetricsCollectionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisableMetricsCollectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableMetricsCollectionOutput) GoString() string { + return s.String() +} + // Describes an Amazon EBS volume. -type EBS struct { +type Ebs struct { // Indicates whether to delete the volume on instance termination. // // Default: true @@ -2954,10 +3563,10 @@ type EBS struct { // Valid values: Range is 100 to 4000. // // Default: None - IOPS *int64 `locationName:"Iops" type:"integer"` + Iops *int64 `min:"100" type:"integer"` // The ID of the snapshot. - SnapshotID *string `locationName:"SnapshotId" type:"string"` + SnapshotId *string `min:"1" type:"string"` // The volume size, in gigabytes. // @@ -2969,31 +3578,41 @@ type EBS struct { // volume size, the default is the size of the snapshot. // // Required: Required when the volume type is io1. - VolumeSize *int64 `type:"integer"` + VolumeSize *int64 `min:"1" type:"integer"` // The volume type. // // Valid values: standard | io1 | gp2 // // Default: standard - VolumeType *string `type:"string"` + VolumeType *string `min:"1" type:"string"` - metadataEBS `json:"-" xml:"-"` + metadataEbs `json:"-" xml:"-"` } -type metadataEBS struct { +type metadataEbs struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Ebs) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Ebs) GoString() string { + return s.String() +} + type EnableMetricsCollectionInput struct { // The name or ARN of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // The granularity to associate with the metrics to collect. Currently, the - // only valid value is "1Minute". - Granularity *string `type:"string" required:"true"` + // The granularity to associate with the metrics to collect. The only valid + // value is 1Minute. + Granularity *string `min:"1" type:"string" required:"true"` - // One or more of the following metrics: + // One or more metrics. If you omit this parameter, all metrics are enabled. // // GroupMinSize // @@ -3011,10 +3630,8 @@ type EnableMetricsCollectionInput struct { // // GroupTotalInstances // - // If you omit this parameter, all metrics are enabled. - // - // The GroupStandbyInstances metric is not returned by default. You must explicitly - // request it when calling EnableMetricsCollection. + // Note that the GroupStandbyInstances metric is not enabled by default. You + // must explicitly request this metric. Metrics []*string `type:"list"` metadataEnableMetricsCollectionInput `json:"-" xml:"-"` @@ -3024,6 +3641,16 @@ type metadataEnableMetricsCollectionInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnableMetricsCollectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableMetricsCollectionInput) GoString() string { + return s.String() +} + type EnableMetricsCollectionOutput struct { metadataEnableMetricsCollectionOutput `json:"-" xml:"-"` } @@ -3032,13 +3659,39 @@ type metadataEnableMetricsCollectionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnableMetricsCollectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableMetricsCollectionOutput) GoString() string { + return s.String() +} + // Describes an enabled metric. type EnabledMetric struct { - // The granularity of the metric. - Granularity *string `type:"string"` + // The granularity of the metric. The only valid value is 1Minute. + Granularity *string `min:"1" type:"string"` // The name of the metric. - Metric *string `type:"string"` + // + // GroupMinSize + // + // GroupMaxSize + // + // GroupDesiredCapacity + // + // GroupInServiceInstances + // + // GroupPendingInstances + // + // GroupStandbyInstances + // + // GroupTerminatingInstances + // + // GroupTotalInstances + Metric *string `min:"1" type:"string"` metadataEnabledMetric `json:"-" xml:"-"` } @@ -3047,13 +3700,23 @@ type metadataEnabledMetric struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnabledMetric) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnabledMetric) GoString() string { + return s.String() +} + type EnterStandbyInput struct { // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // One or more instances to move into Standby mode. You must specify at least // one instance ID. - InstanceIDs []*string `locationName:"InstanceIds" type:"list"` + InstanceIds []*string `type:"list"` // Specifies whether the instances moved to Standby mode count as part of the // Auto Scaling group's desired capacity. If set, the desired capacity for the @@ -3068,6 +3731,16 @@ type metadataEnterStandbyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnterStandbyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnterStandbyInput) GoString() string { + return s.String() +} + type EnterStandbyOutput struct { // The activities related to moving instances into Standby mode. Activities []*Activity `type:"list"` @@ -3079,23 +3752,51 @@ type metadataEnterStandbyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnterStandbyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnterStandbyOutput) GoString() string { + return s.String() +} + type ExecutePolicyInput struct { // The name or Amazon Resource Name (ARN) of the Auto Scaling group. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` - // Set to True if you want Auto Scaling to wait for the cooldown period associated - // with the Auto Scaling group to complete before executing the policy. + // The breach threshold for the alarm. // - // Set to False if you want Auto Scaling to circumvent the cooldown period - // associated with the Auto Scaling group and execute the policy before the - // cooldown period ends. + // This parameter is required if the policy type is StepScaling and not supported + // otherwise. + BreachThreshold *float64 `type:"double"` + + // If this parameter is true, Auto Scaling waits for the cooldown period to + // complete before executing the policy. Otherwise, Auto Scaling executes the + // policy without waiting for the cooldown period to complete. + // + // This parameter is not supported if the policy type is StepScaling. // // For more information, see Understanding Auto Scaling Cooldowns (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/Cooldown.html) // in the Auto Scaling Developer Guide. HonorCooldown *bool `type:"boolean"` + // The metric value to compare to BreachThreshold. This enables you to execute + // a policy of type StepScaling and determine which step adjustment to use. + // For example, if the breach threshold is 50 and you want to use a step adjustment + // with a lower bound of 0 and an upper bound of 10, you can set the metric + // value to 59. + // + // If you specify a metric value that doesn't correspond to a step adjustment + // for the policy, the call returns an error. + // + // This parameter is required if the policy type is StepScaling and not supported + // otherwise. + MetricValue *float64 `type:"double"` + // The name or ARN of the policy. - PolicyName *string `type:"string" required:"true"` + PolicyName *string `min:"1" type:"string" required:"true"` metadataExecutePolicyInput `json:"-" xml:"-"` } @@ -3104,6 +3805,16 @@ type metadataExecutePolicyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ExecutePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExecutePolicyInput) GoString() string { + return s.String() +} + type ExecutePolicyOutput struct { metadataExecutePolicyOutput `json:"-" xml:"-"` } @@ -3112,12 +3823,22 @@ type metadataExecutePolicyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ExecutePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExecutePolicyOutput) GoString() string { + return s.String() +} + type ExitStandbyInput struct { // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // One or more instance IDs. You must specify at least one instance ID. - InstanceIDs []*string `locationName:"InstanceIds" type:"list"` + InstanceIds []*string `type:"list"` metadataExitStandbyInput `json:"-" xml:"-"` } @@ -3126,6 +3847,16 @@ type metadataExitStandbyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ExitStandbyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExitStandbyInput) GoString() string { + return s.String() +} + type ExitStandbyOutput struct { // The activities related to moving instances out of Standby mode. Activities []*Activity `type:"list"` @@ -3137,6 +3868,16 @@ type metadataExitStandbyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ExitStandbyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExitStandbyOutput) GoString() string { + return s.String() +} + // Describes a filter. type Filter struct { // The name of the filter. The valid values are: "auto-scaling-group", "key", @@ -3153,16 +3894,26 @@ type metadataFilter struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + // Describes an Auto Scaling group. type Group struct { // The Amazon Resource Name (ARN) of the group. - AutoScalingGroupARN *string `type:"string"` + AutoScalingGroupARN *string `min:"1" type:"string"` // The name of the group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // One or more Availability Zones for the group. - AvailabilityZones []*string `type:"list" required:"true"` + AvailabilityZones []*string `min:"1" type:"list" required:"true"` // The date and time the group was created. CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` @@ -3171,10 +3922,10 @@ type Group struct { // scaling activities can start. DefaultCooldown *int64 `type:"integer" required:"true"` - // The size of the group. + // The desired size of the group. DesiredCapacity *int64 `type:"integer" required:"true"` - // The metrics enabled for this Auto Scaling group. + // The metrics enabled for the group. EnabledMetrics []*EnabledMetric `type:"list"` // The amount of time that Auto Scaling waits before checking an instance's @@ -3183,13 +3934,13 @@ type Group struct { // The service of interest for the health status check, which can be either // EC2 for Amazon EC2 or ELB for Elastic Load Balancing. - HealthCheckType *string `type:"string" required:"true"` + HealthCheckType *string `min:"1" type:"string" required:"true"` // The EC2 instances associated with the group. Instances []*Instance `type:"list"` // The name of the associated launch configuration. - LaunchConfigurationName *string `type:"string" required:"true"` + LaunchConfigurationName *string `min:"1" type:"string" required:"true"` // One or more load balancers associated with the group. LoadBalancerNames []*string `type:"list"` @@ -3202,26 +3953,25 @@ type Group struct { // 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). - PlacementGroup *string `type:"string"` + PlacementGroup *string `min:"1" type:"string"` - // The current state of the Auto Scaling group when a DeleteAutoScalingGroup - // action is in progress. - Status *string `type:"string"` + // The current state of the group when DeleteAutoScalingGroup is in progress. + Status *string `min:"1" type:"string"` // The suspended processes associated with the group. SuspendedProcesses []*SuspendedProcess `type:"list"` - // The tags for the Auto Scaling group. + // The tags for the group. Tags []*TagDescription `type:"list"` - // The termination policies for this Auto Scaling group. + // The termination policies for the group. TerminationPolicies []*string `type:"list"` // One or more subnet IDs, if applicable, separated by commas. // // If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the // Availability Zones of the subnets match the values for AvailabilityZones. - VPCZoneIdentifier *string `type:"string"` + VPCZoneIdentifier *string `min:"1" type:"string"` metadataGroup `json:"-" xml:"-"` } @@ -3230,24 +3980,33 @@ type metadataGroup struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Group) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Group) GoString() string { + return s.String() +} + // Describes an EC2 instance. type Instance struct { - // The Availability Zone associated with this instance. - AvailabilityZone *string `type:"string" required:"true"` + // The Availability Zone in which the instance is running. + AvailabilityZone *string `min:"1" type:"string" required:"true"` // The health status of the instance. - HealthStatus *string `type:"string" required:"true"` + HealthStatus *string `min:"1" type:"string" required:"true"` // The ID of the instance. - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `min:"1" type:"string" required:"true"` // The launch configuration associated with the instance. - LaunchConfigurationName *string `type:"string" required:"true"` + LaunchConfigurationName *string `min:"1" type:"string" required:"true"` - // A description of the current lifecycle state. - // - // The Quarantined lifecycle state is not used. - LifecycleState *string `type:"string" required:"true"` + // A description of the current lifecycle state. Note that the Quarantined state + // is not used. + LifecycleState *string `type:"string" required:"true" enum:"LifecycleState"` metadataInstance `json:"-" xml:"-"` } @@ -3256,29 +4015,39 @@ type metadataInstance struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Instance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Instance) GoString() string { + return s.String() +} + // Describes an EC2 instance associated with an Auto Scaling group. type InstanceDetails struct { // The name of the Auto Scaling group associated with the instance. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The Availability Zone for the instance. - AvailabilityZone *string `type:"string" required:"true"` + AvailabilityZone *string `min:"1" type:"string" required:"true"` // The health status of this instance. "Healthy" means that the instance is // healthy and should remain in service. "Unhealthy" means that the instance // is unhealthy and Auto Scaling should terminate and replace it. - HealthStatus *string `type:"string" required:"true"` + HealthStatus *string `min:"1" type:"string" required:"true"` // The ID of the instance. - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `min:"1" type:"string" required:"true"` // The launch configuration associated with the instance. - LaunchConfigurationName *string `type:"string" required:"true"` + LaunchConfigurationName *string `min:"1" type:"string" required:"true"` // The lifecycle state for the instance. For more information, see Auto Scaling // Instance States (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/AutoScalingGroupLifecycle.html#AutoScalingStates) // in the Auto Scaling Developer Guide. - LifecycleState *string `type:"string" required:"true"` + LifecycleState *string `min:"1" type:"string" required:"true"` metadataInstanceDetails `json:"-" xml:"-"` } @@ -3287,6 +4056,16 @@ type metadataInstanceDetails struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceDetails) GoString() string { + return s.String() +} + // Describes whether instance monitoring is enabled. type InstanceMonitoring struct { // If True, instance monitoring is enabled. @@ -3299,21 +4078,30 @@ type metadataInstanceMonitoring struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceMonitoring) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceMonitoring) GoString() string { + return s.String() +} + // Describes a launch configuration. type LaunchConfiguration struct { - // Specifies whether the EC2 instances are associated with a public IP address - // (true) or not (false). - AssociatePublicIPAddress *bool `locationName:"AssociatePublicIpAddress" type:"boolean"` + // Specifies whether the instances are associated with a public IP address (true) + // or not (false). + AssociatePublicIpAddress *bool `type:"boolean"` - // A block device mapping that specifies how block devices are exposed to the - // instance. Each mapping is made up of a virtualName and a deviceName. + // A block device mapping, which specifies the block devices for the instance. BlockDeviceMappings []*BlockDeviceMapping `type:"list"` // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. // This parameter can only be used if you are launching EC2-Classic instances. // For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) // in the Amazon Elastic Compute Cloud User Guide. - ClassicLinkVPCID *string `locationName:"ClassicLinkVPCId" type:"string"` + ClassicLinkVPCId *string `min:"1" type:"string"` // The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId. // This parameter is required if ClassicLinkVPCId is specified, and cannot be @@ -3325,48 +4113,48 @@ type LaunchConfiguration struct { CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` // Controls whether the instance is optimized for EBS I/O (true) or not (false). - EBSOptimized *bool `locationName:"EbsOptimized" type:"boolean"` + EbsOptimized *bool `type:"boolean"` // The name or Amazon Resource Name (ARN) of the instance profile associated // with the IAM role for the instance. - IAMInstanceProfile *string `locationName:"IamInstanceProfile" type:"string"` + IamInstanceProfile *string `min:"1" type:"string"` // The ID of the Amazon Machine Image (AMI). - ImageID *string `locationName:"ImageId" type:"string" required:"true"` + ImageId *string `min:"1" type:"string" required:"true"` // Controls whether instances in this group are launched with detailed monitoring. InstanceMonitoring *InstanceMonitoring `type:"structure"` - // The instance type for the EC2 instances. - InstanceType *string `type:"string" required:"true"` + // The instance type for the instances. + InstanceType *string `min:"1" type:"string" required:"true"` // The ID of the kernel associated with the AMI. - KernelID *string `locationName:"KernelId" type:"string"` + KernelId *string `min:"1" type:"string"` // The name of the key pair. - KeyName *string `type:"string"` + KeyName *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the launch configuration. - LaunchConfigurationARN *string `type:"string"` + LaunchConfigurationARN *string `min:"1" type:"string"` // The name of the launch configuration. - LaunchConfigurationName *string `type:"string" required:"true"` + LaunchConfigurationName *string `min:"1" type:"string" required:"true"` // The tenancy of the instance, either default or dedicated. An instance with // dedicated tenancy runs in an isolated, single-tenant hardware and can only - // be launched in a VPC. - PlacementTenancy *string `type:"string"` + // be launched into a VPC. + PlacementTenancy *string `min:"1" type:"string"` // The ID of the RAM disk associated with the AMI. - RAMDiskID *string `locationName:"RamdiskId" type:"string"` + RamdiskId *string `min:"1" type:"string"` - // The security groups to associate with the EC2 instances. + // The security groups to associate with the instances. SecurityGroups []*string `type:"list"` // The price to bid when launching Spot Instances. - SpotPrice *string `type:"string"` + SpotPrice *string `min:"1" type:"string"` - // The user data available to the EC2 instances. + // The user data available to the instances. UserData *string `type:"string"` metadataLaunchConfiguration `json:"-" xml:"-"` @@ -3376,6 +4164,16 @@ type metadataLaunchConfiguration struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s LaunchConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchConfiguration) GoString() string { + return s.String() +} + // Describes a lifecycle hook, which tells Auto Scaling that you want to perform // an action when an instance launches or terminates. When you have a lifecycle // hook in place, the Auto Scaling group will either: @@ -3387,7 +4185,7 @@ type metadataLaunchConfiguration struct { // in the Auto Scaling Developer Guide. type LifecycleHook struct { // The name of the Auto Scaling group for the lifecycle hook. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // Defines the action the Auto Scaling group should take when the lifecycle // hook timeout elapses or if an unexpected failure occurs. The valid values @@ -3395,7 +4193,7 @@ type LifecycleHook struct { DefaultResult *string `type:"string"` // The maximum length of time an instance can remain in a Pending:Wait or Terminating:Wait - // state. Currently, this value is set at 48 hours. + // state. Currently, the maximum is set to 48 hours. GlobalTimeout *int64 `type:"integer"` // The amount of time that can elapse before the lifecycle hook times out. When @@ -3405,15 +4203,15 @@ type LifecycleHook struct { HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. - LifecycleHookName *string `type:"string"` + LifecycleHookName *string `min:"1" type:"string"` // The state of the EC2 instance to which you want to attach the lifecycle hook. - // For a list of lifecycle hook types, see DescribeLifecycleHooks. + // For a list of lifecycle hook types, see DescribeLifecycleHookTypes. LifecycleTransition *string `type:"string"` // Additional information that you want to include any time Auto Scaling sends // a message to the notification target. - NotificationMetadata *string `type:"string"` + NotificationMetadata *string `min:"1" type:"string"` // The ARN of the notification target that Auto Scaling uses to notify you when // an instance is in the transition state for the lifecycle hook. This ARN target @@ -3422,11 +4220,11 @@ type LifecycleHook struct { // // Lifecycle action token User account ID Name of the Auto Scaling group Lifecycle // hook name EC2 instance ID Lifecycle transition Notification metadata - NotificationTargetARN *string `type:"string"` + NotificationTargetARN *string `min:"1" type:"string"` // The ARN of the IAM role that allows the Auto Scaling group to publish to // the specified notification target. - RoleARN *string `type:"string"` + RoleARN *string `min:"1" type:"string"` metadataLifecycleHook `json:"-" xml:"-"` } @@ -3435,10 +4233,72 @@ type metadataLifecycleHook struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s LifecycleHook) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LifecycleHook) GoString() string { + return s.String() +} + +// Describes the state of a load balancer. +type LoadBalancerState struct { + // The name of the load balancer. + LoadBalancerName *string `min:"1" type:"string"` + + // The state of the load balancer. + // + // Adding - The instances in the group are being registered with the load + // balancer. + // + // Added - All instances in the group are registered with the load balancer. + // + // InService - At least one instance in the group passed an ELB health check. + // + // Removing - The instances are being deregistered from the load balancer. + // If connection draining is enabled, Elastic Load Balancing waits for in-flight + // requests to complete before deregistering the instances. + State *string `min:"1" type:"string"` + + metadataLoadBalancerState `json:"-" xml:"-"` +} + +type metadataLoadBalancerState struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s LoadBalancerState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadBalancerState) GoString() string { + return s.String() +} + // Describes a metric. type MetricCollectionType struct { // The metric. - Metric *string `type:"string"` + // + // GroupMinSize + // + // GroupMaxSize + // + // GroupDesiredCapacity + // + // GroupInServiceInstances + // + // GroupPendingInstances + // + // GroupStandbyInstances + // + // GroupTerminatingInstances + // + // GroupTotalInstances + Metric *string `min:"1" type:"string"` metadataMetricCollectionType `json:"-" xml:"-"` } @@ -3447,10 +4307,20 @@ type metadataMetricCollectionType struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s MetricCollectionType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricCollectionType) GoString() string { + return s.String() +} + // Describes a granularity of a metric. type MetricGranularityType struct { - // The granularity. - Granularity *string `type:"string"` + // The granularity. The only valid value is 1Minute. + Granularity *string `min:"1" type:"string"` metadataMetricGranularityType `json:"-" xml:"-"` } @@ -3459,17 +4329,37 @@ type metadataMetricGranularityType struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s MetricGranularityType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricGranularityType) GoString() string { + return s.String() +} + // Describes a notification. type NotificationConfiguration struct { // The name of the group. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // The types of events for an action to start. - NotificationType *string `type:"string"` + // + // autoscaling:EC2_INSTANCE_LAUNCH + // + // autoscaling:EC2_INSTANCE_LAUNCH_ERROR + // + // autoscaling:EC2_INSTANCE_TERMINATE + // + // autoscaling:EC2_INSTANCE_TERMINATE_ERROR + // + // autoscaling:TEST_NOTIFICATION + NotificationType *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service // (SNS) topic. - TopicARN *string `type:"string"` + TopicARN *string `min:"1" type:"string"` metadataNotificationConfiguration `json:"-" xml:"-"` } @@ -3478,81 +4368,39 @@ type metadataNotificationConfiguration struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NotificationConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotificationConfiguration) GoString() string { + return s.String() +} + // Describes a process type. // -// There are two primary Auto Scaling process types--Launch and Terminate. -// The Launch process creates a new EC2 instance for an Auto Scaling group, -// and the Terminate process removes an existing EC2 instance. The remaining -// Auto Scaling process types relate to specific Auto Scaling features: -// -// AddToLoadBalancer AlarmNotification AZRebalance HealthCheck ReplaceUnhealthy -// ScheduledActions If you suspend Launch or Terminate, all other process -// types are affected to varying degrees. The following descriptions discuss -// how each process type is affected by a suspension of Launch or Terminate. -// The AddToLoadBalancer process type adds instances to the load balancer when -// the instances are launched. If you suspend this process, Auto Scaling will -// launch the instances but will not add them to the load balancer. If you resume -// the AddToLoadBalancer process, Auto Scaling will also resume adding new instances -// to the load balancer when they are launched. However, Auto Scaling will not -// add running instances that were launched while the process was suspended; -// those instances must be added manually using the RegisterInstancesWithLoadBalancer -// (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_RegisterInstancesWithLoadBalancer.html) -// call. -// -// The AlarmNotification process type accepts notifications from Amazon CloudWatch -// alarms that are associated with the Auto Scaling group. If you suspend the -// AlarmNotification process type, Auto Scaling will not automatically execute -// scaling policies that would be triggered by alarms. -// -// Although the AlarmNotification process type is not directly affected by -// a suspension of Launch or Terminate, alarm notifications are often used to -// signal that a change in the size of the Auto Scaling group is warranted. -// If you suspend Launch or Terminate, Auto Scaling might not be able to implement -// the alarm's associated policy. -// -// The AZRebalance process type seeks to maintain a balanced number of instances -// across Availability Zones within a Region. If you remove an Availability -// Zone from your Auto Scaling group or an Availability Zone otherwise becomes -// unhealthy or unavailable, Auto Scaling launches new instances in an unaffected -// Availability Zone before terminating the unhealthy or unavailable instances. -// When the unhealthy Availability Zone returns to a healthy state, Auto Scaling -// automatically redistributes the application instances evenly across all of -// the designated Availability Zones. -// -// If you call SuspendProcesses on the launch process type, the AZRebalance -// process will neither launch new instances nor terminate existing instances. -// This is because the AZRebalance process terminates existing instances only -// after launching the replacement instances. -// -// If you call SuspendProcesses on the terminate process type, the AZRebalance -// process can cause your Auto Scaling group to grow up to ten percent larger -// than the maximum size. This is because Auto Scaling allows groups to temporarily -// grow larger than the maximum size during rebalancing activities. If Auto -// Scaling cannot terminate instances, your Auto Scaling group could remain -// up to ten percent larger than the maximum size until you resume the terminate -// process type. -// -// The HealthCheck process type checks the health of the instances. Auto Scaling -// marks an instance as unhealthy if Amazon EC2 or Elastic Load Balancing informs -// Auto Scaling that the instance is unhealthy. The HealthCheck process can -// override the health status of an instance that you set with SetInstanceHealth. -// -// The ReplaceUnhealthy process type terminates instances that are marked as -// unhealthy and subsequently creates new instances to replace them. This process -// calls both of the primary process types--first Terminate and then Launch. -// -// The HealthCheck process type works in conjunction with the ReplaceUnhealthly -// process type to provide health check functionality. If you suspend either -// Launch or Terminate, the ReplaceUnhealthy process type will not function -// properly. -// -// The ScheduledActions process type performs scheduled actions that you create -// with PutScheduledUpdateGroupAction. Scheduled actions often involve launching -// new instances or terminating existing instances. If you suspend either Launch -// or Terminate, your scheduled actions might not function as expected. +// 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. - ProcessName *string `type:"string" required:"true"` + // + // Launch + // + // Terminate + // + // AddToLoadBalancer + // + // AlarmNotification + // + // AZRebalance + // + // HealthCheck + // + // ReplaceUnhealthy + // + // ScheduledActions + ProcessName *string `min:"1" type:"string" required:"true"` metadataProcessType `json:"-" xml:"-"` } @@ -3561,10 +4409,20 @@ type metadataProcessType struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ProcessType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProcessType) GoString() string { + return s.String() +} + type PutLifecycleHookInput struct { // The name of the Auto Scaling group to which you want to assign the lifecycle // hook. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // Defines the action the Auto Scaling group should take when the lifecycle // hook timeout elapses or if an unexpected failure occurs. The value for this @@ -3580,27 +4438,27 @@ type PutLifecycleHookInput struct { HeartbeatTimeout *int64 `type:"integer"` // The name of the lifecycle hook. - LifecycleHookName *string `type:"string" required:"true"` + LifecycleHookName *string `min:"1" type:"string" required:"true"` - // The Amazon EC2 instance state to which you want to attach the lifecycle hook. - // See DescribeLifecycleHookTypes for a list of available lifecycle hook types. + // The instance state to which you want to attach the lifecycle hook. For a + // list of lifecycle hook types, see DescribeLifecycleHookTypes. // - // This parameter is required for new lifecycle hooks, but optional when updating + // This parameter is required for new lifecycle hooks, but optional when updating // existing hooks. LifecycleTransition *string `type:"string"` // Contains additional information that you want to include any time Auto Scaling // sends a message to the notification target. - NotificationMetadata *string `type:"string"` + NotificationMetadata *string `min:"1" type:"string"` // The ARN of the notification target that Auto Scaling will use to notify you // when an instance is in the transition state for the lifecycle hook. This // ARN target can be either an SQS queue or an SNS topic. // - // This parameter is required for new lifecycle hooks, but optional when updating + // This parameter is required for new lifecycle hooks, but optional when updating // existing hooks. // - // The notification message sent to the target will include: + // The notification message sent to the target will include: // // LifecycleActionToken. The Lifecycle action token. AccountId. The user // account ID. AutoScalingGroupName. The name of the Auto Scaling group. LifecycleHookName. @@ -3612,14 +4470,14 @@ type PutLifecycleHookInput struct { // // When you call this operation, a test message is sent to the notification // target. This test message contains an additional key/value pair: Event:autoscaling:TEST_NOTIFICATION. - NotificationTargetARN *string `type:"string"` + NotificationTargetARN *string `min:"1" type:"string"` // The ARN of the IAM role that allows the Auto Scaling group to publish to // the specified notification target. // - // This parameter is required for new lifecycle hooks, but optional when updating + // This parameter is required for new lifecycle hooks, but optional when updating // existing hooks. - RoleARN *string `type:"string"` + RoleARN *string `min:"1" type:"string"` metadataPutLifecycleHookInput `json:"-" xml:"-"` } @@ -3628,6 +4486,16 @@ type metadataPutLifecycleHookInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PutLifecycleHookInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLifecycleHookInput) GoString() string { + return s.String() +} + type PutLifecycleHookOutput struct { metadataPutLifecycleHookOutput `json:"-" xml:"-"` } @@ -3636,9 +4504,19 @@ type metadataPutLifecycleHookOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PutLifecycleHookOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLifecycleHookOutput) GoString() string { + return s.String() +} + type PutNotificationConfigurationInput struct { // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The type of event that will cause the notification to be sent. For details // about notification types supported by Auto Scaling, see DescribeAutoScalingNotificationTypes. @@ -3646,7 +4524,7 @@ type PutNotificationConfigurationInput struct { // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service // (SNS) topic. - TopicARN *string `type:"string" required:"true"` + TopicARN *string `min:"1" type:"string" required:"true"` metadataPutNotificationConfigurationInput `json:"-" xml:"-"` } @@ -3655,6 +4533,16 @@ type metadataPutNotificationConfigurationInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PutNotificationConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutNotificationConfigurationInput) GoString() string { + return s.String() +} + type PutNotificationConfigurationOutput struct { metadataPutNotificationConfigurationOutput `json:"-" xml:"-"` } @@ -3663,41 +4551,81 @@ type metadataPutNotificationConfigurationOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PutNotificationConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutNotificationConfigurationOutput) GoString() string { + return s.String() +} + type PutScalingPolicyInput struct { - // Specifies whether the ScalingAdjustment is an absolute number or a percentage - // of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, - // and PercentChangeInCapacity. + // The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and + // PercentChangeInCapacity. // // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html) // in the Auto Scaling Developer Guide. - AdjustmentType *string `type:"string" required:"true"` + AdjustmentType *string `min:"1" type:"string" required:"true"` // The name or ARN of the group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The amount of time, in seconds, after a scaling activity completes and before - // the next scaling activity can start. + // the next scaling activity can start. If this parameter is not specified, + // the default cooldown period for the group applies. + // + // This parameter is not supported unless the policy type is SimpleScaling. // // For more information, see Understanding Auto Scaling Cooldowns (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/Cooldown.html) // in the Auto Scaling Developer Guide. Cooldown *int64 `type:"integer"` - // Used with AdjustmentType with the value PercentChangeInCapacity, the scaling - // policy changes the DesiredCapacity of the Auto Scaling group by at least - // the number of instances specified in the value. + // The estimated time, in seconds, until a newly launched instance can contribute + // to the CloudWatch metrics. The default is to use the value specified for + // the default cooldown period for the group. // - // You will get a ValidationError if you use MinAdjustmentStep on a policy - // with an AdjustmentType other than PercentChangeInCapacity. + // This parameter is not supported if the policy type is SimpleScaling. + EstimatedInstanceWarmup *int64 `type:"integer"` + + // The aggregation type for the CloudWatch metrics. Valid values are Minimum, + // Maximum, and Average. If the aggregation type is null, the value is treated + // as Average. + // + // This parameter is not supported if the policy type is SimpleScaling. + MetricAggregationType *string `min:"1" type:"string"` + + // The minimum number of instances to scale. If the value of AdjustmentType + // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity + // of the Auto Scaling group by at least this many instances. Otherwise, the + // error is ValidationError. + MinAdjustmentMagnitude *int64 `type:"integer"` + + // Available for backward compatibility. Use MinAdjustmentMagnitude instead. MinAdjustmentStep *int64 `type:"integer"` // The name of the policy. - PolicyName *string `type:"string" required:"true"` + PolicyName *string `min:"1" type:"string" required:"true"` - // The number of instances by which to scale. AdjustmentType determines the - // interpretation of this number (e.g., as an absolute number or as a percentage - // of the existing Auto Scaling group size). A positive increment adds to the - // current capacity and a negative value removes from the current capacity. - ScalingAdjustment *int64 `type:"integer" required:"true"` + // The policy type. Valid values are SimpleScaling and StepScaling. If the policy + // type is null, the value is treated as SimpleScaling. + PolicyType *string `min:"1" type:"string"` + + // The amount by which to scale, based on the specified adjustment type. A positive + // value adds to the current capacity while a negative number removes from the + // current capacity. + // + // This parameter is required if the policy type is SimpleScaling and not supported + // otherwise. + ScalingAdjustment *int64 `type:"integer"` + + // A set of adjustments that enable you to scale based on the size of the alarm + // breach. + // + // This parameter is required if the policy type is StepScaling and not supported + // otherwise. + StepAdjustments []*StepAdjustment `type:"list"` metadataPutScalingPolicyInput `json:"-" xml:"-"` } @@ -3706,9 +4634,19 @@ type metadataPutScalingPolicyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PutScalingPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutScalingPolicyInput) GoString() string { + return s.String() +} + type PutScalingPolicyOutput struct { // The Amazon Resource Name (ARN) of the policy. - PolicyARN *string `type:"string"` + PolicyARN *string `min:"1" type:"string"` metadataPutScalingPolicyOutput `json:"-" xml:"-"` } @@ -3717,11 +4655,21 @@ type metadataPutScalingPolicyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PutScalingPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutScalingPolicyOutput) GoString() string { + return s.String() +} + type PutScheduledUpdateGroupActionInput struct { // The name or Amazon Resource Name (ARN) of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // The number of Amazon EC2 instances that should be running in the group. + // The number of EC2 instances that should be running in the group. DesiredCapacity *int64 `type:"integer"` // The time for this action to end. @@ -3730,35 +4678,34 @@ type PutScheduledUpdateGroupActionInput struct { // The maximum size for the Auto Scaling group. MaxSize *int64 `type:"integer"` - // The minimum size for the new Auto Scaling group. + // The minimum size for the Auto Scaling group. MinSize *int64 `type:"integer"` // The time when recurring future actions will start. Start time is specified - // by the user following the Unix cron syntax format. For information about - // cron syntax, go to Wikipedia, The Free Encyclopedia (http://en.wikipedia.org/wiki/Cron). + // by the user following the Unix cron syntax format. For more information, + // see Cron (http://en.wikipedia.org/wiki/Cron) in Wikipedia. // // When StartTime and EndTime are specified with Recurrence, they form the // boundaries of when the recurring action will start and stop. - Recurrence *string `type:"string"` + Recurrence *string `min:"1" type:"string"` // The name of this scaling action. - ScheduledActionName *string `type:"string" required:"true"` + ScheduledActionName *string `min:"1" type:"string" required:"true"` - // The time for this action to start, as in --start-time 2010-06-01T00:00:00Z. + // The time for this action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT + // only (for example, 2014-06-01T00:00:00Z). // // If you try to schedule your action in the past, Auto Scaling returns an // error message. // // When StartTime and EndTime are specified with Recurrence, they form the - // boundaries of when the recurring action will start and stop. + // boundaries of when the recurring action starts and stops. StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` - // Time is deprecated. + // This parameter is deprecated; use StartTime instead. // - // The time for this action to start. Time is an alias for StartTime and can - // be specified instead of StartTime, or vice versa. If both Time and StartTime - // are specified, their values should be identical. Otherwise, PutScheduledUpdateGroupAction - // will return an error. + // The time for this action to start. If both Time and StartTime are specified, + // their values must be identical. Time *time.Time `type:"timestamp" timestampFormat:"iso8601"` metadataPutScheduledUpdateGroupActionInput `json:"-" xml:"-"` @@ -3768,6 +4715,16 @@ type metadataPutScheduledUpdateGroupActionInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PutScheduledUpdateGroupActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutScheduledUpdateGroupActionInput) GoString() string { + return s.String() +} + type PutScheduledUpdateGroupActionOutput struct { metadataPutScheduledUpdateGroupActionOutput `json:"-" xml:"-"` } @@ -3776,17 +4733,27 @@ type metadataPutScheduledUpdateGroupActionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PutScheduledUpdateGroupActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutScheduledUpdateGroupActionOutput) GoString() string { + return s.String() +} + type RecordLifecycleActionHeartbeatInput struct { // The name of the Auto Scaling group for the hook. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // A token that uniquely identifies a specific lifecycle action associated with // an instance. Auto Scaling sends this token to the notification target you // specified when you created the lifecycle hook. - LifecycleActionToken *string `type:"string" required:"true"` + LifecycleActionToken *string `min:"36" type:"string" required:"true"` // The name of the lifecycle hook. - LifecycleHookName *string `type:"string" required:"true"` + LifecycleHookName *string `min:"1" type:"string" required:"true"` metadataRecordLifecycleActionHeartbeatInput `json:"-" xml:"-"` } @@ -3795,6 +4762,16 @@ type metadataRecordLifecycleActionHeartbeatInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RecordLifecycleActionHeartbeatInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordLifecycleActionHeartbeatInput) GoString() string { + return s.String() +} + type RecordLifecycleActionHeartbeatOutput struct { metadataRecordLifecycleActionHeartbeatOutput `json:"-" xml:"-"` } @@ -3803,6 +4780,16 @@ type metadataRecordLifecycleActionHeartbeatOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RecordLifecycleActionHeartbeatOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordLifecycleActionHeartbeatOutput) GoString() string { + return s.String() +} + type ResumeProcessesOutput struct { metadataResumeProcessesOutput `json:"-" xml:"-"` } @@ -3811,38 +4798,67 @@ type metadataResumeProcessesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResumeProcessesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResumeProcessesOutput) GoString() string { + return s.String() +} + // Describes a scaling policy. type ScalingPolicy struct { - // Specifies whether the ScalingAdjustment is an absolute number or a percentage - // of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, - // and PercentChangeInCapacity. - AdjustmentType *string `type:"string"` + // The adjustment type, which specifies how ScalingAdjustment is interpreted. + // Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity. + AdjustmentType *string `min:"1" type:"string"` - // The CloudWatch Alarms related to the policy. + // The CloudWatch alarms related to the policy. Alarms []*Alarm `type:"list"` // The name of the Auto Scaling group associated with this scaling policy. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // The amount of time, in seconds, after a scaling activity completes before // any further trigger-related scaling activities can start. Cooldown *int64 `type:"integer"` - // Changes the DesiredCapacity of the Auto Scaling group by at least the specified - // number of instances. + // The estimated time, in seconds, until a newly launched instance can contribute + // to the CloudWatch metrics. + EstimatedInstanceWarmup *int64 `type:"integer"` + + // The aggregation type for the CloudWatch metrics. Valid values are Minimum, + // Maximum, and Average. + MetricAggregationType *string `min:"1" type:"string"` + + // The minimum number of instances to scale. If the value of AdjustmentType + // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity + // of the Auto Scaling group by at least this many instances. Otherwise, the + // error is ValidationError. + MinAdjustmentMagnitude *int64 `type:"integer"` + + // Available for backward compatibility. Use MinAdjustmentMagnitude instead. MinAdjustmentStep *int64 `type:"integer"` // The Amazon Resource Name (ARN) of the policy. - PolicyARN *string `type:"string"` + PolicyARN *string `min:"1" type:"string"` // The name of the scaling policy. - PolicyName *string `type:"string"` + PolicyName *string `min:"1" type:"string"` - // The number associated with the specified adjustment type. A positive value - // adds to the current capacity and a negative value removes from the current - // capacity. + // The policy type. Valid values are SimpleScaling and StepScaling. + PolicyType *string `min:"1" type:"string"` + + // The amount by which to scale, based on the specified adjustment type. A positive + // value adds to the current capacity while a negative number removes from the + // current capacity. ScalingAdjustment *int64 `type:"integer"` + // A set of adjustments that enable you to scale based on the size of the alarm + // breach. + StepAdjustments []*StepAdjustment `type:"list"` + metadataScalingPolicy `json:"-" xml:"-"` } @@ -3850,14 +4866,37 @@ type metadataScalingPolicy struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ScalingPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScalingPolicy) GoString() string { + return s.String() +} + type ScalingProcessQuery struct { // The name or Amazon Resource Name (ARN) of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // One or more of the following processes: // - // Launch Terminate HealthCheck ReplaceUnhealthy AZRebalance AlarmNotification - // ScheduledActions AddToLoadBalancer + // Launch + // + // Terminate + // + // HealthCheck + // + // ReplaceUnhealthy + // + // AZRebalance + // + // AlarmNotification + // + // ScheduledActions + // + // AddToLoadBalancer ScalingProcesses []*string `type:"list"` metadataScalingProcessQuery `json:"-" xml:"-"` @@ -3867,16 +4906,26 @@ type metadataScalingProcessQuery struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ScalingProcessQuery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScalingProcessQuery) GoString() string { + return s.String() +} + // Describes a scheduled update to an Auto Scaling group. type ScheduledUpdateGroupAction struct { // The name of the group. - AutoScalingGroupName *string `type:"string"` + AutoScalingGroupName *string `min:"1" type:"string"` // The number of instances you prefer to maintain in the group. DesiredCapacity *int64 `type:"integer"` - // The time that the action is scheduled to end. This value can be up to one - // month in the future. + // The date and time that the action is scheduled to end. This date and time + // can be up to one month in the future. EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` // The maximum size of the group. @@ -3885,25 +4934,23 @@ type ScheduledUpdateGroupAction struct { // The minimum size of the group. MinSize *int64 `type:"integer"` - // The regular schedule that an action occurs. - Recurrence *string `type:"string"` + // The recurring schedule for the action. + Recurrence *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the scheduled action. - ScheduledActionARN *string `type:"string"` + ScheduledActionARN *string `min:"1" type:"string"` // The name of the scheduled action. - ScheduledActionName *string `type:"string"` + ScheduledActionName *string `min:"1" type:"string"` - // The time that the action is scheduled to begin. This value can be up to one - // month in the future. + // The date and time that the action is scheduled to begin. This date and time + // can be up to one month in the future. // // When StartTime and EndTime are specified with Recurrence, they form the // boundaries of when the recurring action will start and stop. StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"` - // Time is deprecated. - // - // The time that the action is scheduled to begin. Time is an alias for StartTime. + // This parameter is deprecated; use StartTime instead. Time *time.Time `type:"timestamp" timestampFormat:"iso8601"` metadataScheduledUpdateGroupAction `json:"-" xml:"-"` @@ -3913,9 +4960,19 @@ type metadataScheduledUpdateGroupAction struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ScheduledUpdateGroupAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduledUpdateGroupAction) GoString() string { + return s.String() +} + type SetDesiredCapacityInput struct { // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The number of EC2 instances that should be running in the Auto Scaling group. DesiredCapacity *int64 `type:"integer" required:"true"` @@ -3933,6 +4990,16 @@ type metadataSetDesiredCapacityInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetDesiredCapacityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetDesiredCapacityInput) GoString() string { + return s.String() +} + type SetDesiredCapacityOutput struct { metadataSetDesiredCapacityOutput `json:"-" xml:"-"` } @@ -3941,14 +5008,24 @@ type metadataSetDesiredCapacityOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetDesiredCapacityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetDesiredCapacityOutput) GoString() string { + return s.String() +} + type SetInstanceHealthInput struct { // The health status of the instance. Set to Healthy if you want the instance // to remain in service. Set to Unhealthy if you want the instance to be out // of service. Auto Scaling will terminate and replace the unhealthy instance. - HealthStatus *string `type:"string" required:"true"` + HealthStatus *string `min:"1" type:"string" required:"true"` // The ID of the EC2 instance. - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `min:"1" type:"string" required:"true"` // If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod // specified for the group, by default, this call will respect the grace period. @@ -3966,6 +5043,16 @@ type metadataSetInstanceHealthInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetInstanceHealthInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetInstanceHealthInput) GoString() string { + return s.String() +} + type SetInstanceHealthOutput struct { metadataSetInstanceHealthOutput `json:"-" xml:"-"` } @@ -3974,6 +5061,84 @@ type metadataSetInstanceHealthOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetInstanceHealthOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetInstanceHealthOutput) GoString() string { + return s.String() +} + +// Describes an adjustment based on the difference between the value of the +// aggregated CloudWatch metric and the breach threshold that you've defined +// for the alarm. +// +// For the following examples, suppose that you have an alarm with a breach +// threshold of 50: +// +// If you want the adjustment to be triggered when the metric is greater +// than or equal to 50 and less than 60, specify a lower bound of 0 and an upper +// bound of 10. +// +// If you want the adjustment to be triggered when the metric is greater +// than 40 and less than or equal to 50, specify a lower bound of -10 and an +// upper bound of 0. +// +// There are a few rules for the step adjustments for your step policy: +// +// The ranges of your step adjustments can't overlap or have a gap. +// +// At most one step adjustment can have a null lower bound. If one step adjustment +// has a negative lower bound, then there must be a step adjustment with a null +// lower bound. +// +// At most one step adjustment can have a null upper bound. If one step adjustment +// has a positive upper bound, then there must be a step adjustment with a null +// upper bound. +// +// The upper and lower bound can't be null in the same step adjustment. +type StepAdjustment struct { + // The lower bound for the difference between the alarm threshold and the CloudWatch + // metric. If the metric value is above the breach threshold, the lower bound + // is inclusive (the metric must be greater than or equal to the threshold plus + // the lower bound). Otherwise, it is exclusive (the metric must be greater + // than the threshold plus the lower bound). A null value indicates negative + // infinity. + MetricIntervalLowerBound *float64 `type:"double"` + + // The upper bound for the difference between the alarm threshold and the CloudWatch + // metric. If the metric value is above the breach threshold, the upper bound + // is exclusive (the metric must be less than the threshold plus the upper bound). + // Otherwise, it is inclusive (the metric must be less than or equal to the + // threshold plus the upper bound). A null value indicates positive infinity. + // + // The upper bound must be greater than the lower bound. + MetricIntervalUpperBound *float64 `type:"double"` + + // The amount by which to scale, based on the specified adjustment type. A positive + // value adds to the current capacity while a negative number removes from the + // current capacity. + ScalingAdjustment *int64 `type:"integer" required:"true"` + + metadataStepAdjustment `json:"-" xml:"-"` +} + +type metadataStepAdjustment struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s StepAdjustment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StepAdjustment) GoString() string { + return s.String() +} + type SuspendProcessesOutput struct { metadataSuspendProcessesOutput `json:"-" xml:"-"` } @@ -3982,14 +5147,24 @@ type metadataSuspendProcessesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SuspendProcessesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SuspendProcessesOutput) GoString() string { + return s.String() +} + // Describes an Auto Scaling process that has been suspended. For more information, // see ProcessType. type SuspendedProcess struct { // The name of the suspended process. - ProcessName *string `type:"string"` + ProcessName *string `min:"1" type:"string"` // The reason that the process was suspended. - SuspensionReason *string `type:"string"` + SuspensionReason *string `min:"1" type:"string"` metadataSuspendedProcess `json:"-" xml:"-"` } @@ -3998,21 +5173,29 @@ type metadataSuspendedProcess struct { SDKShapeTraits bool `type:"structure"` } -// Describes a tag applied to an Auto Scaling group. +// String returns the string representation +func (s SuspendedProcess) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SuspendedProcess) GoString() string { + return s.String() +} + +// Describes a tag for an Auto Scaling group. type Tag struct { // The tag key. - Key *string `type:"string" required:"true"` + Key *string `min:"1" type:"string" required:"true"` - // Specifies whether the tag is applied to instances launched after the tag - // is created. The same behavior applies to updates: If you change a tag, it - // is applied to all instances launched after you made the change. + // Determines whether the tag is added to new instances as they are launched + // in the group. PropagateAtLaunch *bool `type:"boolean"` // The name of the group. - ResourceID *string `locationName:"ResourceId" type:"string"` + ResourceId *string `type:"string"` - // The kind of resource to which the tag is applied. Currently, Auto Scaling - // supports the auto-scaling-group resource type. + // The type of resource. The only supported value is auto-scaling-group. ResourceType *string `type:"string"` // The tag value. @@ -4025,21 +5208,29 @@ type metadataTag struct { SDKShapeTraits bool `type:"structure"` } -// Describes a tag applied to an Auto Scaling group. +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Describes a tag for an Auto Scaling group. type TagDescription struct { // The tag key. - Key *string `type:"string"` + Key *string `min:"1" type:"string"` - // Specifies whether the tag is applied to instances launched after the tag - // is created. The same behavior applies to updates: If you change a tag, it - // is applied to all instances launched after you made the change. + // Determines whether the tag is added to new instances as they are launched + // in the group. PropagateAtLaunch *bool `type:"boolean"` // The name of the group. - ResourceID *string `locationName:"ResourceId" type:"string"` + ResourceId *string `type:"string"` - // The kind of resource to which the tag is applied. Currently, Auto Scaling - // supports the auto-scaling-group resource type. + // The type of resource. The only supported value is auto-scaling-group. ResourceType *string `type:"string"` // The tag value. @@ -4052,9 +5243,19 @@ type metadataTagDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s TagDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagDescription) GoString() string { + return s.String() +} + type TerminateInstanceInAutoScalingGroupInput struct { // The ID of the EC2 instance. - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `min:"1" type:"string" required:"true"` // If true, terminating this instance also decrements the size of the Auto Scaling // group. @@ -4067,6 +5268,16 @@ type metadataTerminateInstanceInAutoScalingGroupInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s TerminateInstanceInAutoScalingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateInstanceInAutoScalingGroupInput) GoString() string { + return s.String() +} + type TerminateInstanceInAutoScalingGroupOutput struct { // A scaling activity. Activity *Activity `type:"structure"` @@ -4078,12 +5289,22 @@ type metadataTerminateInstanceInAutoScalingGroupOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s TerminateInstanceInAutoScalingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateInstanceInAutoScalingGroupOutput) GoString() string { + return s.String() +} + type UpdateAutoScalingGroupInput struct { // The name of the Auto Scaling group. - AutoScalingGroupName *string `type:"string" required:"true"` + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // One or more Availability Zones for the group. - AvailabilityZones []*string `type:"list"` + AvailabilityZones []*string `min:"1" type:"list"` // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. For more information, see Understanding @@ -4091,23 +5312,23 @@ type UpdateAutoScalingGroupInput struct { DefaultCooldown *int64 `type:"integer"` // The number of EC2 instances that should be running in the Auto Scaling group. - // This value must be greater than or equal to the minimum size of the group + // This number must be greater than or equal to the minimum size of the group // and less than or equal to the maximum size of the group. DesiredCapacity *int64 `type:"integer"` - // The amount of time, in second, that Auto Scaling waits before checking the + // 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 - // System Status and the Instance Status checks from Amazon EC2. For more information, - // see DescribeInstanceStatus (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstanceStatus.html). + // the system status and instance status checks from Amazon EC2. For more information, + // see . HealthCheckGracePeriod *int64 `type:"integer"` // The type of health check for the instances in the Auto Scaling group. The // health check type can either be EC2 for Amazon EC2 or ELB for Elastic Load // Balancing. - HealthCheckType *string `type:"string"` + HealthCheckType *string `min:"1" type:"string"` // The name of the launch configuration. - LaunchConfigurationName *string `type:"string"` + LaunchConfigurationName *string `min:"1" type:"string"` // The maximum size of the Auto Scaling group. MaxSize *int64 `type:"integer"` @@ -4117,7 +5338,7 @@ type UpdateAutoScalingGroupInput struct { // 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). - PlacementGroup *string `type:"string"` + PlacementGroup *string `min:"1" type:"string"` // A standalone termination policy or a list of termination policies used to // select the instance to terminate. The policies are executed in the order @@ -4128,15 +5349,16 @@ type UpdateAutoScalingGroupInput struct { // in the Auto Scaling Developer Guide. TerminationPolicies []*string `type:"list"` - // The subnet identifier for the Amazon VPC connection, if applicable. You can - // specify several subnets in a comma-separated list. + // The ID of the subnet, if you are launching into a VPC. You can specify several + // subnets in a comma-separated list. // - // When you specify VPCZoneIdentifier with AvailabilityZones, ensure that - // the subnets' Availability Zones match the values you specify for AvailabilityZones. + // When you specify VPCZoneIdentifier with AvailabilityZones, ensure that the + // subnets' Availability Zones match the values you specify for AvailabilityZones. // - // For more information, see Auto Scaling and Amazon VPC (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html) + // For more information, see Auto Scaling and Amazon Virtual Private Cloud + // (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/autoscalingsubnets.html) // in the Auto Scaling Developer Guide. - VPCZoneIdentifier *string `type:"string"` + VPCZoneIdentifier *string `min:"1" type:"string"` metadataUpdateAutoScalingGroupInput `json:"-" xml:"-"` } @@ -4145,6 +5367,16 @@ type metadataUpdateAutoScalingGroupInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UpdateAutoScalingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAutoScalingGroupInput) GoString() string { + return s.String() +} + type UpdateAutoScalingGroupOutput struct { metadataUpdateAutoScalingGroupOutput `json:"-" xml:"-"` } @@ -4152,3 +5384,67 @@ type UpdateAutoScalingGroupOutput struct { type metadataUpdateAutoScalingGroupOutput struct { SDKShapeTraits bool `type:"structure"` } + +// String returns the string representation +func (s UpdateAutoScalingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAutoScalingGroupOutput) GoString() string { + return s.String() +} + +const ( + // @enum LifecycleState + LifecycleStatePending = "Pending" + // @enum LifecycleState + LifecycleStatePendingWait = "Pending:Wait" + // @enum LifecycleState + LifecycleStatePendingProceed = "Pending:Proceed" + // @enum LifecycleState + LifecycleStateQuarantined = "Quarantined" + // @enum LifecycleState + LifecycleStateInService = "InService" + // @enum LifecycleState + LifecycleStateTerminating = "Terminating" + // @enum LifecycleState + LifecycleStateTerminatingWait = "Terminating:Wait" + // @enum LifecycleState + LifecycleStateTerminatingProceed = "Terminating:Proceed" + // @enum LifecycleState + LifecycleStateTerminated = "Terminated" + // @enum LifecycleState + LifecycleStateDetaching = "Detaching" + // @enum LifecycleState + LifecycleStateDetached = "Detached" + // @enum LifecycleState + LifecycleStateEnteringStandby = "EnteringStandby" + // @enum LifecycleState + LifecycleStateStandby = "Standby" +) + +const ( + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeWaitingForSpotInstanceRequestId = "WaitingForSpotInstanceRequestId" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeWaitingForSpotInstanceId = "WaitingForSpotInstanceId" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeWaitingForInstanceId = "WaitingForInstanceId" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodePreInService = "PreInService" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeInProgress = "InProgress" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeWaitingForElbconnectionDraining = "WaitingForELBConnectionDraining" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeMidLifecycleAction = "MidLifecycleAction" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeWaitingForInstanceWarmup = "WaitingForInstanceWarmup" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeSuccessful = "Successful" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeFailed = "Failed" + // @enum ScalingActivityStatusCode + ScalingActivityStatusCodeCancelled = "Cancelled" +) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface/interface.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface/interface.go index ab28228467f..2de4f9e7e7f 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface/interface.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface/interface.go @@ -4,98 +4,217 @@ package autoscalingiface import ( + "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/service/autoscaling" ) // AutoScalingAPI is the interface type for autoscaling.AutoScaling. type AutoScalingAPI interface { + AttachInstancesRequest(*autoscaling.AttachInstancesInput) (*request.Request, *autoscaling.AttachInstancesOutput) + AttachInstances(*autoscaling.AttachInstancesInput) (*autoscaling.AttachInstancesOutput, error) + AttachLoadBalancersRequest(*autoscaling.AttachLoadBalancersInput) (*request.Request, *autoscaling.AttachLoadBalancersOutput) + + AttachLoadBalancers(*autoscaling.AttachLoadBalancersInput) (*autoscaling.AttachLoadBalancersOutput, error) + + CompleteLifecycleActionRequest(*autoscaling.CompleteLifecycleActionInput) (*request.Request, *autoscaling.CompleteLifecycleActionOutput) + CompleteLifecycleAction(*autoscaling.CompleteLifecycleActionInput) (*autoscaling.CompleteLifecycleActionOutput, error) + CreateAutoScalingGroupRequest(*autoscaling.CreateAutoScalingGroupInput) (*request.Request, *autoscaling.CreateAutoScalingGroupOutput) + CreateAutoScalingGroup(*autoscaling.CreateAutoScalingGroupInput) (*autoscaling.CreateAutoScalingGroupOutput, error) + CreateLaunchConfigurationRequest(*autoscaling.CreateLaunchConfigurationInput) (*request.Request, *autoscaling.CreateLaunchConfigurationOutput) + CreateLaunchConfiguration(*autoscaling.CreateLaunchConfigurationInput) (*autoscaling.CreateLaunchConfigurationOutput, error) + CreateOrUpdateTagsRequest(*autoscaling.CreateOrUpdateTagsInput) (*request.Request, *autoscaling.CreateOrUpdateTagsOutput) + CreateOrUpdateTags(*autoscaling.CreateOrUpdateTagsInput) (*autoscaling.CreateOrUpdateTagsOutput, error) + DeleteAutoScalingGroupRequest(*autoscaling.DeleteAutoScalingGroupInput) (*request.Request, *autoscaling.DeleteAutoScalingGroupOutput) + DeleteAutoScalingGroup(*autoscaling.DeleteAutoScalingGroupInput) (*autoscaling.DeleteAutoScalingGroupOutput, error) + DeleteLaunchConfigurationRequest(*autoscaling.DeleteLaunchConfigurationInput) (*request.Request, *autoscaling.DeleteLaunchConfigurationOutput) + DeleteLaunchConfiguration(*autoscaling.DeleteLaunchConfigurationInput) (*autoscaling.DeleteLaunchConfigurationOutput, error) + DeleteLifecycleHookRequest(*autoscaling.DeleteLifecycleHookInput) (*request.Request, *autoscaling.DeleteLifecycleHookOutput) + DeleteLifecycleHook(*autoscaling.DeleteLifecycleHookInput) (*autoscaling.DeleteLifecycleHookOutput, error) + DeleteNotificationConfigurationRequest(*autoscaling.DeleteNotificationConfigurationInput) (*request.Request, *autoscaling.DeleteNotificationConfigurationOutput) + DeleteNotificationConfiguration(*autoscaling.DeleteNotificationConfigurationInput) (*autoscaling.DeleteNotificationConfigurationOutput, error) + DeletePolicyRequest(*autoscaling.DeletePolicyInput) (*request.Request, *autoscaling.DeletePolicyOutput) + DeletePolicy(*autoscaling.DeletePolicyInput) (*autoscaling.DeletePolicyOutput, error) + DeleteScheduledActionRequest(*autoscaling.DeleteScheduledActionInput) (*request.Request, *autoscaling.DeleteScheduledActionOutput) + DeleteScheduledAction(*autoscaling.DeleteScheduledActionInput) (*autoscaling.DeleteScheduledActionOutput, error) + DeleteTagsRequest(*autoscaling.DeleteTagsInput) (*request.Request, *autoscaling.DeleteTagsOutput) + DeleteTags(*autoscaling.DeleteTagsInput) (*autoscaling.DeleteTagsOutput, error) + DescribeAccountLimitsRequest(*autoscaling.DescribeAccountLimitsInput) (*request.Request, *autoscaling.DescribeAccountLimitsOutput) + DescribeAccountLimits(*autoscaling.DescribeAccountLimitsInput) (*autoscaling.DescribeAccountLimitsOutput, error) + DescribeAdjustmentTypesRequest(*autoscaling.DescribeAdjustmentTypesInput) (*request.Request, *autoscaling.DescribeAdjustmentTypesOutput) + DescribeAdjustmentTypes(*autoscaling.DescribeAdjustmentTypesInput) (*autoscaling.DescribeAdjustmentTypesOutput, error) + DescribeAutoScalingGroupsRequest(*autoscaling.DescribeAutoScalingGroupsInput) (*request.Request, *autoscaling.DescribeAutoScalingGroupsOutput) + DescribeAutoScalingGroups(*autoscaling.DescribeAutoScalingGroupsInput) (*autoscaling.DescribeAutoScalingGroupsOutput, error) + DescribeAutoScalingGroupsPages(*autoscaling.DescribeAutoScalingGroupsInput, func(*autoscaling.DescribeAutoScalingGroupsOutput, bool) bool) error + + DescribeAutoScalingInstancesRequest(*autoscaling.DescribeAutoScalingInstancesInput) (*request.Request, *autoscaling.DescribeAutoScalingInstancesOutput) + DescribeAutoScalingInstances(*autoscaling.DescribeAutoScalingInstancesInput) (*autoscaling.DescribeAutoScalingInstancesOutput, error) + DescribeAutoScalingInstancesPages(*autoscaling.DescribeAutoScalingInstancesInput, func(*autoscaling.DescribeAutoScalingInstancesOutput, bool) bool) error + + DescribeAutoScalingNotificationTypesRequest(*autoscaling.DescribeAutoScalingNotificationTypesInput) (*request.Request, *autoscaling.DescribeAutoScalingNotificationTypesOutput) + DescribeAutoScalingNotificationTypes(*autoscaling.DescribeAutoScalingNotificationTypesInput) (*autoscaling.DescribeAutoScalingNotificationTypesOutput, error) + DescribeLaunchConfigurationsRequest(*autoscaling.DescribeLaunchConfigurationsInput) (*request.Request, *autoscaling.DescribeLaunchConfigurationsOutput) + DescribeLaunchConfigurations(*autoscaling.DescribeLaunchConfigurationsInput) (*autoscaling.DescribeLaunchConfigurationsOutput, error) + DescribeLaunchConfigurationsPages(*autoscaling.DescribeLaunchConfigurationsInput, func(*autoscaling.DescribeLaunchConfigurationsOutput, bool) bool) error + + DescribeLifecycleHookTypesRequest(*autoscaling.DescribeLifecycleHookTypesInput) (*request.Request, *autoscaling.DescribeLifecycleHookTypesOutput) + DescribeLifecycleHookTypes(*autoscaling.DescribeLifecycleHookTypesInput) (*autoscaling.DescribeLifecycleHookTypesOutput, error) + DescribeLifecycleHooksRequest(*autoscaling.DescribeLifecycleHooksInput) (*request.Request, *autoscaling.DescribeLifecycleHooksOutput) + DescribeLifecycleHooks(*autoscaling.DescribeLifecycleHooksInput) (*autoscaling.DescribeLifecycleHooksOutput, error) + DescribeLoadBalancersRequest(*autoscaling.DescribeLoadBalancersInput) (*request.Request, *autoscaling.DescribeLoadBalancersOutput) + + DescribeLoadBalancers(*autoscaling.DescribeLoadBalancersInput) (*autoscaling.DescribeLoadBalancersOutput, error) + + DescribeMetricCollectionTypesRequest(*autoscaling.DescribeMetricCollectionTypesInput) (*request.Request, *autoscaling.DescribeMetricCollectionTypesOutput) + DescribeMetricCollectionTypes(*autoscaling.DescribeMetricCollectionTypesInput) (*autoscaling.DescribeMetricCollectionTypesOutput, error) + DescribeNotificationConfigurationsRequest(*autoscaling.DescribeNotificationConfigurationsInput) (*request.Request, *autoscaling.DescribeNotificationConfigurationsOutput) + DescribeNotificationConfigurations(*autoscaling.DescribeNotificationConfigurationsInput) (*autoscaling.DescribeNotificationConfigurationsOutput, error) + DescribeNotificationConfigurationsPages(*autoscaling.DescribeNotificationConfigurationsInput, func(*autoscaling.DescribeNotificationConfigurationsOutput, bool) bool) error + + DescribePoliciesRequest(*autoscaling.DescribePoliciesInput) (*request.Request, *autoscaling.DescribePoliciesOutput) + DescribePolicies(*autoscaling.DescribePoliciesInput) (*autoscaling.DescribePoliciesOutput, error) + DescribePoliciesPages(*autoscaling.DescribePoliciesInput, func(*autoscaling.DescribePoliciesOutput, bool) bool) error + + DescribeScalingActivitiesRequest(*autoscaling.DescribeScalingActivitiesInput) (*request.Request, *autoscaling.DescribeScalingActivitiesOutput) + DescribeScalingActivities(*autoscaling.DescribeScalingActivitiesInput) (*autoscaling.DescribeScalingActivitiesOutput, error) + DescribeScalingActivitiesPages(*autoscaling.DescribeScalingActivitiesInput, func(*autoscaling.DescribeScalingActivitiesOutput, bool) bool) error + + DescribeScalingProcessTypesRequest(*autoscaling.DescribeScalingProcessTypesInput) (*request.Request, *autoscaling.DescribeScalingProcessTypesOutput) + DescribeScalingProcessTypes(*autoscaling.DescribeScalingProcessTypesInput) (*autoscaling.DescribeScalingProcessTypesOutput, error) + DescribeScheduledActionsRequest(*autoscaling.DescribeScheduledActionsInput) (*request.Request, *autoscaling.DescribeScheduledActionsOutput) + DescribeScheduledActions(*autoscaling.DescribeScheduledActionsInput) (*autoscaling.DescribeScheduledActionsOutput, error) + DescribeScheduledActionsPages(*autoscaling.DescribeScheduledActionsInput, func(*autoscaling.DescribeScheduledActionsOutput, bool) bool) error + + DescribeTagsRequest(*autoscaling.DescribeTagsInput) (*request.Request, *autoscaling.DescribeTagsOutput) + DescribeTags(*autoscaling.DescribeTagsInput) (*autoscaling.DescribeTagsOutput, error) + DescribeTagsPages(*autoscaling.DescribeTagsInput, func(*autoscaling.DescribeTagsOutput, bool) bool) error + + DescribeTerminationPolicyTypesRequest(*autoscaling.DescribeTerminationPolicyTypesInput) (*request.Request, *autoscaling.DescribeTerminationPolicyTypesOutput) + DescribeTerminationPolicyTypes(*autoscaling.DescribeTerminationPolicyTypesInput) (*autoscaling.DescribeTerminationPolicyTypesOutput, error) + DetachInstancesRequest(*autoscaling.DetachInstancesInput) (*request.Request, *autoscaling.DetachInstancesOutput) + DetachInstances(*autoscaling.DetachInstancesInput) (*autoscaling.DetachInstancesOutput, error) + DetachLoadBalancersRequest(*autoscaling.DetachLoadBalancersInput) (*request.Request, *autoscaling.DetachLoadBalancersOutput) + + DetachLoadBalancers(*autoscaling.DetachLoadBalancersInput) (*autoscaling.DetachLoadBalancersOutput, error) + + DisableMetricsCollectionRequest(*autoscaling.DisableMetricsCollectionInput) (*request.Request, *autoscaling.DisableMetricsCollectionOutput) + DisableMetricsCollection(*autoscaling.DisableMetricsCollectionInput) (*autoscaling.DisableMetricsCollectionOutput, error) + EnableMetricsCollectionRequest(*autoscaling.EnableMetricsCollectionInput) (*request.Request, *autoscaling.EnableMetricsCollectionOutput) + EnableMetricsCollection(*autoscaling.EnableMetricsCollectionInput) (*autoscaling.EnableMetricsCollectionOutput, error) + EnterStandbyRequest(*autoscaling.EnterStandbyInput) (*request.Request, *autoscaling.EnterStandbyOutput) + EnterStandby(*autoscaling.EnterStandbyInput) (*autoscaling.EnterStandbyOutput, error) + ExecutePolicyRequest(*autoscaling.ExecutePolicyInput) (*request.Request, *autoscaling.ExecutePolicyOutput) + ExecutePolicy(*autoscaling.ExecutePolicyInput) (*autoscaling.ExecutePolicyOutput, error) + ExitStandbyRequest(*autoscaling.ExitStandbyInput) (*request.Request, *autoscaling.ExitStandbyOutput) + ExitStandby(*autoscaling.ExitStandbyInput) (*autoscaling.ExitStandbyOutput, error) + PutLifecycleHookRequest(*autoscaling.PutLifecycleHookInput) (*request.Request, *autoscaling.PutLifecycleHookOutput) + PutLifecycleHook(*autoscaling.PutLifecycleHookInput) (*autoscaling.PutLifecycleHookOutput, error) + PutNotificationConfigurationRequest(*autoscaling.PutNotificationConfigurationInput) (*request.Request, *autoscaling.PutNotificationConfigurationOutput) + PutNotificationConfiguration(*autoscaling.PutNotificationConfigurationInput) (*autoscaling.PutNotificationConfigurationOutput, error) + PutScalingPolicyRequest(*autoscaling.PutScalingPolicyInput) (*request.Request, *autoscaling.PutScalingPolicyOutput) + PutScalingPolicy(*autoscaling.PutScalingPolicyInput) (*autoscaling.PutScalingPolicyOutput, error) + PutScheduledUpdateGroupActionRequest(*autoscaling.PutScheduledUpdateGroupActionInput) (*request.Request, *autoscaling.PutScheduledUpdateGroupActionOutput) + PutScheduledUpdateGroupAction(*autoscaling.PutScheduledUpdateGroupActionInput) (*autoscaling.PutScheduledUpdateGroupActionOutput, error) + RecordLifecycleActionHeartbeatRequest(*autoscaling.RecordLifecycleActionHeartbeatInput) (*request.Request, *autoscaling.RecordLifecycleActionHeartbeatOutput) + RecordLifecycleActionHeartbeat(*autoscaling.RecordLifecycleActionHeartbeatInput) (*autoscaling.RecordLifecycleActionHeartbeatOutput, error) + ResumeProcessesRequest(*autoscaling.ScalingProcessQuery) (*request.Request, *autoscaling.ResumeProcessesOutput) + ResumeProcesses(*autoscaling.ScalingProcessQuery) (*autoscaling.ResumeProcessesOutput, error) + SetDesiredCapacityRequest(*autoscaling.SetDesiredCapacityInput) (*request.Request, *autoscaling.SetDesiredCapacityOutput) + SetDesiredCapacity(*autoscaling.SetDesiredCapacityInput) (*autoscaling.SetDesiredCapacityOutput, error) + SetInstanceHealthRequest(*autoscaling.SetInstanceHealthInput) (*request.Request, *autoscaling.SetInstanceHealthOutput) + SetInstanceHealth(*autoscaling.SetInstanceHealthInput) (*autoscaling.SetInstanceHealthOutput, error) + SuspendProcessesRequest(*autoscaling.ScalingProcessQuery) (*request.Request, *autoscaling.SuspendProcessesOutput) + SuspendProcesses(*autoscaling.ScalingProcessQuery) (*autoscaling.SuspendProcessesOutput, error) + TerminateInstanceInAutoScalingGroupRequest(*autoscaling.TerminateInstanceInAutoScalingGroupInput) (*request.Request, *autoscaling.TerminateInstanceInAutoScalingGroupOutput) + TerminateInstanceInAutoScalingGroup(*autoscaling.TerminateInstanceInAutoScalingGroupInput) (*autoscaling.TerminateInstanceInAutoScalingGroupOutput, error) + UpdateAutoScalingGroupRequest(*autoscaling.UpdateAutoScalingGroupInput) (*request.Request, *autoscaling.UpdateAutoScalingGroupOutput) + UpdateAutoScalingGroup(*autoscaling.UpdateAutoScalingGroupInput) (*autoscaling.UpdateAutoScalingGroupOutput, error) } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/examples_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/examples_test.go index c9c2f5a7889..bdcac9be04f 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/examples_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/autoscaling/examples_test.go @@ -8,8 +8,6 @@ import ( "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/service/autoscaling" ) @@ -21,7 +19,7 @@ func ExampleAutoScaling_AttachInstances() { params := &autoscaling.AttachInstancesInput{ AutoScalingGroupName: aws.String("ResourceName"), // Required - InstanceIDs: []*string{ + InstanceIds: []*string{ aws.String("XmlStringMaxLen16"), // Required // More values... }, @@ -29,22 +27,37 @@ func ExampleAutoScaling_AttachInstances() { resp, err := svc.AttachInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleAutoScaling_AttachLoadBalancers() { + svc := autoscaling.New(nil) + + params := &autoscaling.AttachLoadBalancersInput{ + AutoScalingGroupName: aws.String("ResourceName"), + LoadBalancerNames: []*string{ + aws.String("XmlStringMaxLen255"), // Required + // More values... + }, + } + resp, err := svc.AttachLoadBalancers(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleAutoScaling_CompleteLifecycleAction() { @@ -59,22 +72,14 @@ func ExampleAutoScaling_CompleteLifecycleAction() { resp, err := svc.CompleteLifecycleAction(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_CreateAutoScalingGroup() { @@ -82,17 +87,17 @@ func ExampleAutoScaling_CreateAutoScalingGroup() { params := &autoscaling.CreateAutoScalingGroupInput{ AutoScalingGroupName: aws.String("XmlStringMaxLen255"), // Required - MaxSize: aws.Long(1), // Required - MinSize: aws.Long(1), // Required + MaxSize: aws.Int64(1), // Required + MinSize: aws.Int64(1), // Required AvailabilityZones: []*string{ aws.String("XmlStringMaxLen255"), // Required // More values... }, - DefaultCooldown: aws.Long(1), - DesiredCapacity: aws.Long(1), - HealthCheckGracePeriod: aws.Long(1), + DefaultCooldown: aws.Int64(1), + DesiredCapacity: aws.Int64(1), + HealthCheckGracePeriod: aws.Int64(1), HealthCheckType: aws.String("XmlStringMaxLen32"), - InstanceID: aws.String("XmlStringMaxLen16"), + InstanceId: aws.String("XmlStringMaxLen16"), LaunchConfigurationName: aws.String("ResourceName"), LoadBalancerNames: []*string{ aws.String("XmlStringMaxLen255"), // Required @@ -100,10 +105,10 @@ func ExampleAutoScaling_CreateAutoScalingGroup() { }, PlacementGroup: aws.String("XmlStringMaxLen255"), Tags: []*autoscaling.Tag{ - &autoscaling.Tag{ // Required + { // Required Key: aws.String("TagKey"), // Required - PropagateAtLaunch: aws.Boolean(true), - ResourceID: aws.String("XmlString"), + PropagateAtLaunch: aws.Bool(true), + ResourceId: aws.String("XmlString"), ResourceType: aws.String("XmlString"), Value: aws.String("TagValue"), }, @@ -118,22 +123,14 @@ func ExampleAutoScaling_CreateAutoScalingGroup() { resp, err := svc.CreateAutoScalingGroup(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_CreateLaunchConfiguration() { @@ -141,39 +138,39 @@ func ExampleAutoScaling_CreateLaunchConfiguration() { params := &autoscaling.CreateLaunchConfigurationInput{ LaunchConfigurationName: aws.String("XmlStringMaxLen255"), // Required - AssociatePublicIPAddress: aws.Boolean(true), + AssociatePublicIpAddress: aws.Bool(true), BlockDeviceMappings: []*autoscaling.BlockDeviceMapping{ - &autoscaling.BlockDeviceMapping{ // Required + { // Required DeviceName: aws.String("XmlStringMaxLen255"), // Required - EBS: &autoscaling.EBS{ - DeleteOnTermination: aws.Boolean(true), - IOPS: aws.Long(1), - SnapshotID: aws.String("XmlStringMaxLen255"), - VolumeSize: aws.Long(1), + Ebs: &autoscaling.Ebs{ + DeleteOnTermination: aws.Bool(true), + Iops: aws.Int64(1), + SnapshotId: aws.String("XmlStringMaxLen255"), + VolumeSize: aws.Int64(1), VolumeType: aws.String("BlockDeviceEbsVolumeType"), }, - NoDevice: aws.Boolean(true), + NoDevice: aws.Bool(true), VirtualName: aws.String("XmlStringMaxLen255"), }, // More values... }, - ClassicLinkVPCID: aws.String("XmlStringMaxLen255"), + ClassicLinkVPCId: aws.String("XmlStringMaxLen255"), ClassicLinkVPCSecurityGroups: []*string{ aws.String("XmlStringMaxLen255"), // Required // More values... }, - EBSOptimized: aws.Boolean(true), - IAMInstanceProfile: aws.String("XmlStringMaxLen1600"), - ImageID: aws.String("XmlStringMaxLen255"), - InstanceID: aws.String("XmlStringMaxLen16"), + EbsOptimized: aws.Bool(true), + IamInstanceProfile: aws.String("XmlStringMaxLen1600"), + ImageId: aws.String("XmlStringMaxLen255"), + InstanceId: aws.String("XmlStringMaxLen16"), InstanceMonitoring: &autoscaling.InstanceMonitoring{ - Enabled: aws.Boolean(true), + Enabled: aws.Bool(true), }, InstanceType: aws.String("XmlStringMaxLen255"), - KernelID: aws.String("XmlStringMaxLen255"), + KernelId: aws.String("XmlStringMaxLen255"), KeyName: aws.String("XmlStringMaxLen255"), PlacementTenancy: aws.String("XmlStringMaxLen64"), - RAMDiskID: aws.String("XmlStringMaxLen255"), + RamdiskId: aws.String("XmlStringMaxLen255"), SecurityGroups: []*string{ aws.String("XmlString"), // Required // More values... @@ -184,22 +181,14 @@ func ExampleAutoScaling_CreateLaunchConfiguration() { resp, err := svc.CreateLaunchConfiguration(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_CreateOrUpdateTags() { @@ -207,10 +196,10 @@ func ExampleAutoScaling_CreateOrUpdateTags() { params := &autoscaling.CreateOrUpdateTagsInput{ Tags: []*autoscaling.Tag{ // Required - &autoscaling.Tag{ // Required + { // Required Key: aws.String("TagKey"), // Required - PropagateAtLaunch: aws.Boolean(true), - ResourceID: aws.String("XmlString"), + PropagateAtLaunch: aws.Bool(true), + ResourceId: aws.String("XmlString"), ResourceType: aws.String("XmlString"), Value: aws.String("TagValue"), }, @@ -220,22 +209,14 @@ func ExampleAutoScaling_CreateOrUpdateTags() { resp, err := svc.CreateOrUpdateTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DeleteAutoScalingGroup() { @@ -243,27 +224,19 @@ func ExampleAutoScaling_DeleteAutoScalingGroup() { params := &autoscaling.DeleteAutoScalingGroupInput{ AutoScalingGroupName: aws.String("ResourceName"), // Required - ForceDelete: aws.Boolean(true), + ForceDelete: aws.Bool(true), } resp, err := svc.DeleteAutoScalingGroup(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DeleteLaunchConfiguration() { @@ -275,22 +248,14 @@ func ExampleAutoScaling_DeleteLaunchConfiguration() { resp, err := svc.DeleteLaunchConfiguration(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DeleteLifecycleHook() { @@ -303,22 +268,14 @@ func ExampleAutoScaling_DeleteLifecycleHook() { resp, err := svc.DeleteLifecycleHook(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DeleteNotificationConfiguration() { @@ -331,22 +288,14 @@ func ExampleAutoScaling_DeleteNotificationConfiguration() { resp, err := svc.DeleteNotificationConfiguration(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DeletePolicy() { @@ -359,22 +308,14 @@ func ExampleAutoScaling_DeletePolicy() { resp, err := svc.DeletePolicy(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DeleteScheduledAction() { @@ -387,22 +328,14 @@ func ExampleAutoScaling_DeleteScheduledAction() { resp, err := svc.DeleteScheduledAction(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DeleteTags() { @@ -410,10 +343,10 @@ func ExampleAutoScaling_DeleteTags() { params := &autoscaling.DeleteTagsInput{ Tags: []*autoscaling.Tag{ // Required - &autoscaling.Tag{ // Required + { // Required Key: aws.String("TagKey"), // Required - PropagateAtLaunch: aws.Boolean(true), - ResourceID: aws.String("XmlString"), + PropagateAtLaunch: aws.Bool(true), + ResourceId: aws.String("XmlString"), ResourceType: aws.String("XmlString"), Value: aws.String("TagValue"), }, @@ -423,22 +356,14 @@ func ExampleAutoScaling_DeleteTags() { resp, err := svc.DeleteTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeAccountLimits() { @@ -448,22 +373,14 @@ func ExampleAutoScaling_DescribeAccountLimits() { resp, err := svc.DescribeAccountLimits(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeAdjustmentTypes() { @@ -473,22 +390,14 @@ func ExampleAutoScaling_DescribeAdjustmentTypes() { resp, err := svc.DescribeAdjustmentTypes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeAutoScalingGroups() { @@ -499,60 +408,44 @@ func ExampleAutoScaling_DescribeAutoScalingGroups() { aws.String("ResourceName"), // Required // More values... }, - MaxRecords: aws.Long(1), + MaxRecords: aws.Int64(1), NextToken: aws.String("XmlString"), } resp, err := svc.DescribeAutoScalingGroups(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeAutoScalingInstances() { svc := autoscaling.New(nil) params := &autoscaling.DescribeAutoScalingInstancesInput{ - InstanceIDs: []*string{ + InstanceIds: []*string{ aws.String("XmlStringMaxLen16"), // Required // More values... }, - MaxRecords: aws.Long(1), + MaxRecords: aws.Int64(1), NextToken: aws.String("XmlString"), } resp, err := svc.DescribeAutoScalingInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeAutoScalingNotificationTypes() { @@ -562,22 +455,14 @@ func ExampleAutoScaling_DescribeAutoScalingNotificationTypes() { resp, err := svc.DescribeAutoScalingNotificationTypes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeLaunchConfigurations() { @@ -588,28 +473,20 @@ func ExampleAutoScaling_DescribeLaunchConfigurations() { aws.String("ResourceName"), // Required // More values... }, - MaxRecords: aws.Long(1), + MaxRecords: aws.Int64(1), NextToken: aws.String("XmlString"), } resp, err := svc.DescribeLaunchConfigurations(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeLifecycleHookTypes() { @@ -619,22 +496,14 @@ func ExampleAutoScaling_DescribeLifecycleHookTypes() { resp, err := svc.DescribeLifecycleHookTypes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeLifecycleHooks() { @@ -650,22 +519,35 @@ func ExampleAutoScaling_DescribeLifecycleHooks() { resp, err := svc.DescribeLifecycleHooks(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleAutoScaling_DescribeLoadBalancers() { + svc := autoscaling.New(nil) + + params := &autoscaling.DescribeLoadBalancersInput{ + AutoScalingGroupName: aws.String("ResourceName"), // Required + MaxRecords: aws.Int64(1), + NextToken: aws.String("XmlString"), + } + resp, err := svc.DescribeLoadBalancers(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleAutoScaling_DescribeMetricCollectionTypes() { @@ -675,22 +557,14 @@ func ExampleAutoScaling_DescribeMetricCollectionTypes() { resp, err := svc.DescribeMetricCollectionTypes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeNotificationConfigurations() { @@ -701,28 +575,20 @@ func ExampleAutoScaling_DescribeNotificationConfigurations() { aws.String("ResourceName"), // Required // More values... }, - MaxRecords: aws.Long(1), + MaxRecords: aws.Int64(1), NextToken: aws.String("XmlString"), } resp, err := svc.DescribeNotificationConfigurations(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribePolicies() { @@ -730,65 +596,53 @@ func ExampleAutoScaling_DescribePolicies() { params := &autoscaling.DescribePoliciesInput{ AutoScalingGroupName: aws.String("ResourceName"), - MaxRecords: aws.Long(1), + MaxRecords: aws.Int64(1), NextToken: aws.String("XmlString"), PolicyNames: []*string{ aws.String("ResourceName"), // Required // More values... }, + PolicyTypes: []*string{ + aws.String("XmlStringMaxLen64"), // Required + // More values... + }, } resp, err := svc.DescribePolicies(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeScalingActivities() { svc := autoscaling.New(nil) params := &autoscaling.DescribeScalingActivitiesInput{ - ActivityIDs: []*string{ + ActivityIds: []*string{ aws.String("XmlString"), // Required // More values... }, AutoScalingGroupName: aws.String("ResourceName"), - MaxRecords: aws.Long(1), + MaxRecords: aws.Int64(1), NextToken: aws.String("XmlString"), } resp, err := svc.DescribeScalingActivities(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeScalingProcessTypes() { @@ -798,22 +652,14 @@ func ExampleAutoScaling_DescribeScalingProcessTypes() { resp, err := svc.DescribeScalingProcessTypes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeScheduledActions() { @@ -822,7 +668,7 @@ func ExampleAutoScaling_DescribeScheduledActions() { params := &autoscaling.DescribeScheduledActionsInput{ AutoScalingGroupName: aws.String("ResourceName"), EndTime: aws.Time(time.Now()), - MaxRecords: aws.Long(1), + MaxRecords: aws.Int64(1), NextToken: aws.String("XmlString"), ScheduledActionNames: []*string{ aws.String("ResourceName"), // Required @@ -833,22 +679,14 @@ func ExampleAutoScaling_DescribeScheduledActions() { resp, err := svc.DescribeScheduledActions(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeTags() { @@ -856,7 +694,7 @@ func ExampleAutoScaling_DescribeTags() { params := &autoscaling.DescribeTagsInput{ Filters: []*autoscaling.Filter{ - &autoscaling.Filter{ // Required + { // Required Name: aws.String("XmlString"), Values: []*string{ aws.String("XmlString"), // Required @@ -865,28 +703,20 @@ func ExampleAutoScaling_DescribeTags() { }, // More values... }, - MaxRecords: aws.Long(1), + MaxRecords: aws.Int64(1), NextToken: aws.String("XmlString"), } resp, err := svc.DescribeTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DescribeTerminationPolicyTypes() { @@ -896,22 +726,14 @@ func ExampleAutoScaling_DescribeTerminationPolicyTypes() { resp, err := svc.DescribeTerminationPolicyTypes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_DetachInstances() { @@ -919,8 +741,8 @@ func ExampleAutoScaling_DetachInstances() { params := &autoscaling.DetachInstancesInput{ AutoScalingGroupName: aws.String("ResourceName"), // Required - ShouldDecrementDesiredCapacity: aws.Boolean(true), // Required - InstanceIDs: []*string{ + ShouldDecrementDesiredCapacity: aws.Bool(true), // Required + InstanceIds: []*string{ aws.String("XmlStringMaxLen16"), // Required // More values... }, @@ -928,22 +750,37 @@ func ExampleAutoScaling_DetachInstances() { resp, err := svc.DetachInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleAutoScaling_DetachLoadBalancers() { + svc := autoscaling.New(nil) + + params := &autoscaling.DetachLoadBalancersInput{ + AutoScalingGroupName: aws.String("ResourceName"), + LoadBalancerNames: []*string{ + aws.String("XmlStringMaxLen255"), // Required + // More values... + }, + } + resp, err := svc.DetachLoadBalancers(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleAutoScaling_DisableMetricsCollection() { @@ -959,22 +796,14 @@ func ExampleAutoScaling_DisableMetricsCollection() { resp, err := svc.DisableMetricsCollection(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_EnableMetricsCollection() { @@ -991,22 +820,14 @@ func ExampleAutoScaling_EnableMetricsCollection() { resp, err := svc.EnableMetricsCollection(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_EnterStandby() { @@ -1014,8 +835,8 @@ func ExampleAutoScaling_EnterStandby() { params := &autoscaling.EnterStandbyInput{ AutoScalingGroupName: aws.String("ResourceName"), // Required - ShouldDecrementDesiredCapacity: aws.Boolean(true), // Required - InstanceIDs: []*string{ + ShouldDecrementDesiredCapacity: aws.Bool(true), // Required + InstanceIds: []*string{ aws.String("XmlStringMaxLen16"), // Required // More values... }, @@ -1023,22 +844,14 @@ func ExampleAutoScaling_EnterStandby() { resp, err := svc.EnterStandby(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_ExecutePolicy() { @@ -1047,27 +860,21 @@ func ExampleAutoScaling_ExecutePolicy() { params := &autoscaling.ExecutePolicyInput{ PolicyName: aws.String("ResourceName"), // Required AutoScalingGroupName: aws.String("ResourceName"), - HonorCooldown: aws.Boolean(true), + BreachThreshold: aws.Float64(1.0), + HonorCooldown: aws.Bool(true), + MetricValue: aws.Float64(1.0), } resp, err := svc.ExecutePolicy(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_ExitStandby() { @@ -1075,7 +882,7 @@ func ExampleAutoScaling_ExitStandby() { params := &autoscaling.ExitStandbyInput{ AutoScalingGroupName: aws.String("ResourceName"), // Required - InstanceIDs: []*string{ + InstanceIds: []*string{ aws.String("XmlStringMaxLen16"), // Required // More values... }, @@ -1083,22 +890,14 @@ func ExampleAutoScaling_ExitStandby() { resp, err := svc.ExitStandby(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_PutLifecycleHook() { @@ -1108,7 +907,7 @@ func ExampleAutoScaling_PutLifecycleHook() { AutoScalingGroupName: aws.String("ResourceName"), // Required LifecycleHookName: aws.String("AsciiStringMaxLen255"), // Required DefaultResult: aws.String("LifecycleActionResult"), - HeartbeatTimeout: aws.Long(1), + HeartbeatTimeout: aws.Int64(1), LifecycleTransition: aws.String("LifecycleTransition"), NotificationMetadata: aws.String("XmlStringMaxLen1023"), NotificationTargetARN: aws.String("ResourceName"), @@ -1117,22 +916,14 @@ func ExampleAutoScaling_PutLifecycleHook() { resp, err := svc.PutLifecycleHook(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_PutNotificationConfiguration() { @@ -1149,54 +940,50 @@ func ExampleAutoScaling_PutNotificationConfiguration() { resp, err := svc.PutNotificationConfiguration(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_PutScalingPolicy() { svc := autoscaling.New(nil) params := &autoscaling.PutScalingPolicyInput{ - AdjustmentType: aws.String("XmlStringMaxLen255"), // Required - AutoScalingGroupName: aws.String("ResourceName"), // Required - PolicyName: aws.String("XmlStringMaxLen255"), // Required - ScalingAdjustment: aws.Long(1), // Required - Cooldown: aws.Long(1), - MinAdjustmentStep: aws.Long(1), + AdjustmentType: aws.String("XmlStringMaxLen255"), // Required + AutoScalingGroupName: aws.String("ResourceName"), // Required + PolicyName: aws.String("XmlStringMaxLen255"), // Required + Cooldown: aws.Int64(1), + EstimatedInstanceWarmup: aws.Int64(1), + MetricAggregationType: aws.String("XmlStringMaxLen32"), + MinAdjustmentMagnitude: aws.Int64(1), + MinAdjustmentStep: aws.Int64(1), + PolicyType: aws.String("XmlStringMaxLen64"), + ScalingAdjustment: aws.Int64(1), + StepAdjustments: []*autoscaling.StepAdjustment{ + { // Required + ScalingAdjustment: aws.Int64(1), // Required + MetricIntervalLowerBound: aws.Float64(1.0), + MetricIntervalUpperBound: aws.Float64(1.0), + }, + // More values... + }, } resp, err := svc.PutScalingPolicy(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_PutScheduledUpdateGroupAction() { @@ -1205,10 +992,10 @@ func ExampleAutoScaling_PutScheduledUpdateGroupAction() { params := &autoscaling.PutScheduledUpdateGroupActionInput{ AutoScalingGroupName: aws.String("ResourceName"), // Required ScheduledActionName: aws.String("XmlStringMaxLen255"), // Required - DesiredCapacity: aws.Long(1), + DesiredCapacity: aws.Int64(1), EndTime: aws.Time(time.Now()), - MaxSize: aws.Long(1), - MinSize: aws.Long(1), + MaxSize: aws.Int64(1), + MinSize: aws.Int64(1), Recurrence: aws.String("XmlStringMaxLen255"), StartTime: aws.Time(time.Now()), Time: aws.Time(time.Now()), @@ -1216,22 +1003,14 @@ func ExampleAutoScaling_PutScheduledUpdateGroupAction() { resp, err := svc.PutScheduledUpdateGroupAction(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_RecordLifecycleActionHeartbeat() { @@ -1245,22 +1024,14 @@ func ExampleAutoScaling_RecordLifecycleActionHeartbeat() { resp, err := svc.RecordLifecycleActionHeartbeat(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_ResumeProcesses() { @@ -1276,22 +1047,14 @@ func ExampleAutoScaling_ResumeProcesses() { resp, err := svc.ResumeProcesses(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_SetDesiredCapacity() { @@ -1299,28 +1062,20 @@ func ExampleAutoScaling_SetDesiredCapacity() { params := &autoscaling.SetDesiredCapacityInput{ AutoScalingGroupName: aws.String("ResourceName"), // Required - DesiredCapacity: aws.Long(1), // Required - HonorCooldown: aws.Boolean(true), + DesiredCapacity: aws.Int64(1), // Required + HonorCooldown: aws.Bool(true), } resp, err := svc.SetDesiredCapacity(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_SetInstanceHealth() { @@ -1328,28 +1083,20 @@ func ExampleAutoScaling_SetInstanceHealth() { params := &autoscaling.SetInstanceHealthInput{ HealthStatus: aws.String("XmlStringMaxLen32"), // Required - InstanceID: aws.String("XmlStringMaxLen16"), // Required - ShouldRespectGracePeriod: aws.Boolean(true), + InstanceId: aws.String("XmlStringMaxLen16"), // Required + ShouldRespectGracePeriod: aws.Bool(true), } resp, err := svc.SetInstanceHealth(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_SuspendProcesses() { @@ -1365,50 +1112,34 @@ func ExampleAutoScaling_SuspendProcesses() { resp, err := svc.SuspendProcesses(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_TerminateInstanceInAutoScalingGroup() { svc := autoscaling.New(nil) params := &autoscaling.TerminateInstanceInAutoScalingGroupInput{ - InstanceID: aws.String("XmlStringMaxLen16"), // Required - ShouldDecrementDesiredCapacity: aws.Boolean(true), // Required + InstanceId: aws.String("XmlStringMaxLen16"), // Required + ShouldDecrementDesiredCapacity: aws.Bool(true), // Required } resp, err := svc.TerminateInstanceInAutoScalingGroup(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleAutoScaling_UpdateAutoScalingGroup() { @@ -1420,13 +1151,13 @@ func ExampleAutoScaling_UpdateAutoScalingGroup() { aws.String("XmlStringMaxLen255"), // Required // More values... }, - DefaultCooldown: aws.Long(1), - DesiredCapacity: aws.Long(1), - HealthCheckGracePeriod: aws.Long(1), + DefaultCooldown: aws.Int64(1), + DesiredCapacity: aws.Int64(1), + HealthCheckGracePeriod: aws.Int64(1), HealthCheckType: aws.String("XmlStringMaxLen32"), LaunchConfigurationName: aws.String("ResourceName"), - MaxSize: aws.Long(1), - MinSize: aws.Long(1), + MaxSize: aws.Int64(1), + MinSize: aws.Int64(1), PlacementGroup: aws.String("XmlStringMaxLen255"), TerminationPolicies: []*string{ aws.String("XmlStringMaxLen1600"), // Required @@ -1437,20 +1168,12 @@ func ExampleAutoScaling_UpdateAutoScalingGroup() { resp, err := svc.UpdateAutoScalingGroup(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } 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 41d4b123f02..d17015ad746 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 @@ -4,27 +4,35 @@ package autoscaling import ( "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/defaults" + "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" ) -// AutoScaling is a client for Auto Scaling. +// Auto Scaling is designed to automatically launch or terminate EC2 instances +// based on user-defined policies, schedules, and health checks. Use this service +// in conjunction with the Amazon CloudWatch and Elastic Load Balancing services. type AutoScaling struct { - *aws.Service + *service.Service } // Used for custom service initialization logic -var initService func(*aws.Service) +var initService func(*service.Service) // Used for custom request initialization logic -var initRequest func(*aws.Request) +var initRequest func(*request.Request) // New returns a new AutoScaling client. func New(config *aws.Config) *AutoScaling { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "autoscaling", - APIVersion: "2011-01-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "autoscaling", + APIVersion: "2011-01-01", + }, } service.Initialize() @@ -45,8 +53,8 @@ func New(config *aws.Config) *AutoScaling { // newRequest creates a new request for a AutoScaling operation and runs any // custom request initialization. -func (c *AutoScaling) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *AutoScaling) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) // Run custom request initialization if present if initRequest != nil { 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 9255ab75c81..0327851d607 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 @@ -4,33 +4,28 @@ package ec2 import ( - "sync" "time" - "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" ) -var oprw sync.Mutex +const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection" -// AcceptVPCPeeringConnectionRequest generates a request for the AcceptVPCPeeringConnection operation. -func (c *EC2) AcceptVPCPeeringConnectionRequest(input *AcceptVPCPeeringConnectionInput) (req *aws.Request, output *AcceptVPCPeeringConnectionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAcceptVPCPeeringConnection == nil { - opAcceptVPCPeeringConnection = &aws.Operation{ - Name: "AcceptVpcPeeringConnection", - HTTPMethod: "POST", - HTTPPath: "/", - } +// AcceptVpcPeeringConnectionRequest generates a request for the AcceptVpcPeeringConnection operation. +func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectionInput) (req *request.Request, output *AcceptVpcPeeringConnectionOutput) { + op := &request.Operation{ + Name: opAcceptVpcPeeringConnection, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &AcceptVPCPeeringConnectionInput{} + input = &AcceptVpcPeeringConnectionInput{} } - req = c.newRequest(opAcceptVPCPeeringConnection, input, output) - output = &AcceptVPCPeeringConnectionOutput{} + req = c.newRequest(op, input, output) + output = &AcceptVpcPeeringConnectionOutput{} req.Data = output return } @@ -39,32 +34,27 @@ func (c *EC2) AcceptVPCPeeringConnectionRequest(input *AcceptVPCPeeringConnectio // connection must be in the pending-acceptance state, and you must be the owner // of the peer VPC. Use the DescribeVpcPeeringConnections request to view your // outstanding VPC peering connection requests. -func (c *EC2) AcceptVPCPeeringConnection(input *AcceptVPCPeeringConnectionInput) (*AcceptVPCPeeringConnectionOutput, error) { - req, out := c.AcceptVPCPeeringConnectionRequest(input) +func (c *EC2) AcceptVpcPeeringConnection(input *AcceptVpcPeeringConnectionInput) (*AcceptVpcPeeringConnectionOutput, error) { + req, out := c.AcceptVpcPeeringConnectionRequest(input) err := req.Send() return out, err } -var opAcceptVPCPeeringConnection *aws.Operation +const opAllocateAddress = "AllocateAddress" // AllocateAddressRequest generates a request for the AllocateAddress operation. -func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *aws.Request, output *AllocateAddressOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAllocateAddress == nil { - opAllocateAddress = &aws.Operation{ - Name: "AllocateAddress", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request.Request, output *AllocateAddressOutput) { + op := &request.Operation{ + Name: opAllocateAddress, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AllocateAddressInput{} } - req = c.newRequest(opAllocateAddress, input, output) + req = c.newRequest(op, input, output) output = &AllocateAddressOutput{} req.Data = output return @@ -81,27 +71,22 @@ func (c *EC2) AllocateAddress(input *AllocateAddressInput) (*AllocateAddressOutp return out, err } -var opAllocateAddress *aws.Operation +const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses" -// AssignPrivateIPAddressesRequest generates a request for the AssignPrivateIPAddresses operation. -func (c *EC2) AssignPrivateIPAddressesRequest(input *AssignPrivateIPAddressesInput) (req *aws.Request, output *AssignPrivateIPAddressesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAssignPrivateIPAddresses == nil { - opAssignPrivateIPAddresses = &aws.Operation{ - Name: "AssignPrivateIpAddresses", - HTTPMethod: "POST", - HTTPPath: "/", - } +// AssignPrivateIpAddressesRequest generates a request for the AssignPrivateIpAddresses operation. +func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInput) (req *request.Request, output *AssignPrivateIpAddressesOutput) { + op := &request.Operation{ + Name: opAssignPrivateIpAddresses, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &AssignPrivateIPAddressesInput{} + input = &AssignPrivateIpAddressesInput{} } - req = c.newRequest(opAssignPrivateIPAddresses, input, output) - output = &AssignPrivateIPAddressesOutput{} + req = c.newRequest(op, input, output) + output = &AssignPrivateIpAddressesOutput{} req.Data = output return } @@ -117,32 +102,27 @@ func (c *EC2) AssignPrivateIPAddressesRequest(input *AssignPrivateIPAddressesInp // in the Amazon Elastic Compute Cloud User Guide. // // AssignPrivateIpAddresses is available only in EC2-VPC. -func (c *EC2) AssignPrivateIPAddresses(input *AssignPrivateIPAddressesInput) (*AssignPrivateIPAddressesOutput, error) { - req, out := c.AssignPrivateIPAddressesRequest(input) +func (c *EC2) AssignPrivateIpAddresses(input *AssignPrivateIpAddressesInput) (*AssignPrivateIpAddressesOutput, error) { + req, out := c.AssignPrivateIpAddressesRequest(input) err := req.Send() return out, err } -var opAssignPrivateIPAddresses *aws.Operation +const opAssociateAddress = "AssociateAddress" // AssociateAddressRequest generates a request for the AssociateAddress operation. -func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *aws.Request, output *AssociateAddressOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAssociateAddress == nil { - opAssociateAddress = &aws.Operation{ - Name: "AssociateAddress", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *request.Request, output *AssociateAddressOutput) { + op := &request.Operation{ + Name: opAssociateAddress, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AssociateAddressInput{} } - req = c.newRequest(opAssociateAddress, input, output) + req = c.newRequest(op, input, output) output = &AssociateAddressOutput{} req.Data = output return @@ -171,27 +151,22 @@ func (c *EC2) AssociateAddress(input *AssociateAddressInput) (*AssociateAddressO return out, err } -var opAssociateAddress *aws.Operation +const opAssociateDhcpOptions = "AssociateDhcpOptions" -// AssociateDHCPOptionsRequest generates a request for the AssociateDHCPOptions operation. -func (c *EC2) AssociateDHCPOptionsRequest(input *AssociateDHCPOptionsInput) (req *aws.Request, output *AssociateDHCPOptionsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAssociateDHCPOptions == nil { - opAssociateDHCPOptions = &aws.Operation{ - Name: "AssociateDhcpOptions", - HTTPMethod: "POST", - HTTPPath: "/", - } +// AssociateDhcpOptionsRequest generates a request for the AssociateDhcpOptions operation. +func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req *request.Request, output *AssociateDhcpOptionsOutput) { + op := &request.Operation{ + Name: opAssociateDhcpOptions, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &AssociateDHCPOptionsInput{} + input = &AssociateDhcpOptionsInput{} } - req = c.newRequest(opAssociateDHCPOptions, input, output) - output = &AssociateDHCPOptionsOutput{} + req = c.newRequest(op, input, output) + output = &AssociateDhcpOptionsOutput{} req.Data = output return } @@ -208,32 +183,27 @@ func (c *EC2) AssociateDHCPOptionsRequest(input *AssociateDHCPOptionsInput) (req // // For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) AssociateDHCPOptions(input *AssociateDHCPOptionsInput) (*AssociateDHCPOptionsOutput, error) { - req, out := c.AssociateDHCPOptionsRequest(input) +func (c *EC2) AssociateDhcpOptions(input *AssociateDhcpOptionsInput) (*AssociateDhcpOptionsOutput, error) { + req, out := c.AssociateDhcpOptionsRequest(input) err := req.Send() return out, err } -var opAssociateDHCPOptions *aws.Operation +const opAssociateRouteTable = "AssociateRouteTable" // AssociateRouteTableRequest generates a request for the AssociateRouteTable operation. -func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *aws.Request, output *AssociateRouteTableOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAssociateRouteTable == nil { - opAssociateRouteTable = &aws.Operation{ - Name: "AssociateRouteTable", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *request.Request, output *AssociateRouteTableOutput) { + op := &request.Operation{ + Name: opAssociateRouteTable, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AssociateRouteTableInput{} } - req = c.newRequest(opAssociateRouteTable, input, output) + req = c.newRequest(op, input, output) output = &AssociateRouteTableOutput{} req.Data = output return @@ -253,27 +223,22 @@ func (c *EC2) AssociateRouteTable(input *AssociateRouteTableInput) (*AssociateRo return out, err } -var opAssociateRouteTable *aws.Operation +const opAttachClassicLinkVpc = "AttachClassicLinkVpc" -// AttachClassicLinkVPCRequest generates a request for the AttachClassicLinkVPC operation. -func (c *EC2) AttachClassicLinkVPCRequest(input *AttachClassicLinkVPCInput) (req *aws.Request, output *AttachClassicLinkVPCOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAttachClassicLinkVPC == nil { - opAttachClassicLinkVPC = &aws.Operation{ - Name: "AttachClassicLinkVpc", - HTTPMethod: "POST", - HTTPPath: "/", - } +// AttachClassicLinkVpcRequest generates a request for the AttachClassicLinkVpc operation. +func (c *EC2) AttachClassicLinkVpcRequest(input *AttachClassicLinkVpcInput) (req *request.Request, output *AttachClassicLinkVpcOutput) { + op := &request.Operation{ + Name: opAttachClassicLinkVpc, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &AttachClassicLinkVPCInput{} + input = &AttachClassicLinkVpcInput{} } - req = c.newRequest(opAttachClassicLinkVPC, input, output) - output = &AttachClassicLinkVPCOutput{} + req = c.newRequest(op, input, output) + output = &AttachClassicLinkVpcOutput{} req.Data = output return } @@ -290,32 +255,27 @@ func (c *EC2) AttachClassicLinkVPCRequest(input *AttachClassicLinkVPCInput) (req // // Linking your instance to a VPC is sometimes referred to as attaching your // instance. -func (c *EC2) AttachClassicLinkVPC(input *AttachClassicLinkVPCInput) (*AttachClassicLinkVPCOutput, error) { - req, out := c.AttachClassicLinkVPCRequest(input) +func (c *EC2) AttachClassicLinkVpc(input *AttachClassicLinkVpcInput) (*AttachClassicLinkVpcOutput, error) { + req, out := c.AttachClassicLinkVpcRequest(input) err := req.Send() return out, err } -var opAttachClassicLinkVPC *aws.Operation +const opAttachInternetGateway = "AttachInternetGateway" // AttachInternetGatewayRequest generates a request for the AttachInternetGateway operation. -func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (req *aws.Request, output *AttachInternetGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAttachInternetGateway == nil { - opAttachInternetGateway = &aws.Operation{ - Name: "AttachInternetGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (req *request.Request, output *AttachInternetGatewayOutput) { + op := &request.Operation{ + Name: opAttachInternetGateway, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AttachInternetGatewayInput{} } - req = c.newRequest(opAttachInternetGateway, input, output) + req = c.newRequest(op, input, output) output = &AttachInternetGatewayOutput{} req.Data = output return @@ -330,26 +290,21 @@ func (c *EC2) AttachInternetGateway(input *AttachInternetGatewayInput) (*AttachI return out, err } -var opAttachInternetGateway *aws.Operation +const opAttachNetworkInterface = "AttachNetworkInterface" // AttachNetworkInterfaceRequest generates a request for the AttachNetworkInterface operation. -func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput) (req *aws.Request, output *AttachNetworkInterfaceOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAttachNetworkInterface == nil { - opAttachNetworkInterface = &aws.Operation{ - Name: "AttachNetworkInterface", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput) (req *request.Request, output *AttachNetworkInterfaceOutput) { + op := &request.Operation{ + Name: opAttachNetworkInterface, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AttachNetworkInterfaceInput{} } - req = c.newRequest(opAttachNetworkInterface, input, output) + req = c.newRequest(op, input, output) output = &AttachNetworkInterfaceOutput{} req.Data = output return @@ -362,60 +317,21 @@ func (c *EC2) AttachNetworkInterface(input *AttachNetworkInterfaceInput) (*Attac return out, err } -var opAttachNetworkInterface *aws.Operation - -// AttachVPNGatewayRequest generates a request for the AttachVPNGateway operation. -func (c *EC2) AttachVPNGatewayRequest(input *AttachVPNGatewayInput) (req *aws.Request, output *AttachVPNGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAttachVPNGateway == nil { - opAttachVPNGateway = &aws.Operation{ - Name: "AttachVpnGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &AttachVPNGatewayInput{} - } - - req = c.newRequest(opAttachVPNGateway, input, output) - output = &AttachVPNGatewayOutput{} - req.Data = output - return -} - -// Attaches a virtual private gateway to a VPC. For more information, see Adding -// a Hardware Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) AttachVPNGateway(input *AttachVPNGatewayInput) (*AttachVPNGatewayOutput, error) { - req, out := c.AttachVPNGatewayRequest(input) - err := req.Send() - return out, err -} - -var opAttachVPNGateway *aws.Operation +const opAttachVolume = "AttachVolume" // AttachVolumeRequest generates a request for the AttachVolume operation. -func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *aws.Request, output *VolumeAttachment) { - oprw.Lock() - defer oprw.Unlock() - - if opAttachVolume == nil { - opAttachVolume = &aws.Operation{ - Name: "AttachVolume", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Request, output *VolumeAttachment) { + op := &request.Operation{ + Name: opAttachVolume, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AttachVolumeInput{} } - req = c.newRequest(opAttachVolume, input, output) + req = c.newRequest(op, input, output) output = &VolumeAttachment{} req.Data = output return @@ -452,26 +368,50 @@ func (c *EC2) AttachVolume(input *AttachVolumeInput) (*VolumeAttachment, error) return out, err } -var opAttachVolume *aws.Operation +const opAttachVpnGateway = "AttachVpnGateway" + +// AttachVpnGatewayRequest generates a request for the AttachVpnGateway operation. +func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *request.Request, output *AttachVpnGatewayOutput) { + op := &request.Operation{ + Name: opAttachVpnGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AttachVpnGatewayInput{} + } + + req = c.newRequest(op, input, output) + output = &AttachVpnGatewayOutput{} + req.Data = output + return +} + +// Attaches a virtual private gateway to a VPC. For more information, see Adding +// a Hardware Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// in the Amazon Virtual Private Cloud User Guide. +func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) { + req, out := c.AttachVpnGatewayRequest(input) + err := req.Send() + return out, err +} + +const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress" // AuthorizeSecurityGroupEgressRequest generates a request for the AuthorizeSecurityGroupEgress operation. -func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupEgressInput) (req *aws.Request, output *AuthorizeSecurityGroupEgressOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAuthorizeSecurityGroupEgress == nil { - opAuthorizeSecurityGroupEgress = &aws.Operation{ - Name: "AuthorizeSecurityGroupEgress", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupEgressInput) (req *request.Request, output *AuthorizeSecurityGroupEgressOutput) { + op := &request.Operation{ + Name: opAuthorizeSecurityGroupEgress, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AuthorizeSecurityGroupEgressInput{} } - req = c.newRequest(opAuthorizeSecurityGroupEgress, input, output) + req = c.newRequest(op, input, output) output = &AuthorizeSecurityGroupEgressOutput{} req.Data = output return @@ -504,26 +444,21 @@ func (c *EC2) AuthorizeSecurityGroupEgress(input *AuthorizeSecurityGroupEgressIn return out, err } -var opAuthorizeSecurityGroupEgress *aws.Operation +const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress" // AuthorizeSecurityGroupIngressRequest generates a request for the AuthorizeSecurityGroupIngress operation. -func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroupIngressInput) (req *aws.Request, output *AuthorizeSecurityGroupIngressOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAuthorizeSecurityGroupIngress == nil { - opAuthorizeSecurityGroupIngress = &aws.Operation{ - Name: "AuthorizeSecurityGroupIngress", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroupIngressInput) (req *request.Request, output *AuthorizeSecurityGroupIngressOutput) { + op := &request.Operation{ + Name: opAuthorizeSecurityGroupIngress, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AuthorizeSecurityGroupIngressInput{} } - req = c.newRequest(opAuthorizeSecurityGroupIngress, input, output) + req = c.newRequest(op, input, output) output = &AuthorizeSecurityGroupIngressOutput{} req.Data = output return @@ -554,26 +489,21 @@ func (c *EC2) AuthorizeSecurityGroupIngress(input *AuthorizeSecurityGroupIngress return out, err } -var opAuthorizeSecurityGroupIngress *aws.Operation +const opBundleInstance = "BundleInstance" // BundleInstanceRequest generates a request for the BundleInstance operation. -func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *aws.Request, output *BundleInstanceOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opBundleInstance == nil { - opBundleInstance = &aws.Operation{ - Name: "BundleInstance", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *request.Request, output *BundleInstanceOutput) { + op := &request.Operation{ + Name: opBundleInstance, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &BundleInstanceInput{} } - req = c.newRequest(opBundleInstance, input, output) + req = c.newRequest(op, input, output) output = &BundleInstanceOutput{} req.Data = output return @@ -595,26 +525,21 @@ func (c *EC2) BundleInstance(input *BundleInstanceInput) (*BundleInstanceOutput, return out, err } -var opBundleInstance *aws.Operation +const opCancelBundleTask = "CancelBundleTask" // CancelBundleTaskRequest generates a request for the CancelBundleTask operation. -func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *aws.Request, output *CancelBundleTaskOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCancelBundleTask == nil { - opCancelBundleTask = &aws.Operation{ - Name: "CancelBundleTask", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *request.Request, output *CancelBundleTaskOutput) { + op := &request.Operation{ + Name: opCancelBundleTask, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CancelBundleTaskInput{} } - req = c.newRequest(opCancelBundleTask, input, output) + req = c.newRequest(op, input, output) output = &CancelBundleTaskOutput{} req.Data = output return @@ -627,26 +552,21 @@ func (c *EC2) CancelBundleTask(input *CancelBundleTaskInput) (*CancelBundleTaskO return out, err } -var opCancelBundleTask *aws.Operation +const opCancelConversionTask = "CancelConversionTask" // CancelConversionTaskRequest generates a request for the CancelConversionTask operation. -func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req *aws.Request, output *CancelConversionTaskOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCancelConversionTask == nil { - opCancelConversionTask = &aws.Operation{ - Name: "CancelConversionTask", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req *request.Request, output *CancelConversionTaskOutput) { + op := &request.Operation{ + Name: opCancelConversionTask, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CancelConversionTaskInput{} } - req = c.newRequest(opCancelConversionTask, input, output) + req = c.newRequest(op, input, output) output = &CancelConversionTaskOutput{} req.Data = output return @@ -667,26 +587,21 @@ func (c *EC2) CancelConversionTask(input *CancelConversionTaskInput) (*CancelCon return out, err } -var opCancelConversionTask *aws.Operation +const opCancelExportTask = "CancelExportTask" // CancelExportTaskRequest generates a request for the CancelExportTask operation. -func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *aws.Request, output *CancelExportTaskOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCancelExportTask == nil { - opCancelExportTask = &aws.Operation{ - Name: "CancelExportTask", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) { + op := &request.Operation{ + Name: opCancelExportTask, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CancelExportTaskInput{} } - req = c.newRequest(opCancelExportTask, input, output) + req = c.newRequest(op, input, output) output = &CancelExportTaskOutput{} req.Data = output return @@ -702,26 +617,21 @@ func (c *EC2) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskO return out, err } -var opCancelExportTask *aws.Operation +const opCancelImportTask = "CancelImportTask" // CancelImportTaskRequest generates a request for the CancelImportTask operation. -func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *aws.Request, output *CancelImportTaskOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCancelImportTask == nil { - opCancelImportTask = &aws.Operation{ - Name: "CancelImportTask", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *request.Request, output *CancelImportTaskOutput) { + op := &request.Operation{ + Name: opCancelImportTask, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CancelImportTaskInput{} } - req = c.newRequest(opCancelImportTask, input, output) + req = c.newRequest(op, input, output) output = &CancelImportTaskOutput{} req.Data = output return @@ -734,26 +644,21 @@ func (c *EC2) CancelImportTask(input *CancelImportTaskInput) (*CancelImportTaskO return out, err } -var opCancelImportTask *aws.Operation +const opCancelReservedInstancesListing = "CancelReservedInstancesListing" // CancelReservedInstancesListingRequest generates a request for the CancelReservedInstancesListing operation. -func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstancesListingInput) (req *aws.Request, output *CancelReservedInstancesListingOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCancelReservedInstancesListing == nil { - opCancelReservedInstancesListing = &aws.Operation{ - Name: "CancelReservedInstancesListing", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstancesListingInput) (req *request.Request, output *CancelReservedInstancesListingOutput) { + op := &request.Operation{ + Name: opCancelReservedInstancesListing, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CancelReservedInstancesListingInput{} } - req = c.newRequest(opCancelReservedInstancesListing, input, output) + req = c.newRequest(op, input, output) output = &CancelReservedInstancesListingOutput{} req.Data = output return @@ -770,26 +675,21 @@ func (c *EC2) CancelReservedInstancesListing(input *CancelReservedInstancesListi return out, err } -var opCancelReservedInstancesListing *aws.Operation +const opCancelSpotFleetRequests = "CancelSpotFleetRequests" // CancelSpotFleetRequestsRequest generates a request for the CancelSpotFleetRequests operation. -func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput) (req *aws.Request, output *CancelSpotFleetRequestsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCancelSpotFleetRequests == nil { - opCancelSpotFleetRequests = &aws.Operation{ - Name: "CancelSpotFleetRequests", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput) (req *request.Request, output *CancelSpotFleetRequestsOutput) { + op := &request.Operation{ + Name: opCancelSpotFleetRequests, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CancelSpotFleetRequestsInput{} } - req = c.newRequest(opCancelSpotFleetRequests, input, output) + req = c.newRequest(op, input, output) output = &CancelSpotFleetRequestsOutput{} req.Data = output return @@ -802,39 +702,34 @@ func (c *EC2) CancelSpotFleetRequests(input *CancelSpotFleetRequestsInput) (*Can return out, err } -var opCancelSpotFleetRequests *aws.Operation +const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests" // CancelSpotInstanceRequestsRequest generates a request for the CancelSpotInstanceRequests operation. -func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequestsInput) (req *aws.Request, output *CancelSpotInstanceRequestsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCancelSpotInstanceRequests == nil { - opCancelSpotInstanceRequests = &aws.Operation{ - Name: "CancelSpotInstanceRequests", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequestsInput) (req *request.Request, output *CancelSpotInstanceRequestsOutput) { + op := &request.Operation{ + Name: opCancelSpotInstanceRequests, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CancelSpotInstanceRequestsInput{} } - req = c.newRequest(opCancelSpotInstanceRequests, input, output) + req = c.newRequest(op, input, output) output = &CancelSpotInstanceRequestsOutput{} req.Data = output return } -// Cancels one or more Spot Instance requests. Spot Instances are instances +// Cancels one or more Spot instance requests. Spot instances are instances // that Amazon EC2 starts on your behalf when the bid price that you specify -// exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price -// based on available Spot Instance capacity and current Spot Instance requests. +// exceeds the current Spot price. Amazon EC2 periodically sets the Spot price +// based on available Spot instance capacity and current Spot instance requests. // For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) // in the Amazon Elastic Compute Cloud User Guide. // -// Canceling a Spot Instance request does not terminate running Spot Instances +// Canceling a Spot instance request does not terminate running Spot instances // associated with the request. func (c *EC2) CancelSpotInstanceRequests(input *CancelSpotInstanceRequestsInput) (*CancelSpotInstanceRequestsOutput, error) { req, out := c.CancelSpotInstanceRequestsRequest(input) @@ -842,26 +737,21 @@ func (c *EC2) CancelSpotInstanceRequests(input *CancelSpotInstanceRequestsInput) return out, err } -var opCancelSpotInstanceRequests *aws.Operation +const opConfirmProductInstance = "ConfirmProductInstance" // ConfirmProductInstanceRequest generates a request for the ConfirmProductInstance operation. -func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput) (req *aws.Request, output *ConfirmProductInstanceOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opConfirmProductInstance == nil { - opConfirmProductInstance = &aws.Operation{ - Name: "ConfirmProductInstance", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput) (req *request.Request, output *ConfirmProductInstanceOutput) { + op := &request.Operation{ + Name: opConfirmProductInstance, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ConfirmProductInstanceInput{} } - req = c.newRequest(opConfirmProductInstance, input, output) + req = c.newRequest(op, input, output) output = &ConfirmProductInstanceOutput{} req.Data = output return @@ -877,26 +767,21 @@ func (c *EC2) ConfirmProductInstance(input *ConfirmProductInstanceInput) (*Confi return out, err } -var opConfirmProductInstance *aws.Operation +const opCopyImage = "CopyImage" // CopyImageRequest generates a request for the CopyImage operation. -func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *aws.Request, output *CopyImageOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCopyImage == nil { - opCopyImage = &aws.Operation{ - Name: "CopyImage", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, output *CopyImageOutput) { + op := &request.Operation{ + Name: opCopyImage, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CopyImageInput{} } - req = c.newRequest(opCopyImage, input, output) + req = c.newRequest(op, input, output) output = &CopyImageOutput{} req.Data = output return @@ -915,26 +800,21 @@ func (c *EC2) CopyImage(input *CopyImageInput) (*CopyImageOutput, error) { return out, err } -var opCopyImage *aws.Operation +const opCopySnapshot = "CopySnapshot" // CopySnapshotRequest generates a request for the CopySnapshot operation. -func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *aws.Request, output *CopySnapshotOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCopySnapshot == nil { - opCopySnapshot = &aws.Operation{ - Name: "CopySnapshot", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Request, output *CopySnapshotOutput) { + op := &request.Operation{ + Name: opCopySnapshot, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CopySnapshotInput{} } - req = c.newRequest(opCopySnapshot, input, output) + req = c.newRequest(op, input, output) output = &CopySnapshotOutput{} req.Data = output return @@ -947,12 +827,12 @@ func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *aws.Request, o // the HTTP request to. // // Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted -// snapshots remain unencrypted. +// snapshots remain unencrypted, unless the Encrypted flag is specified during +// the snapshot copy operation. By default, encrypted snapshot copies use the +// default AWS Key Management Service (AWS KMS) customer master key (CMK); however, +// you can specify a non-default CMK with the KmsKeyId parameter. // -// Copying snapshots that were encrypted with non-default AWS Key Management -// Service (KMS) master keys is not supported at this time. -// -// For more information, see Copying an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) +// For more information, see Copying an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) // in the Amazon Elastic Compute Cloud User Guide. func (c *EC2) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) { req, out := c.CopySnapshotRequest(input) @@ -960,26 +840,21 @@ func (c *EC2) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error return out, err } -var opCopySnapshot *aws.Operation +const opCreateCustomerGateway = "CreateCustomerGateway" // CreateCustomerGatewayRequest generates a request for the CreateCustomerGateway operation. -func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (req *aws.Request, output *CreateCustomerGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateCustomerGateway == nil { - opCreateCustomerGateway = &aws.Operation{ - Name: "CreateCustomerGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (req *request.Request, output *CreateCustomerGatewayOutput) { + op := &request.Operation{ + Name: opCreateCustomerGateway, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateCustomerGatewayInput{} } - req = c.newRequest(opCreateCustomerGateway, input, output) + req = c.newRequest(op, input, output) output = &CreateCustomerGatewayOutput{} req.Data = output return @@ -1016,27 +891,22 @@ func (c *EC2) CreateCustomerGateway(input *CreateCustomerGatewayInput) (*CreateC return out, err } -var opCreateCustomerGateway *aws.Operation +const opCreateDhcpOptions = "CreateDhcpOptions" -// CreateDHCPOptionsRequest generates a request for the CreateDHCPOptions operation. -func (c *EC2) CreateDHCPOptionsRequest(input *CreateDHCPOptionsInput) (req *aws.Request, output *CreateDHCPOptionsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateDHCPOptions == nil { - opCreateDHCPOptions = &aws.Operation{ - Name: "CreateDhcpOptions", - HTTPMethod: "POST", - HTTPPath: "/", - } +// CreateDhcpOptionsRequest generates a request for the CreateDhcpOptions operation. +func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *request.Request, output *CreateDhcpOptionsOutput) { + op := &request.Operation{ + Name: opCreateDhcpOptions, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &CreateDHCPOptionsInput{} + input = &CreateDhcpOptionsInput{} } - req = c.newRequest(opCreateDHCPOptions, input, output) - output = &CreateDHCPOptionsOutput{} + req = c.newRequest(op, input, output) + output = &CreateDhcpOptionsOutput{} req.Data = output return } @@ -1070,32 +940,63 @@ func (c *EC2) CreateDHCPOptionsRequest(input *CreateDHCPOptionsInput) (req *aws. // either to AmazonProvidedDNS or to a domain name server of your choice. For // more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) CreateDHCPOptions(input *CreateDHCPOptionsInput) (*CreateDHCPOptionsOutput, error) { - req, out := c.CreateDHCPOptionsRequest(input) +func (c *EC2) CreateDhcpOptions(input *CreateDhcpOptionsInput) (*CreateDhcpOptionsOutput, error) { + req, out := c.CreateDhcpOptionsRequest(input) err := req.Send() return out, err } -var opCreateDHCPOptions *aws.Operation +const opCreateFlowLogs = "CreateFlowLogs" + +// CreateFlowLogsRequest generates a request for the CreateFlowLogs operation. +func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Request, output *CreateFlowLogsOutput) { + op := &request.Operation{ + Name: opCreateFlowLogs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateFlowLogsInput{} + } + + req = c.newRequest(op, input, output) + output = &CreateFlowLogsOutput{} + req.Data = output + return +} + +// Creates one or more flow logs to capture IP traffic for a specific network +// interface, subnet, or VPC. Flow logs are delivered to a specified log group +// in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, +// a log stream is created in CloudWatch Logs for each network interface in +// the subnet or VPC. Log streams can include information about accepted and +// rejected traffic to a network interface. You can view the data in your log +// streams using Amazon CloudWatch Logs. +// +// In your request, you must also specify an IAM role that has permission to +// publish logs to CloudWatch Logs. +func (c *EC2) CreateFlowLogs(input *CreateFlowLogsInput) (*CreateFlowLogsOutput, error) { + req, out := c.CreateFlowLogsRequest(input) + err := req.Send() + return out, err +} + +const opCreateImage = "CreateImage" // CreateImageRequest generates a request for the CreateImage operation. -func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *aws.Request, output *CreateImageOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateImage == nil { - opCreateImage = &aws.Operation{ - Name: "CreateImage", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *request.Request, output *CreateImageOutput) { + op := &request.Operation{ + Name: opCreateImage, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateImageInput{} } - req = c.newRequest(opCreateImage, input, output) + req = c.newRequest(op, input, output) output = &CreateImageOutput{} req.Data = output return @@ -1117,26 +1018,21 @@ func (c *EC2) CreateImage(input *CreateImageInput) (*CreateImageOutput, error) { return out, err } -var opCreateImage *aws.Operation +const opCreateInstanceExportTask = "CreateInstanceExportTask" // CreateInstanceExportTaskRequest generates a request for the CreateInstanceExportTask operation. -func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInput) (req *aws.Request, output *CreateInstanceExportTaskOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateInstanceExportTask == nil { - opCreateInstanceExportTask = &aws.Operation{ - Name: "CreateInstanceExportTask", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInput) (req *request.Request, output *CreateInstanceExportTaskOutput) { + op := &request.Operation{ + Name: opCreateInstanceExportTask, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateInstanceExportTaskInput{} } - req = c.newRequest(opCreateInstanceExportTask, input, output) + req = c.newRequest(op, input, output) output = &CreateInstanceExportTaskOutput{} req.Data = output return @@ -1154,26 +1050,21 @@ func (c *EC2) CreateInstanceExportTask(input *CreateInstanceExportTaskInput) (*C return out, err } -var opCreateInstanceExportTask *aws.Operation +const opCreateInternetGateway = "CreateInternetGateway" // CreateInternetGatewayRequest generates a request for the CreateInternetGateway operation. -func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (req *aws.Request, output *CreateInternetGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateInternetGateway == nil { - opCreateInternetGateway = &aws.Operation{ - Name: "CreateInternetGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (req *request.Request, output *CreateInternetGatewayOutput) { + op := &request.Operation{ + Name: opCreateInternetGateway, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateInternetGatewayInput{} } - req = c.newRequest(opCreateInternetGateway, input, output) + req = c.newRequest(op, input, output) output = &CreateInternetGatewayOutput{} req.Data = output return @@ -1190,26 +1081,21 @@ func (c *EC2) CreateInternetGateway(input *CreateInternetGatewayInput) (*CreateI return out, err } -var opCreateInternetGateway *aws.Operation +const opCreateKeyPair = "CreateKeyPair" // CreateKeyPairRequest generates a request for the CreateKeyPair operation. -func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *aws.Request, output *CreateKeyPairOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateKeyPair == nil { - opCreateKeyPair = &aws.Operation{ - Name: "CreateKeyPair", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Request, output *CreateKeyPairOutput) { + op := &request.Operation{ + Name: opCreateKeyPair, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateKeyPairInput{} } - req = c.newRequest(opCreateKeyPair, input, output) + req = c.newRequest(op, input, output) output = &CreateKeyPairOutput{} req.Data = output return @@ -1233,27 +1119,22 @@ func (c *EC2) CreateKeyPair(input *CreateKeyPairInput) (*CreateKeyPairOutput, er return out, err } -var opCreateKeyPair *aws.Operation +const opCreateNetworkAcl = "CreateNetworkAcl" -// CreateNetworkACLRequest generates a request for the CreateNetworkACL operation. -func (c *EC2) CreateNetworkACLRequest(input *CreateNetworkACLInput) (req *aws.Request, output *CreateNetworkACLOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateNetworkACL == nil { - opCreateNetworkACL = &aws.Operation{ - Name: "CreateNetworkAcl", - HTTPMethod: "POST", - HTTPPath: "/", - } +// CreateNetworkAclRequest generates a request for the CreateNetworkAcl operation. +func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *request.Request, output *CreateNetworkAclOutput) { + op := &request.Operation{ + Name: opCreateNetworkAcl, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &CreateNetworkACLInput{} + input = &CreateNetworkAclInput{} } - req = c.newRequest(opCreateNetworkACL, input, output) - output = &CreateNetworkACLOutput{} + req = c.newRequest(op, input, output) + output = &CreateNetworkAclOutput{} req.Data = output return } @@ -1263,33 +1144,28 @@ func (c *EC2) CreateNetworkACLRequest(input *CreateNetworkACLInput) (req *aws.Re // // For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) CreateNetworkACL(input *CreateNetworkACLInput) (*CreateNetworkACLOutput, error) { - req, out := c.CreateNetworkACLRequest(input) +func (c *EC2) CreateNetworkAcl(input *CreateNetworkAclInput) (*CreateNetworkAclOutput, error) { + req, out := c.CreateNetworkAclRequest(input) err := req.Send() return out, err } -var opCreateNetworkACL *aws.Operation +const opCreateNetworkAclEntry = "CreateNetworkAclEntry" -// CreateNetworkACLEntryRequest generates a request for the CreateNetworkACLEntry operation. -func (c *EC2) CreateNetworkACLEntryRequest(input *CreateNetworkACLEntryInput) (req *aws.Request, output *CreateNetworkACLEntryOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateNetworkACLEntry == nil { - opCreateNetworkACLEntry = &aws.Operation{ - Name: "CreateNetworkAclEntry", - HTTPMethod: "POST", - HTTPPath: "/", - } +// CreateNetworkAclEntryRequest generates a request for the CreateNetworkAclEntry operation. +func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (req *request.Request, output *CreateNetworkAclEntryOutput) { + op := &request.Operation{ + Name: opCreateNetworkAclEntry, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &CreateNetworkACLEntryInput{} + input = &CreateNetworkAclEntryInput{} } - req = c.newRequest(opCreateNetworkACLEntry, input, output) - output = &CreateNetworkACLEntryOutput{} + req = c.newRequest(op, input, output) + output = &CreateNetworkAclEntryOutput{} req.Data = output return } @@ -1311,32 +1187,27 @@ func (c *EC2) CreateNetworkACLEntryRequest(input *CreateNetworkACLEntryInput) (r // // For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) CreateNetworkACLEntry(input *CreateNetworkACLEntryInput) (*CreateNetworkACLEntryOutput, error) { - req, out := c.CreateNetworkACLEntryRequest(input) +func (c *EC2) CreateNetworkAclEntry(input *CreateNetworkAclEntryInput) (*CreateNetworkAclEntryOutput, error) { + req, out := c.CreateNetworkAclEntryRequest(input) err := req.Send() return out, err } -var opCreateNetworkACLEntry *aws.Operation +const opCreateNetworkInterface = "CreateNetworkInterface" // CreateNetworkInterfaceRequest generates a request for the CreateNetworkInterface operation. -func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput) (req *aws.Request, output *CreateNetworkInterfaceOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateNetworkInterface == nil { - opCreateNetworkInterface = &aws.Operation{ - Name: "CreateNetworkInterface", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput) (req *request.Request, output *CreateNetworkInterfaceOutput) { + op := &request.Operation{ + Name: opCreateNetworkInterface, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateNetworkInterfaceInput{} } - req = c.newRequest(opCreateNetworkInterface, input, output) + req = c.newRequest(op, input, output) output = &CreateNetworkInterfaceOutput{} req.Data = output return @@ -1353,26 +1224,21 @@ func (c *EC2) CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*Creat return out, err } -var opCreateNetworkInterface *aws.Operation +const opCreatePlacementGroup = "CreatePlacementGroup" // CreatePlacementGroupRequest generates a request for the CreatePlacementGroup operation. -func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req *aws.Request, output *CreatePlacementGroupOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreatePlacementGroup == nil { - opCreatePlacementGroup = &aws.Operation{ - Name: "CreatePlacementGroup", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req *request.Request, output *CreatePlacementGroupOutput) { + op := &request.Operation{ + Name: opCreatePlacementGroup, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreatePlacementGroupInput{} } - req = c.newRequest(opCreatePlacementGroup, input, output) + req = c.newRequest(op, input, output) output = &CreatePlacementGroupOutput{} req.Data = output return @@ -1390,26 +1256,21 @@ func (c *EC2) CreatePlacementGroup(input *CreatePlacementGroupInput) (*CreatePla return out, err } -var opCreatePlacementGroup *aws.Operation +const opCreateReservedInstancesListing = "CreateReservedInstancesListing" // CreateReservedInstancesListingRequest generates a request for the CreateReservedInstancesListing operation. -func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstancesListingInput) (req *aws.Request, output *CreateReservedInstancesListingOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateReservedInstancesListing == nil { - opCreateReservedInstancesListing = &aws.Operation{ - Name: "CreateReservedInstancesListing", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstancesListingInput) (req *request.Request, output *CreateReservedInstancesListingOutput) { + op := &request.Operation{ + Name: opCreateReservedInstancesListing, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateReservedInstancesListingInput{} } - req = c.newRequest(opCreateReservedInstancesListing, input, output) + req = c.newRequest(op, input, output) output = &CreateReservedInstancesListingOutput{} req.Data = output return @@ -1425,7 +1286,7 @@ func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstanc // additional capacity. Reserved Instances bought and sold through the Reserved // Instance Marketplace work like any other Reserved Instances. // -// To sell your Reserved Instances, you must first register as a Seller in +// To sell your Reserved Instances, you must first register as a seller in // the Reserved Instance Marketplace. After completing the registration process, // you can create a Reserved Instance Marketplace listing of some or all of // your Reserved Instances, and specify the upfront price to receive for them. @@ -1441,26 +1302,21 @@ func (c *EC2) CreateReservedInstancesListing(input *CreateReservedInstancesListi return out, err } -var opCreateReservedInstancesListing *aws.Operation +const opCreateRoute = "CreateRoute" // CreateRouteRequest generates a request for the CreateRoute operation. -func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *aws.Request, output *CreateRouteOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateRoute == nil { - opCreateRoute = &aws.Operation{ - Name: "CreateRoute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) { + op := &request.Operation{ + Name: opCreateRoute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateRouteInput{} } - req = c.newRequest(opCreateRoute, input, output) + req = c.newRequest(op, input, output) output = &CreateRouteOutput{} req.Data = output return @@ -1491,26 +1347,21 @@ func (c *EC2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) { return out, err } -var opCreateRoute *aws.Operation +const opCreateRouteTable = "CreateRouteTable" // CreateRouteTableRequest generates a request for the CreateRouteTable operation. -func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *aws.Request, output *CreateRouteTableOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateRouteTable == nil { - opCreateRouteTable = &aws.Operation{ - Name: "CreateRouteTable", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *request.Request, output *CreateRouteTableOutput) { + op := &request.Operation{ + Name: opCreateRouteTable, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateRouteTableInput{} } - req = c.newRequest(opCreateRouteTable, input, output) + req = c.newRequest(op, input, output) output = &CreateRouteTableOutput{} req.Data = output return @@ -1527,26 +1378,21 @@ func (c *EC2) CreateRouteTable(input *CreateRouteTableInput) (*CreateRouteTableO return out, err } -var opCreateRouteTable *aws.Operation +const opCreateSecurityGroup = "CreateSecurityGroup" // CreateSecurityGroupRequest generates a request for the CreateSecurityGroup operation. -func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *aws.Request, output *CreateSecurityGroupOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateSecurityGroup == nil { - opCreateSecurityGroup = &aws.Operation{ - Name: "CreateSecurityGroup", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *request.Request, output *CreateSecurityGroupOutput) { + op := &request.Operation{ + Name: opCreateSecurityGroup, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateSecurityGroupInput{} } - req = c.newRequest(opCreateSecurityGroup, input, output) + req = c.newRequest(op, input, output) output = &CreateSecurityGroupOutput{} req.Data = output return @@ -1585,26 +1431,21 @@ func (c *EC2) CreateSecurityGroup(input *CreateSecurityGroupInput) (*CreateSecur return out, err } -var opCreateSecurityGroup *aws.Operation +const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a request for the CreateSnapshot operation. -func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *aws.Request, output *Snapshot) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateSnapshot == nil { - opCreateSnapshot = &aws.Operation{ - Name: "CreateSnapshot", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *Snapshot) { + op := &request.Operation{ + Name: opCreateSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateSnapshotInput{} } - req = c.newRequest(opCreateSnapshot, input, output) + req = c.newRequest(op, input, output) output = &Snapshot{} req.Data = output return @@ -1644,32 +1485,27 @@ func (c *EC2) CreateSnapshot(input *CreateSnapshotInput) (*Snapshot, error) { return out, err } -var opCreateSnapshot *aws.Operation +const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription" // CreateSpotDatafeedSubscriptionRequest generates a request for the CreateSpotDatafeedSubscription operation. -func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSubscriptionInput) (req *aws.Request, output *CreateSpotDatafeedSubscriptionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateSpotDatafeedSubscription == nil { - opCreateSpotDatafeedSubscription = &aws.Operation{ - Name: "CreateSpotDatafeedSubscription", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSubscriptionInput) (req *request.Request, output *CreateSpotDatafeedSubscriptionOutput) { + op := &request.Operation{ + Name: opCreateSpotDatafeedSubscription, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateSpotDatafeedSubscriptionInput{} } - req = c.newRequest(opCreateSpotDatafeedSubscription, input, output) + req = c.newRequest(op, input, output) output = &CreateSpotDatafeedSubscriptionOutput{} req.Data = output return } -// Creates a data feed for Spot Instances, enabling you to view Spot Instance +// Creates a data feed for Spot instances, enabling you to view Spot instance // usage logs. You can create one data feed per AWS account. For more information, // see Spot Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -1679,26 +1515,21 @@ func (c *EC2) CreateSpotDatafeedSubscription(input *CreateSpotDatafeedSubscripti return out, err } -var opCreateSpotDatafeedSubscription *aws.Operation +const opCreateSubnet = "CreateSubnet" // CreateSubnetRequest generates a request for the CreateSubnet operation. -func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *aws.Request, output *CreateSubnetOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateSubnet == nil { - opCreateSubnet = &aws.Operation{ - Name: "CreateSubnet", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Request, output *CreateSubnetOutput) { + op := &request.Operation{ + Name: opCreateSubnet, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateSubnetInput{} } - req = c.newRequest(opCreateSubnet, input, output) + req = c.newRequest(op, input, output) output = &CreateSubnetOutput{} req.Data = output return @@ -1735,26 +1566,21 @@ func (c *EC2) CreateSubnet(input *CreateSubnetInput) (*CreateSubnetOutput, error return out, err } -var opCreateSubnet *aws.Operation +const opCreateTags = "CreateTags" // CreateTagsRequest generates a request for the CreateTags operation. -func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *aws.Request, output *CreateTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateTags == nil { - opCreateTags = &aws.Operation{ - Name: "CreateTags", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { + op := &request.Operation{ + Name: opCreateTags, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateTagsInput{} } - req = c.newRequest(opCreateTags, input, output) + req = c.newRequest(op, input, output) output = &CreateTagsOutput{} req.Data = output return @@ -1772,273 +1598,21 @@ func (c *EC2) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { return out, err } -var opCreateTags *aws.Operation - -// CreateVPCRequest generates a request for the CreateVPC operation. -func (c *EC2) CreateVPCRequest(input *CreateVPCInput) (req *aws.Request, output *CreateVPCOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateVPC == nil { - opCreateVPC = &aws.Operation{ - Name: "CreateVpc", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &CreateVPCInput{} - } - - req = c.newRequest(opCreateVPC, input, output) - output = &CreateVPCOutput{} - req.Data = output - return -} - -// Creates a VPC with the specified CIDR block. -// -// The smallest VPC you can create uses a /28 netmask (16 IP addresses), and -// the largest uses a /16 netmask (65,536 IP addresses). To help you decide -// how big to make your VPC, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) -// in the Amazon Virtual Private Cloud User Guide. -// -// By default, each instance you launch in the VPC has the default DHCP options, -// which includes only a default DNS server that we provide (AmazonProvidedDNS). -// For more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) -// in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) CreateVPC(input *CreateVPCInput) (*CreateVPCOutput, error) { - req, out := c.CreateVPCRequest(input) - err := req.Send() - return out, err -} - -var opCreateVPC *aws.Operation - -// CreateVPCEndpointRequest generates a request for the CreateVPCEndpoint operation. -func (c *EC2) CreateVPCEndpointRequest(input *CreateVPCEndpointInput) (req *aws.Request, output *CreateVPCEndpointOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateVPCEndpoint == nil { - opCreateVPCEndpoint = &aws.Operation{ - Name: "CreateVpcEndpoint", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &CreateVPCEndpointInput{} - } - - req = c.newRequest(opCreateVPCEndpoint, input, output) - output = &CreateVPCEndpointOutput{} - req.Data = output - return -} - -// Creates a VPC endpoint for a specified AWS service. An endpoint enables you -// to create a private connection between your VPC and another AWS service in -// your account. You can specify an endpoint policy to attach to the endpoint -// that will control access to the service from your VPC. You can also specify -// the VPC route tables that use the endpoint. -// -// Currently, only endpoints to Amazon S3 are supported. -func (c *EC2) CreateVPCEndpoint(input *CreateVPCEndpointInput) (*CreateVPCEndpointOutput, error) { - req, out := c.CreateVPCEndpointRequest(input) - err := req.Send() - return out, err -} - -var opCreateVPCEndpoint *aws.Operation - -// CreateVPCPeeringConnectionRequest generates a request for the CreateVPCPeeringConnection operation. -func (c *EC2) CreateVPCPeeringConnectionRequest(input *CreateVPCPeeringConnectionInput) (req *aws.Request, output *CreateVPCPeeringConnectionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateVPCPeeringConnection == nil { - opCreateVPCPeeringConnection = &aws.Operation{ - Name: "CreateVpcPeeringConnection", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &CreateVPCPeeringConnectionInput{} - } - - req = c.newRequest(opCreateVPCPeeringConnection, input, output) - output = &CreateVPCPeeringConnectionOutput{} - req.Data = output - return -} - -// Requests a VPC peering connection between two VPCs: a requester VPC that -// you own and a peer VPC with which to create the connection. The peer VPC -// can belong to another AWS account. The requester VPC and peer VPC cannot -// have overlapping CIDR blocks. -// -// The owner of the peer VPC must accept the peering request to activate the -// peering connection. The VPC peering connection request expires after 7 days, -// after which it cannot be accepted or rejected. -// -// A CreateVpcPeeringConnection request between VPCs with overlapping CIDR -// blocks results in the VPC peering connection having a status of failed. -func (c *EC2) CreateVPCPeeringConnection(input *CreateVPCPeeringConnectionInput) (*CreateVPCPeeringConnectionOutput, error) { - req, out := c.CreateVPCPeeringConnectionRequest(input) - err := req.Send() - return out, err -} - -var opCreateVPCPeeringConnection *aws.Operation - -// CreateVPNConnectionRequest generates a request for the CreateVPNConnection operation. -func (c *EC2) CreateVPNConnectionRequest(input *CreateVPNConnectionInput) (req *aws.Request, output *CreateVPNConnectionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateVPNConnection == nil { - opCreateVPNConnection = &aws.Operation{ - Name: "CreateVpnConnection", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &CreateVPNConnectionInput{} - } - - req = c.newRequest(opCreateVPNConnection, input, output) - output = &CreateVPNConnectionOutput{} - req.Data = output - return -} - -// Creates a VPN connection between an existing virtual private gateway and -// a VPN customer gateway. The only supported connection type is ipsec.1. -// -// The response includes information that you need to give to your network -// administrator to configure your customer gateway. -// -// We strongly recommend that you use HTTPS when calling this operation because -// the response contains sensitive cryptographic information for configuring -// your customer gateway. -// -// If you decide to shut down your VPN connection for any reason and later -// create a new VPN connection, you must reconfigure your customer gateway with -// the new information returned from this call. -// -// For more information about VPN connections, see Adding a Hardware Virtual -// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) CreateVPNConnection(input *CreateVPNConnectionInput) (*CreateVPNConnectionOutput, error) { - req, out := c.CreateVPNConnectionRequest(input) - err := req.Send() - return out, err -} - -var opCreateVPNConnection *aws.Operation - -// CreateVPNConnectionRouteRequest generates a request for the CreateVPNConnectionRoute operation. -func (c *EC2) CreateVPNConnectionRouteRequest(input *CreateVPNConnectionRouteInput) (req *aws.Request, output *CreateVPNConnectionRouteOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateVPNConnectionRoute == nil { - opCreateVPNConnectionRoute = &aws.Operation{ - Name: "CreateVpnConnectionRoute", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &CreateVPNConnectionRouteInput{} - } - - req = c.newRequest(opCreateVPNConnectionRoute, input, output) - output = &CreateVPNConnectionRouteOutput{} - req.Data = output - return -} - -// Creates a static route associated with a VPN connection between an existing -// virtual private gateway and a VPN customer gateway. The static route allows -// traffic to be routed from the virtual private gateway to the VPN customer -// gateway. -// -// For more information about VPN connections, see Adding a Hardware Virtual -// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) CreateVPNConnectionRoute(input *CreateVPNConnectionRouteInput) (*CreateVPNConnectionRouteOutput, error) { - req, out := c.CreateVPNConnectionRouteRequest(input) - err := req.Send() - return out, err -} - -var opCreateVPNConnectionRoute *aws.Operation - -// CreateVPNGatewayRequest generates a request for the CreateVPNGateway operation. -func (c *EC2) CreateVPNGatewayRequest(input *CreateVPNGatewayInput) (req *aws.Request, output *CreateVPNGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateVPNGateway == nil { - opCreateVPNGateway = &aws.Operation{ - Name: "CreateVpnGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &CreateVPNGatewayInput{} - } - - req = c.newRequest(opCreateVPNGateway, input, output) - output = &CreateVPNGatewayOutput{} - req.Data = output - return -} - -// Creates a virtual private gateway. A virtual private gateway is the endpoint -// on the VPC side of your VPN connection. You can create a virtual private -// gateway before creating the VPC itself. -// -// For more information about virtual private gateways, see Adding a Hardware -// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) CreateVPNGateway(input *CreateVPNGatewayInput) (*CreateVPNGatewayOutput, error) { - req, out := c.CreateVPNGatewayRequest(input) - err := req.Send() - return out, err -} - -var opCreateVPNGateway *aws.Operation +const opCreateVolume = "CreateVolume" // CreateVolumeRequest generates a request for the CreateVolume operation. -func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *aws.Request, output *Volume) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateVolume == nil { - opCreateVolume = &aws.Operation{ - Name: "CreateVolume", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Request, output *Volume) { + op := &request.Operation{ + Name: opCreateVolume, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateVolumeInput{} } - req = c.newRequest(opCreateVolume, input, output) + req = c.newRequest(op, input, output) output = &Volume{} req.Data = output return @@ -2066,26 +1640,238 @@ func (c *EC2) CreateVolume(input *CreateVolumeInput) (*Volume, error) { return out, err } -var opCreateVolume *aws.Operation +const opCreateVpc = "CreateVpc" + +// CreateVpcRequest generates a request for the CreateVpc operation. +func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, output *CreateVpcOutput) { + op := &request.Operation{ + Name: opCreateVpc, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVpcInput{} + } + + req = c.newRequest(op, input, output) + output = &CreateVpcOutput{} + req.Data = output + return +} + +// Creates a VPC with the specified CIDR block. +// +// The smallest VPC you can create uses a /28 netmask (16 IP addresses), and +// the largest uses a /16 netmask (65,536 IP addresses). To help you decide +// how big to make your VPC, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html) +// in the Amazon Virtual Private Cloud User Guide. +// +// By default, each instance you launch in the VPC has the default DHCP options, +// which includes only a default DNS server that we provide (AmazonProvidedDNS). +// For more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) +// in the Amazon Virtual Private Cloud User Guide. +func (c *EC2) CreateVpc(input *CreateVpcInput) (*CreateVpcOutput, error) { + req, out := c.CreateVpcRequest(input) + err := req.Send() + return out, err +} + +const opCreateVpcEndpoint = "CreateVpcEndpoint" + +// CreateVpcEndpointRequest generates a request for the CreateVpcEndpoint operation. +func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *request.Request, output *CreateVpcEndpointOutput) { + op := &request.Operation{ + Name: opCreateVpcEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVpcEndpointInput{} + } + + req = c.newRequest(op, input, output) + output = &CreateVpcEndpointOutput{} + req.Data = output + return +} + +// Creates a VPC endpoint for a specified AWS service. An endpoint enables you +// to create a private connection between your VPC and another AWS service in +// your account. You can specify an endpoint policy to attach to the endpoint +// that will control access to the service from your VPC. You can also specify +// the VPC route tables that use the endpoint. +// +// Currently, only endpoints to Amazon S3 are supported. +func (c *EC2) CreateVpcEndpoint(input *CreateVpcEndpointInput) (*CreateVpcEndpointOutput, error) { + req, out := c.CreateVpcEndpointRequest(input) + err := req.Send() + return out, err +} + +const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" + +// CreateVpcPeeringConnectionRequest generates a request for the CreateVpcPeeringConnection operation. +func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectionInput) (req *request.Request, output *CreateVpcPeeringConnectionOutput) { + op := &request.Operation{ + Name: opCreateVpcPeeringConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVpcPeeringConnectionInput{} + } + + req = c.newRequest(op, input, output) + output = &CreateVpcPeeringConnectionOutput{} + req.Data = output + return +} + +// Requests a VPC peering connection between two VPCs: a requester VPC that +// you own and a peer VPC with which to create the connection. The peer VPC +// can belong to another AWS account. The requester VPC and peer VPC cannot +// have overlapping CIDR blocks. +// +// The owner of the peer VPC must accept the peering request to activate the +// peering connection. The VPC peering connection request expires after 7 days, +// after which it cannot be accepted or rejected. +// +// A CreateVpcPeeringConnection request between VPCs with overlapping CIDR +// blocks results in the VPC peering connection having a status of failed. +func (c *EC2) CreateVpcPeeringConnection(input *CreateVpcPeeringConnectionInput) (*CreateVpcPeeringConnectionOutput, error) { + req, out := c.CreateVpcPeeringConnectionRequest(input) + err := req.Send() + return out, err +} + +const opCreateVpnConnection = "CreateVpnConnection" + +// CreateVpnConnectionRequest generates a request for the CreateVpnConnection operation. +func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req *request.Request, output *CreateVpnConnectionOutput) { + op := &request.Operation{ + Name: opCreateVpnConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVpnConnectionInput{} + } + + req = c.newRequest(op, input, output) + output = &CreateVpnConnectionOutput{} + req.Data = output + return +} + +// Creates a VPN connection between an existing virtual private gateway and +// a VPN customer gateway. The only supported connection type is ipsec.1. +// +// The response includes information that you need to give to your network +// administrator to configure your customer gateway. +// +// We strongly recommend that you use HTTPS when calling this operation because +// the response contains sensitive cryptographic information for configuring +// your customer gateway. +// +// If you decide to shut down your VPN connection for any reason and later +// create a new VPN connection, you must reconfigure your customer gateway with +// the new information returned from this call. +// +// For more information about VPN connections, see Adding a Hardware Virtual +// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// in the Amazon Virtual Private Cloud User Guide. +func (c *EC2) CreateVpnConnection(input *CreateVpnConnectionInput) (*CreateVpnConnectionOutput, error) { + req, out := c.CreateVpnConnectionRequest(input) + err := req.Send() + return out, err +} + +const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute" + +// CreateVpnConnectionRouteRequest generates a request for the CreateVpnConnectionRoute operation. +func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInput) (req *request.Request, output *CreateVpnConnectionRouteOutput) { + op := &request.Operation{ + Name: opCreateVpnConnectionRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVpnConnectionRouteInput{} + } + + req = c.newRequest(op, input, output) + output = &CreateVpnConnectionRouteOutput{} + req.Data = output + return +} + +// Creates a static route associated with a VPN connection between an existing +// virtual private gateway and a VPN customer gateway. The static route allows +// traffic to be routed from the virtual private gateway to the VPN customer +// gateway. +// +// For more information about VPN connections, see Adding a Hardware Virtual +// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// in the Amazon Virtual Private Cloud User Guide. +func (c *EC2) CreateVpnConnectionRoute(input *CreateVpnConnectionRouteInput) (*CreateVpnConnectionRouteOutput, error) { + req, out := c.CreateVpnConnectionRouteRequest(input) + err := req.Send() + return out, err +} + +const opCreateVpnGateway = "CreateVpnGateway" + +// CreateVpnGatewayRequest generates a request for the CreateVpnGateway operation. +func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *request.Request, output *CreateVpnGatewayOutput) { + op := &request.Operation{ + Name: opCreateVpnGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateVpnGatewayInput{} + } + + req = c.newRequest(op, input, output) + output = &CreateVpnGatewayOutput{} + req.Data = output + return +} + +// Creates a virtual private gateway. A virtual private gateway is the endpoint +// on the VPC side of your VPN connection. You can create a virtual private +// gateway before creating the VPC itself. +// +// For more information about virtual private gateways, see Adding a Hardware +// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// in the Amazon Virtual Private Cloud User Guide. +func (c *EC2) CreateVpnGateway(input *CreateVpnGatewayInput) (*CreateVpnGatewayOutput, error) { + req, out := c.CreateVpnGatewayRequest(input) + err := req.Send() + return out, err +} + +const opDeleteCustomerGateway = "DeleteCustomerGateway" // DeleteCustomerGatewayRequest generates a request for the DeleteCustomerGateway operation. -func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (req *aws.Request, output *DeleteCustomerGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteCustomerGateway == nil { - opDeleteCustomerGateway = &aws.Operation{ - Name: "DeleteCustomerGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (req *request.Request, output *DeleteCustomerGatewayOutput) { + op := &request.Operation{ + Name: opDeleteCustomerGateway, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteCustomerGatewayInput{} } - req = c.newRequest(opDeleteCustomerGateway, input, output) + req = c.newRequest(op, input, output) output = &DeleteCustomerGatewayOutput{} req.Data = output return @@ -2099,27 +1885,22 @@ func (c *EC2) DeleteCustomerGateway(input *DeleteCustomerGatewayInput) (*DeleteC return out, err } -var opDeleteCustomerGateway *aws.Operation +const opDeleteDhcpOptions = "DeleteDhcpOptions" -// DeleteDHCPOptionsRequest generates a request for the DeleteDHCPOptions operation. -func (c *EC2) DeleteDHCPOptionsRequest(input *DeleteDHCPOptionsInput) (req *aws.Request, output *DeleteDHCPOptionsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteDHCPOptions == nil { - opDeleteDHCPOptions = &aws.Operation{ - Name: "DeleteDhcpOptions", - HTTPMethod: "POST", - HTTPPath: "/", - } +// DeleteDhcpOptionsRequest generates a request for the DeleteDhcpOptions operation. +func (c *EC2) DeleteDhcpOptionsRequest(input *DeleteDhcpOptionsInput) (req *request.Request, output *DeleteDhcpOptionsOutput) { + op := &request.Operation{ + Name: opDeleteDhcpOptions, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &DeleteDHCPOptionsInput{} + input = &DeleteDhcpOptionsInput{} } - req = c.newRequest(opDeleteDHCPOptions, input, output) - output = &DeleteDHCPOptionsOutput{} + req = c.newRequest(op, input, output) + output = &DeleteDhcpOptionsOutput{} req.Data = output return } @@ -2128,32 +1909,54 @@ func (c *EC2) DeleteDHCPOptionsRequest(input *DeleteDHCPOptionsInput) (req *aws. // of DHCP options before you can delete it. You can disassociate the set of // DHCP options by associating either a new set of options or the default set // of options with the VPC. -func (c *EC2) DeleteDHCPOptions(input *DeleteDHCPOptionsInput) (*DeleteDHCPOptionsOutput, error) { - req, out := c.DeleteDHCPOptionsRequest(input) +func (c *EC2) DeleteDhcpOptions(input *DeleteDhcpOptionsInput) (*DeleteDhcpOptionsOutput, error) { + req, out := c.DeleteDhcpOptionsRequest(input) err := req.Send() return out, err } -var opDeleteDHCPOptions *aws.Operation +const opDeleteFlowLogs = "DeleteFlowLogs" + +// DeleteFlowLogsRequest generates a request for the DeleteFlowLogs operation. +func (c *EC2) DeleteFlowLogsRequest(input *DeleteFlowLogsInput) (req *request.Request, output *DeleteFlowLogsOutput) { + op := &request.Operation{ + Name: opDeleteFlowLogs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFlowLogsInput{} + } + + req = c.newRequest(op, input, output) + output = &DeleteFlowLogsOutput{} + req.Data = output + return +} + +// Deletes one or more flow logs. +func (c *EC2) DeleteFlowLogs(input *DeleteFlowLogsInput) (*DeleteFlowLogsOutput, error) { + req, out := c.DeleteFlowLogsRequest(input) + err := req.Send() + return out, err +} + +const opDeleteInternetGateway = "DeleteInternetGateway" // DeleteInternetGatewayRequest generates a request for the DeleteInternetGateway operation. -func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (req *aws.Request, output *DeleteInternetGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteInternetGateway == nil { - opDeleteInternetGateway = &aws.Operation{ - Name: "DeleteInternetGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (req *request.Request, output *DeleteInternetGatewayOutput) { + op := &request.Operation{ + Name: opDeleteInternetGateway, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteInternetGatewayInput{} } - req = c.newRequest(opDeleteInternetGateway, input, output) + req = c.newRequest(op, input, output) output = &DeleteInternetGatewayOutput{} req.Data = output return @@ -2167,26 +1970,21 @@ func (c *EC2) DeleteInternetGateway(input *DeleteInternetGatewayInput) (*DeleteI return out, err } -var opDeleteInternetGateway *aws.Operation +const opDeleteKeyPair = "DeleteKeyPair" // DeleteKeyPairRequest generates a request for the DeleteKeyPair operation. -func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *aws.Request, output *DeleteKeyPairOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteKeyPair == nil { - opDeleteKeyPair = &aws.Operation{ - Name: "DeleteKeyPair", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Request, output *DeleteKeyPairOutput) { + op := &request.Operation{ + Name: opDeleteKeyPair, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteKeyPairInput{} } - req = c.newRequest(opDeleteKeyPair, input, output) + req = c.newRequest(op, input, output) output = &DeleteKeyPairOutput{} req.Data = output return @@ -2199,92 +1997,77 @@ func (c *EC2) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, er return out, err } -var opDeleteKeyPair *aws.Operation +const opDeleteNetworkAcl = "DeleteNetworkAcl" -// DeleteNetworkACLRequest generates a request for the DeleteNetworkACL operation. -func (c *EC2) DeleteNetworkACLRequest(input *DeleteNetworkACLInput) (req *aws.Request, output *DeleteNetworkACLOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteNetworkACL == nil { - opDeleteNetworkACL = &aws.Operation{ - Name: "DeleteNetworkAcl", - HTTPMethod: "POST", - HTTPPath: "/", - } +// DeleteNetworkAclRequest generates a request for the DeleteNetworkAcl operation. +func (c *EC2) DeleteNetworkAclRequest(input *DeleteNetworkAclInput) (req *request.Request, output *DeleteNetworkAclOutput) { + op := &request.Operation{ + Name: opDeleteNetworkAcl, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &DeleteNetworkACLInput{} + input = &DeleteNetworkAclInput{} } - req = c.newRequest(opDeleteNetworkACL, input, output) - output = &DeleteNetworkACLOutput{} + req = c.newRequest(op, input, output) + output = &DeleteNetworkAclOutput{} req.Data = output return } // Deletes the specified network ACL. You can't delete the ACL if it's associated // with any subnets. You can't delete the default network ACL. -func (c *EC2) DeleteNetworkACL(input *DeleteNetworkACLInput) (*DeleteNetworkACLOutput, error) { - req, out := c.DeleteNetworkACLRequest(input) +func (c *EC2) DeleteNetworkAcl(input *DeleteNetworkAclInput) (*DeleteNetworkAclOutput, error) { + req, out := c.DeleteNetworkAclRequest(input) err := req.Send() return out, err } -var opDeleteNetworkACL *aws.Operation +const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry" -// DeleteNetworkACLEntryRequest generates a request for the DeleteNetworkACLEntry operation. -func (c *EC2) DeleteNetworkACLEntryRequest(input *DeleteNetworkACLEntryInput) (req *aws.Request, output *DeleteNetworkACLEntryOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteNetworkACLEntry == nil { - opDeleteNetworkACLEntry = &aws.Operation{ - Name: "DeleteNetworkAclEntry", - HTTPMethod: "POST", - HTTPPath: "/", - } +// DeleteNetworkAclEntryRequest generates a request for the DeleteNetworkAclEntry operation. +func (c *EC2) DeleteNetworkAclEntryRequest(input *DeleteNetworkAclEntryInput) (req *request.Request, output *DeleteNetworkAclEntryOutput) { + op := &request.Operation{ + Name: opDeleteNetworkAclEntry, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &DeleteNetworkACLEntryInput{} + input = &DeleteNetworkAclEntryInput{} } - req = c.newRequest(opDeleteNetworkACLEntry, input, output) - output = &DeleteNetworkACLEntryOutput{} + req = c.newRequest(op, input, output) + output = &DeleteNetworkAclEntryOutput{} req.Data = output return } // Deletes the specified ingress or egress entry (rule) from the specified network // ACL. -func (c *EC2) DeleteNetworkACLEntry(input *DeleteNetworkACLEntryInput) (*DeleteNetworkACLEntryOutput, error) { - req, out := c.DeleteNetworkACLEntryRequest(input) +func (c *EC2) DeleteNetworkAclEntry(input *DeleteNetworkAclEntryInput) (*DeleteNetworkAclEntryOutput, error) { + req, out := c.DeleteNetworkAclEntryRequest(input) err := req.Send() return out, err } -var opDeleteNetworkACLEntry *aws.Operation +const opDeleteNetworkInterface = "DeleteNetworkInterface" // DeleteNetworkInterfaceRequest generates a request for the DeleteNetworkInterface operation. -func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput) (req *aws.Request, output *DeleteNetworkInterfaceOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteNetworkInterface == nil { - opDeleteNetworkInterface = &aws.Operation{ - Name: "DeleteNetworkInterface", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput) (req *request.Request, output *DeleteNetworkInterfaceOutput) { + op := &request.Operation{ + Name: opDeleteNetworkInterface, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteNetworkInterfaceInput{} } - req = c.newRequest(opDeleteNetworkInterface, input, output) + req = c.newRequest(op, input, output) output = &DeleteNetworkInterfaceOutput{} req.Data = output return @@ -2298,26 +2081,21 @@ func (c *EC2) DeleteNetworkInterface(input *DeleteNetworkInterfaceInput) (*Delet return out, err } -var opDeleteNetworkInterface *aws.Operation +const opDeletePlacementGroup = "DeletePlacementGroup" // DeletePlacementGroupRequest generates a request for the DeletePlacementGroup operation. -func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req *aws.Request, output *DeletePlacementGroupOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeletePlacementGroup == nil { - opDeletePlacementGroup = &aws.Operation{ - Name: "DeletePlacementGroup", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req *request.Request, output *DeletePlacementGroupOutput) { + op := &request.Operation{ + Name: opDeletePlacementGroup, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeletePlacementGroupInput{} } - req = c.newRequest(opDeletePlacementGroup, input, output) + req = c.newRequest(op, input, output) output = &DeletePlacementGroupOutput{} req.Data = output return @@ -2333,26 +2111,21 @@ func (c *EC2) DeletePlacementGroup(input *DeletePlacementGroupInput) (*DeletePla return out, err } -var opDeletePlacementGroup *aws.Operation +const opDeleteRoute = "DeleteRoute" // DeleteRouteRequest generates a request for the DeleteRoute operation. -func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *aws.Request, output *DeleteRouteOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteRoute == nil { - opDeleteRoute = &aws.Operation{ - Name: "DeleteRoute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) { + op := &request.Operation{ + Name: opDeleteRoute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteRouteInput{} } - req = c.newRequest(opDeleteRoute, input, output) + req = c.newRequest(op, input, output) output = &DeleteRouteOutput{} req.Data = output return @@ -2365,26 +2138,21 @@ func (c *EC2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) { return out, err } -var opDeleteRoute *aws.Operation +const opDeleteRouteTable = "DeleteRouteTable" // DeleteRouteTableRequest generates a request for the DeleteRouteTable operation. -func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *aws.Request, output *DeleteRouteTableOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteRouteTable == nil { - opDeleteRouteTable = &aws.Operation{ - Name: "DeleteRouteTable", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *request.Request, output *DeleteRouteTableOutput) { + op := &request.Operation{ + Name: opDeleteRouteTable, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteRouteTableInput{} } - req = c.newRequest(opDeleteRouteTable, input, output) + req = c.newRequest(op, input, output) output = &DeleteRouteTableOutput{} req.Data = output return @@ -2399,26 +2167,21 @@ func (c *EC2) DeleteRouteTable(input *DeleteRouteTableInput) (*DeleteRouteTableO return out, err } -var opDeleteRouteTable *aws.Operation +const opDeleteSecurityGroup = "DeleteSecurityGroup" // DeleteSecurityGroupRequest generates a request for the DeleteSecurityGroup operation. -func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *aws.Request, output *DeleteSecurityGroupOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteSecurityGroup == nil { - opDeleteSecurityGroup = &aws.Operation{ - Name: "DeleteSecurityGroup", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *request.Request, output *DeleteSecurityGroupOutput) { + op := &request.Operation{ + Name: opDeleteSecurityGroup, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteSecurityGroupInput{} } - req = c.newRequest(opDeleteSecurityGroup, input, output) + req = c.newRequest(op, input, output) output = &DeleteSecurityGroupOutput{} req.Data = output return @@ -2435,26 +2198,21 @@ func (c *EC2) DeleteSecurityGroup(input *DeleteSecurityGroupInput) (*DeleteSecur return out, err } -var opDeleteSecurityGroup *aws.Operation +const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a request for the DeleteSnapshot operation. -func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *aws.Request, output *DeleteSnapshotOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteSnapshot == nil { - opDeleteSnapshot = &aws.Operation{ - Name: "DeleteSnapshot", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Request, output *DeleteSnapshotOutput) { + op := &request.Operation{ + Name: opDeleteSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteSnapshotInput{} } - req = c.newRequest(opDeleteSnapshot, input, output) + req = c.newRequest(op, input, output) output = &DeleteSnapshotOutput{} req.Data = output return @@ -2481,60 +2239,48 @@ func (c *EC2) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, return out, err } -var opDeleteSnapshot *aws.Operation +const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription" // DeleteSpotDatafeedSubscriptionRequest generates a request for the DeleteSpotDatafeedSubscription operation. -func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSubscriptionInput) (req *aws.Request, output *DeleteSpotDatafeedSubscriptionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteSpotDatafeedSubscription == nil { - opDeleteSpotDatafeedSubscription = &aws.Operation{ - Name: "DeleteSpotDatafeedSubscription", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSubscriptionInput) (req *request.Request, output *DeleteSpotDatafeedSubscriptionOutput) { + op := &request.Operation{ + Name: opDeleteSpotDatafeedSubscription, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteSpotDatafeedSubscriptionInput{} } - req = c.newRequest(opDeleteSpotDatafeedSubscription, input, output) + req = c.newRequest(op, input, output) output = &DeleteSpotDatafeedSubscriptionOutput{} req.Data = output return } -// Deletes the data feed for Spot Instances. For more information, see Spot -// Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon Elastic Compute Cloud User Guide. +// Deletes the data feed for Spot instances. func (c *EC2) DeleteSpotDatafeedSubscription(input *DeleteSpotDatafeedSubscriptionInput) (*DeleteSpotDatafeedSubscriptionOutput, error) { req, out := c.DeleteSpotDatafeedSubscriptionRequest(input) err := req.Send() return out, err } -var opDeleteSpotDatafeedSubscription *aws.Operation +const opDeleteSubnet = "DeleteSubnet" // DeleteSubnetRequest generates a request for the DeleteSubnet operation. -func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *aws.Request, output *DeleteSubnetOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteSubnet == nil { - opDeleteSubnet = &aws.Operation{ - Name: "DeleteSubnet", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *request.Request, output *DeleteSubnetOutput) { + op := &request.Operation{ + Name: opDeleteSubnet, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteSubnetInput{} } - req = c.newRequest(opDeleteSubnet, input, output) + req = c.newRequest(op, input, output) output = &DeleteSubnetOutput{} req.Data = output return @@ -2548,26 +2294,21 @@ func (c *EC2) DeleteSubnet(input *DeleteSubnetInput) (*DeleteSubnetOutput, error return out, err } -var opDeleteSubnet *aws.Operation +const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a request for the DeleteTags operation. -func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *aws.Request, output *DeleteTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteTags == nil { - opDeleteTags = &aws.Operation{ - Name: "DeleteTags", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { + op := &request.Operation{ + Name: opDeleteTags, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteTagsInput{} } - req = c.newRequest(opDeleteTags, input, output) + req = c.newRequest(op, input, output) output = &DeleteTagsOutput{} req.Data = output return @@ -2584,242 +2325,21 @@ func (c *EC2) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { return out, err } -var opDeleteTags *aws.Operation - -// DeleteVPCRequest generates a request for the DeleteVPC operation. -func (c *EC2) DeleteVPCRequest(input *DeleteVPCInput) (req *aws.Request, output *DeleteVPCOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteVPC == nil { - opDeleteVPC = &aws.Operation{ - Name: "DeleteVpc", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DeleteVPCInput{} - } - - req = c.newRequest(opDeleteVPC, input, output) - output = &DeleteVPCOutput{} - req.Data = output - return -} - -// Deletes the specified VPC. You must detach or delete all gateways and resources -// that are associated with the VPC before you can delete it. For example, you -// must terminate all instances running in the VPC, delete all security groups -// associated with the VPC (except the default one), delete all route tables -// associated with the VPC (except the default one), and so on. -func (c *EC2) DeleteVPC(input *DeleteVPCInput) (*DeleteVPCOutput, error) { - req, out := c.DeleteVPCRequest(input) - err := req.Send() - return out, err -} - -var opDeleteVPC *aws.Operation - -// DeleteVPCEndpointsRequest generates a request for the DeleteVPCEndpoints operation. -func (c *EC2) DeleteVPCEndpointsRequest(input *DeleteVPCEndpointsInput) (req *aws.Request, output *DeleteVPCEndpointsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteVPCEndpoints == nil { - opDeleteVPCEndpoints = &aws.Operation{ - Name: "DeleteVpcEndpoints", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DeleteVPCEndpointsInput{} - } - - req = c.newRequest(opDeleteVPCEndpoints, input, output) - output = &DeleteVPCEndpointsOutput{} - req.Data = output - return -} - -// Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes -// the endpoint routes in the route tables that were associated with the endpoint. -func (c *EC2) DeleteVPCEndpoints(input *DeleteVPCEndpointsInput) (*DeleteVPCEndpointsOutput, error) { - req, out := c.DeleteVPCEndpointsRequest(input) - err := req.Send() - return out, err -} - -var opDeleteVPCEndpoints *aws.Operation - -// DeleteVPCPeeringConnectionRequest generates a request for the DeleteVPCPeeringConnection operation. -func (c *EC2) DeleteVPCPeeringConnectionRequest(input *DeleteVPCPeeringConnectionInput) (req *aws.Request, output *DeleteVPCPeeringConnectionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteVPCPeeringConnection == nil { - opDeleteVPCPeeringConnection = &aws.Operation{ - Name: "DeleteVpcPeeringConnection", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DeleteVPCPeeringConnectionInput{} - } - - req = c.newRequest(opDeleteVPCPeeringConnection, input, output) - output = &DeleteVPCPeeringConnectionOutput{} - req.Data = output - return -} - -// Deletes a VPC peering connection. Either the owner of the requester VPC or -// the owner of the peer VPC can delete the VPC peering connection if it's in -// the active state. The owner of the requester VPC can delete a VPC peering -// connection in the pending-acceptance state. -func (c *EC2) DeleteVPCPeeringConnection(input *DeleteVPCPeeringConnectionInput) (*DeleteVPCPeeringConnectionOutput, error) { - req, out := c.DeleteVPCPeeringConnectionRequest(input) - err := req.Send() - return out, err -} - -var opDeleteVPCPeeringConnection *aws.Operation - -// DeleteVPNConnectionRequest generates a request for the DeleteVPNConnection operation. -func (c *EC2) DeleteVPNConnectionRequest(input *DeleteVPNConnectionInput) (req *aws.Request, output *DeleteVPNConnectionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteVPNConnection == nil { - opDeleteVPNConnection = &aws.Operation{ - Name: "DeleteVpnConnection", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DeleteVPNConnectionInput{} - } - - req = c.newRequest(opDeleteVPNConnection, input, output) - output = &DeleteVPNConnectionOutput{} - req.Data = output - return -} - -// Deletes the specified VPN connection. -// -// If you're deleting the VPC and its associated components, we recommend that -// you detach the virtual private gateway from the VPC and delete the VPC before -// deleting the VPN connection. If you believe that the tunnel credentials for -// your VPN connection have been compromised, you can delete the VPN connection -// and create a new one that has new keys, without needing to delete the VPC -// or virtual private gateway. If you create a new VPN connection, you must -// reconfigure the customer gateway using the new configuration information -// returned with the new VPN connection ID. -func (c *EC2) DeleteVPNConnection(input *DeleteVPNConnectionInput) (*DeleteVPNConnectionOutput, error) { - req, out := c.DeleteVPNConnectionRequest(input) - err := req.Send() - return out, err -} - -var opDeleteVPNConnection *aws.Operation - -// DeleteVPNConnectionRouteRequest generates a request for the DeleteVPNConnectionRoute operation. -func (c *EC2) DeleteVPNConnectionRouteRequest(input *DeleteVPNConnectionRouteInput) (req *aws.Request, output *DeleteVPNConnectionRouteOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteVPNConnectionRoute == nil { - opDeleteVPNConnectionRoute = &aws.Operation{ - Name: "DeleteVpnConnectionRoute", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DeleteVPNConnectionRouteInput{} - } - - req = c.newRequest(opDeleteVPNConnectionRoute, input, output) - output = &DeleteVPNConnectionRouteOutput{} - req.Data = output - return -} - -// Deletes the specified static route associated with a VPN connection between -// an existing virtual private gateway and a VPN customer gateway. The static -// route allows traffic to be routed from the virtual private gateway to the -// VPN customer gateway. -func (c *EC2) DeleteVPNConnectionRoute(input *DeleteVPNConnectionRouteInput) (*DeleteVPNConnectionRouteOutput, error) { - req, out := c.DeleteVPNConnectionRouteRequest(input) - err := req.Send() - return out, err -} - -var opDeleteVPNConnectionRoute *aws.Operation - -// DeleteVPNGatewayRequest generates a request for the DeleteVPNGateway operation. -func (c *EC2) DeleteVPNGatewayRequest(input *DeleteVPNGatewayInput) (req *aws.Request, output *DeleteVPNGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteVPNGateway == nil { - opDeleteVPNGateway = &aws.Operation{ - Name: "DeleteVpnGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DeleteVPNGatewayInput{} - } - - req = c.newRequest(opDeleteVPNGateway, input, output) - output = &DeleteVPNGatewayOutput{} - req.Data = output - return -} - -// Deletes the specified virtual private gateway. We recommend that before you -// delete a virtual private gateway, you detach it from the VPC and delete the -// VPN connection. Note that you don't need to delete the virtual private gateway -// if you plan to delete and recreate the VPN connection between your VPC and -// your network. -func (c *EC2) DeleteVPNGateway(input *DeleteVPNGatewayInput) (*DeleteVPNGatewayOutput, error) { - req, out := c.DeleteVPNGatewayRequest(input) - err := req.Send() - return out, err -} - -var opDeleteVPNGateway *aws.Operation +const opDeleteVolume = "DeleteVolume" // DeleteVolumeRequest generates a request for the DeleteVolume operation. -func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *aws.Request, output *DeleteVolumeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteVolume == nil { - opDeleteVolume = &aws.Operation{ - Name: "DeleteVolume", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Request, output *DeleteVolumeOutput) { + op := &request.Operation{ + Name: opDeleteVolume, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteVolumeInput{} } - req = c.newRequest(opDeleteVolume, input, output) + req = c.newRequest(op, input, output) output = &DeleteVolumeOutput{} req.Data = output return @@ -2838,26 +2358,207 @@ func (c *EC2) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error return out, err } -var opDeleteVolume *aws.Operation +const opDeleteVpc = "DeleteVpc" + +// DeleteVpcRequest generates a request for the DeleteVpc operation. +func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, output *DeleteVpcOutput) { + op := &request.Operation{ + Name: opDeleteVpc, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVpcInput{} + } + + req = c.newRequest(op, input, output) + output = &DeleteVpcOutput{} + req.Data = output + return +} + +// Deletes the specified VPC. You must detach or delete all gateways and resources +// that are associated with the VPC before you can delete it. For example, you +// must terminate all instances running in the VPC, delete all security groups +// associated with the VPC (except the default one), delete all route tables +// associated with the VPC (except the default one), and so on. +func (c *EC2) DeleteVpc(input *DeleteVpcInput) (*DeleteVpcOutput, error) { + req, out := c.DeleteVpcRequest(input) + err := req.Send() + return out, err +} + +const opDeleteVpcEndpoints = "DeleteVpcEndpoints" + +// DeleteVpcEndpointsRequest generates a request for the DeleteVpcEndpoints operation. +func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *request.Request, output *DeleteVpcEndpointsOutput) { + op := &request.Operation{ + Name: opDeleteVpcEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVpcEndpointsInput{} + } + + req = c.newRequest(op, input, output) + output = &DeleteVpcEndpointsOutput{} + req.Data = output + return +} + +// Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes +// the endpoint routes in the route tables that were associated with the endpoint. +func (c *EC2) DeleteVpcEndpoints(input *DeleteVpcEndpointsInput) (*DeleteVpcEndpointsOutput, error) { + req, out := c.DeleteVpcEndpointsRequest(input) + err := req.Send() + return out, err +} + +const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" + +// DeleteVpcPeeringConnectionRequest generates a request for the DeleteVpcPeeringConnection operation. +func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectionInput) (req *request.Request, output *DeleteVpcPeeringConnectionOutput) { + op := &request.Operation{ + Name: opDeleteVpcPeeringConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVpcPeeringConnectionInput{} + } + + req = c.newRequest(op, input, output) + output = &DeleteVpcPeeringConnectionOutput{} + req.Data = output + return +} + +// Deletes a VPC peering connection. Either the owner of the requester VPC or +// the owner of the peer VPC can delete the VPC peering connection if it's in +// the active state. The owner of the requester VPC can delete a VPC peering +// connection in the pending-acceptance state. +func (c *EC2) DeleteVpcPeeringConnection(input *DeleteVpcPeeringConnectionInput) (*DeleteVpcPeeringConnectionOutput, error) { + req, out := c.DeleteVpcPeeringConnectionRequest(input) + err := req.Send() + return out, err +} + +const opDeleteVpnConnection = "DeleteVpnConnection" + +// DeleteVpnConnectionRequest generates a request for the DeleteVpnConnection operation. +func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req *request.Request, output *DeleteVpnConnectionOutput) { + op := &request.Operation{ + Name: opDeleteVpnConnection, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVpnConnectionInput{} + } + + req = c.newRequest(op, input, output) + output = &DeleteVpnConnectionOutput{} + req.Data = output + return +} + +// Deletes the specified VPN connection. +// +// If you're deleting the VPC and its associated components, we recommend that +// you detach the virtual private gateway from the VPC and delete the VPC before +// deleting the VPN connection. If you believe that the tunnel credentials for +// your VPN connection have been compromised, you can delete the VPN connection +// and create a new one that has new keys, without needing to delete the VPC +// or virtual private gateway. If you create a new VPN connection, you must +// reconfigure the customer gateway using the new configuration information +// returned with the new VPN connection ID. +func (c *EC2) DeleteVpnConnection(input *DeleteVpnConnectionInput) (*DeleteVpnConnectionOutput, error) { + req, out := c.DeleteVpnConnectionRequest(input) + err := req.Send() + return out, err +} + +const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute" + +// DeleteVpnConnectionRouteRequest generates a request for the DeleteVpnConnectionRoute operation. +func (c *EC2) DeleteVpnConnectionRouteRequest(input *DeleteVpnConnectionRouteInput) (req *request.Request, output *DeleteVpnConnectionRouteOutput) { + op := &request.Operation{ + Name: opDeleteVpnConnectionRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVpnConnectionRouteInput{} + } + + req = c.newRequest(op, input, output) + output = &DeleteVpnConnectionRouteOutput{} + req.Data = output + return +} + +// Deletes the specified static route associated with a VPN connection between +// an existing virtual private gateway and a VPN customer gateway. The static +// route allows traffic to be routed from the virtual private gateway to the +// VPN customer gateway. +func (c *EC2) DeleteVpnConnectionRoute(input *DeleteVpnConnectionRouteInput) (*DeleteVpnConnectionRouteOutput, error) { + req, out := c.DeleteVpnConnectionRouteRequest(input) + err := req.Send() + return out, err +} + +const opDeleteVpnGateway = "DeleteVpnGateway" + +// DeleteVpnGatewayRequest generates a request for the DeleteVpnGateway operation. +func (c *EC2) DeleteVpnGatewayRequest(input *DeleteVpnGatewayInput) (req *request.Request, output *DeleteVpnGatewayOutput) { + op := &request.Operation{ + Name: opDeleteVpnGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteVpnGatewayInput{} + } + + req = c.newRequest(op, input, output) + output = &DeleteVpnGatewayOutput{} + req.Data = output + return +} + +// Deletes the specified virtual private gateway. We recommend that before you +// delete a virtual private gateway, you detach it from the VPC and delete the +// VPN connection. Note that you don't need to delete the virtual private gateway +// if you plan to delete and recreate the VPN connection between your VPC and +// your network. +func (c *EC2) DeleteVpnGateway(input *DeleteVpnGatewayInput) (*DeleteVpnGatewayOutput, error) { + req, out := c.DeleteVpnGatewayRequest(input) + err := req.Send() + return out, err +} + +const opDeregisterImage = "DeregisterImage" // DeregisterImageRequest generates a request for the DeregisterImage operation. -func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *aws.Request, output *DeregisterImageOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeregisterImage == nil { - opDeregisterImage = &aws.Operation{ - Name: "DeregisterImage", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request.Request, output *DeregisterImageOutput) { + op := &request.Operation{ + Name: opDeregisterImage, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeregisterImageInput{} } - req = c.newRequest(opDeregisterImage, input, output) + req = c.newRequest(op, input, output) output = &DeregisterImageOutput{} req.Data = output return @@ -2873,26 +2574,21 @@ func (c *EC2) DeregisterImage(input *DeregisterImageInput) (*DeregisterImageOutp return out, err } -var opDeregisterImage *aws.Operation +const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a request for the DescribeAccountAttributes operation. -func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *aws.Request, output *DescribeAccountAttributesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeAccountAttributes == nil { - opDescribeAccountAttributes = &aws.Operation{ - Name: "DescribeAccountAttributes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { + op := &request.Operation{ + Name: opDescribeAccountAttributes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeAccountAttributesInput{} } - req = c.newRequest(opDescribeAccountAttributes, input, output) + req = c.newRequest(op, input, output) output = &DescribeAccountAttributesOutput{} req.Data = output return @@ -2923,26 +2619,21 @@ func (c *EC2) DescribeAccountAttributes(input *DescribeAccountAttributesInput) ( return out, err } -var opDescribeAccountAttributes *aws.Operation +const opDescribeAddresses = "DescribeAddresses" // DescribeAddressesRequest generates a request for the DescribeAddresses operation. -func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *aws.Request, output *DescribeAddressesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeAddresses == nil { - opDescribeAddresses = &aws.Operation{ - Name: "DescribeAddresses", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *request.Request, output *DescribeAddressesOutput) { + op := &request.Operation{ + Name: opDescribeAddresses, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeAddressesInput{} } - req = c.newRequest(opDescribeAddresses, input, output) + req = c.newRequest(op, input, output) output = &DescribeAddressesOutput{} req.Data = output return @@ -2959,26 +2650,21 @@ func (c *EC2) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddress return out, err } -var opDescribeAddresses *aws.Operation +const opDescribeAvailabilityZones = "DescribeAvailabilityZones" // DescribeAvailabilityZonesRequest generates a request for the DescribeAvailabilityZones operation. -func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesInput) (req *aws.Request, output *DescribeAvailabilityZonesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeAvailabilityZones == nil { - opDescribeAvailabilityZones = &aws.Operation{ - Name: "DescribeAvailabilityZones", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesInput) (req *request.Request, output *DescribeAvailabilityZonesOutput) { + op := &request.Operation{ + Name: opDescribeAvailabilityZones, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeAvailabilityZonesInput{} } - req = c.newRequest(opDescribeAvailabilityZones, input, output) + req = c.newRequest(op, input, output) output = &DescribeAvailabilityZonesOutput{} req.Data = output return @@ -2997,26 +2683,21 @@ func (c *EC2) DescribeAvailabilityZones(input *DescribeAvailabilityZonesInput) ( return out, err } -var opDescribeAvailabilityZones *aws.Operation +const opDescribeBundleTasks = "DescribeBundleTasks" // DescribeBundleTasksRequest generates a request for the DescribeBundleTasks operation. -func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *aws.Request, output *DescribeBundleTasksOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeBundleTasks == nil { - opDescribeBundleTasks = &aws.Operation{ - Name: "DescribeBundleTasks", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *request.Request, output *DescribeBundleTasksOutput) { + op := &request.Operation{ + Name: opDescribeBundleTasks, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeBundleTasksInput{} } - req = c.newRequest(opDescribeBundleTasks, input, output) + req = c.newRequest(op, input, output) output = &DescribeBundleTasksOutput{} req.Data = output return @@ -3034,26 +2715,21 @@ func (c *EC2) DescribeBundleTasks(input *DescribeBundleTasksInput) (*DescribeBun return out, err } -var opDescribeBundleTasks *aws.Operation +const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances" // DescribeClassicLinkInstancesRequest generates a request for the DescribeClassicLinkInstances operation. -func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInstancesInput) (req *aws.Request, output *DescribeClassicLinkInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeClassicLinkInstances == nil { - opDescribeClassicLinkInstances = &aws.Operation{ - Name: "DescribeClassicLinkInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInstancesInput) (req *request.Request, output *DescribeClassicLinkInstancesOutput) { + op := &request.Operation{ + Name: opDescribeClassicLinkInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeClassicLinkInstancesInput{} } - req = c.newRequest(opDescribeClassicLinkInstances, input, output) + req = c.newRequest(op, input, output) output = &DescribeClassicLinkInstancesOutput{} req.Data = output return @@ -3069,26 +2745,21 @@ func (c *EC2) DescribeClassicLinkInstances(input *DescribeClassicLinkInstancesIn return out, err } -var opDescribeClassicLinkInstances *aws.Operation +const opDescribeConversionTasks = "DescribeConversionTasks" // DescribeConversionTasksRequest generates a request for the DescribeConversionTasks operation. -func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput) (req *aws.Request, output *DescribeConversionTasksOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeConversionTasks == nil { - opDescribeConversionTasks = &aws.Operation{ - Name: "DescribeConversionTasks", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput) (req *request.Request, output *DescribeConversionTasksOutput) { + op := &request.Operation{ + Name: opDescribeConversionTasks, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeConversionTasksInput{} } - req = c.newRequest(opDescribeConversionTasks, input, output) + req = c.newRequest(op, input, output) output = &DescribeConversionTasksOutput{} req.Data = output return @@ -3104,26 +2775,21 @@ func (c *EC2) DescribeConversionTasks(input *DescribeConversionTasksInput) (*Des return out, err } -var opDescribeConversionTasks *aws.Operation +const opDescribeCustomerGateways = "DescribeCustomerGateways" // DescribeCustomerGatewaysRequest generates a request for the DescribeCustomerGateways operation. -func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInput) (req *aws.Request, output *DescribeCustomerGatewaysOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeCustomerGateways == nil { - opDescribeCustomerGateways = &aws.Operation{ - Name: "DescribeCustomerGateways", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInput) (req *request.Request, output *DescribeCustomerGatewaysOutput) { + op := &request.Operation{ + Name: opDescribeCustomerGateways, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeCustomerGatewaysInput{} } - req = c.newRequest(opDescribeCustomerGateways, input, output) + req = c.newRequest(op, input, output) output = &DescribeCustomerGatewaysOutput{} req.Data = output return @@ -3140,27 +2806,22 @@ func (c *EC2) DescribeCustomerGateways(input *DescribeCustomerGatewaysInput) (*D return out, err } -var opDescribeCustomerGateways *aws.Operation +const opDescribeDhcpOptions = "DescribeDhcpOptions" -// DescribeDHCPOptionsRequest generates a request for the DescribeDHCPOptions operation. -func (c *EC2) DescribeDHCPOptionsRequest(input *DescribeDHCPOptionsInput) (req *aws.Request, output *DescribeDHCPOptionsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeDHCPOptions == nil { - opDescribeDHCPOptions = &aws.Operation{ - Name: "DescribeDhcpOptions", - HTTPMethod: "POST", - HTTPPath: "/", - } +// DescribeDhcpOptionsRequest generates a request for the DescribeDhcpOptions operation. +func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req *request.Request, output *DescribeDhcpOptionsOutput) { + op := &request.Operation{ + Name: opDescribeDhcpOptions, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &DescribeDHCPOptionsInput{} + input = &DescribeDhcpOptionsInput{} } - req = c.newRequest(opDescribeDHCPOptions, input, output) - output = &DescribeDHCPOptionsOutput{} + req = c.newRequest(op, input, output) + output = &DescribeDhcpOptionsOutput{} req.Data = output return } @@ -3169,32 +2830,27 @@ func (c *EC2) DescribeDHCPOptionsRequest(input *DescribeDHCPOptionsInput) (req * // // For more information about DHCP options sets, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html) // in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) DescribeDHCPOptions(input *DescribeDHCPOptionsInput) (*DescribeDHCPOptionsOutput, error) { - req, out := c.DescribeDHCPOptionsRequest(input) +func (c *EC2) DescribeDhcpOptions(input *DescribeDhcpOptionsInput) (*DescribeDhcpOptionsOutput, error) { + req, out := c.DescribeDhcpOptionsRequest(input) err := req.Send() return out, err } -var opDescribeDHCPOptions *aws.Operation +const opDescribeExportTasks = "DescribeExportTasks" // DescribeExportTasksRequest generates a request for the DescribeExportTasks operation. -func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *aws.Request, output *DescribeExportTasksOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeExportTasks == nil { - opDescribeExportTasks = &aws.Operation{ - Name: "DescribeExportTasks", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) { + op := &request.Operation{ + Name: opDescribeExportTasks, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeExportTasksInput{} } - req = c.newRequest(opDescribeExportTasks, input, output) + req = c.newRequest(op, input, output) output = &DescribeExportTasksOutput{} req.Data = output return @@ -3207,26 +2863,50 @@ func (c *EC2) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExp return out, err } -var opDescribeExportTasks *aws.Operation +const opDescribeFlowLogs = "DescribeFlowLogs" + +// DescribeFlowLogsRequest generates a request for the DescribeFlowLogs operation. +func (c *EC2) DescribeFlowLogsRequest(input *DescribeFlowLogsInput) (req *request.Request, output *DescribeFlowLogsOutput) { + op := &request.Operation{ + Name: opDescribeFlowLogs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeFlowLogsInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeFlowLogsOutput{} + req.Data = output + return +} + +// Describes one or more flow logs. To view the information in your flow logs +// (the log streams for the network interfaces), you must use the CloudWatch +// Logs console or the CloudWatch Logs API. +func (c *EC2) DescribeFlowLogs(input *DescribeFlowLogsInput) (*DescribeFlowLogsOutput, error) { + req, out := c.DescribeFlowLogsRequest(input) + err := req.Send() + return out, err +} + +const opDescribeImageAttribute = "DescribeImageAttribute" // DescribeImageAttributeRequest generates a request for the DescribeImageAttribute operation. -func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput) (req *aws.Request, output *DescribeImageAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeImageAttribute == nil { - opDescribeImageAttribute = &aws.Operation{ - Name: "DescribeImageAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput) (req *request.Request, output *DescribeImageAttributeOutput) { + op := &request.Operation{ + Name: opDescribeImageAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeImageAttributeInput{} } - req = c.newRequest(opDescribeImageAttribute, input, output) + req = c.newRequest(op, input, output) output = &DescribeImageAttributeOutput{} req.Data = output return @@ -3240,26 +2920,21 @@ func (c *EC2) DescribeImageAttribute(input *DescribeImageAttributeInput) (*Descr return out, err } -var opDescribeImageAttribute *aws.Operation +const opDescribeImages = "DescribeImages" // DescribeImagesRequest generates a request for the DescribeImages operation. -func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *aws.Request, output *DescribeImagesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeImages == nil { - opDescribeImages = &aws.Operation{ - Name: "DescribeImages", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) { + op := &request.Operation{ + Name: opDescribeImages, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeImagesInput{} } - req = c.newRequest(opDescribeImages, input, output) + req = c.newRequest(op, input, output) output = &DescribeImagesOutput{} req.Data = output return @@ -3278,26 +2953,21 @@ func (c *EC2) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, return out, err } -var opDescribeImages *aws.Operation +const opDescribeImportImageTasks = "DescribeImportImageTasks" // DescribeImportImageTasksRequest generates a request for the DescribeImportImageTasks operation. -func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInput) (req *aws.Request, output *DescribeImportImageTasksOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeImportImageTasks == nil { - opDescribeImportImageTasks = &aws.Operation{ - Name: "DescribeImportImageTasks", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInput) (req *request.Request, output *DescribeImportImageTasksOutput) { + op := &request.Operation{ + Name: opDescribeImportImageTasks, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeImportImageTasksInput{} } - req = c.newRequest(opDescribeImportImageTasks, input, output) + req = c.newRequest(op, input, output) output = &DescribeImportImageTasksOutput{} req.Data = output return @@ -3311,26 +2981,21 @@ func (c *EC2) DescribeImportImageTasks(input *DescribeImportImageTasksInput) (*D return out, err } -var opDescribeImportImageTasks *aws.Operation +const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks" // DescribeImportSnapshotTasksRequest generates a request for the DescribeImportSnapshotTasks operation. -func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTasksInput) (req *aws.Request, output *DescribeImportSnapshotTasksOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeImportSnapshotTasks == nil { - opDescribeImportSnapshotTasks = &aws.Operation{ - Name: "DescribeImportSnapshotTasks", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTasksInput) (req *request.Request, output *DescribeImportSnapshotTasksOutput) { + op := &request.Operation{ + Name: opDescribeImportSnapshotTasks, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeImportSnapshotTasksInput{} } - req = c.newRequest(opDescribeImportSnapshotTasks, input, output) + req = c.newRequest(op, input, output) output = &DescribeImportSnapshotTasksOutput{} req.Data = output return @@ -3343,26 +3008,21 @@ func (c *EC2) DescribeImportSnapshotTasks(input *DescribeImportSnapshotTasksInpu return out, err } -var opDescribeImportSnapshotTasks *aws.Operation +const opDescribeInstanceAttribute = "DescribeInstanceAttribute" // DescribeInstanceAttributeRequest generates a request for the DescribeInstanceAttribute operation. -func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeInput) (req *aws.Request, output *DescribeInstanceAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeInstanceAttribute == nil { - opDescribeInstanceAttribute = &aws.Operation{ - Name: "DescribeInstanceAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeInput) (req *request.Request, output *DescribeInstanceAttributeOutput) { + op := &request.Operation{ + Name: opDescribeInstanceAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeInstanceAttributeInput{} } - req = c.newRequest(opDescribeInstanceAttribute, input, output) + req = c.newRequest(op, input, output) output = &DescribeInstanceAttributeOutput{} req.Data = output return @@ -3379,32 +3039,27 @@ func (c *EC2) DescribeInstanceAttribute(input *DescribeInstanceAttributeInput) ( return out, err } -var opDescribeInstanceAttribute *aws.Operation +const opDescribeInstanceStatus = "DescribeInstanceStatus" // DescribeInstanceStatusRequest generates a request for the DescribeInstanceStatus operation. -func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput) (req *aws.Request, output *DescribeInstanceStatusOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeInstanceStatus == nil { - opDescribeInstanceStatus = &aws.Operation{ - Name: "DescribeInstanceStatus", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } +func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput) (req *request.Request, output *DescribeInstanceStatusOutput) { + op := &request.Operation{ + Name: opDescribeInstanceStatus, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { input = &DescribeInstanceStatusInput{} } - req = c.newRequest(opDescribeInstanceStatus, input, output) + req = c.newRequest(op, input, output) output = &DescribeInstanceStatusOutput{} req.Data = output return @@ -3443,32 +3098,27 @@ func (c *EC2) DescribeInstanceStatusPages(input *DescribeInstanceStatusInput, fn }) } -var opDescribeInstanceStatus *aws.Operation +const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a request for the DescribeInstances operation. -func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *aws.Request, output *DescribeInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeInstances == nil { - opDescribeInstances = &aws.Operation{ - Name: "DescribeInstances", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } +func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *request.Request, output *DescribeInstancesOutput) { + op := &request.Operation{ + Name: opDescribeInstances, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { input = &DescribeInstancesInput{} } - req = c.newRequest(opDescribeInstances, input, output) + req = c.newRequest(op, input, output) output = &DescribeInstancesOutput{} req.Data = output return @@ -3497,26 +3147,21 @@ func (c *EC2) DescribeInstancesPages(input *DescribeInstancesInput, fn func(p *D }) } -var opDescribeInstances *aws.Operation +const opDescribeInternetGateways = "DescribeInternetGateways" // DescribeInternetGatewaysRequest generates a request for the DescribeInternetGateways operation. -func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInput) (req *aws.Request, output *DescribeInternetGatewaysOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeInternetGateways == nil { - opDescribeInternetGateways = &aws.Operation{ - Name: "DescribeInternetGateways", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInput) (req *request.Request, output *DescribeInternetGatewaysOutput) { + op := &request.Operation{ + Name: opDescribeInternetGateways, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeInternetGatewaysInput{} } - req = c.newRequest(opDescribeInternetGateways, input, output) + req = c.newRequest(op, input, output) output = &DescribeInternetGatewaysOutput{} req.Data = output return @@ -3529,26 +3174,21 @@ func (c *EC2) DescribeInternetGateways(input *DescribeInternetGatewaysInput) (*D return out, err } -var opDescribeInternetGateways *aws.Operation +const opDescribeKeyPairs = "DescribeKeyPairs" // DescribeKeyPairsRequest generates a request for the DescribeKeyPairs operation. -func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *aws.Request, output *DescribeKeyPairsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeKeyPairs == nil { - opDescribeKeyPairs = &aws.Operation{ - Name: "DescribeKeyPairs", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *request.Request, output *DescribeKeyPairsOutput) { + op := &request.Operation{ + Name: opDescribeKeyPairs, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeKeyPairsInput{} } - req = c.newRequest(opDescribeKeyPairs, input, output) + req = c.newRequest(op, input, output) output = &DescribeKeyPairsOutput{} req.Data = output return @@ -3564,26 +3204,21 @@ func (c *EC2) DescribeKeyPairs(input *DescribeKeyPairsInput) (*DescribeKeyPairsO return out, err } -var opDescribeKeyPairs *aws.Operation +const opDescribeMovingAddresses = "DescribeMovingAddresses" // DescribeMovingAddressesRequest generates a request for the DescribeMovingAddresses operation. -func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput) (req *aws.Request, output *DescribeMovingAddressesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeMovingAddresses == nil { - opDescribeMovingAddresses = &aws.Operation{ - Name: "DescribeMovingAddresses", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput) (req *request.Request, output *DescribeMovingAddressesOutput) { + op := &request.Operation{ + Name: opDescribeMovingAddresses, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeMovingAddressesInput{} } - req = c.newRequest(opDescribeMovingAddresses, input, output) + req = c.newRequest(op, input, output) output = &DescribeMovingAddressesOutput{} req.Data = output return @@ -3598,27 +3233,22 @@ func (c *EC2) DescribeMovingAddresses(input *DescribeMovingAddressesInput) (*Des return out, err } -var opDescribeMovingAddresses *aws.Operation +const opDescribeNetworkAcls = "DescribeNetworkAcls" -// DescribeNetworkACLsRequest generates a request for the DescribeNetworkACLs operation. -func (c *EC2) DescribeNetworkACLsRequest(input *DescribeNetworkACLsInput) (req *aws.Request, output *DescribeNetworkACLsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeNetworkACLs == nil { - opDescribeNetworkACLs = &aws.Operation{ - Name: "DescribeNetworkAcls", - HTTPMethod: "POST", - HTTPPath: "/", - } +// DescribeNetworkAclsRequest generates a request for the DescribeNetworkAcls operation. +func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req *request.Request, output *DescribeNetworkAclsOutput) { + op := &request.Operation{ + Name: opDescribeNetworkAcls, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &DescribeNetworkACLsInput{} + input = &DescribeNetworkAclsInput{} } - req = c.newRequest(opDescribeNetworkACLs, input, output) - output = &DescribeNetworkACLsOutput{} + req = c.newRequest(op, input, output) + output = &DescribeNetworkAclsOutput{} req.Data = output return } @@ -3627,32 +3257,27 @@ func (c *EC2) DescribeNetworkACLsRequest(input *DescribeNetworkACLsInput) (req * // // For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) DescribeNetworkACLs(input *DescribeNetworkACLsInput) (*DescribeNetworkACLsOutput, error) { - req, out := c.DescribeNetworkACLsRequest(input) +func (c *EC2) DescribeNetworkAcls(input *DescribeNetworkAclsInput) (*DescribeNetworkAclsOutput, error) { + req, out := c.DescribeNetworkAclsRequest(input) err := req.Send() return out, err } -var opDescribeNetworkACLs *aws.Operation +const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute" // DescribeNetworkInterfaceAttributeRequest generates a request for the DescribeNetworkInterfaceAttribute operation. -func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInterfaceAttributeInput) (req *aws.Request, output *DescribeNetworkInterfaceAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeNetworkInterfaceAttribute == nil { - opDescribeNetworkInterfaceAttribute = &aws.Operation{ - Name: "DescribeNetworkInterfaceAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInterfaceAttributeInput) (req *request.Request, output *DescribeNetworkInterfaceAttributeOutput) { + op := &request.Operation{ + Name: opDescribeNetworkInterfaceAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeNetworkInterfaceAttributeInput{} } - req = c.newRequest(opDescribeNetworkInterfaceAttribute, input, output) + req = c.newRequest(op, input, output) output = &DescribeNetworkInterfaceAttributeOutput{} req.Data = output return @@ -3666,26 +3291,21 @@ func (c *EC2) DescribeNetworkInterfaceAttribute(input *DescribeNetworkInterfaceA return out, err } -var opDescribeNetworkInterfaceAttribute *aws.Operation +const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces" // DescribeNetworkInterfacesRequest generates a request for the DescribeNetworkInterfaces operation. -func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesInput) (req *aws.Request, output *DescribeNetworkInterfacesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeNetworkInterfaces == nil { - opDescribeNetworkInterfaces = &aws.Operation{ - Name: "DescribeNetworkInterfaces", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesInput) (req *request.Request, output *DescribeNetworkInterfacesOutput) { + op := &request.Operation{ + Name: opDescribeNetworkInterfaces, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeNetworkInterfacesInput{} } - req = c.newRequest(opDescribeNetworkInterfaces, input, output) + req = c.newRequest(op, input, output) output = &DescribeNetworkInterfacesOutput{} req.Data = output return @@ -3698,26 +3318,21 @@ func (c *EC2) DescribeNetworkInterfaces(input *DescribeNetworkInterfacesInput) ( return out, err } -var opDescribeNetworkInterfaces *aws.Operation +const opDescribePlacementGroups = "DescribePlacementGroups" // DescribePlacementGroupsRequest generates a request for the DescribePlacementGroups operation. -func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput) (req *aws.Request, output *DescribePlacementGroupsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribePlacementGroups == nil { - opDescribePlacementGroups = &aws.Operation{ - Name: "DescribePlacementGroups", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput) (req *request.Request, output *DescribePlacementGroupsOutput) { + op := &request.Operation{ + Name: opDescribePlacementGroups, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribePlacementGroupsInput{} } - req = c.newRequest(opDescribePlacementGroups, input, output) + req = c.newRequest(op, input, output) output = &DescribePlacementGroupsOutput{} req.Data = output return @@ -3732,26 +3347,21 @@ func (c *EC2) DescribePlacementGroups(input *DescribePlacementGroupsInput) (*Des return out, err } -var opDescribePlacementGroups *aws.Operation +const opDescribePrefixLists = "DescribePrefixLists" // DescribePrefixListsRequest generates a request for the DescribePrefixLists operation. -func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *aws.Request, output *DescribePrefixListsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribePrefixLists == nil { - opDescribePrefixLists = &aws.Operation{ - Name: "DescribePrefixLists", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *request.Request, output *DescribePrefixListsOutput) { + op := &request.Operation{ + Name: opDescribePrefixLists, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribePrefixListsInput{} } - req = c.newRequest(opDescribePrefixLists, input, output) + req = c.newRequest(op, input, output) output = &DescribePrefixListsOutput{} req.Data = output return @@ -3768,26 +3378,21 @@ func (c *EC2) DescribePrefixLists(input *DescribePrefixListsInput) (*DescribePre return out, err } -var opDescribePrefixLists *aws.Operation +const opDescribeRegions = "DescribeRegions" // DescribeRegionsRequest generates a request for the DescribeRegions operation. -func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *aws.Request, output *DescribeRegionsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeRegions == nil { - opDescribeRegions = &aws.Operation{ - Name: "DescribeRegions", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *request.Request, output *DescribeRegionsOutput) { + op := &request.Operation{ + Name: opDescribeRegions, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeRegionsInput{} } - req = c.newRequest(opDescribeRegions, input, output) + req = c.newRequest(op, input, output) output = &DescribeRegionsOutput{} req.Data = output return @@ -3803,26 +3408,21 @@ func (c *EC2) DescribeRegions(input *DescribeRegionsInput) (*DescribeRegionsOutp return out, err } -var opDescribeRegions *aws.Operation +const opDescribeReservedInstances = "DescribeReservedInstances" // DescribeReservedInstancesRequest generates a request for the DescribeReservedInstances operation. -func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesInput) (req *aws.Request, output *DescribeReservedInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeReservedInstances == nil { - opDescribeReservedInstances = &aws.Operation{ - Name: "DescribeReservedInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesInput) (req *request.Request, output *DescribeReservedInstancesOutput) { + op := &request.Operation{ + Name: opDescribeReservedInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeReservedInstancesInput{} } - req = c.newRequest(opDescribeReservedInstances, input, output) + req = c.newRequest(op, input, output) output = &DescribeReservedInstancesOutput{} req.Data = output return @@ -3838,26 +3438,21 @@ func (c *EC2) DescribeReservedInstances(input *DescribeReservedInstancesInput) ( return out, err } -var opDescribeReservedInstances *aws.Operation +const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings" // DescribeReservedInstancesListingsRequest generates a request for the DescribeReservedInstancesListings operation. -func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedInstancesListingsInput) (req *aws.Request, output *DescribeReservedInstancesListingsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeReservedInstancesListings == nil { - opDescribeReservedInstancesListings = &aws.Operation{ - Name: "DescribeReservedInstancesListings", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedInstancesListingsInput) (req *request.Request, output *DescribeReservedInstancesListingsOutput) { + op := &request.Operation{ + Name: opDescribeReservedInstancesListings, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeReservedInstancesListingsInput{} } - req = c.newRequest(opDescribeReservedInstancesListings, input, output) + req = c.newRequest(op, input, output) output = &DescribeReservedInstancesListingsOutput{} req.Data = output return @@ -3891,32 +3486,27 @@ func (c *EC2) DescribeReservedInstancesListings(input *DescribeReservedInstances return out, err } -var opDescribeReservedInstancesListings *aws.Operation +const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModifications" // DescribeReservedInstancesModificationsRequest generates a request for the DescribeReservedInstancesModifications operation. -func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReservedInstancesModificationsInput) (req *aws.Request, output *DescribeReservedInstancesModificationsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeReservedInstancesModifications == nil { - opDescribeReservedInstancesModifications = &aws.Operation{ - Name: "DescribeReservedInstancesModifications", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } +func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReservedInstancesModificationsInput) (req *request.Request, output *DescribeReservedInstancesModificationsOutput) { + op := &request.Operation{ + Name: opDescribeReservedInstancesModifications, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { input = &DescribeReservedInstancesModificationsInput{} } - req = c.newRequest(opDescribeReservedInstancesModifications, input, output) + req = c.newRequest(op, input, output) output = &DescribeReservedInstancesModificationsOutput{} req.Data = output return @@ -3942,32 +3532,27 @@ func (c *EC2) DescribeReservedInstancesModificationsPages(input *DescribeReserve }) } -var opDescribeReservedInstancesModifications *aws.Operation +const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings" // DescribeReservedInstancesOfferingsRequest generates a request for the DescribeReservedInstancesOfferings operation. -func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedInstancesOfferingsInput) (req *aws.Request, output *DescribeReservedInstancesOfferingsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeReservedInstancesOfferings == nil { - opDescribeReservedInstancesOfferings = &aws.Operation{ - Name: "DescribeReservedInstancesOfferings", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } +func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedInstancesOfferingsInput) (req *request.Request, output *DescribeReservedInstancesOfferingsOutput) { + op := &request.Operation{ + Name: opDescribeReservedInstancesOfferings, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { input = &DescribeReservedInstancesOfferingsInput{} } - req = c.newRequest(opDescribeReservedInstancesOfferings, input, output) + req = c.newRequest(op, input, output) output = &DescribeReservedInstancesOfferingsOutput{} req.Data = output return @@ -3994,26 +3579,21 @@ func (c *EC2) DescribeReservedInstancesOfferingsPages(input *DescribeReservedIns }) } -var opDescribeReservedInstancesOfferings *aws.Operation +const opDescribeRouteTables = "DescribeRouteTables" // DescribeRouteTablesRequest generates a request for the DescribeRouteTables operation. -func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *aws.Request, output *DescribeRouteTablesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeRouteTables == nil { - opDescribeRouteTables = &aws.Operation{ - Name: "DescribeRouteTables", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *request.Request, output *DescribeRouteTablesOutput) { + op := &request.Operation{ + Name: opDescribeRouteTables, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeRouteTablesInput{} } - req = c.newRequest(opDescribeRouteTables, input, output) + req = c.newRequest(op, input, output) output = &DescribeRouteTablesOutput{} req.Data = output return @@ -4021,6 +3601,11 @@ func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req * // Describes one or more of your route tables. // +// Each subnet in your VPC must be associated with a route table. If a subnet +// is not explicitly associated with any route table, it is implicitly associated +// with the main route table. This command does not return the subnet ID for +// implicit associations. +// // For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html) // in the Amazon Virtual Private Cloud User Guide. func (c *EC2) DescribeRouteTables(input *DescribeRouteTablesInput) (*DescribeRouteTablesOutput, error) { @@ -4029,26 +3614,21 @@ func (c *EC2) DescribeRouteTables(input *DescribeRouteTablesInput) (*DescribeRou return out, err } -var opDescribeRouteTables *aws.Operation +const opDescribeSecurityGroups = "DescribeSecurityGroups" // DescribeSecurityGroupsRequest generates a request for the DescribeSecurityGroups operation. -func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput) (req *aws.Request, output *DescribeSecurityGroupsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSecurityGroups == nil { - opDescribeSecurityGroups = &aws.Operation{ - Name: "DescribeSecurityGroups", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput) (req *request.Request, output *DescribeSecurityGroupsOutput) { + op := &request.Operation{ + Name: opDescribeSecurityGroups, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeSecurityGroupsInput{} } - req = c.newRequest(opDescribeSecurityGroups, input, output) + req = c.newRequest(op, input, output) output = &DescribeSecurityGroupsOutput{} req.Data = output return @@ -4068,26 +3648,21 @@ func (c *EC2) DescribeSecurityGroups(input *DescribeSecurityGroupsInput) (*Descr return out, err } -var opDescribeSecurityGroups *aws.Operation +const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute" // DescribeSnapshotAttributeRequest generates a request for the DescribeSnapshotAttribute operation. -func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeInput) (req *aws.Request, output *DescribeSnapshotAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSnapshotAttribute == nil { - opDescribeSnapshotAttribute = &aws.Operation{ - Name: "DescribeSnapshotAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeInput) (req *request.Request, output *DescribeSnapshotAttributeOutput) { + op := &request.Operation{ + Name: opDescribeSnapshotAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeSnapshotAttributeInput{} } - req = c.newRequest(opDescribeSnapshotAttribute, input, output) + req = c.newRequest(op, input, output) output = &DescribeSnapshotAttributeOutput{} req.Data = output return @@ -4104,32 +3679,27 @@ func (c *EC2) DescribeSnapshotAttribute(input *DescribeSnapshotAttributeInput) ( return out, err } -var opDescribeSnapshotAttribute *aws.Operation +const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a request for the DescribeSnapshots operation. -func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *aws.Request, output *DescribeSnapshotsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSnapshots == nil { - opDescribeSnapshots = &aws.Operation{ - Name: "DescribeSnapshots", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "", - TruncationToken: "", - }, - } +func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *request.Request, output *DescribeSnapshotsOutput) { + op := &request.Operation{ + Name: opDescribeSnapshots, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { input = &DescribeSnapshotsInput{} } - req = c.newRequest(opDescribeSnapshots, input, output) + req = c.newRequest(op, input, output) output = &DescribeSnapshotsOutput{} req.Data = output return @@ -4188,32 +3758,27 @@ func (c *EC2) DescribeSnapshotsPages(input *DescribeSnapshotsInput, fn func(p *D }) } -var opDescribeSnapshots *aws.Operation +const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription" // DescribeSpotDatafeedSubscriptionRequest generates a request for the DescribeSpotDatafeedSubscription operation. -func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafeedSubscriptionInput) (req *aws.Request, output *DescribeSpotDatafeedSubscriptionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSpotDatafeedSubscription == nil { - opDescribeSpotDatafeedSubscription = &aws.Operation{ - Name: "DescribeSpotDatafeedSubscription", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafeedSubscriptionInput) (req *request.Request, output *DescribeSpotDatafeedSubscriptionOutput) { + op := &request.Operation{ + Name: opDescribeSpotDatafeedSubscription, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeSpotDatafeedSubscriptionInput{} } - req = c.newRequest(opDescribeSpotDatafeedSubscription, input, output) + req = c.newRequest(op, input, output) output = &DescribeSpotDatafeedSubscriptionOutput{} req.Data = output return } -// Describes the data feed for Spot Instances. For more information, see Spot +// Describes the data feed for Spot instances. For more information, see Spot // Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) // in the Amazon Elastic Compute Cloud User Guide. func (c *EC2) DescribeSpotDatafeedSubscription(input *DescribeSpotDatafeedSubscriptionInput) (*DescribeSpotDatafeedSubscriptionOutput, error) { @@ -4222,26 +3787,21 @@ func (c *EC2) DescribeSpotDatafeedSubscription(input *DescribeSpotDatafeedSubscr return out, err } -var opDescribeSpotDatafeedSubscription *aws.Operation +const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances" // DescribeSpotFleetInstancesRequest generates a request for the DescribeSpotFleetInstances operation. -func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstancesInput) (req *aws.Request, output *DescribeSpotFleetInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSpotFleetInstances == nil { - opDescribeSpotFleetInstances = &aws.Operation{ - Name: "DescribeSpotFleetInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstancesInput) (req *request.Request, output *DescribeSpotFleetInstancesOutput) { + op := &request.Operation{ + Name: opDescribeSpotFleetInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeSpotFleetInstancesInput{} } - req = c.newRequest(opDescribeSpotFleetInstances, input, output) + req = c.newRequest(op, input, output) output = &DescribeSpotFleetInstancesOutput{} req.Data = output return @@ -4254,26 +3814,21 @@ func (c *EC2) DescribeSpotFleetInstances(input *DescribeSpotFleetInstancesInput) return out, err } -var opDescribeSpotFleetInstances *aws.Operation +const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory" // DescribeSpotFleetRequestHistoryRequest generates a request for the DescribeSpotFleetRequestHistory operation. -func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetRequestHistoryInput) (req *aws.Request, output *DescribeSpotFleetRequestHistoryOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSpotFleetRequestHistory == nil { - opDescribeSpotFleetRequestHistory = &aws.Operation{ - Name: "DescribeSpotFleetRequestHistory", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetRequestHistoryInput) (req *request.Request, output *DescribeSpotFleetRequestHistoryOutput) { + op := &request.Operation{ + Name: opDescribeSpotFleetRequestHistory, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeSpotFleetRequestHistoryInput{} } - req = c.newRequest(opDescribeSpotFleetRequestHistory, input, output) + req = c.newRequest(op, input, output) output = &DescribeSpotFleetRequestHistoryOutput{} req.Data = output return @@ -4291,26 +3846,21 @@ func (c *EC2) DescribeSpotFleetRequestHistory(input *DescribeSpotFleetRequestHis return out, err } -var opDescribeSpotFleetRequestHistory *aws.Operation +const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests" // DescribeSpotFleetRequestsRequest generates a request for the DescribeSpotFleetRequests operation. -func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsInput) (req *aws.Request, output *DescribeSpotFleetRequestsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSpotFleetRequests == nil { - opDescribeSpotFleetRequests = &aws.Operation{ - Name: "DescribeSpotFleetRequests", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsInput) (req *request.Request, output *DescribeSpotFleetRequestsOutput) { + op := &request.Operation{ + Name: opDescribeSpotFleetRequests, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeSpotFleetRequestsInput{} } - req = c.newRequest(opDescribeSpotFleetRequests, input, output) + req = c.newRequest(op, input, output) output = &DescribeSpotFleetRequestsOutput{} req.Data = output return @@ -4323,40 +3873,35 @@ func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) ( return out, err } -var opDescribeSpotFleetRequests *aws.Operation +const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests" // DescribeSpotInstanceRequestsRequest generates a request for the DescribeSpotInstanceRequests operation. -func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceRequestsInput) (req *aws.Request, output *DescribeSpotInstanceRequestsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSpotInstanceRequests == nil { - opDescribeSpotInstanceRequests = &aws.Operation{ - Name: "DescribeSpotInstanceRequests", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceRequestsInput) (req *request.Request, output *DescribeSpotInstanceRequestsOutput) { + op := &request.Operation{ + Name: opDescribeSpotInstanceRequests, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeSpotInstanceRequestsInput{} } - req = c.newRequest(opDescribeSpotInstanceRequests, input, output) + req = c.newRequest(op, input, output) output = &DescribeSpotInstanceRequestsOutput{} req.Data = output return } -// Describes the Spot Instance requests that belong to your account. Spot Instances +// Describes the Spot instance requests that belong to your account. Spot instances // are instances that Amazon EC2 launches when the bid price that you specify -// exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price -// based on available Spot Instance capacity and current Spot Instance requests. +// exceeds the current Spot price. Amazon EC2 periodically sets the Spot price +// based on available Spot instance capacity and current Spot instance requests. // For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) // in the Amazon Elastic Compute Cloud User Guide. // -// You can use DescribeSpotInstanceRequests to find a running Spot Instance -// by examining the response. If the status of the Spot Instance is fulfilled, +// You can use DescribeSpotInstanceRequests to find a running Spot instance +// by examining the response. If the status of the Spot instance is fulfilled, // the instance ID appears in the response and contains the identifier of the // instance. Alternatively, you can use DescribeInstances with a filter to look // for instances where the instance lifecycle is spot. @@ -4366,38 +3911,33 @@ func (c *EC2) DescribeSpotInstanceRequests(input *DescribeSpotInstanceRequestsIn return out, err } -var opDescribeSpotInstanceRequests *aws.Operation +const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory" // DescribeSpotPriceHistoryRequest generates a request for the DescribeSpotPriceHistory operation. -func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInput) (req *aws.Request, output *DescribeSpotPriceHistoryOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSpotPriceHistory == nil { - opDescribeSpotPriceHistory = &aws.Operation{ - Name: "DescribeSpotPriceHistory", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } +func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInput) (req *request.Request, output *DescribeSpotPriceHistoryOutput) { + op := &request.Operation{ + Name: opDescribeSpotPriceHistory, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { input = &DescribeSpotPriceHistoryInput{} } - req = c.newRequest(opDescribeSpotPriceHistory, input, output) + req = c.newRequest(op, input, output) output = &DescribeSpotPriceHistoryOutput{} req.Data = output return } -// Describes the Spot Price history. The prices returned are listed in chronological +// Describes the Spot price history. The prices returned are listed in chronological // order, from the oldest to the most recent, for up to the past 90 days. For // more information, see Spot Instance Pricing History (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -4419,26 +3959,21 @@ func (c *EC2) DescribeSpotPriceHistoryPages(input *DescribeSpotPriceHistoryInput }) } -var opDescribeSpotPriceHistory *aws.Operation +const opDescribeSubnets = "DescribeSubnets" // DescribeSubnetsRequest generates a request for the DescribeSubnets operation. -func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *aws.Request, output *DescribeSubnetsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeSubnets == nil { - opDescribeSubnets = &aws.Operation{ - Name: "DescribeSubnets", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request.Request, output *DescribeSubnetsOutput) { + op := &request.Operation{ + Name: opDescribeSubnets, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeSubnetsInput{} } - req = c.newRequest(opDescribeSubnets, input, output) + req = c.newRequest(op, input, output) output = &DescribeSubnetsOutput{} req.Data = output return @@ -4454,26 +3989,21 @@ func (c *EC2) DescribeSubnets(input *DescribeSubnetsInput) (*DescribeSubnetsOutp return out, err } -var opDescribeSubnets *aws.Operation +const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a request for the DescribeTags operation. -func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *aws.Request, output *DescribeTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeTags == nil { - opDescribeTags = &aws.Operation{ - Name: "DescribeTags", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { + op := &request.Operation{ + Name: opDescribeTags, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeTagsInput{} } - req = c.newRequest(opDescribeTags, input, output) + req = c.newRequest(op, input, output) output = &DescribeTagsOutput{} req.Data = output return @@ -4489,292 +4019,21 @@ func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error return out, err } -var opDescribeTags *aws.Operation - -// DescribeVPCAttributeRequest generates a request for the DescribeVPCAttribute operation. -func (c *EC2) DescribeVPCAttributeRequest(input *DescribeVPCAttributeInput) (req *aws.Request, output *DescribeVPCAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVPCAttribute == nil { - opDescribeVPCAttribute = &aws.Operation{ - Name: "DescribeVpcAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DescribeVPCAttributeInput{} - } - - req = c.newRequest(opDescribeVPCAttribute, input, output) - output = &DescribeVPCAttributeOutput{} - req.Data = output - return -} - -// Describes the specified attribute of the specified VPC. You can specify only -// one attribute at a time. -func (c *EC2) DescribeVPCAttribute(input *DescribeVPCAttributeInput) (*DescribeVPCAttributeOutput, error) { - req, out := c.DescribeVPCAttributeRequest(input) - err := req.Send() - return out, err -} - -var opDescribeVPCAttribute *aws.Operation - -// DescribeVPCClassicLinkRequest generates a request for the DescribeVPCClassicLink operation. -func (c *EC2) DescribeVPCClassicLinkRequest(input *DescribeVPCClassicLinkInput) (req *aws.Request, output *DescribeVPCClassicLinkOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVPCClassicLink == nil { - opDescribeVPCClassicLink = &aws.Operation{ - Name: "DescribeVpcClassicLink", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DescribeVPCClassicLinkInput{} - } - - req = c.newRequest(opDescribeVPCClassicLink, input, output) - output = &DescribeVPCClassicLinkOutput{} - req.Data = output - return -} - -// Describes the ClassicLink status of one or more VPCs. -func (c *EC2) DescribeVPCClassicLink(input *DescribeVPCClassicLinkInput) (*DescribeVPCClassicLinkOutput, error) { - req, out := c.DescribeVPCClassicLinkRequest(input) - err := req.Send() - return out, err -} - -var opDescribeVPCClassicLink *aws.Operation - -// DescribeVPCEndpointServicesRequest generates a request for the DescribeVPCEndpointServices operation. -func (c *EC2) DescribeVPCEndpointServicesRequest(input *DescribeVPCEndpointServicesInput) (req *aws.Request, output *DescribeVPCEndpointServicesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVPCEndpointServices == nil { - opDescribeVPCEndpointServices = &aws.Operation{ - Name: "DescribeVpcEndpointServices", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DescribeVPCEndpointServicesInput{} - } - - req = c.newRequest(opDescribeVPCEndpointServices, input, output) - output = &DescribeVPCEndpointServicesOutput{} - req.Data = output - return -} - -// Describes all supported AWS services that can be specified when creating -// a VPC endpoint. -func (c *EC2) DescribeVPCEndpointServices(input *DescribeVPCEndpointServicesInput) (*DescribeVPCEndpointServicesOutput, error) { - req, out := c.DescribeVPCEndpointServicesRequest(input) - err := req.Send() - return out, err -} - -var opDescribeVPCEndpointServices *aws.Operation - -// DescribeVPCEndpointsRequest generates a request for the DescribeVPCEndpoints operation. -func (c *EC2) DescribeVPCEndpointsRequest(input *DescribeVPCEndpointsInput) (req *aws.Request, output *DescribeVPCEndpointsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVPCEndpoints == nil { - opDescribeVPCEndpoints = &aws.Operation{ - Name: "DescribeVpcEndpoints", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DescribeVPCEndpointsInput{} - } - - req = c.newRequest(opDescribeVPCEndpoints, input, output) - output = &DescribeVPCEndpointsOutput{} - req.Data = output - return -} - -// Describes one or more of your VPC endpoints. -func (c *EC2) DescribeVPCEndpoints(input *DescribeVPCEndpointsInput) (*DescribeVPCEndpointsOutput, error) { - req, out := c.DescribeVPCEndpointsRequest(input) - err := req.Send() - return out, err -} - -var opDescribeVPCEndpoints *aws.Operation - -// DescribeVPCPeeringConnectionsRequest generates a request for the DescribeVPCPeeringConnections operation. -func (c *EC2) DescribeVPCPeeringConnectionsRequest(input *DescribeVPCPeeringConnectionsInput) (req *aws.Request, output *DescribeVPCPeeringConnectionsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVPCPeeringConnections == nil { - opDescribeVPCPeeringConnections = &aws.Operation{ - Name: "DescribeVpcPeeringConnections", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DescribeVPCPeeringConnectionsInput{} - } - - req = c.newRequest(opDescribeVPCPeeringConnections, input, output) - output = &DescribeVPCPeeringConnectionsOutput{} - req.Data = output - return -} - -// Describes one or more of your VPC peering connections. -func (c *EC2) DescribeVPCPeeringConnections(input *DescribeVPCPeeringConnectionsInput) (*DescribeVPCPeeringConnectionsOutput, error) { - req, out := c.DescribeVPCPeeringConnectionsRequest(input) - err := req.Send() - return out, err -} - -var opDescribeVPCPeeringConnections *aws.Operation - -// DescribeVPCsRequest generates a request for the DescribeVPCs operation. -func (c *EC2) DescribeVPCsRequest(input *DescribeVPCsInput) (req *aws.Request, output *DescribeVPCsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVPCs == nil { - opDescribeVPCs = &aws.Operation{ - Name: "DescribeVpcs", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DescribeVPCsInput{} - } - - req = c.newRequest(opDescribeVPCs, input, output) - output = &DescribeVPCsOutput{} - req.Data = output - return -} - -// Describes one or more of your VPCs. -func (c *EC2) DescribeVPCs(input *DescribeVPCsInput) (*DescribeVPCsOutput, error) { - req, out := c.DescribeVPCsRequest(input) - err := req.Send() - return out, err -} - -var opDescribeVPCs *aws.Operation - -// DescribeVPNConnectionsRequest generates a request for the DescribeVPNConnections operation. -func (c *EC2) DescribeVPNConnectionsRequest(input *DescribeVPNConnectionsInput) (req *aws.Request, output *DescribeVPNConnectionsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVPNConnections == nil { - opDescribeVPNConnections = &aws.Operation{ - Name: "DescribeVpnConnections", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DescribeVPNConnectionsInput{} - } - - req = c.newRequest(opDescribeVPNConnections, input, output) - output = &DescribeVPNConnectionsOutput{} - req.Data = output - return -} - -// Describes one or more of your VPN connections. -// -// For more information about VPN connections, see Adding a Hardware Virtual -// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) DescribeVPNConnections(input *DescribeVPNConnectionsInput) (*DescribeVPNConnectionsOutput, error) { - req, out := c.DescribeVPNConnectionsRequest(input) - err := req.Send() - return out, err -} - -var opDescribeVPNConnections *aws.Operation - -// DescribeVPNGatewaysRequest generates a request for the DescribeVPNGateways operation. -func (c *EC2) DescribeVPNGatewaysRequest(input *DescribeVPNGatewaysInput) (req *aws.Request, output *DescribeVPNGatewaysOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVPNGateways == nil { - opDescribeVPNGateways = &aws.Operation{ - Name: "DescribeVpnGateways", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DescribeVPNGatewaysInput{} - } - - req = c.newRequest(opDescribeVPNGateways, input, output) - output = &DescribeVPNGatewaysOutput{} - req.Data = output - return -} - -// Describes one or more of your virtual private gateways. -// -// For more information about virtual private gateways, see Adding an IPsec -// Hardware VPN to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) -// in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) DescribeVPNGateways(input *DescribeVPNGatewaysInput) (*DescribeVPNGatewaysOutput, error) { - req, out := c.DescribeVPNGatewaysRequest(input) - err := req.Send() - return out, err -} - -var opDescribeVPNGateways *aws.Operation +const opDescribeVolumeAttribute = "DescribeVolumeAttribute" // DescribeVolumeAttributeRequest generates a request for the DescribeVolumeAttribute operation. -func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput) (req *aws.Request, output *DescribeVolumeAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVolumeAttribute == nil { - opDescribeVolumeAttribute = &aws.Operation{ - Name: "DescribeVolumeAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput) (req *request.Request, output *DescribeVolumeAttributeOutput) { + op := &request.Operation{ + Name: opDescribeVolumeAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeVolumeAttributeInput{} } - req = c.newRequest(opDescribeVolumeAttribute, input, output) + req = c.newRequest(op, input, output) output = &DescribeVolumeAttributeOutput{} req.Data = output return @@ -4791,32 +4050,27 @@ func (c *EC2) DescribeVolumeAttribute(input *DescribeVolumeAttributeInput) (*Des return out, err } -var opDescribeVolumeAttribute *aws.Operation +const opDescribeVolumeStatus = "DescribeVolumeStatus" // DescribeVolumeStatusRequest generates a request for the DescribeVolumeStatus operation. -func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req *aws.Request, output *DescribeVolumeStatusOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVolumeStatus == nil { - opDescribeVolumeStatus = &aws.Operation{ - Name: "DescribeVolumeStatus", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } +func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req *request.Request, output *DescribeVolumeStatusOutput) { + op := &request.Operation{ + Name: opDescribeVolumeStatus, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { input = &DescribeVolumeStatusInput{} } - req = c.newRequest(opDescribeVolumeStatus, input, output) + req = c.newRequest(op, input, output) output = &DescribeVolumeStatusOutput{} req.Data = output return @@ -4870,32 +4124,27 @@ func (c *EC2) DescribeVolumeStatusPages(input *DescribeVolumeStatusInput, fn fun }) } -var opDescribeVolumeStatus *aws.Operation +const opDescribeVolumes = "DescribeVolumes" // DescribeVolumesRequest generates a request for the DescribeVolumes operation. -func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *aws.Request, output *DescribeVolumesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeVolumes == nil { - opDescribeVolumes = &aws.Operation{ - Name: "DescribeVolumes", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } +func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.Request, output *DescribeVolumesOutput) { + op := &request.Operation{ + Name: opDescribeVolumes, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { input = &DescribeVolumesInput{} } - req = c.newRequest(opDescribeVolumes, input, output) + req = c.newRequest(op, input, output) output = &DescribeVolumesOutput{} req.Data = output return @@ -4925,27 +4174,248 @@ func (c *EC2) DescribeVolumesPages(input *DescribeVolumesInput, fn func(p *Descr }) } -var opDescribeVolumes *aws.Operation +const opDescribeVpcAttribute = "DescribeVpcAttribute" -// DetachClassicLinkVPCRequest generates a request for the DetachClassicLinkVPC operation. -func (c *EC2) DetachClassicLinkVPCRequest(input *DetachClassicLinkVPCInput) (req *aws.Request, output *DetachClassicLinkVPCOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDetachClassicLinkVPC == nil { - opDetachClassicLinkVPC = &aws.Operation{ - Name: "DetachClassicLinkVpc", - HTTPMethod: "POST", - HTTPPath: "/", - } +// DescribeVpcAttributeRequest generates a request for the DescribeVpcAttribute operation. +func (c *EC2) DescribeVpcAttributeRequest(input *DescribeVpcAttributeInput) (req *request.Request, output *DescribeVpcAttributeOutput) { + op := &request.Operation{ + Name: opDescribeVpcAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &DetachClassicLinkVPCInput{} + input = &DescribeVpcAttributeInput{} } - req = c.newRequest(opDetachClassicLinkVPC, input, output) - output = &DetachClassicLinkVPCOutput{} + req = c.newRequest(op, input, output) + output = &DescribeVpcAttributeOutput{} + req.Data = output + return +} + +// Describes the specified attribute of the specified VPC. You can specify only +// one attribute at a time. +func (c *EC2) DescribeVpcAttribute(input *DescribeVpcAttributeInput) (*DescribeVpcAttributeOutput, error) { + req, out := c.DescribeVpcAttributeRequest(input) + err := req.Send() + return out, err +} + +const opDescribeVpcClassicLink = "DescribeVpcClassicLink" + +// DescribeVpcClassicLinkRequest generates a request for the DescribeVpcClassicLink operation. +func (c *EC2) DescribeVpcClassicLinkRequest(input *DescribeVpcClassicLinkInput) (req *request.Request, output *DescribeVpcClassicLinkOutput) { + op := &request.Operation{ + Name: opDescribeVpcClassicLink, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVpcClassicLinkInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeVpcClassicLinkOutput{} + req.Data = output + return +} + +// Describes the ClassicLink status of one or more VPCs. +func (c *EC2) DescribeVpcClassicLink(input *DescribeVpcClassicLinkInput) (*DescribeVpcClassicLinkOutput, error) { + req, out := c.DescribeVpcClassicLinkRequest(input) + err := req.Send() + return out, err +} + +const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices" + +// DescribeVpcEndpointServicesRequest generates a request for the DescribeVpcEndpointServices operation. +func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServicesInput) (req *request.Request, output *DescribeVpcEndpointServicesOutput) { + op := &request.Operation{ + Name: opDescribeVpcEndpointServices, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVpcEndpointServicesInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeVpcEndpointServicesOutput{} + req.Data = output + return +} + +// Describes all supported AWS services that can be specified when creating +// a VPC endpoint. +func (c *EC2) DescribeVpcEndpointServices(input *DescribeVpcEndpointServicesInput) (*DescribeVpcEndpointServicesOutput, error) { + req, out := c.DescribeVpcEndpointServicesRequest(input) + err := req.Send() + return out, err +} + +const opDescribeVpcEndpoints = "DescribeVpcEndpoints" + +// DescribeVpcEndpointsRequest generates a request for the DescribeVpcEndpoints operation. +func (c *EC2) DescribeVpcEndpointsRequest(input *DescribeVpcEndpointsInput) (req *request.Request, output *DescribeVpcEndpointsOutput) { + op := &request.Operation{ + Name: opDescribeVpcEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVpcEndpointsInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeVpcEndpointsOutput{} + req.Data = output + return +} + +// Describes one or more of your VPC endpoints. +func (c *EC2) DescribeVpcEndpoints(input *DescribeVpcEndpointsInput) (*DescribeVpcEndpointsOutput, error) { + req, out := c.DescribeVpcEndpointsRequest(input) + err := req.Send() + return out, err +} + +const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" + +// DescribeVpcPeeringConnectionsRequest generates a request for the DescribeVpcPeeringConnections operation. +func (c *EC2) DescribeVpcPeeringConnectionsRequest(input *DescribeVpcPeeringConnectionsInput) (req *request.Request, output *DescribeVpcPeeringConnectionsOutput) { + op := &request.Operation{ + Name: opDescribeVpcPeeringConnections, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVpcPeeringConnectionsInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeVpcPeeringConnectionsOutput{} + req.Data = output + return +} + +// Describes one or more of your VPC peering connections. +func (c *EC2) DescribeVpcPeeringConnections(input *DescribeVpcPeeringConnectionsInput) (*DescribeVpcPeeringConnectionsOutput, error) { + req, out := c.DescribeVpcPeeringConnectionsRequest(input) + err := req.Send() + return out, err +} + +const opDescribeVpcs = "DescribeVpcs" + +// DescribeVpcsRequest generates a request for the DescribeVpcs operation. +func (c *EC2) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Request, output *DescribeVpcsOutput) { + op := &request.Operation{ + Name: opDescribeVpcs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVpcsInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeVpcsOutput{} + req.Data = output + return +} + +// Describes one or more of your VPCs. +func (c *EC2) DescribeVpcs(input *DescribeVpcsInput) (*DescribeVpcsOutput, error) { + req, out := c.DescribeVpcsRequest(input) + err := req.Send() + return out, err +} + +const opDescribeVpnConnections = "DescribeVpnConnections" + +// DescribeVpnConnectionsRequest generates a request for the DescribeVpnConnections operation. +func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput) (req *request.Request, output *DescribeVpnConnectionsOutput) { + op := &request.Operation{ + Name: opDescribeVpnConnections, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVpnConnectionsInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeVpnConnectionsOutput{} + req.Data = output + return +} + +// Describes one or more of your VPN connections. +// +// For more information about VPN connections, see Adding a Hardware Virtual +// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// in the Amazon Virtual Private Cloud User Guide. +func (c *EC2) DescribeVpnConnections(input *DescribeVpnConnectionsInput) (*DescribeVpnConnectionsOutput, error) { + req, out := c.DescribeVpnConnectionsRequest(input) + err := req.Send() + return out, err +} + +const opDescribeVpnGateways = "DescribeVpnGateways" + +// DescribeVpnGatewaysRequest generates a request for the DescribeVpnGateways operation. +func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req *request.Request, output *DescribeVpnGatewaysOutput) { + op := &request.Operation{ + Name: opDescribeVpnGateways, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeVpnGatewaysInput{} + } + + req = c.newRequest(op, input, output) + output = &DescribeVpnGatewaysOutput{} + req.Data = output + return +} + +// Describes one or more of your virtual private gateways. +// +// For more information about virtual private gateways, see Adding an IPsec +// Hardware VPN to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) +// in the Amazon Virtual Private Cloud User Guide. +func (c *EC2) DescribeVpnGateways(input *DescribeVpnGatewaysInput) (*DescribeVpnGatewaysOutput, error) { + req, out := c.DescribeVpnGatewaysRequest(input) + err := req.Send() + return out, err +} + +const opDetachClassicLinkVpc = "DetachClassicLinkVpc" + +// DetachClassicLinkVpcRequest generates a request for the DetachClassicLinkVpc operation. +func (c *EC2) DetachClassicLinkVpcRequest(input *DetachClassicLinkVpcInput) (req *request.Request, output *DetachClassicLinkVpcOutput) { + op := &request.Operation{ + Name: opDetachClassicLinkVpc, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DetachClassicLinkVpcInput{} + } + + req = c.newRequest(op, input, output) + output = &DetachClassicLinkVpcOutput{} req.Data = output return } @@ -4953,32 +4423,27 @@ func (c *EC2) DetachClassicLinkVPCRequest(input *DetachClassicLinkVPCInput) (req // Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance // has been unlinked, the VPC security groups are no longer associated with // it. An instance is automatically unlinked from a VPC when it's stopped. -func (c *EC2) DetachClassicLinkVPC(input *DetachClassicLinkVPCInput) (*DetachClassicLinkVPCOutput, error) { - req, out := c.DetachClassicLinkVPCRequest(input) +func (c *EC2) DetachClassicLinkVpc(input *DetachClassicLinkVpcInput) (*DetachClassicLinkVpcOutput, error) { + req, out := c.DetachClassicLinkVpcRequest(input) err := req.Send() return out, err } -var opDetachClassicLinkVPC *aws.Operation +const opDetachInternetGateway = "DetachInternetGateway" // DetachInternetGatewayRequest generates a request for the DetachInternetGateway operation. -func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (req *aws.Request, output *DetachInternetGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDetachInternetGateway == nil { - opDetachInternetGateway = &aws.Operation{ - Name: "DetachInternetGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (req *request.Request, output *DetachInternetGatewayOutput) { + op := &request.Operation{ + Name: opDetachInternetGateway, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DetachInternetGatewayInput{} } - req = c.newRequest(opDetachInternetGateway, input, output) + req = c.newRequest(op, input, output) output = &DetachInternetGatewayOutput{} req.Data = output return @@ -4993,26 +4458,21 @@ func (c *EC2) DetachInternetGateway(input *DetachInternetGatewayInput) (*DetachI return out, err } -var opDetachInternetGateway *aws.Operation +const opDetachNetworkInterface = "DetachNetworkInterface" // DetachNetworkInterfaceRequest generates a request for the DetachNetworkInterface operation. -func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput) (req *aws.Request, output *DetachNetworkInterfaceOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDetachNetworkInterface == nil { - opDetachNetworkInterface = &aws.Operation{ - Name: "DetachNetworkInterface", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput) (req *request.Request, output *DetachNetworkInterfaceOutput) { + op := &request.Operation{ + Name: opDetachNetworkInterface, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DetachNetworkInterfaceInput{} } - req = c.newRequest(opDetachNetworkInterface, input, output) + req = c.newRequest(op, input, output) output = &DetachNetworkInterfaceOutput{} req.Data = output return @@ -5025,65 +4485,21 @@ func (c *EC2) DetachNetworkInterface(input *DetachNetworkInterfaceInput) (*Detac return out, err } -var opDetachNetworkInterface *aws.Operation - -// DetachVPNGatewayRequest generates a request for the DetachVPNGateway operation. -func (c *EC2) DetachVPNGatewayRequest(input *DetachVPNGatewayInput) (req *aws.Request, output *DetachVPNGatewayOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDetachVPNGateway == nil { - opDetachVPNGateway = &aws.Operation{ - Name: "DetachVpnGateway", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &DetachVPNGatewayInput{} - } - - req = c.newRequest(opDetachVPNGateway, input, output) - output = &DetachVPNGatewayOutput{} - req.Data = output - return -} - -// Detaches a virtual private gateway from a VPC. You do this if you're planning -// to turn off the VPC and not use it anymore. You can confirm a virtual private -// gateway has been completely detached from a VPC by describing the virtual -// private gateway (any attachments to the virtual private gateway are also -// described). -// -// You must wait for the attachment's state to switch to detached before you -// can delete the VPC or attach a different VPC to the virtual private gateway. -func (c *EC2) DetachVPNGateway(input *DetachVPNGatewayInput) (*DetachVPNGatewayOutput, error) { - req, out := c.DetachVPNGatewayRequest(input) - err := req.Send() - return out, err -} - -var opDetachVPNGateway *aws.Operation +const opDetachVolume = "DetachVolume" // DetachVolumeRequest generates a request for the DetachVolume operation. -func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *aws.Request, output *VolumeAttachment) { - oprw.Lock() - defer oprw.Unlock() - - if opDetachVolume == nil { - opDetachVolume = &aws.Operation{ - Name: "DetachVolume", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Request, output *VolumeAttachment) { + op := &request.Operation{ + Name: opDetachVolume, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DetachVolumeInput{} } - req = c.newRequest(opDetachVolume, input, output) + req = c.newRequest(op, input, output) output = &VolumeAttachment{} req.Data = output return @@ -5108,92 +4524,111 @@ func (c *EC2) DetachVolume(input *DetachVolumeInput) (*VolumeAttachment, error) return out, err } -var opDetachVolume *aws.Operation +const opDetachVpnGateway = "DetachVpnGateway" -// DisableVGWRoutePropagationRequest generates a request for the DisableVGWRoutePropagation operation. -func (c *EC2) DisableVGWRoutePropagationRequest(input *DisableVGWRoutePropagationInput) (req *aws.Request, output *DisableVGWRoutePropagationOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDisableVGWRoutePropagation == nil { - opDisableVGWRoutePropagation = &aws.Operation{ - Name: "DisableVgwRoutePropagation", - HTTPMethod: "POST", - HTTPPath: "/", - } +// DetachVpnGatewayRequest generates a request for the DetachVpnGateway operation. +func (c *EC2) DetachVpnGatewayRequest(input *DetachVpnGatewayInput) (req *request.Request, output *DetachVpnGatewayOutput) { + op := &request.Operation{ + Name: opDetachVpnGateway, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &DisableVGWRoutePropagationInput{} + input = &DetachVpnGatewayInput{} } - req = c.newRequest(opDisableVGWRoutePropagation, input, output) - output = &DisableVGWRoutePropagationOutput{} + req = c.newRequest(op, input, output) + output = &DetachVpnGatewayOutput{} + req.Data = output + return +} + +// Detaches a virtual private gateway from a VPC. You do this if you're planning +// to turn off the VPC and not use it anymore. You can confirm a virtual private +// gateway has been completely detached from a VPC by describing the virtual +// private gateway (any attachments to the virtual private gateway are also +// described). +// +// You must wait for the attachment's state to switch to detached before you +// can delete the VPC or attach a different VPC to the virtual private gateway. +func (c *EC2) DetachVpnGateway(input *DetachVpnGatewayInput) (*DetachVpnGatewayOutput, error) { + req, out := c.DetachVpnGatewayRequest(input) + err := req.Send() + return out, err +} + +const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation" + +// DisableVgwRoutePropagationRequest generates a request for the DisableVgwRoutePropagation operation. +func (c *EC2) DisableVgwRoutePropagationRequest(input *DisableVgwRoutePropagationInput) (req *request.Request, output *DisableVgwRoutePropagationOutput) { + op := &request.Operation{ + Name: opDisableVgwRoutePropagation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableVgwRoutePropagationInput{} + } + + req = c.newRequest(op, input, output) + output = &DisableVgwRoutePropagationOutput{} req.Data = output return } // Disables a virtual private gateway (VGW) from propagating routes to a specified // route table of a VPC. -func (c *EC2) DisableVGWRoutePropagation(input *DisableVGWRoutePropagationInput) (*DisableVGWRoutePropagationOutput, error) { - req, out := c.DisableVGWRoutePropagationRequest(input) +func (c *EC2) DisableVgwRoutePropagation(input *DisableVgwRoutePropagationInput) (*DisableVgwRoutePropagationOutput, error) { + req, out := c.DisableVgwRoutePropagationRequest(input) err := req.Send() return out, err } -var opDisableVGWRoutePropagation *aws.Operation +const opDisableVpcClassicLink = "DisableVpcClassicLink" -// DisableVPCClassicLinkRequest generates a request for the DisableVPCClassicLink operation. -func (c *EC2) DisableVPCClassicLinkRequest(input *DisableVPCClassicLinkInput) (req *aws.Request, output *DisableVPCClassicLinkOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDisableVPCClassicLink == nil { - opDisableVPCClassicLink = &aws.Operation{ - Name: "DisableVpcClassicLink", - HTTPMethod: "POST", - HTTPPath: "/", - } +// DisableVpcClassicLinkRequest generates a request for the DisableVpcClassicLink operation. +func (c *EC2) DisableVpcClassicLinkRequest(input *DisableVpcClassicLinkInput) (req *request.Request, output *DisableVpcClassicLinkOutput) { + op := &request.Operation{ + Name: opDisableVpcClassicLink, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &DisableVPCClassicLinkInput{} + input = &DisableVpcClassicLinkInput{} } - req = c.newRequest(opDisableVPCClassicLink, input, output) - output = &DisableVPCClassicLinkOutput{} + req = c.newRequest(op, input, output) + output = &DisableVpcClassicLinkOutput{} req.Data = output return } // Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC // that has EC2-Classic instances linked to it. -func (c *EC2) DisableVPCClassicLink(input *DisableVPCClassicLinkInput) (*DisableVPCClassicLinkOutput, error) { - req, out := c.DisableVPCClassicLinkRequest(input) +func (c *EC2) DisableVpcClassicLink(input *DisableVpcClassicLinkInput) (*DisableVpcClassicLinkOutput, error) { + req, out := c.DisableVpcClassicLinkRequest(input) err := req.Send() return out, err } -var opDisableVPCClassicLink *aws.Operation +const opDisassociateAddress = "DisassociateAddress" // DisassociateAddressRequest generates a request for the DisassociateAddress operation. -func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *aws.Request, output *DisassociateAddressOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDisassociateAddress == nil { - opDisassociateAddress = &aws.Operation{ - Name: "DisassociateAddress", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *request.Request, output *DisassociateAddressOutput) { + op := &request.Operation{ + Name: opDisassociateAddress, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DisassociateAddressInput{} } - req = c.newRequest(opDisassociateAddress, input, output) + req = c.newRequest(op, input, output) output = &DisassociateAddressOutput{} req.Data = output return @@ -5214,26 +4649,21 @@ func (c *EC2) DisassociateAddress(input *DisassociateAddressInput) (*Disassociat return out, err } -var opDisassociateAddress *aws.Operation +const opDisassociateRouteTable = "DisassociateRouteTable" // DisassociateRouteTableRequest generates a request for the DisassociateRouteTable operation. -func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) (req *aws.Request, output *DisassociateRouteTableOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDisassociateRouteTable == nil { - opDisassociateRouteTable = &aws.Operation{ - Name: "DisassociateRouteTable", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) (req *request.Request, output *DisassociateRouteTableOutput) { + op := &request.Operation{ + Name: opDisassociateRouteTable, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DisassociateRouteTableInput{} } - req = c.newRequest(opDisassociateRouteTable, input, output) + req = c.newRequest(op, input, output) output = &DisassociateRouteTableOutput{} req.Data = output return @@ -5251,97 +4681,49 @@ func (c *EC2) DisassociateRouteTable(input *DisassociateRouteTableInput) (*Disas return out, err } -var opDisassociateRouteTable *aws.Operation +const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation" -// EnableVGWRoutePropagationRequest generates a request for the EnableVGWRoutePropagation operation. -func (c *EC2) EnableVGWRoutePropagationRequest(input *EnableVGWRoutePropagationInput) (req *aws.Request, output *EnableVGWRoutePropagationOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opEnableVGWRoutePropagation == nil { - opEnableVGWRoutePropagation = &aws.Operation{ - Name: "EnableVgwRoutePropagation", - HTTPMethod: "POST", - HTTPPath: "/", - } +// EnableVgwRoutePropagationRequest generates a request for the EnableVgwRoutePropagation operation. +func (c *EC2) EnableVgwRoutePropagationRequest(input *EnableVgwRoutePropagationInput) (req *request.Request, output *EnableVgwRoutePropagationOutput) { + op := &request.Operation{ + Name: opEnableVgwRoutePropagation, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &EnableVGWRoutePropagationInput{} + input = &EnableVgwRoutePropagationInput{} } - req = c.newRequest(opEnableVGWRoutePropagation, input, output) - output = &EnableVGWRoutePropagationOutput{} + req = c.newRequest(op, input, output) + output = &EnableVgwRoutePropagationOutput{} req.Data = output return } // Enables a virtual private gateway (VGW) to propagate routes to the specified // route table of a VPC. -func (c *EC2) EnableVGWRoutePropagation(input *EnableVGWRoutePropagationInput) (*EnableVGWRoutePropagationOutput, error) { - req, out := c.EnableVGWRoutePropagationRequest(input) +func (c *EC2) EnableVgwRoutePropagation(input *EnableVgwRoutePropagationInput) (*EnableVgwRoutePropagationOutput, error) { + req, out := c.EnableVgwRoutePropagationRequest(input) err := req.Send() return out, err } -var opEnableVGWRoutePropagation *aws.Operation - -// EnableVPCClassicLinkRequest generates a request for the EnableVPCClassicLink operation. -func (c *EC2) EnableVPCClassicLinkRequest(input *EnableVPCClassicLinkInput) (req *aws.Request, output *EnableVPCClassicLinkOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opEnableVPCClassicLink == nil { - opEnableVPCClassicLink = &aws.Operation{ - Name: "EnableVpcClassicLink", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &EnableVPCClassicLinkInput{} - } - - req = c.newRequest(opEnableVPCClassicLink, input, output) - output = &EnableVPCClassicLinkOutput{} - req.Data = output - return -} - -// Enables a VPC for ClassicLink. You can then link EC2-Classic instances to -// your ClassicLink-enabled VPC to allow communication over private IP addresses. -// You cannot enable your VPC for ClassicLink if any of your VPC's route tables -// have existing routes for address ranges within the 10.0.0.0/8 IP address -// range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 -// IP address ranges. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *EC2) EnableVPCClassicLink(input *EnableVPCClassicLinkInput) (*EnableVPCClassicLinkOutput, error) { - req, out := c.EnableVPCClassicLinkRequest(input) - err := req.Send() - return out, err -} - -var opEnableVPCClassicLink *aws.Operation +const opEnableVolumeIO = "EnableVolumeIO" // EnableVolumeIORequest generates a request for the EnableVolumeIO operation. -func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *aws.Request, output *EnableVolumeIOOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opEnableVolumeIO == nil { - opEnableVolumeIO = &aws.Operation{ - Name: "EnableVolumeIO", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *request.Request, output *EnableVolumeIOOutput) { + op := &request.Operation{ + Name: opEnableVolumeIO, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &EnableVolumeIOInput{} } - req = c.newRequest(opEnableVolumeIO, input, output) + req = c.newRequest(op, input, output) output = &EnableVolumeIOOutput{} req.Data = output return @@ -5355,26 +4737,54 @@ func (c *EC2) EnableVolumeIO(input *EnableVolumeIOInput) (*EnableVolumeIOOutput, return out, err } -var opEnableVolumeIO *aws.Operation +const opEnableVpcClassicLink = "EnableVpcClassicLink" + +// EnableVpcClassicLinkRequest generates a request for the EnableVpcClassicLink operation. +func (c *EC2) EnableVpcClassicLinkRequest(input *EnableVpcClassicLinkInput) (req *request.Request, output *EnableVpcClassicLinkOutput) { + op := &request.Operation{ + Name: opEnableVpcClassicLink, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableVpcClassicLinkInput{} + } + + req = c.newRequest(op, input, output) + output = &EnableVpcClassicLinkOutput{} + req.Data = output + return +} + +// Enables a VPC for ClassicLink. You can then link EC2-Classic instances to +// your ClassicLink-enabled VPC to allow communication over private IP addresses. +// You cannot enable your VPC for ClassicLink if any of your VPC's route tables +// have existing routes for address ranges within the 10.0.0.0/8 IP address +// range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 +// IP address ranges. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) +// in the Amazon Elastic Compute Cloud User Guide. +func (c *EC2) EnableVpcClassicLink(input *EnableVpcClassicLinkInput) (*EnableVpcClassicLinkOutput, error) { + req, out := c.EnableVpcClassicLinkRequest(input) + err := req.Send() + return out, err +} + +const opGetConsoleOutput = "GetConsoleOutput" // GetConsoleOutputRequest generates a request for the GetConsoleOutput operation. -func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *aws.Request, output *GetConsoleOutputOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opGetConsoleOutput == nil { - opGetConsoleOutput = &aws.Operation{ - Name: "GetConsoleOutput", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *request.Request, output *GetConsoleOutputOutput) { + op := &request.Operation{ + Name: opGetConsoleOutput, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &GetConsoleOutputInput{} } - req = c.newRequest(opGetConsoleOutput, input, output) + req = c.newRequest(op, input, output) output = &GetConsoleOutputOutput{} req.Data = output return @@ -5404,26 +4814,21 @@ func (c *EC2) GetConsoleOutput(input *GetConsoleOutputInput) (*GetConsoleOutputO return out, err } -var opGetConsoleOutput *aws.Operation +const opGetPasswordData = "GetPasswordData" // GetPasswordDataRequest generates a request for the GetPasswordData operation. -func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *aws.Request, output *GetPasswordDataOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opGetPasswordData == nil { - opGetPasswordData = &aws.Operation{ - Name: "GetPasswordData", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request.Request, output *GetPasswordDataOutput) { + op := &request.Operation{ + Name: opGetPasswordData, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &GetPasswordDataInput{} } - req = c.newRequest(opGetPasswordData, input, output) + req = c.newRequest(op, input, output) output = &GetPasswordDataOutput{} req.Data = output return @@ -5449,26 +4854,21 @@ func (c *EC2) GetPasswordData(input *GetPasswordDataInput) (*GetPasswordDataOutp return out, err } -var opGetPasswordData *aws.Operation +const opImportImage = "ImportImage" // ImportImageRequest generates a request for the ImportImage operation. -func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *aws.Request, output *ImportImageOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opImportImage == nil { - opImportImage = &aws.Operation{ - Name: "ImportImage", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request, output *ImportImageOutput) { + op := &request.Operation{ + Name: opImportImage, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ImportImageInput{} } - req = c.newRequest(opImportImage, input, output) + req = c.newRequest(op, input, output) output = &ImportImageOutput{} req.Data = output return @@ -5482,26 +4882,21 @@ func (c *EC2) ImportImage(input *ImportImageInput) (*ImportImageOutput, error) { return out, err } -var opImportImage *aws.Operation +const opImportInstance = "ImportInstance" // ImportInstanceRequest generates a request for the ImportInstance operation. -func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *aws.Request, output *ImportInstanceOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opImportInstance == nil { - opImportInstance = &aws.Operation{ - Name: "ImportInstance", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *request.Request, output *ImportInstanceOutput) { + op := &request.Operation{ + Name: opImportInstance, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ImportInstanceInput{} } - req = c.newRequest(opImportInstance, input, output) + req = c.newRequest(op, input, output) output = &ImportInstanceOutput{} req.Data = output return @@ -5520,26 +4915,21 @@ func (c *EC2) ImportInstance(input *ImportInstanceInput) (*ImportInstanceOutput, return out, err } -var opImportInstance *aws.Operation +const opImportKeyPair = "ImportKeyPair" // ImportKeyPairRequest generates a request for the ImportKeyPair operation. -func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *aws.Request, output *ImportKeyPairOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opImportKeyPair == nil { - opImportKeyPair = &aws.Operation{ - Name: "ImportKeyPair", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) { + op := &request.Operation{ + Name: opImportKeyPair, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ImportKeyPairInput{} } - req = c.newRequest(opImportKeyPair, input, output) + req = c.newRequest(op, input, output) output = &ImportKeyPairOutput{} req.Data = output return @@ -5559,26 +4949,21 @@ func (c *EC2) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, er return out, err } -var opImportKeyPair *aws.Operation +const opImportSnapshot = "ImportSnapshot" // ImportSnapshotRequest generates a request for the ImportSnapshot operation. -func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *aws.Request, output *ImportSnapshotOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opImportSnapshot == nil { - opImportSnapshot = &aws.Operation{ - Name: "ImportSnapshot", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *request.Request, output *ImportSnapshotOutput) { + op := &request.Operation{ + Name: opImportSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ImportSnapshotInput{} } - req = c.newRequest(opImportSnapshot, input, output) + req = c.newRequest(op, input, output) output = &ImportSnapshotOutput{} req.Data = output return @@ -5591,26 +4976,21 @@ func (c *EC2) ImportSnapshot(input *ImportSnapshotInput) (*ImportSnapshotOutput, return out, err } -var opImportSnapshot *aws.Operation +const opImportVolume = "ImportVolume" // ImportVolumeRequest generates a request for the ImportVolume operation. -func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *aws.Request, output *ImportVolumeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opImportVolume == nil { - opImportVolume = &aws.Operation{ - Name: "ImportVolume", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *request.Request, output *ImportVolumeOutput) { + op := &request.Operation{ + Name: opImportVolume, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ImportVolumeInput{} } - req = c.newRequest(opImportVolume, input, output) + req = c.newRequest(op, input, output) output = &ImportVolumeOutput{} req.Data = output return @@ -5628,26 +5008,21 @@ func (c *EC2) ImportVolume(input *ImportVolumeInput) (*ImportVolumeOutput, error return out, err } -var opImportVolume *aws.Operation +const opModifyImageAttribute = "ModifyImageAttribute" // ModifyImageAttributeRequest generates a request for the ModifyImageAttribute operation. -func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req *aws.Request, output *ModifyImageAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifyImageAttribute == nil { - opModifyImageAttribute = &aws.Operation{ - Name: "ModifyImageAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req *request.Request, output *ModifyImageAttributeOutput) { + op := &request.Operation{ + Name: opModifyImageAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ModifyImageAttributeInput{} } - req = c.newRequest(opModifyImageAttribute, input, output) + req = c.newRequest(op, input, output) output = &ModifyImageAttributeOutput{} req.Data = output return @@ -5664,26 +5039,21 @@ func (c *EC2) ModifyImageAttribute(input *ModifyImageAttributeInput) (*ModifyIma return out, err } -var opModifyImageAttribute *aws.Operation +const opModifyInstanceAttribute = "ModifyInstanceAttribute" // ModifyInstanceAttributeRequest generates a request for the ModifyInstanceAttribute operation. -func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput) (req *aws.Request, output *ModifyInstanceAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifyInstanceAttribute == nil { - opModifyInstanceAttribute = &aws.Operation{ - Name: "ModifyInstanceAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput) (req *request.Request, output *ModifyInstanceAttributeOutput) { + op := &request.Operation{ + Name: opModifyInstanceAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ModifyInstanceAttributeInput{} } - req = c.newRequest(opModifyInstanceAttribute, input, output) + req = c.newRequest(op, input, output) output = &ModifyInstanceAttributeOutput{} req.Data = output return @@ -5701,26 +5071,21 @@ func (c *EC2) ModifyInstanceAttribute(input *ModifyInstanceAttributeInput) (*Mod return out, err } -var opModifyInstanceAttribute *aws.Operation +const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute" // ModifyNetworkInterfaceAttributeRequest generates a request for the ModifyNetworkInterfaceAttribute operation. -func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfaceAttributeInput) (req *aws.Request, output *ModifyNetworkInterfaceAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifyNetworkInterfaceAttribute == nil { - opModifyNetworkInterfaceAttribute = &aws.Operation{ - Name: "ModifyNetworkInterfaceAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfaceAttributeInput) (req *request.Request, output *ModifyNetworkInterfaceAttributeOutput) { + op := &request.Operation{ + Name: opModifyNetworkInterfaceAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ModifyNetworkInterfaceAttributeInput{} } - req = c.newRequest(opModifyNetworkInterfaceAttribute, input, output) + req = c.newRequest(op, input, output) output = &ModifyNetworkInterfaceAttributeOutput{} req.Data = output return @@ -5734,26 +5099,21 @@ func (c *EC2) ModifyNetworkInterfaceAttribute(input *ModifyNetworkInterfaceAttri return out, err } -var opModifyNetworkInterfaceAttribute *aws.Operation +const opModifyReservedInstances = "ModifyReservedInstances" // ModifyReservedInstancesRequest generates a request for the ModifyReservedInstances operation. -func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput) (req *aws.Request, output *ModifyReservedInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifyReservedInstances == nil { - opModifyReservedInstances = &aws.Operation{ - Name: "ModifyReservedInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput) (req *request.Request, output *ModifyReservedInstancesOutput) { + op := &request.Operation{ + Name: opModifyReservedInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ModifyReservedInstancesInput{} } - req = c.newRequest(opModifyReservedInstances, input, output) + req = c.newRequest(op, input, output) output = &ModifyReservedInstancesOutput{} req.Data = output return @@ -5772,26 +5132,21 @@ func (c *EC2) ModifyReservedInstances(input *ModifyReservedInstancesInput) (*Mod return out, err } -var opModifyReservedInstances *aws.Operation +const opModifySnapshotAttribute = "ModifySnapshotAttribute" // ModifySnapshotAttributeRequest generates a request for the ModifySnapshotAttribute operation. -func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput) (req *aws.Request, output *ModifySnapshotAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifySnapshotAttribute == nil { - opModifySnapshotAttribute = &aws.Operation{ - Name: "ModifySnapshotAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput) (req *request.Request, output *ModifySnapshotAttributeOutput) { + op := &request.Operation{ + Name: opModifySnapshotAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ModifySnapshotAttributeInput{} } - req = c.newRequest(opModifySnapshotAttribute, input, output) + req = c.newRequest(op, input, output) output = &ModifySnapshotAttributeOutput{} req.Data = output return @@ -5814,26 +5169,21 @@ func (c *EC2) ModifySnapshotAttribute(input *ModifySnapshotAttributeInput) (*Mod return out, err } -var opModifySnapshotAttribute *aws.Operation +const opModifySubnetAttribute = "ModifySubnetAttribute" // ModifySubnetAttributeRequest generates a request for the ModifySubnetAttribute operation. -func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (req *aws.Request, output *ModifySubnetAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifySubnetAttribute == nil { - opModifySubnetAttribute = &aws.Operation{ - Name: "ModifySubnetAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (req *request.Request, output *ModifySubnetAttributeOutput) { + op := &request.Operation{ + Name: opModifySubnetAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ModifySubnetAttributeInput{} } - req = c.newRequest(opModifySubnetAttribute, input, output) + req = c.newRequest(op, input, output) output = &ModifySubnetAttributeOutput{} req.Data = output return @@ -5846,92 +5196,21 @@ func (c *EC2) ModifySubnetAttribute(input *ModifySubnetAttributeInput) (*ModifyS return out, err } -var opModifySubnetAttribute *aws.Operation - -// ModifyVPCAttributeRequest generates a request for the ModifyVPCAttribute operation. -func (c *EC2) ModifyVPCAttributeRequest(input *ModifyVPCAttributeInput) (req *aws.Request, output *ModifyVPCAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifyVPCAttribute == nil { - opModifyVPCAttribute = &aws.Operation{ - Name: "ModifyVpcAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &ModifyVPCAttributeInput{} - } - - req = c.newRequest(opModifyVPCAttribute, input, output) - output = &ModifyVPCAttributeOutput{} - req.Data = output - return -} - -// Modifies the specified attribute of the specified VPC. -func (c *EC2) ModifyVPCAttribute(input *ModifyVPCAttributeInput) (*ModifyVPCAttributeOutput, error) { - req, out := c.ModifyVPCAttributeRequest(input) - err := req.Send() - return out, err -} - -var opModifyVPCAttribute *aws.Operation - -// ModifyVPCEndpointRequest generates a request for the ModifyVPCEndpoint operation. -func (c *EC2) ModifyVPCEndpointRequest(input *ModifyVPCEndpointInput) (req *aws.Request, output *ModifyVPCEndpointOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifyVPCEndpoint == nil { - opModifyVPCEndpoint = &aws.Operation{ - Name: "ModifyVpcEndpoint", - HTTPMethod: "POST", - HTTPPath: "/", - } - } - - if input == nil { - input = &ModifyVPCEndpointInput{} - } - - req = c.newRequest(opModifyVPCEndpoint, input, output) - output = &ModifyVPCEndpointOutput{} - req.Data = output - return -} - -// Modifies attributes of a specified VPC endpoint. You can modify the policy -// associated with the endpoint, and you can add and remove route tables associated -// with the endpoint. -func (c *EC2) ModifyVPCEndpoint(input *ModifyVPCEndpointInput) (*ModifyVPCEndpointOutput, error) { - req, out := c.ModifyVPCEndpointRequest(input) - err := req.Send() - return out, err -} - -var opModifyVPCEndpoint *aws.Operation +const opModifyVolumeAttribute = "ModifyVolumeAttribute" // ModifyVolumeAttributeRequest generates a request for the ModifyVolumeAttribute operation. -func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (req *aws.Request, output *ModifyVolumeAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifyVolumeAttribute == nil { - opModifyVolumeAttribute = &aws.Operation{ - Name: "ModifyVolumeAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (req *request.Request, output *ModifyVolumeAttributeOutput) { + op := &request.Operation{ + Name: opModifyVolumeAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ModifyVolumeAttributeInput{} } - req = c.newRequest(opModifyVolumeAttribute, input, output) + req = c.newRequest(op, input, output) output = &ModifyVolumeAttributeOutput{} req.Data = output return @@ -5953,26 +5232,77 @@ func (c *EC2) ModifyVolumeAttribute(input *ModifyVolumeAttributeInput) (*ModifyV return out, err } -var opModifyVolumeAttribute *aws.Operation +const opModifyVpcAttribute = "ModifyVpcAttribute" + +// ModifyVpcAttributeRequest generates a request for the ModifyVpcAttribute operation. +func (c *EC2) ModifyVpcAttributeRequest(input *ModifyVpcAttributeInput) (req *request.Request, output *ModifyVpcAttributeOutput) { + op := &request.Operation{ + Name: opModifyVpcAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyVpcAttributeInput{} + } + + req = c.newRequest(op, input, output) + output = &ModifyVpcAttributeOutput{} + req.Data = output + return +} + +// Modifies the specified attribute of the specified VPC. +func (c *EC2) ModifyVpcAttribute(input *ModifyVpcAttributeInput) (*ModifyVpcAttributeOutput, error) { + req, out := c.ModifyVpcAttributeRequest(input) + err := req.Send() + return out, err +} + +const opModifyVpcEndpoint = "ModifyVpcEndpoint" + +// ModifyVpcEndpointRequest generates a request for the ModifyVpcEndpoint operation. +func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *request.Request, output *ModifyVpcEndpointOutput) { + op := &request.Operation{ + Name: opModifyVpcEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyVpcEndpointInput{} + } + + req = c.newRequest(op, input, output) + output = &ModifyVpcEndpointOutput{} + req.Data = output + return +} + +// Modifies attributes of a specified VPC endpoint. You can modify the policy +// associated with the endpoint, and you can add and remove route tables associated +// with the endpoint. +func (c *EC2) ModifyVpcEndpoint(input *ModifyVpcEndpointInput) (*ModifyVpcEndpointOutput, error) { + req, out := c.ModifyVpcEndpointRequest(input) + err := req.Send() + return out, err +} + +const opMonitorInstances = "MonitorInstances" // MonitorInstancesRequest generates a request for the MonitorInstances operation. -func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *aws.Request, output *MonitorInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opMonitorInstances == nil { - opMonitorInstances = &aws.Operation{ - Name: "MonitorInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *request.Request, output *MonitorInstancesOutput) { + op := &request.Operation{ + Name: opMonitorInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &MonitorInstancesInput{} } - req = c.newRequest(opMonitorInstances, input, output) + req = c.newRequest(op, input, output) output = &MonitorInstancesOutput{} req.Data = output return @@ -5987,27 +5317,22 @@ func (c *EC2) MonitorInstances(input *MonitorInstancesInput) (*MonitorInstancesO return out, err } -var opMonitorInstances *aws.Operation +const opMoveAddressToVpc = "MoveAddressToVpc" -// MoveAddressToVPCRequest generates a request for the MoveAddressToVPC operation. -func (c *EC2) MoveAddressToVPCRequest(input *MoveAddressToVPCInput) (req *aws.Request, output *MoveAddressToVPCOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opMoveAddressToVPC == nil { - opMoveAddressToVPC = &aws.Operation{ - Name: "MoveAddressToVpc", - HTTPMethod: "POST", - HTTPPath: "/", - } +// MoveAddressToVpcRequest generates a request for the MoveAddressToVpc operation. +func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *request.Request, output *MoveAddressToVpcOutput) { + op := &request.Operation{ + Name: opMoveAddressToVpc, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &MoveAddressToVPCInput{} + input = &MoveAddressToVpcInput{} } - req = c.newRequest(opMoveAddressToVPC, input, output) - output = &MoveAddressToVPCOutput{} + req = c.newRequest(op, input, output) + output = &MoveAddressToVpcOutput{} req.Data = output return } @@ -6019,32 +5344,27 @@ func (c *EC2) MoveAddressToVPCRequest(input *MoveAddressToVPCInput) (req *aws.Re // you move it back using the RestoreAddressToClassic request. You cannot move // an Elastic IP address that's allocated for use in the EC2-VPC platform to // the EC2-Classic platform. -func (c *EC2) MoveAddressToVPC(input *MoveAddressToVPCInput) (*MoveAddressToVPCOutput, error) { - req, out := c.MoveAddressToVPCRequest(input) +func (c *EC2) MoveAddressToVpc(input *MoveAddressToVpcInput) (*MoveAddressToVpcOutput, error) { + req, out := c.MoveAddressToVpcRequest(input) err := req.Send() return out, err } -var opMoveAddressToVPC *aws.Operation +const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering" // PurchaseReservedInstancesOfferingRequest generates a request for the PurchaseReservedInstancesOffering operation. -func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedInstancesOfferingInput) (req *aws.Request, output *PurchaseReservedInstancesOfferingOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opPurchaseReservedInstancesOffering == nil { - opPurchaseReservedInstancesOffering = &aws.Operation{ - Name: "PurchaseReservedInstancesOffering", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedInstancesOfferingInput) (req *request.Request, output *PurchaseReservedInstancesOfferingOutput) { + op := &request.Operation{ + Name: opPurchaseReservedInstancesOffering, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &PurchaseReservedInstancesOfferingInput{} } - req = c.newRequest(opPurchaseReservedInstancesOffering, input, output) + req = c.newRequest(op, input, output) output = &PurchaseReservedInstancesOfferingOutput{} req.Data = output return @@ -6052,9 +5372,8 @@ func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedIn // Purchases a Reserved Instance for use with your account. With Amazon EC2 // Reserved Instances, you obtain a capacity reservation for a certain instance -// configuration over a specified period of time. You pay a lower usage rate -// than with On-Demand instances for the time that you actually use the capacity -// reservation. +// configuration over a specified period of time and pay a lower hourly rate +// compared to on-Demand Instance pricing. // // Use DescribeReservedInstancesOfferings to get a list of Reserved Instance // offerings that match your specifications. After you've purchased a Reserved @@ -6069,26 +5388,21 @@ func (c *EC2) PurchaseReservedInstancesOffering(input *PurchaseReservedInstances return out, err } -var opPurchaseReservedInstancesOffering *aws.Operation +const opRebootInstances = "RebootInstances" // RebootInstancesRequest generates a request for the RebootInstances operation. -func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *aws.Request, output *RebootInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRebootInstances == nil { - opRebootInstances = &aws.Operation{ - Name: "RebootInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request.Request, output *RebootInstancesOutput) { + op := &request.Operation{ + Name: opRebootInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RebootInstancesInput{} } - req = c.newRequest(opRebootInstances, input, output) + req = c.newRequest(op, input, output) output = &RebootInstancesOutput{} req.Data = output return @@ -6111,26 +5425,21 @@ func (c *EC2) RebootInstances(input *RebootInstancesInput) (*RebootInstancesOutp return out, err } -var opRebootInstances *aws.Operation +const opRegisterImage = "RegisterImage" // RegisterImageRequest generates a request for the RegisterImage operation. -func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *aws.Request, output *RegisterImageOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRegisterImage == nil { - opRegisterImage = &aws.Operation{ - Name: "RegisterImage", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Request, output *RegisterImageOutput) { + op := &request.Operation{ + Name: opRegisterImage, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RegisterImageInput{} } - req = c.newRequest(opRegisterImage, input, output) + req = c.newRequest(op, input, output) output = &RegisterImageOutput{} req.Data = output return @@ -6144,12 +5453,25 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *aws.Request, // For Amazon EBS-backed instances, CreateImage creates and registers the AMI // in a single request, so you don't have to register the AMI yourself. // -// You can also use RegisterImage to create an Amazon EBS-backed AMI from a -// snapshot of a root device volume. For more information, see Launching an -// Instance from a Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_LaunchingInstanceFromSnapshot.html) +// You can also use RegisterImage to create an Amazon EBS-backed Linux AMI +// from a snapshot of a root device volume. For more information, see Launching +// an Instance from a Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_LaunchingInstanceFromSnapshot.html) // in the Amazon Elastic Compute Cloud User Guide. // -// If needed, you can deregister an AMI at any time. Any modifications you +// Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE +// Linux Enterprise Server (SLES), use the EC2 billingProduct code associated +// with an AMI to verify subscription status for package updates. Creating an +// AMI from an EBS snapshot does not maintain this billing code, and subsequent +// instances launched from such an AMI will not be able to connect to package +// update infrastructure. +// +// Similarly, although you can create a Windows AMI from a snapshot, you can't +// successfully launch an instance from the AMI. +// +// To create Windows AMIs or to create AMIs for Linux operating systems that +// must retain AMI billing codes to work properly, see CreateImage. +// +// If needed, you can deregister an AMI at any time. Any modifications you // make to an AMI backed by an instance store volume invalidates its registration. // If you make changes to an image, deregister the previous image and register // the new image. @@ -6162,27 +5484,22 @@ func (c *EC2) RegisterImage(input *RegisterImageInput) (*RegisterImageOutput, er return out, err } -var opRegisterImage *aws.Operation +const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection" -// RejectVPCPeeringConnectionRequest generates a request for the RejectVPCPeeringConnection operation. -func (c *EC2) RejectVPCPeeringConnectionRequest(input *RejectVPCPeeringConnectionInput) (req *aws.Request, output *RejectVPCPeeringConnectionOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRejectVPCPeeringConnection == nil { - opRejectVPCPeeringConnection = &aws.Operation{ - Name: "RejectVpcPeeringConnection", - HTTPMethod: "POST", - HTTPPath: "/", - } +// RejectVpcPeeringConnectionRequest generates a request for the RejectVpcPeeringConnection operation. +func (c *EC2) RejectVpcPeeringConnectionRequest(input *RejectVpcPeeringConnectionInput) (req *request.Request, output *RejectVpcPeeringConnectionOutput) { + op := &request.Operation{ + Name: opRejectVpcPeeringConnection, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &RejectVPCPeeringConnectionInput{} + input = &RejectVpcPeeringConnectionInput{} } - req = c.newRequest(opRejectVPCPeeringConnection, input, output) - output = &RejectVPCPeeringConnectionOutput{} + req = c.newRequest(op, input, output) + output = &RejectVpcPeeringConnectionOutput{} req.Data = output return } @@ -6192,32 +5509,27 @@ func (c *EC2) RejectVPCPeeringConnectionRequest(input *RejectVPCPeeringConnectio // request to view your outstanding VPC peering connection requests. To delete // an active VPC peering connection, or to delete a VPC peering connection request // that you initiated, use DeleteVpcPeeringConnection. -func (c *EC2) RejectVPCPeeringConnection(input *RejectVPCPeeringConnectionInput) (*RejectVPCPeeringConnectionOutput, error) { - req, out := c.RejectVPCPeeringConnectionRequest(input) +func (c *EC2) RejectVpcPeeringConnection(input *RejectVpcPeeringConnectionInput) (*RejectVpcPeeringConnectionOutput, error) { + req, out := c.RejectVpcPeeringConnectionRequest(input) err := req.Send() return out, err } -var opRejectVPCPeeringConnection *aws.Operation +const opReleaseAddress = "ReleaseAddress" // ReleaseAddressRequest generates a request for the ReleaseAddress operation. -func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *aws.Request, output *ReleaseAddressOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opReleaseAddress == nil { - opReleaseAddress = &aws.Operation{ - Name: "ReleaseAddress", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Request, output *ReleaseAddressOutput) { + op := &request.Operation{ + Name: opReleaseAddress, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ReleaseAddressInput{} } - req = c.newRequest(opReleaseAddress, input, output) + req = c.newRequest(op, input, output) output = &ReleaseAddressOutput{} req.Data = output return @@ -6244,27 +5556,22 @@ func (c *EC2) ReleaseAddress(input *ReleaseAddressInput) (*ReleaseAddressOutput, return out, err } -var opReleaseAddress *aws.Operation +const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation" -// ReplaceNetworkACLAssociationRequest generates a request for the ReplaceNetworkACLAssociation operation. -func (c *EC2) ReplaceNetworkACLAssociationRequest(input *ReplaceNetworkACLAssociationInput) (req *aws.Request, output *ReplaceNetworkACLAssociationOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opReplaceNetworkACLAssociation == nil { - opReplaceNetworkACLAssociation = &aws.Operation{ - Name: "ReplaceNetworkAclAssociation", - HTTPMethod: "POST", - HTTPPath: "/", - } +// ReplaceNetworkAclAssociationRequest generates a request for the ReplaceNetworkAclAssociation operation. +func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssociationInput) (req *request.Request, output *ReplaceNetworkAclAssociationOutput) { + op := &request.Operation{ + Name: opReplaceNetworkAclAssociation, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &ReplaceNetworkACLAssociationInput{} + input = &ReplaceNetworkAclAssociationInput{} } - req = c.newRequest(opReplaceNetworkACLAssociation, input, output) - output = &ReplaceNetworkACLAssociationOutput{} + req = c.newRequest(op, input, output) + output = &ReplaceNetworkAclAssociationOutput{} req.Data = output return } @@ -6273,33 +5580,28 @@ func (c *EC2) ReplaceNetworkACLAssociationRequest(input *ReplaceNetworkACLAssoci // create a subnet, it's automatically associated with the default network ACL. // For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) ReplaceNetworkACLAssociation(input *ReplaceNetworkACLAssociationInput) (*ReplaceNetworkACLAssociationOutput, error) { - req, out := c.ReplaceNetworkACLAssociationRequest(input) +func (c *EC2) ReplaceNetworkAclAssociation(input *ReplaceNetworkAclAssociationInput) (*ReplaceNetworkAclAssociationOutput, error) { + req, out := c.ReplaceNetworkAclAssociationRequest(input) err := req.Send() return out, err } -var opReplaceNetworkACLAssociation *aws.Operation +const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry" -// ReplaceNetworkACLEntryRequest generates a request for the ReplaceNetworkACLEntry operation. -func (c *EC2) ReplaceNetworkACLEntryRequest(input *ReplaceNetworkACLEntryInput) (req *aws.Request, output *ReplaceNetworkACLEntryOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opReplaceNetworkACLEntry == nil { - opReplaceNetworkACLEntry = &aws.Operation{ - Name: "ReplaceNetworkAclEntry", - HTTPMethod: "POST", - HTTPPath: "/", - } +// ReplaceNetworkAclEntryRequest generates a request for the ReplaceNetworkAclEntry operation. +func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput) (req *request.Request, output *ReplaceNetworkAclEntryOutput) { + op := &request.Operation{ + Name: opReplaceNetworkAclEntry, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &ReplaceNetworkACLEntryInput{} + input = &ReplaceNetworkAclEntryInput{} } - req = c.newRequest(opReplaceNetworkACLEntry, input, output) - output = &ReplaceNetworkACLEntryOutput{} + req = c.newRequest(op, input, output) + output = &ReplaceNetworkAclEntryOutput{} req.Data = output return } @@ -6307,32 +5609,27 @@ func (c *EC2) ReplaceNetworkACLEntryRequest(input *ReplaceNetworkACLEntryInput) // Replaces an entry (rule) in a network ACL. For more information about network // ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html) // in the Amazon Virtual Private Cloud User Guide. -func (c *EC2) ReplaceNetworkACLEntry(input *ReplaceNetworkACLEntryInput) (*ReplaceNetworkACLEntryOutput, error) { - req, out := c.ReplaceNetworkACLEntryRequest(input) +func (c *EC2) ReplaceNetworkAclEntry(input *ReplaceNetworkAclEntryInput) (*ReplaceNetworkAclEntryOutput, error) { + req, out := c.ReplaceNetworkAclEntryRequest(input) err := req.Send() return out, err } -var opReplaceNetworkACLEntry *aws.Operation +const opReplaceRoute = "ReplaceRoute" // ReplaceRouteRequest generates a request for the ReplaceRoute operation. -func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *aws.Request, output *ReplaceRouteOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opReplaceRoute == nil { - opReplaceRoute = &aws.Operation{ - Name: "ReplaceRoute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Request, output *ReplaceRouteOutput) { + op := &request.Operation{ + Name: opReplaceRoute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ReplaceRouteInput{} } - req = c.newRequest(opReplaceRoute, input, output) + req = c.newRequest(op, input, output) output = &ReplaceRouteOutput{} req.Data = output return @@ -6350,26 +5647,21 @@ func (c *EC2) ReplaceRoute(input *ReplaceRouteInput) (*ReplaceRouteOutput, error return out, err } -var opReplaceRoute *aws.Operation +const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation" // ReplaceRouteTableAssociationRequest generates a request for the ReplaceRouteTableAssociation operation. -func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssociationInput) (req *aws.Request, output *ReplaceRouteTableAssociationOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opReplaceRouteTableAssociation == nil { - opReplaceRouteTableAssociation = &aws.Operation{ - Name: "ReplaceRouteTableAssociation", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssociationInput) (req *request.Request, output *ReplaceRouteTableAssociationOutput) { + op := &request.Operation{ + Name: opReplaceRouteTableAssociation, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ReplaceRouteTableAssociationInput{} } - req = c.newRequest(opReplaceRouteTableAssociation, input, output) + req = c.newRequest(op, input, output) output = &ReplaceRouteTableAssociationOutput{} req.Data = output return @@ -6390,26 +5682,21 @@ func (c *EC2) ReplaceRouteTableAssociation(input *ReplaceRouteTableAssociationIn return out, err } -var opReplaceRouteTableAssociation *aws.Operation +const opReportInstanceStatus = "ReportInstanceStatus" // ReportInstanceStatusRequest generates a request for the ReportInstanceStatus operation. -func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req *aws.Request, output *ReportInstanceStatusOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opReportInstanceStatus == nil { - opReportInstanceStatus = &aws.Operation{ - Name: "ReportInstanceStatus", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req *request.Request, output *ReportInstanceStatusOutput) { + op := &request.Operation{ + Name: opReportInstanceStatus, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ReportInstanceStatusInput{} } - req = c.newRequest(opReportInstanceStatus, input, output) + req = c.newRequest(op, input, output) output = &ReportInstanceStatusOutput{} req.Data = output return @@ -6428,26 +5715,21 @@ func (c *EC2) ReportInstanceStatus(input *ReportInstanceStatusInput) (*ReportIns return out, err } -var opReportInstanceStatus *aws.Operation +const opRequestSpotFleet = "RequestSpotFleet" // RequestSpotFleetRequest generates a request for the RequestSpotFleet operation. -func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *aws.Request, output *RequestSpotFleetOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRequestSpotFleet == nil { - opRequestSpotFleet = &aws.Operation{ - Name: "RequestSpotFleet", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *request.Request, output *RequestSpotFleetOutput) { + op := &request.Operation{ + Name: opRequestSpotFleet, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RequestSpotFleetInput{} } - req = c.newRequest(opRequestSpotFleet, input, output) + req = c.newRequest(op, input, output) output = &RequestSpotFleetOutput{} req.Data = output return @@ -6455,7 +5737,20 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *aws.Re // Creates a Spot fleet request. // -// For more information, see Spot Fleets (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet.html) +// You can submit a single request that includes multiple launch specifications +// that vary by instance type, AMI, Availability Zone, or subnet. +// +// By default, the Spot fleet requests Spot instances in the Spot pool where +// the price per unit is the lowest. Each launch specification can include its +// own instance weighting that reflects the value of the instance type to your +// application workload. +// +// Alternatively, you can specify that the Spot fleet distribute the target +// capacity across the Spot pools included in its launch specifications. By +// ensuring that the Spot instances in your Spot fleet are in different Spot +// pools, you can improve the availability of your fleet. +// +// For more information, see Spot Fleet Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html) // in the Amazon Elastic Compute Cloud User Guide. func (c *EC2) RequestSpotFleet(input *RequestSpotFleetInput) (*RequestSpotFleetOutput, error) { req, out := c.RequestSpotFleetRequest(input) @@ -6463,35 +5758,30 @@ func (c *EC2) RequestSpotFleet(input *RequestSpotFleetInput) (*RequestSpotFleetO return out, err } -var opRequestSpotFleet *aws.Operation +const opRequestSpotInstances = "RequestSpotInstances" // RequestSpotInstancesRequest generates a request for the RequestSpotInstances operation. -func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req *aws.Request, output *RequestSpotInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRequestSpotInstances == nil { - opRequestSpotInstances = &aws.Operation{ - Name: "RequestSpotInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req *request.Request, output *RequestSpotInstancesOutput) { + op := &request.Operation{ + Name: opRequestSpotInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RequestSpotInstancesInput{} } - req = c.newRequest(opRequestSpotInstances, input, output) + req = c.newRequest(op, input, output) output = &RequestSpotInstancesOutput{} req.Data = output return } -// Creates a Spot Instance request. Spot Instances are instances that Amazon +// Creates a Spot instance request. Spot instances are instances that Amazon // EC2 launches when the bid price that you specify exceeds the current Spot -// Price. Amazon EC2 periodically sets the Spot Price based on available Spot -// Instance capacity and current Spot Instance requests. For more information, +// price. Amazon EC2 periodically sets the Spot price based on available Spot +// Instance capacity and current Spot instance requests. For more information, // see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) // in the Amazon Elastic Compute Cloud User Guide. func (c *EC2) RequestSpotInstances(input *RequestSpotInstancesInput) (*RequestSpotInstancesOutput, error) { @@ -6500,26 +5790,21 @@ func (c *EC2) RequestSpotInstances(input *RequestSpotInstancesInput) (*RequestSp return out, err } -var opRequestSpotInstances *aws.Operation +const opResetImageAttribute = "ResetImageAttribute" // ResetImageAttributeRequest generates a request for the ResetImageAttribute operation. -func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *aws.Request, output *ResetImageAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opResetImageAttribute == nil { - opResetImageAttribute = &aws.Operation{ - Name: "ResetImageAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *request.Request, output *ResetImageAttributeOutput) { + op := &request.Operation{ + Name: opResetImageAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ResetImageAttributeInput{} } - req = c.newRequest(opResetImageAttribute, input, output) + req = c.newRequest(op, input, output) output = &ResetImageAttributeOutput{} req.Data = output return @@ -6534,26 +5819,21 @@ func (c *EC2) ResetImageAttribute(input *ResetImageAttributeInput) (*ResetImageA return out, err } -var opResetImageAttribute *aws.Operation +const opResetInstanceAttribute = "ResetInstanceAttribute" // ResetInstanceAttributeRequest generates a request for the ResetInstanceAttribute operation. -func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput) (req *aws.Request, output *ResetInstanceAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opResetInstanceAttribute == nil { - opResetInstanceAttribute = &aws.Operation{ - Name: "ResetInstanceAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput) (req *request.Request, output *ResetInstanceAttributeOutput) { + op := &request.Operation{ + Name: opResetInstanceAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ResetInstanceAttributeInput{} } - req = c.newRequest(opResetInstanceAttribute, input, output) + req = c.newRequest(op, input, output) output = &ResetInstanceAttributeOutput{} req.Data = output return @@ -6574,26 +5854,21 @@ func (c *EC2) ResetInstanceAttribute(input *ResetInstanceAttributeInput) (*Reset return out, err } -var opResetInstanceAttribute *aws.Operation +const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute" // ResetNetworkInterfaceAttributeRequest generates a request for the ResetNetworkInterfaceAttribute operation. -func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterfaceAttributeInput) (req *aws.Request, output *ResetNetworkInterfaceAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opResetNetworkInterfaceAttribute == nil { - opResetNetworkInterfaceAttribute = &aws.Operation{ - Name: "ResetNetworkInterfaceAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterfaceAttributeInput) (req *request.Request, output *ResetNetworkInterfaceAttributeOutput) { + op := &request.Operation{ + Name: opResetNetworkInterfaceAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ResetNetworkInterfaceAttributeInput{} } - req = c.newRequest(opResetNetworkInterfaceAttribute, input, output) + req = c.newRequest(op, input, output) output = &ResetNetworkInterfaceAttributeOutput{} req.Data = output return @@ -6607,26 +5882,21 @@ func (c *EC2) ResetNetworkInterfaceAttribute(input *ResetNetworkInterfaceAttribu return out, err } -var opResetNetworkInterfaceAttribute *aws.Operation +const opResetSnapshotAttribute = "ResetSnapshotAttribute" // ResetSnapshotAttributeRequest generates a request for the ResetSnapshotAttribute operation. -func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) (req *aws.Request, output *ResetSnapshotAttributeOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opResetSnapshotAttribute == nil { - opResetSnapshotAttribute = &aws.Operation{ - Name: "ResetSnapshotAttribute", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) (req *request.Request, output *ResetSnapshotAttributeOutput) { + op := &request.Operation{ + Name: opResetSnapshotAttribute, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ResetSnapshotAttributeInput{} } - req = c.newRequest(opResetSnapshotAttribute, input, output) + req = c.newRequest(op, input, output) output = &ResetSnapshotAttributeOutput{} req.Data = output return @@ -6643,26 +5913,21 @@ func (c *EC2) ResetSnapshotAttribute(input *ResetSnapshotAttributeInput) (*Reset return out, err } -var opResetSnapshotAttribute *aws.Operation +const opRestoreAddressToClassic = "RestoreAddressToClassic" // RestoreAddressToClassicRequest generates a request for the RestoreAddressToClassic operation. -func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput) (req *aws.Request, output *RestoreAddressToClassicOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRestoreAddressToClassic == nil { - opRestoreAddressToClassic = &aws.Operation{ - Name: "RestoreAddressToClassic", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput) (req *request.Request, output *RestoreAddressToClassicOutput) { + op := &request.Operation{ + Name: opRestoreAddressToClassic, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RestoreAddressToClassicInput{} } - req = c.newRequest(opRestoreAddressToClassic, input, output) + req = c.newRequest(op, input, output) output = &RestoreAddressToClassicOutput{} req.Data = output return @@ -6678,26 +5943,21 @@ func (c *EC2) RestoreAddressToClassic(input *RestoreAddressToClassicInput) (*Res return out, err } -var opRestoreAddressToClassic *aws.Operation +const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress" // RevokeSecurityGroupEgressRequest generates a request for the RevokeSecurityGroupEgress operation. -func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressInput) (req *aws.Request, output *RevokeSecurityGroupEgressOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRevokeSecurityGroupEgress == nil { - opRevokeSecurityGroupEgress = &aws.Operation{ - Name: "RevokeSecurityGroupEgress", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressInput) (req *request.Request, output *RevokeSecurityGroupEgressOutput) { + op := &request.Operation{ + Name: opRevokeSecurityGroupEgress, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RevokeSecurityGroupEgressInput{} } - req = c.newRequest(opRevokeSecurityGroupEgress, input, output) + req = c.newRequest(op, input, output) output = &RevokeSecurityGroupEgressOutput{} req.Data = output return @@ -6720,26 +5980,21 @@ func (c *EC2) RevokeSecurityGroupEgress(input *RevokeSecurityGroupEgressInput) ( return out, err } -var opRevokeSecurityGroupEgress *aws.Operation +const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress" // RevokeSecurityGroupIngressRequest generates a request for the RevokeSecurityGroupIngress operation. -func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngressInput) (req *aws.Request, output *RevokeSecurityGroupIngressOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRevokeSecurityGroupIngress == nil { - opRevokeSecurityGroupIngress = &aws.Operation{ - Name: "RevokeSecurityGroupIngress", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngressInput) (req *request.Request, output *RevokeSecurityGroupIngressOutput) { + op := &request.Operation{ + Name: opRevokeSecurityGroupIngress, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RevokeSecurityGroupIngressInput{} } - req = c.newRequest(opRevokeSecurityGroupIngress, input, output) + req = c.newRequest(op, input, output) output = &RevokeSecurityGroupIngressOutput{} req.Data = output return @@ -6762,26 +6017,21 @@ func (c *EC2) RevokeSecurityGroupIngress(input *RevokeSecurityGroupIngressInput) return out, err } -var opRevokeSecurityGroupIngress *aws.Operation +const opRunInstances = "RunInstances" // RunInstancesRequest generates a request for the RunInstances operation. -func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *aws.Request, output *Reservation) { - oprw.Lock() - defer oprw.Unlock() - - if opRunInstances == nil { - opRunInstances = &aws.Operation{ - Name: "RunInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Request, output *Reservation) { + op := &request.Operation{ + Name: opRunInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RunInstancesInput{} } - req = c.newRequest(opRunInstances, input, output) + req = c.newRequest(op, input, output) output = &Reservation{} req.Data = output return @@ -6799,6 +6049,12 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *aws.Request, o // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) // in the Amazon Elastic Compute Cloud User Guide. // +// [EC2-VPC only accounts] If you don't specify a subnet in the request, we +// choose a default subnet from your default VPC for you. +// +// [EC2-Classic accounts] If you're launching into EC2-Classic and you don't +// specify an Availability Zone, we choose one for you. +// // Linux instances have access to the public key of the key pair at boot. You // can use this key to provide secure access to the instance. Amazon EC2 public // images use this feature to provide secure access without passwords. For more @@ -6826,26 +6082,21 @@ func (c *EC2) RunInstances(input *RunInstancesInput) (*Reservation, error) { return out, err } -var opRunInstances *aws.Operation +const opStartInstances = "StartInstances" // StartInstancesRequest generates a request for the StartInstances operation. -func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *aws.Request, output *StartInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opStartInstances == nil { - opStartInstances = &aws.Operation{ - Name: "StartInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Request, output *StartInstancesOutput) { + op := &request.Operation{ + Name: opStartInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &StartInstancesInput{} } - req = c.newRequest(opStartInstances, input, output) + req = c.newRequest(op, input, output) output = &StartInstancesOutput{} req.Data = output return @@ -6876,26 +6127,21 @@ func (c *EC2) StartInstances(input *StartInstancesInput) (*StartInstancesOutput, return out, err } -var opStartInstances *aws.Operation +const opStopInstances = "StopInstances" // StopInstancesRequest generates a request for the StopInstances operation. -func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *aws.Request, output *StopInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opStopInstances == nil { - opStopInstances = &aws.Operation{ - Name: "StopInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Request, output *StopInstancesOutput) { + op := &request.Operation{ + Name: opStopInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &StopInstancesInput{} } - req = c.newRequest(opStopInstances, input, output) + req = c.newRequest(op, input, output) output = &StopInstancesOutput{} req.Data = output return @@ -6938,26 +6184,21 @@ func (c *EC2) StopInstances(input *StopInstancesInput) (*StopInstancesOutput, er return out, err } -var opStopInstances *aws.Operation +const opTerminateInstances = "TerminateInstances" // TerminateInstancesRequest generates a request for the TerminateInstances operation. -func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *aws.Request, output *TerminateInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opTerminateInstances == nil { - opTerminateInstances = &aws.Operation{ - Name: "TerminateInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *request.Request, output *TerminateInstancesOutput) { + op := &request.Operation{ + Name: opTerminateInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &TerminateInstancesInput{} } - req = c.newRequest(opTerminateInstances, input, output) + req = c.newRequest(op, input, output) output = &TerminateInstancesOutput{} req.Data = output return @@ -6976,9 +6217,10 @@ func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *aw // instance store-backed instances. What happens to an instance differs if you // stop it or terminate it. For example, when you stop an instance, the root // device and any other devices attached to the instance persist. When you terminate -// an instance, the root device and any other devices attached during the instance -// launch are automatically deleted. For more information about the differences -// between stopping and terminating instances, see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) +// an instance, any attached EBS volumes with the DeleteOnTermination block +// device mapping parameter set to true are automatically deleted. For more +// information about the differences between stopping and terminating instances, +// see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) // in the Amazon Elastic Compute Cloud User Guide. // // For more information about troubleshooting, see Troubleshooting Terminating @@ -6990,58 +6232,48 @@ func (c *EC2) TerminateInstances(input *TerminateInstancesInput) (*TerminateInst return out, err } -var opTerminateInstances *aws.Operation +const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses" -// UnassignPrivateIPAddressesRequest generates a request for the UnassignPrivateIPAddresses operation. -func (c *EC2) UnassignPrivateIPAddressesRequest(input *UnassignPrivateIPAddressesInput) (req *aws.Request, output *UnassignPrivateIPAddressesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opUnassignPrivateIPAddresses == nil { - opUnassignPrivateIPAddresses = &aws.Operation{ - Name: "UnassignPrivateIpAddresses", - HTTPMethod: "POST", - HTTPPath: "/", - } +// UnassignPrivateIpAddressesRequest generates a request for the UnassignPrivateIpAddresses operation. +func (c *EC2) UnassignPrivateIpAddressesRequest(input *UnassignPrivateIpAddressesInput) (req *request.Request, output *UnassignPrivateIpAddressesOutput) { + op := &request.Operation{ + Name: opUnassignPrivateIpAddresses, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { - input = &UnassignPrivateIPAddressesInput{} + input = &UnassignPrivateIpAddressesInput{} } - req = c.newRequest(opUnassignPrivateIPAddresses, input, output) - output = &UnassignPrivateIPAddressesOutput{} + req = c.newRequest(op, input, output) + output = &UnassignPrivateIpAddressesOutput{} req.Data = output return } // Unassigns one or more secondary private IP addresses from a network interface. -func (c *EC2) UnassignPrivateIPAddresses(input *UnassignPrivateIPAddressesInput) (*UnassignPrivateIPAddressesOutput, error) { - req, out := c.UnassignPrivateIPAddressesRequest(input) +func (c *EC2) UnassignPrivateIpAddresses(input *UnassignPrivateIpAddressesInput) (*UnassignPrivateIpAddressesOutput, error) { + req, out := c.UnassignPrivateIpAddressesRequest(input) err := req.Send() return out, err } -var opUnassignPrivateIPAddresses *aws.Operation +const opUnmonitorInstances = "UnmonitorInstances" // UnmonitorInstancesRequest generates a request for the UnmonitorInstances operation. -func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *aws.Request, output *UnmonitorInstancesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opUnmonitorInstances == nil { - opUnmonitorInstances = &aws.Operation{ - Name: "UnmonitorInstances", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *request.Request, output *UnmonitorInstancesOutput) { + op := &request.Operation{ + Name: opUnmonitorInstances, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &UnmonitorInstancesInput{} } - req = c.newRequest(opUnmonitorInstances, input, output) + req = c.newRequest(op, input, output) output = &UnmonitorInstancesOutput{} req.Data = output return @@ -7056,9 +6288,7 @@ func (c *EC2) UnmonitorInstances(input *UnmonitorInstancesInput) (*UnmonitorInst return out, err } -var opUnmonitorInstances *aws.Operation - -type AcceptVPCPeeringConnectionInput struct { +type AcceptVpcPeeringConnectionInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -7066,26 +6296,46 @@ type AcceptVPCPeeringConnectionInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the VPC peering connection. - VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"` + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` - metadataAcceptVPCPeeringConnectionInput `json:"-" xml:"-"` + metadataAcceptVpcPeeringConnectionInput `json:"-" xml:"-"` } -type metadataAcceptVPCPeeringConnectionInput struct { +type metadataAcceptVpcPeeringConnectionInput struct { SDKShapeTraits bool `type:"structure"` } -type AcceptVPCPeeringConnectionOutput struct { +// String returns the string representation +func (s AcceptVpcPeeringConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptVpcPeeringConnectionInput) GoString() string { + return s.String() +} + +type AcceptVpcPeeringConnectionOutput struct { // Information about the VPC peering connection. - VPCPeeringConnection *VPCPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"` + VpcPeeringConnection *VpcPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"` - metadataAcceptVPCPeeringConnectionOutput `json:"-" xml:"-"` + metadataAcceptVpcPeeringConnectionOutput `json:"-" xml:"-"` } -type metadataAcceptVPCPeeringConnectionOutput struct { +type metadataAcceptVpcPeeringConnectionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AcceptVpcPeeringConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptVpcPeeringConnectionOutput) GoString() string { + return s.String() +} + // Describes an account attribute. type AccountAttribute struct { // The name of the account attribute. @@ -7101,6 +6351,16 @@ type metadataAccountAttribute struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AccountAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountAttribute) GoString() string { + return s.String() +} + // Describes a value of an account attribute. type AccountAttributeValue struct { // The value of the attribute. @@ -7113,16 +6373,26 @@ type metadataAccountAttributeValue struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AccountAttributeValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountAttributeValue) GoString() string { + return s.String() +} + // Describes a running instance in a Spot fleet. type ActiveInstance struct { // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The instance type. InstanceType *string `locationName:"instanceType" type:"string"` - // The ID of the Spot Instance request. - SpotInstanceRequestID *string `locationName:"spotInstanceRequestId" type:"string"` + // The ID of the Spot instance request. + SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` metadataActiveInstance `json:"-" xml:"-"` } @@ -7131,33 +6401,43 @@ type metadataActiveInstance struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ActiveInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActiveInstance) GoString() string { + return s.String() +} + // Describes an Elastic IP address. type Address struct { // The ID representing the allocation of the address for use with EC2-VPC. - AllocationID *string `locationName:"allocationId" type:"string"` + AllocationId *string `locationName:"allocationId" type:"string"` // The ID representing the association of the address with an instance in a // VPC. - AssociationID *string `locationName:"associationId" type:"string"` + AssociationId *string `locationName:"associationId" type:"string"` // Indicates whether this Elastic IP address is for use with instances in EC2-Classic // (standard) or instances in a VPC (vpc). - Domain *string `locationName:"domain" type:"string"` + Domain *string `locationName:"domain" type:"string" enum:"DomainType"` // The ID of the instance that the address is associated with (if any). - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // The ID of the AWS account that owns the network interface. - NetworkInterfaceOwnerID *string `locationName:"networkInterfaceOwnerId" type:"string"` + NetworkInterfaceOwnerId *string `locationName:"networkInterfaceOwnerId" type:"string"` // The private IP address associated with the Elastic IP address. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // The Elastic IP address. - PublicIP *string `locationName:"publicIp" type:"string"` + PublicIp *string `locationName:"publicIp" type:"string"` metadataAddress `json:"-" xml:"-"` } @@ -7166,11 +6446,21 @@ type metadataAddress struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Address) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Address) GoString() string { + return s.String() +} + type AllocateAddressInput struct { // Set to vpc to allocate the address for use with instances in a VPC. // // Default: The address is for use with instances in EC2-Classic. - Domain *string `type:"string"` + Domain *string `type:"string" enum:"DomainType"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7185,17 +6475,27 @@ type metadataAllocateAddressInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AllocateAddressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocateAddressInput) GoString() string { + return s.String() +} + type AllocateAddressOutput struct { // [EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic // IP address for use with instances in a VPC. - AllocationID *string `locationName:"allocationId" type:"string"` + AllocationId *string `locationName:"allocationId" type:"string"` // Indicates whether this Elastic IP address is for use with instances in EC2-Classic // (standard) or instances in a VPC (vpc). - Domain *string `locationName:"domain" type:"string"` + Domain *string `locationName:"domain" type:"string" enum:"DomainType"` // The Elastic IP address. - PublicIP *string `locationName:"publicIp" type:"string"` + PublicIp *string `locationName:"publicIp" type:"string"` metadataAllocateAddressOutput `json:"-" xml:"-"` } @@ -7204,13 +6504,23 @@ type metadataAllocateAddressOutput struct { SDKShapeTraits bool `type:"structure"` } -type AssignPrivateIPAddressesInput struct { +// String returns the string representation +func (s AllocateAddressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocateAddressOutput) GoString() string { + return s.String() +} + +type AssignPrivateIpAddressesInput struct { // Indicates whether to allow an IP address that is already assigned to another // network interface or instance to be reassigned to the specified network interface. AllowReassignment *bool `locationName:"allowReassignment" type:"boolean"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` // One or more IP addresses to be assigned as a secondary private IP address // to the network interface. You can't specify this parameter when also specifying @@ -7218,30 +6528,50 @@ type AssignPrivateIPAddressesInput struct { // // If you don't specify an IP address, Amazon EC2 automatically selects an // IP address within the subnet range. - PrivateIPAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list"` + PrivateIpAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list"` // The number of secondary IP addresses to assign to the network interface. // You can't specify this parameter when also specifying private IP addresses. - SecondaryPrivateIPAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` + SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` - metadataAssignPrivateIPAddressesInput `json:"-" xml:"-"` + metadataAssignPrivateIpAddressesInput `json:"-" xml:"-"` } -type metadataAssignPrivateIPAddressesInput struct { +type metadataAssignPrivateIpAddressesInput struct { SDKShapeTraits bool `type:"structure"` } -type AssignPrivateIPAddressesOutput struct { - metadataAssignPrivateIPAddressesOutput `json:"-" xml:"-"` +// String returns the string representation +func (s AssignPrivateIpAddressesInput) String() string { + return awsutil.Prettify(s) } -type metadataAssignPrivateIPAddressesOutput struct { +// GoString returns the string representation +func (s AssignPrivateIpAddressesInput) GoString() string { + return s.String() +} + +type AssignPrivateIpAddressesOutput struct { + metadataAssignPrivateIpAddressesOutput `json:"-" xml:"-"` +} + +type metadataAssignPrivateIpAddressesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AssignPrivateIpAddressesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssignPrivateIpAddressesOutput) GoString() string { + return s.String() +} + type AssociateAddressInput struct { // [EC2-VPC] The allocation ID. This is required for EC2-VPC. - AllocationID *string `locationName:"AllocationId" type:"string"` + AllocationId *string `type:"string"` // [EC2-VPC] Allows an Elastic IP address that is already associated with an // instance or network interface to be re-associated with the specified instance @@ -7260,19 +6590,19 @@ type AssociateAddressInput struct { // can specify either the instance ID or the network interface ID, but not both. // The operation fails if you specify an instance ID unless exactly one network // interface is attached. - InstanceID *string `locationName:"InstanceId" type:"string"` + InstanceId *string `type:"string"` // [EC2-VPC] The ID of the network interface. If the instance has more than // one network interface, you must specify a network interface ID. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // [EC2-VPC] The primary or secondary private IP address to associate with the // Elastic IP address. If no private IP address is specified, the Elastic IP // address is associated with the primary private IP address. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // The Elastic IP address. This is required for EC2-Classic. - PublicIP *string `locationName:"PublicIp" type:"string"` + PublicIp *string `type:"string"` metadataAssociateAddressInput `json:"-" xml:"-"` } @@ -7281,10 +6611,20 @@ type metadataAssociateAddressInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AssociateAddressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateAddressInput) GoString() string { + return s.String() +} + type AssociateAddressOutput struct { // [EC2-VPC] The ID that represents the association of the Elastic IP address // with an instance. - AssociationID *string `locationName:"associationId" type:"string"` + AssociationId *string `locationName:"associationId" type:"string"` metadataAssociateAddressOutput `json:"-" xml:"-"` } @@ -7293,10 +6633,20 @@ type metadataAssociateAddressOutput struct { SDKShapeTraits bool `type:"structure"` } -type AssociateDHCPOptionsInput struct { +// String returns the string representation +func (s AssociateAddressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateAddressOutput) GoString() string { + return s.String() +} + +type AssociateDhcpOptionsInput struct { // The ID of the DHCP options set, or default to associate no DHCP options with // the VPC. - DHCPOptionsID *string `locationName:"DhcpOptionsId" type:"string" required:"true"` + DhcpOptionsId *string `type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7305,23 +6655,43 @@ type AssociateDHCPOptionsInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the VPC. - VPCID *string `locationName:"VpcId" type:"string" required:"true"` + VpcId *string `type:"string" required:"true"` - metadataAssociateDHCPOptionsInput `json:"-" xml:"-"` + metadataAssociateDhcpOptionsInput `json:"-" xml:"-"` } -type metadataAssociateDHCPOptionsInput struct { +type metadataAssociateDhcpOptionsInput struct { SDKShapeTraits bool `type:"structure"` } -type AssociateDHCPOptionsOutput struct { - metadataAssociateDHCPOptionsOutput `json:"-" xml:"-"` +// String returns the string representation +func (s AssociateDhcpOptionsInput) String() string { + return awsutil.Prettify(s) } -type metadataAssociateDHCPOptionsOutput struct { +// GoString returns the string representation +func (s AssociateDhcpOptionsInput) GoString() string { + return s.String() +} + +type AssociateDhcpOptionsOutput struct { + metadataAssociateDhcpOptionsOutput `json:"-" xml:"-"` +} + +type metadataAssociateDhcpOptionsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AssociateDhcpOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateDhcpOptionsOutput) GoString() string { + return s.String() +} + type AssociateRouteTableInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7330,10 +6700,10 @@ type AssociateRouteTableInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the route table. - RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"` + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` // The ID of the subnet. - SubnetID *string `locationName:"subnetId" type:"string" required:"true"` + SubnetId *string `locationName:"subnetId" type:"string" required:"true"` metadataAssociateRouteTableInput `json:"-" xml:"-"` } @@ -7342,9 +6712,19 @@ type metadataAssociateRouteTableInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AssociateRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateRouteTableInput) GoString() string { + return s.String() +} + type AssociateRouteTableOutput struct { // The route table association ID (needed to disassociate the route table). - AssociationID *string `locationName:"associationId" type:"string"` + AssociationId *string `locationName:"associationId" type:"string"` metadataAssociateRouteTableOutput `json:"-" xml:"-"` } @@ -7353,7 +6733,17 @@ type metadataAssociateRouteTableOutput struct { SDKShapeTraits bool `type:"structure"` } -type AttachClassicLinkVPCInput struct { +// String returns the string representation +func (s AssociateRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateRouteTableOutput) GoString() string { + return s.String() +} + +type AttachClassicLinkVpcInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -7365,29 +6755,49 @@ type AttachClassicLinkVPCInput struct { Groups []*string `locationName:"SecurityGroupId" locationNameList:"groupId" type:"list" required:"true"` // The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC. - InstanceID *string `locationName:"instanceId" type:"string" required:"true"` + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` // The ID of a ClassicLink-enabled VPC. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` + VpcId *string `locationName:"vpcId" type:"string" required:"true"` - metadataAttachClassicLinkVPCInput `json:"-" xml:"-"` + metadataAttachClassicLinkVpcInput `json:"-" xml:"-"` } -type metadataAttachClassicLinkVPCInput struct { +type metadataAttachClassicLinkVpcInput struct { SDKShapeTraits bool `type:"structure"` } -type AttachClassicLinkVPCOutput struct { +// String returns the string representation +func (s AttachClassicLinkVpcInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachClassicLinkVpcInput) GoString() string { + return s.String() +} + +type AttachClassicLinkVpcOutput struct { // Returns true if the request succeeds; otherwise, it returns an error. Return *bool `locationName:"return" type:"boolean"` - metadataAttachClassicLinkVPCOutput `json:"-" xml:"-"` + metadataAttachClassicLinkVpcOutput `json:"-" xml:"-"` } -type metadataAttachClassicLinkVPCOutput struct { +type metadataAttachClassicLinkVpcOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachClassicLinkVpcOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachClassicLinkVpcOutput) GoString() string { + return s.String() +} + type AttachInternetGatewayInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7396,10 +6806,10 @@ type AttachInternetGatewayInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the Internet gateway. - InternetGatewayID *string `locationName:"internetGatewayId" type:"string" required:"true"` + InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` + VpcId *string `locationName:"vpcId" type:"string" required:"true"` metadataAttachInternetGatewayInput `json:"-" xml:"-"` } @@ -7408,6 +6818,16 @@ type metadataAttachInternetGatewayInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachInternetGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachInternetGatewayInput) GoString() string { + return s.String() +} + type AttachInternetGatewayOutput struct { metadataAttachInternetGatewayOutput `json:"-" xml:"-"` } @@ -7416,6 +6836,16 @@ type metadataAttachInternetGatewayOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachInternetGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachInternetGatewayOutput) GoString() string { + return s.String() +} + type AttachNetworkInterfaceInput struct { // The index of the device for the network interface attachment. DeviceIndex *int64 `locationName:"deviceIndex" type:"integer" required:"true"` @@ -7427,10 +6857,10 @@ type AttachNetworkInterfaceInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string" required:"true"` + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` metadataAttachNetworkInterfaceInput `json:"-" xml:"-"` } @@ -7439,9 +6869,19 @@ type metadataAttachNetworkInterfaceInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachNetworkInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachNetworkInterfaceInput) GoString() string { + return s.String() +} + type AttachNetworkInterfaceOutput struct { // The ID of the network interface attachment. - AttachmentID *string `locationName:"attachmentId" type:"string"` + AttachmentId *string `locationName:"attachmentId" type:"string"` metadataAttachNetworkInterfaceOutput `json:"-" xml:"-"` } @@ -7450,35 +6890,14 @@ type metadataAttachNetworkInterfaceOutput struct { SDKShapeTraits bool `type:"structure"` } -type AttachVPNGatewayInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - VPCID *string `locationName:"VpcId" type:"string" required:"true"` - - // The ID of the virtual private gateway. - VPNGatewayID *string `locationName:"VpnGatewayId" type:"string" required:"true"` - - metadataAttachVPNGatewayInput `json:"-" xml:"-"` +// String returns the string representation +func (s AttachNetworkInterfaceOutput) String() string { + return awsutil.Prettify(s) } -type metadataAttachVPNGatewayInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type AttachVPNGatewayOutput struct { - // Information about the attachment. - VPCAttachment *VPCAttachment `locationName:"attachment" type:"structure"` - - metadataAttachVPNGatewayOutput `json:"-" xml:"-"` -} - -type metadataAttachVPNGatewayOutput struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s AttachNetworkInterfaceOutput) GoString() string { + return s.String() } type AttachVolumeInput struct { @@ -7492,11 +6911,11 @@ type AttachVolumeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the instance. - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `type:"string" required:"true"` // The ID of the EBS volume. The volume and instance must be within the same // Availability Zone. - VolumeID *string `locationName:"VolumeId" type:"string" required:"true"` + VolumeId *string `type:"string" required:"true"` metadataAttachVolumeInput `json:"-" xml:"-"` } @@ -7505,6 +6924,67 @@ type metadataAttachVolumeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachVolumeInput) GoString() string { + return s.String() +} + +type AttachVpnGatewayInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC. + VpcId *string `type:"string" required:"true"` + + // The ID of the virtual private gateway. + VpnGatewayId *string `type:"string" required:"true"` + + metadataAttachVpnGatewayInput `json:"-" xml:"-"` +} + +type metadataAttachVpnGatewayInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s AttachVpnGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachVpnGatewayInput) GoString() string { + return s.String() +} + +type AttachVpnGatewayOutput struct { + // Information about the attachment. + VpcAttachment *VpcAttachment `locationName:"attachment" type:"structure"` + + metadataAttachVpnGatewayOutput `json:"-" xml:"-"` +} + +type metadataAttachVpnGatewayOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s AttachVpnGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachVpnGatewayOutput) GoString() string { + return s.String() +} + // The value to use when a resource attribute accepts a Boolean value. type AttributeBooleanValue struct { // Valid values are true or false. @@ -7517,6 +6997,16 @@ type metadataAttributeBooleanValue struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttributeBooleanValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributeBooleanValue) GoString() string { + return s.String() +} + // The value to use for a resource attribute. type AttributeValue struct { // Valid values are case-sensitive and vary by action. @@ -7529,10 +7019,20 @@ type metadataAttributeValue struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttributeValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributeValue) GoString() string { + return s.String() +} + type AuthorizeSecurityGroupEgressInput struct { // The CIDR IP address range. You can't specify this parameter when specifying // a source security group. - CIDRIP *string `locationName:"cidrIp" type:"string"` + CidrIp *string `locationName:"cidrIp" type:"string"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7545,23 +7045,25 @@ type AuthorizeSecurityGroupEgressInput struct { FromPort *int64 `locationName:"fromPort" type:"integer"` // The ID of the security group. - GroupID *string `locationName:"groupId" type:"string" required:"true"` + GroupId *string `locationName:"groupId" type:"string" required:"true"` // A set of IP permissions. You can't specify a destination security group and // a CIDR IP address range. - IPPermissions []*IPPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` + IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). // Use -1 to specify all. - IPProtocol *string `locationName:"ipProtocol" type:"string"` + IpProtocol *string `locationName:"ipProtocol" type:"string"` - // [EC2-Classic, default VPC] The name of the destination security group. You - // can't specify a destination security group and a CIDR IP address range. + // The name of a destination security group. To authorize outbound access to + // a destination security group, we recommend that you use a set of IP permissions + // instead. SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` - // The ID of the destination security group. You can't specify a destination - // security group and a CIDR IP address range. - SourceSecurityGroupOwnerID *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` + // The AWS account number for a destination security group. To authorize outbound + // access to a destination security group, we recommend that you use a set of + // IP permissions instead. + SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` // The end of port range for the TCP and UDP protocols, or an ICMP code number. // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type. @@ -7574,6 +7076,16 @@ type metadataAuthorizeSecurityGroupEgressInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AuthorizeSecurityGroupEgressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeSecurityGroupEgressInput) GoString() string { + return s.String() +} + type AuthorizeSecurityGroupEgressOutput struct { metadataAuthorizeSecurityGroupEgressOutput `json:"-" xml:"-"` } @@ -7582,10 +7094,20 @@ type metadataAuthorizeSecurityGroupEgressOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AuthorizeSecurityGroupEgressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeSecurityGroupEgressOutput) GoString() string { + return s.String() +} + type AuthorizeSecurityGroupIngressInput struct { // The CIDR IP address range. You can't specify this parameter when specifying // a source security group. - CIDRIP *string `locationName:"CidrIp" type:"string"` + CidrIp *string `type:"string"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7598,26 +7120,34 @@ type AuthorizeSecurityGroupIngressInput struct { FromPort *int64 `type:"integer"` // The ID of the security group. Required for a nondefault VPC. - GroupID *string `locationName:"GroupId" type:"string"` + GroupId *string `type:"string"` // [EC2-Classic, default VPC] The name of the security group. GroupName *string `type:"string"` // A set of IP permissions. Can be used to specify multiple rules in a single // command. - IPPermissions []*IPPermission `locationName:"IpPermissions" locationNameList:"item" type:"list"` + IpPermissions []*IpPermission `locationNameList:"item" type:"list"` // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). // (VPC only) Use -1 to specify all. - IPProtocol *string `locationName:"IpProtocol" type:"string"` + IpProtocol *string `type:"string"` // [EC2-Classic, default VPC] The name of the source security group. You can't - // specify a source security group and a CIDR IP address range. + // specify this parameter in combination with the following parameters: the + // CIDR IP address range, the start of the port range, the IP protocol, and + // the end of the port range. For EC2-VPC, the source security group must be + // in the same VPC. SourceSecurityGroupName *string `type:"string"` - // The ID of the source security group. You can't specify a source security - // group and a CIDR IP address range. - SourceSecurityGroupOwnerID *string `locationName:"SourceSecurityGroupOwnerId" type:"string"` + // [EC2-Classic, default VPC] The AWS account number for the source security + // group. For EC2-VPC, the source security group must be in the same VPC. You + // can't specify this parameter in combination with the following parameters: + // the CIDR IP address range, the IP protocol, the start of the port range, + // and the end of the port range. Creates rules that grant full ICMP, UDP, and + // TCP access. To create a rule with a specific IP protocol and port range, + // use a set of IP permissions instead. + SourceSecurityGroupOwnerId *string `type:"string"` // The end of port range for the TCP and UDP protocols, or an ICMP code number. // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type. @@ -7630,6 +7160,16 @@ type metadataAuthorizeSecurityGroupIngressInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AuthorizeSecurityGroupIngressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeSecurityGroupIngressInput) GoString() string { + return s.String() +} + type AuthorizeSecurityGroupIngressOutput struct { metadataAuthorizeSecurityGroupIngressOutput `json:"-" xml:"-"` } @@ -7638,6 +7178,16 @@ type metadataAuthorizeSecurityGroupIngressOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AuthorizeSecurityGroupIngressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeSecurityGroupIngressOutput) GoString() string { + return s.String() +} + // Describes an Availability Zone. type AvailabilityZone struct { // Any messages about the Availability Zone. @@ -7647,7 +7197,7 @@ type AvailabilityZone struct { RegionName *string `locationName:"regionName" type:"string"` // The state of the Availability Zone (available | impaired | unavailable). - State *string `locationName:"zoneState" type:"string"` + State *string `locationName:"zoneState" type:"string" enum:"AvailabilityZoneState"` // The name of the Availability Zone. ZoneName *string `locationName:"zoneName" type:"string"` @@ -7659,6 +7209,16 @@ type metadataAvailabilityZone struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AvailabilityZone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZone) GoString() string { + return s.String() +} + // Describes a message about an Availability Zone. type AvailabilityZoneMessage struct { // The message about the Availability Zone. @@ -7671,6 +7231,16 @@ type metadataAvailabilityZoneMessage struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AvailabilityZoneMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZoneMessage) GoString() string { + return s.String() +} + type BlobAttributeValue struct { Value []byte `locationName:"value" type:"blob"` @@ -7681,6 +7251,16 @@ type metadataBlobAttributeValue struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s BlobAttributeValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BlobAttributeValue) GoString() string { + return s.String() +} + // Describes a block device mapping. type BlockDeviceMapping struct { // The device name exposed to the instance (for example, /dev/sdh or xvdh). @@ -7688,7 +7268,7 @@ type BlockDeviceMapping struct { // Parameters used to automatically set up EBS volumes when the instance is // launched. - EBS *EBSBlockDevice `locationName:"ebs" type:"structure"` + Ebs *EbsBlockDevice `locationName:"ebs" type:"structure"` // Suppresses the specified device included in the block device mapping of the // AMI. @@ -7713,6 +7293,16 @@ type metadataBlockDeviceMapping struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s BlockDeviceMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BlockDeviceMapping) GoString() string { + return s.String() +} + type BundleInstanceInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7727,7 +7317,7 @@ type BundleInstanceInput struct { // Default: None // // Required: Yes - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `type:"string" required:"true"` // The bucket in which to store the AMI. You can specify a bucket that you already // own or a new bucket that Amazon EC2 creates on your behalf. If you specify @@ -7741,6 +7331,16 @@ type metadataBundleInstanceInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s BundleInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BundleInstanceInput) GoString() string { + return s.String() +} + type BundleInstanceOutput struct { // Information about the bundle task. BundleTask *BundleTask `locationName:"bundleInstanceTask" type:"structure"` @@ -7752,16 +7352,26 @@ type metadataBundleInstanceOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s BundleInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BundleInstanceOutput) GoString() string { + return s.String() +} + // Describes a bundle task. type BundleTask struct { // The ID of the bundle task. - BundleID *string `locationName:"bundleId" type:"string"` + BundleId *string `locationName:"bundleId" type:"string"` // If the task fails, a description of the error. BundleTaskError *BundleTaskError `locationName:"error" type:"structure"` // The ID of the instance associated with this bundle task. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The level of task completion, as a percent (for example, 20%). Progress *string `locationName:"progress" type:"string"` @@ -7770,7 +7380,7 @@ type BundleTask struct { StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` // The state of the task. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"BundleTaskState"` // The Amazon S3 storage locations. Storage *Storage `locationName:"storage" type:"structure"` @@ -7785,6 +7395,16 @@ type metadataBundleTask struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s BundleTask) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BundleTask) GoString() string { + return s.String() +} + // Describes an error for BundleInstance. type BundleTaskError struct { // The error code. @@ -7800,9 +7420,19 @@ type metadataBundleTaskError struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s BundleTaskError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BundleTaskError) GoString() string { + return s.String() +} + type CancelBundleTaskInput struct { // The ID of the bundle task. - BundleID *string `locationName:"BundleId" type:"string" required:"true"` + BundleId *string `type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7817,6 +7447,16 @@ type metadataCancelBundleTaskInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelBundleTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelBundleTaskInput) GoString() string { + return s.String() +} + type CancelBundleTaskOutput struct { // Information about the bundle task. BundleTask *BundleTask `locationName:"bundleInstanceTask" type:"structure"` @@ -7828,9 +7468,19 @@ type metadataCancelBundleTaskOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelBundleTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelBundleTaskOutput) GoString() string { + return s.String() +} + type CancelConversionTaskInput struct { // The ID of the conversion task. - ConversionTaskID *string `locationName:"conversionTaskId" type:"string" required:"true"` + ConversionTaskId *string `locationName:"conversionTaskId" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -7848,6 +7498,16 @@ type metadataCancelConversionTaskInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelConversionTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelConversionTaskInput) GoString() string { + return s.String() +} + type CancelConversionTaskOutput struct { metadataCancelConversionTaskOutput `json:"-" xml:"-"` } @@ -7856,9 +7516,19 @@ type metadataCancelConversionTaskOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelConversionTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelConversionTaskOutput) GoString() string { + return s.String() +} + type CancelExportTaskInput struct { // The ID of the export task. This is the ID returned by CreateInstanceExportTask. - ExportTaskID *string `locationName:"exportTaskId" type:"string" required:"true"` + ExportTaskId *string `locationName:"exportTaskId" type:"string" required:"true"` metadataCancelExportTaskInput `json:"-" xml:"-"` } @@ -7867,6 +7537,16 @@ type metadataCancelExportTaskInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelExportTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelExportTaskInput) GoString() string { + return s.String() +} + type CancelExportTaskOutput struct { metadataCancelExportTaskOutput `json:"-" xml:"-"` } @@ -7875,6 +7555,16 @@ type metadataCancelExportTaskOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelExportTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelExportTaskOutput) GoString() string { + return s.String() +} + type CancelImportTaskInput struct { // The reason for canceling the task. CancelReason *string `type:"string"` @@ -7886,7 +7576,7 @@ type CancelImportTaskInput struct { DryRun *bool `type:"boolean"` // The ID of the import image or import snapshot task to be canceled. - ImportTaskID *string `locationName:"ImportTaskId" type:"string"` + ImportTaskId *string `type:"string"` metadataCancelImportTaskInput `json:"-" xml:"-"` } @@ -7895,9 +7585,19 @@ type metadataCancelImportTaskInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelImportTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelImportTaskInput) GoString() string { + return s.String() +} + type CancelImportTaskOutput struct { // The ID of the task being canceled. - ImportTaskID *string `locationName:"importTaskId" type:"string"` + ImportTaskId *string `locationName:"importTaskId" type:"string"` // The current state of the task being canceled. PreviousState *string `locationName:"previousState" type:"string"` @@ -7912,9 +7612,19 @@ type metadataCancelImportTaskOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelImportTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelImportTaskOutput) GoString() string { + return s.String() +} + type CancelReservedInstancesListingInput struct { // The ID of the Reserved Instance listing. - ReservedInstancesListingID *string `locationName:"reservedInstancesListingId" type:"string" required:"true"` + ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string" required:"true"` metadataCancelReservedInstancesListingInput `json:"-" xml:"-"` } @@ -7923,6 +7633,16 @@ type metadataCancelReservedInstancesListingInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelReservedInstancesListingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelReservedInstancesListingInput) GoString() string { + return s.String() +} + type CancelReservedInstancesListingOutput struct { // The Reserved Instance listing. ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` @@ -7934,10 +7654,20 @@ type metadataCancelReservedInstancesListingOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelReservedInstancesListingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelReservedInstancesListingOutput) GoString() string { + return s.String() +} + // Describes a Spot fleet error. type CancelSpotFleetRequestsError struct { // The error code. - Code *string `locationName:"code" type:"string" required:"true"` + Code *string `locationName:"code" type:"string" required:"true" enum:"CancelBatchErrorCode"` // The description for the error code. Message *string `locationName:"message" type:"string" required:"true"` @@ -7949,13 +7679,23 @@ type metadataCancelSpotFleetRequestsError struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelSpotFleetRequestsError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelSpotFleetRequestsError) GoString() string { + return s.String() +} + // Describes a Spot fleet request that was not successfully canceled. type CancelSpotFleetRequestsErrorItem struct { // The error. Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure" required:"true"` // The ID of the Spot fleet request. - SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` metadataCancelSpotFleetRequestsErrorItem `json:"-" xml:"-"` } @@ -7964,6 +7704,16 @@ type metadataCancelSpotFleetRequestsErrorItem struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelSpotFleetRequestsErrorItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelSpotFleetRequestsErrorItem) GoString() string { + return s.String() +} + // Contains the parameters for CancelSpotFleetRequests. type CancelSpotFleetRequestsInput struct { // Checks whether you have the required permissions for the action, without @@ -7973,7 +7723,7 @@ type CancelSpotFleetRequestsInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The IDs of the Spot fleet requests. - SpotFleetRequestIDs []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list" required:"true"` + SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list" required:"true"` // Indicates whether to terminate instances for a Spot fleet request if it is // canceled successfully. @@ -7986,6 +7736,16 @@ type metadataCancelSpotFleetRequestsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelSpotFleetRequestsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelSpotFleetRequestsInput) GoString() string { + return s.String() +} + // Contains the output of CancelSpotFleetRequests. type CancelSpotFleetRequestsOutput struct { // Information about the Spot fleet requests that are successfully canceled. @@ -8001,16 +7761,26 @@ type metadataCancelSpotFleetRequestsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelSpotFleetRequestsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelSpotFleetRequestsOutput) GoString() string { + return s.String() +} + // Describes a Spot fleet request that was successfully canceled. type CancelSpotFleetRequestsSuccessItem struct { // The current state of the Spot fleet request. - CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" required:"true"` + CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"` // The previous state of the Spot fleet request. - PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" required:"true"` + PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"` // The ID of the Spot fleet request. - SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` metadataCancelSpotFleetRequestsSuccessItem `json:"-" xml:"-"` } @@ -8019,6 +7789,16 @@ type metadataCancelSpotFleetRequestsSuccessItem struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelSpotFleetRequestsSuccessItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelSpotFleetRequestsSuccessItem) GoString() string { + return s.String() +} + // Contains the parameters for CancelSpotInstanceRequests. type CancelSpotInstanceRequestsInput struct { // Checks whether you have the required permissions for the action, without @@ -8027,8 +7807,8 @@ type CancelSpotInstanceRequestsInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // One or more Spot Instance request IDs. - SpotInstanceRequestIDs []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list" required:"true"` + // One or more Spot instance request IDs. + SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list" required:"true"` metadataCancelSpotInstanceRequestsInput `json:"-" xml:"-"` } @@ -8037,9 +7817,19 @@ type metadataCancelSpotInstanceRequestsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelSpotInstanceRequestsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelSpotInstanceRequestsInput) GoString() string { + return s.String() +} + // Contains the output of CancelSpotInstanceRequests. type CancelSpotInstanceRequestsOutput struct { - // One or more Spot Instance requests. + // One or more Spot instance requests. CancelledSpotInstanceRequests []*CancelledSpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` metadataCancelSpotInstanceRequestsOutput `json:"-" xml:"-"` @@ -8049,13 +7839,23 @@ type metadataCancelSpotInstanceRequestsOutput struct { SDKShapeTraits bool `type:"structure"` } -// Describes a request to cancel a Spot Instance. -type CancelledSpotInstanceRequest struct { - // The ID of the Spot Instance request. - SpotInstanceRequestID *string `locationName:"spotInstanceRequestId" type:"string"` +// String returns the string representation +func (s CancelSpotInstanceRequestsOutput) String() string { + return awsutil.Prettify(s) +} - // The state of the Spot Instance request. - State *string `locationName:"state" type:"string"` +// GoString returns the string representation +func (s CancelSpotInstanceRequestsOutput) GoString() string { + return s.String() +} + +// Describes a request to cancel a Spot instance. +type CancelledSpotInstanceRequest struct { + // The ID of the Spot instance request. + SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` + + // The state of the Spot instance request. + State *string `locationName:"state" type:"string" enum:"CancelSpotInstanceRequestState"` metadataCancelledSpotInstanceRequest `json:"-" xml:"-"` } @@ -8064,19 +7864,29 @@ type metadataCancelledSpotInstanceRequest struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CancelledSpotInstanceRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelledSpotInstanceRequest) GoString() string { + return s.String() +} + // Describes a linked EC2-Classic instance. type ClassicLinkInstance struct { // A list of security groups. Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // Any tags assigned to the instance. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` + VpcId *string `locationName:"vpcId" type:"string"` metadataClassicLinkInstance `json:"-" xml:"-"` } @@ -8085,6 +7895,16 @@ type metadataClassicLinkInstance struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ClassicLinkInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClassicLinkInstance) GoString() string { + return s.String() +} + // Describes the client-specific data. type ClientData struct { // A user-defined comment about the disk upload. @@ -8106,6 +7926,16 @@ type metadataClientData struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ClientData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientData) GoString() string { + return s.String() +} + type ConfirmProductInstanceInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8114,7 +7944,7 @@ type ConfirmProductInstanceInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the instance. - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `type:"string" required:"true"` // The product code. This must be a product code that you own. ProductCode *string `type:"string" required:"true"` @@ -8126,10 +7956,24 @@ type metadataConfirmProductInstanceInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ConfirmProductInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfirmProductInstanceInput) GoString() string { + return s.String() +} + type ConfirmProductInstanceOutput struct { // The AWS account ID of the instance owner. This is only present if the product // code is attached to the instance. - OwnerID *string `locationName:"ownerId" type:"string"` + OwnerId *string `locationName:"ownerId" type:"string"` + + // The return value of the request. Returns true if the specified product code + // is owned by the requester and associated with the specified instance. + Return *bool `locationName:"return" type:"boolean"` metadataConfirmProductInstanceOutput `json:"-" xml:"-"` } @@ -8138,10 +7982,20 @@ type metadataConfirmProductInstanceOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ConfirmProductInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfirmProductInstanceOutput) GoString() string { + return s.String() +} + // Describes a conversion task. type ConversionTask struct { // The ID of the conversion task. - ConversionTaskID *string `locationName:"conversionTaskId" type:"string" required:"true"` + ConversionTaskId *string `locationName:"conversionTaskId" type:"string" required:"true"` // The time when the task expires. If the upload isn't complete before the expiration // time, we automatically cancel the task. @@ -8156,7 +8010,7 @@ type ConversionTask struct { ImportVolume *ImportVolumeTaskDetails `locationName:"importVolume" type:"structure"` // The state of the conversion task. - State *string `locationName:"state" type:"string" required:"true"` + State *string `locationName:"state" type:"string" required:"true" enum:"ConversionTaskState"` // The status message related to the conversion task. StatusMessage *string `locationName:"statusMessage" type:"string"` @@ -8171,6 +8025,16 @@ type metadataConversionTask struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ConversionTask) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConversionTask) GoString() string { + return s.String() +} + type CopyImageInput struct { // Unique, case-sensitive identifier you provide to ensure idempotency of the // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) @@ -8190,7 +8054,7 @@ type CopyImageInput struct { Name *string `type:"string" required:"true"` // The ID of the AMI to copy. - SourceImageID *string `locationName:"SourceImageId" type:"string" required:"true"` + SourceImageId *string `type:"string" required:"true"` // The name of the region that contains the AMI to copy. SourceRegion *string `type:"string" required:"true"` @@ -8202,9 +8066,19 @@ type metadataCopyImageInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CopyImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyImageInput) GoString() string { + return s.String() +} + type CopyImageOutput struct { // The ID of the new AMI. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` metadataCopyImageOutput `json:"-" xml:"-"` } @@ -8213,6 +8087,16 @@ type metadataCopyImageOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CopyImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyImageOutput) GoString() string { + return s.String() +} + type CopySnapshotInput struct { // A description for the EBS snapshot. Description *string `type:"string"` @@ -8233,6 +8117,25 @@ type CopySnapshotInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` + // Specifies whether the destination snapshot should be encrypted. There is + // no way to create an unencrypted snapshot copy from an encrypted snapshot; + // however, you can encrypt a copy of an unencrypted snapshot with this flag. + // The default CMK for EBS is used unless a non-default AWS Key Management Service + // (AWS KMS) CMK is specified with KmsKeyId. For more information, see Amazon + // EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + // in the Amazon Elastic Compute Cloud User Guide. + Encrypted *bool `locationName:"encrypted" type:"boolean"` + + // The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when + // creating the snapshot copy. This parameter is only required if you want to + // use a non-default CMK; if this parameter is not specified, the default CMK + // for EBS is used. The ARN contains the arn:aws:kms namespace, followed by + // the region of the CMK, the AWS account ID of the CMK owner, the key namespace, + // and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // The specified CMK must exist in the region that the snapshot is being copied + // to. If a KmsKeyId is specified, the Encrypted flag must also be set. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + // The pre-signed URL that facilitates copying an encrypted snapshot. This parameter // is only required when copying an encrypted snapshot with the Amazon EC2 Query // API; it is available as an optional parameter in all other cases. The PresignedUrl @@ -8245,13 +8148,13 @@ type CopySnapshotInput struct { // in the Amazon Simple Storage Service API Reference. An invalid or improperly // signed PresignedUrl will cause the copy operation to fail asynchronously, // and the snapshot will move to an error state. - PresignedURL *string `locationName:"presignedUrl" type:"string"` + PresignedUrl *string `locationName:"presignedUrl" type:"string"` // The ID of the region that contains the snapshot to be copied. SourceRegion *string `type:"string" required:"true"` // The ID of the EBS snapshot to copy. - SourceSnapshotID *string `locationName:"SourceSnapshotId" type:"string" required:"true"` + SourceSnapshotId *string `type:"string" required:"true"` metadataCopySnapshotInput `json:"-" xml:"-"` } @@ -8260,9 +8163,19 @@ type metadataCopySnapshotInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CopySnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopySnapshotInput) GoString() string { + return s.String() +} + type CopySnapshotOutput struct { // The ID of the new snapshot. - SnapshotID *string `locationName:"snapshotId" type:"string"` + SnapshotId *string `locationName:"snapshotId" type:"string"` metadataCopySnapshotOutput `json:"-" xml:"-"` } @@ -8271,11 +8184,21 @@ type metadataCopySnapshotOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CopySnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopySnapshotOutput) GoString() string { + return s.String() +} + type CreateCustomerGatewayInput struct { // For devices that support BGP, the customer gateway's BGP ASN. // // Default: 65000 - BGPASN *int64 `locationName:"BgpAsn" type:"integer" required:"true"` + BgpAsn *int64 `type:"integer" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8285,10 +8208,10 @@ type CreateCustomerGatewayInput struct { // The Internet-routable IP address for the customer gateway's outside interface. // The address must be static. - PublicIP *string `locationName:"IpAddress" type:"string" required:"true"` + PublicIp *string `locationName:"IpAddress" type:"string" required:"true"` // The type of VPN connection that this customer gateway supports (ipsec.1). - Type *string `type:"string" required:"true"` + Type *string `type:"string" required:"true" enum:"GatewayType"` metadataCreateCustomerGatewayInput `json:"-" xml:"-"` } @@ -8297,6 +8220,16 @@ type metadataCreateCustomerGatewayInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateCustomerGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCustomerGatewayInput) GoString() string { + return s.String() +} + type CreateCustomerGatewayOutput struct { // Information about the customer gateway. CustomerGateway *CustomerGateway `locationName:"customerGateway" type:"structure"` @@ -8308,9 +8241,19 @@ type metadataCreateCustomerGatewayOutput struct { SDKShapeTraits bool `type:"structure"` } -type CreateDHCPOptionsInput struct { +// String returns the string representation +func (s CreateCustomerGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCustomerGatewayOutput) GoString() string { + return s.String() +} + +type CreateDhcpOptionsInput struct { // A DHCP configuration option. - DHCPConfigurations []*NewDHCPConfiguration `locationName:"dhcpConfiguration" locationNameList:"item" type:"list" required:"true"` + DhcpConfigurations []*NewDhcpConfiguration `locationName:"dhcpConfiguration" locationNameList:"item" type:"list" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8318,24 +8261,110 @@ type CreateDHCPOptionsInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - metadataCreateDHCPOptionsInput `json:"-" xml:"-"` + metadataCreateDhcpOptionsInput `json:"-" xml:"-"` } -type metadataCreateDHCPOptionsInput struct { +type metadataCreateDhcpOptionsInput struct { SDKShapeTraits bool `type:"structure"` } -type CreateDHCPOptionsOutput struct { +// String returns the string representation +func (s CreateDhcpOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDhcpOptionsInput) GoString() string { + return s.String() +} + +type CreateDhcpOptionsOutput struct { // A set of DHCP options. - DHCPOptions *DHCPOptions `locationName:"dhcpOptions" type:"structure"` + DhcpOptions *DhcpOptions `locationName:"dhcpOptions" type:"structure"` - metadataCreateDHCPOptionsOutput `json:"-" xml:"-"` + metadataCreateDhcpOptionsOutput `json:"-" xml:"-"` } -type metadataCreateDHCPOptionsOutput struct { +type metadataCreateDhcpOptionsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateDhcpOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDhcpOptionsOutput) GoString() string { + return s.String() +} + +type CreateFlowLogsInput struct { + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` + + // The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs + // log group. + DeliverLogsPermissionArn *string `type:"string" required:"true"` + + // The name of the CloudWatch log group. + LogGroupName *string `type:"string" required:"true"` + + // One or more subnet, network interface, or VPC IDs. + ResourceIds []*string `locationName:"ResourceId" locationNameList:"item" type:"list" required:"true"` + + // The type of resource on which to create the flow log. + ResourceType *string `type:"string" required:"true" enum:"FlowLogsResourceType"` + + // The type of traffic to log. + TrafficType *string `type:"string" required:"true" enum:"TrafficType"` + + metadataCreateFlowLogsInput `json:"-" xml:"-"` +} + +type metadataCreateFlowLogsInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateFlowLogsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFlowLogsInput) GoString() string { + return s.String() +} + +type CreateFlowLogsOutput struct { + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // The IDs of the flow logs. + FlowLogIds []*string `locationName:"flowLogIdSet" locationNameList:"item" type:"list"` + + // Information about the flow logs that could not be created successfully. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` + + metadataCreateFlowLogsOutput `json:"-" xml:"-"` +} + +type metadataCreateFlowLogsOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateFlowLogsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFlowLogsOutput) GoString() string { + return s.String() +} + type CreateImageInput struct { // Information about one or more block device mappings. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` @@ -8350,7 +8379,7 @@ type CreateImageInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string" required:"true"` + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` // A name for the new image. // @@ -8373,9 +8402,19 @@ type metadataCreateImageInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateImageInput) GoString() string { + return s.String() +} + type CreateImageOutput struct { // The ID of the new AMI. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` metadataCreateImageOutput `json:"-" xml:"-"` } @@ -8384,6 +8423,16 @@ type metadataCreateImageOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateImageOutput) GoString() string { + return s.String() +} + type CreateInstanceExportTaskInput struct { // A description for the conversion task or the resource being exported. The // maximum length is 255 bytes. @@ -8393,10 +8442,10 @@ type CreateInstanceExportTaskInput struct { ExportToS3Task *ExportToS3TaskSpecification `locationName:"exportToS3" type:"structure"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string" required:"true"` + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` // The target virtualization environment. - TargetEnvironment *string `locationName:"targetEnvironment" type:"string"` + TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"` metadataCreateInstanceExportTaskInput `json:"-" xml:"-"` } @@ -8405,6 +8454,16 @@ type metadataCreateInstanceExportTaskInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateInstanceExportTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceExportTaskInput) GoString() string { + return s.String() +} + type CreateInstanceExportTaskOutput struct { // Information about the instance export task. ExportTask *ExportTask `locationName:"exportTask" type:"structure"` @@ -8416,6 +8475,16 @@ type metadataCreateInstanceExportTaskOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateInstanceExportTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceExportTaskOutput) GoString() string { + return s.String() +} + type CreateInternetGatewayInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8430,6 +8499,16 @@ type metadataCreateInternetGatewayInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateInternetGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInternetGatewayInput) GoString() string { + return s.String() +} + type CreateInternetGatewayOutput struct { // Information about the Internet gateway. InternetGateway *InternetGateway `locationName:"internetGateway" type:"structure"` @@ -8441,6 +8520,16 @@ type metadataCreateInternetGatewayOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateInternetGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInternetGatewayOutput) GoString() string { + return s.String() +} + type CreateKeyPairInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8460,6 +8549,16 @@ type metadataCreateKeyPairInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateKeyPairInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateKeyPairInput) GoString() string { + return s.String() +} + // Describes a key pair. type CreateKeyPairOutput struct { // The SHA-1 digest of the DER encoded private key. @@ -8478,9 +8577,19 @@ type metadataCreateKeyPairOutput struct { SDKShapeTraits bool `type:"structure"` } -type CreateNetworkACLEntryInput struct { +// String returns the string representation +func (s CreateKeyPairOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateKeyPairOutput) GoString() string { + return s.String() +} + +type CreateNetworkAclEntryInput struct { // The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). - CIDRBlock *string `locationName:"cidrBlock" type:"string" required:"true"` + CidrBlock *string `locationName:"cidrBlock" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8494,10 +8603,10 @@ type CreateNetworkACLEntryInput struct { // ICMP protocol: The ICMP type and code. Required if specifying ICMP for the // protocol. - ICMPTypeCode *ICMPTypeCode `locationName:"Icmp" type:"structure"` + IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` // The ID of the network ACL. - NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"` + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` // TCP or UDP protocols: The range of ports the rule applies to. PortRange *PortRange `locationName:"portRange" type:"structure"` @@ -8506,7 +8615,7 @@ type CreateNetworkACLEntryInput struct { Protocol *string `locationName:"protocol" type:"string" required:"true"` // Indicates whether to allow or deny the traffic that matches the rule. - RuleAction *string `locationName:"ruleAction" type:"string" required:"true"` + RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"` // The rule number for the entry (for example, 100). ACL entries are processed // in ascending order by rule number. @@ -8514,22 +8623,42 @@ type CreateNetworkACLEntryInput struct { // Constraints: Positive integer from 1 to 32766 RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` - metadataCreateNetworkACLEntryInput `json:"-" xml:"-"` + metadataCreateNetworkAclEntryInput `json:"-" xml:"-"` } -type metadataCreateNetworkACLEntryInput struct { +type metadataCreateNetworkAclEntryInput struct { SDKShapeTraits bool `type:"structure"` } -type CreateNetworkACLEntryOutput struct { - metadataCreateNetworkACLEntryOutput `json:"-" xml:"-"` +// String returns the string representation +func (s CreateNetworkAclEntryInput) String() string { + return awsutil.Prettify(s) } -type metadataCreateNetworkACLEntryOutput struct { +// GoString returns the string representation +func (s CreateNetworkAclEntryInput) GoString() string { + return s.String() +} + +type CreateNetworkAclEntryOutput struct { + metadataCreateNetworkAclEntryOutput `json:"-" xml:"-"` +} + +type metadataCreateNetworkAclEntryOutput struct { SDKShapeTraits bool `type:"structure"` } -type CreateNetworkACLInput struct { +// String returns the string representation +func (s CreateNetworkAclEntryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkAclEntryOutput) GoString() string { + return s.String() +} + +type CreateNetworkAclInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -8537,26 +8666,46 @@ type CreateNetworkACLInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` + VpcId *string `locationName:"vpcId" type:"string" required:"true"` - metadataCreateNetworkACLInput `json:"-" xml:"-"` + metadataCreateNetworkAclInput `json:"-" xml:"-"` } -type metadataCreateNetworkACLInput struct { +type metadataCreateNetworkAclInput struct { SDKShapeTraits bool `type:"structure"` } -type CreateNetworkACLOutput struct { +// String returns the string representation +func (s CreateNetworkAclInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkAclInput) GoString() string { + return s.String() +} + +type CreateNetworkAclOutput struct { // Information about the network ACL. - NetworkACL *NetworkACL `locationName:"networkAcl" type:"structure"` + NetworkAcl *NetworkAcl `locationName:"networkAcl" type:"structure"` - metadataCreateNetworkACLOutput `json:"-" xml:"-"` + metadataCreateNetworkAclOutput `json:"-" xml:"-"` } -type metadataCreateNetworkACLOutput struct { +type metadataCreateNetworkAclOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateNetworkAclOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkAclOutput) GoString() string { + return s.String() +} + type CreateNetworkInterfaceInput struct { // A description for the network interface. Description *string `locationName:"description" type:"string"` @@ -8574,10 +8723,10 @@ type CreateNetworkInterfaceInput struct { // an IP address, Amazon EC2 selects one for you from the subnet range. If you // specify an IP address, you cannot indicate any IP addresses specified in // privateIpAddresses as primary (only one IP address can be designated as primary). - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // One or more private IP addresses. - PrivateIPAddresses []*PrivateIPAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"` + PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"` // The number of secondary private IP addresses to assign to a network interface. // When you specify a number of secondary IP addresses, Amazon EC2 selects these @@ -8588,10 +8737,10 @@ type CreateNetworkInterfaceInput struct { // by instance type. For more information, see Private IP Addresses Per ENI // Per Instance Type (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) // in the Amazon Elastic Compute Cloud User Guide. - SecondaryPrivateIPAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` + SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` // The ID of the subnet to associate with the network interface. - SubnetID *string `locationName:"subnetId" type:"string" required:"true"` + SubnetId *string `locationName:"subnetId" type:"string" required:"true"` metadataCreateNetworkInterfaceInput `json:"-" xml:"-"` } @@ -8600,6 +8749,16 @@ type metadataCreateNetworkInterfaceInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateNetworkInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkInterfaceInput) GoString() string { + return s.String() +} + type CreateNetworkInterfaceOutput struct { // Information about the network interface. NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"` @@ -8611,6 +8770,16 @@ type metadataCreateNetworkInterfaceOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateNetworkInterfaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkInterfaceOutput) GoString() string { + return s.String() +} + type CreatePlacementGroupInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8624,7 +8793,7 @@ type CreatePlacementGroupInput struct { GroupName *string `locationName:"groupName" type:"string" required:"true"` // The placement strategy. - Strategy *string `locationName:"strategy" type:"string" required:"true"` + Strategy *string `locationName:"strategy" type:"string" required:"true" enum:"PlacementStrategy"` metadataCreatePlacementGroupInput `json:"-" xml:"-"` } @@ -8633,6 +8802,16 @@ type metadataCreatePlacementGroupInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreatePlacementGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePlacementGroupInput) GoString() string { + return s.String() +} + type CreatePlacementGroupOutput struct { metadataCreatePlacementGroupOutput `json:"-" xml:"-"` } @@ -8641,6 +8820,16 @@ type metadataCreatePlacementGroupOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreatePlacementGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePlacementGroupOutput) GoString() string { + return s.String() +} + type CreateReservedInstancesListingInput struct { // Unique, case-sensitive identifier you provide to ensure idempotency of your // listings. This helps avoid duplicate listings. For more information, see @@ -8658,7 +8847,7 @@ type CreateReservedInstancesListingInput struct { PriceSchedules []*PriceScheduleSpecification `locationName:"priceSchedules" locationNameList:"item" type:"list" required:"true"` // The ID of the active Reserved Instance. - ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string" required:"true"` + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string" required:"true"` metadataCreateReservedInstancesListingInput `json:"-" xml:"-"` } @@ -8667,6 +8856,16 @@ type metadataCreateReservedInstancesListingInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateReservedInstancesListingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateReservedInstancesListingInput) GoString() string { + return s.String() +} + type CreateReservedInstancesListingOutput struct { // Information about the Reserved Instances listing. ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` @@ -8678,14 +8877,20 @@ type metadataCreateReservedInstancesListingOutput struct { SDKShapeTraits bool `type:"structure"` } -type CreateRouteInput struct { - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" type:"string"` +// String returns the string representation +func (s CreateReservedInstancesListingOutput) String() string { + return awsutil.Prettify(s) +} +// GoString returns the string representation +func (s CreateReservedInstancesListingOutput) GoString() string { + return s.String() +} + +type CreateRouteInput struct { // The CIDR address block used for the destination match. Routing decisions // are based on the most specific match. - DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"` + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8695,20 +8900,20 @@ type CreateRouteInput struct { // The ID of an Internet gateway or virtual private gateway attached to your // VPC. - GatewayID *string `locationName:"gatewayId" type:"string"` + GatewayId *string `locationName:"gatewayId" type:"string"` // The ID of a NAT instance in your VPC. The operation fails if you specify // an instance ID unless exactly one network interface is attached. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The ID of a network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // The ID of the route table for the route. - RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"` + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` // The ID of a VPC peering connection. - VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"` + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` metadataCreateRouteInput `json:"-" xml:"-"` } @@ -8717,11 +8922,17 @@ type metadataCreateRouteInput struct { SDKShapeTraits bool `type:"structure"` } -type CreateRouteOutput struct { - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. - ClientToken *string `locationName:"clientToken" type:"string"` +// String returns the string representation +func (s CreateRouteInput) String() string { + return awsutil.Prettify(s) +} +// GoString returns the string representation +func (s CreateRouteInput) GoString() string { + return s.String() +} + +type CreateRouteOutput struct { // Returns true if the request succeeds; otherwise, it returns an error. Return *bool `locationName:"return" type:"boolean"` @@ -8732,6 +8943,16 @@ type metadataCreateRouteOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteOutput) GoString() string { + return s.String() +} + type CreateRouteTableInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8740,7 +8961,7 @@ type CreateRouteTableInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` + VpcId *string `locationName:"vpcId" type:"string" required:"true"` metadataCreateRouteTableInput `json:"-" xml:"-"` } @@ -8749,6 +8970,16 @@ type metadataCreateRouteTableInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteTableInput) GoString() string { + return s.String() +} + type CreateRouteTableOutput struct { // Information about the route table. RouteTable *RouteTable `locationName:"routeTable" type:"structure"` @@ -8760,6 +8991,16 @@ type metadataCreateRouteTableOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteTableOutput) GoString() string { + return s.String() +} + type CreateSecurityGroupInput struct { // A description for the security group. This is informational only. // @@ -8786,7 +9027,7 @@ type CreateSecurityGroupInput struct { GroupName *string `type:"string" required:"true"` // [EC2-VPC] The ID of the VPC. Required for EC2-VPC. - VPCID *string `locationName:"VpcId" type:"string"` + VpcId *string `type:"string"` metadataCreateSecurityGroupInput `json:"-" xml:"-"` } @@ -8795,9 +9036,19 @@ type metadataCreateSecurityGroupInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateSecurityGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecurityGroupInput) GoString() string { + return s.String() +} + type CreateSecurityGroupOutput struct { // The ID of the security group. - GroupID *string `locationName:"groupId" type:"string"` + GroupId *string `locationName:"groupId" type:"string"` metadataCreateSecurityGroupOutput `json:"-" xml:"-"` } @@ -8806,6 +9057,16 @@ type metadataCreateSecurityGroupOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSecurityGroupOutput) GoString() string { + return s.String() +} + type CreateSnapshotInput struct { // A description for the snapshot. Description *string `type:"string"` @@ -8817,7 +9078,7 @@ type CreateSnapshotInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the EBS volume. - VolumeID *string `locationName:"VolumeId" type:"string" required:"true"` + VolumeId *string `type:"string" required:"true"` metadataCreateSnapshotInput `json:"-" xml:"-"` } @@ -8826,9 +9087,19 @@ type metadataCreateSnapshotInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotInput) GoString() string { + return s.String() +} + // Contains the parameters for CreateSpotDatafeedSubscription. type CreateSpotDatafeedSubscriptionInput struct { - // The Amazon S3 bucket in which to store the Spot Instance data feed. + // The Amazon S3 bucket in which to store the Spot instance data feed. Bucket *string `locationName:"bucket" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without @@ -8847,9 +9118,19 @@ type metadataCreateSpotDatafeedSubscriptionInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateSpotDatafeedSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSpotDatafeedSubscriptionInput) GoString() string { + return s.String() +} + // Contains the output of CreateSpotDatafeedSubscription. type CreateSpotDatafeedSubscriptionOutput struct { - // The Spot Instance data feed subscription. + // The Spot instance data feed subscription. SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"` metadataCreateSpotDatafeedSubscriptionOutput `json:"-" xml:"-"` @@ -8859,6 +9140,16 @@ type metadataCreateSpotDatafeedSubscriptionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateSpotDatafeedSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSpotDatafeedSubscriptionOutput) GoString() string { + return s.String() +} + type CreateSubnetInput struct { // The Availability Zone for the subnet. // @@ -8866,7 +9157,7 @@ type CreateSubnetInput struct { AvailabilityZone *string `type:"string"` // The network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. - CIDRBlock *string `locationName:"CidrBlock" type:"string" required:"true"` + CidrBlock *string `type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8875,7 +9166,7 @@ type CreateSubnetInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the VPC. - VPCID *string `locationName:"VpcId" type:"string" required:"true"` + VpcId *string `type:"string" required:"true"` metadataCreateSubnetInput `json:"-" xml:"-"` } @@ -8884,6 +9175,16 @@ type metadataCreateSubnetInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateSubnetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubnetInput) GoString() string { + return s.String() +} + type CreateSubnetOutput struct { // Information about the subnet. Subnet *Subnet `locationName:"subnet" type:"structure"` @@ -8895,6 +9196,16 @@ type metadataCreateSubnetOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateSubnetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSubnetOutput) GoString() string { + return s.String() +} + type CreateTagsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -8917,6 +9228,16 @@ type metadataCreateTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagsInput) GoString() string { + return s.String() +} + type CreateTagsOutput struct { metadataCreateTagsOutput `json:"-" xml:"-"` } @@ -8925,219 +9246,14 @@ type metadataCreateTagsOutput struct { SDKShapeTraits bool `type:"structure"` } -type CreateVPCEndpointInput struct { - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // A policy to attach to the endpoint that controls access to the service. The - // policy must be in valid JSON format. If this parameter is not specified, - // we attach a default policy that allows full access to the service. - PolicyDocument *string `type:"string"` - - // One or more route table IDs. - RouteTableIDs []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` - - // The AWS service name, in the form com.amazonaws... To get - // a list of available services, use the DescribeVpcEndpointServices request. - ServiceName *string `type:"string" required:"true"` - - // The ID of the VPC in which the endpoint will be used. - VPCID *string `locationName:"VpcId" type:"string" required:"true"` - - metadataCreateVPCEndpointInput `json:"-" xml:"-"` +// String returns the string representation +func (s CreateTagsOutput) String() string { + return awsutil.Prettify(s) } -type metadataCreateVPCEndpointInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPCEndpointOutput struct { - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the endpoint. - VPCEndpoint *VPCEndpoint `locationName:"vpcEndpoint" type:"structure"` - - metadataCreateVPCEndpointOutput `json:"-" xml:"-"` -} - -type metadataCreateVPCEndpointOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPCInput struct { - // The network range for the VPC, in CIDR notation. For example, 10.0.0.0/16. - CIDRBlock *string `locationName:"CidrBlock" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The supported tenancy options for instances launched into the VPC. A value - // of default means that instances can be launched with any tenancy; a value - // of dedicated means all instances launched into the VPC are launched as dedicated - // tenancy instances regardless of the tenancy assigned to the instance at launch. - // Dedicated tenancy instances run on single-tenant hardware. - // - // Default: default - InstanceTenancy *string `locationName:"instanceTenancy" type:"string"` - - metadataCreateVPCInput `json:"-" xml:"-"` -} - -type metadataCreateVPCInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPCOutput struct { - // Information about the VPC. - VPC *VPC `locationName:"vpc" type:"structure"` - - metadataCreateVPCOutput `json:"-" xml:"-"` -} - -type metadataCreateVPCOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPCPeeringConnectionInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The AWS account ID of the owner of the peer VPC. - // - // Default: Your AWS account ID - PeerOwnerID *string `locationName:"peerOwnerId" type:"string"` - - // The ID of the VPC with which you are creating the VPC peering connection. - PeerVPCID *string `locationName:"peerVpcId" type:"string"` - - // The ID of the requester VPC. - VPCID *string `locationName:"vpcId" type:"string"` - - metadataCreateVPCPeeringConnectionInput `json:"-" xml:"-"` -} - -type metadataCreateVPCPeeringConnectionInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPCPeeringConnectionOutput struct { - // Information about the VPC peering connection. - VPCPeeringConnection *VPCPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"` - - metadataCreateVPCPeeringConnectionOutput `json:"-" xml:"-"` -} - -type metadataCreateVPCPeeringConnectionOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPNConnectionInput struct { - // The ID of the customer gateway. - CustomerGatewayID *string `locationName:"CustomerGatewayId" type:"string" required:"true"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // Indicates whether the VPN connection requires static routes. If you are creating - // a VPN connection for a device that does not support BGP, you must specify - // true. - // - // Default: false - Options *VPNConnectionOptionsSpecification `locationName:"options" type:"structure"` - - // The type of VPN connection (ipsec.1). - Type *string `type:"string" required:"true"` - - // The ID of the virtual private gateway. - VPNGatewayID *string `locationName:"VpnGatewayId" type:"string" required:"true"` - - metadataCreateVPNConnectionInput `json:"-" xml:"-"` -} - -type metadataCreateVPNConnectionInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPNConnectionOutput struct { - // Information about the VPN connection. - VPNConnection *VPNConnection `locationName:"vpnConnection" type:"structure"` - - metadataCreateVPNConnectionOutput `json:"-" xml:"-"` -} - -type metadataCreateVPNConnectionOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPNConnectionRouteInput struct { - // The CIDR block associated with the local subnet of the customer network. - DestinationCIDRBlock *string `locationName:"DestinationCidrBlock" type:"string" required:"true"` - - // The ID of the VPN connection. - VPNConnectionID *string `locationName:"VpnConnectionId" type:"string" required:"true"` - - metadataCreateVPNConnectionRouteInput `json:"-" xml:"-"` -} - -type metadataCreateVPNConnectionRouteInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPNConnectionRouteOutput struct { - metadataCreateVPNConnectionRouteOutput `json:"-" xml:"-"` -} - -type metadataCreateVPNConnectionRouteOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPNGatewayInput struct { - // The Availability Zone for the virtual private gateway. - AvailabilityZone *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The type of VPN connection this virtual private gateway supports. - Type *string `type:"string" required:"true"` - - metadataCreateVPNGatewayInput `json:"-" xml:"-"` -} - -type metadataCreateVPNGatewayInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type CreateVPNGatewayOutput struct { - // Information about the virtual private gateway. - VPNGateway *VPNGateway `locationName:"vpnGateway" type:"structure"` - - metadataCreateVPNGatewayOutput `json:"-" xml:"-"` -} - -type metadataCreateVPNGatewayOutput struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s CreateTagsOutput) GoString() string { + return s.String() } type CreateVolumeInput struct { @@ -9165,15 +9281,16 @@ type CreateVolumeInput struct { // IOPS/GiB. // // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes - IOPS *int64 `locationName:"Iops" type:"integer"` + Iops *int64 `type:"integer"` - // The full ARN of the AWS Key Management Service (KMS) master key to use when - // creating the encrypted volume. This parameter is only required if you want - // to use a non-default master key; if this parameter is not specified, the - // default master key is used. The ARN contains the arn:aws:kms namespace, followed - // by the region of the master key, the AWS account ID of the master key owner, - // the key namespace, and then the master key ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - KMSKeyID *string `locationName:"KmsKeyId" type:"string"` + // The full ARN of the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use when creating the encrypted volume. This parameter is only + // required if you want to use a non-default CMK; if this parameter is not specified, + // the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, the + // key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // If a KmsKeyId is specified, the Encrypted flag must also be set. + KmsKeyId *string `type:"string"` // The size of the volume, in GiBs. // @@ -9186,13 +9303,13 @@ type CreateVolumeInput struct { Size *int64 `type:"integer"` // The snapshot from which to create the volume. - SnapshotID *string `locationName:"SnapshotId" type:"string"` + SnapshotId *string `type:"string"` // The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for // Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes. // // Default: standard - VolumeType *string `type:"string"` + VolumeType *string `type:"string" enum:"VolumeType"` metadataCreateVolumeInput `json:"-" xml:"-"` } @@ -9201,16 +9318,26 @@ type metadataCreateVolumeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVolumeInput) GoString() string { + return s.String() +} + // Describes the user or group to be added or removed from the permissions for // a volume. type CreateVolumePermission struct { // The specific group that is to be added or removed from a volume's list of // create volume permissions. - Group *string `locationName:"group" type:"string"` + Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` // The specific AWS account ID that is to be added or removed from a volume's // list of create volume permissions. - UserID *string `locationName:"userId" type:"string"` + UserId *string `locationName:"userId" type:"string"` metadataCreateVolumePermission `json:"-" xml:"-"` } @@ -9219,6 +9346,16 @@ type metadataCreateVolumePermission struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateVolumePermission) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVolumePermission) GoString() string { + return s.String() +} + // Describes modifications to the permissions for a volume. type CreateVolumePermissionModifications struct { // Adds a specific AWS account ID or group to a volume's list of create volume @@ -9236,17 +9373,362 @@ type metadataCreateVolumePermissionModifications struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateVolumePermissionModifications) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVolumePermissionModifications) GoString() string { + return s.String() +} + +type CreateVpcEndpointInput struct { + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // A policy to attach to the endpoint that controls access to the service. The + // policy must be in valid JSON format. If this parameter is not specified, + // we attach a default policy that allows full access to the service. + PolicyDocument *string `type:"string"` + + // One or more route table IDs. + RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` + + // The AWS service name, in the form com.amazonaws.region.service. To get a + // list of available services, use the DescribeVpcEndpointServices request. + ServiceName *string `type:"string" required:"true"` + + // The ID of the VPC in which the endpoint will be used. + VpcId *string `type:"string" required:"true"` + + metadataCreateVpcEndpointInput `json:"-" xml:"-"` +} + +type metadataCreateVpcEndpointInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpcEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpcEndpointInput) GoString() string { + return s.String() +} + +type CreateVpcEndpointOutput struct { + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the endpoint. + VpcEndpoint *VpcEndpoint `locationName:"vpcEndpoint" type:"structure"` + + metadataCreateVpcEndpointOutput `json:"-" xml:"-"` +} + +type metadataCreateVpcEndpointOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpcEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpcEndpointOutput) GoString() string { + return s.String() +} + +type CreateVpcInput struct { + // The network range for the VPC, in CIDR notation. For example, 10.0.0.0/16. + CidrBlock *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The supported tenancy options for instances launched into the VPC. A value + // of default means that instances can be launched with any tenancy; a value + // of dedicated means all instances launched into the VPC are launched as dedicated + // tenancy instances regardless of the tenancy assigned to the instance at launch. + // Dedicated tenancy instances run on single-tenant hardware. + // + // Default: default + InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` + + metadataCreateVpcInput `json:"-" xml:"-"` +} + +type metadataCreateVpcInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpcInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpcInput) GoString() string { + return s.String() +} + +type CreateVpcOutput struct { + // Information about the VPC. + Vpc *Vpc `locationName:"vpc" type:"structure"` + + metadataCreateVpcOutput `json:"-" xml:"-"` +} + +type metadataCreateVpcOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpcOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpcOutput) GoString() string { + return s.String() +} + +type CreateVpcPeeringConnectionInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The AWS account ID of the owner of the peer VPC. + // + // Default: Your AWS account ID + PeerOwnerId *string `locationName:"peerOwnerId" type:"string"` + + // The ID of the VPC with which you are creating the VPC peering connection. + PeerVpcId *string `locationName:"peerVpcId" type:"string"` + + // The ID of the requester VPC. + VpcId *string `locationName:"vpcId" type:"string"` + + metadataCreateVpcPeeringConnectionInput `json:"-" xml:"-"` +} + +type metadataCreateVpcPeeringConnectionInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpcPeeringConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpcPeeringConnectionInput) GoString() string { + return s.String() +} + +type CreateVpcPeeringConnectionOutput struct { + // Information about the VPC peering connection. + VpcPeeringConnection *VpcPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"` + + metadataCreateVpcPeeringConnectionOutput `json:"-" xml:"-"` +} + +type metadataCreateVpcPeeringConnectionOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpcPeeringConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpcPeeringConnectionOutput) GoString() string { + return s.String() +} + +type CreateVpnConnectionInput struct { + // The ID of the customer gateway. + CustomerGatewayId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // Indicates whether the VPN connection requires static routes. If you are creating + // a VPN connection for a device that does not support BGP, you must specify + // true. + // + // Default: false + Options *VpnConnectionOptionsSpecification `locationName:"options" type:"structure"` + + // The type of VPN connection (ipsec.1). + Type *string `type:"string" required:"true"` + + // The ID of the virtual private gateway. + VpnGatewayId *string `type:"string" required:"true"` + + metadataCreateVpnConnectionInput `json:"-" xml:"-"` +} + +type metadataCreateVpnConnectionInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpnConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpnConnectionInput) GoString() string { + return s.String() +} + +type CreateVpnConnectionOutput struct { + // Information about the VPN connection. + VpnConnection *VpnConnection `locationName:"vpnConnection" type:"structure"` + + metadataCreateVpnConnectionOutput `json:"-" xml:"-"` +} + +type metadataCreateVpnConnectionOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpnConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpnConnectionOutput) GoString() string { + return s.String() +} + +type CreateVpnConnectionRouteInput struct { + // The CIDR block associated with the local subnet of the customer network. + DestinationCidrBlock *string `type:"string" required:"true"` + + // The ID of the VPN connection. + VpnConnectionId *string `type:"string" required:"true"` + + metadataCreateVpnConnectionRouteInput `json:"-" xml:"-"` +} + +type metadataCreateVpnConnectionRouteInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpnConnectionRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpnConnectionRouteInput) GoString() string { + return s.String() +} + +type CreateVpnConnectionRouteOutput struct { + metadataCreateVpnConnectionRouteOutput `json:"-" xml:"-"` +} + +type metadataCreateVpnConnectionRouteOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpnConnectionRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpnConnectionRouteOutput) GoString() string { + return s.String() +} + +type CreateVpnGatewayInput struct { + // The Availability Zone for the virtual private gateway. + AvailabilityZone *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The type of VPN connection this virtual private gateway supports. + Type *string `type:"string" required:"true" enum:"GatewayType"` + + metadataCreateVpnGatewayInput `json:"-" xml:"-"` +} + +type metadataCreateVpnGatewayInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpnGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpnGatewayInput) GoString() string { + return s.String() +} + +type CreateVpnGatewayOutput struct { + // Information about the virtual private gateway. + VpnGateway *VpnGateway `locationName:"vpnGateway" type:"structure"` + + metadataCreateVpnGatewayOutput `json:"-" xml:"-"` +} + +type metadataCreateVpnGatewayOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s CreateVpnGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateVpnGatewayOutput) GoString() string { + return s.String() +} + // Describes a customer gateway. type CustomerGateway struct { // The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number // (ASN). - BGPASN *string `locationName:"bgpAsn" type:"string"` + BgpAsn *string `locationName:"bgpAsn" type:"string"` // The ID of the customer gateway. - CustomerGatewayID *string `locationName:"customerGatewayId" type:"string"` + CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"` // The Internet-routable IP address of the customer gateway's outside interface. - IPAddress *string `locationName:"ipAddress" type:"string"` + IpAddress *string `locationName:"ipAddress" type:"string"` // The current state of the customer gateway (pending | available | deleting // | deleted). @@ -9265,42 +9747,19 @@ type metadataCustomerGateway struct { SDKShapeTraits bool `type:"structure"` } -// Describes a DHCP configuration option. -type DHCPConfiguration struct { - // The name of a DHCP option. - Key *string `locationName:"key" type:"string"` - - // One or more values for the DHCP option. - Values []*AttributeValue `locationName:"valueSet" locationNameList:"item" type:"list"` - - metadataDHCPConfiguration `json:"-" xml:"-"` +// String returns the string representation +func (s CustomerGateway) String() string { + return awsutil.Prettify(s) } -type metadataDHCPConfiguration struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes a set of DHCP options. -type DHCPOptions struct { - // One or more DHCP options in the set. - DHCPConfigurations []*DHCPConfiguration `locationName:"dhcpConfigurationSet" locationNameList:"item" type:"list"` - - // The ID of the set of DHCP options. - DHCPOptionsID *string `locationName:"dhcpOptionsId" type:"string"` - - // Any tags assigned to the DHCP options set. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - metadataDHCPOptions `json:"-" xml:"-"` -} - -type metadataDHCPOptions struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s CustomerGateway) GoString() string { + return s.String() } type DeleteCustomerGatewayInput struct { // The ID of the customer gateway. - CustomerGatewayID *string `locationName:"CustomerGatewayId" type:"string" required:"true"` + CustomerGatewayId *string `type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9315,6 +9774,16 @@ type metadataDeleteCustomerGatewayInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteCustomerGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCustomerGatewayInput) GoString() string { + return s.String() +} + type DeleteCustomerGatewayOutput struct { metadataDeleteCustomerGatewayOutput `json:"-" xml:"-"` } @@ -9323,9 +9792,19 @@ type metadataDeleteCustomerGatewayOutput struct { SDKShapeTraits bool `type:"structure"` } -type DeleteDHCPOptionsInput struct { +// String returns the string representation +func (s DeleteCustomerGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCustomerGatewayOutput) GoString() string { + return s.String() +} + +type DeleteDhcpOptionsInput struct { // The ID of the DHCP options set. - DHCPOptionsID *string `locationName:"DhcpOptionsId" type:"string" required:"true"` + DhcpOptionsId *string `type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9333,21 +9812,83 @@ type DeleteDHCPOptionsInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - metadataDeleteDHCPOptionsInput `json:"-" xml:"-"` + metadataDeleteDhcpOptionsInput `json:"-" xml:"-"` } -type metadataDeleteDHCPOptionsInput struct { +type metadataDeleteDhcpOptionsInput struct { SDKShapeTraits bool `type:"structure"` } -type DeleteDHCPOptionsOutput struct { - metadataDeleteDHCPOptionsOutput `json:"-" xml:"-"` +// String returns the string representation +func (s DeleteDhcpOptionsInput) String() string { + return awsutil.Prettify(s) } -type metadataDeleteDHCPOptionsOutput struct { +// GoString returns the string representation +func (s DeleteDhcpOptionsInput) GoString() string { + return s.String() +} + +type DeleteDhcpOptionsOutput struct { + metadataDeleteDhcpOptionsOutput `json:"-" xml:"-"` +} + +type metadataDeleteDhcpOptionsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteDhcpOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDhcpOptionsOutput) GoString() string { + return s.String() +} + +type DeleteFlowLogsInput struct { + // One or more flow log IDs. + FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list" required:"true"` + + metadataDeleteFlowLogsInput `json:"-" xml:"-"` +} + +type metadataDeleteFlowLogsInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteFlowLogsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFlowLogsInput) GoString() string { + return s.String() +} + +type DeleteFlowLogsOutput struct { + // Information about the flow logs that could not be deleted successfully. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` + + metadataDeleteFlowLogsOutput `json:"-" xml:"-"` +} + +type metadataDeleteFlowLogsOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteFlowLogsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFlowLogsOutput) GoString() string { + return s.String() +} + type DeleteInternetGatewayInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9356,7 +9897,7 @@ type DeleteInternetGatewayInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the Internet gateway. - InternetGatewayID *string `locationName:"internetGatewayId" type:"string" required:"true"` + InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` metadataDeleteInternetGatewayInput `json:"-" xml:"-"` } @@ -9365,6 +9906,16 @@ type metadataDeleteInternetGatewayInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteInternetGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInternetGatewayInput) GoString() string { + return s.String() +} + type DeleteInternetGatewayOutput struct { metadataDeleteInternetGatewayOutput `json:"-" xml:"-"` } @@ -9373,6 +9924,16 @@ type metadataDeleteInternetGatewayOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteInternetGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInternetGatewayOutput) GoString() string { + return s.String() +} + type DeleteKeyPairInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9390,6 +9951,16 @@ type metadataDeleteKeyPairInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteKeyPairInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteKeyPairInput) GoString() string { + return s.String() +} + type DeleteKeyPairOutput struct { metadataDeleteKeyPairOutput `json:"-" xml:"-"` } @@ -9398,7 +9969,17 @@ type metadataDeleteKeyPairOutput struct { SDKShapeTraits bool `type:"structure"` } -type DeleteNetworkACLEntryInput struct { +// String returns the string representation +func (s DeleteKeyPairOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteKeyPairOutput) GoString() string { + return s.String() +} + +type DeleteNetworkAclEntryInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -9409,27 +9990,47 @@ type DeleteNetworkACLEntryInput struct { Egress *bool `locationName:"egress" type:"boolean" required:"true"` // The ID of the network ACL. - NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"` + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` // The rule number of the entry to delete. RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` - metadataDeleteNetworkACLEntryInput `json:"-" xml:"-"` + metadataDeleteNetworkAclEntryInput `json:"-" xml:"-"` } -type metadataDeleteNetworkACLEntryInput struct { +type metadataDeleteNetworkAclEntryInput struct { SDKShapeTraits bool `type:"structure"` } -type DeleteNetworkACLEntryOutput struct { - metadataDeleteNetworkACLEntryOutput `json:"-" xml:"-"` +// String returns the string representation +func (s DeleteNetworkAclEntryInput) String() string { + return awsutil.Prettify(s) } -type metadataDeleteNetworkACLEntryOutput struct { +// GoString returns the string representation +func (s DeleteNetworkAclEntryInput) GoString() string { + return s.String() +} + +type DeleteNetworkAclEntryOutput struct { + metadataDeleteNetworkAclEntryOutput `json:"-" xml:"-"` +} + +type metadataDeleteNetworkAclEntryOutput struct { SDKShapeTraits bool `type:"structure"` } -type DeleteNetworkACLInput struct { +// String returns the string representation +func (s DeleteNetworkAclEntryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNetworkAclEntryOutput) GoString() string { + return s.String() +} + +type DeleteNetworkAclInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -9437,23 +10038,43 @@ type DeleteNetworkACLInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the network ACL. - NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"` + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` - metadataDeleteNetworkACLInput `json:"-" xml:"-"` + metadataDeleteNetworkAclInput `json:"-" xml:"-"` } -type metadataDeleteNetworkACLInput struct { +type metadataDeleteNetworkAclInput struct { SDKShapeTraits bool `type:"structure"` } -type DeleteNetworkACLOutput struct { - metadataDeleteNetworkACLOutput `json:"-" xml:"-"` +// String returns the string representation +func (s DeleteNetworkAclInput) String() string { + return awsutil.Prettify(s) } -type metadataDeleteNetworkACLOutput struct { +// GoString returns the string representation +func (s DeleteNetworkAclInput) GoString() string { + return s.String() +} + +type DeleteNetworkAclOutput struct { + metadataDeleteNetworkAclOutput `json:"-" xml:"-"` +} + +type metadataDeleteNetworkAclOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteNetworkAclOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNetworkAclOutput) GoString() string { + return s.String() +} + type DeleteNetworkInterfaceInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9462,7 +10083,7 @@ type DeleteNetworkInterfaceInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` metadataDeleteNetworkInterfaceInput `json:"-" xml:"-"` } @@ -9471,6 +10092,16 @@ type metadataDeleteNetworkInterfaceInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteNetworkInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNetworkInterfaceInput) GoString() string { + return s.String() +} + type DeleteNetworkInterfaceOutput struct { metadataDeleteNetworkInterfaceOutput `json:"-" xml:"-"` } @@ -9479,6 +10110,16 @@ type metadataDeleteNetworkInterfaceOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteNetworkInterfaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNetworkInterfaceOutput) GoString() string { + return s.String() +} + type DeletePlacementGroupInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9496,6 +10137,16 @@ type metadataDeletePlacementGroupInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeletePlacementGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePlacementGroupInput) GoString() string { + return s.String() +} + type DeletePlacementGroupOutput struct { metadataDeletePlacementGroupOutput `json:"-" xml:"-"` } @@ -9504,10 +10155,20 @@ type metadataDeletePlacementGroupOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeletePlacementGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePlacementGroupOutput) GoString() string { + return s.String() +} + type DeleteRouteInput struct { // The CIDR range for the route. The value you specify must match the CIDR for // the route exactly. - DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"` + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9516,7 +10177,7 @@ type DeleteRouteInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the route table. - RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"` + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` metadataDeleteRouteInput `json:"-" xml:"-"` } @@ -9525,6 +10186,16 @@ type metadataDeleteRouteInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteInput) GoString() string { + return s.String() +} + type DeleteRouteOutput struct { metadataDeleteRouteOutput `json:"-" xml:"-"` } @@ -9533,6 +10204,16 @@ type metadataDeleteRouteOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteOutput) GoString() string { + return s.String() +} + type DeleteRouteTableInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9541,7 +10222,7 @@ type DeleteRouteTableInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the route table. - RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"` + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` metadataDeleteRouteTableInput `json:"-" xml:"-"` } @@ -9550,6 +10231,16 @@ type metadataDeleteRouteTableInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteTableInput) GoString() string { + return s.String() +} + type DeleteRouteTableOutput struct { metadataDeleteRouteTableOutput `json:"-" xml:"-"` } @@ -9558,6 +10249,16 @@ type metadataDeleteRouteTableOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteTableOutput) GoString() string { + return s.String() +} + type DeleteSecurityGroupInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9566,7 +10267,7 @@ type DeleteSecurityGroupInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the security group. Required for a nondefault VPC. - GroupID *string `locationName:"GroupId" type:"string"` + GroupId *string `type:"string"` // [EC2-Classic, default VPC] The name of the security group. You can specify // either the security group name or the security group ID. @@ -9579,6 +10280,16 @@ type metadataDeleteSecurityGroupInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteSecurityGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecurityGroupInput) GoString() string { + return s.String() +} + type DeleteSecurityGroupOutput struct { metadataDeleteSecurityGroupOutput `json:"-" xml:"-"` } @@ -9587,6 +10298,16 @@ type metadataDeleteSecurityGroupOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSecurityGroupOutput) GoString() string { + return s.String() +} + type DeleteSnapshotInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9595,7 +10316,7 @@ type DeleteSnapshotInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the EBS snapshot. - SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"` + SnapshotId *string `type:"string" required:"true"` metadataDeleteSnapshotInput `json:"-" xml:"-"` } @@ -9604,6 +10325,16 @@ type metadataDeleteSnapshotInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSnapshotInput) GoString() string { + return s.String() +} + type DeleteSnapshotOutput struct { metadataDeleteSnapshotOutput `json:"-" xml:"-"` } @@ -9612,6 +10343,16 @@ type metadataDeleteSnapshotOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSnapshotOutput) GoString() string { + return s.String() +} + // Contains the parameters for DeleteSpotDatafeedSubscription. type DeleteSpotDatafeedSubscriptionInput struct { // Checks whether you have the required permissions for the action, without @@ -9627,6 +10368,16 @@ type metadataDeleteSpotDatafeedSubscriptionInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteSpotDatafeedSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSpotDatafeedSubscriptionInput) GoString() string { + return s.String() +} + type DeleteSpotDatafeedSubscriptionOutput struct { metadataDeleteSpotDatafeedSubscriptionOutput `json:"-" xml:"-"` } @@ -9635,6 +10386,16 @@ type metadataDeleteSpotDatafeedSubscriptionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteSpotDatafeedSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string { + return s.String() +} + type DeleteSubnetInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9643,7 +10404,7 @@ type DeleteSubnetInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the subnet. - SubnetID *string `locationName:"SubnetId" type:"string" required:"true"` + SubnetId *string `type:"string" required:"true"` metadataDeleteSubnetInput `json:"-" xml:"-"` } @@ -9652,6 +10413,16 @@ type metadataDeleteSubnetInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteSubnetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSubnetInput) GoString() string { + return s.String() +} + type DeleteSubnetOutput struct { metadataDeleteSubnetOutput `json:"-" xml:"-"` } @@ -9660,6 +10431,16 @@ type metadataDeleteSubnetOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteSubnetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSubnetOutput) GoString() string { + return s.String() +} + type DeleteTagsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9683,6 +10464,16 @@ type metadataDeleteTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsInput) GoString() string { + return s.String() +} + type DeleteTagsOutput struct { metadataDeleteTagsOutput `json:"-" xml:"-"` } @@ -9691,157 +10482,14 @@ type metadataDeleteTagsOutput struct { SDKShapeTraits bool `type:"structure"` } -type DeleteVPCEndpointsInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more endpoint IDs. - VPCEndpointIDs []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` - - metadataDeleteVPCEndpointsInput `json:"-" xml:"-"` +// String returns the string representation +func (s DeleteTagsOutput) String() string { + return awsutil.Prettify(s) } -type metadataDeleteVPCEndpointsInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPCEndpointsOutput struct { - // Information about the endpoints that were not successfully deleted. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` - - metadataDeleteVPCEndpointsOutput `json:"-" xml:"-"` -} - -type metadataDeleteVPCEndpointsOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPCInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - VPCID *string `locationName:"VpcId" type:"string" required:"true"` - - metadataDeleteVPCInput `json:"-" xml:"-"` -} - -type metadataDeleteVPCInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPCOutput struct { - metadataDeleteVPCOutput `json:"-" xml:"-"` -} - -type metadataDeleteVPCOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPCPeeringConnectionInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC peering connection. - VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` - - metadataDeleteVPCPeeringConnectionInput `json:"-" xml:"-"` -} - -type metadataDeleteVPCPeeringConnectionInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPCPeeringConnectionOutput struct { - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` - - metadataDeleteVPCPeeringConnectionOutput `json:"-" xml:"-"` -} - -type metadataDeleteVPCPeeringConnectionOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPNConnectionInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPN connection. - VPNConnectionID *string `locationName:"VpnConnectionId" type:"string" required:"true"` - - metadataDeleteVPNConnectionInput `json:"-" xml:"-"` -} - -type metadataDeleteVPNConnectionInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPNConnectionOutput struct { - metadataDeleteVPNConnectionOutput `json:"-" xml:"-"` -} - -type metadataDeleteVPNConnectionOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPNConnectionRouteInput struct { - // The CIDR block associated with the local subnet of the customer network. - DestinationCIDRBlock *string `locationName:"DestinationCidrBlock" type:"string" required:"true"` - - // The ID of the VPN connection. - VPNConnectionID *string `locationName:"VpnConnectionId" type:"string" required:"true"` - - metadataDeleteVPNConnectionRouteInput `json:"-" xml:"-"` -} - -type metadataDeleteVPNConnectionRouteInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPNConnectionRouteOutput struct { - metadataDeleteVPNConnectionRouteOutput `json:"-" xml:"-"` -} - -type metadataDeleteVPNConnectionRouteOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPNGatewayInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the virtual private gateway. - VPNGatewayID *string `locationName:"VpnGatewayId" type:"string" required:"true"` - - metadataDeleteVPNGatewayInput `json:"-" xml:"-"` -} - -type metadataDeleteVPNGatewayInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DeleteVPNGatewayOutput struct { - metadataDeleteVPNGatewayOutput `json:"-" xml:"-"` -} - -type metadataDeleteVPNGatewayOutput struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s DeleteTagsOutput) GoString() string { + return s.String() } type DeleteVolumeInput struct { @@ -9852,7 +10500,7 @@ type DeleteVolumeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the volume. - VolumeID *string `locationName:"VolumeId" type:"string" required:"true"` + VolumeId *string `type:"string" required:"true"` metadataDeleteVolumeInput `json:"-" xml:"-"` } @@ -9861,6 +10509,16 @@ type metadataDeleteVolumeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVolumeInput) GoString() string { + return s.String() +} + type DeleteVolumeOutput struct { metadataDeleteVolumeOutput `json:"-" xml:"-"` } @@ -9869,6 +10527,289 @@ type metadataDeleteVolumeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVolumeOutput) GoString() string { + return s.String() +} + +type DeleteVpcEndpointsInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more endpoint IDs. + VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` + + metadataDeleteVpcEndpointsInput `json:"-" xml:"-"` +} + +type metadataDeleteVpcEndpointsInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpcEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpcEndpointsInput) GoString() string { + return s.String() +} + +type DeleteVpcEndpointsOutput struct { + // Information about the endpoints that were not successfully deleted. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` + + metadataDeleteVpcEndpointsOutput `json:"-" xml:"-"` +} + +type metadataDeleteVpcEndpointsOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpcEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpcEndpointsOutput) GoString() string { + return s.String() +} + +type DeleteVpcInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC. + VpcId *string `type:"string" required:"true"` + + metadataDeleteVpcInput `json:"-" xml:"-"` +} + +type metadataDeleteVpcInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpcInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpcInput) GoString() string { + return s.String() +} + +type DeleteVpcOutput struct { + metadataDeleteVpcOutput `json:"-" xml:"-"` +} + +type metadataDeleteVpcOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpcOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpcOutput) GoString() string { + return s.String() +} + +type DeleteVpcPeeringConnectionInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC peering connection. + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` + + metadataDeleteVpcPeeringConnectionInput `json:"-" xml:"-"` +} + +type metadataDeleteVpcPeeringConnectionInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpcPeeringConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpcPeeringConnectionInput) GoString() string { + return s.String() +} + +type DeleteVpcPeeringConnectionOutput struct { + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` + + metadataDeleteVpcPeeringConnectionOutput `json:"-" xml:"-"` +} + +type metadataDeleteVpcPeeringConnectionOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpcPeeringConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpcPeeringConnectionOutput) GoString() string { + return s.String() +} + +type DeleteVpnConnectionInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the VPN connection. + VpnConnectionId *string `type:"string" required:"true"` + + metadataDeleteVpnConnectionInput `json:"-" xml:"-"` +} + +type metadataDeleteVpnConnectionInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpnConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpnConnectionInput) GoString() string { + return s.String() +} + +type DeleteVpnConnectionOutput struct { + metadataDeleteVpnConnectionOutput `json:"-" xml:"-"` +} + +type metadataDeleteVpnConnectionOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpnConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpnConnectionOutput) GoString() string { + return s.String() +} + +type DeleteVpnConnectionRouteInput struct { + // The CIDR block associated with the local subnet of the customer network. + DestinationCidrBlock *string `type:"string" required:"true"` + + // The ID of the VPN connection. + VpnConnectionId *string `type:"string" required:"true"` + + metadataDeleteVpnConnectionRouteInput `json:"-" xml:"-"` +} + +type metadataDeleteVpnConnectionRouteInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpnConnectionRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpnConnectionRouteInput) GoString() string { + return s.String() +} + +type DeleteVpnConnectionRouteOutput struct { + metadataDeleteVpnConnectionRouteOutput `json:"-" xml:"-"` +} + +type metadataDeleteVpnConnectionRouteOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpnConnectionRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpnConnectionRouteOutput) GoString() string { + return s.String() +} + +type DeleteVpnGatewayInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the virtual private gateway. + VpnGatewayId *string `type:"string" required:"true"` + + metadataDeleteVpnGatewayInput `json:"-" xml:"-"` +} + +type metadataDeleteVpnGatewayInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpnGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpnGatewayInput) GoString() string { + return s.String() +} + +type DeleteVpnGatewayOutput struct { + metadataDeleteVpnGatewayOutput `json:"-" xml:"-"` +} + +type metadataDeleteVpnGatewayOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DeleteVpnGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVpnGatewayOutput) GoString() string { + return s.String() +} + type DeregisterImageInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9877,7 +10818,7 @@ type DeregisterImageInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the AMI. - ImageID *string `locationName:"ImageId" type:"string" required:"true"` + ImageId *string `type:"string" required:"true"` metadataDeregisterImageInput `json:"-" xml:"-"` } @@ -9886,6 +10827,16 @@ type metadataDeregisterImageInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeregisterImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterImageInput) GoString() string { + return s.String() +} + type DeregisterImageOutput struct { metadataDeregisterImageOutput `json:"-" xml:"-"` } @@ -9894,6 +10845,16 @@ type metadataDeregisterImageOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeregisterImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterImageOutput) GoString() string { + return s.String() +} + type DescribeAccountAttributesInput struct { // One or more account attribute names. AttributeNames []*string `locationName:"attributeName" locationNameList:"attributeName" type:"list"` @@ -9911,6 +10872,16 @@ type metadataDescribeAccountAttributesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAccountAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountAttributesInput) GoString() string { + return s.String() +} + type DescribeAccountAttributesOutput struct { // Information about one or more account attributes. AccountAttributes []*AccountAttribute `locationName:"accountAttributeSet" locationNameList:"item" type:"list"` @@ -9922,11 +10893,21 @@ type metadataDescribeAccountAttributesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAccountAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountAttributesOutput) GoString() string { + return s.String() +} + type DescribeAddressesInput struct { // [EC2-VPC] One or more allocation IDs. // // Default: Describes all your Elastic IP addresses. - AllocationIDs []*string `locationName:"AllocationId" locationNameList:"AllocationId" type:"list"` + AllocationIds []*string `locationName:"AllocationId" locationNameList:"AllocationId" type:"list"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -9960,7 +10941,7 @@ type DescribeAddressesInput struct { // [EC2-Classic] One or more Elastic IP addresses. // // Default: Describes all your Elastic IP addresses. - PublicIPs []*string `locationName:"PublicIp" locationNameList:"PublicIp" type:"list"` + PublicIps []*string `locationName:"PublicIp" locationNameList:"PublicIp" type:"list"` metadataDescribeAddressesInput `json:"-" xml:"-"` } @@ -9969,6 +10950,16 @@ type metadataDescribeAddressesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAddressesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAddressesInput) GoString() string { + return s.String() +} + type DescribeAddressesOutput struct { // Information about one or more Elastic IP addresses. Addresses []*Address `locationName:"addressesSet" locationNameList:"item" type:"list"` @@ -9980,6 +10971,16 @@ type metadataDescribeAddressesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAddressesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAddressesOutput) GoString() string { + return s.String() +} + type DescribeAvailabilityZonesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10009,6 +11010,16 @@ type metadataDescribeAvailabilityZonesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAvailabilityZonesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAvailabilityZonesInput) GoString() string { + return s.String() +} + type DescribeAvailabilityZonesOutput struct { // Information about one or more Availability Zones. AvailabilityZones []*AvailabilityZone `locationName:"availabilityZoneInfo" locationNameList:"item" type:"list"` @@ -10020,11 +11031,21 @@ type metadataDescribeAvailabilityZonesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeAvailabilityZonesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAvailabilityZonesOutput) GoString() string { + return s.String() +} + type DescribeBundleTasksInput struct { // One or more bundle task IDs. // // Default: Describes all your bundle tasks. - BundleIDs []*string `locationName:"BundleId" locationNameList:"BundleId" type:"list"` + BundleIds []*string `locationName:"BundleId" locationNameList:"BundleId" type:"list"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10064,6 +11085,16 @@ type metadataDescribeBundleTasksInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeBundleTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBundleTasksInput) GoString() string { + return s.String() +} + type DescribeBundleTasksOutput struct { // Information about one or more bundle tasks. BundleTasks []*BundleTask `locationName:"bundleInstanceTasksSet" locationNameList:"item" type:"list"` @@ -10075,6 +11106,16 @@ type metadataDescribeBundleTasksOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeBundleTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBundleTasksOutput) GoString() string { + return s.String() +} + type DescribeClassicLinkInstancesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10104,7 +11145,7 @@ type DescribeClassicLinkInstancesInput struct { Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more instance IDs. Must be instances linked to a VPC through ClassicLink. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` // The maximum number of results to return for the request in a single page. // The remaining results of the initial request can be seen by sending another @@ -10126,6 +11167,16 @@ type metadataDescribeClassicLinkInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeClassicLinkInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClassicLinkInstancesInput) GoString() string { + return s.String() +} + type DescribeClassicLinkInstancesOutput struct { // Information about one or more linked EC2-Classic instances. Instances []*ClassicLinkInstance `locationName:"instancesSet" locationNameList:"item" type:"list"` @@ -10141,9 +11192,19 @@ type metadataDescribeClassicLinkInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeClassicLinkInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClassicLinkInstancesOutput) GoString() string { + return s.String() +} + type DescribeConversionTasksInput struct { // One or more conversion task IDs. - ConversionTaskIDs []*string `locationName:"conversionTaskId" locationNameList:"item" type:"list"` + ConversionTaskIds []*string `locationName:"conversionTaskId" locationNameList:"item" type:"list"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10161,6 +11222,16 @@ type metadataDescribeConversionTasksInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeConversionTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConversionTasksInput) GoString() string { + return s.String() +} + type DescribeConversionTasksOutput struct { // Information about the conversion tasks. ConversionTasks []*ConversionTask `locationName:"conversionTasks" locationNameList:"item" type:"list"` @@ -10172,11 +11243,21 @@ type metadataDescribeConversionTasksOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeConversionTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeConversionTasksOutput) GoString() string { + return s.String() +} + type DescribeCustomerGatewaysInput struct { // One or more customer gateway IDs. // // Default: Describes all your customer gateways. - CustomerGatewayIDs []*string `locationName:"CustomerGatewayId" locationNameList:"CustomerGatewayId" type:"list"` + CustomerGatewayIds []*string `locationName:"CustomerGatewayId" locationNameList:"CustomerGatewayId" type:"list"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10220,6 +11301,16 @@ type metadataDescribeCustomerGatewaysInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeCustomerGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCustomerGatewaysInput) GoString() string { + return s.String() +} + type DescribeCustomerGatewaysOutput struct { // Information about one or more customer gateways. CustomerGateways []*CustomerGateway `locationName:"customerGatewaySet" locationNameList:"item" type:"list"` @@ -10231,11 +11322,21 @@ type metadataDescribeCustomerGatewaysOutput struct { SDKShapeTraits bool `type:"structure"` } -type DescribeDHCPOptionsInput struct { +// String returns the string representation +func (s DescribeCustomerGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCustomerGatewaysOutput) GoString() string { + return s.String() +} + +type DescribeDhcpOptionsInput struct { // The IDs of one or more DHCP options sets. // // Default: Describes all your DHCP options sets. - DHCPOptionsIDs []*string `locationName:"DhcpOptionsId" locationNameList:"DhcpOptionsId" type:"list"` + DhcpOptionsIds []*string `locationName:"DhcpOptionsId" locationNameList:"DhcpOptionsId" type:"list"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10264,27 +11365,47 @@ type DescribeDHCPOptionsInput struct { // independent of the tag-key filter. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - metadataDescribeDHCPOptionsInput `json:"-" xml:"-"` + metadataDescribeDhcpOptionsInput `json:"-" xml:"-"` } -type metadataDescribeDHCPOptionsInput struct { +type metadataDescribeDhcpOptionsInput struct { SDKShapeTraits bool `type:"structure"` } -type DescribeDHCPOptionsOutput struct { +// String returns the string representation +func (s DescribeDhcpOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDhcpOptionsInput) GoString() string { + return s.String() +} + +type DescribeDhcpOptionsOutput struct { // Information about one or more DHCP options sets. - DHCPOptions []*DHCPOptions `locationName:"dhcpOptionsSet" locationNameList:"item" type:"list"` + DhcpOptions []*DhcpOptions `locationName:"dhcpOptionsSet" locationNameList:"item" type:"list"` - metadataDescribeDHCPOptionsOutput `json:"-" xml:"-"` + metadataDescribeDhcpOptionsOutput `json:"-" xml:"-"` } -type metadataDescribeDHCPOptionsOutput struct { +type metadataDescribeDhcpOptionsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeDhcpOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDhcpOptionsOutput) GoString() string { + return s.String() +} + type DescribeExportTasksInput struct { // One or more export task IDs. - ExportTaskIDs []*string `locationName:"exportTaskId" locationNameList:"ExportTaskId" type:"list"` + ExportTaskIds []*string `locationName:"exportTaskId" locationNameList:"ExportTaskId" type:"list"` metadataDescribeExportTasksInput `json:"-" xml:"-"` } @@ -10293,6 +11414,16 @@ type metadataDescribeExportTasksInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeExportTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExportTasksInput) GoString() string { + return s.String() +} + type DescribeExportTasksOutput struct { // Information about the export tasks. ExportTasks []*ExportTask `locationName:"exportTaskSet" locationNameList:"item" type:"list"` @@ -10304,13 +11435,92 @@ type metadataDescribeExportTasksOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeExportTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExportTasksOutput) GoString() string { + return s.String() +} + +type DescribeFlowLogsInput struct { + // One or more filters. + // + // deliver-log-status - The status of the logs delivery (SUCCESS | FAILED). + // + // flow-log-id - The ID of the flow log. + // + // log-group-name - The name of the log group. + // + // resource-id - The ID of the VPC, subnet, or network interface. + // + // traffic-type - The type of traffic (ACCEPT | REJECT | ALL) + Filter []*Filter `locationNameList:"Filter" type:"list"` + + // One or more flow log IDs. + FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the returned + // NextToken value. This value can be between 5 and 1000; if MaxResults is given + // a value larger than 1000, only 1000 results are returned. You cannot specify + // this parameter and the flow log IDs parameter in the same request. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` + + metadataDescribeFlowLogsInput `json:"-" xml:"-"` +} + +type metadataDescribeFlowLogsInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeFlowLogsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFlowLogsInput) GoString() string { + return s.String() +} + +type DescribeFlowLogsOutput struct { + // Information about the flow logs. + FlowLogs []*FlowLog `locationName:"flowLogSet" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + metadataDescribeFlowLogsOutput `json:"-" xml:"-"` +} + +type metadataDescribeFlowLogsOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeFlowLogsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFlowLogsOutput) GoString() string { + return s.String() +} + type DescribeImageAttributeInput struct { // The AMI attribute. // // Note: Depending on your account privileges, the blockDeviceMapping attribute // may return a Client.AuthFailure error. If this happens, use DescribeImages // to get information about the block device mapping for the AMI. - Attribute *string `type:"string" required:"true"` + Attribute *string `type:"string" required:"true" enum:"ImageAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10319,7 +11529,7 @@ type DescribeImageAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the AMI. - ImageID *string `locationName:"ImageId" type:"string" required:"true"` + ImageId *string `type:"string" required:"true"` metadataDescribeImageAttributeInput `json:"-" xml:"-"` } @@ -10328,6 +11538,16 @@ type metadataDescribeImageAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeImageAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImageAttributeInput) GoString() string { + return s.String() +} + // Describes an image attribute. type DescribeImageAttributeOutput struct { // One or more block device mapping entries. @@ -10337,10 +11557,10 @@ type DescribeImageAttributeOutput struct { Description *AttributeValue `locationName:"description" type:"structure"` // The ID of the AMI. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` // The kernel ID. - KernelID *AttributeValue `locationName:"kernel" type:"structure"` + KernelId *AttributeValue `locationName:"kernel" type:"structure"` // One or more launch permissions. LaunchPermissions []*LaunchPermission `locationName:"launchPermission" locationNameList:"item" type:"list"` @@ -10349,10 +11569,10 @@ type DescribeImageAttributeOutput struct { ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` // The RAM disk ID. - RAMDiskID *AttributeValue `locationName:"ramdisk" type:"structure"` + RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` // The value to use for a resource attribute. - SRIOVNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` + SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` metadataDescribeImageAttributeOutput `json:"-" xml:"-"` } @@ -10361,6 +11581,16 @@ type metadataDescribeImageAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeImageAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImageAttributeOutput) GoString() string { + return s.String() +} + type DescribeImagesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10447,7 +11677,7 @@ type DescribeImagesInput struct { // One or more image IDs. // // Default: Describes all images available to you. - ImageIDs []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"` + ImageIds []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"` // Filters the images by the owner. Specify an AWS account ID, amazon (owner // is Amazon), aws-marketplace (owner is AWS Marketplace), self (owner is the @@ -10462,6 +11692,16 @@ type metadataDescribeImagesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeImagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImagesInput) GoString() string { + return s.String() +} + type DescribeImagesOutput struct { // Information about one or more images. Images []*Image `locationName:"imagesSet" locationNameList:"item" type:"list"` @@ -10473,6 +11713,16 @@ type metadataDescribeImagesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeImagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImagesOutput) GoString() string { + return s.String() +} + type DescribeImportImageTasksInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10484,7 +11734,7 @@ type DescribeImportImageTasksInput struct { Filters []*Filter `locationNameList:"Filter" type:"list"` // A list of import image task IDs. - ImportTaskIDs []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` + ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` // The maximum number of results to return in a single request. MaxResults *int64 `type:"integer"` @@ -10499,6 +11749,16 @@ type metadataDescribeImportImageTasksInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeImportImageTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImportImageTasksInput) GoString() string { + return s.String() +} + type DescribeImportImageTasksOutput struct { // A list of zero or more import image tasks that are currently active or were // completed or canceled in the previous 7 days. @@ -10515,6 +11775,16 @@ type metadataDescribeImportImageTasksOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeImportImageTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImportImageTasksOutput) GoString() string { + return s.String() +} + type DescribeImportSnapshotTasksInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10526,7 +11796,7 @@ type DescribeImportSnapshotTasksInput struct { Filters []*Filter `locationNameList:"Filter" type:"list"` // A list of import snapshot task IDs. - ImportTaskIDs []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` + ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` // The maximum number of results to return in a single request. MaxResults *int64 `type:"integer"` @@ -10541,6 +11811,16 @@ type metadataDescribeImportSnapshotTasksInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeImportSnapshotTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImportSnapshotTasksInput) GoString() string { + return s.String() +} + type DescribeImportSnapshotTasksOutput struct { // A list of zero or more import snapshot tasks that are currently active or // were completed or canceled in the previous 7 days. @@ -10557,9 +11837,19 @@ type metadataDescribeImportSnapshotTasksOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeImportSnapshotTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImportSnapshotTasksOutput) GoString() string { + return s.String() +} + type DescribeInstanceAttributeInput struct { // The instance attribute. - Attribute *string `locationName:"attribute" type:"string" required:"true"` + Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10568,7 +11858,7 @@ type DescribeInstanceAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string" required:"true"` + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` metadataDescribeInstanceAttributeInput `json:"-" xml:"-"` } @@ -10577,6 +11867,16 @@ type metadataDescribeInstanceAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInstanceAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceAttributeInput) GoString() string { + return s.String() +} + // Describes an instance attribute. type DescribeInstanceAttributeOutput struct { // The block device mapping of the instance. @@ -10584,16 +11884,16 @@ type DescribeInstanceAttributeOutput struct { // If the value is true, you can't terminate the instance through the Amazon // EC2 console, CLI, or API; otherwise, you can. - DisableAPITermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` + DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` // Indicates whether the instance is optimized for EBS I/O. - EBSOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` + EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` // The security groups associated with the instance. Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // Indicates whether an instance stops or terminates when you initiate shutdown // from the instance (using the operating system command for system shutdown). @@ -10603,25 +11903,25 @@ type DescribeInstanceAttributeOutput struct { InstanceType *AttributeValue `locationName:"instanceType" type:"structure"` // The kernel ID. - KernelID *AttributeValue `locationName:"kernel" type:"structure"` + KernelId *AttributeValue `locationName:"kernel" type:"structure"` // A list of product codes. ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` // The RAM disk ID. - RAMDiskID *AttributeValue `locationName:"ramdisk" type:"structure"` + RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` // The name of the root device (for example, /dev/sda1 or /dev/xvda). RootDeviceName *AttributeValue `locationName:"rootDeviceName" type:"structure"` - // The value to use for a resource attribute. - SRIOVNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` - // Indicates whether source/destination checking is enabled. A value of true // means checking is enabled, and false means checking is disabled. This value // must be false for a NAT instance to perform NAT. SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` + // The value to use for a resource attribute. + SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` + // The Base64-encoded MIME user data. UserData *AttributeValue `locationName:"userData" type:"structure"` @@ -10632,6 +11932,16 @@ type metadataDescribeInstanceAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInstanceAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceAttributeOutput) GoString() string { + return s.String() +} + type DescribeInstanceStatusInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10687,7 +11997,7 @@ type DescribeInstanceStatusInput struct { // Default: Describes all your instances. // // Constraints: Maximum 100 explicitly specified instance IDs. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` // The maximum number of results to return for the request in a single page. // The remaining results of the initial request can be seen by sending another @@ -10707,6 +12017,16 @@ type metadataDescribeInstanceStatusInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInstanceStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceStatusInput) GoString() string { + return s.String() +} + type DescribeInstanceStatusOutput struct { // One or more instance status descriptions. InstanceStatuses []*InstanceStatus `locationName:"instanceStatusSet" locationNameList:"item" type:"list"` @@ -10722,6 +12042,16 @@ type metadataDescribeInstanceStatusOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInstanceStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceStatusOutput) GoString() string { + return s.String() +} + type DescribeInstancesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -10957,7 +12287,7 @@ type DescribeInstancesInput struct { // One or more instance IDs. // // Default: Describes all your instances. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` // The maximum number of results to return for the request in a single page. // The remaining results of the initial request can be seen by sending another @@ -10977,6 +12307,16 @@ type metadataDescribeInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstancesInput) GoString() string { + return s.String() +} + type DescribeInstancesOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. @@ -10992,6 +12332,16 @@ type metadataDescribeInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstancesOutput) GoString() string { + return s.String() +} + type DescribeInternetGatewaysInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11024,7 +12374,7 @@ type DescribeInternetGatewaysInput struct { // One or more Internet gateway IDs. // // Default: Describes all your Internet gateways. - InternetGatewayIDs []*string `locationName:"internetGatewayId" locationNameList:"item" type:"list"` + InternetGatewayIds []*string `locationName:"internetGatewayId" locationNameList:"item" type:"list"` metadataDescribeInternetGatewaysInput `json:"-" xml:"-"` } @@ -11033,6 +12383,16 @@ type metadataDescribeInternetGatewaysInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInternetGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInternetGatewaysInput) GoString() string { + return s.String() +} + type DescribeInternetGatewaysOutput struct { // Information about one or more Internet gateways. InternetGateways []*InternetGateway `locationName:"internetGatewaySet" locationNameList:"item" type:"list"` @@ -11044,6 +12404,16 @@ type metadataDescribeInternetGatewaysOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInternetGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInternetGatewaysOutput) GoString() string { + return s.String() +} + type DescribeKeyPairsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11070,6 +12440,16 @@ type metadataDescribeKeyPairsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeKeyPairsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeKeyPairsInput) GoString() string { + return s.String() +} + type DescribeKeyPairsOutput struct { // Information about one or more key pairs. KeyPairs []*KeyPairInfo `locationName:"keySet" locationNameList:"item" type:"list"` @@ -11081,6 +12461,16 @@ type metadataDescribeKeyPairsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeKeyPairsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeKeyPairsOutput) GoString() string { + return s.String() +} + type DescribeMovingAddressesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11105,7 +12495,7 @@ type DescribeMovingAddressesInput struct { NextToken *string `locationName:"nextToken" type:"string"` // One or more Elastic IP addresses. - PublicIPs []*string `locationName:"publicIp" locationNameList:"item" type:"list"` + PublicIps []*string `locationName:"publicIp" locationNameList:"item" type:"list"` metadataDescribeMovingAddressesInput `json:"-" xml:"-"` } @@ -11114,6 +12504,16 @@ type metadataDescribeMovingAddressesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeMovingAddressesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMovingAddressesInput) GoString() string { + return s.String() +} + type DescribeMovingAddressesOutput struct { // The status for each Elastic IP address. MovingAddressStatuses []*MovingAddressStatus `locationName:"movingAddressStatusSet" locationNameList:"item" type:"list"` @@ -11129,7 +12529,17 @@ type metadataDescribeMovingAddressesOutput struct { SDKShapeTraits bool `type:"structure"` } -type DescribeNetworkACLsInput struct { +// String returns the string representation +func (s DescribeMovingAddressesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMovingAddressesOutput) GoString() string { + return s.String() +} + +type DescribeNetworkAclsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -11188,29 +12598,49 @@ type DescribeNetworkACLsInput struct { // One or more network ACL IDs. // // Default: Describes all your network ACLs. - NetworkACLIDs []*string `locationName:"NetworkAclId" locationNameList:"item" type:"list"` + NetworkAclIds []*string `locationName:"NetworkAclId" locationNameList:"item" type:"list"` - metadataDescribeNetworkACLsInput `json:"-" xml:"-"` + metadataDescribeNetworkAclsInput `json:"-" xml:"-"` } -type metadataDescribeNetworkACLsInput struct { +type metadataDescribeNetworkAclsInput struct { SDKShapeTraits bool `type:"structure"` } -type DescribeNetworkACLsOutput struct { +// String returns the string representation +func (s DescribeNetworkAclsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkAclsInput) GoString() string { + return s.String() +} + +type DescribeNetworkAclsOutput struct { // Information about one or more network ACLs. - NetworkACLs []*NetworkACL `locationName:"networkAclSet" locationNameList:"item" type:"list"` + NetworkAcls []*NetworkAcl `locationName:"networkAclSet" locationNameList:"item" type:"list"` - metadataDescribeNetworkACLsOutput `json:"-" xml:"-"` + metadataDescribeNetworkAclsOutput `json:"-" xml:"-"` } -type metadataDescribeNetworkACLsOutput struct { +type metadataDescribeNetworkAclsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeNetworkAclsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkAclsOutput) GoString() string { + return s.String() +} + type DescribeNetworkInterfaceAttributeInput struct { // The attribute of the network interface. - Attribute *string `locationName:"attribute" type:"string"` + Attribute *string `locationName:"attribute" type:"string" enum:"NetworkInterfaceAttribute"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11219,7 +12649,7 @@ type DescribeNetworkInterfaceAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` metadataDescribeNetworkInterfaceAttributeInput `json:"-" xml:"-"` } @@ -11228,6 +12658,16 @@ type metadataDescribeNetworkInterfaceAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeNetworkInterfaceAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfaceAttributeInput) GoString() string { + return s.String() +} + type DescribeNetworkInterfaceAttributeOutput struct { // The attachment (if any) of the network interface. Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"` @@ -11239,7 +12679,7 @@ type DescribeNetworkInterfaceAttributeOutput struct { Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // Indicates whether source/destination checking is enabled. SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` @@ -11251,6 +12691,16 @@ type metadataDescribeNetworkInterfaceAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeNetworkInterfaceAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfaceAttributeOutput) GoString() string { + return s.String() +} + type DescribeNetworkInterfacesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11362,7 +12812,7 @@ type DescribeNetworkInterfacesInput struct { // One or more network interface IDs. // // Default: Describes all your network interfaces. - NetworkInterfaceIDs []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"` + NetworkInterfaceIds []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"` metadataDescribeNetworkInterfacesInput `json:"-" xml:"-"` } @@ -11371,6 +12821,16 @@ type metadataDescribeNetworkInterfacesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeNetworkInterfacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfacesInput) GoString() string { + return s.String() +} + type DescribeNetworkInterfacesOutput struct { // Information about one or more network interfaces. NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` @@ -11382,6 +12842,16 @@ type metadataDescribeNetworkInterfacesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeNetworkInterfacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfacesOutput) GoString() string { + return s.String() +} + type DescribePlacementGroupsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11411,6 +12881,16 @@ type metadataDescribePlacementGroupsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribePlacementGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePlacementGroupsInput) GoString() string { + return s.String() +} + type DescribePlacementGroupsOutput struct { // One or more placement groups. PlacementGroups []*PlacementGroup `locationName:"placementGroupSet" locationNameList:"item" type:"list"` @@ -11422,6 +12902,16 @@ type metadataDescribePlacementGroupsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribePlacementGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePlacementGroupsOutput) GoString() string { + return s.String() +} + type DescribePrefixListsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11449,7 +12939,7 @@ type DescribePrefixListsInput struct { NextToken *string `type:"string"` // One or more prefix list IDs. - PrefixListIDs []*string `locationName:"PrefixListId" locationNameList:"item" type:"list"` + PrefixListIds []*string `locationName:"PrefixListId" locationNameList:"item" type:"list"` metadataDescribePrefixListsInput `json:"-" xml:"-"` } @@ -11458,6 +12948,16 @@ type metadataDescribePrefixListsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribePrefixListsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePrefixListsInput) GoString() string { + return s.String() +} + type DescribePrefixListsOutput struct { // The token to use when requesting the next set of items. If there are no additional // items to return, the string is empty. @@ -11473,6 +12973,16 @@ type metadataDescribePrefixListsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribePrefixListsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePrefixListsOutput) GoString() string { + return s.String() +} + type DescribeRegionsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11497,6 +13007,16 @@ type metadataDescribeRegionsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeRegionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRegionsInput) GoString() string { + return s.String() +} + type DescribeRegionsOutput struct { // Information about one or more regions. Regions []*Region `locationName:"regionInfo" locationNameList:"item" type:"list"` @@ -11508,6 +13028,16 @@ type metadataDescribeRegionsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeRegionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRegionsOutput) GoString() string { + return s.String() +} + type DescribeReservedInstancesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11523,7 +13053,7 @@ type DescribeReservedInstancesInput struct { // duration - The duration of the Reserved Instance (one year or three years), // in seconds (31536000 | 94608000). // - // end - The time when the Reserved Instance expires (for example, 2014-08-07T11:54:42.000Z). + // end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z). // // fixed-price - The purchase price of the Reserved Instance (for example, // 9800.0). @@ -11531,8 +13061,15 @@ type DescribeReservedInstancesInput struct { // instance-type - The instance type on which the Reserved Instance can be // used. // - // product-description - The product description of the Reserved Instance - // (Linux/UNIX | Linux/UNIX (Amazon VPC) | Windows | Windows (Amazon VPC)). + // product-description - The Reserved Instance product platform description. + // Instances that include (Amazon VPC) in the product platform description will + // only be displayed to EC2-Classic account holders and are for use with Amazon + // VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon + // VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | + // Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows + // with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows + // with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows + // with SQL Server Enterprise (Amazon VPC)). // // reserved-instances-id - The ID of the Reserved Instance. // @@ -11561,13 +13098,13 @@ type DescribeReservedInstancesInput struct { // The Reserved Instance offering type. If you are using tools that predate // the 2011-11-01 API version, you only have access to the Medium Utilization // Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string"` + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` // One or more Reserved Instance IDs. // // Default: Describes all your Reserved Instances, or only those otherwise // specified. - ReservedInstancesIDs []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list"` + ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list"` metadataDescribeReservedInstancesInput `json:"-" xml:"-"` } @@ -11576,6 +13113,16 @@ type metadataDescribeReservedInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeReservedInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesInput) GoString() string { + return s.String() +} + type DescribeReservedInstancesListingsInput struct { // One or more filters. // @@ -11590,10 +13137,10 @@ type DescribeReservedInstancesListingsInput struct { Filters []*Filter `locationName:"filters" locationNameList:"Filter" type:"list"` // One or more Reserved Instance IDs. - ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"` + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` // One or more Reserved Instance Listing IDs. - ReservedInstancesListingID *string `locationName:"reservedInstancesListingId" type:"string"` + ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"` metadataDescribeReservedInstancesListingsInput `json:"-" xml:"-"` } @@ -11602,6 +13149,16 @@ type metadataDescribeReservedInstancesListingsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeReservedInstancesListingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesListingsInput) GoString() string { + return s.String() +} + type DescribeReservedInstancesListingsOutput struct { // Information about the Reserved Instance listing. ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` @@ -11613,6 +13170,16 @@ type metadataDescribeReservedInstancesListingsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeReservedInstancesListingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesListingsOutput) GoString() string { + return s.String() +} + type DescribeReservedInstancesModificationsInput struct { // One or more filters. // @@ -11654,7 +13221,7 @@ type DescribeReservedInstancesModificationsInput struct { NextToken *string `locationName:"nextToken" type:"string"` // IDs for the submitted modification request. - ReservedInstancesModificationIDs []*string `locationName:"ReservedInstancesModificationId" locationNameList:"ReservedInstancesModificationId" type:"list"` + ReservedInstancesModificationIds []*string `locationName:"ReservedInstancesModificationId" locationNameList:"ReservedInstancesModificationId" type:"list"` metadataDescribeReservedInstancesModificationsInput `json:"-" xml:"-"` } @@ -11663,6 +13230,16 @@ type metadataDescribeReservedInstancesModificationsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeReservedInstancesModificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesModificationsInput) GoString() string { + return s.String() +} + type DescribeReservedInstancesModificationsOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. @@ -11678,6 +13255,16 @@ type metadataDescribeReservedInstancesModificationsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeReservedInstancesModificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesModificationsOutput) GoString() string { + return s.String() +} + type DescribeReservedInstancesOfferingsInput struct { // The Availability Zone in which the Reserved Instance can be used. AvailabilityZone *string `type:"string"` @@ -11706,8 +13293,15 @@ type DescribeReservedInstancesOfferingsInput struct { // When this filter is not used, which is the default behavior, all offerings // from AWS and Reserved Instance Marketplace are listed. // - // product-description - The description of the Reserved Instance (Linux/UNIX - // | Linux/UNIX (Amazon VPC) | Windows | Windows (Amazon VPC)). + // product-description - The Reserved Instance product platform description. + // Instances that include (Amazon VPC) in the product platform description will + // only be displayed to EC2-Classic account holders and are for use with Amazon + // VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon + // VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | + // Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows + // with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows + // with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows + // with SQL Server Enterprise (Amazon VPC)) // // reserved-instances-offering-id - The Reserved Instances offering ID. // @@ -11723,12 +13317,12 @@ type DescribeReservedInstancesOfferingsInput struct { // VPC. // // Default: default - InstanceTenancy *string `locationName:"instanceTenancy" type:"string"` + InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` // The instance type on which the Reserved Instance can be used. For more information, // see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) // in the Amazon Elastic Compute Cloud User Guide. - InstanceType *string `type:"string"` + InstanceType *string `type:"string" enum:"InstanceType"` // The maximum duration (in seconds) to filter when searching for offerings. // @@ -11758,14 +13352,14 @@ type DescribeReservedInstancesOfferingsInput struct { // The Reserved Instance offering type. If you are using tools that predate // the 2011-11-01 API version, you only have access to the Medium Utilization // Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string"` + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - // The Reserved Instance description. Instances that include (Amazon VPC) in - // the description are for use with Amazon VPC. - ProductDescription *string `type:"string"` + // The Reserved Instance product platform description. Instances that include + // (Amazon VPC) in the description are for use with Amazon VPC. + ProductDescription *string `type:"string" enum:"RIProductDescription"` // One or more Reserved Instances offering IDs. - ReservedInstancesOfferingIDs []*string `locationName:"ReservedInstancesOfferingId" type:"list"` + ReservedInstancesOfferingIds []*string `locationName:"ReservedInstancesOfferingId" type:"list"` metadataDescribeReservedInstancesOfferingsInput `json:"-" xml:"-"` } @@ -11774,6 +13368,16 @@ type metadataDescribeReservedInstancesOfferingsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeReservedInstancesOfferingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesOfferingsInput) GoString() string { + return s.String() +} + type DescribeReservedInstancesOfferingsOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. @@ -11789,6 +13393,16 @@ type metadataDescribeReservedInstancesOfferingsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeReservedInstancesOfferingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesOfferingsOutput) GoString() string { + return s.String() +} + type DescribeReservedInstancesOutput struct { // A list of Reserved Instances. ReservedInstances []*ReservedInstances `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` @@ -11800,6 +13414,16 @@ type metadataDescribeReservedInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeReservedInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesOutput) GoString() string { + return s.String() +} + type DescribeRouteTablesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11865,7 +13489,7 @@ type DescribeRouteTablesInput struct { // One or more route table IDs. // // Default: Describes all your route tables. - RouteTableIDs []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` + RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` metadataDescribeRouteTablesInput `json:"-" xml:"-"` } @@ -11874,6 +13498,16 @@ type metadataDescribeRouteTablesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeRouteTablesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRouteTablesInput) GoString() string { + return s.String() +} + type DescribeRouteTablesOutput struct { // Information about one or more route tables. RouteTables []*RouteTable `locationName:"routeTableSet" locationNameList:"item" type:"list"` @@ -11885,6 +13519,16 @@ type metadataDescribeRouteTablesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeRouteTablesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRouteTablesOutput) GoString() string { + return s.String() +} + type DescribeSecurityGroupsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11892,7 +13536,9 @@ type DescribeSecurityGroupsInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // One or more filters. + // One or more filters. If using multiple filters for rules, the results include + // security groups for which any combination of rules - not necessarily a single + // rule - match all filters. // // description - The description of the security group. // @@ -11936,7 +13582,7 @@ type DescribeSecurityGroupsInput struct { // VPC. // // Default: Describes all your security groups. - GroupIDs []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` + GroupIds []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` // [EC2-Classic and default VPC only] One or more security group names. You // can specify either the security group name or the security group ID. For @@ -11953,6 +13599,16 @@ type metadataDescribeSecurityGroupsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSecurityGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityGroupsInput) GoString() string { + return s.String() +} + type DescribeSecurityGroupsOutput struct { // Information about one or more security groups. SecurityGroups []*SecurityGroup `locationName:"securityGroupInfo" locationNameList:"item" type:"list"` @@ -11964,9 +13620,19 @@ type metadataDescribeSecurityGroupsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSecurityGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityGroupsOutput) GoString() string { + return s.String() +} + type DescribeSnapshotAttributeInput struct { // The snapshot attribute you would like to view. - Attribute *string `type:"string" required:"true"` + Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -11975,7 +13641,7 @@ type DescribeSnapshotAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the EBS snapshot. - SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"` + SnapshotId *string `type:"string" required:"true"` metadataDescribeSnapshotAttributeInput `json:"-" xml:"-"` } @@ -11984,6 +13650,16 @@ type metadataDescribeSnapshotAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSnapshotAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotAttributeInput) GoString() string { + return s.String() +} + type DescribeSnapshotAttributeOutput struct { // A list of permissions for creating volumes from the snapshot. CreateVolumePermissions []*CreateVolumePermission `locationName:"createVolumePermission" locationNameList:"item" type:"list"` @@ -11992,7 +13668,7 @@ type DescribeSnapshotAttributeOutput struct { ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` // The ID of the EBS snapshot. - SnapshotID *string `locationName:"snapshotId" type:"string"` + SnapshotId *string `locationName:"snapshotId" type:"string"` metadataDescribeSnapshotAttributeOutput `json:"-" xml:"-"` } @@ -12001,6 +13677,16 @@ type metadataDescribeSnapshotAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSnapshotAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotAttributeOutput) GoString() string { + return s.String() +} + type DescribeSnapshotsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -12063,15 +13749,15 @@ type DescribeSnapshotsInput struct { // Returns the snapshots owned by the specified owner. Multiple owners can be // specified. - OwnerIDs []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` + OwnerIds []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` // One or more AWS accounts IDs that can create volumes from the snapshot. - RestorableByUserIDs []*string `locationName:"RestorableBy" type:"list"` + RestorableByUserIds []*string `locationName:"RestorableBy" type:"list"` // One or more snapshot IDs. // // Default: Describes snapshots for which you have launch permissions. - SnapshotIDs []*string `locationName:"SnapshotId" locationNameList:"SnapshotId" type:"list"` + SnapshotIds []*string `locationName:"SnapshotId" locationNameList:"SnapshotId" type:"list"` metadataDescribeSnapshotsInput `json:"-" xml:"-"` } @@ -12080,6 +13766,16 @@ type metadataDescribeSnapshotsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotsInput) GoString() string { + return s.String() +} + type DescribeSnapshotsOutput struct { // The NextToken value to include in a future DescribeSnapshots request. When // the results of a DescribeSnapshots request exceed MaxResults, this value @@ -12097,6 +13793,16 @@ type metadataDescribeSnapshotsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotsOutput) GoString() string { + return s.String() +} + // Contains the parameters for DescribeSpotDatafeedSubscription. type DescribeSpotDatafeedSubscriptionInput struct { // Checks whether you have the required permissions for the action, without @@ -12112,9 +13818,19 @@ type metadataDescribeSpotDatafeedSubscriptionInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotDatafeedSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotDatafeedSubscriptionInput) GoString() string { + return s.String() +} + // Contains the output of DescribeSpotDatafeedSubscription. type DescribeSpotDatafeedSubscriptionOutput struct { - // The Spot Instance data feed subscription. + // The Spot instance data feed subscription. SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"` metadataDescribeSpotDatafeedSubscriptionOutput `json:"-" xml:"-"` @@ -12124,6 +13840,16 @@ type metadataDescribeSpotDatafeedSubscriptionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotDatafeedSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotDatafeedSubscriptionOutput) GoString() string { + return s.String() +} + // Contains the parameters for DescribeSpotFleetInstances. type DescribeSpotFleetInstancesInput struct { // Checks whether you have the required permissions for the action, without @@ -12141,7 +13867,7 @@ type DescribeSpotFleetInstancesInput struct { NextToken *string `locationName:"nextToken" type:"string"` // The ID of the Spot fleet request. - SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` metadataDescribeSpotFleetInstancesInput `json:"-" xml:"-"` } @@ -12150,6 +13876,16 @@ type metadataDescribeSpotFleetInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotFleetInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetInstancesInput) GoString() string { + return s.String() +} + // Contains the output of DescribeSpotFleetInstances. type DescribeSpotFleetInstancesOutput struct { // The running instances. Note that this list is refreshed periodically and @@ -12161,7 +13897,7 @@ type DescribeSpotFleetInstancesOutput struct { NextToken *string `locationName:"nextToken" type:"string"` // The ID of the Spot fleet request. - SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` metadataDescribeSpotFleetInstancesOutput `json:"-" xml:"-"` } @@ -12170,6 +13906,16 @@ type metadataDescribeSpotFleetInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotFleetInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetInstancesOutput) GoString() string { + return s.String() +} + // Contains the parameters for DescribeSpotFleetRequestHistory. type DescribeSpotFleetRequestHistoryInput struct { // Checks whether you have the required permissions for the action, without @@ -12179,7 +13925,7 @@ type DescribeSpotFleetRequestHistoryInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The type of events to describe. By default, all events are described. - EventType *string `locationName:"eventType" type:"string"` + EventType *string `locationName:"eventType" type:"string" enum:"EventType"` // The maximum number of results to return in a single call. Specify a value // between 1 and 1000. The default value is 1000. To retrieve the remaining @@ -12190,7 +13936,7 @@ type DescribeSpotFleetRequestHistoryInput struct { NextToken *string `locationName:"nextToken" type:"string"` // The ID of the Spot fleet request. - SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` @@ -12202,6 +13948,16 @@ type metadataDescribeSpotFleetRequestHistoryInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotFleetRequestHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetRequestHistoryInput) GoString() string { + return s.String() +} + // Contains the output of DescribeSpotFleetRequestHistory. type DescribeSpotFleetRequestHistoryOutput struct { // Information about the events in the history of the Spot fleet request. @@ -12218,7 +13974,7 @@ type DescribeSpotFleetRequestHistoryOutput struct { NextToken *string `locationName:"nextToken" type:"string"` // The ID of the Spot fleet request. - SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` @@ -12230,6 +13986,16 @@ type metadataDescribeSpotFleetRequestHistoryOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotFleetRequestHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetRequestHistoryOutput) GoString() string { + return s.String() +} + // Contains the parameters for DescribeSpotFleetRequests. type DescribeSpotFleetRequestsInput struct { // Checks whether you have the required permissions for the action, without @@ -12247,7 +14013,7 @@ type DescribeSpotFleetRequestsInput struct { NextToken *string `locationName:"nextToken" type:"string"` // The IDs of the Spot fleet requests. - SpotFleetRequestIDs []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list"` + SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list"` metadataDescribeSpotFleetRequestsInput `json:"-" xml:"-"` } @@ -12256,6 +14022,16 @@ type metadataDescribeSpotFleetRequestsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotFleetRequestsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetRequestsInput) GoString() string { + return s.String() +} + // Contains the output of DescribeSpotFleetRequests. type DescribeSpotFleetRequestsOutput struct { // The token required to retrieve the next set of results. This value is null @@ -12272,6 +14048,16 @@ type metadataDescribeSpotFleetRequestsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotFleetRequestsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetRequestsOutput) GoString() string { + return s.String() +} + // Contains the parameters for DescribeSpotInstanceRequests. type DescribeSpotInstanceRequestsInput struct { // Checks whether you have the required permissions for the action, without @@ -12284,7 +14070,7 @@ type DescribeSpotInstanceRequestsInput struct { // // availability-zone-group - The Availability Zone group. // - // create-time - The time stamp when the Spot Instance request was created. + // create-time - The time stamp when the Spot instance request was created. // // fault-code - The fault code related to the request. // @@ -12292,7 +14078,7 @@ type DescribeSpotInstanceRequestsInput struct { // // instance-id - The ID of the instance that fulfilled the request. // - // launch-group - The Spot Instance launch group. + // launch-group - The Spot instance launch group. // // launch.block-device-mapping.delete-on-termination - Indicates whether // the Amazon EBS volume is deleted on instance termination. @@ -12320,7 +14106,7 @@ type DescribeSpotInstanceRequestsInput struct { // launch.key-name - The name of the key pair the instance launched with. // // launch.monitoring-enabled - Whether monitoring is enabled for the Spot - // Instance. + // instance. // // launch.ramdisk-id - The RAM disk ID. // @@ -12351,21 +14137,21 @@ type DescribeSpotInstanceRequestsInput struct { // product-description - The product description associated with the instance // (Linux/UNIX | Windows). // - // spot-instance-request-id - The Spot Instance request ID. + // spot-instance-request-id - The Spot instance request ID. // - // spot-price - The maximum hourly price for any Spot Instance launched to + // spot-price - The maximum hourly price for any Spot instance launched to // fulfill the request. // - // state - The state of the Spot Instance request (open | active | closed + // state - The state of the Spot instance request (open | active | closed // | cancelled | failed). Spot bid status information can help you track your - // Amazon EC2 Spot Instance requests. For more information, see Spot Bid Status + // Amazon EC2 Spot instance requests. For more information, see Spot Bid Status // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) // in the Amazon Elastic Compute Cloud User Guide. // // status-code - The short code describing the most recent evaluation of - // your Spot Instance request. + // your Spot instance request. // - // status-message - The message explaining the status of the Spot Instance + // status-message - The message explaining the status of the Spot instance // request. // // tag:key=value - The key/value combination of a tag assigned to the resource. @@ -12380,7 +14166,7 @@ type DescribeSpotInstanceRequestsInput struct { // tag-value - The value of a tag assigned to the resource. This filter is // independent of the tag-key filter. // - // type - The type of Spot Instance request (one-time | persistent). + // type - The type of Spot instance request (one-time | persistent). // // launched-availability-zone - The Availability Zone in which the bid is // launched. @@ -12390,8 +14176,8 @@ type DescribeSpotInstanceRequestsInput struct { // valid-until - The end date of the request. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // One or more Spot Instance request IDs. - SpotInstanceRequestIDs []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"` + // One or more Spot instance request IDs. + SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"` metadataDescribeSpotInstanceRequestsInput `json:"-" xml:"-"` } @@ -12400,9 +14186,19 @@ type metadataDescribeSpotInstanceRequestsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotInstanceRequestsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotInstanceRequestsInput) GoString() string { + return s.String() +} + // Contains the output of DescribeSpotInstanceRequests. type DescribeSpotInstanceRequestsOutput struct { - // One or more Spot Instance requests. + // One or more Spot instance requests. SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` metadataDescribeSpotInstanceRequestsOutput `json:"-" xml:"-"` @@ -12412,6 +14208,16 @@ type metadataDescribeSpotInstanceRequestsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotInstanceRequestsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotInstanceRequestsOutput) GoString() string { + return s.String() +} + // Contains the parameters for DescribeSpotPriceHistory. type DescribeSpotPriceHistoryInput struct { // Filters the results by the specified Availability Zone. @@ -12433,14 +14239,14 @@ type DescribeSpotPriceHistoryInput struct { // // instance-type - The type of instance (for example, m1.small). // - // product-description - The product description for the Spot Price (Linux/UNIX + // product-description - The product description for the Spot price (Linux/UNIX // | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) // | Windows (Amazon VPC)). // - // spot-price - The Spot Price. The value must match exactly (or use wildcards; + // spot-price - The Spot price. The value must match exactly (or use wildcards; // greater than or less than comparison is not supported). // - // timestamp - The timestamp of the Spot Price history, in UTC format (for + // timestamp - The timestamp of the Spot price history, in UTC format (for // example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater // than or less than comparison is not supported. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -12470,13 +14276,23 @@ type metadataDescribeSpotPriceHistoryInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotPriceHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotPriceHistoryInput) GoString() string { + return s.String() +} + // Contains the output of DescribeSpotPriceHistory. type DescribeSpotPriceHistoryOutput struct { // The token required to retrieve the next set of results. This value is null // when there are no more results to return. NextToken *string `locationName:"nextToken" type:"string"` - // The historical Spot Prices. + // The historical Spot prices. SpotPriceHistory []*SpotPrice `locationName:"spotPriceHistorySet" locationNameList:"item" type:"list"` metadataDescribeSpotPriceHistoryOutput `json:"-" xml:"-"` @@ -12486,6 +14302,16 @@ type metadataDescribeSpotPriceHistoryOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSpotPriceHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotPriceHistoryOutput) GoString() string { + return s.String() +} + type DescribeSubnetsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -12530,7 +14356,7 @@ type DescribeSubnetsInput struct { // One or more subnet IDs. // // Default: Describes all your subnets. - SubnetIDs []*string `locationName:"SubnetId" locationNameList:"SubnetId" type:"list"` + SubnetIds []*string `locationName:"SubnetId" locationNameList:"SubnetId" type:"list"` metadataDescribeSubnetsInput `json:"-" xml:"-"` } @@ -12539,6 +14365,16 @@ type metadataDescribeSubnetsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSubnetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubnetsInput) GoString() string { + return s.String() +} + type DescribeSubnetsOutput struct { // Information about one or more subnets. Subnets []*Subnet `locationName:"subnetSet" locationNameList:"item" type:"list"` @@ -12550,6 +14386,16 @@ type metadataDescribeSubnetsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeSubnetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubnetsOutput) GoString() string { + return s.String() +} + type DescribeTagsInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -12588,6 +14434,16 @@ type metadataDescribeTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsInput) GoString() string { + return s.String() +} + type DescribeTagsOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return.. @@ -12603,449 +14459,19 @@ type metadataDescribeTagsOutput struct { SDKShapeTraits bool `type:"structure"` } -type DescribeVPCAttributeInput struct { - // The VPC attribute. - Attribute *string `type:"string"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - VPCID *string `locationName:"VpcId" type:"string" required:"true"` - - metadataDescribeVPCAttributeInput `json:"-" xml:"-"` +// String returns the string representation +func (s DescribeTagsOutput) String() string { + return awsutil.Prettify(s) } -type metadataDescribeVPCAttributeInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCAttributeOutput struct { - // Indicates whether the instances launched in the VPC get DNS hostnames. If - // this attribute is true, instances in the VPC get DNS hostnames; otherwise, - // they do not. - EnableDNSHostnames *AttributeBooleanValue `locationName:"enableDnsHostnames" type:"structure"` - - // Indicates whether DNS resolution is enabled for the VPC. If this attribute - // is true, the Amazon DNS server resolves DNS hostnames for your instances - // to their corresponding IP addresses; otherwise, it does not. - EnableDNSSupport *AttributeBooleanValue `locationName:"enableDnsSupport" type:"structure"` - - // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` - - metadataDescribeVPCAttributeOutput `json:"-" xml:"-"` -} - -type metadataDescribeVPCAttributeOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCClassicLinkInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // is-classic-link-enabled - Whether the VPC is enabled for ClassicLink (true - // | false). - // - // tag:key=value - The key/value combination of a tag assigned to the resource. - // - // tag-key - The key of a tag assigned to the resource. This filter is independent - // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" - // and the filter "tag-value=X", you get any resources assigned both the tag - // key Purpose (regardless of what the tag's value is), and the tag value X - // (regardless of what the tag's key is). If you want to list only resources - // where Purpose is X, see the tag:key=value filter. - // - // tag-value - The value of a tag assigned to the resource. This filter is - // independent of the tag-key filter. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPCs for which you want to describe the ClassicLink status. - VPCIDs []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` - - metadataDescribeVPCClassicLinkInput `json:"-" xml:"-"` -} - -type metadataDescribeVPCClassicLinkInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCClassicLinkOutput struct { - // The ClassicLink status of one or more VPCs. - VPCs []*VPCClassicLink `locationName:"vpcSet" locationNameList:"item" type:"list"` - - metadataDescribeVPCClassicLinkOutput `json:"-" xml:"-"` -} - -type metadataDescribeVPCClassicLinkOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCEndpointServicesInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `type:"string"` - - metadataDescribeVPCEndpointServicesInput `json:"-" xml:"-"` -} - -type metadataDescribeVPCEndpointServicesInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCEndpointServicesOutput struct { - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` - - // A list of supported AWS services. - ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"` - - metadataDescribeVPCEndpointServicesOutput `json:"-" xml:"-"` -} - -type metadataDescribeVPCEndpointServicesOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCEndpointsInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // One or more filters. - // - // service-name: The name of the AWS service. - // - // vpc-id: The ID of the VPC in which the endpoint resides. - // - // vpc-endpoint-id: The ID of the endpoint. - // - // vpc-endpoint-state: The state of the endpoint. (pending | available | - // deleting | deleted) - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `type:"string"` - - // One or more endpoint IDs. - VPCEndpointIDs []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list"` - - metadataDescribeVPCEndpointsInput `json:"-" xml:"-"` -} - -type metadataDescribeVPCEndpointsInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCEndpointsOutput struct { - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the endpoints. - VPCEndpoints []*VPCEndpoint `locationName:"vpcEndpointSet" locationNameList:"item" type:"list"` - - metadataDescribeVPCEndpointsOutput `json:"-" xml:"-"` -} - -type metadataDescribeVPCEndpointsOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCPeeringConnectionsInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // accepter-vpc-info.cidr-block - The CIDR block of the peer VPC. - // - // accepter-vpc-info.owner-id - The AWS account ID of the owner of the peer - // VPC. - // - // accepter-vpc-info.vpc-id - The ID of the peer VPC. - // - // expiration-time - The expiration date and time for the VPC peering connection. - // - // requester-vpc-info.cidr-block - The CIDR block of the requester's VPC. - // - // requester-vpc-info.owner-id - The AWS account ID of the owner of the requester - // VPC. - // - // requester-vpc-info.vpc-id - The ID of the requester VPC. - // - // status-code - The status of the VPC peering connection (pending-acceptance - // | failed | expired | provisioning | active | deleted | rejected). - // - // status-message - A message that provides more information about the status - // of the VPC peering connection, if applicable. - // - // tag:key=value - The key/value combination of a tag assigned to the resource. - // - // tag-key - The key of a tag assigned to the resource. This filter is independent - // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" - // and the filter "tag-value=X", you get any resources assigned both the tag - // key Purpose (regardless of what the tag's value is), and the tag value X - // (regardless of what the tag's key is). If you want to list only resources - // where Purpose is X, see the tag:key=value filter. - // - // tag-value - The value of a tag assigned to the resource. This filter is - // independent of the tag-key filter. - // - // vpc-peering-connection-id - The ID of the VPC peering connection. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPC peering connection IDs. - // - // Default: Describes all your VPC peering connections. - VPCPeeringConnectionIDs []*string `locationName:"VpcPeeringConnectionId" locationNameList:"item" type:"list"` - - metadataDescribeVPCPeeringConnectionsInput `json:"-" xml:"-"` -} - -type metadataDescribeVPCPeeringConnectionsInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCPeeringConnectionsOutput struct { - // Information about the VPC peering connections. - VPCPeeringConnections []*VPCPeeringConnection `locationName:"vpcPeeringConnectionSet" locationNameList:"item" type:"list"` - - metadataDescribeVPCPeeringConnectionsOutput `json:"-" xml:"-"` -} - -type metadataDescribeVPCPeeringConnectionsOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCsInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // cidr - The CIDR block of the VPC. The CIDR block you specify must exactly - // match the VPC's CIDR block for information to be returned for the VPC. Must - // contain the slash followed by one or two digits (for example, /28). - // - // dhcp-options-id - The ID of a set of DHCP options. - // - // isDefault - Indicates whether the VPC is the default VPC. - // - // state - The state of the VPC (pending | available). - // - // tag:key=value - The key/value combination of a tag assigned to the resource. - // - // tag-key - The key of a tag assigned to the resource. This filter is independent - // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" - // and the filter "tag-value=X", you get any resources assigned both the tag - // key Purpose (regardless of what the tag's value is), and the tag value X - // (regardless of what the tag's key is). If you want to list only resources - // where Purpose is X, see the tag:key=value filter. - // - // tag-value - The value of a tag assigned to the resource. This filter is - // independent of the tag-key filter. - // - // vpc-id - The ID of the VPC. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPC IDs. - // - // Default: Describes all your VPCs. - VPCIDs []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` - - metadataDescribeVPCsInput `json:"-" xml:"-"` -} - -type metadataDescribeVPCsInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPCsOutput struct { - // Information about one or more VPCs. - VPCs []*VPC `locationName:"vpcSet" locationNameList:"item" type:"list"` - - metadataDescribeVPCsOutput `json:"-" xml:"-"` -} - -type metadataDescribeVPCsOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPNConnectionsInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // customer-gateway-configuration - The configuration information for the - // customer gateway. - // - // customer-gateway-id - The ID of a customer gateway associated with the - // VPN connection. - // - // state - The state of the VPN connection (pending | available | deleting - // | deleted). - // - // option.static-routes-only - Indicates whether the connection has static - // routes only. Used for devices that do not support Border Gateway Protocol - // (BGP). - // - // route.destination-cidr-block - The destination CIDR block. This corresponds - // to the subnet used in a customer data center. - // - // bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP - // device. - // - // tag:key=value - The key/value combination of a tag assigned to the resource. - // - // tag-key - The key of a tag assigned to the resource. This filter is independent - // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" - // and the filter "tag-value=X", you get any resources assigned both the tag - // key Purpose (regardless of what the tag's value is), and the tag value X - // (regardless of what the tag's key is). If you want to list only resources - // where Purpose is X, see the tag:key=value filter. - // - // tag-value - The value of a tag assigned to the resource. This filter is - // independent of the tag-key filter. - // - // type - The type of VPN connection. Currently the only supported type is - // ipsec.1. - // - // vpn-connection-id - The ID of the VPN connection. - // - // vpn-gateway-id - The ID of a virtual private gateway associated with the - // VPN connection. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPN connection IDs. - // - // Default: Describes your VPN connections. - VPNConnectionIDs []*string `locationName:"VpnConnectionId" locationNameList:"VpnConnectionId" type:"list"` - - metadataDescribeVPNConnectionsInput `json:"-" xml:"-"` -} - -type metadataDescribeVPNConnectionsInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPNConnectionsOutput struct { - // Information about one or more VPN connections. - VPNConnections []*VPNConnection `locationName:"vpnConnectionSet" locationNameList:"item" type:"list"` - - metadataDescribeVPNConnectionsOutput `json:"-" xml:"-"` -} - -type metadataDescribeVPNConnectionsOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPNGatewaysInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // attachment.state - The current state of the attachment between the gateway - // and the VPC (attaching | attached | detaching | detached). - // - // attachment.vpc-id - The ID of an attached VPC. - // - // availability-zone - The Availability Zone for the virtual private gateway. - // - // state - The state of the virtual private gateway (pending | available - // | deleting | deleted). - // - // tag:key=value - The key/value combination of a tag assigned to the resource. - // - // tag-key - The key of a tag assigned to the resource. This filter is independent - // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" - // and the filter "tag-value=X", you get any resources assigned both the tag - // key Purpose (regardless of what the tag's value is), and the tag value X - // (regardless of what the tag's key is). If you want to list only resources - // where Purpose is X, see the tag:key=value filter. - // - // tag-value - The value of a tag assigned to the resource. This filter is - // independent of the tag-key filter. - // - // type - The type of virtual private gateway. Currently the only supported - // type is ipsec.1. - // - // vpn-gateway-id - The ID of the virtual private gateway. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more virtual private gateway IDs. - // - // Default: Describes all your virtual private gateways. - VPNGatewayIDs []*string `locationName:"VpnGatewayId" locationNameList:"VpnGatewayId" type:"list"` - - metadataDescribeVPNGatewaysInput `json:"-" xml:"-"` -} - -type metadataDescribeVPNGatewaysInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DescribeVPNGatewaysOutput struct { - // Information about one or more virtual private gateways. - VPNGateways []*VPNGateway `locationName:"vpnGatewaySet" locationNameList:"item" type:"list"` - - metadataDescribeVPNGatewaysOutput `json:"-" xml:"-"` -} - -type metadataDescribeVPNGatewaysOutput struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s DescribeTagsOutput) GoString() string { + return s.String() } type DescribeVolumeAttributeInput struct { // The instance attribute. - Attribute *string `type:"string"` + Attribute *string `type:"string" enum:"VolumeAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13054,7 +14480,7 @@ type DescribeVolumeAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the volume. - VolumeID *string `locationName:"VolumeId" type:"string" required:"true"` + VolumeId *string `type:"string" required:"true"` metadataDescribeVolumeAttributeInput `json:"-" xml:"-"` } @@ -13063,6 +14489,16 @@ type metadataDescribeVolumeAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeVolumeAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumeAttributeInput) GoString() string { + return s.String() +} + type DescribeVolumeAttributeOutput struct { // The state of autoEnableIO attribute. AutoEnableIO *AttributeBooleanValue `locationName:"autoEnableIO" type:"structure"` @@ -13071,7 +14507,7 @@ type DescribeVolumeAttributeOutput struct { ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` // The ID of the volume. - VolumeID *string `locationName:"volumeId" type:"string"` + VolumeId *string `locationName:"volumeId" type:"string"` metadataDescribeVolumeAttributeOutput `json:"-" xml:"-"` } @@ -13080,6 +14516,16 @@ type metadataDescribeVolumeAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeVolumeAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumeAttributeOutput) GoString() string { + return s.String() +} + type DescribeVolumeStatusInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13139,7 +14585,7 @@ type DescribeVolumeStatusInput struct { // One or more volume IDs. // // Default: Describes all your volumes. - VolumeIDs []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` + VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` metadataDescribeVolumeStatusInput `json:"-" xml:"-"` } @@ -13148,6 +14594,16 @@ type metadataDescribeVolumeStatusInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeVolumeStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumeStatusInput) GoString() string { + return s.String() +} + type DescribeVolumeStatusOutput struct { // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. @@ -13163,6 +14619,16 @@ type metadataDescribeVolumeStatusOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeVolumeStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumeStatusOutput) GoString() string { + return s.String() +} + type DescribeVolumesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13236,7 +14702,7 @@ type DescribeVolumesInput struct { NextToken *string `locationName:"nextToken" type:"string"` // One or more volume IDs. - VolumeIDs []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` + VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` metadataDescribeVolumesInput `json:"-" xml:"-"` } @@ -13245,6 +14711,16 @@ type metadataDescribeVolumesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeVolumesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumesInput) GoString() string { + return s.String() +} + type DescribeVolumesOutput struct { // The NextToken value to include in a future DescribeVolumes request. When // the results of a DescribeVolumes request exceed MaxResults, this value can @@ -13262,7 +14738,617 @@ type metadataDescribeVolumesOutput struct { SDKShapeTraits bool `type:"structure"` } -type DetachClassicLinkVPCInput struct { +// String returns the string representation +func (s DescribeVolumesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumesOutput) GoString() string { + return s.String() +} + +type DescribeVpcAttributeInput struct { + // The VPC attribute. + Attribute *string `type:"string" enum:"VpcAttributeName"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC. + VpcId *string `type:"string" required:"true"` + + metadataDescribeVpcAttributeInput `json:"-" xml:"-"` +} + +type metadataDescribeVpcAttributeInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcAttributeInput) GoString() string { + return s.String() +} + +type DescribeVpcAttributeOutput struct { + // Indicates whether the instances launched in the VPC get DNS hostnames. If + // this attribute is true, instances in the VPC get DNS hostnames; otherwise, + // they do not. + EnableDnsHostnames *AttributeBooleanValue `locationName:"enableDnsHostnames" type:"structure"` + + // Indicates whether DNS resolution is enabled for the VPC. If this attribute + // is true, the Amazon DNS server resolves DNS hostnames for your instances + // to their corresponding IP addresses; otherwise, it does not. + EnableDnsSupport *AttributeBooleanValue `locationName:"enableDnsSupport" type:"structure"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` + + metadataDescribeVpcAttributeOutput `json:"-" xml:"-"` +} + +type metadataDescribeVpcAttributeOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcAttributeOutput) GoString() string { + return s.String() +} + +type DescribeVpcClassicLinkInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // is-classic-link-enabled - Whether the VPC is enabled for ClassicLink (true + // | false). + // + // tag:key=value - The key/value combination of a tag assigned to the resource. + // + // tag-key - The key of a tag assigned to the resource. This filter is independent + // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" + // and the filter "tag-value=X", you get any resources assigned both the tag + // key Purpose (regardless of what the tag's value is), and the tag value X + // (regardless of what the tag's key is). If you want to list only resources + // where Purpose is X, see the tag:key=value filter. + // + // tag-value - The value of a tag assigned to the resource. This filter is + // independent of the tag-key filter. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more VPCs for which you want to describe the ClassicLink status. + VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` + + metadataDescribeVpcClassicLinkInput `json:"-" xml:"-"` +} + +type metadataDescribeVpcClassicLinkInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcClassicLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcClassicLinkInput) GoString() string { + return s.String() +} + +type DescribeVpcClassicLinkOutput struct { + // The ClassicLink status of one or more VPCs. + Vpcs []*VpcClassicLink `locationName:"vpcSet" locationNameList:"item" type:"list"` + + metadataDescribeVpcClassicLinkOutput `json:"-" xml:"-"` +} + +type metadataDescribeVpcClassicLinkOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcClassicLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcClassicLinkOutput) GoString() string { + return s.String() +} + +type DescribeVpcEndpointServicesInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + // + // Constraint: If the value is greater than 1000, we return only 1000 items. + MaxResults *int64 `type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a prior call.) + NextToken *string `type:"string"` + + metadataDescribeVpcEndpointServicesInput `json:"-" xml:"-"` +} + +type metadataDescribeVpcEndpointServicesInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcEndpointServicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointServicesInput) GoString() string { + return s.String() +} + +type DescribeVpcEndpointServicesOutput struct { + // The token to use when requesting the next set of items. If there are no additional + // items to return, the string is empty. + NextToken *string `locationName:"nextToken" type:"string"` + + // A list of supported AWS services. + ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"` + + metadataDescribeVpcEndpointServicesOutput `json:"-" xml:"-"` +} + +type metadataDescribeVpcEndpointServicesOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcEndpointServicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointServicesOutput) GoString() string { + return s.String() +} + +type DescribeVpcEndpointsInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. + // + // service-name: The name of the AWS service. + // + // vpc-id: The ID of the VPC in which the endpoint resides. + // + // vpc-endpoint-id: The ID of the endpoint. + // + // vpc-endpoint-state: The state of the endpoint. (pending | available | + // deleting | deleted) + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + // + // Constraint: If the value is greater than 1000, we return only 1000 items. + MaxResults *int64 `type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a prior call.) + NextToken *string `type:"string"` + + // One or more endpoint IDs. + VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list"` + + metadataDescribeVpcEndpointsInput `json:"-" xml:"-"` +} + +type metadataDescribeVpcEndpointsInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointsInput) GoString() string { + return s.String() +} + +type DescribeVpcEndpointsOutput struct { + // The token to use when requesting the next set of items. If there are no additional + // items to return, the string is empty. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the endpoints. + VpcEndpoints []*VpcEndpoint `locationName:"vpcEndpointSet" locationNameList:"item" type:"list"` + + metadataDescribeVpcEndpointsOutput `json:"-" xml:"-"` +} + +type metadataDescribeVpcEndpointsOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointsOutput) GoString() string { + return s.String() +} + +type DescribeVpcPeeringConnectionsInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // accepter-vpc-info.cidr-block - The CIDR block of the peer VPC. + // + // accepter-vpc-info.owner-id - The AWS account ID of the owner of the peer + // VPC. + // + // accepter-vpc-info.vpc-id - The ID of the peer VPC. + // + // expiration-time - The expiration date and time for the VPC peering connection. + // + // requester-vpc-info.cidr-block - The CIDR block of the requester's VPC. + // + // requester-vpc-info.owner-id - The AWS account ID of the owner of the requester + // VPC. + // + // requester-vpc-info.vpc-id - The ID of the requester VPC. + // + // status-code - The status of the VPC peering connection (pending-acceptance + // | failed | expired | provisioning | active | deleted | rejected). + // + // status-message - A message that provides more information about the status + // of the VPC peering connection, if applicable. + // + // tag:key=value - The key/value combination of a tag assigned to the resource. + // + // tag-key - The key of a tag assigned to the resource. This filter is independent + // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" + // and the filter "tag-value=X", you get any resources assigned both the tag + // key Purpose (regardless of what the tag's value is), and the tag value X + // (regardless of what the tag's key is). If you want to list only resources + // where Purpose is X, see the tag:key=value filter. + // + // tag-value - The value of a tag assigned to the resource. This filter is + // independent of the tag-key filter. + // + // vpc-peering-connection-id - The ID of the VPC peering connection. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more VPC peering connection IDs. + // + // Default: Describes all your VPC peering connections. + VpcPeeringConnectionIds []*string `locationName:"VpcPeeringConnectionId" locationNameList:"item" type:"list"` + + metadataDescribeVpcPeeringConnectionsInput `json:"-" xml:"-"` +} + +type metadataDescribeVpcPeeringConnectionsInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcPeeringConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcPeeringConnectionsInput) GoString() string { + return s.String() +} + +type DescribeVpcPeeringConnectionsOutput struct { + // Information about the VPC peering connections. + VpcPeeringConnections []*VpcPeeringConnection `locationName:"vpcPeeringConnectionSet" locationNameList:"item" type:"list"` + + metadataDescribeVpcPeeringConnectionsOutput `json:"-" xml:"-"` +} + +type metadataDescribeVpcPeeringConnectionsOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcPeeringConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcPeeringConnectionsOutput) GoString() string { + return s.String() +} + +type DescribeVpcsInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // cidr - The CIDR block of the VPC. The CIDR block you specify must exactly + // match the VPC's CIDR block for information to be returned for the VPC. Must + // contain the slash followed by one or two digits (for example, /28). + // + // dhcp-options-id - The ID of a set of DHCP options. + // + // isDefault - Indicates whether the VPC is the default VPC. + // + // state - The state of the VPC (pending | available). + // + // tag:key=value - The key/value combination of a tag assigned to the resource. + // + // tag-key - The key of a tag assigned to the resource. This filter is independent + // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" + // and the filter "tag-value=X", you get any resources assigned both the tag + // key Purpose (regardless of what the tag's value is), and the tag value X + // (regardless of what the tag's key is). If you want to list only resources + // where Purpose is X, see the tag:key=value filter. + // + // tag-value - The value of a tag assigned to the resource. This filter is + // independent of the tag-key filter. + // + // vpc-id - The ID of the VPC. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more VPC IDs. + // + // Default: Describes all your VPCs. + VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` + + metadataDescribeVpcsInput `json:"-" xml:"-"` +} + +type metadataDescribeVpcsInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcsInput) GoString() string { + return s.String() +} + +type DescribeVpcsOutput struct { + // Information about one or more VPCs. + Vpcs []*Vpc `locationName:"vpcSet" locationNameList:"item" type:"list"` + + metadataDescribeVpcsOutput `json:"-" xml:"-"` +} + +type metadataDescribeVpcsOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpcsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcsOutput) GoString() string { + return s.String() +} + +type DescribeVpnConnectionsInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // customer-gateway-configuration - The configuration information for the + // customer gateway. + // + // customer-gateway-id - The ID of a customer gateway associated with the + // VPN connection. + // + // state - The state of the VPN connection (pending | available | deleting + // | deleted). + // + // option.static-routes-only - Indicates whether the connection has static + // routes only. Used for devices that do not support Border Gateway Protocol + // (BGP). + // + // route.destination-cidr-block - The destination CIDR block. This corresponds + // to the subnet used in a customer data center. + // + // bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP + // device. + // + // tag:key=value - The key/value combination of a tag assigned to the resource. + // + // tag-key - The key of a tag assigned to the resource. This filter is independent + // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" + // and the filter "tag-value=X", you get any resources assigned both the tag + // key Purpose (regardless of what the tag's value is), and the tag value X + // (regardless of what the tag's key is). If you want to list only resources + // where Purpose is X, see the tag:key=value filter. + // + // tag-value - The value of a tag assigned to the resource. This filter is + // independent of the tag-key filter. + // + // type - The type of VPN connection. Currently the only supported type is + // ipsec.1. + // + // vpn-connection-id - The ID of the VPN connection. + // + // vpn-gateway-id - The ID of a virtual private gateway associated with the + // VPN connection. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more VPN connection IDs. + // + // Default: Describes your VPN connections. + VpnConnectionIds []*string `locationName:"VpnConnectionId" locationNameList:"VpnConnectionId" type:"list"` + + metadataDescribeVpnConnectionsInput `json:"-" xml:"-"` +} + +type metadataDescribeVpnConnectionsInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpnConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpnConnectionsInput) GoString() string { + return s.String() +} + +type DescribeVpnConnectionsOutput struct { + // Information about one or more VPN connections. + VpnConnections []*VpnConnection `locationName:"vpnConnectionSet" locationNameList:"item" type:"list"` + + metadataDescribeVpnConnectionsOutput `json:"-" xml:"-"` +} + +type metadataDescribeVpnConnectionsOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpnConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpnConnectionsOutput) GoString() string { + return s.String() +} + +type DescribeVpnGatewaysInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // attachment.state - The current state of the attachment between the gateway + // and the VPC (attaching | attached | detaching | detached). + // + // attachment.vpc-id - The ID of an attached VPC. + // + // availability-zone - The Availability Zone for the virtual private gateway. + // + // state - The state of the virtual private gateway (pending | available + // | deleting | deleted). + // + // tag:key=value - The key/value combination of a tag assigned to the resource. + // + // tag-key - The key of a tag assigned to the resource. This filter is independent + // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" + // and the filter "tag-value=X", you get any resources assigned both the tag + // key Purpose (regardless of what the tag's value is), and the tag value X + // (regardless of what the tag's key is). If you want to list only resources + // where Purpose is X, see the tag:key=value filter. + // + // tag-value - The value of a tag assigned to the resource. This filter is + // independent of the tag-key filter. + // + // type - The type of virtual private gateway. Currently the only supported + // type is ipsec.1. + // + // vpn-gateway-id - The ID of the virtual private gateway. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more virtual private gateway IDs. + // + // Default: Describes all your virtual private gateways. + VpnGatewayIds []*string `locationName:"VpnGatewayId" locationNameList:"VpnGatewayId" type:"list"` + + metadataDescribeVpnGatewaysInput `json:"-" xml:"-"` +} + +type metadataDescribeVpnGatewaysInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpnGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpnGatewaysInput) GoString() string { + return s.String() +} + +type DescribeVpnGatewaysOutput struct { + // Information about one or more virtual private gateways. + VpnGateways []*VpnGateway `locationName:"vpnGatewaySet" locationNameList:"item" type:"list"` + + metadataDescribeVpnGatewaysOutput `json:"-" xml:"-"` +} + +type metadataDescribeVpnGatewaysOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DescribeVpnGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpnGatewaysOutput) GoString() string { + return s.String() +} + +type DetachClassicLinkVpcInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -13270,29 +15356,49 @@ type DetachClassicLinkVPCInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the instance to unlink from the VPC. - InstanceID *string `locationName:"instanceId" type:"string" required:"true"` + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` // The ID of the VPC to which the instance is linked. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` + VpcId *string `locationName:"vpcId" type:"string" required:"true"` - metadataDetachClassicLinkVPCInput `json:"-" xml:"-"` + metadataDetachClassicLinkVpcInput `json:"-" xml:"-"` } -type metadataDetachClassicLinkVPCInput struct { +type metadataDetachClassicLinkVpcInput struct { SDKShapeTraits bool `type:"structure"` } -type DetachClassicLinkVPCOutput struct { +// String returns the string representation +func (s DetachClassicLinkVpcInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachClassicLinkVpcInput) GoString() string { + return s.String() +} + +type DetachClassicLinkVpcOutput struct { // Returns true if the request succeeds; otherwise, it returns an error. Return *bool `locationName:"return" type:"boolean"` - metadataDetachClassicLinkVPCOutput `json:"-" xml:"-"` + metadataDetachClassicLinkVpcOutput `json:"-" xml:"-"` } -type metadataDetachClassicLinkVPCOutput struct { +type metadataDetachClassicLinkVpcOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DetachClassicLinkVpcOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachClassicLinkVpcOutput) GoString() string { + return s.String() +} + type DetachInternetGatewayInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13301,10 +15407,10 @@ type DetachInternetGatewayInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the Internet gateway. - InternetGatewayID *string `locationName:"internetGatewayId" type:"string" required:"true"` + InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` + VpcId *string `locationName:"vpcId" type:"string" required:"true"` metadataDetachInternetGatewayInput `json:"-" xml:"-"` } @@ -13313,6 +15419,16 @@ type metadataDetachInternetGatewayInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DetachInternetGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachInternetGatewayInput) GoString() string { + return s.String() +} + type DetachInternetGatewayOutput struct { metadataDetachInternetGatewayOutput `json:"-" xml:"-"` } @@ -13321,9 +15437,19 @@ type metadataDetachInternetGatewayOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DetachInternetGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachInternetGatewayOutput) GoString() string { + return s.String() +} + type DetachNetworkInterfaceInput struct { // The ID of the attachment. - AttachmentID *string `locationName:"attachmentId" type:"string" required:"true"` + AttachmentId *string `locationName:"attachmentId" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13341,6 +15467,16 @@ type metadataDetachNetworkInterfaceInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DetachNetworkInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachNetworkInterfaceInput) GoString() string { + return s.String() +} + type DetachNetworkInterfaceOutput struct { metadataDetachNetworkInterfaceOutput `json:"-" xml:"-"` } @@ -13349,32 +15485,14 @@ type metadataDetachNetworkInterfaceOutput struct { SDKShapeTraits bool `type:"structure"` } -type DetachVPNGatewayInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - VPCID *string `locationName:"VpcId" type:"string" required:"true"` - - // The ID of the virtual private gateway. - VPNGatewayID *string `locationName:"VpnGatewayId" type:"string" required:"true"` - - metadataDetachVPNGatewayInput `json:"-" xml:"-"` +// String returns the string representation +func (s DetachNetworkInterfaceOutput) String() string { + return awsutil.Prettify(s) } -type metadataDetachVPNGatewayInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DetachVPNGatewayOutput struct { - metadataDetachVPNGatewayOutput `json:"-" xml:"-"` -} - -type metadataDetachVPNGatewayOutput struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s DetachNetworkInterfaceOutput) GoString() string { + return s.String() } type DetachVolumeInput struct { @@ -13397,10 +15515,10 @@ type DetachVolumeInput struct { Force *bool `type:"boolean"` // The ID of the instance. - InstanceID *string `locationName:"InstanceId" type:"string"` + InstanceId *string `type:"string"` // The ID of the volume. - VolumeID *string `locationName:"VolumeId" type:"string" required:"true"` + VolumeId *string `type:"string" required:"true"` metadataDetachVolumeInput `json:"-" xml:"-"` } @@ -13409,29 +15527,17 @@ type metadataDetachVolumeInput struct { SDKShapeTraits bool `type:"structure"` } -type DisableVGWRoutePropagationInput struct { - // The ID of the virtual private gateway. - GatewayID *string `locationName:"GatewayId" type:"string" required:"true"` - - // The ID of the route table. - RouteTableID *string `locationName:"RouteTableId" type:"string" required:"true"` - - metadataDisableVGWRoutePropagationInput `json:"-" xml:"-"` +// String returns the string representation +func (s DetachVolumeInput) String() string { + return awsutil.Prettify(s) } -type metadataDisableVGWRoutePropagationInput struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s DetachVolumeInput) GoString() string { + return s.String() } -type DisableVGWRoutePropagationOutput struct { - metadataDisableVGWRoutePropagationOutput `json:"-" xml:"-"` -} - -type metadataDisableVGWRoutePropagationOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type DisableVPCClassicLinkInput struct { +type DetachVpnGatewayInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -13439,29 +15545,192 @@ type DisableVPCClassicLinkInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` + VpcId *string `type:"string" required:"true"` - metadataDisableVPCClassicLinkInput `json:"-" xml:"-"` + // The ID of the virtual private gateway. + VpnGatewayId *string `type:"string" required:"true"` + + metadataDetachVpnGatewayInput `json:"-" xml:"-"` } -type metadataDisableVPCClassicLinkInput struct { +type metadataDetachVpnGatewayInput struct { SDKShapeTraits bool `type:"structure"` } -type DisableVPCClassicLinkOutput struct { +// String returns the string representation +func (s DetachVpnGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVpnGatewayInput) GoString() string { + return s.String() +} + +type DetachVpnGatewayOutput struct { + metadataDetachVpnGatewayOutput `json:"-" xml:"-"` +} + +type metadataDetachVpnGatewayOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DetachVpnGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVpnGatewayOutput) GoString() string { + return s.String() +} + +// Describes a DHCP configuration option. +type DhcpConfiguration struct { + // The name of a DHCP option. + Key *string `locationName:"key" type:"string"` + + // One or more values for the DHCP option. + Values []*AttributeValue `locationName:"valueSet" locationNameList:"item" type:"list"` + + metadataDhcpConfiguration `json:"-" xml:"-"` +} + +type metadataDhcpConfiguration struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DhcpConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DhcpConfiguration) GoString() string { + return s.String() +} + +// Describes a set of DHCP options. +type DhcpOptions struct { + // One or more DHCP options in the set. + DhcpConfigurations []*DhcpConfiguration `locationName:"dhcpConfigurationSet" locationNameList:"item" type:"list"` + + // The ID of the set of DHCP options. + DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"` + + // Any tags assigned to the DHCP options set. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + metadataDhcpOptions `json:"-" xml:"-"` +} + +type metadataDhcpOptions struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DhcpOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DhcpOptions) GoString() string { + return s.String() +} + +type DisableVgwRoutePropagationInput struct { + // The ID of the virtual private gateway. + GatewayId *string `type:"string" required:"true"` + + // The ID of the route table. + RouteTableId *string `type:"string" required:"true"` + + metadataDisableVgwRoutePropagationInput `json:"-" xml:"-"` +} + +type metadataDisableVgwRoutePropagationInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DisableVgwRoutePropagationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableVgwRoutePropagationInput) GoString() string { + return s.String() +} + +type DisableVgwRoutePropagationOutput struct { + metadataDisableVgwRoutePropagationOutput `json:"-" xml:"-"` +} + +type metadataDisableVgwRoutePropagationOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DisableVgwRoutePropagationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableVgwRoutePropagationOutput) GoString() string { + return s.String() +} + +type DisableVpcClassicLinkInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string" required:"true"` + + metadataDisableVpcClassicLinkInput `json:"-" xml:"-"` +} + +type metadataDisableVpcClassicLinkInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s DisableVpcClassicLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableVpcClassicLinkInput) GoString() string { + return s.String() +} + +type DisableVpcClassicLinkOutput struct { // Returns true if the request succeeds; otherwise, it returns an error. Return *bool `locationName:"return" type:"boolean"` - metadataDisableVPCClassicLinkOutput `json:"-" xml:"-"` + metadataDisableVpcClassicLinkOutput `json:"-" xml:"-"` } -type metadataDisableVPCClassicLinkOutput struct { +type metadataDisableVpcClassicLinkOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisableVpcClassicLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableVpcClassicLinkOutput) GoString() string { + return s.String() +} + type DisassociateAddressInput struct { // [EC2-VPC] The association ID. Required for EC2-VPC. - AssociationID *string `locationName:"AssociationId" type:"string"` + AssociationId *string `type:"string"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13470,7 +15739,7 @@ type DisassociateAddressInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // [EC2-Classic] The Elastic IP address. Required for EC2-Classic. - PublicIP *string `locationName:"PublicIp" type:"string"` + PublicIp *string `type:"string"` metadataDisassociateAddressInput `json:"-" xml:"-"` } @@ -13479,6 +15748,16 @@ type metadataDisassociateAddressInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisassociateAddressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateAddressInput) GoString() string { + return s.String() +} + type DisassociateAddressOutput struct { metadataDisassociateAddressOutput `json:"-" xml:"-"` } @@ -13487,10 +15766,20 @@ type metadataDisassociateAddressOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisassociateAddressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateAddressOutput) GoString() string { + return s.String() +} + type DisassociateRouteTableInput struct { // The association ID representing the current association between the route // table and subnet. - AssociationID *string `locationName:"associationId" type:"string" required:"true"` + AssociationId *string `locationName:"associationId" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13505,6 +15794,16 @@ type metadataDisassociateRouteTableInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisassociateRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateRouteTableInput) GoString() string { + return s.String() +} + type DisassociateRouteTableOutput struct { metadataDisassociateRouteTableOutput `json:"-" xml:"-"` } @@ -13513,6 +15812,16 @@ type metadataDisassociateRouteTableOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisassociateRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateRouteTableOutput) GoString() string { + return s.String() +} + // Describes a disk image. type DiskImage struct { // A description of the disk image. @@ -13531,20 +15840,30 @@ type metadataDiskImage struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DiskImage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiskImage) GoString() string { + return s.String() +} + // Describes a disk image. type DiskImageDescription struct { // The checksum computed for the disk image. Checksum *string `locationName:"checksum" type:"string"` // The disk image format. - Format *string `locationName:"format" type:"string" required:"true"` + Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"` // A presigned URL for the import manifest stored in Amazon S3. For information // about creating a presigned URL for an Amazon S3 object, read the "Query String // Request Authentication Alternative" section of the Authenticating REST Requests // (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) // topic in the Amazon Simple Storage Service Developer Guide. - ImportManifestURL *string `locationName:"importManifestUrl" type:"string" required:"true"` + ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"` // The size of the disk image, in GiB. Size *int64 `locationName:"size" type:"long" required:"true"` @@ -13556,20 +15875,30 @@ type metadataDiskImageDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DiskImageDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiskImageDescription) GoString() string { + return s.String() +} + // Describes a disk image. type DiskImageDetail struct { // The size of the disk image, in GiB. Bytes *int64 `locationName:"bytes" type:"long" required:"true"` // The disk image format. - Format *string `locationName:"format" type:"string" required:"true"` + Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"` // A presigned URL for the import manifest stored in Amazon S3 and presented // here as an Amazon S3 presigned URL. For information about creating a presigned // URL for an Amazon S3 object, read the "Query String Request Authentication // Alternative" section of the Authenticating REST Requests (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) // topic in the Amazon Simple Storage Service Developer Guide. - ImportManifestURL *string `locationName:"importManifestUrl" type:"string" required:"true"` + ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"` metadataDiskImageDetail `json:"-" xml:"-"` } @@ -13578,10 +15907,20 @@ type metadataDiskImageDetail struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DiskImageDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiskImageDetail) GoString() string { + return s.String() +} + // Describes a disk image volume. type DiskImageVolumeDescription struct { // The volume identifier. - ID *string `locationName:"id" type:"string" required:"true"` + Id *string `locationName:"id" type:"string" required:"true"` // The size of the volume, in GiB. Size *int64 `locationName:"size" type:"long"` @@ -13593,8 +15932,18 @@ type metadataDiskImageVolumeDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DiskImageVolumeDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiskImageVolumeDescription) GoString() string { + return s.String() +} + // Describes a block device for an EBS volume. -type EBSBlockDevice struct { +type EbsBlockDevice struct { // Indicates whether the EBS volume is deleted on instance termination. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` @@ -13615,10 +15964,10 @@ type EBSBlockDevice struct { // // Condition: This parameter is required for requests to create io1 volumes; // it is not used in requests to create standard or gp2 volumes. - IOPS *int64 `locationName:"iops" type:"integer"` + Iops *int64 `locationName:"iops" type:"integer"` // The ID of the snapshot. - SnapshotID *string `locationName:"snapshotId" type:"string"` + SnapshotId *string `locationName:"snapshotId" type:"string"` // The size of the volume, in GiB. // @@ -13634,17 +15983,27 @@ type EBSBlockDevice struct { // IOPS (SSD) volumes, and standard for Magnetic volumes. // // Default: standard - VolumeType *string `locationName:"volumeType" type:"string"` + VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` - metadataEBSBlockDevice `json:"-" xml:"-"` + metadataEbsBlockDevice `json:"-" xml:"-"` } -type metadataEBSBlockDevice struct { +type metadataEbsBlockDevice struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EbsBlockDevice) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EbsBlockDevice) GoString() string { + return s.String() +} + // Describes a parameter used to set up an EBS volume in a block device mapping. -type EBSInstanceBlockDevice struct { +type EbsInstanceBlockDevice struct { // The time stamp when the attachment initiated. AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` @@ -13652,80 +16011,92 @@ type EBSInstanceBlockDevice struct { DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` // The attachment state. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` // The ID of the EBS volume. - VolumeID *string `locationName:"volumeId" type:"string"` + VolumeId *string `locationName:"volumeId" type:"string"` - metadataEBSInstanceBlockDevice `json:"-" xml:"-"` + metadataEbsInstanceBlockDevice `json:"-" xml:"-"` } -type metadataEBSInstanceBlockDevice struct { +type metadataEbsInstanceBlockDevice struct { SDKShapeTraits bool `type:"structure"` } -type EBSInstanceBlockDeviceSpecification struct { +// String returns the string representation +func (s EbsInstanceBlockDevice) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EbsInstanceBlockDevice) GoString() string { + return s.String() +} + +type EbsInstanceBlockDeviceSpecification struct { // Indicates whether the volume is deleted on instance termination. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` // The ID of the EBS volume. - VolumeID *string `locationName:"volumeId" type:"string"` + VolumeId *string `locationName:"volumeId" type:"string"` - metadataEBSInstanceBlockDeviceSpecification `json:"-" xml:"-"` + metadataEbsInstanceBlockDeviceSpecification `json:"-" xml:"-"` } -type metadataEBSInstanceBlockDeviceSpecification struct { +type metadataEbsInstanceBlockDeviceSpecification struct { SDKShapeTraits bool `type:"structure"` } -type EnableVGWRoutePropagationInput struct { +// String returns the string representation +func (s EbsInstanceBlockDeviceSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EbsInstanceBlockDeviceSpecification) GoString() string { + return s.String() +} + +type EnableVgwRoutePropagationInput struct { // The ID of the virtual private gateway. - GatewayID *string `locationName:"GatewayId" type:"string" required:"true"` + GatewayId *string `type:"string" required:"true"` // The ID of the route table. - RouteTableID *string `locationName:"RouteTableId" type:"string" required:"true"` + RouteTableId *string `type:"string" required:"true"` - metadataEnableVGWRoutePropagationInput `json:"-" xml:"-"` + metadataEnableVgwRoutePropagationInput `json:"-" xml:"-"` } -type metadataEnableVGWRoutePropagationInput struct { +type metadataEnableVgwRoutePropagationInput struct { SDKShapeTraits bool `type:"structure"` } -type EnableVGWRoutePropagationOutput struct { - metadataEnableVGWRoutePropagationOutput `json:"-" xml:"-"` +// String returns the string representation +func (s EnableVgwRoutePropagationInput) String() string { + return awsutil.Prettify(s) } -type metadataEnableVGWRoutePropagationOutput struct { +// GoString returns the string representation +func (s EnableVgwRoutePropagationInput) GoString() string { + return s.String() +} + +type EnableVgwRoutePropagationOutput struct { + metadataEnableVgwRoutePropagationOutput `json:"-" xml:"-"` +} + +type metadataEnableVgwRoutePropagationOutput struct { SDKShapeTraits bool `type:"structure"` } -type EnableVPCClassicLinkInput struct { - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` - - metadataEnableVPCClassicLinkInput `json:"-" xml:"-"` +// String returns the string representation +func (s EnableVgwRoutePropagationOutput) String() string { + return awsutil.Prettify(s) } -type metadataEnableVPCClassicLinkInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type EnableVPCClassicLinkOutput struct { - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` - - metadataEnableVPCClassicLinkOutput `json:"-" xml:"-"` -} - -type metadataEnableVPCClassicLinkOutput struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s EnableVgwRoutePropagationOutput) GoString() string { + return s.String() } type EnableVolumeIOInput struct { @@ -13736,7 +16107,7 @@ type EnableVolumeIOInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the volume. - VolumeID *string `locationName:"volumeId" type:"string" required:"true"` + VolumeId *string `locationName:"volumeId" type:"string" required:"true"` metadataEnableVolumeIOInput `json:"-" xml:"-"` } @@ -13745,6 +16116,16 @@ type metadataEnableVolumeIOInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnableVolumeIOInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableVolumeIOInput) GoString() string { + return s.String() +} + type EnableVolumeIOOutput struct { metadataEnableVolumeIOOutput `json:"-" xml:"-"` } @@ -13753,6 +16134,64 @@ type metadataEnableVolumeIOOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnableVolumeIOOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableVolumeIOOutput) GoString() string { + return s.String() +} + +type EnableVpcClassicLinkInput struct { + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string" required:"true"` + + metadataEnableVpcClassicLinkInput `json:"-" xml:"-"` +} + +type metadataEnableVpcClassicLinkInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s EnableVpcClassicLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableVpcClassicLinkInput) GoString() string { + return s.String() +} + +type EnableVpcClassicLinkOutput struct { + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` + + metadataEnableVpcClassicLinkOutput `json:"-" xml:"-"` +} + +type metadataEnableVpcClassicLinkOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s EnableVpcClassicLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableVpcClassicLinkOutput) GoString() string { + return s.String() +} + // Describes a Spot fleet event. type EventInformation struct { // The description of the event. @@ -13766,33 +16205,35 @@ type EventInformation struct { // either to launch or terminate an instance. // // spotFleetRequestConfigurationInvalid - The configuration is not valid. - // For more information, see the description. spotInstanceCountLimitExceeded - // - You've reached the limit on the number of Spot Instances that you can launch. + // For more information, see the description. + // + // spotInstanceCountLimitExceeded - You've reached the limit on the number + // of Spot instances that you can launch. // // The following are the fleetRequestChange events. // // active - The Spot fleet has been validated and Amazon EC2 is attempting - // to maintain the target number of running Spot Instances. + // to maintain the target number of running Spot instances. // - // cancelled - The Spot fleet is canceled and has no running Spot Instances. + // cancelled - The Spot fleet is canceled and has no running Spot instances. // The Spot fleet will be deleted two days after its instances were terminated. // // cancelled_running - The Spot fleet is canceled and will not launch additional - // Spot Instances, but its existing Spot Instances will continue to run until - // they are interrupted or terminated. + // Spot instances, but its existing Spot instances continue to run until they + // are interrupted or terminated. // - // cancelled_terminating - The Spot fleet is canceled and its Spot Instances + // cancelled_terminating - The Spot fleet is canceled and its Spot instances // are terminating. // // expired - The Spot fleet request has expired. A subsequent event indicates - // that the instances were terminated, if the request was created with terminateInstancesWithExpiration + // that the instances were terminated, if the request was created with TerminateInstancesWithExpiration // set. // // price_update - The bid price for a launch configuration was adjusted because // it was too high. This change is permanent. // // submitted - The Spot fleet request is being evaluated and Amazon EC2 is - // preparing to launch the target number of Spot Instances. + // preparing to launch the target number of Spot instances. // // The following are the instanceChange events. // @@ -13803,7 +16244,7 @@ type EventInformation struct { // The ID of the instance. This information is available only for instanceChange // events. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` metadataEventInformation `json:"-" xml:"-"` } @@ -13812,13 +16253,23 @@ type metadataEventInformation struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EventInformation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventInformation) GoString() string { + return s.String() +} + // Describes an instance export task. type ExportTask struct { // A description of the resource being exported. Description *string `locationName:"description" type:"string"` // The ID of the export task. - ExportTaskID *string `locationName:"exportTaskId" type:"string"` + ExportTaskId *string `locationName:"exportTaskId" type:"string"` // Information about the export task. ExportToS3Task *ExportToS3Task `locationName:"exportToS3" type:"structure"` @@ -13827,7 +16278,7 @@ type ExportTask struct { InstanceExportDetails *InstanceExportDetails `locationName:"instanceExport" type:"structure"` // The state of the export task. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"ExportTaskState"` // The status message related to the export task. StatusMessage *string `locationName:"statusMessage" type:"string"` @@ -13839,14 +16290,24 @@ type metadataExportTask struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ExportTask) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportTask) GoString() string { + return s.String() +} + // Describes the format and location for an instance export task. type ExportToS3Task struct { // The container format used to combine disk images with metadata (such as OVF). // If absent, only the disk image is exported. - ContainerFormat *string `locationName:"containerFormat" type:"string"` + ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"` // The format for the exported image. - DiskImageFormat *string `locationName:"diskImageFormat" type:"string"` + DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` // The S3 bucket for the destination image. The destination bucket must exist // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. @@ -13862,14 +16323,24 @@ type metadataExportToS3Task struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ExportToS3Task) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportToS3Task) GoString() string { + return s.String() +} + // Describes an instance export task. type ExportToS3TaskSpecification struct { // The container format used to combine disk images with metadata (such as OVF). // If absent, only the disk image is exported. - ContainerFormat *string `locationName:"containerFormat" type:"string"` + ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"` // The format for the exported image. - DiskImageFormat *string `locationName:"diskImageFormat" type:"string"` + DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` // The S3 bucket for the destination image. The destination bucket must exist // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. @@ -13886,6 +16357,16 @@ type metadataExportToS3TaskSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ExportToS3TaskSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportToS3TaskSpecification) GoString() string { + return s.String() +} + // A filter name and value pair that is used to return a more specific list // of results. Filters can be used to match a set of resources by various criteria, // such as tags, attributes, or IDs. @@ -13903,6 +16384,66 @@ type metadataFilter struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// Describes a flow log. +type FlowLog struct { + // The date and time the flow log was created. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601"` + + // Information about the error that occurred. Rate limited indicates that CloudWatch + // logs throttling has been applied for one or more network interfaces. Access + // error indicates that the IAM role associated with the flow log does not have + // sufficient permissions to publish to CloudWatch Logs. Unknown error indicates + // an internal error. + DeliverLogsErrorMessage *string `locationName:"deliverLogsErrorMessage" type:"string"` + + // The ARN of the IAM role that posts logs to CloudWatch Logs. + DeliverLogsPermissionArn *string `locationName:"deliverLogsPermissionArn" type:"string"` + + // The status of the logs delivery (SUCCESS | FAILED). + DeliverLogsStatus *string `locationName:"deliverLogsStatus" type:"string"` + + // The flow log ID. + FlowLogId *string `locationName:"flowLogId" type:"string"` + + // The status of the flow log (ACTIVE). + FlowLogStatus *string `locationName:"flowLogStatus" type:"string"` + + // The name of the flow log group. + LogGroupName *string `locationName:"logGroupName" type:"string"` + + // The ID of the resource on which the flow log was created. + ResourceId *string `locationName:"resourceId" type:"string"` + + // The type of traffic captured for the flow log. + TrafficType *string `locationName:"trafficType" type:"string" enum:"TrafficType"` + + metadataFlowLog `json:"-" xml:"-"` +} + +type metadataFlowLog struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s FlowLog) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FlowLog) GoString() string { + return s.String() +} + type GetConsoleOutputInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13911,7 +16452,7 @@ type GetConsoleOutputInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the instance. - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `type:"string" required:"true"` metadataGetConsoleOutputInput `json:"-" xml:"-"` } @@ -13920,9 +16461,19 @@ type metadataGetConsoleOutputInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s GetConsoleOutputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConsoleOutputInput) GoString() string { + return s.String() +} + type GetConsoleOutputOutput struct { // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The console output, Base64 encoded. Output *string `locationName:"output" type:"string"` @@ -13937,6 +16488,16 @@ type metadataGetConsoleOutputOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s GetConsoleOutputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetConsoleOutputOutput) GoString() string { + return s.String() +} + type GetPasswordDataInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -13945,7 +16506,7 @@ type GetPasswordDataInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the Windows instance. - InstanceID *string `locationName:"InstanceId" type:"string" required:"true"` + InstanceId *string `type:"string" required:"true"` metadataGetPasswordDataInput `json:"-" xml:"-"` } @@ -13954,9 +16515,19 @@ type metadataGetPasswordDataInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s GetPasswordDataInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPasswordDataInput) GoString() string { + return s.String() +} + type GetPasswordDataOutput struct { // The ID of the Windows instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The password of the instance. PasswordData *string `locationName:"passwordData" type:"string"` @@ -13971,10 +16542,20 @@ type metadataGetPasswordDataOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s GetPasswordDataOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPasswordDataOutput) GoString() string { + return s.String() +} + // Describes a security group. type GroupIdentifier struct { // The ID of the security group. - GroupID *string `locationName:"groupId" type:"string"` + GroupId *string `locationName:"groupId" type:"string"` // The name of the security group. GroupName *string `locationName:"groupName" type:"string"` @@ -13986,6 +16567,16 @@ type metadataGroupIdentifier struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s GroupIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupIdentifier) GoString() string { + return s.String() +} + // Describes an event in the history of the Spot fleet request. type HistoryRecord struct { // Information about the event. @@ -13999,7 +16590,7 @@ type HistoryRecord struct { // of the Spot fleet request. // // instanceChange - Indicates that an instance was launched or terminated. - EventType *string `locationName:"eventType" type:"string" required:"true"` + EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"` // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601" required:"true"` @@ -14011,107 +16602,95 @@ type metadataHistoryRecord struct { SDKShapeTraits bool `type:"structure"` } -// Describes an IAM instance profile. -type IAMInstanceProfile struct { - // The Amazon Resource Name (ARN) of the instance profile. - ARN *string `locationName:"arn" type:"string"` - - // The ID of the instance profile. - ID *string `locationName:"id" type:"string"` - - metadataIAMInstanceProfile `json:"-" xml:"-"` +// String returns the string representation +func (s HistoryRecord) String() string { + return awsutil.Prettify(s) } -type metadataIAMInstanceProfile struct { +// GoString returns the string representation +func (s HistoryRecord) GoString() string { + return s.String() +} + +// Describes an IAM instance profile. +type IamInstanceProfile struct { + // The Amazon Resource Name (ARN) of the instance profile. + Arn *string `locationName:"arn" type:"string"` + + // The ID of the instance profile. + Id *string `locationName:"id" type:"string"` + + metadataIamInstanceProfile `json:"-" xml:"-"` +} + +type metadataIamInstanceProfile struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s IamInstanceProfile) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IamInstanceProfile) GoString() string { + return s.String() +} + // Describes an IAM instance profile. -type IAMInstanceProfileSpecification struct { +type IamInstanceProfileSpecification struct { // The Amazon Resource Name (ARN) of the instance profile. - ARN *string `locationName:"arn" type:"string"` + Arn *string `locationName:"arn" type:"string"` // The name of the instance profile. Name *string `locationName:"name" type:"string"` - metadataIAMInstanceProfileSpecification `json:"-" xml:"-"` + metadataIamInstanceProfileSpecification `json:"-" xml:"-"` } -type metadataIAMInstanceProfileSpecification struct { +type metadataIamInstanceProfileSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s IamInstanceProfileSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IamInstanceProfileSpecification) GoString() string { + return s.String() +} + // Describes the ICMP type and code. -type ICMPTypeCode struct { +type IcmpTypeCode struct { // The ICMP type. A value of -1 means all types. Code *int64 `locationName:"code" type:"integer"` // The ICMP code. A value of -1 means all codes for the specified ICMP type. Type *int64 `locationName:"type" type:"integer"` - metadataICMPTypeCode `json:"-" xml:"-"` + metadataIcmpTypeCode `json:"-" xml:"-"` } -type metadataICMPTypeCode struct { +type metadataIcmpTypeCode struct { SDKShapeTraits bool `type:"structure"` } -// Describes a security group rule. -type IPPermission struct { - // The start of port range for the TCP and UDP protocols, or an ICMP type number. - // A value of -1 indicates all ICMP types. - FromPort *int64 `locationName:"fromPort" type:"integer"` - - // The protocol. - // - // When you call DescribeSecurityGroups, the protocol value returned is the - // number. Exception: For TCP, UDP, and ICMP, the value returned is the name - // (for example, tcp, udp, or icmp). For a list of protocol numbers, see Protocol - // Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). - // (VPC only) When you call AuthorizeSecurityGroupIngress, you can use -1 to - // specify all. - IPProtocol *string `locationName:"ipProtocol" type:"string"` - - // One or more IP ranges. - IPRanges []*IPRange `locationName:"ipRanges" locationNameList:"item" type:"list"` - - // (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups - // only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress - // request, this is the AWS service that you want to access through a VPC endpoint - // from instances associated with the security group. - PrefixListIDs []*PrefixListID `locationName:"prefixListIds" locationNameList:"item" type:"list"` - - // The end of port range for the TCP and UDP protocols, or an ICMP code. A value - // of -1 indicates all ICMP codes for the specified ICMP type. - ToPort *int64 `locationName:"toPort" type:"integer"` - - // One or more security group and AWS account ID pairs. - UserIDGroupPairs []*UserIDGroupPair `locationName:"groups" locationNameList:"item" type:"list"` - - metadataIPPermission `json:"-" xml:"-"` +// String returns the string representation +func (s IcmpTypeCode) String() string { + return awsutil.Prettify(s) } -type metadataIPPermission struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes an IP range. -type IPRange struct { - // The CIDR range. You can either specify a CIDR range or a source security - // group, not both. - CIDRIP *string `locationName:"cidrIp" type:"string"` - - metadataIPRange `json:"-" xml:"-"` -} - -type metadataIPRange struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s IcmpTypeCode) GoString() string { + return s.String() } // Describes an image. type Image struct { // The architecture of the image. - Architecture *string `locationName:"architecture" type:"string"` + Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` // Any block device mapping entries. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` @@ -14123,10 +16702,10 @@ type Image struct { Description *string `locationName:"description" type:"string"` // The hypervisor type of the image. - Hypervisor *string `locationName:"hypervisor" type:"string"` + Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` // The ID of the AMI. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` // The location of the AMI. ImageLocation *string `locationName:"imageLocation" type:"string"` @@ -14136,20 +16715,20 @@ type Image struct { ImageOwnerAlias *string `locationName:"imageOwnerAlias" type:"string"` // The type of image. - ImageType *string `locationName:"imageType" type:"string"` + ImageType *string `locationName:"imageType" type:"string" enum:"ImageTypeValues"` // The kernel associated with the image, if any. Only applicable for machine // images. - KernelID *string `locationName:"kernelId" type:"string"` + KernelId *string `locationName:"kernelId" type:"string"` // The name of the AMI that was provided during image creation. Name *string `locationName:"name" type:"string"` // The AWS account ID of the image owner. - OwnerID *string `locationName:"imageOwnerId" type:"string"` + OwnerId *string `locationName:"imageOwnerId" type:"string"` // The value is Windows for Windows AMIs; otherwise blank. - Platform *string `locationName:"platform" type:"string"` + Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` // Any product codes associated with the AMI. ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` @@ -14161,21 +16740,21 @@ type Image struct { // The RAM disk associated with the image, if any. Only applicable for machine // images. - RAMDiskID *string `locationName:"ramdiskId" type:"string"` + RamdiskId *string `locationName:"ramdiskId" type:"string"` // The device name of the root device (for example, /dev/sda1 or /dev/xvda). RootDeviceName *string `locationName:"rootDeviceName" type:"string"` // The type of root device used by the AMI. The AMI can use an EBS volume or // an instance store volume. - RootDeviceType *string `locationName:"rootDeviceType" type:"string"` + RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` // Specifies whether enhanced networking is enabled. - SRIOVNetSupport *string `locationName:"sriovNetSupport" type:"string"` + SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` // The current state of the AMI. If the state is available, the image is successfully // registered and can be used to launch an instance. - State *string `locationName:"imageState" type:"string"` + State *string `locationName:"imageState" type:"string" enum:"ImageState"` // The reason for the state change. StateReason *StateReason `locationName:"stateReason" type:"structure"` @@ -14184,7 +16763,7 @@ type Image struct { Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The type of virtualization of the AMI. - VirtualizationType *string `locationName:"virtualizationType" type:"string"` + VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` metadataImage `json:"-" xml:"-"` } @@ -14193,6 +16772,16 @@ type metadataImage struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Image) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Image) GoString() string { + return s.String() +} + // Describes the disk container object for an import image task. type ImageDiskContainer struct { // The description of the disk image. @@ -14207,11 +16796,11 @@ type ImageDiskContainer struct { Format *string `type:"string"` // The ID of the EBS snapshot to be used for importing the snapshot. - SnapshotID *string `locationName:"SnapshotId" type:"string"` + SnapshotId *string `type:"string"` // The URL to the Amazon S3-based disk image being imported. The URL can either // be a https URL (https://..) or an Amazon S3 URL (s3://..) - URL *string `locationName:"Url" type:"string"` + Url *string `type:"string"` // The S3 bucket for the disk image. UserBucket *UserBucket `type:"structure"` @@ -14223,6 +16812,16 @@ type metadataImageDiskContainer struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImageDiskContainer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImageDiskContainer) GoString() string { + return s.String() +} + type ImportImageInput struct { // The architecture of the virtual machine. // @@ -14277,6 +16876,16 @@ type metadataImportImageInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportImageInput) GoString() string { + return s.String() +} + type ImportImageOutput struct { // The architecture of the virtual machine. Architecture *string `locationName:"architecture" type:"string"` @@ -14288,10 +16897,10 @@ type ImportImageOutput struct { Hypervisor *string `locationName:"hypervisor" type:"string"` // The ID of the Amazon Machine Image (AMI) created by the import task. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` // The task ID of the import image task. - ImportTaskID *string `locationName:"importTaskId" type:"string"` + ImportTaskId *string `locationName:"importTaskId" type:"string"` // The license type of the virtual machine. LicenseType *string `locationName:"licenseType" type:"string"` @@ -14318,6 +16927,16 @@ type metadataImportImageOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportImageOutput) GoString() string { + return s.String() +} + // Describes an import image task. type ImportImageTask struct { // The architecture of the virtual machine. @@ -14334,10 +16953,10 @@ type ImportImageTask struct { Hypervisor *string `locationName:"hypervisor" type:"string"` // The ID of the Amazon Machine Image (AMI) of the imported virtual machine. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` // The ID of the import image task. - ImportTaskID *string `locationName:"importTaskId" type:"string"` + ImportTaskId *string `locationName:"importTaskId" type:"string"` // The license type of the virtual machine. LicenseType *string `locationName:"licenseType" type:"string"` @@ -14364,6 +16983,16 @@ type metadataImportImageTask struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportImageTask) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportImageTask) GoString() string { + return s.String() +} + type ImportInstanceInput struct { // A description for the instance being imported. Description *string `locationName:"description" type:"string"` @@ -14381,7 +17010,7 @@ type ImportInstanceInput struct { LaunchSpecification *ImportInstanceLaunchSpecification `locationName:"launchSpecification" type:"structure"` // The instance operating system. - Platform *string `locationName:"platform" type:"string" required:"true"` + Platform *string `locationName:"platform" type:"string" required:"true" enum:"PlatformValues"` metadataImportInstanceInput `json:"-" xml:"-"` } @@ -14390,28 +17019,38 @@ type metadataImportInstanceInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportInstanceInput) GoString() string { + return s.String() +} + // Describes the launch specification for VM import. type ImportInstanceLaunchSpecification struct { // Reserved. AdditionalInfo *string `locationName:"additionalInfo" type:"string"` // The architecture of the instance. - Architecture *string `locationName:"architecture" type:"string"` + Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` // One or more security group IDs. - GroupIDs []*string `locationName:"GroupId" locationNameList:"SecurityGroupId" type:"list"` + GroupIds []*string `locationName:"GroupId" locationNameList:"SecurityGroupId" type:"list"` // One or more security group names. GroupNames []*string `locationName:"GroupName" locationNameList:"SecurityGroup" type:"list"` // Indicates whether an instance stops or terminates when you initiate shutdown // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string"` + InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` // The instance type. For more information about the instance types that you // can import, see Before You Get Started (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html) // in the Amazon Elastic Compute Cloud User Guide. - InstanceType *string `locationName:"instanceType" type:"string"` + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // Indicates whether monitoring is enabled. Monitoring *bool `locationName:"monitoring" type:"boolean"` @@ -14420,10 +17059,10 @@ type ImportInstanceLaunchSpecification struct { Placement *Placement `locationName:"placement" type:"structure"` // [EC2-VPC] An available IP address from the IP address range of the subnet. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // [EC2-VPC] The ID of the subnet in which to launch the instance. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` // The Base64-encoded MIME user data to be made available to the instance. UserData *UserData `locationName:"userData" type:"structure"` @@ -14435,6 +17074,16 @@ type metadataImportInstanceLaunchSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportInstanceLaunchSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportInstanceLaunchSpecification) GoString() string { + return s.String() +} + type ImportInstanceOutput struct { // Information about the conversion task. ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"` @@ -14446,16 +17095,26 @@ type metadataImportInstanceOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportInstanceOutput) GoString() string { + return s.String() +} + // Describes an import instance task. type ImportInstanceTaskDetails struct { // A description of the task. Description *string `locationName:"description" type:"string"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The instance operating system. - Platform *string `locationName:"platform" type:"string"` + Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` // One or more volumes. Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list" required:"true"` @@ -14467,6 +17126,16 @@ type metadataImportInstanceTaskDetails struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportInstanceTaskDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportInstanceTaskDetails) GoString() string { + return s.String() +} + // Describes an import volume task. type ImportInstanceVolumeDetailItem struct { // The Availability Zone where the resulting instance will reside. @@ -14497,6 +17166,16 @@ type metadataImportInstanceVolumeDetailItem struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportInstanceVolumeDetailItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportInstanceVolumeDetailItem) GoString() string { + return s.String() +} + type ImportKeyPairInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -14518,6 +17197,16 @@ type metadataImportKeyPairInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportKeyPairInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportKeyPairInput) GoString() string { + return s.String() +} + type ImportKeyPairOutput struct { // The MD5 public key fingerprint as specified in section 4 of RFC 4716. KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` @@ -14532,6 +17221,16 @@ type metadataImportKeyPairOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportKeyPairOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportKeyPairOutput) GoString() string { + return s.String() +} + type ImportSnapshotInput struct { // The client-specific data. ClientData *ClientData `type:"structure"` @@ -14561,12 +17260,22 @@ type metadataImportSnapshotInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportSnapshotInput) GoString() string { + return s.String() +} + type ImportSnapshotOutput struct { // A description of the import snapshot task. Description *string `locationName:"description" type:"string"` // The ID of the import snapshot task. - ImportTaskID *string `locationName:"importTaskId" type:"string"` + ImportTaskId *string `locationName:"importTaskId" type:"string"` // Information about the import snapshot task. SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` @@ -14578,13 +17287,23 @@ type metadataImportSnapshotOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportSnapshotOutput) GoString() string { + return s.String() +} + // Describes an import snapshot task. type ImportSnapshotTask struct { // A description of the import snapshot task. Description *string `locationName:"description" type:"string"` // The ID of the import snapshot task. - ImportTaskID *string `locationName:"importTaskId" type:"string"` + ImportTaskId *string `locationName:"importTaskId" type:"string"` // Describes an import snapshot task. SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` @@ -14596,6 +17315,16 @@ type metadataImportSnapshotTask struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportSnapshotTask) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportSnapshotTask) GoString() string { + return s.String() +} + type ImportVolumeInput struct { // The Availability Zone for the resulting EBS volume. AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` @@ -14622,6 +17351,16 @@ type metadataImportVolumeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportVolumeInput) GoString() string { + return s.String() +} + type ImportVolumeOutput struct { // Information about the conversion task. ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"` @@ -14633,6 +17372,16 @@ type metadataImportVolumeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportVolumeOutput) GoString() string { + return s.String() +} + // Describes an import volume task. type ImportVolumeTaskDetails struct { // The Availability Zone where the resulting volume will reside. @@ -14657,14 +17406,24 @@ type metadataImportVolumeTaskDetails struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ImportVolumeTaskDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportVolumeTaskDetails) GoString() string { + return s.String() +} + // Describes an instance. type Instance struct { // The AMI launch index, which can be used to find this instance in the launch // group. - AMILaunchIndex *int64 `locationName:"amiLaunchIndex" type:"integer"` + AmiLaunchIndex *int64 `locationName:"amiLaunchIndex" type:"integer"` // The architecture of the image. - Architecture *string `locationName:"architecture" type:"string"` + Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` // Any block device mapping entries for the instance. BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` @@ -14677,28 +17436,28 @@ type Instance struct { // stack to provide optimal I/O performance. This optimization isn't available // with all instance types. Additional usage charges apply when using an EBS // Optimized instance. - EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` // The hypervisor type of the instance. - Hypervisor *string `locationName:"hypervisor" type:"string"` + Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` // The IAM instance profile associated with the instance. - IAMInstanceProfile *IAMInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` + IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` // The ID of the AMI used to launch the instance. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // Indicates whether this is a Spot Instance. - InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string"` + InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"` // The instance type. - InstanceType *string `locationName:"instanceType" type:"string"` + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // The kernel associated with this instance. - KernelID *string `locationName:"kernelId" type:"string"` + KernelId *string `locationName:"kernelId" type:"string"` // The name of the key pair, if this instance was launched with an associated // key pair. @@ -14717,38 +17476,35 @@ type Instance struct { Placement *Placement `locationName:"placement" type:"structure"` // The value is Windows for Windows instances; otherwise blank. - Platform *string `locationName:"platform" type:"string"` + Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` // The private DNS name assigned to the instance. This DNS name can only be // used inside the Amazon EC2 network. This name is not available until the // instance enters the running state. - PrivateDNSName *string `locationName:"privateDnsName" type:"string"` + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` // The private IP address assigned to the instance. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // The product codes attached to this instance. ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` // The public DNS name assigned to the instance. This name is not available // until the instance enters the running state. - PublicDNSName *string `locationName:"dnsName" type:"string"` + PublicDnsName *string `locationName:"dnsName" type:"string"` // The public IP address assigned to the instance. - PublicIPAddress *string `locationName:"ipAddress" type:"string"` + PublicIpAddress *string `locationName:"ipAddress" type:"string"` // The RAM disk associated with this instance. - RAMDiskID *string `locationName:"ramdiskId" type:"string"` + RamdiskId *string `locationName:"ramdiskId" type:"string"` // The root device name (for example, /dev/sda1 or /dev/xvda). RootDeviceName *string `locationName:"rootDeviceName" type:"string"` // The root device type used by the AMI. The AMI can use an EBS volume or an // instance store volume. - RootDeviceType *string `locationName:"rootDeviceType" type:"string"` - - // Specifies whether enhanced networking is enabled. - SRIOVNetSupport *string `locationName:"sriovNetSupport" type:"string"` + RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` // One or more security groups for the instance. SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` @@ -14762,7 +17518,10 @@ type Instance struct { SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` // The ID of the Spot Instance request. - SpotInstanceRequestID *string `locationName:"spotInstanceRequestId" type:"string"` + SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` + + // Specifies whether enhanced networking is enabled. + SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` // The current state of the instance. State *InstanceState `locationName:"instanceState" type:"structure"` @@ -14774,16 +17533,16 @@ type Instance struct { StateTransitionReason *string `locationName:"reason" type:"string"` // The ID of the subnet in which the instance is running. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` // Any tags assigned to the instance. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // The ID of the VPC in which the instance is running. - VPCID *string `locationName:"vpcId" type:"string"` - // The virtualization type of the instance. - VirtualizationType *string `locationName:"virtualizationType" type:"string"` + VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` + + // The ID of the VPC in which the instance is running. + VpcId *string `locationName:"vpcId" type:"string"` metadataInstance `json:"-" xml:"-"` } @@ -14792,6 +17551,16 @@ type metadataInstance struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Instance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Instance) GoString() string { + return s.String() +} + // Describes a block device mapping. type InstanceBlockDeviceMapping struct { // The device name exposed to the instance (for example, /dev/sdh or xvdh). @@ -14799,7 +17568,7 @@ type InstanceBlockDeviceMapping struct { // Parameters used to automatically set up EBS volumes when the instance is // launched. - EBS *EBSInstanceBlockDevice `locationName:"ebs" type:"structure"` + Ebs *EbsInstanceBlockDevice `locationName:"ebs" type:"structure"` metadataInstanceBlockDeviceMapping `json:"-" xml:"-"` } @@ -14808,6 +17577,16 @@ type metadataInstanceBlockDeviceMapping struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceBlockDeviceMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceBlockDeviceMapping) GoString() string { + return s.String() +} + // Describes a block device mapping entry. type InstanceBlockDeviceMappingSpecification struct { // The device name exposed to the instance (for example, /dev/sdh or xvdh). @@ -14815,7 +17594,7 @@ type InstanceBlockDeviceMappingSpecification struct { // Parameters used to automatically set up EBS volumes when the instance is // launched. - EBS *EBSInstanceBlockDeviceSpecification `locationName:"ebs" type:"structure"` + Ebs *EbsInstanceBlockDeviceSpecification `locationName:"ebs" type:"structure"` // suppress the specified device included in the block device mapping. NoDevice *string `locationName:"noDevice" type:"string"` @@ -14830,13 +17609,23 @@ type metadataInstanceBlockDeviceMappingSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceBlockDeviceMappingSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceBlockDeviceMappingSpecification) GoString() string { + return s.String() +} + // Describes a Reserved Instance listing state. type InstanceCount struct { // The number of listed Reserved Instances in the state specified by the state. InstanceCount *int64 `locationName:"instanceCount" type:"integer"` // The states of the listed Reserved Instances. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"ListingState"` metadataInstanceCount `json:"-" xml:"-"` } @@ -14845,13 +17634,23 @@ type metadataInstanceCount struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceCount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceCount) GoString() string { + return s.String() +} + // Describes an instance to export. type InstanceExportDetails struct { // The ID of the resource being exported. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The target virtualization environment. - TargetEnvironment *string `locationName:"targetEnvironment" type:"string"` + TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"` metadataInstanceExportDetails `json:"-" xml:"-"` } @@ -14860,10 +17659,20 @@ type metadataInstanceExportDetails struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceExportDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceExportDetails) GoString() string { + return s.String() +} + // Describes the monitoring information of the instance. type InstanceMonitoring struct { // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The monitoring information. Monitoring *Monitoring `locationName:"monitoring" type:"structure"` @@ -14875,6 +17684,16 @@ type metadataInstanceMonitoring struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceMonitoring) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceMonitoring) GoString() string { + return s.String() +} + // Describes a network interface. type InstanceNetworkInterface struct { // The association information for an Elastic IP associated with the network @@ -14891,34 +17710,34 @@ type InstanceNetworkInterface struct { Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The MAC address. - MACAddress *string `locationName:"macAddress" type:"string"` + MacAddress *string `locationName:"macAddress" type:"string"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // The ID of the AWS account that created the network interface. - OwnerID *string `locationName:"ownerId" type:"string"` + OwnerId *string `locationName:"ownerId" type:"string"` // The private DNS name. - PrivateDNSName *string `locationName:"privateDnsName" type:"string"` + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` // The IP address of the network interface within the subnet. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // The private IP addresses associated with the network interface. - PrivateIPAddresses []*InstancePrivateIPAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` + PrivateIpAddresses []*InstancePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` // Indicates whether to validate network traffic to or from this network interface. SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` // The status of the network interface. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"` // The ID of the subnet. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` + VpcId *string `locationName:"vpcId" type:"string"` metadataInstanceNetworkInterface `json:"-" xml:"-"` } @@ -14927,16 +17746,26 @@ type metadataInstanceNetworkInterface struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceNetworkInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceNetworkInterface) GoString() string { + return s.String() +} + // Describes association information for an Elastic IP address. type InstanceNetworkInterfaceAssociation struct { // The ID of the owner of the Elastic IP address. - IPOwnerID *string `locationName:"ipOwnerId" type:"string"` + IpOwnerId *string `locationName:"ipOwnerId" type:"string"` // The public DNS name. - PublicDNSName *string `locationName:"publicDnsName" type:"string"` + PublicDnsName *string `locationName:"publicDnsName" type:"string"` // The public IP address or Elastic IP address bound to the network interface. - PublicIP *string `locationName:"publicIp" type:"string"` + PublicIp *string `locationName:"publicIp" type:"string"` metadataInstanceNetworkInterfaceAssociation `json:"-" xml:"-"` } @@ -14945,13 +17774,23 @@ type metadataInstanceNetworkInterfaceAssociation struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceNetworkInterfaceAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceNetworkInterfaceAssociation) GoString() string { + return s.String() +} + // Describes a network interface attachment. type InstanceNetworkInterfaceAttachment struct { // The time stamp when the attachment initiated. AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` // The ID of the network interface attachment. - AttachmentID *string `locationName:"attachmentId" type:"string"` + AttachmentId *string `locationName:"attachmentId" type:"string"` // Indicates whether the network interface is deleted when the instance is terminated. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` @@ -14960,7 +17799,7 @@ type InstanceNetworkInterfaceAttachment struct { DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` // The attachment state. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` metadataInstanceNetworkInterfaceAttachment `json:"-" xml:"-"` } @@ -14969,6 +17808,16 @@ type metadataInstanceNetworkInterfaceAttachment struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceNetworkInterfaceAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceNetworkInterfaceAttachment) GoString() string { + return s.String() +} + // Describes a network interface. type InstanceNetworkInterfaceSpecification struct { // Indicates whether to assign a public IP address to an instance you launch @@ -14976,7 +17825,7 @@ type InstanceNetworkInterfaceSpecification struct { // for eth0, and can only be assigned to a new network interface, not an existing // one. You cannot specify more than one network interface in the request. If // launching into a default subnet, the default value is true. - AssociatePublicIPAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"` + AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"` // If set to true, the interface is deleted when the instance is terminated. // You can specify true only if creating a new network interface when launching @@ -14997,24 +17846,24 @@ type InstanceNetworkInterfaceSpecification struct { Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // The private IP address of the network interface. Applies only if creating // a network interface when launching an instance. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // One or more private IP addresses to assign to the network interface. Only // one private IP address can be designated as primary. - PrivateIPAddresses []*PrivateIPAddressSpecification `locationName:"privateIpAddressesSet" queryName:"PrivateIpAddresses" locationNameList:"item" type:"list"` + PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" queryName:"PrivateIpAddresses" locationNameList:"item" type:"list"` // The number of secondary private IP addresses. You can't specify this option // and specify more than one private IP address using the private IP addresses // option. - SecondaryPrivateIPAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` + SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` // The ID of the subnet associated with the network string. Applies only if // creating a network interface when launching an instance. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` metadataInstanceNetworkInterfaceSpecification `json:"-" xml:"-"` } @@ -15023,8 +17872,18 @@ type metadataInstanceNetworkInterfaceSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceNetworkInterfaceSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceNetworkInterfaceSpecification) GoString() string { + return s.String() +} + // Describes a private IP address. -type InstancePrivateIPAddress struct { +type InstancePrivateIpAddress struct { // The association information for an Elastic IP address for the network interface. Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"` @@ -15033,18 +17892,28 @@ type InstancePrivateIPAddress struct { Primary *bool `locationName:"primary" type:"boolean"` // The private DNS name. - PrivateDNSName *string `locationName:"privateDnsName" type:"string"` + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` // The private IP address of the network interface. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - metadataInstancePrivateIPAddress `json:"-" xml:"-"` + metadataInstancePrivateIpAddress `json:"-" xml:"-"` } -type metadataInstancePrivateIPAddress struct { +type metadataInstancePrivateIpAddress struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstancePrivateIpAddress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstancePrivateIpAddress) GoString() string { + return s.String() +} + // Describes the current state of the instance. type InstanceState struct { // The low byte represents the state. The high byte is an opaque internal value @@ -15064,7 +17933,7 @@ type InstanceState struct { Code *int64 `locationName:"code" type:"integer"` // The current state of the instance. - Name *string `locationName:"name" type:"string"` + Name *string `locationName:"name" type:"string" enum:"InstanceStateName"` metadataInstanceState `json:"-" xml:"-"` } @@ -15073,13 +17942,23 @@ type metadataInstanceState struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceState) GoString() string { + return s.String() +} + // Describes an instance state change. type InstanceStateChange struct { // The current state of the instance. CurrentState *InstanceState `locationName:"currentState" type:"structure"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The previous state of the instance. PreviousState *InstanceState `locationName:"previousState" type:"structure"` @@ -15091,6 +17970,16 @@ type metadataInstanceStateChange struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceStateChange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceStateChange) GoString() string { + return s.String() +} + // Describes the status of an instance. type InstanceStatus struct { // The Availability Zone of the instance. @@ -15100,7 +17989,7 @@ type InstanceStatus struct { Events []*InstanceStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The intended state of the instance. DescribeInstanceStatus requires that // an instance be in the running state. @@ -15122,6 +18011,16 @@ type metadataInstanceStatus struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceStatus) GoString() string { + return s.String() +} + // Describes the instance status. type InstanceStatusDetails struct { // The time when a status check failed. For an instance that was launched and @@ -15129,10 +18028,10 @@ type InstanceStatusDetails struct { ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp" timestampFormat:"iso8601"` // The type of instance status. - Name *string `locationName:"name" type:"string"` + Name *string `locationName:"name" type:"string" enum:"StatusName"` // The status. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"StatusType"` metadataInstanceStatusDetails `json:"-" xml:"-"` } @@ -15141,10 +18040,20 @@ type metadataInstanceStatusDetails struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceStatusDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceStatusDetails) GoString() string { + return s.String() +} + // Describes a scheduled event for an instance. type InstanceStatusEvent struct { // The event code. - Code *string `locationName:"code" type:"string"` + Code *string `locationName:"code" type:"string" enum:"EventCode"` // A description of the event. // @@ -15166,13 +18075,23 @@ type metadataInstanceStatusEvent struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceStatusEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceStatusEvent) GoString() string { + return s.String() +} + // Describes the status of an instance. type InstanceStatusSummary struct { // The system instance health or application instance health. Details []*InstanceStatusDetails `locationName:"details" locationNameList:"item" type:"list"` // The status. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"SummaryStatus"` metadataInstanceStatusSummary `json:"-" xml:"-"` } @@ -15181,13 +18100,23 @@ type metadataInstanceStatusSummary struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceStatusSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceStatusSummary) GoString() string { + return s.String() +} + // Describes an Internet gateway. type InternetGateway struct { // Any VPCs attached to the Internet gateway. Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` // The ID of the Internet gateway. - InternetGatewayID *string `locationName:"internetGatewayId" type:"string"` + InternetGatewayId *string `locationName:"internetGatewayId" type:"string"` // Any tags assigned to the Internet gateway. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` @@ -15199,13 +18128,23 @@ type metadataInternetGateway struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InternetGateway) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InternetGateway) GoString() string { + return s.String() +} + // Describes the attachment of a VPC to an Internet gateway. type InternetGatewayAttachment struct { // The current state of the attachment. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"AttachmentStatus"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` + VpcId *string `locationName:"vpcId" type:"string"` metadataInternetGatewayAttachment `json:"-" xml:"-"` } @@ -15214,6 +18153,88 @@ type metadataInternetGatewayAttachment struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InternetGatewayAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InternetGatewayAttachment) GoString() string { + return s.String() +} + +// Describes a security group rule. +type IpPermission struct { + // The start of port range for the TCP and UDP protocols, or an ICMP type number. + // A value of -1 indicates all ICMP types. + FromPort *int64 `locationName:"fromPort" type:"integer"` + + // The protocol. + // + // When you call DescribeSecurityGroups, the protocol value returned is the + // number. Exception: For TCP, UDP, and ICMP, the value returned is the name + // (for example, tcp, udp, or icmp). For a list of protocol numbers, see Protocol + // Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). + // (VPC only) When you call AuthorizeSecurityGroupIngress, you can use -1 to + // specify all. + IpProtocol *string `locationName:"ipProtocol" type:"string"` + + // One or more IP ranges. + IpRanges []*IpRange `locationName:"ipRanges" locationNameList:"item" type:"list"` + + // (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups + // only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress + // request, this is the AWS service that you want to access through a VPC endpoint + // from instances associated with the security group. + PrefixListIds []*PrefixListId `locationName:"prefixListIds" locationNameList:"item" type:"list"` + + // The end of port range for the TCP and UDP protocols, or an ICMP code. A value + // of -1 indicates all ICMP codes for the specified ICMP type. + ToPort *int64 `locationName:"toPort" type:"integer"` + + // One or more security group and AWS account ID pairs. + UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"` + + metadataIpPermission `json:"-" xml:"-"` +} + +type metadataIpPermission struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s IpPermission) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpPermission) GoString() string { + return s.String() +} + +// Describes an IP range. +type IpRange struct { + // The CIDR range. You can either specify a CIDR range or a source security + // group, not both. + CidrIp *string `locationName:"cidrIp" type:"string"` + + metadataIpRange `json:"-" xml:"-"` +} + +type metadataIpRange struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s IpRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpRange) GoString() string { + return s.String() +} + // Describes a key pair. type KeyPairInfo struct { // If you used CreateKeyPair to create the key pair, this is the SHA-1 digest @@ -15232,13 +18253,23 @@ type metadataKeyPairInfo struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s KeyPairInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KeyPairInfo) GoString() string { + return s.String() +} + // Describes a launch permission. type LaunchPermission struct { // The name of the group. - Group *string `locationName:"group" type:"string"` + Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` // The AWS account ID. - UserID *string `locationName:"userId" type:"string"` + UserId *string `locationName:"userId" type:"string"` metadataLaunchPermission `json:"-" xml:"-"` } @@ -15247,6 +18278,16 @@ type metadataLaunchPermission struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s LaunchPermission) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchPermission) GoString() string { + return s.String() +} + // Describes a launch permission modification. type LaunchPermissionModifications struct { // The AWS account ID to add to the list of launch permissions for the AMI. @@ -15263,6 +18304,16 @@ type metadataLaunchPermissionModifications struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s LaunchPermissionModifications) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchPermissionModifications) GoString() string { + return s.String() +} + // Describes the launch specification for an instance. type LaunchSpecification struct { // Deprecated. @@ -15278,19 +18329,19 @@ type LaunchSpecification struct { // Optimized instance. // // Default: false - EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` // The IAM instance profile. - IAMInstanceProfile *IAMInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` // The ID of the AMI. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` // The instance type. - InstanceType *string `locationName:"instanceType" type:"string"` + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // The ID of the kernel. - KernelID *string `locationName:"kernelId" type:"string"` + KernelId *string `locationName:"kernelId" type:"string"` // The name of the key pair. KeyName *string `locationName:"keyName" type:"string"` @@ -15305,7 +18356,7 @@ type LaunchSpecification struct { Placement *SpotPlacement `locationName:"placement" type:"structure"` // The ID of the RAM disk. - RAMDiskID *string `locationName:"ramdiskId" type:"string"` + 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 @@ -15314,7 +18365,7 @@ type LaunchSpecification struct { SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The ID of the subnet in which to launch the instance. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` // The Base64-encoded MIME user data to make available to the instances. UserData *string `locationName:"userData" type:"string"` @@ -15326,6 +18377,16 @@ type metadataLaunchSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s LaunchSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchSpecification) GoString() string { + return s.String() +} + type ModifyImageAttributeInput struct { // The name of the attribute to modify. Attribute *string `type:"string"` @@ -15340,13 +18401,13 @@ type ModifyImageAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the AMI. - ImageID *string `locationName:"ImageId" type:"string" required:"true"` + ImageId *string `type:"string" required:"true"` // A launch permission modification. LaunchPermission *LaunchPermissionModifications `type:"structure"` // The operation type. - OperationType *string `type:"string"` + OperationType *string `type:"string" enum:"OperationType"` // One or more product codes. After you add a product code to an AMI, it can't // be removed. This is only valid when modifying the productCodes attribute. @@ -15358,7 +18419,7 @@ type ModifyImageAttributeInput struct { // One or more AWS account IDs. This is only valid when modifying the launchPermission // attribute. - UserIDs []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` + UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` // The value of the attribute being modified. This is only valid when modifying // the description attribute. @@ -15371,6 +18432,16 @@ type metadataModifyImageAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyImageAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyImageAttributeInput) GoString() string { + return s.String() +} + type ModifyImageAttributeOutput struct { metadataModifyImageAttributeOutput `json:"-" xml:"-"` } @@ -15379,9 +18450,19 @@ type metadataModifyImageAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyImageAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyImageAttributeOutput) GoString() string { + return s.String() +} + type ModifyInstanceAttributeInput struct { // The name of the attribute. - Attribute *string `locationName:"attribute" type:"string"` + Attribute *string `locationName:"attribute" type:"string" enum:"InstanceAttributeName"` // Modifies the DeleteOnTermination attribute for volumes that are currently // attached. The volume must be owned by the caller. If no value is specified @@ -15395,8 +18476,9 @@ 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. - DisableAPITermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` + // console, CLI, or API; otherwise, you can. You cannot use this paramater for + // Spot Instances. + DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -15409,7 +18491,7 @@ type ModifyInstanceAttributeInput struct { // stack to provide optimal EBS I/O performance. This optimization isn't available // with all instance types. Additional usage charges apply when using an EBS // Optimized instance. - EBSOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` + EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` // [EC2-VPC] Changes the security groups of the instance. You must specify at // least one security group, even if it's just the default security group for @@ -15417,7 +18499,7 @@ type ModifyInstanceAttributeInput struct { Groups []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string" required:"true"` + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` // Specifies whether an instance stops or terminates when you initiate shutdown // from the instance (using the operating system command for system shutdown). @@ -15436,7 +18518,12 @@ type ModifyInstanceAttributeInput struct { // Changes the instance's RAM disk to the specified value. We recommend that // you use PV-GRUB instead of kernels and RAM disks. For more information, see // PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html). - RAMDisk *AttributeValue `locationName:"ramdisk" type:"structure"` + Ramdisk *AttributeValue `locationName:"ramdisk" type:"structure"` + + // Specifies whether source/destination checking is enabled. A value of true + // means that checking is enabled, and false means checking is disabled. This + // value must be false for a NAT instance to perform NAT. + SourceDestCheck *AttributeBooleanValue `type:"structure"` // Set to simple to enable enhanced networking for the instance. // @@ -15444,18 +18531,13 @@ type ModifyInstanceAttributeInput struct { // // This option is supported only for HVM instances. Specifying this option // with a PV instance can make it unreachable. - SRIOVNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` - - // Specifies whether source/destination checking is enabled. A value of true - // means that checking is enabled, and false means checking is disabled. This - // value must be false for a NAT instance to perform NAT. - SourceDestCheck *AttributeBooleanValue `type:"structure"` + SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` // Changes the instance's user data to the specified value. UserData *BlobAttributeValue `locationName:"userData" type:"structure"` // A new value for the attribute. Use only with the kernel, ramdisk, userData, - // disableApiTermination, or intanceInitiateShutdownBehavior attribute. + // disableApiTermination, or instanceInitiatedShutdownBehavior attribute. Value *string `locationName:"value" type:"string"` metadataModifyInstanceAttributeInput `json:"-" xml:"-"` @@ -15465,6 +18547,16 @@ type metadataModifyInstanceAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyInstanceAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyInstanceAttributeInput) GoString() string { + return s.String() +} + type ModifyInstanceAttributeOutput struct { metadataModifyInstanceAttributeOutput `json:"-" xml:"-"` } @@ -15473,6 +18565,16 @@ type metadataModifyInstanceAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyInstanceAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyInstanceAttributeOutput) GoString() string { + return s.String() +} + type ModifyNetworkInterfaceAttributeInput struct { // Information about the interface attachment. If modifying the 'delete on termination' // attribute, you must specify the ID of the interface attachment. @@ -15494,7 +18596,7 @@ type ModifyNetworkInterfaceAttributeInput struct { Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` // Indicates whether source/destination checking is enabled. A value of true // means checking is enabled, and false means checking is disabled. This value @@ -15510,6 +18612,16 @@ type metadataModifyNetworkInterfaceAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyNetworkInterfaceAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyNetworkInterfaceAttributeInput) GoString() string { + return s.String() +} + type ModifyNetworkInterfaceAttributeOutput struct { metadataModifyNetworkInterfaceAttributeOutput `json:"-" xml:"-"` } @@ -15518,13 +18630,23 @@ type metadataModifyNetworkInterfaceAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyNetworkInterfaceAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyNetworkInterfaceAttributeOutput) GoString() string { + return s.String() +} + type ModifyReservedInstancesInput struct { // A unique, case-sensitive token you provide to ensure idempotency of your // modification request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` // The IDs of the Reserved Instances to modify. - ReservedInstancesIDs []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list" required:"true"` + ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list" required:"true"` // The configuration settings for the Reserved Instances to modify. TargetConfigurations []*ReservedInstancesConfiguration `locationName:"ReservedInstancesConfigurationSetItemType" locationNameList:"item" type:"list" required:"true"` @@ -15536,9 +18658,19 @@ type metadataModifyReservedInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyReservedInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyReservedInstancesInput) GoString() string { + return s.String() +} + type ModifyReservedInstancesOutput struct { // The ID for the modification. - ReservedInstancesModificationID *string `locationName:"reservedInstancesModificationId" type:"string"` + ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"` metadataModifyReservedInstancesOutput `json:"-" xml:"-"` } @@ -15547,9 +18679,21 @@ type metadataModifyReservedInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyReservedInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyReservedInstancesOutput) GoString() string { + return s.String() +} + type ModifySnapshotAttributeInput struct { // The snapshot attribute to modify. - Attribute *string `type:"string"` + // + // Only volume creation permissions may be modified at the customer level. + Attribute *string `type:"string" enum:"SnapshotAttributeName"` // A JSON representation of the snapshot attribute modification. CreateVolumePermission *CreateVolumePermissionModifications `type:"structure"` @@ -15564,13 +18708,13 @@ type ModifySnapshotAttributeInput struct { GroupNames []*string `locationName:"UserGroup" locationNameList:"GroupName" type:"list"` // The type of operation to perform to the attribute. - OperationType *string `type:"string"` + OperationType *string `type:"string" enum:"OperationType"` // The ID of the snapshot. - SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"` + SnapshotId *string `type:"string" required:"true"` // The account ID to modify for the snapshot. - UserIDs []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` + UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` metadataModifySnapshotAttributeInput `json:"-" xml:"-"` } @@ -15579,6 +18723,16 @@ type metadataModifySnapshotAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifySnapshotAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySnapshotAttributeInput) GoString() string { + return s.String() +} + type ModifySnapshotAttributeOutput struct { metadataModifySnapshotAttributeOutput `json:"-" xml:"-"` } @@ -15587,13 +18741,23 @@ type metadataModifySnapshotAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifySnapshotAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySnapshotAttributeOutput) GoString() string { + return s.String() +} + type ModifySubnetAttributeInput struct { // Specify true to indicate that instances launched into the specified subnet // should be assigned public IP address. - MapPublicIPOnLaunch *AttributeBooleanValue `locationName:"MapPublicIpOnLaunch" type:"structure"` + MapPublicIpOnLaunch *AttributeBooleanValue `type:"structure"` // The ID of the subnet. - SubnetID *string `locationName:"subnetId" type:"string" required:"true"` + SubnetId *string `locationName:"subnetId" type:"string" required:"true"` metadataModifySubnetAttributeInput `json:"-" xml:"-"` } @@ -15602,6 +18766,16 @@ type metadataModifySubnetAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifySubnetAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySubnetAttributeInput) GoString() string { + return s.String() +} + type ModifySubnetAttributeOutput struct { metadataModifySubnetAttributeOutput `json:"-" xml:"-"` } @@ -15610,78 +18784,14 @@ type metadataModifySubnetAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } -type ModifyVPCAttributeInput struct { - // Indicates whether the instances launched in the VPC get DNS hostnames. If - // enabled, instances in the VPC get DNS hostnames; otherwise, they do not. - // - // You can only enable DNS hostnames if you also enable DNS support. - EnableDNSHostnames *AttributeBooleanValue `locationName:"EnableDnsHostnames" type:"structure"` - - // Indicates whether the DNS resolution is supported for the VPC. If enabled, - // queries to the Amazon provided DNS server at the 169.254.169.253 IP address, - // or the reserved IP address at the base of the VPC network range "plus two" - // will succeed. If disabled, the Amazon provided DNS service in the VPC that - // resolves public DNS hostnames to IP addresses is not enabled. - EnableDNSSupport *AttributeBooleanValue `locationName:"EnableDnsSupport" type:"structure"` - - // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string" required:"true"` - - metadataModifyVPCAttributeInput `json:"-" xml:"-"` +// String returns the string representation +func (s ModifySubnetAttributeOutput) String() string { + return awsutil.Prettify(s) } -type metadataModifyVPCAttributeInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type ModifyVPCAttributeOutput struct { - metadataModifyVPCAttributeOutput `json:"-" xml:"-"` -} - -type metadataModifyVPCAttributeOutput struct { - SDKShapeTraits bool `type:"structure"` -} - -type ModifyVPCEndpointInput struct { - // One or more route tables IDs to associate with the endpoint. - AddRouteTableIDs []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"` - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have - // the required permissions, the error response is DryRunOperation. Otherwise, - // it is UnauthorizedOperation. - DryRun *bool `type:"boolean"` - - // A policy document to attach to the endpoint. The policy must be in valid - // JSON format. - PolicyDocument *string `type:"string"` - - // One or more route table IDs to disassociate from the endpoint. - RemoveRouteTableIDs []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"` - - // Specify true to reset the policy document to the default policy. The default - // policy allows access to the service. - ResetPolicy *bool `type:"boolean"` - - // The ID of the endpoint. - VPCEndpointID *string `locationName:"VpcEndpointId" type:"string" required:"true"` - - metadataModifyVPCEndpointInput `json:"-" xml:"-"` -} - -type metadataModifyVPCEndpointInput struct { - SDKShapeTraits bool `type:"structure"` -} - -type ModifyVPCEndpointOutput struct { - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` - - metadataModifyVPCEndpointOutput `json:"-" xml:"-"` -} - -type metadataModifyVPCEndpointOutput struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s ModifySubnetAttributeOutput) GoString() string { + return s.String() } type ModifyVolumeAttributeInput struct { @@ -15695,7 +18805,7 @@ type ModifyVolumeAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the volume. - VolumeID *string `locationName:"VolumeId" type:"string" required:"true"` + VolumeId *string `type:"string" required:"true"` metadataModifyVolumeAttributeInput `json:"-" xml:"-"` } @@ -15704,6 +18814,16 @@ type metadataModifyVolumeAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyVolumeAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVolumeAttributeInput) GoString() string { + return s.String() +} + type ModifyVolumeAttributeOutput struct { metadataModifyVolumeAttributeOutput `json:"-" xml:"-"` } @@ -15712,6 +18832,130 @@ type metadataModifyVolumeAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyVolumeAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVolumeAttributeOutput) GoString() string { + return s.String() +} + +type ModifyVpcAttributeInput struct { + // Indicates whether the instances launched in the VPC get DNS hostnames. If + // enabled, instances in the VPC get DNS hostnames; otherwise, they do not. + // + // You can only enable DNS hostnames if you also enable DNS support. + EnableDnsHostnames *AttributeBooleanValue `type:"structure"` + + // Indicates whether the DNS resolution is supported for the VPC. If enabled, + // queries to the Amazon provided DNS server at the 169.254.169.253 IP address, + // or the reserved IP address at the base of the VPC network range "plus two" + // will succeed. If disabled, the Amazon provided DNS service in the VPC that + // resolves public DNS hostnames to IP addresses is not enabled. + EnableDnsSupport *AttributeBooleanValue `type:"structure"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string" required:"true"` + + metadataModifyVpcAttributeInput `json:"-" xml:"-"` +} + +type metadataModifyVpcAttributeInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s ModifyVpcAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpcAttributeInput) GoString() string { + return s.String() +} + +type ModifyVpcAttributeOutput struct { + metadataModifyVpcAttributeOutput `json:"-" xml:"-"` +} + +type metadataModifyVpcAttributeOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s ModifyVpcAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpcAttributeOutput) GoString() string { + return s.String() +} + +type ModifyVpcEndpointInput struct { + // One or more route tables IDs to associate with the endpoint. + AddRouteTableIds []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // A policy document to attach to the endpoint. The policy must be in valid + // JSON format. + PolicyDocument *string `type:"string"` + + // One or more route table IDs to disassociate from the endpoint. + RemoveRouteTableIds []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"` + + // Specify true to reset the policy document to the default policy. The default + // policy allows access to the service. + ResetPolicy *bool `type:"boolean"` + + // The ID of the endpoint. + VpcEndpointId *string `type:"string" required:"true"` + + metadataModifyVpcEndpointInput `json:"-" xml:"-"` +} + +type metadataModifyVpcEndpointInput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s ModifyVpcEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpcEndpointInput) GoString() string { + return s.String() +} + +type ModifyVpcEndpointOutput struct { + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` + + metadataModifyVpcEndpointOutput `json:"-" xml:"-"` +} + +type metadataModifyVpcEndpointOutput struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s ModifyVpcEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyVpcEndpointOutput) GoString() string { + return s.String() +} + type MonitorInstancesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -15720,7 +18964,7 @@ type MonitorInstancesInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // One or more instance IDs. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` metadataMonitorInstancesInput `json:"-" xml:"-"` } @@ -15729,6 +18973,16 @@ type metadataMonitorInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s MonitorInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MonitorInstancesInput) GoString() string { + return s.String() +} + type MonitorInstancesOutput struct { // Monitoring information for one or more instances. InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"` @@ -15740,10 +18994,20 @@ type metadataMonitorInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s MonitorInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MonitorInstancesOutput) GoString() string { + return s.String() +} + // Describes the monitoring for the instance. type Monitoring struct { // Indicates whether monitoring is enabled for the instance. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"MonitoringState"` metadataMonitoring `json:"-" xml:"-"` } @@ -15752,7 +19016,17 @@ type metadataMonitoring struct { SDKShapeTraits bool `type:"structure"` } -type MoveAddressToVPCInput struct { +// String returns the string representation +func (s Monitoring) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Monitoring) GoString() string { + return s.String() +} + +type MoveAddressToVpcInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -15760,37 +19034,57 @@ type MoveAddressToVPCInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The Elastic IP address. - PublicIP *string `locationName:"publicIp" type:"string" required:"true"` + PublicIp *string `locationName:"publicIp" type:"string" required:"true"` - metadataMoveAddressToVPCInput `json:"-" xml:"-"` + metadataMoveAddressToVpcInput `json:"-" xml:"-"` } -type metadataMoveAddressToVPCInput struct { +type metadataMoveAddressToVpcInput struct { SDKShapeTraits bool `type:"structure"` } -type MoveAddressToVPCOutput struct { +// String returns the string representation +func (s MoveAddressToVpcInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MoveAddressToVpcInput) GoString() string { + return s.String() +} + +type MoveAddressToVpcOutput struct { // The allocation ID for the Elastic IP address. - AllocationID *string `locationName:"allocationId" type:"string"` + AllocationId *string `locationName:"allocationId" type:"string"` // The status of the move of the IP address. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"Status"` - metadataMoveAddressToVPCOutput `json:"-" xml:"-"` + metadataMoveAddressToVpcOutput `json:"-" xml:"-"` } -type metadataMoveAddressToVPCOutput struct { +type metadataMoveAddressToVpcOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s MoveAddressToVpcOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MoveAddressToVpcOutput) GoString() string { + return s.String() +} + // Describes the status of a moving Elastic IP address. type MovingAddressStatus struct { // The status of the Elastic IP address that's being moved to the EC2-VPC platform, // or restored to the EC2-Classic platform. - MoveStatus *string `locationName:"moveStatus" type:"string"` + MoveStatus *string `locationName:"moveStatus" type:"string" enum:"MoveStatus"` // The Elastic IP address. - PublicIP *string `locationName:"publicIp" type:"string"` + PublicIp *string `locationName:"publicIp" type:"string"` metadataMovingAddressStatus `json:"-" xml:"-"` } @@ -15799,62 +19093,92 @@ type metadataMovingAddressStatus struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s MovingAddressStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MovingAddressStatus) GoString() string { + return s.String() +} + // Describes a network ACL. -type NetworkACL struct { +type NetworkAcl struct { // Any associations between the network ACL and one or more subnets - Associations []*NetworkACLAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` + Associations []*NetworkAclAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` // One or more entries (rules) in the network ACL. - Entries []*NetworkACLEntry `locationName:"entrySet" locationNameList:"item" type:"list"` + Entries []*NetworkAclEntry `locationName:"entrySet" locationNameList:"item" type:"list"` // Indicates whether this is the default network ACL for the VPC. IsDefault *bool `locationName:"default" type:"boolean"` // The ID of the network ACL. - NetworkACLID *string `locationName:"networkAclId" type:"string"` + NetworkAclId *string `locationName:"networkAclId" type:"string"` // Any tags assigned to the network ACL. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The ID of the VPC for the network ACL. - VPCID *string `locationName:"vpcId" type:"string"` + VpcId *string `locationName:"vpcId" type:"string"` - metadataNetworkACL `json:"-" xml:"-"` + metadataNetworkAcl `json:"-" xml:"-"` } -type metadataNetworkACL struct { +type metadataNetworkAcl struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NetworkAcl) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkAcl) GoString() string { + return s.String() +} + // Describes an association between a network ACL and a subnet. -type NetworkACLAssociation struct { +type NetworkAclAssociation struct { // The ID of the association between a network ACL and a subnet. - NetworkACLAssociationID *string `locationName:"networkAclAssociationId" type:"string"` + NetworkAclAssociationId *string `locationName:"networkAclAssociationId" type:"string"` // The ID of the network ACL. - NetworkACLID *string `locationName:"networkAclId" type:"string"` + NetworkAclId *string `locationName:"networkAclId" type:"string"` // The ID of the subnet. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` - metadataNetworkACLAssociation `json:"-" xml:"-"` + metadataNetworkAclAssociation `json:"-" xml:"-"` } -type metadataNetworkACLAssociation struct { +type metadataNetworkAclAssociation struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NetworkAclAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkAclAssociation) GoString() string { + return s.String() +} + // Describes an entry in a network ACL. -type NetworkACLEntry struct { +type NetworkAclEntry struct { // The network range to allow or deny, in CIDR notation. - CIDRBlock *string `locationName:"cidrBlock" type:"string"` + CidrBlock *string `locationName:"cidrBlock" type:"string"` // Indicates whether the rule is an egress rule (applied to traffic leaving // the subnet). Egress *bool `locationName:"egress" type:"boolean"` // ICMP protocol: The ICMP type and code. - ICMPTypeCode *ICMPTypeCode `locationName:"icmpTypeCode" type:"structure"` + IcmpTypeCode *IcmpTypeCode `locationName:"icmpTypeCode" type:"structure"` // TCP or UDP protocols: The range of ports the rule applies to. PortRange *PortRange `locationName:"portRange" type:"structure"` @@ -15863,19 +19187,29 @@ type NetworkACLEntry struct { Protocol *string `locationName:"protocol" type:"string"` // Indicates whether to allow or deny the traffic that matches the rule. - RuleAction *string `locationName:"ruleAction" type:"string"` + RuleAction *string `locationName:"ruleAction" type:"string" enum:"RuleAction"` // The rule number for the entry. ACL entries are processed in ascending order // by rule number. RuleNumber *int64 `locationName:"ruleNumber" type:"integer"` - metadataNetworkACLEntry `json:"-" xml:"-"` + metadataNetworkAclEntry `json:"-" xml:"-"` } -type metadataNetworkACLEntry struct { +type metadataNetworkAclEntry struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NetworkAclEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkAclEntry) GoString() string { + return s.String() +} + // Describes a network interface. type NetworkInterface struct { // The association information for an Elastic IP associated with the network @@ -15895,26 +19229,26 @@ type NetworkInterface struct { Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` // The MAC address. - MACAddress *string `locationName:"macAddress" type:"string"` + MacAddress *string `locationName:"macAddress" type:"string"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // The AWS account ID of the owner of the network interface. - OwnerID *string `locationName:"ownerId" type:"string"` + OwnerId *string `locationName:"ownerId" type:"string"` // The private DNS name. - PrivateDNSName *string `locationName:"privateDnsName" type:"string"` + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` // The IP address of the network interface within the subnet. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // The private IP addresses associated with the network interface. - PrivateIPAddresses []*NetworkInterfacePrivateIPAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` + PrivateIpAddresses []*NetworkInterfacePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` // The ID of the entity that launched the instance on your behalf (for example, // AWS Management Console or Auto Scaling). - RequesterID *string `locationName:"requesterId" type:"string"` + RequesterId *string `locationName:"requesterId" type:"string"` // Indicates whether the network interface is being managed by AWS. RequesterManaged *bool `locationName:"requesterManaged" type:"boolean"` @@ -15923,16 +19257,16 @@ type NetworkInterface struct { SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` // The status of the network interface. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"` // The ID of the subnet. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` // Any tags assigned to the network interface. TagSet []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` + VpcId *string `locationName:"vpcId" type:"string"` metadataNetworkInterface `json:"-" xml:"-"` } @@ -15941,22 +19275,32 @@ type metadataNetworkInterface struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NetworkInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterface) GoString() string { + return s.String() +} + // Describes association information for an Elastic IP address. type NetworkInterfaceAssociation struct { // The allocation ID. - AllocationID *string `locationName:"allocationId" type:"string"` + AllocationId *string `locationName:"allocationId" type:"string"` // The association ID. - AssociationID *string `locationName:"associationId" type:"string"` + AssociationId *string `locationName:"associationId" type:"string"` // The ID of the Elastic IP address owner. - IPOwnerID *string `locationName:"ipOwnerId" type:"string"` + IpOwnerId *string `locationName:"ipOwnerId" type:"string"` // The public DNS name. - PublicDNSName *string `locationName:"publicDnsName" type:"string"` + PublicDnsName *string `locationName:"publicDnsName" type:"string"` // The address of the Elastic IP address bound to the network interface. - PublicIP *string `locationName:"publicIp" type:"string"` + PublicIp *string `locationName:"publicIp" type:"string"` metadataNetworkInterfaceAssociation `json:"-" xml:"-"` } @@ -15965,13 +19309,23 @@ type metadataNetworkInterfaceAssociation struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NetworkInterfaceAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterfaceAssociation) GoString() string { + return s.String() +} + // Describes a network interface attachment. type NetworkInterfaceAttachment struct { // The timestamp indicating when the attachment initiated. AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"` // The ID of the network interface attachment. - AttachmentID *string `locationName:"attachmentId" type:"string"` + AttachmentId *string `locationName:"attachmentId" type:"string"` // Indicates whether the network interface is deleted when the instance is terminated. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` @@ -15980,13 +19334,13 @@ type NetworkInterfaceAttachment struct { DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The AWS account ID of the owner of the instance. - InstanceOwnerID *string `locationName:"instanceOwnerId" type:"string"` + InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` // The attachment state. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` metadataNetworkInterfaceAttachment `json:"-" xml:"-"` } @@ -15995,10 +19349,20 @@ type metadataNetworkInterfaceAttachment struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NetworkInterfaceAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterfaceAttachment) GoString() string { + return s.String() +} + // Describes an attachment change. type NetworkInterfaceAttachmentChanges struct { // The ID of the network interface attachment. - AttachmentID *string `locationName:"attachmentId" type:"string"` + AttachmentId *string `locationName:"attachmentId" type:"string"` // Indicates whether the network interface is deleted when the instance is terminated. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` @@ -16010,8 +19374,18 @@ type metadataNetworkInterfaceAttachmentChanges struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NetworkInterfaceAttachmentChanges) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterfaceAttachmentChanges) GoString() string { + return s.String() +} + // Describes the private IP address of a network interface. -type NetworkInterfacePrivateIPAddress struct { +type NetworkInterfacePrivateIpAddress struct { // The association information for an Elastic IP address associated with the // network interface. Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"` @@ -16021,30 +19395,50 @@ type NetworkInterfacePrivateIPAddress struct { Primary *bool `locationName:"primary" type:"boolean"` // The private DNS name. - PrivateDNSName *string `locationName:"privateDnsName" type:"string"` + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` // The private IP address. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - metadataNetworkInterfacePrivateIPAddress `json:"-" xml:"-"` + metadataNetworkInterfacePrivateIpAddress `json:"-" xml:"-"` } -type metadataNetworkInterfacePrivateIPAddress struct { +type metadataNetworkInterfacePrivateIpAddress struct { SDKShapeTraits bool `type:"structure"` } -type NewDHCPConfiguration struct { +// String returns the string representation +func (s NetworkInterfacePrivateIpAddress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterfacePrivateIpAddress) GoString() string { + return s.String() +} + +type NewDhcpConfiguration struct { Key *string `locationName:"key" type:"string"` Values []*string `locationName:"Value" locationNameList:"item" type:"list"` - metadataNewDHCPConfiguration `json:"-" xml:"-"` + metadataNewDhcpConfiguration `json:"-" xml:"-"` } -type metadataNewDHCPConfiguration struct { +type metadataNewDhcpConfiguration struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s NewDhcpConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NewDhcpConfiguration) GoString() string { + return s.String() +} + // Describes the placement for the instance. type Placement struct { // The Availability Zone of the instance. @@ -16055,7 +19449,7 @@ type Placement struct { // The tenancy of the instance (if the instance is running in a VPC). An instance // with a tenancy of dedicated runs on single-tenant hardware. - Tenancy *string `locationName:"tenancy" type:"string"` + Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` metadataPlacement `json:"-" xml:"-"` } @@ -16064,16 +19458,26 @@ type metadataPlacement struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Placement) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Placement) GoString() string { + return s.String() +} + // Describes a placement group. type PlacementGroup struct { // The name of the placement group. GroupName *string `locationName:"groupName" type:"string"` // The state of the placement group. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"PlacementGroupState"` // The placement strategy. - Strategy *string `locationName:"strategy" type:"string"` + Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` metadataPlacementGroup `json:"-" xml:"-"` } @@ -16082,6 +19486,16 @@ type metadataPlacementGroup struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PlacementGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PlacementGroup) GoString() string { + return s.String() +} + // Describes a range of ports. type PortRange struct { // The first port in the range. @@ -16097,13 +19511,23 @@ type metadataPortRange struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PortRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PortRange) GoString() string { + return s.String() +} + // Describes prefixes for AWS services. type PrefixList struct { // The IP address range of the AWS service. - CIDRs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"` + Cidrs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"` // The ID of the prefix. - PrefixListID *string `locationName:"prefixListId" type:"string"` + PrefixListId *string `locationName:"prefixListId" type:"string"` // The name of the prefix. PrefixListName *string `locationName:"prefixListName" type:"string"` @@ -16115,18 +19539,38 @@ type metadataPrefixList struct { SDKShapeTraits bool `type:"structure"` } -// The ID of the prefix. -type PrefixListID struct { - // The ID of the prefix. - PrefixListID *string `locationName:"prefixListId" type:"string"` - - metadataPrefixListID `json:"-" xml:"-"` +// String returns the string representation +func (s PrefixList) String() string { + return awsutil.Prettify(s) } -type metadataPrefixListID struct { +// GoString returns the string representation +func (s PrefixList) GoString() string { + return s.String() +} + +// The ID of the prefix. +type PrefixListId struct { + // The ID of the prefix. + PrefixListId *string `locationName:"prefixListId" type:"string"` + + metadataPrefixListId `json:"-" xml:"-"` +} + +type metadataPrefixListId struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PrefixListId) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PrefixListId) GoString() string { + return s.String() +} + // Describes the price for a Reserved Instance. type PriceSchedule struct { // The current price schedule, as determined by the term remaining for the Reserved @@ -16143,7 +19587,7 @@ type PriceSchedule struct { // The currency for transacting the Reserved Instance resale. At this time, // the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string"` + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` // The fixed price for the term. Price *float64 `locationName:"price" type:"double"` @@ -16159,11 +19603,21 @@ type metadataPriceSchedule struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PriceSchedule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PriceSchedule) GoString() string { + return s.String() +} + // Describes the price for a Reserved Instance. type PriceScheduleSpecification struct { // The currency for transacting the Reserved Instance resale. At this time, // the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string"` + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` // The fixed price for the term. Price *float64 `locationName:"price" type:"double"` @@ -16179,6 +19633,16 @@ type metadataPriceScheduleSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PriceScheduleSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PriceScheduleSpecification) GoString() string { + return s.String() +} + // Describes a Reserved Instance offering. type PricingDetail struct { // The number of instances available for the price. @@ -16194,29 +19658,49 @@ type metadataPricingDetail struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PricingDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PricingDetail) GoString() string { + return s.String() +} + // Describes a secondary private IP address for a network interface. -type PrivateIPAddressSpecification struct { +type PrivateIpAddressSpecification struct { // Indicates whether the private IP address is the primary private IP address. // Only one IP address can be designated as primary. Primary *bool `locationName:"primary" type:"boolean"` // The private IP addresses. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string" required:"true"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string" required:"true"` - metadataPrivateIPAddressSpecification `json:"-" xml:"-"` + metadataPrivateIpAddressSpecification `json:"-" xml:"-"` } -type metadataPrivateIPAddressSpecification struct { +type metadataPrivateIpAddressSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PrivateIpAddressSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PrivateIpAddressSpecification) GoString() string { + return s.String() +} + // Describes a product code. type ProductCode struct { // The product code. - ProductCodeID *string `locationName:"productCode" type:"string"` + ProductCodeId *string `locationName:"productCode" type:"string"` // The type of product code. - ProductCodeType *string `locationName:"type" type:"string"` + ProductCodeType *string `locationName:"type" type:"string" enum:"ProductCodeValues"` metadataProductCode `json:"-" xml:"-"` } @@ -16225,18 +19709,38 @@ type metadataProductCode struct { SDKShapeTraits bool `type:"structure"` } -// Describes a virtual private gateway propagating route. -type PropagatingVGW struct { - // The ID of the virtual private gateway (VGW). - GatewayID *string `locationName:"gatewayId" type:"string"` - - metadataPropagatingVGW `json:"-" xml:"-"` +// String returns the string representation +func (s ProductCode) String() string { + return awsutil.Prettify(s) } -type metadataPropagatingVGW struct { +// GoString returns the string representation +func (s ProductCode) GoString() string { + return s.String() +} + +// Describes a virtual private gateway propagating route. +type PropagatingVgw struct { + // The ID of the virtual private gateway (VGW). + GatewayId *string `locationName:"gatewayId" type:"string"` + + metadataPropagatingVgw `json:"-" xml:"-"` +} + +type metadataPropagatingVgw struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PropagatingVgw) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PropagatingVgw) GoString() string { + return s.String() +} + type PurchaseReservedInstancesOfferingInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -16253,7 +19757,7 @@ type PurchaseReservedInstancesOfferingInput struct { LimitPrice *ReservedInstanceLimitPrice `locationName:"limitPrice" type:"structure"` // The ID of the Reserved Instance offering to purchase. - ReservedInstancesOfferingID *string `locationName:"ReservedInstancesOfferingId" type:"string" required:"true"` + ReservedInstancesOfferingId *string `type:"string" required:"true"` metadataPurchaseReservedInstancesOfferingInput `json:"-" xml:"-"` } @@ -16262,9 +19766,19 @@ type metadataPurchaseReservedInstancesOfferingInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PurchaseReservedInstancesOfferingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseReservedInstancesOfferingInput) GoString() string { + return s.String() +} + type PurchaseReservedInstancesOfferingOutput struct { // The IDs of the purchased Reserved Instances. - ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"` + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` metadataPurchaseReservedInstancesOfferingOutput `json:"-" xml:"-"` } @@ -16273,6 +19787,16 @@ type metadataPurchaseReservedInstancesOfferingOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PurchaseReservedInstancesOfferingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseReservedInstancesOfferingOutput) GoString() string { + return s.String() +} + type RebootInstancesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -16281,7 +19805,7 @@ type RebootInstancesInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // One or more instance IDs. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` metadataRebootInstancesInput `json:"-" xml:"-"` } @@ -16290,6 +19814,16 @@ type metadataRebootInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RebootInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootInstancesInput) GoString() string { + return s.String() +} + type RebootInstancesOutput struct { metadataRebootInstancesOutput `json:"-" xml:"-"` } @@ -16298,13 +19832,23 @@ type metadataRebootInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RebootInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootInstancesOutput) GoString() string { + return s.String() +} + // Describes a recurring charge. type RecurringCharge struct { // The amount of the recurring charge. Amount *float64 `locationName:"amount" type:"double"` // The frequency of the recurring charge. - Frequency *string `locationName:"frequency" type:"string"` + Frequency *string `locationName:"frequency" type:"string" enum:"RecurringChargeFrequency"` metadataRecurringCharge `json:"-" xml:"-"` } @@ -16313,6 +19857,16 @@ type metadataRecurringCharge struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RecurringCharge) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecurringCharge) GoString() string { + return s.String() +} + // Describes a region. type Region struct { // The region service endpoint. @@ -16328,12 +19882,22 @@ type metadataRegion struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Region) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Region) GoString() string { + return s.String() +} + type RegisterImageInput struct { // The architecture of the AMI. // // Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, // the architecture specified in the manifest file. - Architecture *string `locationName:"architecture" type:"string"` + Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` // One or more block device mapping entries. BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` @@ -16351,7 +19915,7 @@ type RegisterImageInput struct { ImageLocation *string `type:"string"` // The ID of the kernel. - KernelID *string `locationName:"kernelId" type:"string"` + KernelId *string `locationName:"kernelId" type:"string"` // A name for your AMI. // @@ -16361,7 +19925,7 @@ type RegisterImageInput struct { Name *string `locationName:"name" type:"string" required:"true"` // The ID of the RAM disk. - RAMDiskID *string `locationName:"ramdiskId" type:"string"` + RamdiskId *string `locationName:"ramdiskId" type:"string"` // The name of the root device (for example, /dev/sda1, or /dev/xvda). RootDeviceName *string `locationName:"rootDeviceName" type:"string"` @@ -16373,7 +19937,7 @@ type RegisterImageInput struct { // // This option is supported only for HVM AMIs. Specifying this option with // a PV AMI can make instances launched from the AMI unreachable. - SRIOVNetSupport *string `locationName:"sriovNetSupport" type:"string"` + SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` // The type of virtualization. // @@ -16387,9 +19951,19 @@ type metadataRegisterImageInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RegisterImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterImageInput) GoString() string { + return s.String() +} + type RegisterImageOutput struct { // The ID of the newly registered AMI. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` metadataRegisterImageOutput `json:"-" xml:"-"` } @@ -16398,7 +19972,17 @@ type metadataRegisterImageOutput struct { SDKShapeTraits bool `type:"structure"` } -type RejectVPCPeeringConnectionInput struct { +// String returns the string representation +func (s RegisterImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterImageOutput) GoString() string { + return s.String() +} + +type RejectVpcPeeringConnectionInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -16406,29 +19990,49 @@ type RejectVPCPeeringConnectionInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the VPC peering connection. - VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` - metadataRejectVPCPeeringConnectionInput `json:"-" xml:"-"` + metadataRejectVpcPeeringConnectionInput `json:"-" xml:"-"` } -type metadataRejectVPCPeeringConnectionInput struct { +type metadataRejectVpcPeeringConnectionInput struct { SDKShapeTraits bool `type:"structure"` } -type RejectVPCPeeringConnectionOutput struct { +// String returns the string representation +func (s RejectVpcPeeringConnectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectVpcPeeringConnectionInput) GoString() string { + return s.String() +} + +type RejectVpcPeeringConnectionOutput struct { // Returns true if the request succeeds; otherwise, it returns an error. Return *bool `locationName:"return" type:"boolean"` - metadataRejectVPCPeeringConnectionOutput `json:"-" xml:"-"` + metadataRejectVpcPeeringConnectionOutput `json:"-" xml:"-"` } -type metadataRejectVPCPeeringConnectionOutput struct { +type metadataRejectVpcPeeringConnectionOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RejectVpcPeeringConnectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectVpcPeeringConnectionOutput) GoString() string { + return s.String() +} + type ReleaseAddressInput struct { // [EC2-VPC] The allocation ID. Required for EC2-VPC. - AllocationID *string `locationName:"AllocationId" type:"string"` + AllocationId *string `type:"string"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -16437,7 +20041,7 @@ type ReleaseAddressInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // [EC2-Classic] The Elastic IP address. Required for EC2-Classic. - PublicIP *string `locationName:"PublicIp" type:"string"` + PublicIp *string `type:"string"` metadataReleaseAddressInput `json:"-" xml:"-"` } @@ -16446,6 +20050,16 @@ type metadataReleaseAddressInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReleaseAddressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReleaseAddressInput) GoString() string { + return s.String() +} + type ReleaseAddressOutput struct { metadataReleaseAddressOutput `json:"-" xml:"-"` } @@ -16454,10 +20068,20 @@ type metadataReleaseAddressOutput struct { SDKShapeTraits bool `type:"structure"` } -type ReplaceNetworkACLAssociationInput struct { +// String returns the string representation +func (s ReleaseAddressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReleaseAddressOutput) GoString() string { + return s.String() +} + +type ReplaceNetworkAclAssociationInput struct { // The ID of the current association between the original network ACL and the // subnet. - AssociationID *string `locationName:"associationId" type:"string" required:"true"` + AssociationId *string `locationName:"associationId" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -16466,29 +20090,49 @@ type ReplaceNetworkACLAssociationInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the new network ACL to associate with the subnet. - NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"` + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` - metadataReplaceNetworkACLAssociationInput `json:"-" xml:"-"` + metadataReplaceNetworkAclAssociationInput `json:"-" xml:"-"` } -type metadataReplaceNetworkACLAssociationInput struct { +type metadataReplaceNetworkAclAssociationInput struct { SDKShapeTraits bool `type:"structure"` } -type ReplaceNetworkACLAssociationOutput struct { +// String returns the string representation +func (s ReplaceNetworkAclAssociationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceNetworkAclAssociationInput) GoString() string { + return s.String() +} + +type ReplaceNetworkAclAssociationOutput struct { // The ID of the new association. - NewAssociationID *string `locationName:"newAssociationId" type:"string"` + NewAssociationId *string `locationName:"newAssociationId" type:"string"` - metadataReplaceNetworkACLAssociationOutput `json:"-" xml:"-"` + metadataReplaceNetworkAclAssociationOutput `json:"-" xml:"-"` } -type metadataReplaceNetworkACLAssociationOutput struct { +type metadataReplaceNetworkAclAssociationOutput struct { SDKShapeTraits bool `type:"structure"` } -type ReplaceNetworkACLEntryInput struct { +// String returns the string representation +func (s ReplaceNetworkAclAssociationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceNetworkAclAssociationOutput) GoString() string { + return s.String() +} + +type ReplaceNetworkAclEntryInput struct { // The network range to allow or deny, in CIDR notation. - CIDRBlock *string `locationName:"cidrBlock" type:"string" required:"true"` + CidrBlock *string `locationName:"cidrBlock" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -16503,10 +20147,10 @@ type ReplaceNetworkACLEntryInput struct { // ICMP protocol: The ICMP type and code. Required if specifying 1 (ICMP) for // the protocol. - ICMPTypeCode *ICMPTypeCode `locationName:"Icmp" type:"structure"` + IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` // The ID of the ACL. - NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"` + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` // TCP or UDP protocols: The range of ports the rule applies to. Required if // specifying 6 (TCP) or 17 (UDP) for the protocol. @@ -16516,30 +20160,50 @@ type ReplaceNetworkACLEntryInput struct { Protocol *string `locationName:"protocol" type:"string" required:"true"` // Indicates whether to allow or deny the traffic that matches the rule. - RuleAction *string `locationName:"ruleAction" type:"string" required:"true"` + RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"` // The rule number of the entry to replace. RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` - metadataReplaceNetworkACLEntryInput `json:"-" xml:"-"` + metadataReplaceNetworkAclEntryInput `json:"-" xml:"-"` } -type metadataReplaceNetworkACLEntryInput struct { +type metadataReplaceNetworkAclEntryInput struct { SDKShapeTraits bool `type:"structure"` } -type ReplaceNetworkACLEntryOutput struct { - metadataReplaceNetworkACLEntryOutput `json:"-" xml:"-"` +// String returns the string representation +func (s ReplaceNetworkAclEntryInput) String() string { + return awsutil.Prettify(s) } -type metadataReplaceNetworkACLEntryOutput struct { +// GoString returns the string representation +func (s ReplaceNetworkAclEntryInput) GoString() string { + return s.String() +} + +type ReplaceNetworkAclEntryOutput struct { + metadataReplaceNetworkAclEntryOutput `json:"-" xml:"-"` +} + +type metadataReplaceNetworkAclEntryOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReplaceNetworkAclEntryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceNetworkAclEntryOutput) GoString() string { + return s.String() +} + type ReplaceRouteInput struct { // The CIDR address block used for the destination match. The value you provide // must match the CIDR of an existing route in the table. - DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"` + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -16548,19 +20212,19 @@ type ReplaceRouteInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of an Internet gateway or virtual private gateway. - GatewayID *string `locationName:"gatewayId" type:"string"` + GatewayId *string `locationName:"gatewayId" type:"string"` // The ID of a NAT instance in your VPC. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The ID of a network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // The ID of the route table. - RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"` + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` // The ID of a VPC peering connection. - VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"` + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` metadataReplaceRouteInput `json:"-" xml:"-"` } @@ -16569,6 +20233,16 @@ type metadataReplaceRouteInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReplaceRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceRouteInput) GoString() string { + return s.String() +} + type ReplaceRouteOutput struct { metadataReplaceRouteOutput `json:"-" xml:"-"` } @@ -16577,9 +20251,19 @@ type metadataReplaceRouteOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReplaceRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceRouteOutput) GoString() string { + return s.String() +} + type ReplaceRouteTableAssociationInput struct { // The association ID. - AssociationID *string `locationName:"associationId" type:"string" required:"true"` + AssociationId *string `locationName:"associationId" type:"string" required:"true"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -16588,7 +20272,7 @@ type ReplaceRouteTableAssociationInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the new route table to associate with the subnet. - RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"` + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` metadataReplaceRouteTableAssociationInput `json:"-" xml:"-"` } @@ -16597,9 +20281,19 @@ type metadataReplaceRouteTableAssociationInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReplaceRouteTableAssociationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceRouteTableAssociationInput) GoString() string { + return s.String() +} + type ReplaceRouteTableAssociationOutput struct { // The ID of the new association. - NewAssociationID *string `locationName:"newAssociationId" type:"string"` + NewAssociationId *string `locationName:"newAssociationId" type:"string"` metadataReplaceRouteTableAssociationOutput `json:"-" xml:"-"` } @@ -16608,6 +20302,16 @@ type metadataReplaceRouteTableAssociationOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReplaceRouteTableAssociationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceRouteTableAssociationOutput) GoString() string { + return s.String() +} + type ReportInstanceStatusInput struct { // Descriptive text about the health state of your instance. Description *string `locationName:"description" type:"string"` @@ -16652,7 +20356,7 @@ type ReportInstanceStatusInput struct { StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` // The status of all instances listed. - Status *string `locationName:"status" type:"string" required:"true"` + Status *string `locationName:"status" type:"string" required:"true" enum:"ReportStatusType"` metadataReportInstanceStatusInput `json:"-" xml:"-"` } @@ -16661,6 +20365,16 @@ type metadataReportInstanceStatusInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReportInstanceStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReportInstanceStatusInput) GoString() string { + return s.String() +} + type ReportInstanceStatusOutput struct { metadataReportInstanceStatusOutput `json:"-" xml:"-"` } @@ -16669,6 +20383,16 @@ type metadataReportInstanceStatusOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReportInstanceStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReportInstanceStatusOutput) GoString() string { + return s.String() +} + // Contains the parameters for RequestSpotFleet. type RequestSpotFleetInput struct { // Checks whether you have the required permissions for the action, without @@ -16687,10 +20411,20 @@ type metadataRequestSpotFleetInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RequestSpotFleetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestSpotFleetInput) GoString() string { + return s.String() +} + // Contains the output of RequestSpotFleet. type RequestSpotFleetOutput struct { // The ID of the Spot fleet request. - SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` metadataRequestSpotFleetOutput `json:"-" xml:"-"` } @@ -16699,23 +20433,33 @@ type metadataRequestSpotFleetOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RequestSpotFleetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestSpotFleetOutput) GoString() string { + return s.String() +} + // Contains the parameters for RequestSpotInstances. type RequestSpotInstancesInput struct { // The user-specified name for a logical grouping of bids. // // When you specify an Availability Zone group in a Spot Instance request, - // all Spot Instances in the request are launched in the same Availability Zone. + // all Spot instances in the request are launched in the same Availability Zone. // Instance proximity is maintained with this parameter, but the choice of Availability // Zone is not. The group applies only to bids for Spot Instances of the same - // instance type. Any additional Spot Instance requests that are specified with + // instance type. Any additional Spot instance requests that are specified with // the same Availability Zone group name are launched in that same Availability // Zone, as long as at least one instance from the group is still active. // // If there is no active instance running in the Availability Zone group that - // you specify for a new Spot Instance request (all instances are terminated, + // you specify for a new Spot instance request (all instances are terminated, // the bid is expired, or the bid falls below current market), then Amazon EC2 // launches the instance in any Availability Zone where the constraint can be - // met. Consequently, the subsequent set of Spot Instances could be placed in + // met. Consequently, the subsequent set of Spot instances could be placed in // a different zone from the original request, even if you specified the same // Availability Zone group. // @@ -16733,12 +20477,12 @@ type RequestSpotInstancesInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The maximum number of Spot Instances to launch. + // The maximum number of Spot instances to launch. // // Default: 1 InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - // The instance launch group. Launch groups are Spot Instances that launch together + // The instance launch group. Launch groups are Spot instances that launch together // and terminate together. // // Default: Instances are launched and terminated individually @@ -16747,14 +20491,14 @@ type RequestSpotInstancesInput struct { // Describes the launch specification for an instance. LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"` - // The maximum hourly price (bid) for any Spot Instance launched to fulfill + // The maximum hourly price (bid) for any Spot instance launched to fulfill // the request. SpotPrice *string `locationName:"spotPrice" type:"string" required:"true"` - // The Spot Instance request type. + // The Spot instance request type. // // Default: one-time - Type *string `locationName:"type" type:"string"` + Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` // The start date of the request. If this is a one-time request, the request // becomes active at this date and time and remains active until all instances @@ -16780,9 +20524,19 @@ type metadataRequestSpotInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RequestSpotInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestSpotInstancesInput) GoString() string { + return s.String() +} + // Contains the output of RequestSpotInstances. type RequestSpotInstancesOutput struct { - // One or more Spot Instance requests. + // One or more Spot instance requests. SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` metadataRequestSpotInstancesOutput `json:"-" xml:"-"` @@ -16792,6 +20546,16 @@ type metadataRequestSpotInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RequestSpotInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestSpotInstancesOutput) GoString() string { + return s.String() +} + // Describes the launch specification for an instance. type RequestSpotLaunchSpecification struct { // Deprecated. @@ -16807,19 +20571,19 @@ type RequestSpotLaunchSpecification struct { // Optimized instance. // // Default: false - EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` // The IAM instance profile. - IAMInstanceProfile *IAMInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` // The ID of the AMI. - ImageID *string `locationName:"imageId" type:"string"` + ImageId *string `locationName:"imageId" type:"string"` // The instance type. - InstanceType *string `locationName:"instanceType" type:"string"` + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // The ID of the kernel. - KernelID *string `locationName:"kernelId" type:"string"` + KernelId *string `locationName:"kernelId" type:"string"` // The name of the key pair. KeyName *string `locationName:"keyName" type:"string"` @@ -16834,14 +20598,14 @@ type RequestSpotLaunchSpecification struct { Placement *SpotPlacement `locationName:"placement" type:"structure"` // The ID of the RAM disk. - RAMDiskID *string `locationName:"ramdiskId" type:"string"` + RamdiskId *string `locationName:"ramdiskId" type:"string"` - SecurityGroupIDs []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"` // The ID of the subnet in which to launch the instance. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` // The Base64-encoded MIME user data to make available to the instances. UserData *string `locationName:"userData" type:"string"` @@ -16853,6 +20617,16 @@ type metadataRequestSpotLaunchSpecification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RequestSpotLaunchSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RequestSpotLaunchSpecification) GoString() string { + return s.String() +} + // Describes a reservation. type Reservation struct { // One or more security groups. @@ -16862,14 +20636,14 @@ type Reservation struct { Instances []*Instance `locationName:"instancesSet" locationNameList:"item" type:"list"` // The ID of the AWS account that owns the reservation. - OwnerID *string `locationName:"ownerId" type:"string"` + OwnerId *string `locationName:"ownerId" type:"string"` // The ID of the requester that launched the instances on your behalf (for example, // AWS Management Console or Auto Scaling). - RequesterID *string `locationName:"requesterId" type:"string"` + RequesterId *string `locationName:"requesterId" type:"string"` // The ID of the reservation. - ReservationID *string `locationName:"reservationId" type:"string"` + ReservationId *string `locationName:"reservationId" type:"string"` metadataReservation `json:"-" xml:"-"` } @@ -16878,6 +20652,16 @@ type metadataReservation struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Reservation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Reservation) GoString() string { + return s.String() +} + // Describes the limit price of a Reserved Instance offering. type ReservedInstanceLimitPrice struct { // Used for Reserved Instance Marketplace offerings. Specifies the limit price @@ -16886,7 +20670,7 @@ type ReservedInstanceLimitPrice struct { // The currency in which the limitPrice amount is specified. At this time, the // only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string"` + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` metadataReservedInstanceLimitPrice `json:"-" xml:"-"` } @@ -16895,6 +20679,16 @@ type metadataReservedInstanceLimitPrice struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReservedInstanceLimitPrice) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedInstanceLimitPrice) GoString() string { + return s.String() +} + // Describes a Reserved Instance. type ReservedInstances struct { // The Availability Zone in which the Reserved Instance can be used. @@ -16902,7 +20696,7 @@ type ReservedInstances struct { // The currency of the Reserved Instance. It's specified using ISO 4217 standard // currency codes. At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string"` + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` // The duration of the Reserved Instance, in seconds. Duration *int64 `locationName:"duration" type:"long"` @@ -16917,28 +20711,28 @@ type ReservedInstances struct { InstanceCount *int64 `locationName:"instanceCount" type:"integer"` // The tenancy of the reserved instance. - InstanceTenancy *string `locationName:"instanceTenancy" type:"string"` + InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` // The instance type on which the Reserved Instance can be used. - InstanceType *string `locationName:"instanceType" type:"string"` + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // The Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string"` + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - // The Reserved Instance description. - ProductDescription *string `locationName:"productDescription" type:"string"` + // The Reserved Instance product platform description. + ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` // The recurring charge tag assigned to the resource. RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"` // The ID of the Reserved Instance. - ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"` + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` // The date and time the Reserved Instance started. Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"` // The state of the Reserved Instance purchase. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"ReservedInstanceState"` // Any tags assigned to the resource. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` @@ -16953,6 +20747,16 @@ type metadataReservedInstances struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReservedInstances) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedInstances) GoString() string { + return s.String() +} + // Describes the configuration settings for the modified Reserved Instances. type ReservedInstancesConfiguration struct { // The Availability Zone for the modified Reserved Instances. @@ -16962,7 +20766,7 @@ type ReservedInstancesConfiguration struct { InstanceCount *int64 `locationName:"instanceCount" type:"integer"` // The instance type for the modified Reserved Instances. - InstanceType *string `locationName:"instanceType" type:"string"` + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // The network platform of the modified Reserved Instances, which is either // EC2-Classic or EC2-VPC. @@ -16975,18 +20779,38 @@ type metadataReservedInstancesConfiguration struct { SDKShapeTraits bool `type:"structure"` } -// Describes the ID of a Reserved Instance. -type ReservedInstancesID struct { - // The ID of the Reserved Instance. - ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"` - - metadataReservedInstancesID `json:"-" xml:"-"` +// String returns the string representation +func (s ReservedInstancesConfiguration) String() string { + return awsutil.Prettify(s) } -type metadataReservedInstancesID struct { +// GoString returns the string representation +func (s ReservedInstancesConfiguration) GoString() string { + return s.String() +} + +// Describes the ID of a Reserved Instance. +type ReservedInstancesId struct { + // The ID of the Reserved Instance. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` + + metadataReservedInstancesId `json:"-" xml:"-"` +} + +type metadataReservedInstancesId struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReservedInstancesId) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedInstancesId) GoString() string { + return s.String() +} + // Describes a Reserved Instance listing. type ReservedInstancesListing struct { // A unique, case-sensitive key supplied by the client to ensure that the request @@ -17003,13 +20827,13 @@ type ReservedInstancesListing struct { PriceSchedules []*PriceSchedule `locationName:"priceSchedules" locationNameList:"item" type:"list"` // The ID of the Reserved Instance. - ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"` + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` // The ID of the Reserved Instance listing. - ReservedInstancesListingID *string `locationName:"reservedInstancesListingId" type:"string"` + ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"` // The status of the Reserved Instance listing. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"ListingStatus"` // The reason for the current status of the Reserved Instance listing. The response // can be blank. @@ -17028,6 +20852,16 @@ type metadataReservedInstancesListing struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReservedInstancesListing) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedInstancesListing) GoString() string { + return s.String() +} + // Describes a Reserved Instance modification. type ReservedInstancesModification struct { // A unique, case-sensitive key supplied by the client to ensure that the request @@ -17045,10 +20879,10 @@ type ReservedInstancesModification struct { ModificationResults []*ReservedInstancesModificationResult `locationName:"modificationResultSet" locationNameList:"item" type:"list"` // The IDs of one or more Reserved Instances. - ReservedInstancesIDs []*ReservedInstancesID `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` + ReservedInstancesIds []*ReservedInstancesId `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` // A unique ID for the Reserved Instance modification. - ReservedInstancesModificationID *string `locationName:"reservedInstancesModificationId" type:"string"` + ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"` // The status of the Reserved Instances modification request. Status *string `locationName:"status" type:"string"` @@ -17066,10 +20900,20 @@ type metadataReservedInstancesModification struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReservedInstancesModification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedInstancesModification) GoString() string { + return s.String() +} + type ReservedInstancesModificationResult struct { // The ID for the Reserved Instances that were created as part of the modification // request. This field is only available when the modification is fulfilled. - ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"` + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` // The target Reserved Instances configurations supplied as part of the modification // request. @@ -17082,6 +20926,16 @@ type metadataReservedInstancesModificationResult struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReservedInstancesModificationResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedInstancesModificationResult) GoString() string { + return s.String() +} + // Describes a Reserved Instance offering. type ReservedInstancesOffering struct { // The Availability Zone in which the Reserved Instance can be used. @@ -17090,7 +20944,7 @@ type ReservedInstancesOffering struct { // The currency of the Reserved Instance offering you are purchasing. It's specified // using ISO 4217 standard currency codes. At this time, the only supported // currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string"` + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` // The duration of the Reserved Instance, in seconds. Duration *int64 `locationName:"duration" type:"long"` @@ -17099,10 +20953,10 @@ type ReservedInstancesOffering struct { FixedPrice *float64 `locationName:"fixedPrice" type:"float"` // The tenancy of the reserved instance. - InstanceTenancy *string `locationName:"instanceTenancy" type:"string"` + InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` // The instance type on which the Reserved Instance can be used. - InstanceType *string `locationName:"instanceType" type:"string"` + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // Indicates whether the offering is available through the Reserved Instance // Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, @@ -17110,19 +20964,19 @@ type ReservedInstancesOffering struct { Marketplace *bool `locationName:"marketplace" type:"boolean"` // The Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string"` + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` // The pricing details of the Reserved Instance offering. PricingDetails []*PricingDetail `locationName:"pricingDetailsSet" locationNameList:"item" type:"list"` - // The Reserved Instance description. - ProductDescription *string `locationName:"productDescription" type:"string"` + // The Reserved Instance product platform description. + ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` // The recurring charge tag assigned to the resource. RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"` // The ID of the Reserved Instance offering. - ReservedInstancesOfferingID *string `locationName:"reservedInstancesOfferingId" type:"string"` + ReservedInstancesOfferingId *string `locationName:"reservedInstancesOfferingId" type:"string"` // The usage price of the Reserved Instance, per hour. UsagePrice *float64 `locationName:"usagePrice" type:"float"` @@ -17134,10 +20988,20 @@ type metadataReservedInstancesOffering struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ReservedInstancesOffering) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedInstancesOffering) GoString() string { + return s.String() +} + type ResetImageAttributeInput struct { // The attribute to reset (currently you can only reset the launch permission // attribute). - Attribute *string `type:"string" required:"true"` + Attribute *string `type:"string" required:"true" enum:"ResetImageAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -17146,7 +21010,7 @@ type ResetImageAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the AMI. - ImageID *string `locationName:"ImageId" type:"string" required:"true"` + ImageId *string `type:"string" required:"true"` metadataResetImageAttributeInput `json:"-" xml:"-"` } @@ -17155,6 +21019,16 @@ type metadataResetImageAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResetImageAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetImageAttributeInput) GoString() string { + return s.String() +} + type ResetImageAttributeOutput struct { metadataResetImageAttributeOutput `json:"-" xml:"-"` } @@ -17163,9 +21037,19 @@ type metadataResetImageAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResetImageAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetImageAttributeOutput) GoString() string { + return s.String() +} + type ResetInstanceAttributeInput struct { // The attribute to reset. - Attribute *string `locationName:"attribute" type:"string" required:"true"` + Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -17174,7 +21058,7 @@ type ResetInstanceAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string" required:"true"` + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` metadataResetInstanceAttributeInput `json:"-" xml:"-"` } @@ -17183,6 +21067,16 @@ type metadataResetInstanceAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResetInstanceAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetInstanceAttributeInput) GoString() string { + return s.String() +} + type ResetInstanceAttributeOutput struct { metadataResetInstanceAttributeOutput `json:"-" xml:"-"` } @@ -17191,6 +21085,16 @@ type metadataResetInstanceAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResetInstanceAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetInstanceAttributeOutput) GoString() string { + return s.String() +} + type ResetNetworkInterfaceAttributeInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -17199,7 +21103,7 @@ type ResetNetworkInterfaceAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` // The source/destination checking attribute. Resets the value to true. SourceDestCheck *string `locationName:"sourceDestCheck" type:"string"` @@ -17211,6 +21115,16 @@ type metadataResetNetworkInterfaceAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResetNetworkInterfaceAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetNetworkInterfaceAttributeInput) GoString() string { + return s.String() +} + type ResetNetworkInterfaceAttributeOutput struct { metadataResetNetworkInterfaceAttributeOutput `json:"-" xml:"-"` } @@ -17219,10 +21133,20 @@ type metadataResetNetworkInterfaceAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResetNetworkInterfaceAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetNetworkInterfaceAttributeOutput) GoString() string { + return s.String() +} + type ResetSnapshotAttributeInput struct { - // The attribute to reset (currently only the attribute for permission to create - // volumes can be reset). - Attribute *string `type:"string" required:"true"` + // The attribute to reset. Currently, only the attribute for permission to create + // volumes can be reset. + Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -17231,7 +21155,7 @@ type ResetSnapshotAttributeInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The ID of the snapshot. - SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"` + SnapshotId *string `type:"string" required:"true"` metadataResetSnapshotAttributeInput `json:"-" xml:"-"` } @@ -17240,6 +21164,16 @@ type metadataResetSnapshotAttributeInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResetSnapshotAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetSnapshotAttributeInput) GoString() string { + return s.String() +} + type ResetSnapshotAttributeOutput struct { metadataResetSnapshotAttributeOutput `json:"-" xml:"-"` } @@ -17248,6 +21182,16 @@ type metadataResetSnapshotAttributeOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ResetSnapshotAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetSnapshotAttributeOutput) GoString() string { + return s.String() +} + type RestoreAddressToClassicInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -17256,7 +21200,7 @@ type RestoreAddressToClassicInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // The Elastic IP address. - PublicIP *string `locationName:"publicIp" type:"string" required:"true"` + PublicIp *string `locationName:"publicIp" type:"string" required:"true"` metadataRestoreAddressToClassicInput `json:"-" xml:"-"` } @@ -17265,12 +21209,22 @@ type metadataRestoreAddressToClassicInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RestoreAddressToClassicInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreAddressToClassicInput) GoString() string { + return s.String() +} + type RestoreAddressToClassicOutput struct { // The Elastic IP address. - PublicIP *string `locationName:"publicIp" type:"string"` + PublicIp *string `locationName:"publicIp" type:"string"` // The move status for the IP address. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"Status"` metadataRestoreAddressToClassicOutput `json:"-" xml:"-"` } @@ -17279,10 +21233,20 @@ type metadataRestoreAddressToClassicOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RestoreAddressToClassicOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreAddressToClassicOutput) GoString() string { + return s.String() +} + type RevokeSecurityGroupEgressInput struct { // The CIDR IP address range. You can't specify this parameter when specifying // a source security group. - CIDRIP *string `locationName:"cidrIp" type:"string"` + CidrIp *string `locationName:"cidrIp" type:"string"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -17295,23 +21259,25 @@ type RevokeSecurityGroupEgressInput struct { FromPort *int64 `locationName:"fromPort" type:"integer"` // The ID of the security group. - GroupID *string `locationName:"groupId" type:"string" required:"true"` + GroupId *string `locationName:"groupId" type:"string" required:"true"` // A set of IP permissions. You can't specify a destination security group and // a CIDR IP address range. - IPPermissions []*IPPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` + IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). // Use -1 to specify all. - IPProtocol *string `locationName:"ipProtocol" type:"string"` + IpProtocol *string `locationName:"ipProtocol" type:"string"` - // [EC2-Classic, default VPC] The name of the destination security group. You - // can't specify a destination security group and a CIDR IP address range. + // The name of a destination security group. To revoke outbound access to a + // destination security group, we recommend that you use a set of IP permissions + // instead. SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` - // The ID of the destination security group. You can't specify a destination - // security group and a CIDR IP address range. - SourceSecurityGroupOwnerID *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` + // The AWS account number for a destination security group. To revoke outbound + // access to a destination security group, we recommend that you use a set of + // IP permissions instead. + SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` // The end of port range for the TCP and UDP protocols, or an ICMP code number. // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type. @@ -17324,6 +21290,16 @@ type metadataRevokeSecurityGroupEgressInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RevokeSecurityGroupEgressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeSecurityGroupEgressInput) GoString() string { + return s.String() +} + type RevokeSecurityGroupEgressOutput struct { metadataRevokeSecurityGroupEgressOutput `json:"-" xml:"-"` } @@ -17332,10 +21308,20 @@ type metadataRevokeSecurityGroupEgressOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RevokeSecurityGroupEgressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeSecurityGroupEgressOutput) GoString() string { + return s.String() +} + type RevokeSecurityGroupIngressInput struct { // The CIDR IP address range. You can't specify this parameter when specifying // a source security group. - CIDRIP *string `locationName:"CidrIp" type:"string"` + CidrIp *string `type:"string"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -17347,27 +21333,35 @@ type RevokeSecurityGroupIngressInput struct { // For the ICMP type number, use -1 to specify all ICMP types. FromPort *int64 `type:"integer"` - // The ID of the security group. - GroupID *string `locationName:"GroupId" type:"string"` + // The ID of the security group. Required for a security group in a nondefault + // VPC. + GroupId *string `type:"string"` // [EC2-Classic, default VPC] The name of the security group. GroupName *string `type:"string"` // A set of IP permissions. You can't specify a source security group and a // CIDR IP address range. - IPPermissions []*IPPermission `locationName:"IpPermissions" locationNameList:"item" type:"list"` + IpPermissions []*IpPermission `locationNameList:"item" type:"list"` // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). // Use -1 to specify all. - IPProtocol *string `locationName:"IpProtocol" type:"string"` + IpProtocol *string `type:"string"` // [EC2-Classic, default VPC] The name of the source security group. You can't - // specify a source security group and a CIDR IP address range. + // specify this parameter in combination with the following parameters: the + // CIDR IP address range, the start of the port range, the IP protocol, and + // the end of the port range. For EC2-VPC, the source security group must be + // in the same VPC. SourceSecurityGroupName *string `type:"string"` - // The ID of the source security group. You can't specify a source security - // group and a CIDR IP address range. - SourceSecurityGroupOwnerID *string `locationName:"SourceSecurityGroupOwnerId" type:"string"` + // [EC2-Classic, default VPC] The AWS account ID of the source security group. + // For EC2-VPC, the source security group must be in the same VPC. You can't + // specify this parameter in combination with the following parameters: the + // CIDR IP address range, the IP protocol, the start of the port range, and + // the end of the port range. To revoke a specific rule for an IP protocol and + // port range, use a set of IP permissions instead. + SourceSecurityGroupOwnerId *string `type:"string"` // The end of port range for the TCP and UDP protocols, or an ICMP code number. // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type. @@ -17380,6 +21374,16 @@ type metadataRevokeSecurityGroupIngressInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RevokeSecurityGroupIngressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeSecurityGroupIngressInput) GoString() string { + return s.String() +} + type RevokeSecurityGroupIngressOutput struct { metadataRevokeSecurityGroupIngressOutput `json:"-" xml:"-"` } @@ -17388,25 +21392,35 @@ type metadataRevokeSecurityGroupIngressOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RevokeSecurityGroupIngressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeSecurityGroupIngressOutput) GoString() string { + return s.String() +} + // Describes a route in a route table. type Route struct { // The CIDR block used for the destination match. - DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string"` + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` // The prefix of the AWS service. - DestinationPrefixListID *string `locationName:"destinationPrefixListId" type:"string"` + DestinationPrefixListId *string `locationName:"destinationPrefixListId" type:"string"` // The ID of a gateway attached to your VPC. - GatewayID *string `locationName:"gatewayId" type:"string"` + GatewayId *string `locationName:"gatewayId" type:"string"` // The ID of a NAT instance in your VPC. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The AWS account ID of the owner of the instance. - InstanceOwnerID *string `locationName:"instanceOwnerId" type:"string"` + InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` // Describes how the route was created. // @@ -17414,15 +21428,15 @@ type Route struct { // route table was created. CreateRoute indicates that the route was manually // added to the route table. EnableVgwRoutePropagation indicates that the route // was propagated by route propagation. - Origin *string `locationName:"origin" type:"string"` + Origin *string `locationName:"origin" type:"string" enum:"RouteOrigin"` // The state of the route. The blackhole state indicates that the route's target // isn't available (for example, the specified gateway isn't attached to the // VPC, or the specified NAT instance has been terminated). - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"RouteState"` // The ID of the VPC peering connection. - VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"` + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` metadataRoute `json:"-" xml:"-"` } @@ -17431,16 +21445,26 @@ type metadataRoute struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Route) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Route) GoString() string { + return s.String() +} + // Describes a route table. type RouteTable struct { // The associations between the route table and one or more subnets. Associations []*RouteTableAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` // Any virtual private gateway (VGW) propagating routes. - PropagatingVGWs []*PropagatingVGW `locationName:"propagatingVgwSet" locationNameList:"item" type:"list"` + PropagatingVgws []*PropagatingVgw `locationName:"propagatingVgwSet" locationNameList:"item" type:"list"` // The ID of the route table. - RouteTableID *string `locationName:"routeTableId" type:"string"` + RouteTableId *string `locationName:"routeTableId" type:"string"` // The routes in the route table. Routes []*Route `locationName:"routeSet" locationNameList:"item" type:"list"` @@ -17449,7 +21473,7 @@ type RouteTable struct { Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` + VpcId *string `locationName:"vpcId" type:"string"` metadataRouteTable `json:"-" xml:"-"` } @@ -17458,19 +21482,29 @@ type metadataRouteTable struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RouteTable) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteTable) GoString() string { + return s.String() +} + // Describes an association between a route table and a subnet. type RouteTableAssociation struct { // Indicates whether this is the main route table. Main *bool `locationName:"main" type:"boolean"` // The ID of the association between a route table and a subnet. - RouteTableAssociationID *string `locationName:"routeTableAssociationId" type:"string"` + RouteTableAssociationId *string `locationName:"routeTableAssociationId" type:"string"` // The ID of the route table. - RouteTableID *string `locationName:"routeTableId" type:"string"` + RouteTableId *string `locationName:"routeTableId" type:"string"` - // The ID of the subnet. - SubnetID *string `locationName:"subnetId" type:"string"` + // The ID of the subnet. A subnet ID is not returned for an implicit association. + SubnetId *string `locationName:"subnetId" type:"string"` metadataRouteTableAssociation `json:"-" xml:"-"` } @@ -17479,6 +21513,16 @@ type metadataRouteTableAssociation struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RouteTableAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteTableAssociation) GoString() string { + return s.String() +} + type RunInstancesInput struct { // Reserved. AdditionalInfo *string `locationName:"additionalInfo" type:"string"` @@ -17501,7 +21545,7 @@ type RunInstancesInput struct { // from the instance. // // Default: false - DisableAPITermination *bool `locationName:"disableApiTermination" type:"boolean"` + DisableApiTermination *bool `locationName:"disableApiTermination" type:"boolean"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -17516,32 +21560,32 @@ type RunInstancesInput struct { // instance. // // Default: false - EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` // The IAM instance profile. - IAMInstanceProfile *IAMInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` // The ID of the AMI, which you can get by calling DescribeImages. - ImageID *string `locationName:"ImageId" type:"string" required:"true"` + ImageId *string `type:"string" required:"true"` // Indicates whether an instance stops or terminates when you initiate shutdown // from the instance (using the operating system command for system shutdown). // // Default: stop - InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string"` + InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) // in the Amazon Elastic Compute Cloud User Guide. // // Default: m1.small - InstanceType *string `type:"string"` + InstanceType *string `type:"string" enum:"InstanceType"` // The ID of the kernel. // // We recommend that you use PV-GRUB instead of kernels and RAM disks. For // more information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) // in the Amazon Elastic Compute Cloud User Guide. - KernelID *string `locationName:"KernelId" type:"string"` + KernelId *string `type:"string"` // The name of the key pair. You can create a key pair using CreateKeyPair or // ImportKeyPair. @@ -17587,19 +21631,19 @@ type RunInstancesInput struct { // and PrivateIpAddresses.n.PrivateIpAddress is set to an IP address. // // Default: We select an IP address from the IP address range of the subnet. - PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"` + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` // The ID of the RAM disk. // // We recommend that you use PV-GRUB instead of kernels and RAM disks. For // more information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) // in the Amazon Elastic Compute Cloud User Guide. - RAMDiskID *string `locationName:"RamdiskId" type:"string"` + RamdiskId *string `type:"string"` // One or more security group IDs. You can create a security group using CreateSecurityGroup. // // Default: Amazon EC2 uses the default security group. - SecurityGroupIDs []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` // [EC2-Classic, default VPC] One or more security group names. For a nondefault // VPC, you must use security group IDs instead. @@ -17608,7 +21652,7 @@ type RunInstancesInput struct { SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` // [EC2-VPC] The ID of the subnet to launch the instance into. - SubnetID *string `locationName:"SubnetId" type:"string"` + SubnetId *string `type:"string"` // The Base64-encoded MIME user data for the instances. UserData *string `type:"string"` @@ -17620,6 +21664,16 @@ type metadataRunInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RunInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RunInstancesInput) GoString() string { + return s.String() +} + // Describes the monitoring for the instance. type RunInstancesMonitoringEnabled struct { // Indicates whether monitoring is enabled for the instance. @@ -17632,13 +21686,23 @@ type metadataRunInstancesMonitoringEnabled struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RunInstancesMonitoringEnabled) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RunInstancesMonitoringEnabled) GoString() string { + return s.String() +} + // Describes the storage parameters for S3 and S3 buckets for an instance store-backed // AMI. type S3Storage struct { // The access key ID of the owner of the bucket. Before you specify a value // for your access key ID, review and follow the guidance in Best Practices // for Managing AWS Access Keys (http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html). - AWSAccessKeyID *string `locationName:"AWSAccessKeyId" type:"string"` + AWSAccessKeyId *string `type:"string"` // The bucket in which to store the AMI. You can specify a bucket that you already // own or a new bucket that Amazon EC2 creates on your behalf. If you specify @@ -17662,31 +21726,41 @@ type metadataS3Storage struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s S3Storage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Storage) GoString() string { + return s.String() +} + // Describes a security group type SecurityGroup struct { // A description of the security group. Description *string `locationName:"groupDescription" type:"string"` // The ID of the security group. - GroupID *string `locationName:"groupId" type:"string"` + GroupId *string `locationName:"groupId" type:"string"` // The name of the security group. GroupName *string `locationName:"groupName" type:"string"` // One or more inbound rules associated with the security group. - IPPermissions []*IPPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` + IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` // [EC2-VPC] One or more outbound rules associated with the security group. - IPPermissionsEgress []*IPPermission `locationName:"ipPermissionsEgress" locationNameList:"item" type:"list"` + IpPermissionsEgress []*IpPermission `locationName:"ipPermissionsEgress" locationNameList:"item" type:"list"` // The AWS account ID of the owner of the security group. - OwnerID *string `locationName:"ownerId" type:"string"` + OwnerId *string `locationName:"ownerId" type:"string"` // Any tags assigned to the security group. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // [EC2-VPC] The ID of the VPC for the security group. - VPCID *string `locationName:"vpcId" type:"string"` + VpcId *string `locationName:"vpcId" type:"string"` metadataSecurityGroup `json:"-" xml:"-"` } @@ -17695,42 +21769,69 @@ type metadataSecurityGroup struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SecurityGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroup) GoString() string { + return s.String() +} + // Describes a snapshot. type Snapshot struct { + // The data encryption key identifier for the snapshot. This value is a unique + // identifier that corresponds to the data encryption key that was used to encrypt + // the original volume or snapshot copy. Because data encryption keys are inherited + // by volumes created from snapshots, and vice versa, if snapshots share the + // same data encryption key identifier, then they belong to the same volume/snapshot + // lineage. This parameter is only returned by the DescribeSnapshots API operation. + DataEncryptionKeyId *string `locationName:"dataEncryptionKeyId" type:"string"` + // The description for the snapshot. Description *string `locationName:"description" type:"string"` // Indicates whether the snapshot is encrypted. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The full ARN of the AWS Key Management Service (KMS) master key that was - // used to protect the volume encryption key for the parent volume. - KMSKeyID *string `locationName:"kmsKeyId" type:"string"` + // The full ARN of the AWS Key Management Service (AWS KMS) customer master + // key (CMK) that was used to protect the volume encryption key for the parent + // volume. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The AWS account alias (for example, amazon, self) or AWS account ID that // owns the snapshot. OwnerAlias *string `locationName:"ownerAlias" type:"string"` // The AWS account ID of the EBS snapshot owner. - OwnerID *string `locationName:"ownerId" type:"string"` + OwnerId *string `locationName:"ownerId" type:"string"` // The progress of the snapshot, as a percentage. Progress *string `locationName:"progress" type:"string"` - // The ID of the snapshot. - SnapshotID *string `locationName:"snapshotId" type:"string"` + // The ID of the snapshot. Each snapshot receives a unique identifier when it + // is created. + SnapshotId *string `locationName:"snapshotId" type:"string"` // The time stamp when the snapshot was initiated. StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"` // The snapshot state. - State *string `locationName:"status" type:"string"` + State *string `locationName:"status" type:"string" enum:"SnapshotState"` + + // Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy + // operation fails (for example, if the proper AWS Key Management Service (AWS + // KMS) permissions are not obtained) this field displays error state details + // to help you diagnose why the error occurred. This parameter is only returned + // by the DescribeSnapshots API operation. + StateMessage *string `locationName:"statusMessage" type:"string"` // Any tags assigned to the snapshot. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // The ID of the volume. - VolumeID *string `locationName:"volumeId" type:"string"` + // The ID of the volume that was used to create the snapshot. + VolumeId *string `locationName:"volumeId" type:"string"` // The size of the volume, in GiB. VolumeSize *int64 `locationName:"volumeSize" type:"integer"` @@ -17742,6 +21843,16 @@ type metadataSnapshot struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Snapshot) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Snapshot) GoString() string { + return s.String() +} + // Describes the snapshot created from the imported disk. type SnapshotDetail struct { // A description for the snapshot. @@ -17760,7 +21871,7 @@ type SnapshotDetail struct { Progress *string `locationName:"progress" type:"string"` // The snapshot ID of the disk being imported. - SnapshotID *string `locationName:"snapshotId" type:"string"` + SnapshotId *string `locationName:"snapshotId" type:"string"` // A brief status of the snapshot creation. Status *string `locationName:"status" type:"string"` @@ -17769,7 +21880,7 @@ type SnapshotDetail struct { StatusMessage *string `locationName:"statusMessage" type:"string"` // The URL used to access the disk image. - URL *string `locationName:"url" type:"string"` + Url *string `locationName:"url" type:"string"` // Describes the S3 bucket for the disk image. UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` @@ -17781,6 +21892,16 @@ type metadataSnapshotDetail struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SnapshotDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SnapshotDetail) GoString() string { + return s.String() +} + // The disk container object for the import snapshot request. type SnapshotDiskContainer struct { // The description of the disk image being imported. @@ -17793,7 +21914,7 @@ type SnapshotDiskContainer struct { // The URL to the Amazon S3-based disk image being imported. It can either be // a https URL (https://..) or an Amazon S3 URL (s3://..). - URL *string `locationName:"Url" type:"string"` + Url *string `type:"string"` // Describes the S3 bucket for the disk image. UserBucket *UserBucket `type:"structure"` @@ -17805,6 +21926,16 @@ type metadataSnapshotDiskContainer struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SnapshotDiskContainer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SnapshotDiskContainer) GoString() string { + return s.String() +} + // Details about the import snapshot task. type SnapshotTaskDetail struct { // The description of the snapshot. @@ -17820,7 +21951,7 @@ type SnapshotTaskDetail struct { Progress *string `locationName:"progress" type:"string"` // The snapshot ID of the disk being imported. - SnapshotID *string `locationName:"snapshotId" type:"string"` + SnapshotId *string `locationName:"snapshotId" type:"string"` // A brief status for the import snapshot task. Status *string `locationName:"status" type:"string"` @@ -17829,7 +21960,7 @@ type SnapshotTaskDetail struct { StatusMessage *string `locationName:"statusMessage" type:"string"` // The URL of the disk image from which the snapshot is created. - URL *string `locationName:"url" type:"string"` + Url *string `locationName:"url" type:"string"` // The S3 bucket for the disk image. UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` @@ -17841,22 +21972,32 @@ type metadataSnapshotTaskDetail struct { SDKShapeTraits bool `type:"structure"` } -// Describes the data feed for a Spot Instance. +// String returns the string representation +func (s SnapshotTaskDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SnapshotTaskDetail) GoString() string { + return s.String() +} + +// Describes the data feed for a Spot instance. type SpotDatafeedSubscription struct { - // The Amazon S3 bucket where the Spot Instance data feed is located. + // The Amazon S3 bucket where the Spot instance data feed is located. Bucket *string `locationName:"bucket" type:"string"` - // The fault codes for the Spot Instance request, if any. + // The fault codes for the Spot instance request, if any. Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` // The AWS account ID of the account. - OwnerID *string `locationName:"ownerId" type:"string"` + OwnerId *string `locationName:"ownerId" type:"string"` // The prefix that is prepended to data feed files. Prefix *string `locationName:"prefix" type:"string"` - // The state of the Spot Instance data feed subscription. - State *string `locationName:"state" type:"string"` + // The state of the Spot instance data feed subscription. + State *string `locationName:"state" type:"string" enum:"DatafeedSubscriptionState"` metadataSpotDatafeedSubscription `json:"-" xml:"-"` } @@ -17865,16 +22006,138 @@ type metadataSpotDatafeedSubscription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SpotDatafeedSubscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotDatafeedSubscription) GoString() string { + return s.String() +} + +// Describes the launch specification for one or more Spot instances. +type SpotFleetLaunchSpecification struct { + // Deprecated. + AddressingType *string `locationName:"addressingType" type:"string"` + + // One or more block device mapping entries. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + + // Indicates whether the instances are optimized for EBS I/O. This optimization + // provides dedicated throughput to Amazon EBS and an optimized configuration + // stack to provide optimal EBS I/O performance. This optimization isn't available + // with all instance types. Additional usage charges apply when using an EBS + // Optimized instance. + // + // Default: false + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + + // The IAM instance profile. + IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + + // The ID of the AMI. + ImageId *string `locationName:"imageId" type:"string"` + + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // The ID of the kernel. + KernelId *string `locationName:"kernelId" type:"string"` + + // The name of the key pair. + KeyName *string `locationName:"keyName" type:"string"` + + // Enable or disable monitoring for the instances. + Monitoring *SpotFleetMonitoring `locationName:"monitoring" type:"structure"` + + // One or more network interfaces. + NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` + + // The placement information. + Placement *SpotPlacement `locationName:"placement" type:"structure"` + + // The ID of the RAM disk. + RamdiskId *string `locationName:"ramdiskId" type:"string"` + + // One or more security groups. 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. + SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` + + // The bid price per unit hour for the specified instance type. If this value + // is not specified, the default is the Spot bid price specified for the fleet. + // To determine the bid price per unit hour, divide the Spot bid price by the + // value of WeightedCapacity. + SpotPrice *string `locationName:"spotPrice" type:"string"` + + // The ID of the subnet in which to launch the instances. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The Base64-encoded MIME user data to make available to the instances. + UserData *string `locationName:"userData" type:"string"` + + // The number of units provided by the specified instance type. These are the + // same units that you chose to set the target capacity in terms (instances + // or a performance characteristic such as vCPUs, memory, or I/O). + // + // If the target capacity divided by this value is not a whole number, we round + // the number of instances to the next whole number. If this value is not specified, + // the default is 1. + WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` + + metadataSpotFleetLaunchSpecification `json:"-" xml:"-"` +} + +type metadataSpotFleetLaunchSpecification struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s SpotFleetLaunchSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotFleetLaunchSpecification) GoString() string { + return s.String() +} + +// Describes whether monitoring is enabled. +type SpotFleetMonitoring struct { + // Enables monitoring for the instance. + // + // Default: false + Enabled *bool `locationName:"enabled" type:"boolean"` + + metadataSpotFleetMonitoring `json:"-" xml:"-"` +} + +type metadataSpotFleetMonitoring struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s SpotFleetMonitoring) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotFleetMonitoring) GoString() string { + return s.String() +} + // Describes a Spot fleet request. type SpotFleetRequestConfig struct { // Information about the configuration of the Spot fleet request. SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"` // The ID of the Spot fleet request. - SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` // The state of the Spot fleet request. - SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" required:"true"` + SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" required:"true" enum:"BatchState"` metadataSpotFleetRequestConfig `json:"-" xml:"-"` } @@ -17883,30 +22146,45 @@ type metadataSpotFleetRequestConfig struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SpotFleetRequestConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotFleetRequestConfig) GoString() string { + return s.String() +} + // Describes the configuration of a Spot fleet request. type SpotFleetRequestConfigData struct { + // Determines how to allocate the target capacity across the Spot pools specified + // by the Spot fleet request. The default is lowestPrice. + AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` + // A unique, case-sensitive identifier you provide to ensure idempotency of // your listings. This helps avoid duplicate listings. For more information, // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` - // Grants the Spot fleet service permission to terminate instances on your behalf - // when you cancel a Spot fleet request using CancelSpotFleetRequests or when + // Grants the Spot fleet permission to terminate Spot instances on your behalf + // when you cancel its Spot fleet request using CancelSpotFleetRequests or when // the Spot fleet request expires, if you set terminateInstancesWithExpiration. - IAMFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"` + IamFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"` - // Information about the launch specifications for the instances. - LaunchSpecifications []*LaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" type:"list" required:"true"` + // Information about the launch specifications for the Spot fleet request. + LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" min:"1" type:"list" required:"true"` - // The maximum hourly price (bid) for any Spot Instance launched to fulfill - // the request. + // The bid price per unit hour. SpotPrice *string `locationName:"spotPrice" type:"string" required:"true"` - // The maximum number of Spot Instances to launch. + // The number of units to request. You can choose to set the target capacity + // in terms of instances or a performance characteristic that is important to + // your application workload, such as vCPUs, memory, or I/O. TargetCapacity *int64 `locationName:"targetCapacity" type:"integer" required:"true"` - // Indicates whether running instances should be terminated when the Spot fleet - // request expires. + // Indicates whether running Spot instances should be terminated when the Spot + // fleet request expires. TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). @@ -17914,7 +22192,7 @@ type SpotFleetRequestConfigData struct { ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"` // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // At this point, no new Spot Instance requests are placed or enabled to fulfill + // At this point, no new Spot instance requests are placed or enabled to fulfill // the request. ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"` @@ -17925,25 +22203,35 @@ type metadataSpotFleetRequestConfigData struct { SDKShapeTraits bool `type:"structure"` } -// Describe a Spot Instance request. +// String returns the string representation +func (s SpotFleetRequestConfigData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotFleetRequestConfigData) GoString() string { + return s.String() +} + +// Describe a Spot instance request. type SpotInstanceRequest struct { // 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 + // for all Spot instance requests, all Spot instances are launched in the same // Availability Zone. AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` - // The date and time when the Spot Instance request was created, in UTC format + // The date and time when the Spot instance request was created, in UTC format // (for example, YYYY-MM-DDTHH:MM:SSZ). CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"` - // The fault codes for the Spot Instance request, if any. + // The fault codes for the Spot instance request, if any. Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` - // The instance ID, if an instance has been launched to fulfill the Spot Instance + // The instance ID, if an instance has been launched to fulfill the Spot instance // request. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` - // The instance launch group. Launch groups are Spot Instances that launch together + // The instance launch group. Launch groups are Spot instances that launch together // and terminate together. LaunchGroup *string `locationName:"launchGroup" type:"string"` @@ -17953,30 +22241,30 @@ type SpotInstanceRequest struct { // The Availability Zone in which the bid is launched. LaunchedAvailabilityZone *string `locationName:"launchedAvailabilityZone" type:"string"` - // The product description associated with the Spot Instance. - ProductDescription *string `locationName:"productDescription" type:"string"` + // The product description associated with the Spot instance. + ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - // The ID of the Spot Instance request. - SpotInstanceRequestID *string `locationName:"spotInstanceRequestId" type:"string"` + // The 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 any Spot instance launched to fulfill // the request. SpotPrice *string `locationName:"spotPrice" type:"string"` - // The state of the Spot Instance request. Spot bid status information can help - // you track your Spot Instance requests. For more information, see Spot Bid + // The state of the Spot instance request. Spot bid status information can help + // you track your Spot instance requests. For more information, see Spot Bid // Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) // in the Amazon Elastic Compute Cloud User Guide. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"SpotInstanceState"` - // The status code and status message describing the Spot Instance request. + // The status code and status message describing the Spot instance request. Status *SpotInstanceStatus `locationName:"status" type:"structure"` // Any tags assigned to the resource. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // The Spot Instance request type. - Type *string `locationName:"type" type:"string"` + // The Spot instance request type. + Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // If this is a one-time request, the request becomes active at this date and @@ -17998,12 +22286,22 @@ type metadataSpotInstanceRequest struct { SDKShapeTraits bool `type:"structure"` } -// Describes a Spot Instance state change. +// String returns the string representation +func (s SpotInstanceRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotInstanceRequest) GoString() string { + return s.String() +} + +// Describes a Spot instance state change. type SpotInstanceStateFault struct { - // The reason code for the Spot Instance state change. + // The reason code for the Spot instance state change. Code *string `locationName:"code" type:"string"` - // The message for the Spot Instance state change. + // The message for the Spot instance state change. Message *string `locationName:"message" type:"string"` metadataSpotInstanceStateFault `json:"-" xml:"-"` @@ -18013,7 +22311,17 @@ type metadataSpotInstanceStateFault struct { SDKShapeTraits bool `type:"structure"` } -// Describes the status of a Spot Instance request. +// String returns the string representation +func (s SpotInstanceStateFault) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotInstanceStateFault) GoString() string { + return s.String() +} + +// Describes the status of a Spot instance request. type SpotInstanceStatus struct { // The status code. Code *string `locationName:"code" type:"string"` @@ -18032,7 +22340,17 @@ type metadataSpotInstanceStatus struct { SDKShapeTraits bool `type:"structure"` } -// Describes Spot Instance placement. +// String returns the string representation +func (s SpotInstanceStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotInstanceStatus) GoString() string { + return s.String() +} + +// Describes Spot instance placement. type SpotPlacement struct { // The Availability Zone. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` @@ -18047,19 +22365,29 @@ type metadataSpotPlacement struct { SDKShapeTraits bool `type:"structure"` } -// Describes the maximum hourly price (bid) for any Spot Instance launched to +// String returns the string representation +func (s SpotPlacement) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotPlacement) GoString() string { + return s.String() +} + +// Describes the maximum hourly price (bid) for any Spot instance launched to // fulfill the request. type SpotPrice struct { // The Availability Zone. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` // The instance type. - InstanceType *string `locationName:"instanceType" type:"string"` + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // A general description of the AMI. - ProductDescription *string `locationName:"productDescription" type:"string"` + ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - // The maximum price (bid) that you are willing to pay for a Spot Instance. + // The maximum price (bid) that you are willing to pay for a Spot instance. SpotPrice *string `locationName:"spotPrice" type:"string"` // The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). @@ -18072,6 +22400,16 @@ type metadataSpotPrice struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SpotPrice) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotPrice) GoString() string { + return s.String() +} + type StartInstancesInput struct { // Reserved. AdditionalInfo *string `locationName:"additionalInfo" type:"string"` @@ -18083,7 +22421,7 @@ type StartInstancesInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // One or more instance IDs. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` metadataStartInstancesInput `json:"-" xml:"-"` } @@ -18092,6 +22430,16 @@ type metadataStartInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s StartInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartInstancesInput) GoString() string { + return s.String() +} + type StartInstancesOutput struct { // Information about one or more started instances. StartingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` @@ -18103,6 +22451,16 @@ type metadataStartInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s StartInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartInstancesOutput) GoString() string { + return s.String() +} + // Describes a state change. type StateReason struct { // The reason code for the state change. @@ -18140,6 +22498,16 @@ type metadataStateReason struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s StateReason) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StateReason) GoString() string { + return s.String() +} + type StopInstancesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -18156,7 +22524,7 @@ type StopInstancesInput struct { Force *bool `locationName:"force" type:"boolean"` // One or more instance IDs. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` metadataStopInstancesInput `json:"-" xml:"-"` } @@ -18165,6 +22533,16 @@ type metadataStopInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s StopInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopInstancesInput) GoString() string { + return s.String() +} + type StopInstancesOutput struct { // Information about one or more stopped instances. StoppingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` @@ -18176,6 +22554,16 @@ type metadataStopInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s StopInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopInstancesOutput) GoString() string { + return s.String() +} + // Describes the storage location for an instance store-backed AMI. type Storage struct { // An Amazon S3 storage location. @@ -18188,6 +22576,16 @@ type metadataStorage struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Storage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Storage) GoString() string { + return s.String() +} + // Describes a subnet. type Subnet struct { // The Availability Zone of the subnet. @@ -18195,28 +22593,28 @@ type Subnet struct { // The number of unused IP addresses in the subnet. Note that the IP addresses // for any stopped instances are considered unavailable. - AvailableIPAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"` + AvailableIpAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"` // The CIDR block assigned to the subnet. - CIDRBlock *string `locationName:"cidrBlock" type:"string"` + CidrBlock *string `locationName:"cidrBlock" type:"string"` // Indicates whether this is the default subnet for the Availability Zone. - DefaultForAZ *bool `locationName:"defaultForAz" type:"boolean"` + DefaultForAz *bool `locationName:"defaultForAz" type:"boolean"` // Indicates whether instances launched in this subnet receive a public IP address. - MapPublicIPOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"` + MapPublicIpOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"` // The current state of the subnet. - State *string `locationName:"state" type:"string"` + State *string `locationName:"state" type:"string" enum:"SubnetState"` // The ID of the subnet. - SubnetID *string `locationName:"subnetId" type:"string"` + SubnetId *string `locationName:"subnetId" type:"string"` // Any tags assigned to the subnet. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The ID of the VPC the subnet is in. - VPCID *string `locationName:"vpcId" type:"string"` + VpcId *string `locationName:"vpcId" type:"string"` metadataSubnet `json:"-" xml:"-"` } @@ -18225,6 +22623,16 @@ type metadataSubnet struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Subnet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Subnet) GoString() string { + return s.String() +} + // Describes a tag. type Tag struct { // The key of the tag. @@ -18246,16 +22654,26 @@ type metadataTag struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + // Describes a tag. type TagDescription struct { // The tag key. Key *string `locationName:"key" type:"string"` // The ID of the resource. For example, ami-1a2b3c4d. - ResourceID *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" type:"string"` // The resource type. - ResourceType *string `locationName:"resourceType" type:"string"` + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` // The tag value. Value *string `locationName:"value" type:"string"` @@ -18267,6 +22685,16 @@ type metadataTagDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s TagDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagDescription) GoString() string { + return s.String() +} + type TerminateInstancesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -18275,7 +22703,7 @@ type TerminateInstancesInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // One or more instance IDs. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` metadataTerminateInstancesInput `json:"-" xml:"-"` } @@ -18284,6 +22712,16 @@ type metadataTerminateInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s TerminateInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateInstancesInput) GoString() string { + return s.String() +} + type TerminateInstancesOutput struct { // Information about one or more terminated instances. TerminatingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` @@ -18295,29 +22733,59 @@ type metadataTerminateInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } -type UnassignPrivateIPAddressesInput struct { +// String returns the string representation +func (s TerminateInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateInstancesOutput) GoString() string { + return s.String() +} + +type UnassignPrivateIpAddressesInput struct { // The ID of the network interface. - NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"` + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` // The secondary private IP addresses to unassign from the network interface. // You can specify this option multiple times to unassign more than one IP address. - PrivateIPAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list" required:"true"` + PrivateIpAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list" required:"true"` - metadataUnassignPrivateIPAddressesInput `json:"-" xml:"-"` + metadataUnassignPrivateIpAddressesInput `json:"-" xml:"-"` } -type metadataUnassignPrivateIPAddressesInput struct { +type metadataUnassignPrivateIpAddressesInput struct { SDKShapeTraits bool `type:"structure"` } -type UnassignPrivateIPAddressesOutput struct { - metadataUnassignPrivateIPAddressesOutput `json:"-" xml:"-"` +// String returns the string representation +func (s UnassignPrivateIpAddressesInput) String() string { + return awsutil.Prettify(s) } -type metadataUnassignPrivateIPAddressesOutput struct { +// GoString returns the string representation +func (s UnassignPrivateIpAddressesInput) GoString() string { + return s.String() +} + +type UnassignPrivateIpAddressesOutput struct { + metadataUnassignPrivateIpAddressesOutput `json:"-" xml:"-"` +} + +type metadataUnassignPrivateIpAddressesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UnassignPrivateIpAddressesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnassignPrivateIpAddressesOutput) GoString() string { + return s.String() +} + type UnmonitorInstancesInput struct { // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -18326,7 +22794,7 @@ type UnmonitorInstancesInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // One or more instance IDs. - InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` metadataUnmonitorInstancesInput `json:"-" xml:"-"` } @@ -18335,6 +22803,16 @@ type metadataUnmonitorInstancesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UnmonitorInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnmonitorInstancesInput) GoString() string { + return s.String() +} + type UnmonitorInstancesOutput struct { // Monitoring information for one or more instances. InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"` @@ -18346,13 +22824,23 @@ type metadataUnmonitorInstancesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UnmonitorInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnmonitorInstancesOutput) GoString() string { + return s.String() +} + // Information about items that were not successfully processed in a batch call. type UnsuccessfulItem struct { // Information about the error. Error *UnsuccessfulItemError `locationName:"error" type:"structure" required:"true"` // The ID of the resource. - ResourceID *string `locationName:"resourceId" type:"string"` + ResourceId *string `locationName:"resourceId" type:"string"` metadataUnsuccessfulItem `json:"-" xml:"-"` } @@ -18361,7 +22849,17 @@ type metadataUnsuccessfulItem struct { SDKShapeTraits bool `type:"structure"` } -// Information about the error that occured. For more information about errors, +// String returns the string representation +func (s UnsuccessfulItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnsuccessfulItem) GoString() string { + return s.String() +} + +// Information about the error that occurred. For more information about errors, // see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html). type UnsuccessfulItemError struct { // The error code. @@ -18377,6 +22875,16 @@ type metadataUnsuccessfulItemError struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UnsuccessfulItemError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnsuccessfulItemError) GoString() string { + return s.String() +} + // Describes the S3 bucket for the disk image. type UserBucket struct { // The name of the S3 bucket where the disk image is located. @@ -18392,6 +22900,16 @@ type metadataUserBucket struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UserBucket) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UserBucket) GoString() string { + return s.String() +} + // Describes the S3 bucket for the disk image. type UserBucketDetails struct { // The S3 bucket from which the disk image was created. @@ -18407,6 +22925,16 @@ type metadataUserBucketDetails struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UserBucketDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UserBucketDetails) GoString() string { + return s.String() +} + // Describes the user data to be made available to an instance. type UserData struct { // The Base64-encoded MIME user data for the instance. @@ -18419,10 +22947,20 @@ type metadataUserData struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UserData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UserData) GoString() string { + return s.String() +} + // Describes a security group and AWS account ID pair. -type UserIDGroupPair struct { +type UserIdGroupPair struct { // The ID of the security group. - GroupID *string `locationName:"groupId" type:"string"` + GroupId *string `locationName:"groupId" type:"string"` // The name of the security group. In a request, use this parameter for a security // group in EC2-Classic or a default VPC only. For a security group in a nondefault @@ -18430,17 +22968,27 @@ type UserIDGroupPair struct { GroupName *string `locationName:"groupName" type:"string"` // The ID of an AWS account. EC2-Classic only. - UserID *string `locationName:"userId" type:"string"` + UserId *string `locationName:"userId" type:"string"` - metadataUserIDGroupPair `json:"-" xml:"-"` + metadataUserIdGroupPair `json:"-" xml:"-"` } -type metadataUserIDGroupPair struct { +type metadataUserIdGroupPair struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s UserIdGroupPair) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UserIdGroupPair) GoString() string { + return s.String() +} + // Describes telemetry for a VPN tunnel. -type VGWTelemetry struct { +type VgwTelemetry struct { // The number of accepted routes. AcceptedRouteCount *int64 `locationName:"acceptedRouteCount" type:"integer"` @@ -18449,286 +22997,29 @@ type VGWTelemetry struct { // The Internet-routable IP address of the virtual private gateway's outside // interface. - OutsideIPAddress *string `locationName:"outsideIpAddress" type:"string"` + OutsideIpAddress *string `locationName:"outsideIpAddress" type:"string"` // The status of the VPN tunnel. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"TelemetryStatus"` // If an error occurs, a description of the error. StatusMessage *string `locationName:"statusMessage" type:"string"` - metadataVGWTelemetry `json:"-" xml:"-"` + metadataVgwTelemetry `json:"-" xml:"-"` } -type metadataVGWTelemetry struct { +type metadataVgwTelemetry struct { SDKShapeTraits bool `type:"structure"` } -// Describes a VPC. -type VPC struct { - // The CIDR block for the VPC. - CIDRBlock *string `locationName:"cidrBlock" type:"string"` - - // The ID of the set of DHCP options you've associated with the VPC (or default - // if the default options are associated with the VPC). - DHCPOptionsID *string `locationName:"dhcpOptionsId" type:"string"` - - // The allowed tenancy of instances launched into the VPC. - InstanceTenancy *string `locationName:"instanceTenancy" type:"string"` - - // Indicates whether the VPC is the default VPC. - IsDefault *bool `locationName:"isDefault" type:"boolean"` - - // The current state of the VPC. - State *string `locationName:"state" type:"string"` - - // Any tags assigned to the VPC. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` - - metadataVPC `json:"-" xml:"-"` +// String returns the string representation +func (s VgwTelemetry) String() string { + return awsutil.Prettify(s) } -type metadataVPC struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes an attachment between a virtual private gateway and a VPC. -type VPCAttachment struct { - // The current state of the attachment. - State *string `locationName:"state" type:"string"` - - // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` - - metadataVPCAttachment `json:"-" xml:"-"` -} - -type metadataVPCAttachment struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes whether a VPC is enabled for ClassicLink. -type VPCClassicLink struct { - // Indicates whether the VPC is enabled for ClassicLink. - ClassicLinkEnabled *bool `locationName:"classicLinkEnabled" type:"boolean"` - - // Any tags assigned to the VPC. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` - - metadataVPCClassicLink `json:"-" xml:"-"` -} - -type metadataVPCClassicLink struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes a VPC endpoint. -type VPCEndpoint struct { - // The date and time the VPC endpoint was created. - CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"` - - // The policy document associated with the endpoint. - PolicyDocument *string `locationName:"policyDocument" type:"string"` - - // One or more route tables associated with the endpoint. - RouteTableIDs []*string `locationName:"routeTableIdSet" locationNameList:"item" type:"list"` - - // The name of the AWS service to which the endpoint is associated. - ServiceName *string `locationName:"serviceName" type:"string"` - - // The state of the VPC endpoint. - State *string `locationName:"state" type:"string"` - - // The ID of the VPC endpoint. - VPCEndpointID *string `locationName:"vpcEndpointId" type:"string"` - - // The ID of the VPC to which the endpoint is associated. - VPCID *string `locationName:"vpcId" type:"string"` - - metadataVPCEndpoint `json:"-" xml:"-"` -} - -type metadataVPCEndpoint struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes a VPC peering connection. -type VPCPeeringConnection struct { - // The information of the peer VPC. - AccepterVPCInfo *VPCPeeringConnectionVPCInfo `locationName:"accepterVpcInfo" type:"structure"` - - // The time that an unaccepted VPC peering connection will expire. - ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp" timestampFormat:"iso8601"` - - // The information of the requester VPC. - RequesterVPCInfo *VPCPeeringConnectionVPCInfo `locationName:"requesterVpcInfo" type:"structure"` - - // The status of the VPC peering connection. - Status *VPCPeeringConnectionStateReason `locationName:"status" type:"structure"` - - // Any tags assigned to the resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The ID of the VPC peering connection. - VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"` - - metadataVPCPeeringConnection `json:"-" xml:"-"` -} - -type metadataVPCPeeringConnection struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes the status of a VPC peering connection. -type VPCPeeringConnectionStateReason struct { - // The status of the VPC peering connection. - Code *string `locationName:"code" type:"string"` - - // A message that provides more information about the status, if applicable. - Message *string `locationName:"message" type:"string"` - - metadataVPCPeeringConnectionStateReason `json:"-" xml:"-"` -} - -type metadataVPCPeeringConnectionStateReason struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes a VPC in a VPC peering connection. -type VPCPeeringConnectionVPCInfo struct { - // The CIDR block for the VPC. - CIDRBlock *string `locationName:"cidrBlock" type:"string"` - - // The AWS account ID of the VPC owner. - OwnerID *string `locationName:"ownerId" type:"string"` - - // The ID of the VPC. - VPCID *string `locationName:"vpcId" type:"string"` - - metadataVPCPeeringConnectionVPCInfo `json:"-" xml:"-"` -} - -type metadataVPCPeeringConnectionVPCInfo struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes a VPN connection. -type VPNConnection struct { - // The configuration information for the VPN connection's customer gateway (in - // the native XML format). This element is always present in the CreateVpnConnection - // response; however, it's present in the DescribeVpnConnections response only - // if the VPN connection is in the pending or available state. - CustomerGatewayConfiguration *string `locationName:"customerGatewayConfiguration" type:"string"` - - // The ID of the customer gateway at your end of the VPN connection. - CustomerGatewayID *string `locationName:"customerGatewayId" type:"string"` - - // The VPN connection options. - Options *VPNConnectionOptions `locationName:"options" type:"structure"` - - // The static routes associated with the VPN connection. - Routes []*VPNStaticRoute `locationName:"routes" locationNameList:"item" type:"list"` - - // The current state of the VPN connection. - State *string `locationName:"state" type:"string"` - - // Any tags assigned to the VPN connection. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The type of VPN connection. - Type *string `locationName:"type" type:"string"` - - // Information about the VPN tunnel. - VGWTelemetry []*VGWTelemetry `locationName:"vgwTelemetry" locationNameList:"item" type:"list"` - - // The ID of the VPN connection. - VPNConnectionID *string `locationName:"vpnConnectionId" type:"string"` - - // The ID of the virtual private gateway at the AWS side of the VPN connection. - VPNGatewayID *string `locationName:"vpnGatewayId" type:"string"` - - metadataVPNConnection `json:"-" xml:"-"` -} - -type metadataVPNConnection struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes VPN connection options. -type VPNConnectionOptions struct { - // Indicates whether the VPN connection uses static routes only. Static routes - // must be used for devices that don't support BGP. - StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` - - metadataVPNConnectionOptions `json:"-" xml:"-"` -} - -type metadataVPNConnectionOptions struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes VPN connection options. -type VPNConnectionOptionsSpecification struct { - // Indicates whether the VPN connection uses static routes only. Static routes - // must be used for devices that don't support BGP. - StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` - - metadataVPNConnectionOptionsSpecification `json:"-" xml:"-"` -} - -type metadataVPNConnectionOptionsSpecification struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes a virtual private gateway. -type VPNGateway struct { - // The Availability Zone where the virtual private gateway was created. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The current state of the virtual private gateway. - State *string `locationName:"state" type:"string"` - - // Any tags assigned to the virtual private gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The type of VPN connection the virtual private gateway supports. - Type *string `locationName:"type" type:"string"` - - // Any VPCs attached to the virtual private gateway. - VPCAttachments []*VPCAttachment `locationName:"attachments" locationNameList:"item" type:"list"` - - // The ID of the virtual private gateway. - VPNGatewayID *string `locationName:"vpnGatewayId" type:"string"` - - metadataVPNGateway `json:"-" xml:"-"` -} - -type metadataVPNGateway struct { - SDKShapeTraits bool `type:"structure"` -} - -// Describes a static route for a VPN connection. -type VPNStaticRoute struct { - // The CIDR block associated with the local subnet of the customer data center. - DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // Indicates how the routes were provided. - Source *string `locationName:"source" type:"string"` - - // The current state of the static route. - State *string `locationName:"state" type:"string"` - - metadataVPNStaticRoute `json:"-" xml:"-"` -} - -type metadataVPNStaticRoute struct { - SDKShapeTraits bool `type:"structure"` +// GoString returns the string representation +func (s VgwTelemetry) GoString() string { + return s.String() } // Describes a volume. @@ -18758,30 +23049,30 @@ type Volume struct { // // Condition: This parameter is required for requests to create io1 volumes; // it is not used in requests to create standard or gp2 volumes. - IOPS *int64 `locationName:"iops" type:"integer"` + Iops *int64 `locationName:"iops" type:"integer"` - // The full ARN of the AWS Key Management Service (KMS) master key that was - // used to protect the volume encryption key for the volume. - KMSKeyID *string `locationName:"kmsKeyId" type:"string"` + // The full ARN of the AWS Key Management Service (AWS KMS) customer master + // key (CMK) that was used to protect the volume encryption key for the volume. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // The size of the volume, in GiBs. Size *int64 `locationName:"size" type:"integer"` // The snapshot from which the volume was created, if applicable. - SnapshotID *string `locationName:"snapshotId" type:"string"` + SnapshotId *string `locationName:"snapshotId" type:"string"` // The volume state. - State *string `locationName:"status" type:"string"` + State *string `locationName:"status" type:"string" enum:"VolumeState"` // Any tags assigned to the volume. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` // The ID of the volume. - VolumeID *string `locationName:"volumeId" type:"string"` + VolumeId *string `locationName:"volumeId" type:"string"` // The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for // Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes. - VolumeType *string `locationName:"volumeType" type:"string"` + VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` metadataVolume `json:"-" xml:"-"` } @@ -18790,6 +23081,16 @@ type metadataVolume struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Volume) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Volume) GoString() string { + return s.String() +} + // Describes volume attachment details. type VolumeAttachment struct { // The time stamp when the attachment initiated. @@ -18802,13 +23103,13 @@ type VolumeAttachment struct { Device *string `locationName:"device" type:"string"` // The ID of the instance. - InstanceID *string `locationName:"instanceId" type:"string"` + InstanceId *string `locationName:"instanceId" type:"string"` // The attachment state of the volume. - State *string `locationName:"status" type:"string"` + State *string `locationName:"status" type:"string" enum:"VolumeAttachmentState"` // The ID of the volume. - VolumeID *string `locationName:"volumeId" type:"string"` + VolumeId *string `locationName:"volumeId" type:"string"` metadataVolumeAttachment `json:"-" xml:"-"` } @@ -18817,6 +23118,16 @@ type metadataVolumeAttachment struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s VolumeAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeAttachment) GoString() string { + return s.String() +} + // Describes an EBS volume. type VolumeDetail struct { // The size of the volume, in GiB. @@ -18829,6 +23140,16 @@ type metadataVolumeDetail struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s VolumeDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeDetail) GoString() string { + return s.String() +} + // Describes a volume status operation code. type VolumeStatusAction struct { // The code identifying the operation, for example, enable-volume-io. @@ -18838,7 +23159,7 @@ type VolumeStatusAction struct { Description *string `locationName:"description" type:"string"` // The ID of the event associated with this operation. - EventID *string `locationName:"eventId" type:"string"` + EventId *string `locationName:"eventId" type:"string"` // The event type associated with this operation. EventType *string `locationName:"eventType" type:"string"` @@ -18850,10 +23171,20 @@ type metadataVolumeStatusAction struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s VolumeStatusAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeStatusAction) GoString() string { + return s.String() +} + // Describes a volume status. type VolumeStatusDetails struct { // The name of the volume status. - Name *string `locationName:"name" type:"string"` + Name *string `locationName:"name" type:"string" enum:"VolumeStatusName"` // The intended status of the volume status. Status *string `locationName:"status" type:"string"` @@ -18865,13 +23196,23 @@ type metadataVolumeStatusDetails struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s VolumeStatusDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeStatusDetails) GoString() string { + return s.String() +} + // Describes a volume status event. type VolumeStatusEvent struct { // A description of the event. Description *string `locationName:"description" type:"string"` // The ID of this event. - EventID *string `locationName:"eventId" type:"string"` + EventId *string `locationName:"eventId" type:"string"` // The type of this event. EventType *string `locationName:"eventType" type:"string"` @@ -18889,13 +23230,23 @@ type metadataVolumeStatusEvent struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s VolumeStatusEvent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeStatusEvent) GoString() string { + return s.String() +} + // Describes the status of a volume. type VolumeStatusInfo struct { // The details of the volume status. Details []*VolumeStatusDetails `locationName:"details" locationNameList:"item" type:"list"` // The status of the volume. - Status *string `locationName:"status" type:"string"` + Status *string `locationName:"status" type:"string" enum:"VolumeStatusInfoStatus"` metadataVolumeStatusInfo `json:"-" xml:"-"` } @@ -18904,6 +23255,16 @@ type metadataVolumeStatusInfo struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s VolumeStatusInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeStatusInfo) GoString() string { + return s.String() +} + // Describes the volume status. type VolumeStatusItem struct { // The details of the operation. @@ -18916,7 +23277,7 @@ type VolumeStatusItem struct { Events []*VolumeStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"` // The volume ID. - VolumeID *string `locationName:"volumeId" type:"string"` + VolumeId *string `locationName:"volumeId" type:"string"` // The volume status. VolumeStatus *VolumeStatusInfo `locationName:"volumeStatus" type:"structure"` @@ -18927,3 +23288,1283 @@ type VolumeStatusItem struct { type metadataVolumeStatusItem struct { SDKShapeTraits bool `type:"structure"` } + +// String returns the string representation +func (s VolumeStatusItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VolumeStatusItem) GoString() string { + return s.String() +} + +// Describes a VPC. +type Vpc struct { + // The CIDR block for the VPC. + CidrBlock *string `locationName:"cidrBlock" type:"string"` + + // The ID of the set of DHCP options you've associated with the VPC (or default + // if the default options are associated with the VPC). + DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"` + + // The allowed tenancy of instances launched into the VPC. + InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` + + // Indicates whether the VPC is the default VPC. + IsDefault *bool `locationName:"isDefault" type:"boolean"` + + // The current state of the VPC. + State *string `locationName:"state" type:"string" enum:"VpcState"` + + // Any tags assigned to the VPC. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` + + metadataVpc `json:"-" xml:"-"` +} + +type metadataVpc struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s Vpc) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Vpc) GoString() string { + return s.String() +} + +// Describes an attachment between a virtual private gateway and a VPC. +type VpcAttachment struct { + // The current state of the attachment. + State *string `locationName:"state" type:"string" enum:"AttachmentStatus"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` + + metadataVpcAttachment `json:"-" xml:"-"` +} + +type metadataVpcAttachment struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpcAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcAttachment) GoString() string { + return s.String() +} + +// Describes whether a VPC is enabled for ClassicLink. +type VpcClassicLink struct { + // Indicates whether the VPC is enabled for ClassicLink. + ClassicLinkEnabled *bool `locationName:"classicLinkEnabled" type:"boolean"` + + // Any tags assigned to the VPC. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` + + metadataVpcClassicLink `json:"-" xml:"-"` +} + +type metadataVpcClassicLink struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpcClassicLink) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcClassicLink) GoString() string { + return s.String() +} + +// Describes a VPC endpoint. +type VpcEndpoint struct { + // The date and time the VPC endpoint was created. + CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"` + + // The policy document associated with the endpoint. + PolicyDocument *string `locationName:"policyDocument" type:"string"` + + // One or more route tables associated with the endpoint. + RouteTableIds []*string `locationName:"routeTableIdSet" locationNameList:"item" type:"list"` + + // The name of the AWS service to which the endpoint is associated. + ServiceName *string `locationName:"serviceName" type:"string"` + + // The state of the VPC endpoint. + State *string `locationName:"state" type:"string" enum:"State"` + + // The ID of the VPC endpoint. + VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"` + + // The ID of the VPC to which the endpoint is associated. + VpcId *string `locationName:"vpcId" type:"string"` + + metadataVpcEndpoint `json:"-" xml:"-"` +} + +type metadataVpcEndpoint struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpcEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcEndpoint) GoString() string { + return s.String() +} + +// Describes a VPC peering connection. +type VpcPeeringConnection struct { + // The information of the peer VPC. + AccepterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"accepterVpcInfo" type:"structure"` + + // The time that an unaccepted VPC peering connection will expire. + ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp" timestampFormat:"iso8601"` + + // The information of the requester VPC. + RequesterVpcInfo *VpcPeeringConnectionVpcInfo `locationName:"requesterVpcInfo" type:"structure"` + + // The status of the VPC peering connection. + Status *VpcPeeringConnectionStateReason `locationName:"status" type:"structure"` + + // Any tags assigned to the resource. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the VPC peering connection. + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` + + metadataVpcPeeringConnection `json:"-" xml:"-"` +} + +type metadataVpcPeeringConnection struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpcPeeringConnection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcPeeringConnection) GoString() string { + return s.String() +} + +// Describes the status of a VPC peering connection. +type VpcPeeringConnectionStateReason struct { + // The status of the VPC peering connection. + Code *string `locationName:"code" type:"string" enum:"VpcPeeringConnectionStateReasonCode"` + + // A message that provides more information about the status, if applicable. + Message *string `locationName:"message" type:"string"` + + metadataVpcPeeringConnectionStateReason `json:"-" xml:"-"` +} + +type metadataVpcPeeringConnectionStateReason struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpcPeeringConnectionStateReason) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcPeeringConnectionStateReason) GoString() string { + return s.String() +} + +// Describes a VPC in a VPC peering connection. +type VpcPeeringConnectionVpcInfo struct { + // The CIDR block for the VPC. + CidrBlock *string `locationName:"cidrBlock" type:"string"` + + // The AWS account ID of the VPC owner. + OwnerId *string `locationName:"ownerId" type:"string"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` + + metadataVpcPeeringConnectionVpcInfo `json:"-" xml:"-"` +} + +type metadataVpcPeeringConnectionVpcInfo struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpcPeeringConnectionVpcInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcPeeringConnectionVpcInfo) GoString() string { + return s.String() +} + +// Describes a VPN connection. +type VpnConnection struct { + // The configuration information for the VPN connection's customer gateway (in + // the native XML format). This element is always present in the CreateVpnConnection + // response; however, it's present in the DescribeVpnConnections response only + // if the VPN connection is in the pending or available state. + CustomerGatewayConfiguration *string `locationName:"customerGatewayConfiguration" type:"string"` + + // The ID of the customer gateway at your end of the VPN connection. + CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"` + + // The VPN connection options. + Options *VpnConnectionOptions `locationName:"options" type:"structure"` + + // The static routes associated with the VPN connection. + Routes []*VpnStaticRoute `locationName:"routes" locationNameList:"item" type:"list"` + + // The current state of the VPN connection. + State *string `locationName:"state" type:"string" enum:"VpnState"` + + // Any tags assigned to the VPN connection. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The type of VPN connection. + Type *string `locationName:"type" type:"string" enum:"GatewayType"` + + // Information about the VPN tunnel. + VgwTelemetry []*VgwTelemetry `locationName:"vgwTelemetry" locationNameList:"item" type:"list"` + + // The ID of the VPN connection. + VpnConnectionId *string `locationName:"vpnConnectionId" type:"string"` + + // The ID of the virtual private gateway at the AWS side of the VPN connection. + VpnGatewayId *string `locationName:"vpnGatewayId" type:"string"` + + metadataVpnConnection `json:"-" xml:"-"` +} + +type metadataVpnConnection struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpnConnection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpnConnection) GoString() string { + return s.String() +} + +// Describes VPN connection options. +type VpnConnectionOptions struct { + // Indicates whether the VPN connection uses static routes only. Static routes + // must be used for devices that don't support BGP. + StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` + + metadataVpnConnectionOptions `json:"-" xml:"-"` +} + +type metadataVpnConnectionOptions struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpnConnectionOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpnConnectionOptions) GoString() string { + return s.String() +} + +// Describes VPN connection options. +type VpnConnectionOptionsSpecification struct { + // Indicates whether the VPN connection uses static routes only. Static routes + // must be used for devices that don't support BGP. + StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"` + + metadataVpnConnectionOptionsSpecification `json:"-" xml:"-"` +} + +type metadataVpnConnectionOptionsSpecification struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpnConnectionOptionsSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpnConnectionOptionsSpecification) GoString() string { + return s.String() +} + +// Describes a virtual private gateway. +type VpnGateway struct { + // The Availability Zone where the virtual private gateway was created. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The current state of the virtual private gateway. + State *string `locationName:"state" type:"string" enum:"VpnState"` + + // Any tags assigned to the virtual private gateway. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The type of VPN connection the virtual private gateway supports. + Type *string `locationName:"type" type:"string" enum:"GatewayType"` + + // Any VPCs attached to the virtual private gateway. + VpcAttachments []*VpcAttachment `locationName:"attachments" locationNameList:"item" type:"list"` + + // The ID of the virtual private gateway. + VpnGatewayId *string `locationName:"vpnGatewayId" type:"string"` + + metadataVpnGateway `json:"-" xml:"-"` +} + +type metadataVpnGateway struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpnGateway) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpnGateway) GoString() string { + return s.String() +} + +// Describes a static route for a VPN connection. +type VpnStaticRoute struct { + // The CIDR block associated with the local subnet of the customer data center. + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` + + // Indicates how the routes were provided. + Source *string `locationName:"source" type:"string" enum:"VpnStaticRouteSource"` + + // The current state of the static route. + State *string `locationName:"state" type:"string" enum:"VpnState"` + + metadataVpnStaticRoute `json:"-" xml:"-"` +} + +type metadataVpnStaticRoute struct { + SDKShapeTraits bool `type:"structure"` +} + +// String returns the string representation +func (s VpnStaticRoute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpnStaticRoute) GoString() string { + return s.String() +} + +const ( + // @enum AccountAttributeName + AccountAttributeNameSupportedPlatforms = "supported-platforms" + // @enum AccountAttributeName + AccountAttributeNameDefaultVpc = "default-vpc" +) + +const ( + // @enum AllocationStrategy + AllocationStrategyLowestPrice = "lowestPrice" + // @enum AllocationStrategy + AllocationStrategyDiversified = "diversified" +) + +const ( + // @enum ArchitectureValues + ArchitectureValuesI386 = "i386" + // @enum ArchitectureValues + ArchitectureValuesX8664 = "x86_64" +) + +const ( + // @enum AttachmentStatus + AttachmentStatusAttaching = "attaching" + // @enum AttachmentStatus + AttachmentStatusAttached = "attached" + // @enum AttachmentStatus + AttachmentStatusDetaching = "detaching" + // @enum AttachmentStatus + AttachmentStatusDetached = "detached" +) + +const ( + // @enum AvailabilityZoneState + AvailabilityZoneStateAvailable = "available" +) + +const ( + // @enum BatchState + BatchStateSubmitted = "submitted" + // @enum BatchState + BatchStateActive = "active" + // @enum BatchState + BatchStateCancelled = "cancelled" + // @enum BatchState + BatchStateFailed = "failed" + // @enum BatchState + BatchStateCancelledRunning = "cancelled_running" + // @enum BatchState + BatchStateCancelledTerminating = "cancelled_terminating" +) + +const ( + // @enum BundleTaskState + BundleTaskStatePending = "pending" + // @enum BundleTaskState + BundleTaskStateWaitingForShutdown = "waiting-for-shutdown" + // @enum BundleTaskState + BundleTaskStateBundling = "bundling" + // @enum BundleTaskState + BundleTaskStateStoring = "storing" + // @enum BundleTaskState + BundleTaskStateCancelling = "cancelling" + // @enum BundleTaskState + BundleTaskStateComplete = "complete" + // @enum BundleTaskState + BundleTaskStateFailed = "failed" +) + +const ( + // @enum CancelBatchErrorCode + CancelBatchErrorCodeFleetRequestIdDoesNotExist = "fleetRequestIdDoesNotExist" + // @enum CancelBatchErrorCode + CancelBatchErrorCodeFleetRequestIdMalformed = "fleetRequestIdMalformed" + // @enum CancelBatchErrorCode + CancelBatchErrorCodeFleetRequestNotInCancellableState = "fleetRequestNotInCancellableState" + // @enum CancelBatchErrorCode + CancelBatchErrorCodeUnexpectedError = "unexpectedError" +) + +const ( + // @enum CancelSpotInstanceRequestState + CancelSpotInstanceRequestStateActive = "active" + // @enum CancelSpotInstanceRequestState + CancelSpotInstanceRequestStateOpen = "open" + // @enum CancelSpotInstanceRequestState + CancelSpotInstanceRequestStateClosed = "closed" + // @enum CancelSpotInstanceRequestState + CancelSpotInstanceRequestStateCancelled = "cancelled" + // @enum CancelSpotInstanceRequestState + CancelSpotInstanceRequestStateCompleted = "completed" +) + +const ( + // @enum ContainerFormat + ContainerFormatOva = "ova" +) + +const ( + // @enum ConversionTaskState + ConversionTaskStateActive = "active" + // @enum ConversionTaskState + ConversionTaskStateCancelling = "cancelling" + // @enum ConversionTaskState + ConversionTaskStateCancelled = "cancelled" + // @enum ConversionTaskState + ConversionTaskStateCompleted = "completed" +) + +const ( + // @enum CurrencyCodeValues + CurrencyCodeValuesUsd = "USD" +) + +const ( + // @enum DatafeedSubscriptionState + DatafeedSubscriptionStateActive = "Active" + // @enum DatafeedSubscriptionState + DatafeedSubscriptionStateInactive = "Inactive" +) + +const ( + // @enum DeviceType + DeviceTypeEbs = "ebs" + // @enum DeviceType + DeviceTypeInstanceStore = "instance-store" +) + +const ( + // @enum DiskImageFormat + DiskImageFormatVmdk = "VMDK" + // @enum DiskImageFormat + DiskImageFormatRaw = "RAW" + // @enum DiskImageFormat + DiskImageFormatVhd = "VHD" +) + +const ( + // @enum DomainType + DomainTypeVpc = "vpc" + // @enum DomainType + DomainTypeStandard = "standard" +) + +const ( + // @enum EventCode + EventCodeInstanceReboot = "instance-reboot" + // @enum EventCode + EventCodeSystemReboot = "system-reboot" + // @enum EventCode + EventCodeSystemMaintenance = "system-maintenance" + // @enum EventCode + EventCodeInstanceRetirement = "instance-retirement" + // @enum EventCode + EventCodeInstanceStop = "instance-stop" +) + +const ( + // @enum EventType + EventTypeInstanceChange = "instanceChange" + // @enum EventType + EventTypeFleetRequestChange = "fleetRequestChange" + // @enum EventType + EventTypeError = "error" +) + +const ( + // @enum ExportEnvironment + ExportEnvironmentCitrix = "citrix" + // @enum ExportEnvironment + ExportEnvironmentVmware = "vmware" + // @enum ExportEnvironment + ExportEnvironmentMicrosoft = "microsoft" +) + +const ( + // @enum ExportTaskState + ExportTaskStateActive = "active" + // @enum ExportTaskState + ExportTaskStateCancelling = "cancelling" + // @enum ExportTaskState + ExportTaskStateCancelled = "cancelled" + // @enum ExportTaskState + ExportTaskStateCompleted = "completed" +) + +const ( + // @enum FlowLogsResourceType + FlowLogsResourceTypeVpc = "VPC" + // @enum FlowLogsResourceType + FlowLogsResourceTypeSubnet = "Subnet" + // @enum FlowLogsResourceType + FlowLogsResourceTypeNetworkInterface = "NetworkInterface" +) + +const ( + // @enum GatewayType + GatewayTypeIpsec1 = "ipsec.1" +) + +const ( + // @enum HypervisorType + HypervisorTypeOvm = "ovm" + // @enum HypervisorType + HypervisorTypeXen = "xen" +) + +const ( + // @enum ImageAttributeName + ImageAttributeNameDescription = "description" + // @enum ImageAttributeName + ImageAttributeNameKernel = "kernel" + // @enum ImageAttributeName + ImageAttributeNameRamdisk = "ramdisk" + // @enum ImageAttributeName + ImageAttributeNameLaunchPermission = "launchPermission" + // @enum ImageAttributeName + ImageAttributeNameProductCodes = "productCodes" + // @enum ImageAttributeName + ImageAttributeNameBlockDeviceMapping = "blockDeviceMapping" + // @enum ImageAttributeName + ImageAttributeNameSriovNetSupport = "sriovNetSupport" +) + +const ( + // @enum ImageState + ImageStatePending = "pending" + // @enum ImageState + ImageStateAvailable = "available" + // @enum ImageState + ImageStateInvalid = "invalid" + // @enum ImageState + ImageStateDeregistered = "deregistered" + // @enum ImageState + ImageStateTransient = "transient" + // @enum ImageState + ImageStateFailed = "failed" + // @enum ImageState + ImageStateError = "error" +) + +const ( + // @enum ImageTypeValues + ImageTypeValuesMachine = "machine" + // @enum ImageTypeValues + ImageTypeValuesKernel = "kernel" + // @enum ImageTypeValues + ImageTypeValuesRamdisk = "ramdisk" +) + +const ( + // @enum InstanceAttributeName + InstanceAttributeNameInstanceType = "instanceType" + // @enum InstanceAttributeName + InstanceAttributeNameKernel = "kernel" + // @enum InstanceAttributeName + InstanceAttributeNameRamdisk = "ramdisk" + // @enum InstanceAttributeName + InstanceAttributeNameUserData = "userData" + // @enum InstanceAttributeName + InstanceAttributeNameDisableApiTermination = "disableApiTermination" + // @enum InstanceAttributeName + InstanceAttributeNameInstanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior" + // @enum InstanceAttributeName + InstanceAttributeNameRootDeviceName = "rootDeviceName" + // @enum InstanceAttributeName + InstanceAttributeNameBlockDeviceMapping = "blockDeviceMapping" + // @enum InstanceAttributeName + InstanceAttributeNameProductCodes = "productCodes" + // @enum InstanceAttributeName + InstanceAttributeNameSourceDestCheck = "sourceDestCheck" + // @enum InstanceAttributeName + InstanceAttributeNameGroupSet = "groupSet" + // @enum InstanceAttributeName + InstanceAttributeNameEbsOptimized = "ebsOptimized" + // @enum InstanceAttributeName + InstanceAttributeNameSriovNetSupport = "sriovNetSupport" +) + +const ( + // @enum InstanceLifecycleType + InstanceLifecycleTypeSpot = "spot" +) + +const ( + // @enum InstanceStateName + InstanceStateNamePending = "pending" + // @enum InstanceStateName + InstanceStateNameRunning = "running" + // @enum InstanceStateName + InstanceStateNameShuttingDown = "shutting-down" + // @enum InstanceStateName + InstanceStateNameTerminated = "terminated" + // @enum InstanceStateName + InstanceStateNameStopping = "stopping" + // @enum InstanceStateName + InstanceStateNameStopped = "stopped" +) + +const ( + // @enum InstanceType + InstanceTypeT1Micro = "t1.micro" + // @enum InstanceType + InstanceTypeM1Small = "m1.small" + // @enum InstanceType + InstanceTypeM1Medium = "m1.medium" + // @enum InstanceType + InstanceTypeM1Large = "m1.large" + // @enum InstanceType + InstanceTypeM1Xlarge = "m1.xlarge" + // @enum InstanceType + InstanceTypeM3Medium = "m3.medium" + // @enum InstanceType + InstanceTypeM3Large = "m3.large" + // @enum InstanceType + InstanceTypeM3Xlarge = "m3.xlarge" + // @enum InstanceType + InstanceTypeM32xlarge = "m3.2xlarge" + // @enum InstanceType + InstanceTypeM4Large = "m4.large" + // @enum InstanceType + InstanceTypeM4Xlarge = "m4.xlarge" + // @enum InstanceType + InstanceTypeM42xlarge = "m4.2xlarge" + // @enum InstanceType + InstanceTypeM44xlarge = "m4.4xlarge" + // @enum InstanceType + InstanceTypeM410xlarge = "m4.10xlarge" + // @enum InstanceType + InstanceTypeT2Micro = "t2.micro" + // @enum InstanceType + InstanceTypeT2Small = "t2.small" + // @enum InstanceType + InstanceTypeT2Medium = "t2.medium" + // @enum InstanceType + InstanceTypeT2Large = "t2.large" + // @enum InstanceType + InstanceTypeM2Xlarge = "m2.xlarge" + // @enum InstanceType + InstanceTypeM22xlarge = "m2.2xlarge" + // @enum InstanceType + InstanceTypeM24xlarge = "m2.4xlarge" + // @enum InstanceType + InstanceTypeCr18xlarge = "cr1.8xlarge" + // @enum InstanceType + InstanceTypeI2Xlarge = "i2.xlarge" + // @enum InstanceType + InstanceTypeI22xlarge = "i2.2xlarge" + // @enum InstanceType + InstanceTypeI24xlarge = "i2.4xlarge" + // @enum InstanceType + InstanceTypeI28xlarge = "i2.8xlarge" + // @enum InstanceType + InstanceTypeHi14xlarge = "hi1.4xlarge" + // @enum InstanceType + InstanceTypeHs18xlarge = "hs1.8xlarge" + // @enum InstanceType + InstanceTypeC1Medium = "c1.medium" + // @enum InstanceType + InstanceTypeC1Xlarge = "c1.xlarge" + // @enum InstanceType + InstanceTypeC3Large = "c3.large" + // @enum InstanceType + InstanceTypeC3Xlarge = "c3.xlarge" + // @enum InstanceType + InstanceTypeC32xlarge = "c3.2xlarge" + // @enum InstanceType + InstanceTypeC34xlarge = "c3.4xlarge" + // @enum InstanceType + InstanceTypeC38xlarge = "c3.8xlarge" + // @enum InstanceType + InstanceTypeC4Large = "c4.large" + // @enum InstanceType + InstanceTypeC4Xlarge = "c4.xlarge" + // @enum InstanceType + InstanceTypeC42xlarge = "c4.2xlarge" + // @enum InstanceType + InstanceTypeC44xlarge = "c4.4xlarge" + // @enum InstanceType + InstanceTypeC48xlarge = "c4.8xlarge" + // @enum InstanceType + InstanceTypeCc14xlarge = "cc1.4xlarge" + // @enum InstanceType + InstanceTypeCc28xlarge = "cc2.8xlarge" + // @enum InstanceType + InstanceTypeG22xlarge = "g2.2xlarge" + // @enum InstanceType + InstanceTypeCg14xlarge = "cg1.4xlarge" + // @enum InstanceType + InstanceTypeR3Large = "r3.large" + // @enum InstanceType + InstanceTypeR3Xlarge = "r3.xlarge" + // @enum InstanceType + InstanceTypeR32xlarge = "r3.2xlarge" + // @enum InstanceType + InstanceTypeR34xlarge = "r3.4xlarge" + // @enum InstanceType + InstanceTypeR38xlarge = "r3.8xlarge" + // @enum InstanceType + InstanceTypeD2Xlarge = "d2.xlarge" + // @enum InstanceType + InstanceTypeD22xlarge = "d2.2xlarge" + // @enum InstanceType + InstanceTypeD24xlarge = "d2.4xlarge" + // @enum InstanceType + InstanceTypeD28xlarge = "d2.8xlarge" +) + +const ( + // @enum ListingState + ListingStateAvailable = "available" + // @enum ListingState + ListingStateSold = "sold" + // @enum ListingState + ListingStateCancelled = "cancelled" + // @enum ListingState + ListingStatePending = "pending" +) + +const ( + // @enum ListingStatus + ListingStatusActive = "active" + // @enum ListingStatus + ListingStatusPending = "pending" + // @enum ListingStatus + ListingStatusCancelled = "cancelled" + // @enum ListingStatus + ListingStatusClosed = "closed" +) + +const ( + // @enum MonitoringState + MonitoringStateDisabled = "disabled" + // @enum MonitoringState + MonitoringStateDisabling = "disabling" + // @enum MonitoringState + MonitoringStateEnabled = "enabled" + // @enum MonitoringState + MonitoringStatePending = "pending" +) + +const ( + // @enum MoveStatus + MoveStatusMovingToVpc = "movingToVpc" + // @enum MoveStatus + MoveStatusRestoringToClassic = "restoringToClassic" +) + +const ( + // @enum NetworkInterfaceAttribute + NetworkInterfaceAttributeDescription = "description" + // @enum NetworkInterfaceAttribute + NetworkInterfaceAttributeGroupSet = "groupSet" + // @enum NetworkInterfaceAttribute + NetworkInterfaceAttributeSourceDestCheck = "sourceDestCheck" + // @enum NetworkInterfaceAttribute + NetworkInterfaceAttributeAttachment = "attachment" +) + +const ( + // @enum NetworkInterfaceStatus + NetworkInterfaceStatusAvailable = "available" + // @enum NetworkInterfaceStatus + NetworkInterfaceStatusAttaching = "attaching" + // @enum NetworkInterfaceStatus + NetworkInterfaceStatusInUse = "in-use" + // @enum NetworkInterfaceStatus + NetworkInterfaceStatusDetaching = "detaching" +) + +const ( + // @enum OfferingTypeValues + OfferingTypeValuesHeavyUtilization = "Heavy Utilization" + // @enum OfferingTypeValues + OfferingTypeValuesMediumUtilization = "Medium Utilization" + // @enum OfferingTypeValues + OfferingTypeValuesLightUtilization = "Light Utilization" + // @enum OfferingTypeValues + OfferingTypeValuesNoUpfront = "No Upfront" + // @enum OfferingTypeValues + OfferingTypeValuesPartialUpfront = "Partial Upfront" + // @enum OfferingTypeValues + OfferingTypeValuesAllUpfront = "All Upfront" +) + +const ( + // @enum OperationType + OperationTypeAdd = "add" + // @enum OperationType + OperationTypeRemove = "remove" +) + +const ( + // @enum PermissionGroup + PermissionGroupAll = "all" +) + +const ( + // @enum PlacementGroupState + PlacementGroupStatePending = "pending" + // @enum PlacementGroupState + PlacementGroupStateAvailable = "available" + // @enum PlacementGroupState + PlacementGroupStateDeleting = "deleting" + // @enum PlacementGroupState + PlacementGroupStateDeleted = "deleted" +) + +const ( + // @enum PlacementStrategy + PlacementStrategyCluster = "cluster" +) + +const ( + // @enum PlatformValues + PlatformValuesWindows = "Windows" +) + +const ( + // @enum ProductCodeValues + ProductCodeValuesDevpay = "devpay" + // @enum ProductCodeValues + ProductCodeValuesMarketplace = "marketplace" +) + +const ( + // @enum RIProductDescription + RIProductDescriptionLinuxUnix = "Linux/UNIX" + // @enum RIProductDescription + RIProductDescriptionLinuxUnixamazonVpc = "Linux/UNIX (Amazon VPC)" + // @enum RIProductDescription + RIProductDescriptionWindows = "Windows" + // @enum RIProductDescription + RIProductDescriptionWindowsAmazonVpc = "Windows (Amazon VPC)" +) + +const ( + // @enum RecurringChargeFrequency + RecurringChargeFrequencyHourly = "Hourly" +) + +const ( + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesInstanceStuckInState = "instance-stuck-in-state" + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesUnresponsive = "unresponsive" + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesNotAcceptingCredentials = "not-accepting-credentials" + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesPasswordNotAvailable = "password-not-available" + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesPerformanceNetwork = "performance-network" + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesPerformanceInstanceStore = "performance-instance-store" + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesPerformanceEbsVolume = "performance-ebs-volume" + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesPerformanceOther = "performance-other" + // @enum ReportInstanceReasonCodes + ReportInstanceReasonCodesOther = "other" +) + +const ( + // @enum ReportStatusType + ReportStatusTypeOk = "ok" + // @enum ReportStatusType + ReportStatusTypeImpaired = "impaired" +) + +const ( + // @enum ReservedInstanceState + ReservedInstanceStatePaymentPending = "payment-pending" + // @enum ReservedInstanceState + ReservedInstanceStateActive = "active" + // @enum ReservedInstanceState + ReservedInstanceStatePaymentFailed = "payment-failed" + // @enum ReservedInstanceState + ReservedInstanceStateRetired = "retired" +) + +const ( + // @enum ResetImageAttributeName + ResetImageAttributeNameLaunchPermission = "launchPermission" +) + +const ( + // @enum ResourceType + ResourceTypeCustomerGateway = "customer-gateway" + // @enum ResourceType + ResourceTypeDhcpOptions = "dhcp-options" + // @enum ResourceType + ResourceTypeImage = "image" + // @enum ResourceType + ResourceTypeInstance = "instance" + // @enum ResourceType + ResourceTypeInternetGateway = "internet-gateway" + // @enum ResourceType + ResourceTypeNetworkAcl = "network-acl" + // @enum ResourceType + ResourceTypeNetworkInterface = "network-interface" + // @enum ResourceType + ResourceTypeReservedInstances = "reserved-instances" + // @enum ResourceType + ResourceTypeRouteTable = "route-table" + // @enum ResourceType + ResourceTypeSnapshot = "snapshot" + // @enum ResourceType + ResourceTypeSpotInstancesRequest = "spot-instances-request" + // @enum ResourceType + ResourceTypeSubnet = "subnet" + // @enum ResourceType + ResourceTypeSecurityGroup = "security-group" + // @enum ResourceType + ResourceTypeVolume = "volume" + // @enum ResourceType + ResourceTypeVpc = "vpc" + // @enum ResourceType + ResourceTypeVpnConnection = "vpn-connection" + // @enum ResourceType + ResourceTypeVpnGateway = "vpn-gateway" +) + +const ( + // @enum RouteOrigin + RouteOriginCreateRouteTable = "CreateRouteTable" + // @enum RouteOrigin + RouteOriginCreateRoute = "CreateRoute" + // @enum RouteOrigin + RouteOriginEnableVgwRoutePropagation = "EnableVgwRoutePropagation" +) + +const ( + // @enum RouteState + RouteStateActive = "active" + // @enum RouteState + RouteStateBlackhole = "blackhole" +) + +const ( + // @enum RuleAction + RuleActionAllow = "allow" + // @enum RuleAction + RuleActionDeny = "deny" +) + +const ( + // @enum ShutdownBehavior + ShutdownBehaviorStop = "stop" + // @enum ShutdownBehavior + ShutdownBehaviorTerminate = "terminate" +) + +const ( + // @enum SnapshotAttributeName + SnapshotAttributeNameProductCodes = "productCodes" + // @enum SnapshotAttributeName + SnapshotAttributeNameCreateVolumePermission = "createVolumePermission" +) + +const ( + // @enum SnapshotState + SnapshotStatePending = "pending" + // @enum SnapshotState + SnapshotStateCompleted = "completed" + // @enum SnapshotState + SnapshotStateError = "error" +) + +const ( + // @enum SpotInstanceState + SpotInstanceStateOpen = "open" + // @enum SpotInstanceState + SpotInstanceStateActive = "active" + // @enum SpotInstanceState + SpotInstanceStateClosed = "closed" + // @enum SpotInstanceState + SpotInstanceStateCancelled = "cancelled" + // @enum SpotInstanceState + SpotInstanceStateFailed = "failed" +) + +const ( + // @enum SpotInstanceType + SpotInstanceTypeOneTime = "one-time" + // @enum SpotInstanceType + SpotInstanceTypePersistent = "persistent" +) + +const ( + // @enum State + StatePending = "Pending" + // @enum State + StateAvailable = "Available" + // @enum State + StateDeleting = "Deleting" + // @enum State + StateDeleted = "Deleted" +) + +const ( + // @enum Status + StatusMoveInProgress = "MoveInProgress" + // @enum Status + StatusInVpc = "InVpc" + // @enum Status + StatusInClassic = "InClassic" +) + +const ( + // @enum StatusName + StatusNameReachability = "reachability" +) + +const ( + // @enum StatusType + StatusTypePassed = "passed" + // @enum StatusType + StatusTypeFailed = "failed" + // @enum StatusType + StatusTypeInsufficientData = "insufficient-data" + // @enum StatusType + StatusTypeInitializing = "initializing" +) + +const ( + // @enum SubnetState + SubnetStatePending = "pending" + // @enum SubnetState + SubnetStateAvailable = "available" +) + +const ( + // @enum SummaryStatus + SummaryStatusOk = "ok" + // @enum SummaryStatus + SummaryStatusImpaired = "impaired" + // @enum SummaryStatus + SummaryStatusInsufficientData = "insufficient-data" + // @enum SummaryStatus + SummaryStatusNotApplicable = "not-applicable" + // @enum SummaryStatus + SummaryStatusInitializing = "initializing" +) + +const ( + // @enum TelemetryStatus + TelemetryStatusUp = "UP" + // @enum TelemetryStatus + TelemetryStatusDown = "DOWN" +) + +const ( + // @enum Tenancy + TenancyDefault = "default" + // @enum Tenancy + TenancyDedicated = "dedicated" +) + +const ( + // @enum TrafficType + TrafficTypeAccept = "ACCEPT" + // @enum TrafficType + TrafficTypeReject = "REJECT" + // @enum TrafficType + TrafficTypeAll = "ALL" +) + +const ( + // @enum VirtualizationType + VirtualizationTypeHvm = "hvm" + // @enum VirtualizationType + VirtualizationTypeParavirtual = "paravirtual" +) + +const ( + // @enum VolumeAttachmentState + VolumeAttachmentStateAttaching = "attaching" + // @enum VolumeAttachmentState + VolumeAttachmentStateAttached = "attached" + // @enum VolumeAttachmentState + VolumeAttachmentStateDetaching = "detaching" + // @enum VolumeAttachmentState + VolumeAttachmentStateDetached = "detached" +) + +const ( + // @enum VolumeAttributeName + VolumeAttributeNameAutoEnableIo = "autoEnableIO" + // @enum VolumeAttributeName + VolumeAttributeNameProductCodes = "productCodes" +) + +const ( + // @enum VolumeState + VolumeStateCreating = "creating" + // @enum VolumeState + VolumeStateAvailable = "available" + // @enum VolumeState + VolumeStateInUse = "in-use" + // @enum VolumeState + VolumeStateDeleting = "deleting" + // @enum VolumeState + VolumeStateDeleted = "deleted" + // @enum VolumeState + VolumeStateError = "error" +) + +const ( + // @enum VolumeStatusInfoStatus + VolumeStatusInfoStatusOk = "ok" + // @enum VolumeStatusInfoStatus + VolumeStatusInfoStatusImpaired = "impaired" + // @enum VolumeStatusInfoStatus + VolumeStatusInfoStatusInsufficientData = "insufficient-data" +) + +const ( + // @enum VolumeStatusName + VolumeStatusNameIoEnabled = "io-enabled" + // @enum VolumeStatusName + VolumeStatusNameIoPerformance = "io-performance" +) + +const ( + // @enum VolumeType + VolumeTypeStandard = "standard" + // @enum VolumeType + VolumeTypeIo1 = "io1" + // @enum VolumeType + VolumeTypeGp2 = "gp2" +) + +const ( + // @enum VpcAttributeName + VpcAttributeNameEnableDnsSupport = "enableDnsSupport" + // @enum VpcAttributeName + VpcAttributeNameEnableDnsHostnames = "enableDnsHostnames" +) + +const ( + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodeInitiatingRequest = "initiating-request" + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodePendingAcceptance = "pending-acceptance" + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodeActive = "active" + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodeDeleted = "deleted" + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodeRejected = "rejected" + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodeFailed = "failed" + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodeExpired = "expired" + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodeProvisioning = "provisioning" + // @enum VpcPeeringConnectionStateReasonCode + VpcPeeringConnectionStateReasonCodeDeleting = "deleting" +) + +const ( + // @enum VpcState + VpcStatePending = "pending" + // @enum VpcState + VpcStateAvailable = "available" +) + +const ( + // @enum VpnState + VpnStatePending = "pending" + // @enum VpnState + VpnStateAvailable = "available" + // @enum VpnState + VpnStateDeleting = "deleting" + // @enum VpnState + VpnStateDeleted = "deleted" +) + +const ( + // @enum VpnStaticRouteSource + VpnStaticRouteSourceStatic = "Static" +) diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go index f080166e03a..99f0820477e 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go @@ -3,19 +3,19 @@ package ec2 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" ) func init() { - initRequest = func(r *aws.Request) { - if r.Operation == opCopySnapshot { // fill the PresignedURL parameter + initRequest = func(r *request.Request) { + if r.Operation.Name == opCopySnapshot { // fill the PresignedURL parameter r.Handlers.Build.PushFront(fillPresignedURL) } } } -func fillPresignedURL(r *aws.Request) { +func fillPresignedURL(r *request.Request) { if !r.ParamsFilled() { return } @@ -23,7 +23,7 @@ func fillPresignedURL(r *aws.Request) { params := r.Params.(*CopySnapshotInput) // Stop if PresignedURL/DestinationRegion is set - if params.PresignedURL != nil || params.DestinationRegion != nil { + if params.PresignedUrl != nil || params.DestinationRegion != nil { return } @@ -33,16 +33,16 @@ func fillPresignedURL(r *aws.Request) { // Set destination region. Avoids infinite handler loop. // Also needed to sign sub-request. - params.DestinationRegion = &r.Service.Config.Region + params.DestinationRegion = r.Service.Config.Region // Create a new client pointing at source region. // We will use this to presign the CopySnapshot request against // the source region - config := r.Service.Config.Copy() + config := r.Service.Config.Copy(). + WithEndpoint(""). + WithRegion(*params.SourceRegion) - config.Endpoint = "" - config.Region = *params.SourceRegion - client := New(&config) + client := New(config) // Presign a CopySnapshot request with modified params req, _ := client.CopySnapshotRequest(params) @@ -53,5 +53,5 @@ func fillPresignedURL(r *aws.Request) { } // We have our URL, set it on params - params.PresignedURL = &url + params.PresignedUrl = &url } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go index 24956345a23..38617b1ffee 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go @@ -14,7 +14,7 @@ import ( var _ = unit.Imported func TestCopySnapshotPresignedURL(t *testing.T) { - svc := ec2.New(&aws.Config{Region: "us-west-2"}) + svc := ec2.New(&aws.Config{Region: aws.String("us-west-2")}) assert.NotPanics(t, func() { // Doesn't panic on nil input @@ -24,7 +24,7 @@ func TestCopySnapshotPresignedURL(t *testing.T) { req, _ := svc.CopySnapshotRequest(&ec2.CopySnapshotInput{ SourceRegion: aws.String("us-west-1"), - SourceSnapshotID: aws.String("snap-id"), + SourceSnapshotId: aws.String("snap-id"), }) req.Sign() 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 aa2b112c5a7..e10a2aa1f8b 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 @@ -4,366 +4,753 @@ package ec2iface import ( + "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/service/ec2" ) // EC2API is the interface type for ec2.EC2. type EC2API interface { - AcceptVPCPeeringConnection(*ec2.AcceptVPCPeeringConnectionInput) (*ec2.AcceptVPCPeeringConnectionOutput, error) + AcceptVpcPeeringConnectionRequest(*ec2.AcceptVpcPeeringConnectionInput) (*request.Request, *ec2.AcceptVpcPeeringConnectionOutput) + + AcceptVpcPeeringConnection(*ec2.AcceptVpcPeeringConnectionInput) (*ec2.AcceptVpcPeeringConnectionOutput, error) + + AllocateAddressRequest(*ec2.AllocateAddressInput) (*request.Request, *ec2.AllocateAddressOutput) AllocateAddress(*ec2.AllocateAddressInput) (*ec2.AllocateAddressOutput, error) - AssignPrivateIPAddresses(*ec2.AssignPrivateIPAddressesInput) (*ec2.AssignPrivateIPAddressesOutput, error) + AssignPrivateIpAddressesRequest(*ec2.AssignPrivateIpAddressesInput) (*request.Request, *ec2.AssignPrivateIpAddressesOutput) + + AssignPrivateIpAddresses(*ec2.AssignPrivateIpAddressesInput) (*ec2.AssignPrivateIpAddressesOutput, error) + + AssociateAddressRequest(*ec2.AssociateAddressInput) (*request.Request, *ec2.AssociateAddressOutput) AssociateAddress(*ec2.AssociateAddressInput) (*ec2.AssociateAddressOutput, error) - AssociateDHCPOptions(*ec2.AssociateDHCPOptionsInput) (*ec2.AssociateDHCPOptionsOutput, error) + AssociateDhcpOptionsRequest(*ec2.AssociateDhcpOptionsInput) (*request.Request, *ec2.AssociateDhcpOptionsOutput) + + AssociateDhcpOptions(*ec2.AssociateDhcpOptionsInput) (*ec2.AssociateDhcpOptionsOutput, error) + + AssociateRouteTableRequest(*ec2.AssociateRouteTableInput) (*request.Request, *ec2.AssociateRouteTableOutput) AssociateRouteTable(*ec2.AssociateRouteTableInput) (*ec2.AssociateRouteTableOutput, error) - AttachClassicLinkVPC(*ec2.AttachClassicLinkVPCInput) (*ec2.AttachClassicLinkVPCOutput, error) + AttachClassicLinkVpcRequest(*ec2.AttachClassicLinkVpcInput) (*request.Request, *ec2.AttachClassicLinkVpcOutput) + + AttachClassicLinkVpc(*ec2.AttachClassicLinkVpcInput) (*ec2.AttachClassicLinkVpcOutput, error) + + AttachInternetGatewayRequest(*ec2.AttachInternetGatewayInput) (*request.Request, *ec2.AttachInternetGatewayOutput) AttachInternetGateway(*ec2.AttachInternetGatewayInput) (*ec2.AttachInternetGatewayOutput, error) + AttachNetworkInterfaceRequest(*ec2.AttachNetworkInterfaceInput) (*request.Request, *ec2.AttachNetworkInterfaceOutput) + AttachNetworkInterface(*ec2.AttachNetworkInterfaceInput) (*ec2.AttachNetworkInterfaceOutput, error) - AttachVPNGateway(*ec2.AttachVPNGatewayInput) (*ec2.AttachVPNGatewayOutput, error) + AttachVolumeRequest(*ec2.AttachVolumeInput) (*request.Request, *ec2.VolumeAttachment) AttachVolume(*ec2.AttachVolumeInput) (*ec2.VolumeAttachment, error) + AttachVpnGatewayRequest(*ec2.AttachVpnGatewayInput) (*request.Request, *ec2.AttachVpnGatewayOutput) + + AttachVpnGateway(*ec2.AttachVpnGatewayInput) (*ec2.AttachVpnGatewayOutput, error) + + AuthorizeSecurityGroupEgressRequest(*ec2.AuthorizeSecurityGroupEgressInput) (*request.Request, *ec2.AuthorizeSecurityGroupEgressOutput) + AuthorizeSecurityGroupEgress(*ec2.AuthorizeSecurityGroupEgressInput) (*ec2.AuthorizeSecurityGroupEgressOutput, error) + AuthorizeSecurityGroupIngressRequest(*ec2.AuthorizeSecurityGroupIngressInput) (*request.Request, *ec2.AuthorizeSecurityGroupIngressOutput) + AuthorizeSecurityGroupIngress(*ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error) + BundleInstanceRequest(*ec2.BundleInstanceInput) (*request.Request, *ec2.BundleInstanceOutput) + BundleInstance(*ec2.BundleInstanceInput) (*ec2.BundleInstanceOutput, error) + CancelBundleTaskRequest(*ec2.CancelBundleTaskInput) (*request.Request, *ec2.CancelBundleTaskOutput) + CancelBundleTask(*ec2.CancelBundleTaskInput) (*ec2.CancelBundleTaskOutput, error) + CancelConversionTaskRequest(*ec2.CancelConversionTaskInput) (*request.Request, *ec2.CancelConversionTaskOutput) + CancelConversionTask(*ec2.CancelConversionTaskInput) (*ec2.CancelConversionTaskOutput, error) + CancelExportTaskRequest(*ec2.CancelExportTaskInput) (*request.Request, *ec2.CancelExportTaskOutput) + CancelExportTask(*ec2.CancelExportTaskInput) (*ec2.CancelExportTaskOutput, error) + CancelImportTaskRequest(*ec2.CancelImportTaskInput) (*request.Request, *ec2.CancelImportTaskOutput) + CancelImportTask(*ec2.CancelImportTaskInput) (*ec2.CancelImportTaskOutput, error) + CancelReservedInstancesListingRequest(*ec2.CancelReservedInstancesListingInput) (*request.Request, *ec2.CancelReservedInstancesListingOutput) + CancelReservedInstancesListing(*ec2.CancelReservedInstancesListingInput) (*ec2.CancelReservedInstancesListingOutput, error) + CancelSpotFleetRequestsRequest(*ec2.CancelSpotFleetRequestsInput) (*request.Request, *ec2.CancelSpotFleetRequestsOutput) + CancelSpotFleetRequests(*ec2.CancelSpotFleetRequestsInput) (*ec2.CancelSpotFleetRequestsOutput, error) + CancelSpotInstanceRequestsRequest(*ec2.CancelSpotInstanceRequestsInput) (*request.Request, *ec2.CancelSpotInstanceRequestsOutput) + CancelSpotInstanceRequests(*ec2.CancelSpotInstanceRequestsInput) (*ec2.CancelSpotInstanceRequestsOutput, error) + ConfirmProductInstanceRequest(*ec2.ConfirmProductInstanceInput) (*request.Request, *ec2.ConfirmProductInstanceOutput) + ConfirmProductInstance(*ec2.ConfirmProductInstanceInput) (*ec2.ConfirmProductInstanceOutput, error) + CopyImageRequest(*ec2.CopyImageInput) (*request.Request, *ec2.CopyImageOutput) + CopyImage(*ec2.CopyImageInput) (*ec2.CopyImageOutput, error) + CopySnapshotRequest(*ec2.CopySnapshotInput) (*request.Request, *ec2.CopySnapshotOutput) + CopySnapshot(*ec2.CopySnapshotInput) (*ec2.CopySnapshotOutput, error) + CreateCustomerGatewayRequest(*ec2.CreateCustomerGatewayInput) (*request.Request, *ec2.CreateCustomerGatewayOutput) + CreateCustomerGateway(*ec2.CreateCustomerGatewayInput) (*ec2.CreateCustomerGatewayOutput, error) - CreateDHCPOptions(*ec2.CreateDHCPOptionsInput) (*ec2.CreateDHCPOptionsOutput, error) + CreateDhcpOptionsRequest(*ec2.CreateDhcpOptionsInput) (*request.Request, *ec2.CreateDhcpOptionsOutput) + + CreateDhcpOptions(*ec2.CreateDhcpOptionsInput) (*ec2.CreateDhcpOptionsOutput, error) + + CreateFlowLogsRequest(*ec2.CreateFlowLogsInput) (*request.Request, *ec2.CreateFlowLogsOutput) + + CreateFlowLogs(*ec2.CreateFlowLogsInput) (*ec2.CreateFlowLogsOutput, error) + + CreateImageRequest(*ec2.CreateImageInput) (*request.Request, *ec2.CreateImageOutput) CreateImage(*ec2.CreateImageInput) (*ec2.CreateImageOutput, error) + CreateInstanceExportTaskRequest(*ec2.CreateInstanceExportTaskInput) (*request.Request, *ec2.CreateInstanceExportTaskOutput) + CreateInstanceExportTask(*ec2.CreateInstanceExportTaskInput) (*ec2.CreateInstanceExportTaskOutput, error) + CreateInternetGatewayRequest(*ec2.CreateInternetGatewayInput) (*request.Request, *ec2.CreateInternetGatewayOutput) + CreateInternetGateway(*ec2.CreateInternetGatewayInput) (*ec2.CreateInternetGatewayOutput, error) + CreateKeyPairRequest(*ec2.CreateKeyPairInput) (*request.Request, *ec2.CreateKeyPairOutput) + CreateKeyPair(*ec2.CreateKeyPairInput) (*ec2.CreateKeyPairOutput, error) - CreateNetworkACL(*ec2.CreateNetworkACLInput) (*ec2.CreateNetworkACLOutput, error) + CreateNetworkAclRequest(*ec2.CreateNetworkAclInput) (*request.Request, *ec2.CreateNetworkAclOutput) - CreateNetworkACLEntry(*ec2.CreateNetworkACLEntryInput) (*ec2.CreateNetworkACLEntryOutput, error) + CreateNetworkAcl(*ec2.CreateNetworkAclInput) (*ec2.CreateNetworkAclOutput, error) + + CreateNetworkAclEntryRequest(*ec2.CreateNetworkAclEntryInput) (*request.Request, *ec2.CreateNetworkAclEntryOutput) + + CreateNetworkAclEntry(*ec2.CreateNetworkAclEntryInput) (*ec2.CreateNetworkAclEntryOutput, error) + + CreateNetworkInterfaceRequest(*ec2.CreateNetworkInterfaceInput) (*request.Request, *ec2.CreateNetworkInterfaceOutput) CreateNetworkInterface(*ec2.CreateNetworkInterfaceInput) (*ec2.CreateNetworkInterfaceOutput, error) + CreatePlacementGroupRequest(*ec2.CreatePlacementGroupInput) (*request.Request, *ec2.CreatePlacementGroupOutput) + CreatePlacementGroup(*ec2.CreatePlacementGroupInput) (*ec2.CreatePlacementGroupOutput, error) + CreateReservedInstancesListingRequest(*ec2.CreateReservedInstancesListingInput) (*request.Request, *ec2.CreateReservedInstancesListingOutput) + CreateReservedInstancesListing(*ec2.CreateReservedInstancesListingInput) (*ec2.CreateReservedInstancesListingOutput, error) + CreateRouteRequest(*ec2.CreateRouteInput) (*request.Request, *ec2.CreateRouteOutput) + CreateRoute(*ec2.CreateRouteInput) (*ec2.CreateRouteOutput, error) + CreateRouteTableRequest(*ec2.CreateRouteTableInput) (*request.Request, *ec2.CreateRouteTableOutput) + CreateRouteTable(*ec2.CreateRouteTableInput) (*ec2.CreateRouteTableOutput, error) + CreateSecurityGroupRequest(*ec2.CreateSecurityGroupInput) (*request.Request, *ec2.CreateSecurityGroupOutput) + CreateSecurityGroup(*ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error) + CreateSnapshotRequest(*ec2.CreateSnapshotInput) (*request.Request, *ec2.Snapshot) + CreateSnapshot(*ec2.CreateSnapshotInput) (*ec2.Snapshot, error) + CreateSpotDatafeedSubscriptionRequest(*ec2.CreateSpotDatafeedSubscriptionInput) (*request.Request, *ec2.CreateSpotDatafeedSubscriptionOutput) + CreateSpotDatafeedSubscription(*ec2.CreateSpotDatafeedSubscriptionInput) (*ec2.CreateSpotDatafeedSubscriptionOutput, error) + CreateSubnetRequest(*ec2.CreateSubnetInput) (*request.Request, *ec2.CreateSubnetOutput) + CreateSubnet(*ec2.CreateSubnetInput) (*ec2.CreateSubnetOutput, error) + CreateTagsRequest(*ec2.CreateTagsInput) (*request.Request, *ec2.CreateTagsOutput) + CreateTags(*ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error) - CreateVPC(*ec2.CreateVPCInput) (*ec2.CreateVPCOutput, error) - - CreateVPCEndpoint(*ec2.CreateVPCEndpointInput) (*ec2.CreateVPCEndpointOutput, error) - - CreateVPCPeeringConnection(*ec2.CreateVPCPeeringConnectionInput) (*ec2.CreateVPCPeeringConnectionOutput, error) - - CreateVPNConnection(*ec2.CreateVPNConnectionInput) (*ec2.CreateVPNConnectionOutput, error) - - CreateVPNConnectionRoute(*ec2.CreateVPNConnectionRouteInput) (*ec2.CreateVPNConnectionRouteOutput, error) - - CreateVPNGateway(*ec2.CreateVPNGatewayInput) (*ec2.CreateVPNGatewayOutput, error) + CreateVolumeRequest(*ec2.CreateVolumeInput) (*request.Request, *ec2.Volume) CreateVolume(*ec2.CreateVolumeInput) (*ec2.Volume, error) + CreateVpcRequest(*ec2.CreateVpcInput) (*request.Request, *ec2.CreateVpcOutput) + + CreateVpc(*ec2.CreateVpcInput) (*ec2.CreateVpcOutput, error) + + CreateVpcEndpointRequest(*ec2.CreateVpcEndpointInput) (*request.Request, *ec2.CreateVpcEndpointOutput) + + CreateVpcEndpoint(*ec2.CreateVpcEndpointInput) (*ec2.CreateVpcEndpointOutput, error) + + CreateVpcPeeringConnectionRequest(*ec2.CreateVpcPeeringConnectionInput) (*request.Request, *ec2.CreateVpcPeeringConnectionOutput) + + CreateVpcPeeringConnection(*ec2.CreateVpcPeeringConnectionInput) (*ec2.CreateVpcPeeringConnectionOutput, error) + + CreateVpnConnectionRequest(*ec2.CreateVpnConnectionInput) (*request.Request, *ec2.CreateVpnConnectionOutput) + + CreateVpnConnection(*ec2.CreateVpnConnectionInput) (*ec2.CreateVpnConnectionOutput, error) + + CreateVpnConnectionRouteRequest(*ec2.CreateVpnConnectionRouteInput) (*request.Request, *ec2.CreateVpnConnectionRouteOutput) + + CreateVpnConnectionRoute(*ec2.CreateVpnConnectionRouteInput) (*ec2.CreateVpnConnectionRouteOutput, error) + + CreateVpnGatewayRequest(*ec2.CreateVpnGatewayInput) (*request.Request, *ec2.CreateVpnGatewayOutput) + + CreateVpnGateway(*ec2.CreateVpnGatewayInput) (*ec2.CreateVpnGatewayOutput, error) + + DeleteCustomerGatewayRequest(*ec2.DeleteCustomerGatewayInput) (*request.Request, *ec2.DeleteCustomerGatewayOutput) + DeleteCustomerGateway(*ec2.DeleteCustomerGatewayInput) (*ec2.DeleteCustomerGatewayOutput, error) - DeleteDHCPOptions(*ec2.DeleteDHCPOptionsInput) (*ec2.DeleteDHCPOptionsOutput, error) + DeleteDhcpOptionsRequest(*ec2.DeleteDhcpOptionsInput) (*request.Request, *ec2.DeleteDhcpOptionsOutput) + + DeleteDhcpOptions(*ec2.DeleteDhcpOptionsInput) (*ec2.DeleteDhcpOptionsOutput, error) + + DeleteFlowLogsRequest(*ec2.DeleteFlowLogsInput) (*request.Request, *ec2.DeleteFlowLogsOutput) + + DeleteFlowLogs(*ec2.DeleteFlowLogsInput) (*ec2.DeleteFlowLogsOutput, error) + + DeleteInternetGatewayRequest(*ec2.DeleteInternetGatewayInput) (*request.Request, *ec2.DeleteInternetGatewayOutput) DeleteInternetGateway(*ec2.DeleteInternetGatewayInput) (*ec2.DeleteInternetGatewayOutput, error) + DeleteKeyPairRequest(*ec2.DeleteKeyPairInput) (*request.Request, *ec2.DeleteKeyPairOutput) + DeleteKeyPair(*ec2.DeleteKeyPairInput) (*ec2.DeleteKeyPairOutput, error) - DeleteNetworkACL(*ec2.DeleteNetworkACLInput) (*ec2.DeleteNetworkACLOutput, error) + DeleteNetworkAclRequest(*ec2.DeleteNetworkAclInput) (*request.Request, *ec2.DeleteNetworkAclOutput) - DeleteNetworkACLEntry(*ec2.DeleteNetworkACLEntryInput) (*ec2.DeleteNetworkACLEntryOutput, error) + DeleteNetworkAcl(*ec2.DeleteNetworkAclInput) (*ec2.DeleteNetworkAclOutput, error) + + DeleteNetworkAclEntryRequest(*ec2.DeleteNetworkAclEntryInput) (*request.Request, *ec2.DeleteNetworkAclEntryOutput) + + DeleteNetworkAclEntry(*ec2.DeleteNetworkAclEntryInput) (*ec2.DeleteNetworkAclEntryOutput, error) + + DeleteNetworkInterfaceRequest(*ec2.DeleteNetworkInterfaceInput) (*request.Request, *ec2.DeleteNetworkInterfaceOutput) DeleteNetworkInterface(*ec2.DeleteNetworkInterfaceInput) (*ec2.DeleteNetworkInterfaceOutput, error) + DeletePlacementGroupRequest(*ec2.DeletePlacementGroupInput) (*request.Request, *ec2.DeletePlacementGroupOutput) + DeletePlacementGroup(*ec2.DeletePlacementGroupInput) (*ec2.DeletePlacementGroupOutput, error) + DeleteRouteRequest(*ec2.DeleteRouteInput) (*request.Request, *ec2.DeleteRouteOutput) + DeleteRoute(*ec2.DeleteRouteInput) (*ec2.DeleteRouteOutput, error) + DeleteRouteTableRequest(*ec2.DeleteRouteTableInput) (*request.Request, *ec2.DeleteRouteTableOutput) + DeleteRouteTable(*ec2.DeleteRouteTableInput) (*ec2.DeleteRouteTableOutput, error) + DeleteSecurityGroupRequest(*ec2.DeleteSecurityGroupInput) (*request.Request, *ec2.DeleteSecurityGroupOutput) + DeleteSecurityGroup(*ec2.DeleteSecurityGroupInput) (*ec2.DeleteSecurityGroupOutput, error) + DeleteSnapshotRequest(*ec2.DeleteSnapshotInput) (*request.Request, *ec2.DeleteSnapshotOutput) + DeleteSnapshot(*ec2.DeleteSnapshotInput) (*ec2.DeleteSnapshotOutput, error) + DeleteSpotDatafeedSubscriptionRequest(*ec2.DeleteSpotDatafeedSubscriptionInput) (*request.Request, *ec2.DeleteSpotDatafeedSubscriptionOutput) + DeleteSpotDatafeedSubscription(*ec2.DeleteSpotDatafeedSubscriptionInput) (*ec2.DeleteSpotDatafeedSubscriptionOutput, error) + DeleteSubnetRequest(*ec2.DeleteSubnetInput) (*request.Request, *ec2.DeleteSubnetOutput) + DeleteSubnet(*ec2.DeleteSubnetInput) (*ec2.DeleteSubnetOutput, error) + DeleteTagsRequest(*ec2.DeleteTagsInput) (*request.Request, *ec2.DeleteTagsOutput) + DeleteTags(*ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error) - DeleteVPC(*ec2.DeleteVPCInput) (*ec2.DeleteVPCOutput, error) - - DeleteVPCEndpoints(*ec2.DeleteVPCEndpointsInput) (*ec2.DeleteVPCEndpointsOutput, error) - - DeleteVPCPeeringConnection(*ec2.DeleteVPCPeeringConnectionInput) (*ec2.DeleteVPCPeeringConnectionOutput, error) - - DeleteVPNConnection(*ec2.DeleteVPNConnectionInput) (*ec2.DeleteVPNConnectionOutput, error) - - DeleteVPNConnectionRoute(*ec2.DeleteVPNConnectionRouteInput) (*ec2.DeleteVPNConnectionRouteOutput, error) - - DeleteVPNGateway(*ec2.DeleteVPNGatewayInput) (*ec2.DeleteVPNGatewayOutput, error) + DeleteVolumeRequest(*ec2.DeleteVolumeInput) (*request.Request, *ec2.DeleteVolumeOutput) DeleteVolume(*ec2.DeleteVolumeInput) (*ec2.DeleteVolumeOutput, error) + DeleteVpcRequest(*ec2.DeleteVpcInput) (*request.Request, *ec2.DeleteVpcOutput) + + DeleteVpc(*ec2.DeleteVpcInput) (*ec2.DeleteVpcOutput, error) + + DeleteVpcEndpointsRequest(*ec2.DeleteVpcEndpointsInput) (*request.Request, *ec2.DeleteVpcEndpointsOutput) + + DeleteVpcEndpoints(*ec2.DeleteVpcEndpointsInput) (*ec2.DeleteVpcEndpointsOutput, error) + + DeleteVpcPeeringConnectionRequest(*ec2.DeleteVpcPeeringConnectionInput) (*request.Request, *ec2.DeleteVpcPeeringConnectionOutput) + + DeleteVpcPeeringConnection(*ec2.DeleteVpcPeeringConnectionInput) (*ec2.DeleteVpcPeeringConnectionOutput, error) + + DeleteVpnConnectionRequest(*ec2.DeleteVpnConnectionInput) (*request.Request, *ec2.DeleteVpnConnectionOutput) + + DeleteVpnConnection(*ec2.DeleteVpnConnectionInput) (*ec2.DeleteVpnConnectionOutput, error) + + DeleteVpnConnectionRouteRequest(*ec2.DeleteVpnConnectionRouteInput) (*request.Request, *ec2.DeleteVpnConnectionRouteOutput) + + DeleteVpnConnectionRoute(*ec2.DeleteVpnConnectionRouteInput) (*ec2.DeleteVpnConnectionRouteOutput, error) + + DeleteVpnGatewayRequest(*ec2.DeleteVpnGatewayInput) (*request.Request, *ec2.DeleteVpnGatewayOutput) + + DeleteVpnGateway(*ec2.DeleteVpnGatewayInput) (*ec2.DeleteVpnGatewayOutput, error) + + DeregisterImageRequest(*ec2.DeregisterImageInput) (*request.Request, *ec2.DeregisterImageOutput) + DeregisterImage(*ec2.DeregisterImageInput) (*ec2.DeregisterImageOutput, error) + DescribeAccountAttributesRequest(*ec2.DescribeAccountAttributesInput) (*request.Request, *ec2.DescribeAccountAttributesOutput) + DescribeAccountAttributes(*ec2.DescribeAccountAttributesInput) (*ec2.DescribeAccountAttributesOutput, error) + DescribeAddressesRequest(*ec2.DescribeAddressesInput) (*request.Request, *ec2.DescribeAddressesOutput) + DescribeAddresses(*ec2.DescribeAddressesInput) (*ec2.DescribeAddressesOutput, error) + DescribeAvailabilityZonesRequest(*ec2.DescribeAvailabilityZonesInput) (*request.Request, *ec2.DescribeAvailabilityZonesOutput) + DescribeAvailabilityZones(*ec2.DescribeAvailabilityZonesInput) (*ec2.DescribeAvailabilityZonesOutput, error) + DescribeBundleTasksRequest(*ec2.DescribeBundleTasksInput) (*request.Request, *ec2.DescribeBundleTasksOutput) + DescribeBundleTasks(*ec2.DescribeBundleTasksInput) (*ec2.DescribeBundleTasksOutput, error) + DescribeClassicLinkInstancesRequest(*ec2.DescribeClassicLinkInstancesInput) (*request.Request, *ec2.DescribeClassicLinkInstancesOutput) + DescribeClassicLinkInstances(*ec2.DescribeClassicLinkInstancesInput) (*ec2.DescribeClassicLinkInstancesOutput, error) + DescribeConversionTasksRequest(*ec2.DescribeConversionTasksInput) (*request.Request, *ec2.DescribeConversionTasksOutput) + DescribeConversionTasks(*ec2.DescribeConversionTasksInput) (*ec2.DescribeConversionTasksOutput, error) + DescribeCustomerGatewaysRequest(*ec2.DescribeCustomerGatewaysInput) (*request.Request, *ec2.DescribeCustomerGatewaysOutput) + DescribeCustomerGateways(*ec2.DescribeCustomerGatewaysInput) (*ec2.DescribeCustomerGatewaysOutput, error) - DescribeDHCPOptions(*ec2.DescribeDHCPOptionsInput) (*ec2.DescribeDHCPOptionsOutput, error) + DescribeDhcpOptionsRequest(*ec2.DescribeDhcpOptionsInput) (*request.Request, *ec2.DescribeDhcpOptionsOutput) + + DescribeDhcpOptions(*ec2.DescribeDhcpOptionsInput) (*ec2.DescribeDhcpOptionsOutput, error) + + DescribeExportTasksRequest(*ec2.DescribeExportTasksInput) (*request.Request, *ec2.DescribeExportTasksOutput) DescribeExportTasks(*ec2.DescribeExportTasksInput) (*ec2.DescribeExportTasksOutput, error) + DescribeFlowLogsRequest(*ec2.DescribeFlowLogsInput) (*request.Request, *ec2.DescribeFlowLogsOutput) + + DescribeFlowLogs(*ec2.DescribeFlowLogsInput) (*ec2.DescribeFlowLogsOutput, error) + + DescribeImageAttributeRequest(*ec2.DescribeImageAttributeInput) (*request.Request, *ec2.DescribeImageAttributeOutput) + DescribeImageAttribute(*ec2.DescribeImageAttributeInput) (*ec2.DescribeImageAttributeOutput, error) + DescribeImagesRequest(*ec2.DescribeImagesInput) (*request.Request, *ec2.DescribeImagesOutput) + DescribeImages(*ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error) + DescribeImportImageTasksRequest(*ec2.DescribeImportImageTasksInput) (*request.Request, *ec2.DescribeImportImageTasksOutput) + DescribeImportImageTasks(*ec2.DescribeImportImageTasksInput) (*ec2.DescribeImportImageTasksOutput, error) + DescribeImportSnapshotTasksRequest(*ec2.DescribeImportSnapshotTasksInput) (*request.Request, *ec2.DescribeImportSnapshotTasksOutput) + DescribeImportSnapshotTasks(*ec2.DescribeImportSnapshotTasksInput) (*ec2.DescribeImportSnapshotTasksOutput, error) + DescribeInstanceAttributeRequest(*ec2.DescribeInstanceAttributeInput) (*request.Request, *ec2.DescribeInstanceAttributeOutput) + DescribeInstanceAttribute(*ec2.DescribeInstanceAttributeInput) (*ec2.DescribeInstanceAttributeOutput, error) + DescribeInstanceStatusRequest(*ec2.DescribeInstanceStatusInput) (*request.Request, *ec2.DescribeInstanceStatusOutput) + DescribeInstanceStatus(*ec2.DescribeInstanceStatusInput) (*ec2.DescribeInstanceStatusOutput, error) + DescribeInstanceStatusPages(*ec2.DescribeInstanceStatusInput, func(*ec2.DescribeInstanceStatusOutput, bool) bool) error + + DescribeInstancesRequest(*ec2.DescribeInstancesInput) (*request.Request, *ec2.DescribeInstancesOutput) + DescribeInstances(*ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) + DescribeInstancesPages(*ec2.DescribeInstancesInput, func(*ec2.DescribeInstancesOutput, bool) bool) error + + DescribeInternetGatewaysRequest(*ec2.DescribeInternetGatewaysInput) (*request.Request, *ec2.DescribeInternetGatewaysOutput) + DescribeInternetGateways(*ec2.DescribeInternetGatewaysInput) (*ec2.DescribeInternetGatewaysOutput, error) + DescribeKeyPairsRequest(*ec2.DescribeKeyPairsInput) (*request.Request, *ec2.DescribeKeyPairsOutput) + DescribeKeyPairs(*ec2.DescribeKeyPairsInput) (*ec2.DescribeKeyPairsOutput, error) + DescribeMovingAddressesRequest(*ec2.DescribeMovingAddressesInput) (*request.Request, *ec2.DescribeMovingAddressesOutput) + DescribeMovingAddresses(*ec2.DescribeMovingAddressesInput) (*ec2.DescribeMovingAddressesOutput, error) - DescribeNetworkACLs(*ec2.DescribeNetworkACLsInput) (*ec2.DescribeNetworkACLsOutput, error) + DescribeNetworkAclsRequest(*ec2.DescribeNetworkAclsInput) (*request.Request, *ec2.DescribeNetworkAclsOutput) + + DescribeNetworkAcls(*ec2.DescribeNetworkAclsInput) (*ec2.DescribeNetworkAclsOutput, error) + + DescribeNetworkInterfaceAttributeRequest(*ec2.DescribeNetworkInterfaceAttributeInput) (*request.Request, *ec2.DescribeNetworkInterfaceAttributeOutput) DescribeNetworkInterfaceAttribute(*ec2.DescribeNetworkInterfaceAttributeInput) (*ec2.DescribeNetworkInterfaceAttributeOutput, error) + DescribeNetworkInterfacesRequest(*ec2.DescribeNetworkInterfacesInput) (*request.Request, *ec2.DescribeNetworkInterfacesOutput) + DescribeNetworkInterfaces(*ec2.DescribeNetworkInterfacesInput) (*ec2.DescribeNetworkInterfacesOutput, error) + DescribePlacementGroupsRequest(*ec2.DescribePlacementGroupsInput) (*request.Request, *ec2.DescribePlacementGroupsOutput) + DescribePlacementGroups(*ec2.DescribePlacementGroupsInput) (*ec2.DescribePlacementGroupsOutput, error) + DescribePrefixListsRequest(*ec2.DescribePrefixListsInput) (*request.Request, *ec2.DescribePrefixListsOutput) + DescribePrefixLists(*ec2.DescribePrefixListsInput) (*ec2.DescribePrefixListsOutput, error) + DescribeRegionsRequest(*ec2.DescribeRegionsInput) (*request.Request, *ec2.DescribeRegionsOutput) + DescribeRegions(*ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error) + DescribeReservedInstancesRequest(*ec2.DescribeReservedInstancesInput) (*request.Request, *ec2.DescribeReservedInstancesOutput) + DescribeReservedInstances(*ec2.DescribeReservedInstancesInput) (*ec2.DescribeReservedInstancesOutput, error) + DescribeReservedInstancesListingsRequest(*ec2.DescribeReservedInstancesListingsInput) (*request.Request, *ec2.DescribeReservedInstancesListingsOutput) + DescribeReservedInstancesListings(*ec2.DescribeReservedInstancesListingsInput) (*ec2.DescribeReservedInstancesListingsOutput, error) + DescribeReservedInstancesModificationsRequest(*ec2.DescribeReservedInstancesModificationsInput) (*request.Request, *ec2.DescribeReservedInstancesModificationsOutput) + DescribeReservedInstancesModifications(*ec2.DescribeReservedInstancesModificationsInput) (*ec2.DescribeReservedInstancesModificationsOutput, error) + DescribeReservedInstancesModificationsPages(*ec2.DescribeReservedInstancesModificationsInput, func(*ec2.DescribeReservedInstancesModificationsOutput, bool) bool) error + + DescribeReservedInstancesOfferingsRequest(*ec2.DescribeReservedInstancesOfferingsInput) (*request.Request, *ec2.DescribeReservedInstancesOfferingsOutput) + DescribeReservedInstancesOfferings(*ec2.DescribeReservedInstancesOfferingsInput) (*ec2.DescribeReservedInstancesOfferingsOutput, error) + DescribeReservedInstancesOfferingsPages(*ec2.DescribeReservedInstancesOfferingsInput, func(*ec2.DescribeReservedInstancesOfferingsOutput, bool) bool) error + + DescribeRouteTablesRequest(*ec2.DescribeRouteTablesInput) (*request.Request, *ec2.DescribeRouteTablesOutput) + DescribeRouteTables(*ec2.DescribeRouteTablesInput) (*ec2.DescribeRouteTablesOutput, error) + DescribeSecurityGroupsRequest(*ec2.DescribeSecurityGroupsInput) (*request.Request, *ec2.DescribeSecurityGroupsOutput) + DescribeSecurityGroups(*ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error) + DescribeSnapshotAttributeRequest(*ec2.DescribeSnapshotAttributeInput) (*request.Request, *ec2.DescribeSnapshotAttributeOutput) + DescribeSnapshotAttribute(*ec2.DescribeSnapshotAttributeInput) (*ec2.DescribeSnapshotAttributeOutput, error) + DescribeSnapshotsRequest(*ec2.DescribeSnapshotsInput) (*request.Request, *ec2.DescribeSnapshotsOutput) + DescribeSnapshots(*ec2.DescribeSnapshotsInput) (*ec2.DescribeSnapshotsOutput, error) + DescribeSnapshotsPages(*ec2.DescribeSnapshotsInput, func(*ec2.DescribeSnapshotsOutput, bool) bool) error + + DescribeSpotDatafeedSubscriptionRequest(*ec2.DescribeSpotDatafeedSubscriptionInput) (*request.Request, *ec2.DescribeSpotDatafeedSubscriptionOutput) + DescribeSpotDatafeedSubscription(*ec2.DescribeSpotDatafeedSubscriptionInput) (*ec2.DescribeSpotDatafeedSubscriptionOutput, error) + DescribeSpotFleetInstancesRequest(*ec2.DescribeSpotFleetInstancesInput) (*request.Request, *ec2.DescribeSpotFleetInstancesOutput) + DescribeSpotFleetInstances(*ec2.DescribeSpotFleetInstancesInput) (*ec2.DescribeSpotFleetInstancesOutput, error) + DescribeSpotFleetRequestHistoryRequest(*ec2.DescribeSpotFleetRequestHistoryInput) (*request.Request, *ec2.DescribeSpotFleetRequestHistoryOutput) + DescribeSpotFleetRequestHistory(*ec2.DescribeSpotFleetRequestHistoryInput) (*ec2.DescribeSpotFleetRequestHistoryOutput, error) + DescribeSpotFleetRequestsRequest(*ec2.DescribeSpotFleetRequestsInput) (*request.Request, *ec2.DescribeSpotFleetRequestsOutput) + DescribeSpotFleetRequests(*ec2.DescribeSpotFleetRequestsInput) (*ec2.DescribeSpotFleetRequestsOutput, error) + DescribeSpotInstanceRequestsRequest(*ec2.DescribeSpotInstanceRequestsInput) (*request.Request, *ec2.DescribeSpotInstanceRequestsOutput) + DescribeSpotInstanceRequests(*ec2.DescribeSpotInstanceRequestsInput) (*ec2.DescribeSpotInstanceRequestsOutput, error) + DescribeSpotPriceHistoryRequest(*ec2.DescribeSpotPriceHistoryInput) (*request.Request, *ec2.DescribeSpotPriceHistoryOutput) + DescribeSpotPriceHistory(*ec2.DescribeSpotPriceHistoryInput) (*ec2.DescribeSpotPriceHistoryOutput, error) + DescribeSpotPriceHistoryPages(*ec2.DescribeSpotPriceHistoryInput, func(*ec2.DescribeSpotPriceHistoryOutput, bool) bool) error + + DescribeSubnetsRequest(*ec2.DescribeSubnetsInput) (*request.Request, *ec2.DescribeSubnetsOutput) + DescribeSubnets(*ec2.DescribeSubnetsInput) (*ec2.DescribeSubnetsOutput, error) + DescribeTagsRequest(*ec2.DescribeTagsInput) (*request.Request, *ec2.DescribeTagsOutput) + DescribeTags(*ec2.DescribeTagsInput) (*ec2.DescribeTagsOutput, error) - DescribeVPCAttribute(*ec2.DescribeVPCAttributeInput) (*ec2.DescribeVPCAttributeOutput, error) - - DescribeVPCClassicLink(*ec2.DescribeVPCClassicLinkInput) (*ec2.DescribeVPCClassicLinkOutput, error) - - DescribeVPCEndpointServices(*ec2.DescribeVPCEndpointServicesInput) (*ec2.DescribeVPCEndpointServicesOutput, error) - - DescribeVPCEndpoints(*ec2.DescribeVPCEndpointsInput) (*ec2.DescribeVPCEndpointsOutput, error) - - DescribeVPCPeeringConnections(*ec2.DescribeVPCPeeringConnectionsInput) (*ec2.DescribeVPCPeeringConnectionsOutput, error) - - DescribeVPCs(*ec2.DescribeVPCsInput) (*ec2.DescribeVPCsOutput, error) - - DescribeVPNConnections(*ec2.DescribeVPNConnectionsInput) (*ec2.DescribeVPNConnectionsOutput, error) - - DescribeVPNGateways(*ec2.DescribeVPNGatewaysInput) (*ec2.DescribeVPNGatewaysOutput, error) + DescribeVolumeAttributeRequest(*ec2.DescribeVolumeAttributeInput) (*request.Request, *ec2.DescribeVolumeAttributeOutput) DescribeVolumeAttribute(*ec2.DescribeVolumeAttributeInput) (*ec2.DescribeVolumeAttributeOutput, error) + DescribeVolumeStatusRequest(*ec2.DescribeVolumeStatusInput) (*request.Request, *ec2.DescribeVolumeStatusOutput) + DescribeVolumeStatus(*ec2.DescribeVolumeStatusInput) (*ec2.DescribeVolumeStatusOutput, error) + DescribeVolumeStatusPages(*ec2.DescribeVolumeStatusInput, func(*ec2.DescribeVolumeStatusOutput, bool) bool) error + + DescribeVolumesRequest(*ec2.DescribeVolumesInput) (*request.Request, *ec2.DescribeVolumesOutput) + DescribeVolumes(*ec2.DescribeVolumesInput) (*ec2.DescribeVolumesOutput, error) - DetachClassicLinkVPC(*ec2.DetachClassicLinkVPCInput) (*ec2.DetachClassicLinkVPCOutput, error) + DescribeVolumesPages(*ec2.DescribeVolumesInput, func(*ec2.DescribeVolumesOutput, bool) bool) error + + DescribeVpcAttributeRequest(*ec2.DescribeVpcAttributeInput) (*request.Request, *ec2.DescribeVpcAttributeOutput) + + DescribeVpcAttribute(*ec2.DescribeVpcAttributeInput) (*ec2.DescribeVpcAttributeOutput, error) + + DescribeVpcClassicLinkRequest(*ec2.DescribeVpcClassicLinkInput) (*request.Request, *ec2.DescribeVpcClassicLinkOutput) + + DescribeVpcClassicLink(*ec2.DescribeVpcClassicLinkInput) (*ec2.DescribeVpcClassicLinkOutput, error) + + DescribeVpcEndpointServicesRequest(*ec2.DescribeVpcEndpointServicesInput) (*request.Request, *ec2.DescribeVpcEndpointServicesOutput) + + DescribeVpcEndpointServices(*ec2.DescribeVpcEndpointServicesInput) (*ec2.DescribeVpcEndpointServicesOutput, error) + + DescribeVpcEndpointsRequest(*ec2.DescribeVpcEndpointsInput) (*request.Request, *ec2.DescribeVpcEndpointsOutput) + + DescribeVpcEndpoints(*ec2.DescribeVpcEndpointsInput) (*ec2.DescribeVpcEndpointsOutput, error) + + DescribeVpcPeeringConnectionsRequest(*ec2.DescribeVpcPeeringConnectionsInput) (*request.Request, *ec2.DescribeVpcPeeringConnectionsOutput) + + DescribeVpcPeeringConnections(*ec2.DescribeVpcPeeringConnectionsInput) (*ec2.DescribeVpcPeeringConnectionsOutput, error) + + DescribeVpcsRequest(*ec2.DescribeVpcsInput) (*request.Request, *ec2.DescribeVpcsOutput) + + DescribeVpcs(*ec2.DescribeVpcsInput) (*ec2.DescribeVpcsOutput, error) + + DescribeVpnConnectionsRequest(*ec2.DescribeVpnConnectionsInput) (*request.Request, *ec2.DescribeVpnConnectionsOutput) + + DescribeVpnConnections(*ec2.DescribeVpnConnectionsInput) (*ec2.DescribeVpnConnectionsOutput, error) + + DescribeVpnGatewaysRequest(*ec2.DescribeVpnGatewaysInput) (*request.Request, *ec2.DescribeVpnGatewaysOutput) + + DescribeVpnGateways(*ec2.DescribeVpnGatewaysInput) (*ec2.DescribeVpnGatewaysOutput, error) + + DetachClassicLinkVpcRequest(*ec2.DetachClassicLinkVpcInput) (*request.Request, *ec2.DetachClassicLinkVpcOutput) + + DetachClassicLinkVpc(*ec2.DetachClassicLinkVpcInput) (*ec2.DetachClassicLinkVpcOutput, error) + + DetachInternetGatewayRequest(*ec2.DetachInternetGatewayInput) (*request.Request, *ec2.DetachInternetGatewayOutput) DetachInternetGateway(*ec2.DetachInternetGatewayInput) (*ec2.DetachInternetGatewayOutput, error) + DetachNetworkInterfaceRequest(*ec2.DetachNetworkInterfaceInput) (*request.Request, *ec2.DetachNetworkInterfaceOutput) + DetachNetworkInterface(*ec2.DetachNetworkInterfaceInput) (*ec2.DetachNetworkInterfaceOutput, error) - DetachVPNGateway(*ec2.DetachVPNGatewayInput) (*ec2.DetachVPNGatewayOutput, error) + DetachVolumeRequest(*ec2.DetachVolumeInput) (*request.Request, *ec2.VolumeAttachment) DetachVolume(*ec2.DetachVolumeInput) (*ec2.VolumeAttachment, error) - DisableVGWRoutePropagation(*ec2.DisableVGWRoutePropagationInput) (*ec2.DisableVGWRoutePropagationOutput, error) + DetachVpnGatewayRequest(*ec2.DetachVpnGatewayInput) (*request.Request, *ec2.DetachVpnGatewayOutput) - DisableVPCClassicLink(*ec2.DisableVPCClassicLinkInput) (*ec2.DisableVPCClassicLinkOutput, error) + DetachVpnGateway(*ec2.DetachVpnGatewayInput) (*ec2.DetachVpnGatewayOutput, error) + + DisableVgwRoutePropagationRequest(*ec2.DisableVgwRoutePropagationInput) (*request.Request, *ec2.DisableVgwRoutePropagationOutput) + + DisableVgwRoutePropagation(*ec2.DisableVgwRoutePropagationInput) (*ec2.DisableVgwRoutePropagationOutput, error) + + DisableVpcClassicLinkRequest(*ec2.DisableVpcClassicLinkInput) (*request.Request, *ec2.DisableVpcClassicLinkOutput) + + DisableVpcClassicLink(*ec2.DisableVpcClassicLinkInput) (*ec2.DisableVpcClassicLinkOutput, error) + + DisassociateAddressRequest(*ec2.DisassociateAddressInput) (*request.Request, *ec2.DisassociateAddressOutput) DisassociateAddress(*ec2.DisassociateAddressInput) (*ec2.DisassociateAddressOutput, error) + DisassociateRouteTableRequest(*ec2.DisassociateRouteTableInput) (*request.Request, *ec2.DisassociateRouteTableOutput) + DisassociateRouteTable(*ec2.DisassociateRouteTableInput) (*ec2.DisassociateRouteTableOutput, error) - EnableVGWRoutePropagation(*ec2.EnableVGWRoutePropagationInput) (*ec2.EnableVGWRoutePropagationOutput, error) + EnableVgwRoutePropagationRequest(*ec2.EnableVgwRoutePropagationInput) (*request.Request, *ec2.EnableVgwRoutePropagationOutput) - EnableVPCClassicLink(*ec2.EnableVPCClassicLinkInput) (*ec2.EnableVPCClassicLinkOutput, error) + EnableVgwRoutePropagation(*ec2.EnableVgwRoutePropagationInput) (*ec2.EnableVgwRoutePropagationOutput, error) + + EnableVolumeIORequest(*ec2.EnableVolumeIOInput) (*request.Request, *ec2.EnableVolumeIOOutput) EnableVolumeIO(*ec2.EnableVolumeIOInput) (*ec2.EnableVolumeIOOutput, error) + EnableVpcClassicLinkRequest(*ec2.EnableVpcClassicLinkInput) (*request.Request, *ec2.EnableVpcClassicLinkOutput) + + EnableVpcClassicLink(*ec2.EnableVpcClassicLinkInput) (*ec2.EnableVpcClassicLinkOutput, error) + + GetConsoleOutputRequest(*ec2.GetConsoleOutputInput) (*request.Request, *ec2.GetConsoleOutputOutput) + GetConsoleOutput(*ec2.GetConsoleOutputInput) (*ec2.GetConsoleOutputOutput, error) + GetPasswordDataRequest(*ec2.GetPasswordDataInput) (*request.Request, *ec2.GetPasswordDataOutput) + GetPasswordData(*ec2.GetPasswordDataInput) (*ec2.GetPasswordDataOutput, error) + ImportImageRequest(*ec2.ImportImageInput) (*request.Request, *ec2.ImportImageOutput) + ImportImage(*ec2.ImportImageInput) (*ec2.ImportImageOutput, error) + ImportInstanceRequest(*ec2.ImportInstanceInput) (*request.Request, *ec2.ImportInstanceOutput) + ImportInstance(*ec2.ImportInstanceInput) (*ec2.ImportInstanceOutput, error) + ImportKeyPairRequest(*ec2.ImportKeyPairInput) (*request.Request, *ec2.ImportKeyPairOutput) + ImportKeyPair(*ec2.ImportKeyPairInput) (*ec2.ImportKeyPairOutput, error) + ImportSnapshotRequest(*ec2.ImportSnapshotInput) (*request.Request, *ec2.ImportSnapshotOutput) + ImportSnapshot(*ec2.ImportSnapshotInput) (*ec2.ImportSnapshotOutput, error) + ImportVolumeRequest(*ec2.ImportVolumeInput) (*request.Request, *ec2.ImportVolumeOutput) + ImportVolume(*ec2.ImportVolumeInput) (*ec2.ImportVolumeOutput, error) + ModifyImageAttributeRequest(*ec2.ModifyImageAttributeInput) (*request.Request, *ec2.ModifyImageAttributeOutput) + ModifyImageAttribute(*ec2.ModifyImageAttributeInput) (*ec2.ModifyImageAttributeOutput, error) + ModifyInstanceAttributeRequest(*ec2.ModifyInstanceAttributeInput) (*request.Request, *ec2.ModifyInstanceAttributeOutput) + ModifyInstanceAttribute(*ec2.ModifyInstanceAttributeInput) (*ec2.ModifyInstanceAttributeOutput, error) + ModifyNetworkInterfaceAttributeRequest(*ec2.ModifyNetworkInterfaceAttributeInput) (*request.Request, *ec2.ModifyNetworkInterfaceAttributeOutput) + ModifyNetworkInterfaceAttribute(*ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error) + ModifyReservedInstancesRequest(*ec2.ModifyReservedInstancesInput) (*request.Request, *ec2.ModifyReservedInstancesOutput) + ModifyReservedInstances(*ec2.ModifyReservedInstancesInput) (*ec2.ModifyReservedInstancesOutput, error) + ModifySnapshotAttributeRequest(*ec2.ModifySnapshotAttributeInput) (*request.Request, *ec2.ModifySnapshotAttributeOutput) + ModifySnapshotAttribute(*ec2.ModifySnapshotAttributeInput) (*ec2.ModifySnapshotAttributeOutput, error) + ModifySubnetAttributeRequest(*ec2.ModifySubnetAttributeInput) (*request.Request, *ec2.ModifySubnetAttributeOutput) + ModifySubnetAttribute(*ec2.ModifySubnetAttributeInput) (*ec2.ModifySubnetAttributeOutput, error) - ModifyVPCAttribute(*ec2.ModifyVPCAttributeInput) (*ec2.ModifyVPCAttributeOutput, error) - - ModifyVPCEndpoint(*ec2.ModifyVPCEndpointInput) (*ec2.ModifyVPCEndpointOutput, error) + ModifyVolumeAttributeRequest(*ec2.ModifyVolumeAttributeInput) (*request.Request, *ec2.ModifyVolumeAttributeOutput) ModifyVolumeAttribute(*ec2.ModifyVolumeAttributeInput) (*ec2.ModifyVolumeAttributeOutput, error) + ModifyVpcAttributeRequest(*ec2.ModifyVpcAttributeInput) (*request.Request, *ec2.ModifyVpcAttributeOutput) + + ModifyVpcAttribute(*ec2.ModifyVpcAttributeInput) (*ec2.ModifyVpcAttributeOutput, error) + + ModifyVpcEndpointRequest(*ec2.ModifyVpcEndpointInput) (*request.Request, *ec2.ModifyVpcEndpointOutput) + + ModifyVpcEndpoint(*ec2.ModifyVpcEndpointInput) (*ec2.ModifyVpcEndpointOutput, error) + + MonitorInstancesRequest(*ec2.MonitorInstancesInput) (*request.Request, *ec2.MonitorInstancesOutput) + MonitorInstances(*ec2.MonitorInstancesInput) (*ec2.MonitorInstancesOutput, error) - MoveAddressToVPC(*ec2.MoveAddressToVPCInput) (*ec2.MoveAddressToVPCOutput, error) + MoveAddressToVpcRequest(*ec2.MoveAddressToVpcInput) (*request.Request, *ec2.MoveAddressToVpcOutput) + + MoveAddressToVpc(*ec2.MoveAddressToVpcInput) (*ec2.MoveAddressToVpcOutput, error) + + PurchaseReservedInstancesOfferingRequest(*ec2.PurchaseReservedInstancesOfferingInput) (*request.Request, *ec2.PurchaseReservedInstancesOfferingOutput) PurchaseReservedInstancesOffering(*ec2.PurchaseReservedInstancesOfferingInput) (*ec2.PurchaseReservedInstancesOfferingOutput, error) + RebootInstancesRequest(*ec2.RebootInstancesInput) (*request.Request, *ec2.RebootInstancesOutput) + RebootInstances(*ec2.RebootInstancesInput) (*ec2.RebootInstancesOutput, error) + RegisterImageRequest(*ec2.RegisterImageInput) (*request.Request, *ec2.RegisterImageOutput) + RegisterImage(*ec2.RegisterImageInput) (*ec2.RegisterImageOutput, error) - RejectVPCPeeringConnection(*ec2.RejectVPCPeeringConnectionInput) (*ec2.RejectVPCPeeringConnectionOutput, error) + RejectVpcPeeringConnectionRequest(*ec2.RejectVpcPeeringConnectionInput) (*request.Request, *ec2.RejectVpcPeeringConnectionOutput) + + RejectVpcPeeringConnection(*ec2.RejectVpcPeeringConnectionInput) (*ec2.RejectVpcPeeringConnectionOutput, error) + + ReleaseAddressRequest(*ec2.ReleaseAddressInput) (*request.Request, *ec2.ReleaseAddressOutput) ReleaseAddress(*ec2.ReleaseAddressInput) (*ec2.ReleaseAddressOutput, error) - ReplaceNetworkACLAssociation(*ec2.ReplaceNetworkACLAssociationInput) (*ec2.ReplaceNetworkACLAssociationOutput, error) + ReplaceNetworkAclAssociationRequest(*ec2.ReplaceNetworkAclAssociationInput) (*request.Request, *ec2.ReplaceNetworkAclAssociationOutput) - ReplaceNetworkACLEntry(*ec2.ReplaceNetworkACLEntryInput) (*ec2.ReplaceNetworkACLEntryOutput, error) + ReplaceNetworkAclAssociation(*ec2.ReplaceNetworkAclAssociationInput) (*ec2.ReplaceNetworkAclAssociationOutput, error) + + ReplaceNetworkAclEntryRequest(*ec2.ReplaceNetworkAclEntryInput) (*request.Request, *ec2.ReplaceNetworkAclEntryOutput) + + ReplaceNetworkAclEntry(*ec2.ReplaceNetworkAclEntryInput) (*ec2.ReplaceNetworkAclEntryOutput, error) + + ReplaceRouteRequest(*ec2.ReplaceRouteInput) (*request.Request, *ec2.ReplaceRouteOutput) ReplaceRoute(*ec2.ReplaceRouteInput) (*ec2.ReplaceRouteOutput, error) + ReplaceRouteTableAssociationRequest(*ec2.ReplaceRouteTableAssociationInput) (*request.Request, *ec2.ReplaceRouteTableAssociationOutput) + ReplaceRouteTableAssociation(*ec2.ReplaceRouteTableAssociationInput) (*ec2.ReplaceRouteTableAssociationOutput, error) + ReportInstanceStatusRequest(*ec2.ReportInstanceStatusInput) (*request.Request, *ec2.ReportInstanceStatusOutput) + ReportInstanceStatus(*ec2.ReportInstanceStatusInput) (*ec2.ReportInstanceStatusOutput, error) + RequestSpotFleetRequest(*ec2.RequestSpotFleetInput) (*request.Request, *ec2.RequestSpotFleetOutput) + RequestSpotFleet(*ec2.RequestSpotFleetInput) (*ec2.RequestSpotFleetOutput, error) + RequestSpotInstancesRequest(*ec2.RequestSpotInstancesInput) (*request.Request, *ec2.RequestSpotInstancesOutput) + RequestSpotInstances(*ec2.RequestSpotInstancesInput) (*ec2.RequestSpotInstancesOutput, error) + ResetImageAttributeRequest(*ec2.ResetImageAttributeInput) (*request.Request, *ec2.ResetImageAttributeOutput) + ResetImageAttribute(*ec2.ResetImageAttributeInput) (*ec2.ResetImageAttributeOutput, error) + ResetInstanceAttributeRequest(*ec2.ResetInstanceAttributeInput) (*request.Request, *ec2.ResetInstanceAttributeOutput) + ResetInstanceAttribute(*ec2.ResetInstanceAttributeInput) (*ec2.ResetInstanceAttributeOutput, error) + ResetNetworkInterfaceAttributeRequest(*ec2.ResetNetworkInterfaceAttributeInput) (*request.Request, *ec2.ResetNetworkInterfaceAttributeOutput) + ResetNetworkInterfaceAttribute(*ec2.ResetNetworkInterfaceAttributeInput) (*ec2.ResetNetworkInterfaceAttributeOutput, error) + ResetSnapshotAttributeRequest(*ec2.ResetSnapshotAttributeInput) (*request.Request, *ec2.ResetSnapshotAttributeOutput) + ResetSnapshotAttribute(*ec2.ResetSnapshotAttributeInput) (*ec2.ResetSnapshotAttributeOutput, error) + RestoreAddressToClassicRequest(*ec2.RestoreAddressToClassicInput) (*request.Request, *ec2.RestoreAddressToClassicOutput) + RestoreAddressToClassic(*ec2.RestoreAddressToClassicInput) (*ec2.RestoreAddressToClassicOutput, error) + RevokeSecurityGroupEgressRequest(*ec2.RevokeSecurityGroupEgressInput) (*request.Request, *ec2.RevokeSecurityGroupEgressOutput) + RevokeSecurityGroupEgress(*ec2.RevokeSecurityGroupEgressInput) (*ec2.RevokeSecurityGroupEgressOutput, error) + RevokeSecurityGroupIngressRequest(*ec2.RevokeSecurityGroupIngressInput) (*request.Request, *ec2.RevokeSecurityGroupIngressOutput) + RevokeSecurityGroupIngress(*ec2.RevokeSecurityGroupIngressInput) (*ec2.RevokeSecurityGroupIngressOutput, error) + RunInstancesRequest(*ec2.RunInstancesInput) (*request.Request, *ec2.Reservation) + RunInstances(*ec2.RunInstancesInput) (*ec2.Reservation, error) + StartInstancesRequest(*ec2.StartInstancesInput) (*request.Request, *ec2.StartInstancesOutput) + StartInstances(*ec2.StartInstancesInput) (*ec2.StartInstancesOutput, error) + StopInstancesRequest(*ec2.StopInstancesInput) (*request.Request, *ec2.StopInstancesOutput) + StopInstances(*ec2.StopInstancesInput) (*ec2.StopInstancesOutput, error) + TerminateInstancesRequest(*ec2.TerminateInstancesInput) (*request.Request, *ec2.TerminateInstancesOutput) + TerminateInstances(*ec2.TerminateInstancesInput) (*ec2.TerminateInstancesOutput, error) - UnassignPrivateIPAddresses(*ec2.UnassignPrivateIPAddressesInput) (*ec2.UnassignPrivateIPAddressesOutput, error) + UnassignPrivateIpAddressesRequest(*ec2.UnassignPrivateIpAddressesInput) (*request.Request, *ec2.UnassignPrivateIpAddressesOutput) + + UnassignPrivateIpAddresses(*ec2.UnassignPrivateIpAddressesInput) (*ec2.UnassignPrivateIpAddressesOutput, error) + + UnmonitorInstancesRequest(*ec2.UnmonitorInstancesInput) (*request.Request, *ec2.UnmonitorInstancesOutput) UnmonitorInstances(*ec2.UnmonitorInstancesInput) (*ec2.UnmonitorInstancesOutput, error) } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go index 76b63320285..6da3b190cc2 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go @@ -8,40 +8,30 @@ import ( "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/service/ec2" ) var _ time.Duration var _ bytes.Buffer -func ExampleEC2_AcceptVPCPeeringConnection() { +func ExampleEC2_AcceptVpcPeeringConnection() { svc := ec2.New(nil) - params := &ec2.AcceptVPCPeeringConnectionInput{ - DryRun: aws.Boolean(true), - VPCPeeringConnectionID: aws.String("String"), + params := &ec2.AcceptVpcPeeringConnectionInput{ + DryRun: aws.Bool(true), + VpcPeeringConnectionId: aws.String("String"), } - resp, err := svc.AcceptVPCPeeringConnection(params) + resp, err := svc.AcceptVpcPeeringConnection(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_AllocateAddress() { @@ -49,272 +39,179 @@ func ExampleEC2_AllocateAddress() { params := &ec2.AllocateAddressInput{ Domain: aws.String("DomainType"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.AllocateAddress(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_AssignPrivateIPAddresses() { +func ExampleEC2_AssignPrivateIpAddresses() { svc := ec2.New(nil) - params := &ec2.AssignPrivateIPAddressesInput{ - NetworkInterfaceID: aws.String("String"), // Required - AllowReassignment: aws.Boolean(true), - PrivateIPAddresses: []*string{ + params := &ec2.AssignPrivateIpAddressesInput{ + NetworkInterfaceId: aws.String("String"), // Required + AllowReassignment: aws.Bool(true), + PrivateIpAddresses: []*string{ aws.String("String"), // Required // More values... }, - SecondaryPrivateIPAddressCount: aws.Long(1), + SecondaryPrivateIpAddressCount: aws.Int64(1), } - resp, err := svc.AssignPrivateIPAddresses(params) + resp, err := svc.AssignPrivateIpAddresses(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_AssociateAddress() { svc := ec2.New(nil) params := &ec2.AssociateAddressInput{ - AllocationID: aws.String("String"), - AllowReassociation: aws.Boolean(true), - DryRun: aws.Boolean(true), - InstanceID: aws.String("String"), - NetworkInterfaceID: aws.String("String"), - PrivateIPAddress: aws.String("String"), - PublicIP: aws.String("String"), + AllocationId: aws.String("String"), + AllowReassociation: aws.Bool(true), + DryRun: aws.Bool(true), + InstanceId: aws.String("String"), + NetworkInterfaceId: aws.String("String"), + PrivateIpAddress: aws.String("String"), + PublicIp: aws.String("String"), } resp, err := svc.AssociateAddress(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_AssociateDHCPOptions() { +func ExampleEC2_AssociateDhcpOptions() { svc := ec2.New(nil) - params := &ec2.AssociateDHCPOptionsInput{ - DHCPOptionsID: aws.String("String"), // Required - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.AssociateDhcpOptionsInput{ + DhcpOptionsId: aws.String("String"), // Required + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.AssociateDHCPOptions(params) + resp, err := svc.AssociateDhcpOptions(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_AssociateRouteTable() { svc := ec2.New(nil) params := &ec2.AssociateRouteTableInput{ - RouteTableID: aws.String("String"), // Required - SubnetID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + RouteTableId: aws.String("String"), // Required + SubnetId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.AssociateRouteTable(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_AttachClassicLinkVPC() { +func ExampleEC2_AttachClassicLinkVpc() { svc := ec2.New(nil) - params := &ec2.AttachClassicLinkVPCInput{ + params := &ec2.AttachClassicLinkVpcInput{ Groups: []*string{ // Required aws.String("String"), // Required // More values... }, - InstanceID: aws.String("String"), // Required - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InstanceId: aws.String("String"), // Required + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.AttachClassicLinkVPC(params) + resp, err := svc.AttachClassicLinkVpc(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_AttachInternetGateway() { svc := ec2.New(nil) params := &ec2.AttachInternetGatewayInput{ - InternetGatewayID: aws.String("String"), // Required - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InternetGatewayId: aws.String("String"), // Required + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.AttachInternetGateway(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_AttachNetworkInterface() { svc := ec2.New(nil) params := &ec2.AttachNetworkInterfaceInput{ - DeviceIndex: aws.Long(1), // Required - InstanceID: aws.String("String"), // Required - NetworkInterfaceID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + DeviceIndex: aws.Int64(1), // Required + InstanceId: aws.String("String"), // Required + NetworkInterfaceId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.AttachNetworkInterface(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_AttachVPNGateway() { - svc := ec2.New(nil) - - params := &ec2.AttachVPNGatewayInput{ - VPCID: aws.String("String"), // Required - VPNGatewayID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - } - resp, err := svc.AttachVPNGateway(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_AttachVolume() { @@ -322,275 +219,240 @@ func ExampleEC2_AttachVolume() { params := &ec2.AttachVolumeInput{ Device: aws.String("String"), // Required - InstanceID: aws.String("String"), // Required - VolumeID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InstanceId: aws.String("String"), // Required + VolumeId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.AttachVolume(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_AttachVpnGateway() { + svc := ec2.New(nil) + + params := &ec2.AttachVpnGatewayInput{ + VpcId: aws.String("String"), // Required + VpnGatewayId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.AttachVpnGateway(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_AuthorizeSecurityGroupEgress() { svc := ec2.New(nil) params := &ec2.AuthorizeSecurityGroupEgressInput{ - GroupID: aws.String("String"), // Required - CIDRIP: aws.String("String"), - DryRun: aws.Boolean(true), - FromPort: aws.Long(1), - IPPermissions: []*ec2.IPPermission{ - &ec2.IPPermission{ // Required - FromPort: aws.Long(1), - IPProtocol: aws.String("String"), - IPRanges: []*ec2.IPRange{ - &ec2.IPRange{ // Required - CIDRIP: aws.String("String"), + GroupId: aws.String("String"), // Required + CidrIp: aws.String("String"), + DryRun: aws.Bool(true), + FromPort: aws.Int64(1), + IpPermissions: []*ec2.IpPermission{ + { // Required + FromPort: aws.Int64(1), + IpProtocol: aws.String("String"), + IpRanges: []*ec2.IpRange{ + { // Required + CidrIp: aws.String("String"), }, // More values... }, - PrefixListIDs: []*ec2.PrefixListID{ - &ec2.PrefixListID{ // Required - PrefixListID: aws.String("String"), + PrefixListIds: []*ec2.PrefixListId{ + { // Required + PrefixListId: aws.String("String"), }, // More values... }, - ToPort: aws.Long(1), - UserIDGroupPairs: []*ec2.UserIDGroupPair{ - &ec2.UserIDGroupPair{ // Required - GroupID: aws.String("String"), + ToPort: aws.Int64(1), + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + { // Required + GroupId: aws.String("String"), GroupName: aws.String("String"), - UserID: aws.String("String"), + UserId: aws.String("String"), }, // More values... }, }, // More values... }, - IPProtocol: aws.String("String"), + IpProtocol: aws.String("String"), SourceSecurityGroupName: aws.String("String"), - SourceSecurityGroupOwnerID: aws.String("String"), - ToPort: aws.Long(1), + SourceSecurityGroupOwnerId: aws.String("String"), + ToPort: aws.Int64(1), } resp, err := svc.AuthorizeSecurityGroupEgress(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_AuthorizeSecurityGroupIngress() { svc := ec2.New(nil) params := &ec2.AuthorizeSecurityGroupIngressInput{ - CIDRIP: aws.String("String"), - DryRun: aws.Boolean(true), - FromPort: aws.Long(1), - GroupID: aws.String("String"), + CidrIp: aws.String("String"), + DryRun: aws.Bool(true), + FromPort: aws.Int64(1), + GroupId: aws.String("String"), GroupName: aws.String("String"), - IPPermissions: []*ec2.IPPermission{ - &ec2.IPPermission{ // Required - FromPort: aws.Long(1), - IPProtocol: aws.String("String"), - IPRanges: []*ec2.IPRange{ - &ec2.IPRange{ // Required - CIDRIP: aws.String("String"), + IpPermissions: []*ec2.IpPermission{ + { // Required + FromPort: aws.Int64(1), + IpProtocol: aws.String("String"), + IpRanges: []*ec2.IpRange{ + { // Required + CidrIp: aws.String("String"), }, // More values... }, - PrefixListIDs: []*ec2.PrefixListID{ - &ec2.PrefixListID{ // Required - PrefixListID: aws.String("String"), + PrefixListIds: []*ec2.PrefixListId{ + { // Required + PrefixListId: aws.String("String"), }, // More values... }, - ToPort: aws.Long(1), - UserIDGroupPairs: []*ec2.UserIDGroupPair{ - &ec2.UserIDGroupPair{ // Required - GroupID: aws.String("String"), + ToPort: aws.Int64(1), + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + { // Required + GroupId: aws.String("String"), GroupName: aws.String("String"), - UserID: aws.String("String"), + UserId: aws.String("String"), }, // More values... }, }, // More values... }, - IPProtocol: aws.String("String"), + IpProtocol: aws.String("String"), SourceSecurityGroupName: aws.String("String"), - SourceSecurityGroupOwnerID: aws.String("String"), - ToPort: aws.Long(1), + SourceSecurityGroupOwnerId: aws.String("String"), + ToPort: aws.Int64(1), } resp, err := svc.AuthorizeSecurityGroupIngress(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_BundleInstance() { svc := ec2.New(nil) params := &ec2.BundleInstanceInput{ - InstanceID: aws.String("String"), // Required + InstanceId: aws.String("String"), // Required Storage: &ec2.Storage{ // Required S3: &ec2.S3Storage{ - AWSAccessKeyID: aws.String("String"), + AWSAccessKeyId: aws.String("String"), Bucket: aws.String("String"), Prefix: aws.String("String"), UploadPolicy: []byte("PAYLOAD"), UploadPolicySignature: aws.String("String"), }, }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.BundleInstance(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CancelBundleTask() { svc := ec2.New(nil) params := &ec2.CancelBundleTaskInput{ - BundleID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + BundleId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.CancelBundleTask(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CancelConversionTask() { svc := ec2.New(nil) params := &ec2.CancelConversionTaskInput{ - ConversionTaskID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + ConversionTaskId: aws.String("String"), // Required + DryRun: aws.Bool(true), ReasonMessage: aws.String("String"), } resp, err := svc.CancelConversionTask(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CancelExportTask() { svc := ec2.New(nil) params := &ec2.CancelExportTaskInput{ - ExportTaskID: aws.String("String"), // Required + ExportTaskId: aws.String("String"), // Required } resp, err := svc.CancelExportTask(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CancelImportTask() { @@ -598,147 +460,107 @@ func ExampleEC2_CancelImportTask() { params := &ec2.CancelImportTaskInput{ CancelReason: aws.String("String"), - DryRun: aws.Boolean(true), - ImportTaskID: aws.String("String"), + DryRun: aws.Bool(true), + ImportTaskId: aws.String("String"), } resp, err := svc.CancelImportTask(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CancelReservedInstancesListing() { svc := ec2.New(nil) params := &ec2.CancelReservedInstancesListingInput{ - ReservedInstancesListingID: aws.String("String"), // Required + ReservedInstancesListingId: aws.String("String"), // Required } resp, err := svc.CancelReservedInstancesListing(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CancelSpotFleetRequests() { svc := ec2.New(nil) params := &ec2.CancelSpotFleetRequestsInput{ - SpotFleetRequestIDs: []*string{ // Required + SpotFleetRequestIds: []*string{ // Required aws.String("String"), // Required // More values... }, - TerminateInstances: aws.Boolean(true), // Required - DryRun: aws.Boolean(true), + TerminateInstances: aws.Bool(true), // Required + DryRun: aws.Bool(true), } resp, err := svc.CancelSpotFleetRequests(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CancelSpotInstanceRequests() { svc := ec2.New(nil) params := &ec2.CancelSpotInstanceRequestsInput{ - SpotInstanceRequestIDs: []*string{ // Required + SpotInstanceRequestIds: []*string{ // Required aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CancelSpotInstanceRequests(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ConfirmProductInstance() { svc := ec2.New(nil) params := &ec2.ConfirmProductInstanceInput{ - InstanceID: aws.String("String"), // Required + InstanceId: aws.String("String"), // Required ProductCode: aws.String("String"), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.ConfirmProductInstance(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CopyImage() { @@ -746,31 +568,23 @@ func ExampleEC2_CopyImage() { params := &ec2.CopyImageInput{ Name: aws.String("String"), // Required - SourceImageID: aws.String("String"), // Required + SourceImageId: aws.String("String"), // Required SourceRegion: aws.String("String"), // Required ClientToken: aws.String("String"), Description: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CopyImage(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CopySnapshot() { @@ -778,69 +592,55 @@ func ExampleEC2_CopySnapshot() { params := &ec2.CopySnapshotInput{ SourceRegion: aws.String("String"), // Required - SourceSnapshotID: aws.String("String"), // Required + SourceSnapshotId: aws.String("String"), // Required Description: aws.String("String"), DestinationRegion: aws.String("String"), - DryRun: aws.Boolean(true), - PresignedURL: aws.String("String"), + DryRun: aws.Bool(true), + Encrypted: aws.Bool(true), + KmsKeyId: aws.String("String"), + PresignedUrl: aws.String("String"), } resp, err := svc.CopySnapshot(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateCustomerGateway() { svc := ec2.New(nil) params := &ec2.CreateCustomerGatewayInput{ - BGPASN: aws.Long(1), // Required - PublicIP: aws.String("String"), // Required + BgpAsn: aws.Int64(1), // Required + PublicIp: aws.String("String"), // Required Type: aws.String("GatewayType"), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CreateCustomerGateway(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_CreateDHCPOptions() { +func ExampleEC2_CreateDhcpOptions() { svc := ec2.New(nil) - params := &ec2.CreateDHCPOptionsInput{ - DHCPConfigurations: []*ec2.NewDHCPConfiguration{ // Required - &ec2.NewDHCPConfiguration{ // Required + params := &ec2.CreateDhcpOptionsInput{ + DhcpConfigurations: []*ec2.NewDhcpConfiguration{ // Required + { // Required Key: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -849,44 +649,63 @@ func ExampleEC2_CreateDHCPOptions() { }, // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } - resp, err := svc.CreateDHCPOptions(params) + resp, err := svc.CreateDhcpOptions(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_CreateFlowLogs() { + svc := ec2.New(nil) + + params := &ec2.CreateFlowLogsInput{ + DeliverLogsPermissionArn: aws.String("String"), // Required + LogGroupName: aws.String("String"), // Required + ResourceIds: []*string{ // Required + aws.String("String"), // Required + // More values... + }, + ResourceType: aws.String("FlowLogsResourceType"), // Required + TrafficType: aws.String("TrafficType"), // Required + ClientToken: aws.String("String"), + } + resp, err := svc.CreateFlowLogs(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_CreateImage() { svc := ec2.New(nil) params := &ec2.CreateImageInput{ - InstanceID: aws.String("String"), // Required + InstanceId: aws.String("String"), // Required Name: aws.String("String"), // Required BlockDeviceMappings: []*ec2.BlockDeviceMapping{ - &ec2.BlockDeviceMapping{ // Required + { // Required DeviceName: aws.String("String"), - EBS: &ec2.EBSBlockDevice{ - DeleteOnTermination: aws.Boolean(true), - Encrypted: aws.Boolean(true), - IOPS: aws.Long(1), - SnapshotID: aws.String("String"), - VolumeSize: aws.Long(1), + Ebs: &ec2.EbsBlockDevice{ + DeleteOnTermination: aws.Bool(true), + Encrypted: aws.Bool(true), + Iops: aws.Int64(1), + SnapshotId: aws.String("String"), + VolumeSize: aws.Int64(1), VolumeType: aws.String("VolumeType"), }, NoDevice: aws.String("String"), @@ -895,35 +714,27 @@ func ExampleEC2_CreateImage() { // More values... }, Description: aws.String("String"), - DryRun: aws.Boolean(true), - NoReboot: aws.Boolean(true), + DryRun: aws.Bool(true), + NoReboot: aws.Bool(true), } resp, err := svc.CreateImage(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateInstanceExportTask() { svc := ec2.New(nil) params := &ec2.CreateInstanceExportTaskInput{ - InstanceID: aws.String("String"), // Required + InstanceId: aws.String("String"), // Required Description: aws.String("String"), ExportToS3Task: &ec2.ExportToS3TaskSpecification{ ContainerFormat: aws.String("ContainerFormat"), @@ -936,49 +747,33 @@ func ExampleEC2_CreateInstanceExportTask() { resp, err := svc.CreateInstanceExportTask(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateInternetGateway() { svc := ec2.New(nil) params := &ec2.CreateInternetGatewayInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CreateInternetGateway(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateKeyPair() { @@ -986,138 +781,106 @@ func ExampleEC2_CreateKeyPair() { params := &ec2.CreateKeyPairInput{ KeyName: aws.String("String"), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CreateKeyPair(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_CreateNetworkACL() { +func ExampleEC2_CreateNetworkAcl() { svc := ec2.New(nil) - params := &ec2.CreateNetworkACLInput{ - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.CreateNetworkAclInput{ + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.CreateNetworkACL(params) + resp, err := svc.CreateNetworkAcl(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_CreateNetworkACLEntry() { +func ExampleEC2_CreateNetworkAclEntry() { svc := ec2.New(nil) - params := &ec2.CreateNetworkACLEntryInput{ - CIDRBlock: aws.String("String"), // Required - Egress: aws.Boolean(true), // Required - NetworkACLID: aws.String("String"), // Required + params := &ec2.CreateNetworkAclEntryInput{ + CidrBlock: aws.String("String"), // Required + Egress: aws.Bool(true), // Required + NetworkAclId: aws.String("String"), // Required Protocol: aws.String("String"), // Required RuleAction: aws.String("RuleAction"), // Required - RuleNumber: aws.Long(1), // Required - DryRun: aws.Boolean(true), - ICMPTypeCode: &ec2.ICMPTypeCode{ - Code: aws.Long(1), - Type: aws.Long(1), + RuleNumber: aws.Int64(1), // Required + DryRun: aws.Bool(true), + IcmpTypeCode: &ec2.IcmpTypeCode{ + Code: aws.Int64(1), + Type: aws.Int64(1), }, PortRange: &ec2.PortRange{ - From: aws.Long(1), - To: aws.Long(1), + From: aws.Int64(1), + To: aws.Int64(1), }, } - resp, err := svc.CreateNetworkACLEntry(params) + resp, err := svc.CreateNetworkAclEntry(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateNetworkInterface() { svc := ec2.New(nil) params := &ec2.CreateNetworkInterfaceInput{ - SubnetID: aws.String("String"), // Required + SubnetId: aws.String("String"), // Required Description: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Groups: []*string{ aws.String("String"), // Required // More values... }, - PrivateIPAddress: aws.String("String"), - PrivateIPAddresses: []*ec2.PrivateIPAddressSpecification{ - &ec2.PrivateIPAddressSpecification{ // Required - PrivateIPAddress: aws.String("String"), // Required - Primary: aws.Boolean(true), + PrivateIpAddress: aws.String("String"), + PrivateIpAddresses: []*ec2.PrivateIpAddressSpecification{ + { // Required + PrivateIpAddress: aws.String("String"), // Required + Primary: aws.Bool(true), }, // More values... }, - SecondaryPrivateIPAddressCount: aws.Long(1), + SecondaryPrivateIpAddressCount: aws.Int64(1), } resp, err := svc.CreateNetworkInterface(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreatePlacementGroup() { @@ -1126,27 +889,19 @@ func ExampleEC2_CreatePlacementGroup() { params := &ec2.CreatePlacementGroupInput{ GroupName: aws.String("String"), // Required Strategy: aws.String("PlacementStrategy"), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CreatePlacementGroup(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateReservedInstancesListing() { @@ -1154,98 +909,73 @@ func ExampleEC2_CreateReservedInstancesListing() { params := &ec2.CreateReservedInstancesListingInput{ ClientToken: aws.String("String"), // Required - InstanceCount: aws.Long(1), // Required + InstanceCount: aws.Int64(1), // Required PriceSchedules: []*ec2.PriceScheduleSpecification{ // Required - &ec2.PriceScheduleSpecification{ // Required + { // Required CurrencyCode: aws.String("CurrencyCodeValues"), - Price: aws.Double(1.0), - Term: aws.Long(1), + Price: aws.Float64(1.0), + Term: aws.Int64(1), }, // More values... }, - ReservedInstancesID: aws.String("String"), // Required + ReservedInstancesId: aws.String("String"), // Required } resp, err := svc.CreateReservedInstancesListing(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateRoute() { svc := ec2.New(nil) params := &ec2.CreateRouteInput{ - DestinationCIDRBlock: aws.String("String"), // Required - RouteTableID: aws.String("String"), // Required - ClientToken: aws.String("String"), - DryRun: aws.Boolean(true), - GatewayID: aws.String("String"), - InstanceID: aws.String("String"), - NetworkInterfaceID: aws.String("String"), - VPCPeeringConnectionID: aws.String("String"), + DestinationCidrBlock: aws.String("String"), // Required + RouteTableId: aws.String("String"), // Required + DryRun: aws.Bool(true), + GatewayId: aws.String("String"), + InstanceId: aws.String("String"), + NetworkInterfaceId: aws.String("String"), + VpcPeeringConnectionId: aws.String("String"), } resp, err := svc.CreateRoute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateRouteTable() { svc := ec2.New(nil) params := &ec2.CreateRouteTableInput{ - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.CreateRouteTable(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateSecurityGroup() { @@ -1254,57 +984,41 @@ func ExampleEC2_CreateSecurityGroup() { params := &ec2.CreateSecurityGroupInput{ Description: aws.String("String"), // Required GroupName: aws.String("String"), // Required - DryRun: aws.Boolean(true), - VPCID: aws.String("String"), + DryRun: aws.Bool(true), + VpcId: aws.String("String"), } resp, err := svc.CreateSecurityGroup(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateSnapshot() { svc := ec2.New(nil) params := &ec2.CreateSnapshotInput{ - VolumeID: aws.String("String"), // Required + VolumeId: aws.String("String"), // Required Description: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CreateSnapshot(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateSpotDatafeedSubscription() { @@ -1312,58 +1026,42 @@ func ExampleEC2_CreateSpotDatafeedSubscription() { params := &ec2.CreateSpotDatafeedSubscriptionInput{ Bucket: aws.String("String"), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Prefix: aws.String("String"), } resp, err := svc.CreateSpotDatafeedSubscription(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateSubnet() { svc := ec2.New(nil) params := &ec2.CreateSubnetInput{ - CIDRBlock: aws.String("String"), // Required - VPCID: aws.String("String"), // Required + CidrBlock: aws.String("String"), // Required + VpcId: aws.String("String"), // Required AvailabilityZone: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CreateSubnet(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateTags() { @@ -1375,217 +1073,25 @@ func ExampleEC2_CreateTags() { // More values... }, Tags: []*ec2.Tag{ // Required - &ec2.Tag{ // Required + { // Required Key: aws.String("String"), Value: aws.String("String"), }, // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.CreateTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_CreateVPC() { - svc := ec2.New(nil) - - params := &ec2.CreateVPCInput{ - CIDRBlock: aws.String("String"), // Required - DryRun: aws.Boolean(true), - InstanceTenancy: aws.String("Tenancy"), - } - resp, err := svc.CreateVPC(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_CreateVPCEndpoint() { - svc := ec2.New(nil) - - params := &ec2.CreateVPCEndpointInput{ - ServiceName: aws.String("String"), // Required - VPCID: aws.String("String"), // Required - ClientToken: aws.String("String"), - DryRun: aws.Boolean(true), - PolicyDocument: aws.String("String"), - RouteTableIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - } - resp, err := svc.CreateVPCEndpoint(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_CreateVPCPeeringConnection() { - svc := ec2.New(nil) - - params := &ec2.CreateVPCPeeringConnectionInput{ - DryRun: aws.Boolean(true), - PeerOwnerID: aws.String("String"), - PeerVPCID: aws.String("String"), - VPCID: aws.String("String"), - } - resp, err := svc.CreateVPCPeeringConnection(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_CreateVPNConnection() { - svc := ec2.New(nil) - - params := &ec2.CreateVPNConnectionInput{ - CustomerGatewayID: aws.String("String"), // Required - Type: aws.String("String"), // Required - VPNGatewayID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - Options: &ec2.VPNConnectionOptionsSpecification{ - StaticRoutesOnly: aws.Boolean(true), - }, - } - resp, err := svc.CreateVPNConnection(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_CreateVPNConnectionRoute() { - svc := ec2.New(nil) - - params := &ec2.CreateVPNConnectionRouteInput{ - DestinationCIDRBlock: aws.String("String"), // Required - VPNConnectionID: aws.String("String"), // Required - } - resp, err := svc.CreateVPNConnectionRoute(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_CreateVPNGateway() { - svc := ec2.New(nil) - - params := &ec2.CreateVPNGatewayInput{ - Type: aws.String("GatewayType"), // Required - AvailabilityZone: aws.String("String"), - DryRun: aws.Boolean(true), - } - resp, err := svc.CreateVPNGateway(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_CreateVolume() { @@ -1593,117 +1099,243 @@ func ExampleEC2_CreateVolume() { params := &ec2.CreateVolumeInput{ AvailabilityZone: aws.String("String"), // Required - DryRun: aws.Boolean(true), - Encrypted: aws.Boolean(true), - IOPS: aws.Long(1), - KMSKeyID: aws.String("String"), - Size: aws.Long(1), - SnapshotID: aws.String("String"), + DryRun: aws.Bool(true), + Encrypted: aws.Bool(true), + Iops: aws.Int64(1), + KmsKeyId: aws.String("String"), + Size: aws.Int64(1), + SnapshotId: aws.String("String"), VolumeType: aws.String("VolumeType"), } resp, err := svc.CreateVolume(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_CreateVpc() { + svc := ec2.New(nil) + + params := &ec2.CreateVpcInput{ + CidrBlock: aws.String("String"), // Required + DryRun: aws.Bool(true), + InstanceTenancy: aws.String("Tenancy"), + } + resp, err := svc.CreateVpc(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_CreateVpcEndpoint() { + svc := ec2.New(nil) + + params := &ec2.CreateVpcEndpointInput{ + ServiceName: aws.String("String"), // Required + VpcId: aws.String("String"), // Required + ClientToken: aws.String("String"), + DryRun: aws.Bool(true), + PolicyDocument: aws.String("String"), + RouteTableIds: []*string{ + aws.String("String"), // Required + // More values... + }, + } + resp, err := svc.CreateVpcEndpoint(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_CreateVpcPeeringConnection() { + svc := ec2.New(nil) + + params := &ec2.CreateVpcPeeringConnectionInput{ + DryRun: aws.Bool(true), + PeerOwnerId: aws.String("String"), + PeerVpcId: aws.String("String"), + VpcId: aws.String("String"), + } + resp, err := svc.CreateVpcPeeringConnection(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_CreateVpnConnection() { + svc := ec2.New(nil) + + params := &ec2.CreateVpnConnectionInput{ + CustomerGatewayId: aws.String("String"), // Required + Type: aws.String("String"), // Required + VpnGatewayId: aws.String("String"), // Required + DryRun: aws.Bool(true), + Options: &ec2.VpnConnectionOptionsSpecification{ + StaticRoutesOnly: aws.Bool(true), + }, + } + resp, err := svc.CreateVpnConnection(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_CreateVpnConnectionRoute() { + svc := ec2.New(nil) + + params := &ec2.CreateVpnConnectionRouteInput{ + DestinationCidrBlock: aws.String("String"), // Required + VpnConnectionId: aws.String("String"), // Required + } + resp, err := svc.CreateVpnConnectionRoute(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_CreateVpnGateway() { + svc := ec2.New(nil) + + params := &ec2.CreateVpnGatewayInput{ + Type: aws.String("GatewayType"), // Required + AvailabilityZone: aws.String("String"), + DryRun: aws.Bool(true), + } + resp, err := svc.CreateVpnGateway(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_DeleteCustomerGateway() { svc := ec2.New(nil) params := &ec2.DeleteCustomerGatewayInput{ - CustomerGatewayID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + CustomerGatewayId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeleteCustomerGateway(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DeleteDHCPOptions() { +func ExampleEC2_DeleteDhcpOptions() { svc := ec2.New(nil) - params := &ec2.DeleteDHCPOptionsInput{ - DHCPOptionsID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.DeleteDhcpOptionsInput{ + DhcpOptionsId: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.DeleteDHCPOptions(params) + resp, err := svc.DeleteDhcpOptions(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_DeleteFlowLogs() { + svc := ec2.New(nil) + + params := &ec2.DeleteFlowLogsInput{ + FlowLogIds: []*string{ // Required + aws.String("String"), // Required + // More values... + }, + } + resp, err := svc.DeleteFlowLogs(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_DeleteInternetGateway() { svc := ec2.New(nil) params := &ec2.DeleteInternetGatewayInput{ - InternetGatewayID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InternetGatewayId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeleteInternetGateway(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteKeyPair() { @@ -1711,113 +1343,81 @@ func ExampleEC2_DeleteKeyPair() { params := &ec2.DeleteKeyPairInput{ KeyName: aws.String("String"), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.DeleteKeyPair(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DeleteNetworkACL() { +func ExampleEC2_DeleteNetworkAcl() { svc := ec2.New(nil) - params := &ec2.DeleteNetworkACLInput{ - NetworkACLID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.DeleteNetworkAclInput{ + NetworkAclId: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.DeleteNetworkACL(params) + resp, err := svc.DeleteNetworkAcl(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DeleteNetworkACLEntry() { +func ExampleEC2_DeleteNetworkAclEntry() { svc := ec2.New(nil) - params := &ec2.DeleteNetworkACLEntryInput{ - Egress: aws.Boolean(true), // Required - NetworkACLID: aws.String("String"), // Required - RuleNumber: aws.Long(1), // Required - DryRun: aws.Boolean(true), + params := &ec2.DeleteNetworkAclEntryInput{ + Egress: aws.Bool(true), // Required + NetworkAclId: aws.String("String"), // Required + RuleNumber: aws.Int64(1), // Required + DryRun: aws.Bool(true), } - resp, err := svc.DeleteNetworkACLEntry(params) + resp, err := svc.DeleteNetworkAclEntry(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteNetworkInterface() { svc := ec2.New(nil) params := &ec2.DeleteNetworkInterfaceInput{ - NetworkInterfaceID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + NetworkInterfaceId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeleteNetworkInterface(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeletePlacementGroup() { @@ -1825,196 +1425,140 @@ func ExampleEC2_DeletePlacementGroup() { params := &ec2.DeletePlacementGroupInput{ GroupName: aws.String("String"), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.DeletePlacementGroup(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteRoute() { svc := ec2.New(nil) params := &ec2.DeleteRouteInput{ - DestinationCIDRBlock: aws.String("String"), // Required - RouteTableID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + DestinationCidrBlock: aws.String("String"), // Required + RouteTableId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeleteRoute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteRouteTable() { svc := ec2.New(nil) params := &ec2.DeleteRouteTableInput{ - RouteTableID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + RouteTableId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeleteRouteTable(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteSecurityGroup() { svc := ec2.New(nil) params := &ec2.DeleteSecurityGroupInput{ - DryRun: aws.Boolean(true), - GroupID: aws.String("String"), + DryRun: aws.Bool(true), + GroupId: aws.String("String"), GroupName: aws.String("String"), } resp, err := svc.DeleteSecurityGroup(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteSnapshot() { svc := ec2.New(nil) params := &ec2.DeleteSnapshotInput{ - SnapshotID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + SnapshotId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeleteSnapshot(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteSpotDatafeedSubscription() { svc := ec2.New(nil) params := &ec2.DeleteSpotDatafeedSubscriptionInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.DeleteSpotDatafeedSubscription(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteSubnet() { svc := ec2.New(nil) params := &ec2.DeleteSubnetInput{ - SubnetID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + SubnetId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeleteSubnet(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteTags() { @@ -2025,9 +1569,9 @@ func ExampleEC2_DeleteTags() { aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Tags: []*ec2.Tag{ - &ec2.Tag{ // Required + { // Required Key: aws.String("String"), Value: aws.String("String"), }, @@ -2037,249 +1581,177 @@ func ExampleEC2_DeleteTags() { resp, err := svc.DeleteTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DeleteVPC() { - svc := ec2.New(nil) - - params := &ec2.DeleteVPCInput{ - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - } - resp, err := svc.DeleteVPC(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DeleteVPCEndpoints() { - svc := ec2.New(nil) - - params := &ec2.DeleteVPCEndpointsInput{ - VPCEndpointIDs: []*string{ // Required - aws.String("String"), // Required - // More values... - }, - DryRun: aws.Boolean(true), - } - resp, err := svc.DeleteVPCEndpoints(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DeleteVPCPeeringConnection() { - svc := ec2.New(nil) - - params := &ec2.DeleteVPCPeeringConnectionInput{ - VPCPeeringConnectionID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - } - resp, err := svc.DeleteVPCPeeringConnection(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DeleteVPNConnection() { - svc := ec2.New(nil) - - params := &ec2.DeleteVPNConnectionInput{ - VPNConnectionID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - } - resp, err := svc.DeleteVPNConnection(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DeleteVPNConnectionRoute() { - svc := ec2.New(nil) - - params := &ec2.DeleteVPNConnectionRouteInput{ - DestinationCIDRBlock: aws.String("String"), // Required - VPNConnectionID: aws.String("String"), // Required - } - resp, err := svc.DeleteVPNConnectionRoute(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DeleteVPNGateway() { - svc := ec2.New(nil) - - params := &ec2.DeleteVPNGatewayInput{ - VPNGatewayID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - } - resp, err := svc.DeleteVPNGateway(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DeleteVolume() { svc := ec2.New(nil) params := &ec2.DeleteVolumeInput{ - VolumeID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + VolumeId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeleteVolume(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_DeleteVpc() { + svc := ec2.New(nil) + + params := &ec2.DeleteVpcInput{ + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.DeleteVpc(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DeleteVpcEndpoints() { + svc := ec2.New(nil) + + params := &ec2.DeleteVpcEndpointsInput{ + VpcEndpointIds: []*string{ // Required + aws.String("String"), // Required + // More values... + }, + DryRun: aws.Bool(true), + } + resp, err := svc.DeleteVpcEndpoints(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DeleteVpcPeeringConnection() { + svc := ec2.New(nil) + + params := &ec2.DeleteVpcPeeringConnectionInput{ + VpcPeeringConnectionId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.DeleteVpcPeeringConnection(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DeleteVpnConnection() { + svc := ec2.New(nil) + + params := &ec2.DeleteVpnConnectionInput{ + VpnConnectionId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.DeleteVpnConnection(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DeleteVpnConnectionRoute() { + svc := ec2.New(nil) + + params := &ec2.DeleteVpnConnectionRouteInput{ + DestinationCidrBlock: aws.String("String"), // Required + VpnConnectionId: aws.String("String"), // Required + } + resp, err := svc.DeleteVpnConnectionRoute(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DeleteVpnGateway() { + svc := ec2.New(nil) + + params := &ec2.DeleteVpnGatewayInput{ + VpnGatewayId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.DeleteVpnGateway(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_DeregisterImage() { svc := ec2.New(nil) params := &ec2.DeregisterImageInput{ - ImageID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + ImageId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DeregisterImage(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeAccountAttributes() { @@ -2290,40 +1762,32 @@ func ExampleEC2_DescribeAccountAttributes() { aws.String("AccountAttributeName"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.DescribeAccountAttributes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeAddresses() { svc := ec2.New(nil) params := &ec2.DescribeAddressesInput{ - AllocationIDs: []*string{ + AllocationIds: []*string{ aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2332,7 +1796,7 @@ func ExampleEC2_DescribeAddresses() { }, // More values... }, - PublicIPs: []*string{ + PublicIps: []*string{ aws.String("String"), // Required // More values... }, @@ -2340,31 +1804,23 @@ func ExampleEC2_DescribeAddresses() { resp, err := svc.DescribeAddresses(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeAvailabilityZones() { svc := ec2.New(nil) params := &ec2.DescribeAvailabilityZonesInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2381,35 +1837,27 @@ func ExampleEC2_DescribeAvailabilityZones() { resp, err := svc.DescribeAvailabilityZones(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeBundleTasks() { svc := ec2.New(nil) params := &ec2.DescribeBundleTasksInput{ - BundleIDs: []*string{ + BundleIds: []*string{ aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2422,31 +1870,23 @@ func ExampleEC2_DescribeBundleTasks() { resp, err := svc.DescribeBundleTasks(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeClassicLinkInstances() { svc := ec2.New(nil) params := &ec2.DescribeClassicLinkInstancesInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2455,45 +1895,37 @@ func ExampleEC2_DescribeClassicLinkInstances() { }, // More values... }, - InstanceIDs: []*string{ + InstanceIds: []*string{ aws.String("String"), // Required // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), } resp, err := svc.DescribeClassicLinkInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeConversionTasks() { svc := ec2.New(nil) params := &ec2.DescribeConversionTasksInput{ - ConversionTaskIDs: []*string{ + ConversionTaskIds: []*string{ aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2506,35 +1938,27 @@ func ExampleEC2_DescribeConversionTasks() { resp, err := svc.DescribeConversionTasks(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeCustomerGateways() { svc := ec2.New(nil) params := &ec2.DescribeCustomerGatewaysInput{ - CustomerGatewayIDs: []*string{ + CustomerGatewayIds: []*string{ aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2547,35 +1971,27 @@ func ExampleEC2_DescribeCustomerGateways() { resp, err := svc.DescribeCustomerGateways(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DescribeDHCPOptions() { +func ExampleEC2_DescribeDhcpOptions() { svc := ec2.New(nil) - params := &ec2.DescribeDHCPOptionsInput{ - DHCPOptionsIDs: []*string{ + params := &ec2.DescribeDhcpOptionsInput{ + DhcpOptionsIds: []*string{ aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2585,32 +2001,24 @@ func ExampleEC2_DescribeDHCPOptions() { // More values... }, } - resp, err := svc.DescribeDHCPOptions(params) + resp, err := svc.DescribeDhcpOptions(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeExportTasks() { svc := ec2.New(nil) params := &ec2.DescribeExportTasksInput{ - ExportTaskIDs: []*string{ + ExportTaskIds: []*string{ aws.String("String"), // Required // More values... }, @@ -2618,64 +2026,22 @@ func ExampleEC2_DescribeExportTasks() { resp, err := svc.DescribeExportTasks(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DescribeImageAttribute() { +func ExampleEC2_DescribeFlowLogs() { svc := ec2.New(nil) - params := &ec2.DescribeImageAttributeInput{ - Attribute: aws.String("ImageAttributeName"), // Required - ImageID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - } - resp, err := svc.DescribeImageAttribute(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeImages() { - svc := ec2.New(nil) - - params := &ec2.DescribeImagesInput{ - DryRun: aws.Boolean(true), - ExecutableUsers: []*string{ - aws.String("String"), // Required - // More values... - }, - Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + params := &ec2.DescribeFlowLogsInput{ + Filter: []*ec2.Filter{ + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2684,7 +2050,67 @@ func ExampleEC2_DescribeImages() { }, // More values... }, - ImageIDs: []*string{ + FlowLogIds: []*string{ + aws.String("String"), // Required + // More values... + }, + MaxResults: aws.Int64(1), + NextToken: aws.String("String"), + } + resp, err := svc.DescribeFlowLogs(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DescribeImageAttribute() { + svc := ec2.New(nil) + + params := &ec2.DescribeImageAttributeInput{ + Attribute: aws.String("ImageAttributeName"), // Required + ImageId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.DescribeImageAttribute(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DescribeImages() { + svc := ec2.New(nil) + + params := &ec2.DescribeImagesInput{ + DryRun: aws.Bool(true), + ExecutableUsers: []*string{ + aws.String("String"), // Required + // More values... + }, + Filters: []*ec2.Filter{ + { // Required + Name: aws.String("String"), + Values: []*string{ + aws.String("String"), // Required + // More values... + }, + }, + // More values... + }, + ImageIds: []*string{ aws.String("String"), // Required // More values... }, @@ -2696,31 +2122,23 @@ func ExampleEC2_DescribeImages() { resp, err := svc.DescribeImages(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeImportImageTasks() { svc := ec2.New(nil) params := &ec2.DescribeImportImageTasksInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2729,41 +2147,33 @@ func ExampleEC2_DescribeImportImageTasks() { }, // More values... }, - ImportTaskIDs: []*string{ + ImportTaskIds: []*string{ aws.String("String"), // Required // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), } resp, err := svc.DescribeImportImageTasks(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeImportSnapshotTasks() { svc := ec2.New(nil) params := &ec2.DescribeImportSnapshotTasksInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2772,32 +2182,24 @@ func ExampleEC2_DescribeImportSnapshotTasks() { }, // More values... }, - ImportTaskIDs: []*string{ + ImportTaskIds: []*string{ aws.String("String"), // Required // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), } resp, err := svc.DescribeImportSnapshotTasks(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeInstanceAttribute() { @@ -2805,37 +2207,29 @@ func ExampleEC2_DescribeInstanceAttribute() { params := &ec2.DescribeInstanceAttributeInput{ Attribute: aws.String("InstanceAttributeName"), // Required - InstanceID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InstanceId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DescribeInstanceAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeInstanceStatus() { svc := ec2.New(nil) params := &ec2.DescribeInstanceStatusInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2844,42 +2238,34 @@ func ExampleEC2_DescribeInstanceStatus() { }, // More values... }, - IncludeAllInstances: aws.Boolean(true), - InstanceIDs: []*string{ + IncludeAllInstances: aws.Bool(true), + InstanceIds: []*string{ aws.String("String"), // Required // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), } resp, err := svc.DescribeInstanceStatus(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeInstances() { svc := ec2.New(nil) params := &ec2.DescribeInstancesInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2888,41 +2274,33 @@ func ExampleEC2_DescribeInstances() { }, // More values... }, - InstanceIDs: []*string{ + InstanceIds: []*string{ aws.String("String"), // Required // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), } resp, err := svc.DescribeInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeInternetGateways() { svc := ec2.New(nil) params := &ec2.DescribeInternetGatewaysInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2931,7 +2309,7 @@ func ExampleEC2_DescribeInternetGateways() { }, // More values... }, - InternetGatewayIDs: []*string{ + InternetGatewayIds: []*string{ aws.String("String"), // Required // More values... }, @@ -2939,31 +2317,23 @@ func ExampleEC2_DescribeInternetGateways() { resp, err := svc.DescribeInternetGateways(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeKeyPairs() { svc := ec2.New(nil) params := &ec2.DescribeKeyPairsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -2980,31 +2350,23 @@ func ExampleEC2_DescribeKeyPairs() { resp, err := svc.DescribeKeyPairs(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeMovingAddresses() { svc := ec2.New(nil) params := &ec2.DescribeMovingAddressesInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3013,9 +2375,9 @@ func ExampleEC2_DescribeMovingAddresses() { }, // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), - PublicIPs: []*string{ + PublicIps: []*string{ aws.String("String"), // Required // More values... }, @@ -3023,31 +2385,23 @@ func ExampleEC2_DescribeMovingAddresses() { resp, err := svc.DescribeMovingAddresses(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DescribeNetworkACLs() { +func ExampleEC2_DescribeNetworkAcls() { svc := ec2.New(nil) - params := &ec2.DescribeNetworkACLsInput{ - DryRun: aws.Boolean(true), + params := &ec2.DescribeNetworkAclsInput{ + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3056,68 +2410,52 @@ func ExampleEC2_DescribeNetworkACLs() { }, // More values... }, - NetworkACLIDs: []*string{ + NetworkAclIds: []*string{ aws.String("String"), // Required // More values... }, } - resp, err := svc.DescribeNetworkACLs(params) + resp, err := svc.DescribeNetworkAcls(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeNetworkInterfaceAttribute() { svc := ec2.New(nil) params := &ec2.DescribeNetworkInterfaceAttributeInput{ - NetworkInterfaceID: aws.String("String"), // Required + NetworkInterfaceId: aws.String("String"), // Required Attribute: aws.String("NetworkInterfaceAttribute"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.DescribeNetworkInterfaceAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeNetworkInterfaces() { svc := ec2.New(nil) params := &ec2.DescribeNetworkInterfacesInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3126,7 +2464,7 @@ func ExampleEC2_DescribeNetworkInterfaces() { }, // More values... }, - NetworkInterfaceIDs: []*string{ + NetworkInterfaceIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3134,31 +2472,23 @@ func ExampleEC2_DescribeNetworkInterfaces() { resp, err := svc.DescribeNetworkInterfaces(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribePlacementGroups() { svc := ec2.New(nil) params := &ec2.DescribePlacementGroupsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3175,31 +2505,23 @@ func ExampleEC2_DescribePlacementGroups() { resp, err := svc.DescribePlacementGroups(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribePrefixLists() { svc := ec2.New(nil) params := &ec2.DescribePrefixListsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3208,9 +2530,9 @@ func ExampleEC2_DescribePrefixLists() { }, // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), - PrefixListIDs: []*string{ + PrefixListIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3218,31 +2540,23 @@ func ExampleEC2_DescribePrefixLists() { resp, err := svc.DescribePrefixLists(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeRegions() { svc := ec2.New(nil) params := &ec2.DescribeRegionsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3259,31 +2573,23 @@ func ExampleEC2_DescribeRegions() { resp, err := svc.DescribeRegions(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeReservedInstances() { svc := ec2.New(nil) params := &ec2.DescribeReservedInstancesInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3293,7 +2599,7 @@ func ExampleEC2_DescribeReservedInstances() { // More values... }, OfferingType: aws.String("OfferingTypeValues"), - ReservedInstancesIDs: []*string{ + ReservedInstancesIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3301,22 +2607,14 @@ func ExampleEC2_DescribeReservedInstances() { resp, err := svc.DescribeReservedInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeReservedInstancesListings() { @@ -3324,7 +2622,7 @@ func ExampleEC2_DescribeReservedInstancesListings() { params := &ec2.DescribeReservedInstancesListingsInput{ Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3333,28 +2631,20 @@ func ExampleEC2_DescribeReservedInstancesListings() { }, // More values... }, - ReservedInstancesID: aws.String("String"), - ReservedInstancesListingID: aws.String("String"), + ReservedInstancesId: aws.String("String"), + ReservedInstancesListingId: aws.String("String"), } resp, err := svc.DescribeReservedInstancesListings(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeReservedInstancesModifications() { @@ -3362,7 +2652,7 @@ func ExampleEC2_DescribeReservedInstancesModifications() { params := &ec2.DescribeReservedInstancesModificationsInput{ Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3372,7 +2662,7 @@ func ExampleEC2_DescribeReservedInstancesModifications() { // More values... }, NextToken: aws.String("String"), - ReservedInstancesModificationIDs: []*string{ + ReservedInstancesModificationIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3380,22 +2670,14 @@ func ExampleEC2_DescribeReservedInstancesModifications() { resp, err := svc.DescribeReservedInstancesModifications(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeReservedInstancesOfferings() { @@ -3403,9 +2685,9 @@ func ExampleEC2_DescribeReservedInstancesOfferings() { params := &ec2.DescribeReservedInstancesOfferingsInput{ AvailabilityZone: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3414,17 +2696,17 @@ func ExampleEC2_DescribeReservedInstancesOfferings() { }, // More values... }, - IncludeMarketplace: aws.Boolean(true), + IncludeMarketplace: aws.Bool(true), InstanceTenancy: aws.String("Tenancy"), InstanceType: aws.String("InstanceType"), - MaxDuration: aws.Long(1), - MaxInstanceCount: aws.Long(1), - MaxResults: aws.Long(1), - MinDuration: aws.Long(1), + MaxDuration: aws.Int64(1), + MaxInstanceCount: aws.Int64(1), + MaxResults: aws.Int64(1), + MinDuration: aws.Int64(1), NextToken: aws.String("String"), OfferingType: aws.String("OfferingTypeValues"), ProductDescription: aws.String("RIProductDescription"), - ReservedInstancesOfferingIDs: []*string{ + ReservedInstancesOfferingIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3432,31 +2714,23 @@ func ExampleEC2_DescribeReservedInstancesOfferings() { resp, err := svc.DescribeReservedInstancesOfferings(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeRouteTables() { svc := ec2.New(nil) params := &ec2.DescribeRouteTablesInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3465,7 +2739,7 @@ func ExampleEC2_DescribeRouteTables() { }, // More values... }, - RouteTableIDs: []*string{ + RouteTableIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3473,31 +2747,23 @@ func ExampleEC2_DescribeRouteTables() { resp, err := svc.DescribeRouteTables(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSecurityGroups() { svc := ec2.New(nil) params := &ec2.DescribeSecurityGroupsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3506,7 +2772,7 @@ func ExampleEC2_DescribeSecurityGroups() { }, // More values... }, - GroupIDs: []*string{ + GroupIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3518,22 +2784,14 @@ func ExampleEC2_DescribeSecurityGroups() { resp, err := svc.DescribeSecurityGroups(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSnapshotAttribute() { @@ -3541,37 +2799,29 @@ func ExampleEC2_DescribeSnapshotAttribute() { params := &ec2.DescribeSnapshotAttributeInput{ Attribute: aws.String("SnapshotAttributeName"), // Required - SnapshotID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + SnapshotId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DescribeSnapshotAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSnapshots() { svc := ec2.New(nil) params := &ec2.DescribeSnapshotsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3580,17 +2830,17 @@ func ExampleEC2_DescribeSnapshots() { }, // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), - OwnerIDs: []*string{ + OwnerIds: []*string{ aws.String("String"), // Required // More values... }, - RestorableByUserIDs: []*string{ + RestorableByUserIds: []*string{ aws.String("String"), // Required // More values... }, - SnapshotIDs: []*string{ + SnapshotIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3598,121 +2848,89 @@ func ExampleEC2_DescribeSnapshots() { resp, err := svc.DescribeSnapshots(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSpotDatafeedSubscription() { svc := ec2.New(nil) params := &ec2.DescribeSpotDatafeedSubscriptionInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.DescribeSpotDatafeedSubscription(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSpotFleetInstances() { svc := ec2.New(nil) params := &ec2.DescribeSpotFleetInstancesInput{ - SpotFleetRequestID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - MaxResults: aws.Long(1), + SpotFleetRequestId: aws.String("String"), // Required + DryRun: aws.Bool(true), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), } resp, err := svc.DescribeSpotFleetInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSpotFleetRequestHistory() { svc := ec2.New(nil) params := &ec2.DescribeSpotFleetRequestHistoryInput{ - SpotFleetRequestID: aws.String("String"), // Required + SpotFleetRequestId: aws.String("String"), // Required StartTime: aws.Time(time.Now()), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), EventType: aws.String("EventType"), - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), } resp, err := svc.DescribeSpotFleetRequestHistory(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSpotFleetRequests() { svc := ec2.New(nil) params := &ec2.DescribeSpotFleetRequestsInput{ - DryRun: aws.Boolean(true), - MaxResults: aws.Long(1), + DryRun: aws.Bool(true), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), - SpotFleetRequestIDs: []*string{ + SpotFleetRequestIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3720,31 +2938,23 @@ func ExampleEC2_DescribeSpotFleetRequests() { resp, err := svc.DescribeSpotFleetRequests(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSpotInstanceRequests() { svc := ec2.New(nil) params := &ec2.DescribeSpotInstanceRequestsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3753,7 +2963,7 @@ func ExampleEC2_DescribeSpotInstanceRequests() { }, // More values... }, - SpotInstanceRequestIDs: []*string{ + SpotInstanceRequestIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3761,22 +2971,14 @@ func ExampleEC2_DescribeSpotInstanceRequests() { resp, err := svc.DescribeSpotInstanceRequests(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSpotPriceHistory() { @@ -3784,10 +2986,10 @@ func ExampleEC2_DescribeSpotPriceHistory() { params := &ec2.DescribeSpotPriceHistoryInput{ AvailabilityZone: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), EndTime: aws.Time(time.Now()), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3800,7 +3002,7 @@ func ExampleEC2_DescribeSpotPriceHistory() { aws.String("InstanceType"), // Required // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), ProductDescriptions: []*string{ aws.String("String"), // Required @@ -3811,31 +3013,23 @@ func ExampleEC2_DescribeSpotPriceHistory() { resp, err := svc.DescribeSpotPriceHistory(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeSubnets() { svc := ec2.New(nil) params := &ec2.DescribeSubnetsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3844,7 +3038,7 @@ func ExampleEC2_DescribeSubnets() { }, // More values... }, - SubnetIDs: []*string{ + SubnetIds: []*string{ aws.String("String"), // Required // More values... }, @@ -3852,31 +3046,23 @@ func ExampleEC2_DescribeSubnets() { resp, err := svc.DescribeSubnets(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeTags() { svc := ec2.New(nil) params := &ec2.DescribeTagsInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -3885,372 +3071,50 @@ func ExampleEC2_DescribeTags() { }, // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), } resp, err := svc.DescribeTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeVPCAttribute() { - svc := ec2.New(nil) - - params := &ec2.DescribeVPCAttributeInput{ - VPCID: aws.String("String"), // Required - Attribute: aws.String("VpcAttributeName"), - DryRun: aws.Boolean(true), - } - resp, err := svc.DescribeVPCAttribute(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeVPCClassicLink() { - svc := ec2.New(nil) - - params := &ec2.DescribeVPCClassicLinkInput{ - DryRun: aws.Boolean(true), - Filters: []*ec2.Filter{ - &ec2.Filter{ // Required - Name: aws.String("String"), - Values: []*string{ - aws.String("String"), // Required - // More values... - }, - }, - // More values... - }, - VPCIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - } - resp, err := svc.DescribeVPCClassicLink(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeVPCEndpointServices() { - svc := ec2.New(nil) - - params := &ec2.DescribeVPCEndpointServicesInput{ - DryRun: aws.Boolean(true), - MaxResults: aws.Long(1), - NextToken: aws.String("String"), - } - resp, err := svc.DescribeVPCEndpointServices(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeVPCEndpoints() { - svc := ec2.New(nil) - - params := &ec2.DescribeVPCEndpointsInput{ - DryRun: aws.Boolean(true), - Filters: []*ec2.Filter{ - &ec2.Filter{ // Required - Name: aws.String("String"), - Values: []*string{ - aws.String("String"), // Required - // More values... - }, - }, - // More values... - }, - MaxResults: aws.Long(1), - NextToken: aws.String("String"), - VPCEndpointIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - } - resp, err := svc.DescribeVPCEndpoints(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeVPCPeeringConnections() { - svc := ec2.New(nil) - - params := &ec2.DescribeVPCPeeringConnectionsInput{ - DryRun: aws.Boolean(true), - Filters: []*ec2.Filter{ - &ec2.Filter{ // Required - Name: aws.String("String"), - Values: []*string{ - aws.String("String"), // Required - // More values... - }, - }, - // More values... - }, - VPCPeeringConnectionIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - } - resp, err := svc.DescribeVPCPeeringConnections(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeVPCs() { - svc := ec2.New(nil) - - params := &ec2.DescribeVPCsInput{ - DryRun: aws.Boolean(true), - Filters: []*ec2.Filter{ - &ec2.Filter{ // Required - Name: aws.String("String"), - Values: []*string{ - aws.String("String"), // Required - // More values... - }, - }, - // More values... - }, - VPCIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - } - resp, err := svc.DescribeVPCs(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeVPNConnections() { - svc := ec2.New(nil) - - params := &ec2.DescribeVPNConnectionsInput{ - DryRun: aws.Boolean(true), - Filters: []*ec2.Filter{ - &ec2.Filter{ // Required - Name: aws.String("String"), - Values: []*string{ - aws.String("String"), // Required - // More values... - }, - }, - // More values... - }, - VPNConnectionIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - } - resp, err := svc.DescribeVPNConnections(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DescribeVPNGateways() { - svc := ec2.New(nil) - - params := &ec2.DescribeVPNGatewaysInput{ - DryRun: aws.Boolean(true), - Filters: []*ec2.Filter{ - &ec2.Filter{ // Required - Name: aws.String("String"), - Values: []*string{ - aws.String("String"), // Required - // More values... - }, - }, - // More values... - }, - VPNGatewayIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - } - resp, err := svc.DescribeVPNGateways(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeVolumeAttribute() { svc := ec2.New(nil) params := &ec2.DescribeVolumeAttributeInput{ - VolumeID: aws.String("String"), // Required + VolumeId: aws.String("String"), // Required Attribute: aws.String("VolumeAttributeName"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.DescribeVolumeAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeVolumeStatus() { svc := ec2.New(nil) params := &ec2.DescribeVolumeStatusInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -4259,9 +3123,9 @@ func ExampleEC2_DescribeVolumeStatus() { }, // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), - VolumeIDs: []*string{ + VolumeIds: []*string{ aws.String("String"), // Required // More values... }, @@ -4269,31 +3133,23 @@ func ExampleEC2_DescribeVolumeStatus() { resp, err := svc.DescribeVolumeStatus(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DescribeVolumes() { svc := ec2.New(nil) params := &ec2.DescribeVolumesInput{ - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Filters: []*ec2.Filter{ - &ec2.Filter{ // Required + { // Required Name: aws.String("String"), Values: []*string{ aws.String("String"), // Required @@ -4302,9 +3158,9 @@ func ExampleEC2_DescribeVolumes() { }, // More values... }, - MaxResults: aws.Long(1), + MaxResults: aws.Int64(1), NextToken: aws.String("String"), - VolumeIDs: []*string{ + VolumeIds: []*string{ aws.String("String"), // Required // More values... }, @@ -4312,422 +3168,544 @@ func ExampleEC2_DescribeVolumes() { resp, err := svc.DescribeVolumes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DetachClassicLinkVPC() { +func ExampleEC2_DescribeVpcAttribute() { svc := ec2.New(nil) - params := &ec2.DetachClassicLinkVPCInput{ - InstanceID: aws.String("String"), // Required - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.DescribeVpcAttributeInput{ + VpcId: aws.String("String"), // Required + Attribute: aws.String("VpcAttributeName"), + DryRun: aws.Bool(true), } - resp, err := svc.DetachClassicLinkVPC(params) + resp, err := svc.DescribeVpcAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_DescribeVpcClassicLink() { + svc := ec2.New(nil) + + params := &ec2.DescribeVpcClassicLinkInput{ + DryRun: aws.Bool(true), + Filters: []*ec2.Filter{ + { // Required + Name: aws.String("String"), + Values: []*string{ + aws.String("String"), // Required + // More values... + }, + }, + // More values... + }, + VpcIds: []*string{ + aws.String("String"), // Required + // More values... + }, + } + resp, err := svc.DescribeVpcClassicLink(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DescribeVpcEndpointServices() { + svc := ec2.New(nil) + + params := &ec2.DescribeVpcEndpointServicesInput{ + DryRun: aws.Bool(true), + MaxResults: aws.Int64(1), + NextToken: aws.String("String"), + } + resp, err := svc.DescribeVpcEndpointServices(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DescribeVpcEndpoints() { + svc := ec2.New(nil) + + params := &ec2.DescribeVpcEndpointsInput{ + DryRun: aws.Bool(true), + Filters: []*ec2.Filter{ + { // Required + Name: aws.String("String"), + Values: []*string{ + aws.String("String"), // Required + // More values... + }, + }, + // More values... + }, + MaxResults: aws.Int64(1), + NextToken: aws.String("String"), + VpcEndpointIds: []*string{ + aws.String("String"), // Required + // More values... + }, + } + resp, err := svc.DescribeVpcEndpoints(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DescribeVpcPeeringConnections() { + svc := ec2.New(nil) + + params := &ec2.DescribeVpcPeeringConnectionsInput{ + DryRun: aws.Bool(true), + Filters: []*ec2.Filter{ + { // Required + Name: aws.String("String"), + Values: []*string{ + aws.String("String"), // Required + // More values... + }, + }, + // More values... + }, + VpcPeeringConnectionIds: []*string{ + aws.String("String"), // Required + // More values... + }, + } + resp, err := svc.DescribeVpcPeeringConnections(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DescribeVpcs() { + svc := ec2.New(nil) + + params := &ec2.DescribeVpcsInput{ + DryRun: aws.Bool(true), + Filters: []*ec2.Filter{ + { // Required + Name: aws.String("String"), + Values: []*string{ + aws.String("String"), // Required + // More values... + }, + }, + // More values... + }, + VpcIds: []*string{ + aws.String("String"), // Required + // More values... + }, + } + resp, err := svc.DescribeVpcs(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DescribeVpnConnections() { + svc := ec2.New(nil) + + params := &ec2.DescribeVpnConnectionsInput{ + DryRun: aws.Bool(true), + Filters: []*ec2.Filter{ + { // Required + Name: aws.String("String"), + Values: []*string{ + aws.String("String"), // Required + // More values... + }, + }, + // More values... + }, + VpnConnectionIds: []*string{ + aws.String("String"), // Required + // More values... + }, + } + resp, err := svc.DescribeVpnConnections(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DescribeVpnGateways() { + svc := ec2.New(nil) + + params := &ec2.DescribeVpnGatewaysInput{ + DryRun: aws.Bool(true), + Filters: []*ec2.Filter{ + { // Required + Name: aws.String("String"), + Values: []*string{ + aws.String("String"), // Required + // More values... + }, + }, + // More values... + }, + VpnGatewayIds: []*string{ + aws.String("String"), // Required + // More values... + }, + } + resp, err := svc.DescribeVpnGateways(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_DetachClassicLinkVpc() { + svc := ec2.New(nil) + + params := &ec2.DetachClassicLinkVpcInput{ + InstanceId: aws.String("String"), // Required + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.DetachClassicLinkVpc(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_DetachInternetGateway() { svc := ec2.New(nil) params := &ec2.DetachInternetGatewayInput{ - InternetGatewayID: aws.String("String"), // Required - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InternetGatewayId: aws.String("String"), // Required + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DetachInternetGateway(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DetachNetworkInterface() { svc := ec2.New(nil) params := &ec2.DetachNetworkInterfaceInput{ - AttachmentID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - Force: aws.Boolean(true), + AttachmentId: aws.String("String"), // Required + DryRun: aws.Bool(true), + Force: aws.Bool(true), } resp, err := svc.DetachNetworkInterface(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_DetachVPNGateway() { - svc := ec2.New(nil) - - params := &ec2.DetachVPNGatewayInput{ - VPCID: aws.String("String"), // Required - VPNGatewayID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - } - resp, err := svc.DetachVPNGateway(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DetachVolume() { svc := ec2.New(nil) params := &ec2.DetachVolumeInput{ - VolumeID: aws.String("String"), // Required + VolumeId: aws.String("String"), // Required Device: aws.String("String"), - DryRun: aws.Boolean(true), - Force: aws.Boolean(true), - InstanceID: aws.String("String"), + DryRun: aws.Bool(true), + Force: aws.Bool(true), + InstanceId: aws.String("String"), } resp, err := svc.DetachVolume(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DisableVGWRoutePropagation() { +func ExampleEC2_DetachVpnGateway() { svc := ec2.New(nil) - params := &ec2.DisableVGWRoutePropagationInput{ - GatewayID: aws.String("String"), // Required - RouteTableID: aws.String("String"), // Required + params := &ec2.DetachVpnGatewayInput{ + VpcId: aws.String("String"), // Required + VpnGatewayId: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.DisableVGWRoutePropagation(params) + resp, err := svc.DetachVpnGateway(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_DisableVPCClassicLink() { +func ExampleEC2_DisableVgwRoutePropagation() { svc := ec2.New(nil) - params := &ec2.DisableVPCClassicLinkInput{ - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.DisableVgwRoutePropagationInput{ + GatewayId: aws.String("String"), // Required + RouteTableId: aws.String("String"), // Required } - resp, err := svc.DisableVPCClassicLink(params) + resp, err := svc.DisableVgwRoutePropagation(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_DisableVpcClassicLink() { + svc := ec2.New(nil) + + params := &ec2.DisableVpcClassicLinkInput{ + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.DisableVpcClassicLink(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_DisassociateAddress() { svc := ec2.New(nil) params := &ec2.DisassociateAddressInput{ - AssociationID: aws.String("String"), - DryRun: aws.Boolean(true), - PublicIP: aws.String("String"), + AssociationId: aws.String("String"), + DryRun: aws.Bool(true), + PublicIp: aws.String("String"), } resp, err := svc.DisassociateAddress(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_DisassociateRouteTable() { svc := ec2.New(nil) params := &ec2.DisassociateRouteTableInput{ - AssociationID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + AssociationId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.DisassociateRouteTable(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_EnableVGWRoutePropagation() { +func ExampleEC2_EnableVgwRoutePropagation() { svc := ec2.New(nil) - params := &ec2.EnableVGWRoutePropagationInput{ - GatewayID: aws.String("String"), // Required - RouteTableID: aws.String("String"), // Required + params := &ec2.EnableVgwRoutePropagationInput{ + GatewayId: aws.String("String"), // Required + RouteTableId: aws.String("String"), // Required } - resp, err := svc.EnableVGWRoutePropagation(params) + resp, err := svc.EnableVgwRoutePropagation(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_EnableVPCClassicLink() { - svc := ec2.New(nil) - - params := &ec2.EnableVPCClassicLinkInput{ - VPCID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - } - resp, err := svc.EnableVPCClassicLink(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_EnableVolumeIO() { svc := ec2.New(nil) params := &ec2.EnableVolumeIOInput{ - VolumeID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + VolumeId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.EnableVolumeIO(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_EnableVpcClassicLink() { + svc := ec2.New(nil) + + params := &ec2.EnableVpcClassicLinkInput{ + VpcId: aws.String("String"), // Required + DryRun: aws.Bool(true), + } + resp, err := svc.EnableVpcClassicLink(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_GetConsoleOutput() { svc := ec2.New(nil) params := &ec2.GetConsoleOutputInput{ - InstanceID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InstanceId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.GetConsoleOutput(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_GetPasswordData() { svc := ec2.New(nil) params := &ec2.GetPasswordDataInput{ - InstanceID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InstanceId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.GetPasswordData(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ImportImage() { @@ -4738,18 +3716,18 @@ func ExampleEC2_ImportImage() { ClientData: &ec2.ClientData{ Comment: aws.String("String"), UploadEnd: aws.Time(time.Now()), - UploadSize: aws.Double(1.0), + UploadSize: aws.Float64(1.0), UploadStart: aws.Time(time.Now()), }, ClientToken: aws.String("String"), Description: aws.String("String"), DiskContainers: []*ec2.ImageDiskContainer{ - &ec2.ImageDiskContainer{ // Required + { // Required Description: aws.String("String"), DeviceName: aws.String("String"), Format: aws.String("String"), - SnapshotID: aws.String("String"), - URL: aws.String("String"), + SnapshotId: aws.String("String"), + Url: aws.String("String"), UserBucket: &ec2.UserBucket{ S3Bucket: aws.String("String"), S3Key: aws.String("String"), @@ -4757,7 +3735,7 @@ func ExampleEC2_ImportImage() { }, // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Hypervisor: aws.String("String"), LicenseType: aws.String("String"), Platform: aws.String("String"), @@ -4766,22 +3744,14 @@ func ExampleEC2_ImportImage() { resp, err := svc.ImportImage(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ImportInstance() { @@ -4791,24 +3761,24 @@ func ExampleEC2_ImportInstance() { Platform: aws.String("PlatformValues"), // Required Description: aws.String("String"), DiskImages: []*ec2.DiskImage{ - &ec2.DiskImage{ // Required + { // Required Description: aws.String("String"), Image: &ec2.DiskImageDetail{ - Bytes: aws.Long(1), // Required + Bytes: aws.Int64(1), // Required Format: aws.String("DiskImageFormat"), // Required - ImportManifestURL: aws.String("String"), // Required + ImportManifestUrl: aws.String("String"), // Required }, Volume: &ec2.VolumeDetail{ - Size: aws.Long(1), // Required + Size: aws.Int64(1), // Required }, }, // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), LaunchSpecification: &ec2.ImportInstanceLaunchSpecification{ AdditionalInfo: aws.String("String"), Architecture: aws.String("ArchitectureValues"), - GroupIDs: []*string{ + GroupIds: []*string{ aws.String("String"), // Required // More values... }, @@ -4818,14 +3788,14 @@ func ExampleEC2_ImportInstance() { }, InstanceInitiatedShutdownBehavior: aws.String("ShutdownBehavior"), InstanceType: aws.String("InstanceType"), - Monitoring: aws.Boolean(true), + Monitoring: aws.Bool(true), Placement: &ec2.Placement{ AvailabilityZone: aws.String("String"), GroupName: aws.String("String"), Tenancy: aws.String("Tenancy"), }, - PrivateIPAddress: aws.String("String"), - SubnetID: aws.String("String"), + PrivateIpAddress: aws.String("String"), + SubnetId: aws.String("String"), UserData: &ec2.UserData{ Data: aws.String("String"), }, @@ -4834,22 +3804,14 @@ func ExampleEC2_ImportInstance() { resp, err := svc.ImportInstance(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ImportKeyPair() { @@ -4858,27 +3820,19 @@ func ExampleEC2_ImportKeyPair() { params := &ec2.ImportKeyPairInput{ KeyName: aws.String("String"), // Required PublicKeyMaterial: []byte("PAYLOAD"), // Required - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.ImportKeyPair(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ImportSnapshot() { @@ -4888,7 +3842,7 @@ func ExampleEC2_ImportSnapshot() { ClientData: &ec2.ClientData{ Comment: aws.String("String"), UploadEnd: aws.Time(time.Now()), - UploadSize: aws.Double(1.0), + UploadSize: aws.Float64(1.0), UploadStart: aws.Time(time.Now()), }, ClientToken: aws.String("String"), @@ -4896,34 +3850,26 @@ func ExampleEC2_ImportSnapshot() { DiskContainer: &ec2.SnapshotDiskContainer{ Description: aws.String("String"), Format: aws.String("String"), - URL: aws.String("String"), + Url: aws.String("String"), UserBucket: &ec2.UserBucket{ S3Bucket: aws.String("String"), S3Key: aws.String("String"), }, }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), RoleName: aws.String("String"), } resp, err := svc.ImportSnapshot(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ImportVolume() { @@ -4932,64 +3878,56 @@ func ExampleEC2_ImportVolume() { params := &ec2.ImportVolumeInput{ AvailabilityZone: aws.String("String"), // Required Image: &ec2.DiskImageDetail{ // Required - Bytes: aws.Long(1), // Required + Bytes: aws.Int64(1), // Required Format: aws.String("DiskImageFormat"), // Required - ImportManifestURL: aws.String("String"), // Required + ImportManifestUrl: aws.String("String"), // Required }, Volume: &ec2.VolumeDetail{ // Required - Size: aws.Long(1), // Required + Size: aws.Int64(1), // Required }, Description: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.ImportVolume(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ModifyImageAttribute() { svc := ec2.New(nil) params := &ec2.ModifyImageAttributeInput{ - ImageID: aws.String("String"), // Required + ImageId: aws.String("String"), // Required Attribute: aws.String("String"), Description: &ec2.AttributeValue{ Value: aws.String("String"), }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), LaunchPermission: &ec2.LaunchPermissionModifications{ Add: []*ec2.LaunchPermission{ - &ec2.LaunchPermission{ // Required + { // Required Group: aws.String("PermissionGroup"), - UserID: aws.String("String"), + UserId: aws.String("String"), }, // More values... }, Remove: []*ec2.LaunchPermission{ - &ec2.LaunchPermission{ // Required + { // Required Group: aws.String("PermissionGroup"), - UserID: aws.String("String"), + UserId: aws.String("String"), }, // More values... }, }, - OperationType: aws.String("String"), + OperationType: aws.String("OperationType"), ProductCodes: []*string{ aws.String("String"), // Required // More values... @@ -4998,7 +3936,7 @@ func ExampleEC2_ModifyImageAttribute() { aws.String("String"), // Required // More values... }, - UserIDs: []*string{ + UserIds: []*string{ aws.String("String"), // Required // More values... }, @@ -5007,48 +3945,40 @@ func ExampleEC2_ModifyImageAttribute() { resp, err := svc.ModifyImageAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ModifyInstanceAttribute() { svc := ec2.New(nil) params := &ec2.ModifyInstanceAttributeInput{ - InstanceID: aws.String("String"), // Required + InstanceId: aws.String("String"), // Required Attribute: aws.String("InstanceAttributeName"), BlockDeviceMappings: []*ec2.InstanceBlockDeviceMappingSpecification{ - &ec2.InstanceBlockDeviceMappingSpecification{ // Required + { // Required DeviceName: aws.String("String"), - EBS: &ec2.EBSInstanceBlockDeviceSpecification{ - DeleteOnTermination: aws.Boolean(true), - VolumeID: aws.String("String"), + Ebs: &ec2.EbsInstanceBlockDeviceSpecification{ + DeleteOnTermination: aws.Bool(true), + VolumeId: aws.String("String"), }, NoDevice: aws.String("String"), VirtualName: aws.String("String"), }, // More values... }, - DisableAPITermination: &ec2.AttributeBooleanValue{ - Value: aws.Boolean(true), + DisableApiTermination: &ec2.AttributeBooleanValue{ + Value: aws.Bool(true), }, - DryRun: aws.Boolean(true), - EBSOptimized: &ec2.AttributeBooleanValue{ - Value: aws.Boolean(true), + DryRun: aws.Bool(true), + EbsOptimized: &ec2.AttributeBooleanValue{ + Value: aws.Bool(true), }, Groups: []*string{ aws.String("String"), // Required @@ -5063,14 +3993,14 @@ func ExampleEC2_ModifyInstanceAttribute() { Kernel: &ec2.AttributeValue{ Value: aws.String("String"), }, - RAMDisk: &ec2.AttributeValue{ - Value: aws.String("String"), - }, - SRIOVNetSupport: &ec2.AttributeValue{ + Ramdisk: &ec2.AttributeValue{ Value: aws.String("String"), }, SourceDestCheck: &ec2.AttributeBooleanValue{ - Value: aws.Boolean(true), + Value: aws.Bool(true), + }, + SriovNetSupport: &ec2.AttributeValue{ + Value: aws.String("String"), }, UserData: &ec2.BlobAttributeValue{ Value: []byte("PAYLOAD"), @@ -5080,78 +4010,62 @@ func ExampleEC2_ModifyInstanceAttribute() { resp, err := svc.ModifyInstanceAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ModifyNetworkInterfaceAttribute() { svc := ec2.New(nil) params := &ec2.ModifyNetworkInterfaceAttributeInput{ - NetworkInterfaceID: aws.String("String"), // Required + NetworkInterfaceId: aws.String("String"), // Required Attachment: &ec2.NetworkInterfaceAttachmentChanges{ - AttachmentID: aws.String("String"), - DeleteOnTermination: aws.Boolean(true), + AttachmentId: aws.String("String"), + DeleteOnTermination: aws.Bool(true), }, Description: &ec2.AttributeValue{ Value: aws.String("String"), }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), Groups: []*string{ aws.String("String"), // Required // More values... }, SourceDestCheck: &ec2.AttributeBooleanValue{ - Value: aws.Boolean(true), + Value: aws.Bool(true), }, } resp, err := svc.ModifyNetworkInterfaceAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ModifyReservedInstances() { svc := ec2.New(nil) params := &ec2.ModifyReservedInstancesInput{ - ReservedInstancesIDs: []*string{ // Required + ReservedInstancesIds: []*string{ // Required aws.String("String"), // Required // More values... }, TargetConfigurations: []*ec2.ReservedInstancesConfiguration{ // Required - &ec2.ReservedInstancesConfiguration{ // Required + { // Required AvailabilityZone: aws.String("String"), - InstanceCount: aws.Long(1), + InstanceCount: aws.Int64(1), InstanceType: aws.String("InstanceType"), Platform: aws.String("String"), }, @@ -5162,53 +4076,45 @@ func ExampleEC2_ModifyReservedInstances() { resp, err := svc.ModifyReservedInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ModifySnapshotAttribute() { svc := ec2.New(nil) params := &ec2.ModifySnapshotAttributeInput{ - SnapshotID: aws.String("String"), // Required + SnapshotId: aws.String("String"), // Required Attribute: aws.String("SnapshotAttributeName"), CreateVolumePermission: &ec2.CreateVolumePermissionModifications{ Add: []*ec2.CreateVolumePermission{ - &ec2.CreateVolumePermission{ // Required + { // Required Group: aws.String("PermissionGroup"), - UserID: aws.String("String"), + UserId: aws.String("String"), }, // More values... }, Remove: []*ec2.CreateVolumePermission{ - &ec2.CreateVolumePermission{ // Required + { // Required Group: aws.String("PermissionGroup"), - UserID: aws.String("String"), + UserId: aws.String("String"), }, // More values... }, }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), GroupNames: []*string{ aws.String("String"), // Required // More values... }, - OperationType: aws.String("String"), - UserIDs: []*string{ + OperationType: aws.String("OperationType"), + UserIds: []*string{ aws.String("String"), // Required // More values... }, @@ -5216,277 +4122,205 @@ func ExampleEC2_ModifySnapshotAttribute() { resp, err := svc.ModifySnapshotAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ModifySubnetAttribute() { svc := ec2.New(nil) params := &ec2.ModifySubnetAttributeInput{ - SubnetID: aws.String("String"), // Required - MapPublicIPOnLaunch: &ec2.AttributeBooleanValue{ - Value: aws.Boolean(true), + SubnetId: aws.String("String"), // Required + MapPublicIpOnLaunch: &ec2.AttributeBooleanValue{ + Value: aws.Bool(true), }, } resp, err := svc.ModifySubnetAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_ModifyVPCAttribute() { - svc := ec2.New(nil) - - params := &ec2.ModifyVPCAttributeInput{ - VPCID: aws.String("String"), // Required - EnableDNSHostnames: &ec2.AttributeBooleanValue{ - Value: aws.Boolean(true), - }, - EnableDNSSupport: &ec2.AttributeBooleanValue{ - Value: aws.Boolean(true), - }, - } - resp, err := svc.ModifyVPCAttribute(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) -} - -func ExampleEC2_ModifyVPCEndpoint() { - svc := ec2.New(nil) - - params := &ec2.ModifyVPCEndpointInput{ - VPCEndpointID: aws.String("String"), // Required - AddRouteTableIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - DryRun: aws.Boolean(true), - PolicyDocument: aws.String("String"), - RemoveRouteTableIDs: []*string{ - aws.String("String"), // Required - // More values... - }, - ResetPolicy: aws.Boolean(true), - } - resp, err := svc.ModifyVPCEndpoint(params) - - if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } - } - - // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ModifyVolumeAttribute() { svc := ec2.New(nil) params := &ec2.ModifyVolumeAttributeInput{ - VolumeID: aws.String("String"), // Required + VolumeId: aws.String("String"), // Required AutoEnableIO: &ec2.AttributeBooleanValue{ - Value: aws.Boolean(true), + Value: aws.Bool(true), }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.ModifyVolumeAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) +} + +func ExampleEC2_ModifyVpcAttribute() { + svc := ec2.New(nil) + + params := &ec2.ModifyVpcAttributeInput{ + VpcId: aws.String("String"), // Required + EnableDnsHostnames: &ec2.AttributeBooleanValue{ + Value: aws.Bool(true), + }, + EnableDnsSupport: &ec2.AttributeBooleanValue{ + Value: aws.Bool(true), + }, + } + resp, err := svc.ModifyVpcAttribute(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) +} + +func ExampleEC2_ModifyVpcEndpoint() { + svc := ec2.New(nil) + + params := &ec2.ModifyVpcEndpointInput{ + VpcEndpointId: aws.String("String"), // Required + AddRouteTableIds: []*string{ + aws.String("String"), // Required + // More values... + }, + DryRun: aws.Bool(true), + PolicyDocument: aws.String("String"), + RemoveRouteTableIds: []*string{ + aws.String("String"), // Required + // More values... + }, + ResetPolicy: aws.Bool(true), + } + resp, err := svc.ModifyVpcEndpoint(params) + + if err != nil { + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return + } + + // Pretty-print the response data. + fmt.Println(resp) } func ExampleEC2_MonitorInstances() { svc := ec2.New(nil) params := &ec2.MonitorInstancesInput{ - InstanceIDs: []*string{ // Required + InstanceIds: []*string{ // Required aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.MonitorInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_MoveAddressToVPC() { +func ExampleEC2_MoveAddressToVpc() { svc := ec2.New(nil) - params := &ec2.MoveAddressToVPCInput{ - PublicIP: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.MoveAddressToVpcInput{ + PublicIp: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.MoveAddressToVPC(params) + resp, err := svc.MoveAddressToVpc(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_PurchaseReservedInstancesOffering() { svc := ec2.New(nil) params := &ec2.PurchaseReservedInstancesOfferingInput{ - InstanceCount: aws.Long(1), // Required - ReservedInstancesOfferingID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InstanceCount: aws.Int64(1), // Required + ReservedInstancesOfferingId: aws.String("String"), // Required + DryRun: aws.Bool(true), LimitPrice: &ec2.ReservedInstanceLimitPrice{ - Amount: aws.Double(1.0), + Amount: aws.Float64(1.0), CurrencyCode: aws.String("CurrencyCodeValues"), }, } resp, err := svc.PurchaseReservedInstancesOffering(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_RebootInstances() { svc := ec2.New(nil) params := &ec2.RebootInstancesInput{ - InstanceIDs: []*string{ // Required + InstanceIds: []*string{ // Required aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.RebootInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_RegisterImage() { @@ -5496,14 +4330,14 @@ func ExampleEC2_RegisterImage() { Name: aws.String("String"), // Required Architecture: aws.String("ArchitectureValues"), BlockDeviceMappings: []*ec2.BlockDeviceMapping{ - &ec2.BlockDeviceMapping{ // Required + { // Required DeviceName: aws.String("String"), - EBS: &ec2.EBSBlockDevice{ - DeleteOnTermination: aws.Boolean(true), - Encrypted: aws.Boolean(true), - IOPS: aws.Long(1), - SnapshotID: aws.String("String"), - VolumeSize: aws.Long(1), + Ebs: &ec2.EbsBlockDevice{ + DeleteOnTermination: aws.Bool(true), + Encrypted: aws.Bool(true), + Iops: aws.Int64(1), + SnapshotId: aws.String("String"), + VolumeSize: aws.Int64(1), VolumeType: aws.String("VolumeType"), }, NoDevice: aws.String("String"), @@ -5512,222 +4346,166 @@ func ExampleEC2_RegisterImage() { // More values... }, Description: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), ImageLocation: aws.String("String"), - KernelID: aws.String("String"), - RAMDiskID: aws.String("String"), + KernelId: aws.String("String"), + RamdiskId: aws.String("String"), RootDeviceName: aws.String("String"), - SRIOVNetSupport: aws.String("String"), + SriovNetSupport: aws.String("String"), VirtualizationType: aws.String("String"), } resp, err := svc.RegisterImage(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_RejectVPCPeeringConnection() { +func ExampleEC2_RejectVpcPeeringConnection() { svc := ec2.New(nil) - params := &ec2.RejectVPCPeeringConnectionInput{ - VPCPeeringConnectionID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.RejectVpcPeeringConnectionInput{ + VpcPeeringConnectionId: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.RejectVPCPeeringConnection(params) + resp, err := svc.RejectVpcPeeringConnection(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ReleaseAddress() { svc := ec2.New(nil) params := &ec2.ReleaseAddressInput{ - AllocationID: aws.String("String"), - DryRun: aws.Boolean(true), - PublicIP: aws.String("String"), + AllocationId: aws.String("String"), + DryRun: aws.Bool(true), + PublicIp: aws.String("String"), } resp, err := svc.ReleaseAddress(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_ReplaceNetworkACLAssociation() { +func ExampleEC2_ReplaceNetworkAclAssociation() { svc := ec2.New(nil) - params := &ec2.ReplaceNetworkACLAssociationInput{ - AssociationID: aws.String("String"), // Required - NetworkACLID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + params := &ec2.ReplaceNetworkAclAssociationInput{ + AssociationId: aws.String("String"), // Required + NetworkAclId: aws.String("String"), // Required + DryRun: aws.Bool(true), } - resp, err := svc.ReplaceNetworkACLAssociation(params) + resp, err := svc.ReplaceNetworkAclAssociation(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_ReplaceNetworkACLEntry() { +func ExampleEC2_ReplaceNetworkAclEntry() { svc := ec2.New(nil) - params := &ec2.ReplaceNetworkACLEntryInput{ - CIDRBlock: aws.String("String"), // Required - Egress: aws.Boolean(true), // Required - NetworkACLID: aws.String("String"), // Required + params := &ec2.ReplaceNetworkAclEntryInput{ + CidrBlock: aws.String("String"), // Required + Egress: aws.Bool(true), // Required + NetworkAclId: aws.String("String"), // Required Protocol: aws.String("String"), // Required RuleAction: aws.String("RuleAction"), // Required - RuleNumber: aws.Long(1), // Required - DryRun: aws.Boolean(true), - ICMPTypeCode: &ec2.ICMPTypeCode{ - Code: aws.Long(1), - Type: aws.Long(1), + RuleNumber: aws.Int64(1), // Required + DryRun: aws.Bool(true), + IcmpTypeCode: &ec2.IcmpTypeCode{ + Code: aws.Int64(1), + Type: aws.Int64(1), }, PortRange: &ec2.PortRange{ - From: aws.Long(1), - To: aws.Long(1), + From: aws.Int64(1), + To: aws.Int64(1), }, } - resp, err := svc.ReplaceNetworkACLEntry(params) + resp, err := svc.ReplaceNetworkAclEntry(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ReplaceRoute() { svc := ec2.New(nil) params := &ec2.ReplaceRouteInput{ - DestinationCIDRBlock: aws.String("String"), // Required - RouteTableID: aws.String("String"), // Required - DryRun: aws.Boolean(true), - GatewayID: aws.String("String"), - InstanceID: aws.String("String"), - NetworkInterfaceID: aws.String("String"), - VPCPeeringConnectionID: aws.String("String"), + DestinationCidrBlock: aws.String("String"), // Required + RouteTableId: aws.String("String"), // Required + DryRun: aws.Bool(true), + GatewayId: aws.String("String"), + InstanceId: aws.String("String"), + NetworkInterfaceId: aws.String("String"), + VpcPeeringConnectionId: aws.String("String"), } resp, err := svc.ReplaceRoute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ReplaceRouteTableAssociation() { svc := ec2.New(nil) params := &ec2.ReplaceRouteTableAssociationInput{ - AssociationID: aws.String("String"), // Required - RouteTableID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + AssociationId: aws.String("String"), // Required + RouteTableId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.ReplaceRouteTableAssociation(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ReportInstanceStatus() { @@ -5744,29 +4522,21 @@ func ExampleEC2_ReportInstanceStatus() { }, Status: aws.String("ReportStatusType"), // Required Description: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), EndTime: aws.Time(time.Now()), StartTime: aws.Time(time.Now()), } resp, err := svc.ReportInstanceStatus(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_RequestSpotFleet() { @@ -5774,19 +4544,19 @@ func ExampleEC2_RequestSpotFleet() { params := &ec2.RequestSpotFleetInput{ SpotFleetRequestConfig: &ec2.SpotFleetRequestConfigData{ // Required - IAMFleetRole: aws.String("String"), // Required - LaunchSpecifications: []*ec2.LaunchSpecification{ // Required - &ec2.LaunchSpecification{ // Required + IamFleetRole: aws.String("String"), // Required + LaunchSpecifications: []*ec2.SpotFleetLaunchSpecification{ // Required + { // Required AddressingType: aws.String("String"), BlockDeviceMappings: []*ec2.BlockDeviceMapping{ - &ec2.BlockDeviceMapping{ // Required + { // Required DeviceName: aws.String("String"), - EBS: &ec2.EBSBlockDevice{ - DeleteOnTermination: aws.Boolean(true), - Encrypted: aws.Boolean(true), - IOPS: aws.Long(1), - SnapshotID: aws.String("String"), - VolumeSize: aws.Long(1), + Ebs: &ec2.EbsBlockDevice{ + DeleteOnTermination: aws.Bool(true), + Encrypted: aws.Bool(true), + Iops: aws.Int64(1), + SnapshotId: aws.String("String"), + VolumeSize: aws.Int64(1), VolumeType: aws.String("VolumeType"), }, NoDevice: aws.String("String"), @@ -5794,39 +4564,39 @@ func ExampleEC2_RequestSpotFleet() { }, // More values... }, - EBSOptimized: aws.Boolean(true), - IAMInstanceProfile: &ec2.IAMInstanceProfileSpecification{ - ARN: aws.String("String"), + EbsOptimized: aws.Bool(true), + IamInstanceProfile: &ec2.IamInstanceProfileSpecification{ + Arn: aws.String("String"), Name: aws.String("String"), }, - ImageID: aws.String("String"), + ImageId: aws.String("String"), InstanceType: aws.String("InstanceType"), - KernelID: aws.String("String"), + KernelId: aws.String("String"), KeyName: aws.String("String"), - Monitoring: &ec2.RunInstancesMonitoringEnabled{ - Enabled: aws.Boolean(true), // Required + Monitoring: &ec2.SpotFleetMonitoring{ + Enabled: aws.Bool(true), }, NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{ - &ec2.InstanceNetworkInterfaceSpecification{ // Required - AssociatePublicIPAddress: aws.Boolean(true), - DeleteOnTermination: aws.Boolean(true), + { // Required + AssociatePublicIpAddress: aws.Bool(true), + DeleteOnTermination: aws.Bool(true), Description: aws.String("String"), - DeviceIndex: aws.Long(1), + DeviceIndex: aws.Int64(1), Groups: []*string{ aws.String("String"), // Required // More values... }, - NetworkInterfaceID: aws.String("String"), - PrivateIPAddress: aws.String("String"), - PrivateIPAddresses: []*ec2.PrivateIPAddressSpecification{ - &ec2.PrivateIPAddressSpecification{ // Required - PrivateIPAddress: aws.String("String"), // Required - Primary: aws.Boolean(true), + NetworkInterfaceId: aws.String("String"), + PrivateIpAddress: aws.String("String"), + PrivateIpAddresses: []*ec2.PrivateIpAddressSpecification{ + { // Required + PrivateIpAddress: aws.String("String"), // Required + Primary: aws.Bool(true), }, // More values... }, - SecondaryPrivateIPAddressCount: aws.Long(1), - SubnetID: aws.String("String"), + SecondaryPrivateIpAddressCount: aws.Int64(1), + SubnetId: aws.String("String"), }, // More values... }, @@ -5834,47 +4604,42 @@ func ExampleEC2_RequestSpotFleet() { AvailabilityZone: aws.String("String"), GroupName: aws.String("String"), }, - RAMDiskID: aws.String("String"), + RamdiskId: aws.String("String"), SecurityGroups: []*ec2.GroupIdentifier{ - &ec2.GroupIdentifier{ // Required - GroupID: aws.String("String"), + { // Required + GroupId: aws.String("String"), GroupName: aws.String("String"), }, // More values... }, - SubnetID: aws.String("String"), - UserData: aws.String("String"), + SpotPrice: aws.String("String"), + SubnetId: aws.String("String"), + UserData: aws.String("String"), + WeightedCapacity: aws.Float64(1.0), }, // More values... }, SpotPrice: aws.String("String"), // Required - TargetCapacity: aws.Long(1), // Required + TargetCapacity: aws.Int64(1), // Required + AllocationStrategy: aws.String("AllocationStrategy"), ClientToken: aws.String("String"), - TerminateInstancesWithExpiration: aws.Boolean(true), + TerminateInstancesWithExpiration: aws.Bool(true), ValidFrom: aws.Time(time.Now()), ValidUntil: aws.Time(time.Now()), }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.RequestSpotFleet(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_RequestSpotInstances() { @@ -5884,20 +4649,20 @@ func ExampleEC2_RequestSpotInstances() { SpotPrice: aws.String("String"), // Required AvailabilityZoneGroup: aws.String("String"), ClientToken: aws.String("String"), - DryRun: aws.Boolean(true), - InstanceCount: aws.Long(1), + DryRun: aws.Bool(true), + InstanceCount: aws.Int64(1), LaunchGroup: aws.String("String"), LaunchSpecification: &ec2.RequestSpotLaunchSpecification{ AddressingType: aws.String("String"), BlockDeviceMappings: []*ec2.BlockDeviceMapping{ - &ec2.BlockDeviceMapping{ // Required + { // Required DeviceName: aws.String("String"), - EBS: &ec2.EBSBlockDevice{ - DeleteOnTermination: aws.Boolean(true), - Encrypted: aws.Boolean(true), - IOPS: aws.Long(1), - SnapshotID: aws.String("String"), - VolumeSize: aws.Long(1), + Ebs: &ec2.EbsBlockDevice{ + DeleteOnTermination: aws.Bool(true), + Encrypted: aws.Bool(true), + Iops: aws.Int64(1), + SnapshotId: aws.String("String"), + VolumeSize: aws.Int64(1), VolumeType: aws.String("VolumeType"), }, NoDevice: aws.String("String"), @@ -5905,39 +4670,39 @@ func ExampleEC2_RequestSpotInstances() { }, // More values... }, - EBSOptimized: aws.Boolean(true), - IAMInstanceProfile: &ec2.IAMInstanceProfileSpecification{ - ARN: aws.String("String"), + EbsOptimized: aws.Bool(true), + IamInstanceProfile: &ec2.IamInstanceProfileSpecification{ + Arn: aws.String("String"), Name: aws.String("String"), }, - ImageID: aws.String("String"), + ImageId: aws.String("String"), InstanceType: aws.String("InstanceType"), - KernelID: aws.String("String"), + KernelId: aws.String("String"), KeyName: aws.String("String"), Monitoring: &ec2.RunInstancesMonitoringEnabled{ - Enabled: aws.Boolean(true), // Required + Enabled: aws.Bool(true), // Required }, NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{ - &ec2.InstanceNetworkInterfaceSpecification{ // Required - AssociatePublicIPAddress: aws.Boolean(true), - DeleteOnTermination: aws.Boolean(true), + { // Required + AssociatePublicIpAddress: aws.Bool(true), + DeleteOnTermination: aws.Bool(true), Description: aws.String("String"), - DeviceIndex: aws.Long(1), + DeviceIndex: aws.Int64(1), Groups: []*string{ aws.String("String"), // Required // More values... }, - NetworkInterfaceID: aws.String("String"), - PrivateIPAddress: aws.String("String"), - PrivateIPAddresses: []*ec2.PrivateIPAddressSpecification{ - &ec2.PrivateIPAddressSpecification{ // Required - PrivateIPAddress: aws.String("String"), // Required - Primary: aws.Boolean(true), + NetworkInterfaceId: aws.String("String"), + PrivateIpAddress: aws.String("String"), + PrivateIpAddresses: []*ec2.PrivateIpAddressSpecification{ + { // Required + PrivateIpAddress: aws.String("String"), // Required + Primary: aws.Bool(true), }, // More values... }, - SecondaryPrivateIPAddressCount: aws.Long(1), - SubnetID: aws.String("String"), + SecondaryPrivateIpAddressCount: aws.Int64(1), + SubnetId: aws.String("String"), }, // More values... }, @@ -5945,8 +4710,8 @@ func ExampleEC2_RequestSpotInstances() { AvailabilityZone: aws.String("String"), GroupName: aws.String("String"), }, - RAMDiskID: aws.String("String"), - SecurityGroupIDs: []*string{ + RamdiskId: aws.String("String"), + SecurityGroupIds: []*string{ aws.String("String"), // Required // More values... }, @@ -5954,7 +4719,7 @@ func ExampleEC2_RequestSpotInstances() { aws.String("String"), // Required // More values... }, - SubnetID: aws.String("String"), + SubnetId: aws.String("String"), UserData: aws.String("String"), }, Type: aws.String("SpotInstanceType"), @@ -5964,22 +4729,14 @@ func ExampleEC2_RequestSpotInstances() { resp, err := svc.RequestSpotInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ResetImageAttribute() { @@ -5987,28 +4744,20 @@ func ExampleEC2_ResetImageAttribute() { params := &ec2.ResetImageAttributeInput{ Attribute: aws.String("ResetImageAttributeName"), // Required - ImageID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + ImageId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.ResetImageAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ResetInstanceAttribute() { @@ -6016,57 +4765,41 @@ func ExampleEC2_ResetInstanceAttribute() { params := &ec2.ResetInstanceAttributeInput{ Attribute: aws.String("InstanceAttributeName"), // Required - InstanceID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + InstanceId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.ResetInstanceAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ResetNetworkInterfaceAttribute() { svc := ec2.New(nil) params := &ec2.ResetNetworkInterfaceAttributeInput{ - NetworkInterfaceID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + NetworkInterfaceId: aws.String("String"), // Required + DryRun: aws.Bool(true), SourceDestCheck: aws.String("String"), } resp, err := svc.ResetNetworkInterfaceAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_ResetSnapshotAttribute() { @@ -6074,200 +4807,168 @@ func ExampleEC2_ResetSnapshotAttribute() { params := &ec2.ResetSnapshotAttributeInput{ Attribute: aws.String("SnapshotAttributeName"), // Required - SnapshotID: aws.String("String"), // Required - DryRun: aws.Boolean(true), + SnapshotId: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.ResetSnapshotAttribute(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_RestoreAddressToClassic() { svc := ec2.New(nil) params := &ec2.RestoreAddressToClassicInput{ - PublicIP: aws.String("String"), // Required - DryRun: aws.Boolean(true), + PublicIp: aws.String("String"), // Required + DryRun: aws.Bool(true), } resp, err := svc.RestoreAddressToClassic(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_RevokeSecurityGroupEgress() { svc := ec2.New(nil) params := &ec2.RevokeSecurityGroupEgressInput{ - GroupID: aws.String("String"), // Required - CIDRIP: aws.String("String"), - DryRun: aws.Boolean(true), - FromPort: aws.Long(1), - IPPermissions: []*ec2.IPPermission{ - &ec2.IPPermission{ // Required - FromPort: aws.Long(1), - IPProtocol: aws.String("String"), - IPRanges: []*ec2.IPRange{ - &ec2.IPRange{ // Required - CIDRIP: aws.String("String"), + GroupId: aws.String("String"), // Required + CidrIp: aws.String("String"), + DryRun: aws.Bool(true), + FromPort: aws.Int64(1), + IpPermissions: []*ec2.IpPermission{ + { // Required + FromPort: aws.Int64(1), + IpProtocol: aws.String("String"), + IpRanges: []*ec2.IpRange{ + { // Required + CidrIp: aws.String("String"), }, // More values... }, - PrefixListIDs: []*ec2.PrefixListID{ - &ec2.PrefixListID{ // Required - PrefixListID: aws.String("String"), + PrefixListIds: []*ec2.PrefixListId{ + { // Required + PrefixListId: aws.String("String"), }, // More values... }, - ToPort: aws.Long(1), - UserIDGroupPairs: []*ec2.UserIDGroupPair{ - &ec2.UserIDGroupPair{ // Required - GroupID: aws.String("String"), + ToPort: aws.Int64(1), + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + { // Required + GroupId: aws.String("String"), GroupName: aws.String("String"), - UserID: aws.String("String"), + UserId: aws.String("String"), }, // More values... }, }, // More values... }, - IPProtocol: aws.String("String"), + IpProtocol: aws.String("String"), SourceSecurityGroupName: aws.String("String"), - SourceSecurityGroupOwnerID: aws.String("String"), - ToPort: aws.Long(1), + SourceSecurityGroupOwnerId: aws.String("String"), + ToPort: aws.Int64(1), } resp, err := svc.RevokeSecurityGroupEgress(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_RevokeSecurityGroupIngress() { svc := ec2.New(nil) params := &ec2.RevokeSecurityGroupIngressInput{ - CIDRIP: aws.String("String"), - DryRun: aws.Boolean(true), - FromPort: aws.Long(1), - GroupID: aws.String("String"), + CidrIp: aws.String("String"), + DryRun: aws.Bool(true), + FromPort: aws.Int64(1), + GroupId: aws.String("String"), GroupName: aws.String("String"), - IPPermissions: []*ec2.IPPermission{ - &ec2.IPPermission{ // Required - FromPort: aws.Long(1), - IPProtocol: aws.String("String"), - IPRanges: []*ec2.IPRange{ - &ec2.IPRange{ // Required - CIDRIP: aws.String("String"), + IpPermissions: []*ec2.IpPermission{ + { // Required + FromPort: aws.Int64(1), + IpProtocol: aws.String("String"), + IpRanges: []*ec2.IpRange{ + { // Required + CidrIp: aws.String("String"), }, // More values... }, - PrefixListIDs: []*ec2.PrefixListID{ - &ec2.PrefixListID{ // Required - PrefixListID: aws.String("String"), + PrefixListIds: []*ec2.PrefixListId{ + { // Required + PrefixListId: aws.String("String"), }, // More values... }, - ToPort: aws.Long(1), - UserIDGroupPairs: []*ec2.UserIDGroupPair{ - &ec2.UserIDGroupPair{ // Required - GroupID: aws.String("String"), + ToPort: aws.Int64(1), + UserIdGroupPairs: []*ec2.UserIdGroupPair{ + { // Required + GroupId: aws.String("String"), GroupName: aws.String("String"), - UserID: aws.String("String"), + UserId: aws.String("String"), }, // More values... }, }, // More values... }, - IPProtocol: aws.String("String"), + IpProtocol: aws.String("String"), SourceSecurityGroupName: aws.String("String"), - SourceSecurityGroupOwnerID: aws.String("String"), - ToPort: aws.Long(1), + SourceSecurityGroupOwnerId: aws.String("String"), + ToPort: aws.Int64(1), } resp, err := svc.RevokeSecurityGroupIngress(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_RunInstances() { svc := ec2.New(nil) params := &ec2.RunInstancesInput{ - ImageID: aws.String("String"), // Required - MaxCount: aws.Long(1), // Required - MinCount: aws.Long(1), // Required + ImageId: aws.String("String"), // Required + MaxCount: aws.Int64(1), // Required + MinCount: aws.Int64(1), // Required AdditionalInfo: aws.String("String"), BlockDeviceMappings: []*ec2.BlockDeviceMapping{ - &ec2.BlockDeviceMapping{ // Required + { // Required DeviceName: aws.String("String"), - EBS: &ec2.EBSBlockDevice{ - DeleteOnTermination: aws.Boolean(true), - Encrypted: aws.Boolean(true), - IOPS: aws.Long(1), - SnapshotID: aws.String("String"), - VolumeSize: aws.Long(1), + Ebs: &ec2.EbsBlockDevice{ + DeleteOnTermination: aws.Bool(true), + Encrypted: aws.Bool(true), + Iops: aws.Int64(1), + SnapshotId: aws.String("String"), + VolumeSize: aws.Int64(1), VolumeType: aws.String("VolumeType"), }, NoDevice: aws.String("String"), @@ -6276,41 +4977,41 @@ func ExampleEC2_RunInstances() { // More values... }, ClientToken: aws.String("String"), - DisableAPITermination: aws.Boolean(true), - DryRun: aws.Boolean(true), - EBSOptimized: aws.Boolean(true), - IAMInstanceProfile: &ec2.IAMInstanceProfileSpecification{ - ARN: aws.String("String"), + DisableApiTermination: aws.Bool(true), + DryRun: aws.Bool(true), + EbsOptimized: aws.Bool(true), + IamInstanceProfile: &ec2.IamInstanceProfileSpecification{ + Arn: aws.String("String"), Name: aws.String("String"), }, InstanceInitiatedShutdownBehavior: aws.String("ShutdownBehavior"), InstanceType: aws.String("InstanceType"), - KernelID: aws.String("String"), + KernelId: aws.String("String"), KeyName: aws.String("String"), Monitoring: &ec2.RunInstancesMonitoringEnabled{ - Enabled: aws.Boolean(true), // Required + Enabled: aws.Bool(true), // Required }, NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{ - &ec2.InstanceNetworkInterfaceSpecification{ // Required - AssociatePublicIPAddress: aws.Boolean(true), - DeleteOnTermination: aws.Boolean(true), + { // Required + AssociatePublicIpAddress: aws.Bool(true), + DeleteOnTermination: aws.Bool(true), Description: aws.String("String"), - DeviceIndex: aws.Long(1), + DeviceIndex: aws.Int64(1), Groups: []*string{ aws.String("String"), // Required // More values... }, - NetworkInterfaceID: aws.String("String"), - PrivateIPAddress: aws.String("String"), - PrivateIPAddresses: []*ec2.PrivateIPAddressSpecification{ - &ec2.PrivateIPAddressSpecification{ // Required - PrivateIPAddress: aws.String("String"), // Required - Primary: aws.Boolean(true), + NetworkInterfaceId: aws.String("String"), + PrivateIpAddress: aws.String("String"), + PrivateIpAddresses: []*ec2.PrivateIpAddressSpecification{ + { // Required + PrivateIpAddress: aws.String("String"), // Required + Primary: aws.Bool(true), }, // More values... }, - SecondaryPrivateIPAddressCount: aws.Long(1), - SubnetID: aws.String("String"), + SecondaryPrivateIpAddressCount: aws.Int64(1), + SubnetId: aws.String("String"), }, // More values... }, @@ -6319,9 +5020,9 @@ func ExampleEC2_RunInstances() { GroupName: aws.String("String"), Tenancy: aws.String("Tenancy"), }, - PrivateIPAddress: aws.String("String"), - RAMDiskID: aws.String("String"), - SecurityGroupIDs: []*string{ + PrivateIpAddress: aws.String("String"), + RamdiskId: aws.String("String"), + SecurityGroupIds: []*string{ aws.String("String"), // Required // More values... }, @@ -6329,183 +5030,135 @@ func ExampleEC2_RunInstances() { aws.String("String"), // Required // More values... }, - SubnetID: aws.String("String"), + SubnetId: aws.String("String"), UserData: aws.String("String"), } resp, err := svc.RunInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_StartInstances() { svc := ec2.New(nil) params := &ec2.StartInstancesInput{ - InstanceIDs: []*string{ // Required + InstanceIds: []*string{ // Required aws.String("String"), // Required // More values... }, AdditionalInfo: aws.String("String"), - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.StartInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_StopInstances() { svc := ec2.New(nil) params := &ec2.StopInstancesInput{ - InstanceIDs: []*string{ // Required + InstanceIds: []*string{ // Required aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), - Force: aws.Boolean(true), + DryRun: aws.Bool(true), + Force: aws.Bool(true), } resp, err := svc.StopInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_TerminateInstances() { svc := ec2.New(nil) params := &ec2.TerminateInstancesInput{ - InstanceIDs: []*string{ // Required + InstanceIds: []*string{ // Required aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.TerminateInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } -func ExampleEC2_UnassignPrivateIPAddresses() { +func ExampleEC2_UnassignPrivateIpAddresses() { svc := ec2.New(nil) - params := &ec2.UnassignPrivateIPAddressesInput{ - NetworkInterfaceID: aws.String("String"), // Required - PrivateIPAddresses: []*string{ // Required + params := &ec2.UnassignPrivateIpAddressesInput{ + NetworkInterfaceId: aws.String("String"), // Required + PrivateIpAddresses: []*string{ // Required aws.String("String"), // Required // More values... }, } - resp, err := svc.UnassignPrivateIPAddresses(params) + resp, err := svc.UnassignPrivateIpAddresses(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleEC2_UnmonitorInstances() { svc := ec2.New(nil) params := &ec2.UnmonitorInstancesInput{ - InstanceIDs: []*string{ // Required + InstanceIds: []*string{ // Required aws.String("String"), // Required // More values... }, - DryRun: aws.Boolean(true), + DryRun: aws.Bool(true), } resp, err := svc.UnmonitorInstances(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } 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 792be71fb32..102c8fe026d 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 @@ -4,27 +4,36 @@ package ec2 import ( "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/defaults" + "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" ) -// EC2 is a client for Amazon EC2. +// 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. type EC2 struct { - *aws.Service + *service.Service } // Used for custom service initialization logic -var initService func(*aws.Service) +var initService func(*service.Service) // Used for custom request initialization logic -var initRequest func(*aws.Request) +var initRequest func(*request.Request) // New returns a new EC2 client. func New(config *aws.Config) *EC2 { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "ec2", - APIVersion: "2015-04-15", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "ec2", + APIVersion: "2015-04-15", + }, } service.Initialize() @@ -45,8 +54,8 @@ func New(config *aws.Config) *EC2 { // newRequest creates a new request for a EC2 operation and runs any // custom request initialization. -func (c *EC2) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *EC2) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) // Run custom request initialization if present if initRequest != nil { diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/api.go index 18fa15edf22..14126085b6a 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/api.go @@ -4,32 +4,27 @@ package elb import ( - "sync" "time" - "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" ) -var oprw sync.Mutex +const opAddTags = "AddTags" // AddTagsRequest generates a request for the AddTags operation. -func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *aws.Request, output *AddTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAddTags == nil { - opAddTags = &aws.Operation{ - Name: "AddTags", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { + op := &request.Operation{ + Name: opAddTags, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AddTagsInput{} } - req = c.newRequest(opAddTags, input, output) + req = c.newRequest(op, input, output) output = &AddTagsOutput{} req.Data = output return @@ -41,7 +36,7 @@ func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *aws.Request, output *Add // Each tag consists of a key and an optional value. If a tag with the same // key is already associated with the load balancer, AddTags updates its value. // -// For more information, see Tagging (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#tagging-elb) +// For more information, see Tag Your Load Balancer (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/add-remove-tags.html) // in the Elastic Load Balancing Developer Guide. func (c *ELB) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { req, out := c.AddTagsRequest(input) @@ -49,26 +44,21 @@ func (c *ELB) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { return out, err } -var opAddTags *aws.Operation +const opApplySecurityGroupsToLoadBalancer = "ApplySecurityGroupsToLoadBalancer" // ApplySecurityGroupsToLoadBalancerRequest generates a request for the ApplySecurityGroupsToLoadBalancer operation. -func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroupsToLoadBalancerInput) (req *aws.Request, output *ApplySecurityGroupsToLoadBalancerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opApplySecurityGroupsToLoadBalancer == nil { - opApplySecurityGroupsToLoadBalancer = &aws.Operation{ - Name: "ApplySecurityGroupsToLoadBalancer", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroupsToLoadBalancerInput) (req *request.Request, output *ApplySecurityGroupsToLoadBalancerOutput) { + op := &request.Operation{ + Name: opApplySecurityGroupsToLoadBalancer, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ApplySecurityGroupsToLoadBalancerInput{} } - req = c.newRequest(opApplySecurityGroupsToLoadBalancer, input, output) + req = c.newRequest(op, input, output) output = &ApplySecurityGroupsToLoadBalancerOutput{} req.Data = output return @@ -78,7 +68,7 @@ func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroup // private cloud (VPC). The specified security groups override the previously // associated security groups. // -// For more information, see Manage Security Groups for Amazon VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/USVPC_ApplySG.html) +// For more information, see Security Groups for Load Balancers in a VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-security-groups.html#elb-vpc-security-groups) // in the Elastic Load Balancing Developer Guide. func (c *ELB) ApplySecurityGroupsToLoadBalancer(input *ApplySecurityGroupsToLoadBalancerInput) (*ApplySecurityGroupsToLoadBalancerOutput, error) { req, out := c.ApplySecurityGroupsToLoadBalancerRequest(input) @@ -86,26 +76,21 @@ func (c *ELB) ApplySecurityGroupsToLoadBalancer(input *ApplySecurityGroupsToLoad return out, err } -var opApplySecurityGroupsToLoadBalancer *aws.Operation +const opAttachLoadBalancerToSubnets = "AttachLoadBalancerToSubnets" // AttachLoadBalancerToSubnetsRequest generates a request for the AttachLoadBalancerToSubnets operation. -func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubnetsInput) (req *aws.Request, output *AttachLoadBalancerToSubnetsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opAttachLoadBalancerToSubnets == nil { - opAttachLoadBalancerToSubnets = &aws.Operation{ - Name: "AttachLoadBalancerToSubnets", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubnetsInput) (req *request.Request, output *AttachLoadBalancerToSubnetsOutput) { + op := &request.Operation{ + Name: opAttachLoadBalancerToSubnets, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &AttachLoadBalancerToSubnetsInput{} } - req = c.newRequest(opAttachLoadBalancerToSubnets, input, output) + req = c.newRequest(op, input, output) output = &AttachLoadBalancerToSubnetsOutput{} req.Data = output return @@ -115,7 +100,8 @@ func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubn // load balancer. // // The load balancer evenly distributes requests across all registered subnets. -// For more information, see Elastic Load Balancing in Amazon VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/UserScenariosForVPC.html) +// For more information, see Add or Remove Subnets for Your Load Balancer in +// a VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-manage-subnets.html) // in the Elastic Load Balancing Developer Guide. func (c *ELB) AttachLoadBalancerToSubnets(input *AttachLoadBalancerToSubnetsInput) (*AttachLoadBalancerToSubnetsOutput, error) { req, out := c.AttachLoadBalancerToSubnetsRequest(input) @@ -123,26 +109,21 @@ func (c *ELB) AttachLoadBalancerToSubnets(input *AttachLoadBalancerToSubnetsInpu return out, err } -var opAttachLoadBalancerToSubnets *aws.Operation +const opConfigureHealthCheck = "ConfigureHealthCheck" // ConfigureHealthCheckRequest generates a request for the ConfigureHealthCheck operation. -func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req *aws.Request, output *ConfigureHealthCheckOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opConfigureHealthCheck == nil { - opConfigureHealthCheck = &aws.Operation{ - Name: "ConfigureHealthCheck", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req *request.Request, output *ConfigureHealthCheckOutput) { + op := &request.Operation{ + Name: opConfigureHealthCheck, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ConfigureHealthCheckInput{} } - req = c.newRequest(opConfigureHealthCheck, input, output) + req = c.newRequest(op, input, output) output = &ConfigureHealthCheckOutput{} req.Data = output return @@ -151,7 +132,7 @@ func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req // Specifies the health check settings to use when evaluating the health state // of your back-end instances. // -// For more information, see Health Checks (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#healthcheck) +// For more information, see Configure Health Checks (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-healthchecks.html) // in the Elastic Load Balancing Developer Guide. func (c *ELB) ConfigureHealthCheck(input *ConfigureHealthCheckInput) (*ConfigureHealthCheckOutput, error) { req, out := c.ConfigureHealthCheckRequest(input) @@ -159,26 +140,21 @@ func (c *ELB) ConfigureHealthCheck(input *ConfigureHealthCheckInput) (*Configure return out, err } -var opConfigureHealthCheck *aws.Operation +const opCreateAppCookieStickinessPolicy = "CreateAppCookieStickinessPolicy" // CreateAppCookieStickinessPolicyRequest generates a request for the CreateAppCookieStickinessPolicy operation. -func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStickinessPolicyInput) (req *aws.Request, output *CreateAppCookieStickinessPolicyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateAppCookieStickinessPolicy == nil { - opCreateAppCookieStickinessPolicy = &aws.Operation{ - Name: "CreateAppCookieStickinessPolicy", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStickinessPolicyInput) (req *request.Request, output *CreateAppCookieStickinessPolicyOutput) { + op := &request.Operation{ + Name: opCreateAppCookieStickinessPolicy, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateAppCookieStickinessPolicyInput{} } - req = c.newRequest(opCreateAppCookieStickinessPolicy, input, output) + req = c.newRequest(op, input, output) output = &CreateAppCookieStickinessPolicyOutput{} req.Data = output return @@ -197,7 +173,7 @@ func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStick // If the application cookie is explicitly removed or expires, the session // stops being sticky until a new application cookie is issued. // -// For more information, see Application-Controlled Session Stickiness (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsAppCookies) +// For more information, see Application-Controlled Session Stickiness (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-sticky-sessions.html#enable-sticky-sessions-application) // in the Elastic Load Balancing Developer Guide. func (c *ELB) CreateAppCookieStickinessPolicy(input *CreateAppCookieStickinessPolicyInput) (*CreateAppCookieStickinessPolicyOutput, error) { req, out := c.CreateAppCookieStickinessPolicyRequest(input) @@ -205,26 +181,21 @@ func (c *ELB) CreateAppCookieStickinessPolicy(input *CreateAppCookieStickinessPo return out, err } -var opCreateAppCookieStickinessPolicy *aws.Operation +const opCreateLBCookieStickinessPolicy = "CreateLBCookieStickinessPolicy" // CreateLBCookieStickinessPolicyRequest generates a request for the CreateLBCookieStickinessPolicy operation. -func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickinessPolicyInput) (req *aws.Request, output *CreateLBCookieStickinessPolicyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateLBCookieStickinessPolicy == nil { - opCreateLBCookieStickinessPolicy = &aws.Operation{ - Name: "CreateLBCookieStickinessPolicy", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickinessPolicyInput) (req *request.Request, output *CreateLBCookieStickinessPolicyOutput) { + op := &request.Operation{ + Name: opCreateLBCookieStickinessPolicy, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateLBCookieStickinessPolicyInput{} } - req = c.newRequest(opCreateLBCookieStickinessPolicy, input, output) + req = c.newRequest(op, input, output) output = &CreateLBCookieStickinessPolicyOutput{} req.Data = output return @@ -245,7 +216,7 @@ func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickin // the same user to that server. The validity of the cookie is based on the // cookie expiration time, which is specified in the policy configuration. // -// For more information, see Duration-Based Session Stickiness (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsLBCookies) +// For more information, see Duration-Based Session Stickiness (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-sticky-sessions.html#enable-sticky-sessions-duration) // in the Elastic Load Balancing Developer Guide. func (c *ELB) CreateLBCookieStickinessPolicy(input *CreateLBCookieStickinessPolicyInput) (*CreateLBCookieStickinessPolicyOutput, error) { req, out := c.CreateLBCookieStickinessPolicyRequest(input) @@ -253,26 +224,21 @@ func (c *ELB) CreateLBCookieStickinessPolicy(input *CreateLBCookieStickinessPoli return out, err } -var opCreateLBCookieStickinessPolicy *aws.Operation +const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a request for the CreateLoadBalancer operation. -func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *aws.Request, output *CreateLoadBalancerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateLoadBalancer == nil { - opCreateLoadBalancer = &aws.Operation{ - Name: "CreateLoadBalancer", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) { + op := &request.Operation{ + Name: opCreateLoadBalancer, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateLoadBalancerInput{} } - req = c.newRequest(opCreateLoadBalancer, input, output) + req = c.newRequest(op, input, output) output = &CreateLoadBalancerOutput{} req.Data = output return @@ -281,51 +247,36 @@ func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *aw // Creates a load balancer. // // If the call completes successfully, a new load balancer is created with -// a unique Domain Name Service (DNS) name. The DNS name includes the name of -// the AWS region in which the load balancer was created. For example, the DNS -// name might end with either of the following: -// -// us-east-1.elb.amazonaws.com us-west-2.elb.amazonaws.com For information -// about the AWS regions supported by Elastic Load Balancing, see Regions and -// Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region) -// in the Amazon Web Services General Reference. +// a unique Domain Name Service (DNS) name. The load balancer receives incoming +// traffic and routes it to the registered instances. For more information, +// see How Elastic Load Balancing Works (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/how-elb-works.html) +// in the Elastic Load Balancing Developer Guide. // // You can create up to 20 load balancers per region per account. You can request // an increase for the number of load balancers for your account. For more information, // see Elastic Load Balancing Limits (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-limits.html) // in the Elastic Load Balancing Developer Guide. -// -// Elastic Load Balancing supports load balancing your EC2 instances launched -// in either the EC2-Classic or EC2-VPC platform. For more information, see -// Elastic Load Balancing in EC2-Classic (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/UserScenariosForEC2.html) -// or Elastic Load Balancing in a VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/UserScenariosForVPC.html) -// in the Elastic Load Balancing Developer Guide. func (c *ELB) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) { req, out := c.CreateLoadBalancerRequest(input) err := req.Send() return out, err } -var opCreateLoadBalancer *aws.Operation +const opCreateLoadBalancerListeners = "CreateLoadBalancerListeners" // CreateLoadBalancerListenersRequest generates a request for the CreateLoadBalancerListeners operation. -func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListenersInput) (req *aws.Request, output *CreateLoadBalancerListenersOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateLoadBalancerListeners == nil { - opCreateLoadBalancerListeners = &aws.Operation{ - Name: "CreateLoadBalancerListeners", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListenersInput) (req *request.Request, output *CreateLoadBalancerListenersOutput) { + op := &request.Operation{ + Name: opCreateLoadBalancerListeners, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateLoadBalancerListenersInput{} } - req = c.newRequest(opCreateLoadBalancerListeners, input, output) + req = c.newRequest(op, input, output) output = &CreateLoadBalancerListenersOutput{} req.Data = output return @@ -344,26 +295,21 @@ func (c *ELB) CreateLoadBalancerListeners(input *CreateLoadBalancerListenersInpu return out, err } -var opCreateLoadBalancerListeners *aws.Operation +const opCreateLoadBalancerPolicy = "CreateLoadBalancerPolicy" // CreateLoadBalancerPolicyRequest generates a request for the CreateLoadBalancerPolicy operation. -func (c *ELB) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInput) (req *aws.Request, output *CreateLoadBalancerPolicyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opCreateLoadBalancerPolicy == nil { - opCreateLoadBalancerPolicy = &aws.Operation{ - Name: "CreateLoadBalancerPolicy", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInput) (req *request.Request, output *CreateLoadBalancerPolicyOutput) { + op := &request.Operation{ + Name: opCreateLoadBalancerPolicy, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &CreateLoadBalancerPolicyInput{} } - req = c.newRequest(opCreateLoadBalancerPolicy, input, output) + req = c.newRequest(op, input, output) output = &CreateLoadBalancerPolicyOutput{} req.Data = output return @@ -380,26 +326,21 @@ func (c *ELB) CreateLoadBalancerPolicy(input *CreateLoadBalancerPolicyInput) (*C return out, err } -var opCreateLoadBalancerPolicy *aws.Operation +const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a request for the DeleteLoadBalancer operation. -func (c *ELB) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *aws.Request, output *DeleteLoadBalancerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteLoadBalancer == nil { - opDeleteLoadBalancer = &aws.Operation{ - Name: "DeleteLoadBalancer", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) { + op := &request.Operation{ + Name: opDeleteLoadBalancer, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteLoadBalancerInput{} } - req = c.newRequest(opDeleteLoadBalancer, input, output) + req = c.newRequest(op, input, output) output = &DeleteLoadBalancerOutput{} req.Data = output return @@ -421,26 +362,21 @@ func (c *ELB) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBal return out, err } -var opDeleteLoadBalancer *aws.Operation +const opDeleteLoadBalancerListeners = "DeleteLoadBalancerListeners" // DeleteLoadBalancerListenersRequest generates a request for the DeleteLoadBalancerListeners operation. -func (c *ELB) DeleteLoadBalancerListenersRequest(input *DeleteLoadBalancerListenersInput) (req *aws.Request, output *DeleteLoadBalancerListenersOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteLoadBalancerListeners == nil { - opDeleteLoadBalancerListeners = &aws.Operation{ - Name: "DeleteLoadBalancerListeners", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DeleteLoadBalancerListenersRequest(input *DeleteLoadBalancerListenersInput) (req *request.Request, output *DeleteLoadBalancerListenersOutput) { + op := &request.Operation{ + Name: opDeleteLoadBalancerListeners, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteLoadBalancerListenersInput{} } - req = c.newRequest(opDeleteLoadBalancerListeners, input, output) + req = c.newRequest(op, input, output) output = &DeleteLoadBalancerListenersOutput{} req.Data = output return @@ -453,26 +389,21 @@ func (c *ELB) DeleteLoadBalancerListeners(input *DeleteLoadBalancerListenersInpu return out, err } -var opDeleteLoadBalancerListeners *aws.Operation +const opDeleteLoadBalancerPolicy = "DeleteLoadBalancerPolicy" // DeleteLoadBalancerPolicyRequest generates a request for the DeleteLoadBalancerPolicy operation. -func (c *ELB) DeleteLoadBalancerPolicyRequest(input *DeleteLoadBalancerPolicyInput) (req *aws.Request, output *DeleteLoadBalancerPolicyOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeleteLoadBalancerPolicy == nil { - opDeleteLoadBalancerPolicy = &aws.Operation{ - Name: "DeleteLoadBalancerPolicy", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DeleteLoadBalancerPolicyRequest(input *DeleteLoadBalancerPolicyInput) (req *request.Request, output *DeleteLoadBalancerPolicyOutput) { + op := &request.Operation{ + Name: opDeleteLoadBalancerPolicy, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeleteLoadBalancerPolicyInput{} } - req = c.newRequest(opDeleteLoadBalancerPolicy, input, output) + req = c.newRequest(op, input, output) output = &DeleteLoadBalancerPolicyOutput{} req.Data = output return @@ -486,26 +417,21 @@ func (c *ELB) DeleteLoadBalancerPolicy(input *DeleteLoadBalancerPolicyInput) (*D return out, err } -var opDeleteLoadBalancerPolicy *aws.Operation +const opDeregisterInstancesFromLoadBalancer = "DeregisterInstancesFromLoadBalancer" // DeregisterInstancesFromLoadBalancerRequest generates a request for the DeregisterInstancesFromLoadBalancer operation. -func (c *ELB) DeregisterInstancesFromLoadBalancerRequest(input *DeregisterInstancesFromLoadBalancerInput) (req *aws.Request, output *DeregisterInstancesFromLoadBalancerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDeregisterInstancesFromLoadBalancer == nil { - opDeregisterInstancesFromLoadBalancer = &aws.Operation{ - Name: "DeregisterInstancesFromLoadBalancer", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DeregisterInstancesFromLoadBalancerRequest(input *DeregisterInstancesFromLoadBalancerInput) (req *request.Request, output *DeregisterInstancesFromLoadBalancerOutput) { + op := &request.Operation{ + Name: opDeregisterInstancesFromLoadBalancer, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DeregisterInstancesFromLoadBalancerInput{} } - req = c.newRequest(opDeregisterInstancesFromLoadBalancer, input, output) + req = c.newRequest(op, input, output) output = &DeregisterInstancesFromLoadBalancerOutput{} req.Data = output return @@ -526,26 +452,21 @@ func (c *ELB) DeregisterInstancesFromLoadBalancer(input *DeregisterInstancesFrom return out, err } -var opDeregisterInstancesFromLoadBalancer *aws.Operation +const opDescribeInstanceHealth = "DescribeInstanceHealth" // DescribeInstanceHealthRequest generates a request for the DescribeInstanceHealth operation. -func (c *ELB) DescribeInstanceHealthRequest(input *DescribeInstanceHealthInput) (req *aws.Request, output *DescribeInstanceHealthOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeInstanceHealth == nil { - opDescribeInstanceHealth = &aws.Operation{ - Name: "DescribeInstanceHealth", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DescribeInstanceHealthRequest(input *DescribeInstanceHealthInput) (req *request.Request, output *DescribeInstanceHealthOutput) { + op := &request.Operation{ + Name: opDescribeInstanceHealth, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeInstanceHealthInput{} } - req = c.newRequest(opDescribeInstanceHealth, input, output) + req = c.newRequest(op, input, output) output = &DescribeInstanceHealthOutput{} req.Data = output return @@ -561,26 +482,21 @@ func (c *ELB) DescribeInstanceHealth(input *DescribeInstanceHealthInput) (*Descr return out, err } -var opDescribeInstanceHealth *aws.Operation +const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" // DescribeLoadBalancerAttributesRequest generates a request for the DescribeLoadBalancerAttributes operation. -func (c *ELB) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *aws.Request, output *DescribeLoadBalancerAttributesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeLoadBalancerAttributes == nil { - opDescribeLoadBalancerAttributes = &aws.Operation{ - Name: "DescribeLoadBalancerAttributes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *request.Request, output *DescribeLoadBalancerAttributesOutput) { + op := &request.Operation{ + Name: opDescribeLoadBalancerAttributes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeLoadBalancerAttributesInput{} } - req = c.newRequest(opDescribeLoadBalancerAttributes, input, output) + req = c.newRequest(op, input, output) output = &DescribeLoadBalancerAttributesOutput{} req.Data = output return @@ -593,26 +509,21 @@ func (c *ELB) DescribeLoadBalancerAttributes(input *DescribeLoadBalancerAttribut return out, err } -var opDescribeLoadBalancerAttributes *aws.Operation +const opDescribeLoadBalancerPolicies = "DescribeLoadBalancerPolicies" // DescribeLoadBalancerPoliciesRequest generates a request for the DescribeLoadBalancerPolicies operation. -func (c *ELB) DescribeLoadBalancerPoliciesRequest(input *DescribeLoadBalancerPoliciesInput) (req *aws.Request, output *DescribeLoadBalancerPoliciesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeLoadBalancerPolicies == nil { - opDescribeLoadBalancerPolicies = &aws.Operation{ - Name: "DescribeLoadBalancerPolicies", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DescribeLoadBalancerPoliciesRequest(input *DescribeLoadBalancerPoliciesInput) (req *request.Request, output *DescribeLoadBalancerPoliciesOutput) { + op := &request.Operation{ + Name: opDescribeLoadBalancerPolicies, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeLoadBalancerPoliciesInput{} } - req = c.newRequest(opDescribeLoadBalancerPolicies, input, output) + req = c.newRequest(op, input, output) output = &DescribeLoadBalancerPoliciesOutput{} req.Data = output return @@ -632,26 +543,21 @@ func (c *ELB) DescribeLoadBalancerPolicies(input *DescribeLoadBalancerPoliciesIn return out, err } -var opDescribeLoadBalancerPolicies *aws.Operation +const opDescribeLoadBalancerPolicyTypes = "DescribeLoadBalancerPolicyTypes" // DescribeLoadBalancerPolicyTypesRequest generates a request for the DescribeLoadBalancerPolicyTypes operation. -func (c *ELB) DescribeLoadBalancerPolicyTypesRequest(input *DescribeLoadBalancerPolicyTypesInput) (req *aws.Request, output *DescribeLoadBalancerPolicyTypesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeLoadBalancerPolicyTypes == nil { - opDescribeLoadBalancerPolicyTypes = &aws.Operation{ - Name: "DescribeLoadBalancerPolicyTypes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DescribeLoadBalancerPolicyTypesRequest(input *DescribeLoadBalancerPolicyTypesInput) (req *request.Request, output *DescribeLoadBalancerPolicyTypesOutput) { + op := &request.Operation{ + Name: opDescribeLoadBalancerPolicyTypes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeLoadBalancerPolicyTypesInput{} } - req = c.newRequest(opDescribeLoadBalancerPolicyTypes, input, output) + req = c.newRequest(op, input, output) output = &DescribeLoadBalancerPolicyTypesOutput{} req.Data = output return @@ -667,32 +573,27 @@ func (c *ELB) DescribeLoadBalancerPolicyTypes(input *DescribeLoadBalancerPolicyT return out, err } -var opDescribeLoadBalancerPolicyTypes *aws.Operation +const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a request for the DescribeLoadBalancers operation. -func (c *ELB) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *aws.Request, output *DescribeLoadBalancersOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeLoadBalancers == nil { - opDescribeLoadBalancers = &aws.Operation{ - Name: "DescribeLoadBalancers", - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &aws.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } +func (c *ELB) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) { + op := &request.Operation{ + Name: opDescribeLoadBalancers, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"NextMarker"}, + LimitToken: "", + TruncationToken: "", + }, } if input == nil { input = &DescribeLoadBalancersInput{} } - req = c.newRequest(opDescribeLoadBalancers, input, output) + req = c.newRequest(op, input, output) output = &DescribeLoadBalancersOutput{} req.Data = output return @@ -713,26 +614,21 @@ func (c *ELB) DescribeLoadBalancersPages(input *DescribeLoadBalancersInput, fn f }) } -var opDescribeLoadBalancers *aws.Operation +const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a request for the DescribeTags operation. -func (c *ELB) DescribeTagsRequest(input *DescribeTagsInput) (req *aws.Request, output *DescribeTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDescribeTags == nil { - opDescribeTags = &aws.Operation{ - Name: "DescribeTags", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { + op := &request.Operation{ + Name: opDescribeTags, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DescribeTagsInput{} } - req = c.newRequest(opDescribeTags, input, output) + req = c.newRequest(op, input, output) output = &DescribeTagsOutput{} req.Data = output return @@ -745,26 +641,21 @@ func (c *ELB) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error return out, err } -var opDescribeTags *aws.Operation +const opDetachLoadBalancerFromSubnets = "DetachLoadBalancerFromSubnets" // DetachLoadBalancerFromSubnetsRequest generates a request for the DetachLoadBalancerFromSubnets operation. -func (c *ELB) DetachLoadBalancerFromSubnetsRequest(input *DetachLoadBalancerFromSubnetsInput) (req *aws.Request, output *DetachLoadBalancerFromSubnetsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDetachLoadBalancerFromSubnets == nil { - opDetachLoadBalancerFromSubnets = &aws.Operation{ - Name: "DetachLoadBalancerFromSubnets", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DetachLoadBalancerFromSubnetsRequest(input *DetachLoadBalancerFromSubnetsInput) (req *request.Request, output *DetachLoadBalancerFromSubnetsOutput) { + op := &request.Operation{ + Name: opDetachLoadBalancerFromSubnets, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DetachLoadBalancerFromSubnetsInput{} } - req = c.newRequest(opDetachLoadBalancerFromSubnets, input, output) + req = c.newRequest(op, input, output) output = &DetachLoadBalancerFromSubnetsOutput{} req.Data = output return @@ -782,26 +673,21 @@ func (c *ELB) DetachLoadBalancerFromSubnets(input *DetachLoadBalancerFromSubnets return out, err } -var opDetachLoadBalancerFromSubnets *aws.Operation +const opDisableAvailabilityZonesForLoadBalancer = "DisableAvailabilityZonesForLoadBalancer" // DisableAvailabilityZonesForLoadBalancerRequest generates a request for the DisableAvailabilityZonesForLoadBalancer operation. -func (c *ELB) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvailabilityZonesForLoadBalancerInput) (req *aws.Request, output *DisableAvailabilityZonesForLoadBalancerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opDisableAvailabilityZonesForLoadBalancer == nil { - opDisableAvailabilityZonesForLoadBalancer = &aws.Operation{ - Name: "DisableAvailabilityZonesForLoadBalancer", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvailabilityZonesForLoadBalancerInput) (req *request.Request, output *DisableAvailabilityZonesForLoadBalancerOutput) { + op := &request.Operation{ + Name: opDisableAvailabilityZonesForLoadBalancer, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &DisableAvailabilityZonesForLoadBalancerInput{} } - req = c.newRequest(opDisableAvailabilityZonesForLoadBalancer, input, output) + req = c.newRequest(op, input, output) output = &DisableAvailabilityZonesForLoadBalancerOutput{} req.Data = output return @@ -825,26 +711,21 @@ func (c *ELB) DisableAvailabilityZonesForLoadBalancer(input *DisableAvailability return out, err } -var opDisableAvailabilityZonesForLoadBalancer *aws.Operation +const opEnableAvailabilityZonesForLoadBalancer = "EnableAvailabilityZonesForLoadBalancer" // EnableAvailabilityZonesForLoadBalancerRequest generates a request for the EnableAvailabilityZonesForLoadBalancer operation. -func (c *ELB) EnableAvailabilityZonesForLoadBalancerRequest(input *EnableAvailabilityZonesForLoadBalancerInput) (req *aws.Request, output *EnableAvailabilityZonesForLoadBalancerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opEnableAvailabilityZonesForLoadBalancer == nil { - opEnableAvailabilityZonesForLoadBalancer = &aws.Operation{ - Name: "EnableAvailabilityZonesForLoadBalancer", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) EnableAvailabilityZonesForLoadBalancerRequest(input *EnableAvailabilityZonesForLoadBalancerInput) (req *request.Request, output *EnableAvailabilityZonesForLoadBalancerOutput) { + op := &request.Operation{ + Name: opEnableAvailabilityZonesForLoadBalancer, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &EnableAvailabilityZonesForLoadBalancerInput{} } - req = c.newRequest(opEnableAvailabilityZonesForLoadBalancer, input, output) + req = c.newRequest(op, input, output) output = &EnableAvailabilityZonesForLoadBalancerOutput{} req.Data = output return @@ -864,26 +745,21 @@ func (c *ELB) EnableAvailabilityZonesForLoadBalancer(input *EnableAvailabilityZo return out, err } -var opEnableAvailabilityZonesForLoadBalancer *aws.Operation +const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" // ModifyLoadBalancerAttributesRequest generates a request for the ModifyLoadBalancerAttributes operation. -func (c *ELB) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *aws.Request, output *ModifyLoadBalancerAttributesOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opModifyLoadBalancerAttributes == nil { - opModifyLoadBalancerAttributes = &aws.Operation{ - Name: "ModifyLoadBalancerAttributes", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *request.Request, output *ModifyLoadBalancerAttributesOutput) { + op := &request.Operation{ + Name: opModifyLoadBalancerAttributes, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &ModifyLoadBalancerAttributesInput{} } - req = c.newRequest(opModifyLoadBalancerAttributes, input, output) + req = c.newRequest(op, input, output) output = &ModifyLoadBalancerAttributesOutput{} req.Data = output return @@ -909,26 +785,21 @@ func (c *ELB) ModifyLoadBalancerAttributes(input *ModifyLoadBalancerAttributesIn return out, err } -var opModifyLoadBalancerAttributes *aws.Operation +const opRegisterInstancesWithLoadBalancer = "RegisterInstancesWithLoadBalancer" // RegisterInstancesWithLoadBalancerRequest generates a request for the RegisterInstancesWithLoadBalancer operation. -func (c *ELB) RegisterInstancesWithLoadBalancerRequest(input *RegisterInstancesWithLoadBalancerInput) (req *aws.Request, output *RegisterInstancesWithLoadBalancerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRegisterInstancesWithLoadBalancer == nil { - opRegisterInstancesWithLoadBalancer = &aws.Operation{ - Name: "RegisterInstancesWithLoadBalancer", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) RegisterInstancesWithLoadBalancerRequest(input *RegisterInstancesWithLoadBalancerInput) (req *request.Request, output *RegisterInstancesWithLoadBalancerOutput) { + op := &request.Operation{ + Name: opRegisterInstancesWithLoadBalancer, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RegisterInstancesWithLoadBalancerInput{} } - req = c.newRequest(opRegisterInstancesWithLoadBalancer, input, output) + req = c.newRequest(op, input, output) output = &RegisterInstancesWithLoadBalancerOutput{} req.Data = output return @@ -967,26 +838,21 @@ func (c *ELB) RegisterInstancesWithLoadBalancer(input *RegisterInstancesWithLoad return out, err } -var opRegisterInstancesWithLoadBalancer *aws.Operation +const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a request for the RemoveTags operation. -func (c *ELB) RemoveTagsRequest(input *RemoveTagsInput) (req *aws.Request, output *RemoveTagsOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opRemoveTags == nil { - opRemoveTags = &aws.Operation{ - Name: "RemoveTags", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { + op := &request.Operation{ + Name: opRemoveTags, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &RemoveTagsInput{} } - req = c.newRequest(opRemoveTags, input, output) + req = c.newRequest(op, input, output) output = &RemoveTagsOutput{} req.Data = output return @@ -999,26 +865,21 @@ func (c *ELB) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { return out, err } -var opRemoveTags *aws.Operation +const opSetLoadBalancerListenerSSLCertificate = "SetLoadBalancerListenerSSLCertificate" // SetLoadBalancerListenerSSLCertificateRequest generates a request for the SetLoadBalancerListenerSSLCertificate operation. -func (c *ELB) SetLoadBalancerListenerSSLCertificateRequest(input *SetLoadBalancerListenerSSLCertificateInput) (req *aws.Request, output *SetLoadBalancerListenerSSLCertificateOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opSetLoadBalancerListenerSSLCertificate == nil { - opSetLoadBalancerListenerSSLCertificate = &aws.Operation{ - Name: "SetLoadBalancerListenerSSLCertificate", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) SetLoadBalancerListenerSSLCertificateRequest(input *SetLoadBalancerListenerSSLCertificateInput) (req *request.Request, output *SetLoadBalancerListenerSSLCertificateOutput) { + op := &request.Operation{ + Name: opSetLoadBalancerListenerSSLCertificate, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &SetLoadBalancerListenerSSLCertificateInput{} } - req = c.newRequest(opSetLoadBalancerListenerSSLCertificate, input, output) + req = c.newRequest(op, input, output) output = &SetLoadBalancerListenerSSLCertificateOutput{} req.Data = output return @@ -1037,26 +898,21 @@ func (c *ELB) SetLoadBalancerListenerSSLCertificate(input *SetLoadBalancerListen return out, err } -var opSetLoadBalancerListenerSSLCertificate *aws.Operation +const opSetLoadBalancerPoliciesForBackendServer = "SetLoadBalancerPoliciesForBackendServer" // SetLoadBalancerPoliciesForBackendServerRequest generates a request for the SetLoadBalancerPoliciesForBackendServer operation. -func (c *ELB) SetLoadBalancerPoliciesForBackendServerRequest(input *SetLoadBalancerPoliciesForBackendServerInput) (req *aws.Request, output *SetLoadBalancerPoliciesForBackendServerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opSetLoadBalancerPoliciesForBackendServer == nil { - opSetLoadBalancerPoliciesForBackendServer = &aws.Operation{ - Name: "SetLoadBalancerPoliciesForBackendServer", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) SetLoadBalancerPoliciesForBackendServerRequest(input *SetLoadBalancerPoliciesForBackendServerInput) (req *request.Request, output *SetLoadBalancerPoliciesForBackendServerOutput) { + op := &request.Operation{ + Name: opSetLoadBalancerPoliciesForBackendServer, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &SetLoadBalancerPoliciesForBackendServerInput{} } - req = c.newRequest(opSetLoadBalancerPoliciesForBackendServer, input, output) + req = c.newRequest(op, input, output) output = &SetLoadBalancerPoliciesForBackendServerOutput{} req.Data = output return @@ -1079,26 +935,21 @@ func (c *ELB) SetLoadBalancerPoliciesForBackendServer(input *SetLoadBalancerPoli return out, err } -var opSetLoadBalancerPoliciesForBackendServer *aws.Operation +const opSetLoadBalancerPoliciesOfListener = "SetLoadBalancerPoliciesOfListener" // SetLoadBalancerPoliciesOfListenerRequest generates a request for the SetLoadBalancerPoliciesOfListener operation. -func (c *ELB) SetLoadBalancerPoliciesOfListenerRequest(input *SetLoadBalancerPoliciesOfListenerInput) (req *aws.Request, output *SetLoadBalancerPoliciesOfListenerOutput) { - oprw.Lock() - defer oprw.Unlock() - - if opSetLoadBalancerPoliciesOfListener == nil { - opSetLoadBalancerPoliciesOfListener = &aws.Operation{ - Name: "SetLoadBalancerPoliciesOfListener", - HTTPMethod: "POST", - HTTPPath: "/", - } +func (c *ELB) SetLoadBalancerPoliciesOfListenerRequest(input *SetLoadBalancerPoliciesOfListenerInput) (req *request.Request, output *SetLoadBalancerPoliciesOfListenerOutput) { + op := &request.Operation{ + Name: opSetLoadBalancerPoliciesOfListener, + HTTPMethod: "POST", + HTTPPath: "/", } if input == nil { input = &SetLoadBalancerPoliciesOfListenerInput{} } - req = c.newRequest(opSetLoadBalancerPoliciesOfListener, input, output) + req = c.newRequest(op, input, output) output = &SetLoadBalancerPoliciesOfListenerOutput{} req.Data = output return @@ -1112,8 +963,6 @@ func (c *ELB) SetLoadBalancerPoliciesOfListener(input *SetLoadBalancerPoliciesOf return out, err } -var opSetLoadBalancerPoliciesOfListener *aws.Operation - // Information about the AccessLog attribute. type AccessLog struct { // The interval for publishing the access logs. You can specify an interval @@ -1140,12 +989,22 @@ type metadataAccessLog struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AccessLog) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessLog) GoString() string { + return s.String() +} + type AddTagsInput struct { // The name of the load balancer. You can specify one load balancer only. LoadBalancerNames []*string `type:"list" required:"true"` // The tags. - Tags []*Tag `type:"list" required:"true"` + Tags []*Tag `min:"1" type:"list" required:"true"` metadataAddTagsInput `json:"-" xml:"-"` } @@ -1154,6 +1013,16 @@ type metadataAddTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AddTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsInput) GoString() string { + return s.String() +} + type AddTagsOutput struct { metadataAddTagsOutput `json:"-" xml:"-"` } @@ -1162,6 +1031,16 @@ type metadataAddTagsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AddTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsOutput) GoString() string { + return s.String() +} + // This data type is reserved. type AdditionalAttribute struct { // This parameter is reserved. @@ -1177,6 +1056,16 @@ type metadataAdditionalAttribute struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AdditionalAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AdditionalAttribute) GoString() string { + return s.String() +} + // Information about a policy for application-controlled session stickiness. type AppCookieStickinessPolicy struct { // The name of the application cookie used for stickiness. @@ -1193,6 +1082,16 @@ type metadataAppCookieStickinessPolicy struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AppCookieStickinessPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AppCookieStickinessPolicy) GoString() string { + return s.String() +} + type ApplySecurityGroupsToLoadBalancerInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -1208,6 +1107,16 @@ type metadataApplySecurityGroupsToLoadBalancerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ApplySecurityGroupsToLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplySecurityGroupsToLoadBalancerInput) GoString() string { + return s.String() +} + type ApplySecurityGroupsToLoadBalancerOutput struct { // The IDs of the security groups associated with the load balancer. SecurityGroups []*string `type:"list"` @@ -1219,6 +1128,16 @@ type metadataApplySecurityGroupsToLoadBalancerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ApplySecurityGroupsToLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplySecurityGroupsToLoadBalancerOutput) GoString() string { + return s.String() +} + type AttachLoadBalancerToSubnetsInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -1234,6 +1153,16 @@ type metadataAttachLoadBalancerToSubnetsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachLoadBalancerToSubnetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachLoadBalancerToSubnetsInput) GoString() string { + return s.String() +} + type AttachLoadBalancerToSubnetsOutput struct { // The IDs of the subnets attached to the load balancer. Subnets []*string `type:"list"` @@ -1245,10 +1174,20 @@ type metadataAttachLoadBalancerToSubnetsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s AttachLoadBalancerToSubnetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachLoadBalancerToSubnetsOutput) GoString() string { + return s.String() +} + // Information about the configuration of a back-end server. type BackendServerDescription struct { // The port on which the back-end server is listening. - InstancePort *int64 `type:"integer"` + InstancePort *int64 `min:"1" type:"integer"` // The names of the policies enabled for the back-end server. PolicyNames []*string `type:"list"` @@ -1260,6 +1199,16 @@ type metadataBackendServerDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s BackendServerDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BackendServerDescription) GoString() string { + return s.String() +} + type ConfigureHealthCheckInput struct { // The configuration information for the new health check. HealthCheck *HealthCheck `type:"structure" required:"true"` @@ -1274,6 +1223,16 @@ type metadataConfigureHealthCheckInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ConfigureHealthCheckInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfigureHealthCheckInput) GoString() string { + return s.String() +} + type ConfigureHealthCheckOutput struct { // The updated health check. HealthCheck *HealthCheck `type:"structure"` @@ -1285,6 +1244,16 @@ type metadataConfigureHealthCheckOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ConfigureHealthCheckOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfigureHealthCheckOutput) GoString() string { + return s.String() +} + // Information about the ConnectionDraining attribute. type ConnectionDraining struct { // Specifies whether connection draining is enabled for the load balancer. @@ -1301,11 +1270,21 @@ type metadataConnectionDraining struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ConnectionDraining) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectionDraining) GoString() string { + return s.String() +} + // Information about the ConnectionSettings attribute. type ConnectionSettings struct { // The time, in seconds, that the connection is allowed to be idle (no data // has been sent over the connection) before it is closed by the load balancer. - IdleTimeout *int64 `type:"integer" required:"true"` + IdleTimeout *int64 `min:"1" type:"integer" required:"true"` metadataConnectionSettings `json:"-" xml:"-"` } @@ -1314,6 +1293,16 @@ type metadataConnectionSettings struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ConnectionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectionSettings) GoString() string { + return s.String() +} + type CreateAppCookieStickinessPolicyInput struct { // The name of the application cookie used for stickiness. CookieName *string `type:"string" required:"true"` @@ -1332,6 +1321,16 @@ type metadataCreateAppCookieStickinessPolicyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateAppCookieStickinessPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAppCookieStickinessPolicyInput) GoString() string { + return s.String() +} + type CreateAppCookieStickinessPolicyOutput struct { metadataCreateAppCookieStickinessPolicyOutput `json:"-" xml:"-"` } @@ -1340,6 +1339,16 @@ type metadataCreateAppCookieStickinessPolicyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateAppCookieStickinessPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAppCookieStickinessPolicyOutput) GoString() string { + return s.String() +} + type CreateLBCookieStickinessPolicyInput struct { // The time period, in seconds, after which the cookie should be considered // stale. If you do not specify this parameter, the sticky session lasts for @@ -1360,6 +1369,16 @@ type metadataCreateLBCookieStickinessPolicyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLBCookieStickinessPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLBCookieStickinessPolicyInput) GoString() string { + return s.String() +} + type CreateLBCookieStickinessPolicyOutput struct { metadataCreateLBCookieStickinessPolicyOutput `json:"-" xml:"-"` } @@ -1368,6 +1387,16 @@ type metadataCreateLBCookieStickinessPolicyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLBCookieStickinessPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLBCookieStickinessPolicyOutput) GoString() string { + return s.String() +} + type CreateLoadBalancerInput struct { // One or more Availability Zones from the same region as the load balancer. // Traffic is equally distributed across all specified Availability Zones. @@ -1380,8 +1409,7 @@ type CreateLoadBalancerInput struct { // The listeners. // - // For more information, see Listener Configurations for Elastic Load Balancing - // (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-listener-config.html) + // For more information, see Listeners for Your Load Balancer (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-listener-config.html) // in the Elastic Load Balancing Developer Guide. Listeners []*Listener `type:"list" required:"true"` @@ -1415,7 +1443,7 @@ type CreateLoadBalancerInput struct { // // For more information about tagging your load balancer, see Tagging (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#tagging-elb) // in the Elastic Load Balancing Developer Guide. - Tags []*Tag `type:"list"` + Tags []*Tag `min:"1" type:"list"` metadataCreateLoadBalancerInput `json:"-" xml:"-"` } @@ -1424,6 +1452,16 @@ type metadataCreateLoadBalancerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerInput) GoString() string { + return s.String() +} + type CreateLoadBalancerListenersInput struct { // The listeners. Listeners []*Listener `type:"list" required:"true"` @@ -1438,6 +1476,16 @@ type metadataCreateLoadBalancerListenersInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLoadBalancerListenersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerListenersInput) GoString() string { + return s.String() +} + type CreateLoadBalancerListenersOutput struct { metadataCreateLoadBalancerListenersOutput `json:"-" xml:"-"` } @@ -1446,6 +1494,16 @@ type metadataCreateLoadBalancerListenersOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLoadBalancerListenersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerListenersOutput) GoString() string { + return s.String() +} + type CreateLoadBalancerOutput struct { // The DNS name of the load balancer. DNSName *string `type:"string"` @@ -1457,6 +1515,16 @@ type metadataCreateLoadBalancerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerOutput) GoString() string { + return s.String() +} + type CreateLoadBalancerPolicyInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -1478,6 +1546,16 @@ type metadataCreateLoadBalancerPolicyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLoadBalancerPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerPolicyInput) GoString() string { + return s.String() +} + type CreateLoadBalancerPolicyOutput struct { metadataCreateLoadBalancerPolicyOutput `json:"-" xml:"-"` } @@ -1486,6 +1564,16 @@ type metadataCreateLoadBalancerPolicyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CreateLoadBalancerPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerPolicyOutput) GoString() string { + return s.String() +} + // Information about the CrossZoneLoadBalancing attribute. type CrossZoneLoadBalancing struct { // Specifies whether cross-zone load balancing is enabled for the load balancer. @@ -1498,6 +1586,16 @@ type metadataCrossZoneLoadBalancing struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s CrossZoneLoadBalancing) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CrossZoneLoadBalancing) GoString() string { + return s.String() +} + type DeleteLoadBalancerInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -1509,6 +1607,16 @@ type metadataDeleteLoadBalancerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoadBalancerInput) GoString() string { + return s.String() +} + type DeleteLoadBalancerListenersInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -1523,6 +1631,16 @@ type metadataDeleteLoadBalancerListenersInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLoadBalancerListenersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoadBalancerListenersInput) GoString() string { + return s.String() +} + type DeleteLoadBalancerListenersOutput struct { metadataDeleteLoadBalancerListenersOutput `json:"-" xml:"-"` } @@ -1531,6 +1649,16 @@ type metadataDeleteLoadBalancerListenersOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLoadBalancerListenersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoadBalancerListenersOutput) GoString() string { + return s.String() +} + type DeleteLoadBalancerOutput struct { metadataDeleteLoadBalancerOutput `json:"-" xml:"-"` } @@ -1539,6 +1667,16 @@ type metadataDeleteLoadBalancerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoadBalancerOutput) GoString() string { + return s.String() +} + // = type DeleteLoadBalancerPolicyInput struct { // The name of the load balancer. @@ -1554,6 +1692,16 @@ type metadataDeleteLoadBalancerPolicyInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLoadBalancerPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoadBalancerPolicyInput) GoString() string { + return s.String() +} + type DeleteLoadBalancerPolicyOutput struct { metadataDeleteLoadBalancerPolicyOutput `json:"-" xml:"-"` } @@ -1562,6 +1710,16 @@ type metadataDeleteLoadBalancerPolicyOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeleteLoadBalancerPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoadBalancerPolicyOutput) GoString() string { + return s.String() +} + type DeregisterInstancesFromLoadBalancerInput struct { // The IDs of the instances. Instances []*Instance `type:"list" required:"true"` @@ -1576,6 +1734,16 @@ type metadataDeregisterInstancesFromLoadBalancerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeregisterInstancesFromLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterInstancesFromLoadBalancerInput) GoString() string { + return s.String() +} + type DeregisterInstancesFromLoadBalancerOutput struct { // The remaining instances registered with the load balancer. Instances []*Instance `type:"list"` @@ -1587,6 +1755,16 @@ type metadataDeregisterInstancesFromLoadBalancerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DeregisterInstancesFromLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeregisterInstancesFromLoadBalancerOutput) GoString() string { + return s.String() +} + type DescribeInstanceHealthInput struct { // The IDs of the instances. Instances []*Instance `type:"list"` @@ -1601,6 +1779,16 @@ type metadataDescribeInstanceHealthInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInstanceHealthInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceHealthInput) GoString() string { + return s.String() +} + type DescribeInstanceHealthOutput struct { // Information about the health of the instances. InstanceStates []*InstanceState `type:"list"` @@ -1612,6 +1800,16 @@ type metadataDescribeInstanceHealthOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeInstanceHealthOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceHealthOutput) GoString() string { + return s.String() +} + type DescribeLoadBalancerAttributesInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -1623,6 +1821,16 @@ type metadataDescribeLoadBalancerAttributesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLoadBalancerAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancerAttributesInput) GoString() string { + return s.String() +} + type DescribeLoadBalancerAttributesOutput struct { // Information about the load balancer attributes. LoadBalancerAttributes *LoadBalancerAttributes `type:"structure"` @@ -1634,6 +1842,16 @@ type metadataDescribeLoadBalancerAttributesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLoadBalancerAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancerAttributesOutput) GoString() string { + return s.String() +} + type DescribeLoadBalancerPoliciesInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string"` @@ -1648,6 +1866,16 @@ type metadataDescribeLoadBalancerPoliciesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLoadBalancerPoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancerPoliciesInput) GoString() string { + return s.String() +} + type DescribeLoadBalancerPoliciesOutput struct { // Information about the policies. PolicyDescriptions []*PolicyDescription `type:"list"` @@ -1659,6 +1887,16 @@ type metadataDescribeLoadBalancerPoliciesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLoadBalancerPoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancerPoliciesOutput) GoString() string { + return s.String() +} + type DescribeLoadBalancerPolicyTypesInput struct { // The names of the policy types. If no names are specified, describes all policy // types defined by Elastic Load Balancing. @@ -1671,6 +1909,16 @@ type metadataDescribeLoadBalancerPolicyTypesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLoadBalancerPolicyTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancerPolicyTypesInput) GoString() string { + return s.String() +} + type DescribeLoadBalancerPolicyTypesOutput struct { // Information about the policy types. PolicyTypeDescriptions []*PolicyTypeDescription `type:"list"` @@ -1682,6 +1930,16 @@ type metadataDescribeLoadBalancerPolicyTypesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLoadBalancerPolicyTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancerPolicyTypesOutput) GoString() string { + return s.String() +} + type DescribeLoadBalancersInput struct { // The names of the load balancers. LoadBalancerNames []*string `type:"list"` @@ -1692,7 +1950,7 @@ type DescribeLoadBalancersInput struct { // The maximum number of results to return with this call (a number from 1 to // 400). The default is 400. - PageSize *int64 `type:"integer"` + PageSize *int64 `min:"1" type:"integer"` metadataDescribeLoadBalancersInput `json:"-" xml:"-"` } @@ -1701,6 +1959,16 @@ type metadataDescribeLoadBalancersInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLoadBalancersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancersInput) GoString() string { + return s.String() +} + type DescribeLoadBalancersOutput struct { // Information about the load balancers. LoadBalancerDescriptions []*LoadBalancerDescription `type:"list"` @@ -1716,9 +1984,19 @@ type metadataDescribeLoadBalancersOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeLoadBalancersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLoadBalancersOutput) GoString() string { + return s.String() +} + type DescribeTagsInput struct { // The names of the load balancers. - LoadBalancerNames []*string `type:"list" required:"true"` + LoadBalancerNames []*string `min:"1" type:"list" required:"true"` metadataDescribeTagsInput `json:"-" xml:"-"` } @@ -1727,6 +2005,16 @@ type metadataDescribeTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsInput) GoString() string { + return s.String() +} + type DescribeTagsOutput struct { // Information about the tags. TagDescriptions []*TagDescription `type:"list"` @@ -1738,6 +2026,16 @@ type metadataDescribeTagsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DescribeTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsOutput) GoString() string { + return s.String() +} + type DetachLoadBalancerFromSubnetsInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -1752,6 +2050,16 @@ type metadataDetachLoadBalancerFromSubnetsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DetachLoadBalancerFromSubnetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachLoadBalancerFromSubnetsInput) GoString() string { + return s.String() +} + type DetachLoadBalancerFromSubnetsOutput struct { // The IDs of the remaining subnets for the load balancer. Subnets []*string `type:"list"` @@ -1763,6 +2071,16 @@ type metadataDetachLoadBalancerFromSubnetsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DetachLoadBalancerFromSubnetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachLoadBalancerFromSubnetsOutput) GoString() string { + return s.String() +} + type DisableAvailabilityZonesForLoadBalancerInput struct { // The Availability Zones. AvailabilityZones []*string `type:"list" required:"true"` @@ -1777,6 +2095,16 @@ type metadataDisableAvailabilityZonesForLoadBalancerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisableAvailabilityZonesForLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableAvailabilityZonesForLoadBalancerInput) GoString() string { + return s.String() +} + type DisableAvailabilityZonesForLoadBalancerOutput struct { // The remaining Availability Zones for the load balancer. AvailabilityZones []*string `type:"list"` @@ -1788,6 +2116,16 @@ type metadataDisableAvailabilityZonesForLoadBalancerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s DisableAvailabilityZonesForLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableAvailabilityZonesForLoadBalancerOutput) GoString() string { + return s.String() +} + type EnableAvailabilityZonesForLoadBalancerInput struct { // The Availability Zones. These must be in the same region as the load balancer. AvailabilityZones []*string `type:"list" required:"true"` @@ -1802,6 +2140,16 @@ type metadataEnableAvailabilityZonesForLoadBalancerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnableAvailabilityZonesForLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableAvailabilityZonesForLoadBalancerInput) GoString() string { + return s.String() +} + type EnableAvailabilityZonesForLoadBalancerOutput struct { // The updated list of Availability Zones for the load balancer. AvailabilityZones []*string `type:"list"` @@ -1813,15 +2161,25 @@ type metadataEnableAvailabilityZonesForLoadBalancerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s EnableAvailabilityZonesForLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableAvailabilityZonesForLoadBalancerOutput) GoString() string { + return s.String() +} + // Information about a health check. type HealthCheck struct { // The number of consecutive health checks successes required before moving // the instance to the Healthy state. - HealthyThreshold *int64 `type:"integer" required:"true"` + HealthyThreshold *int64 `min:"2" type:"integer" required:"true"` // The approximate interval, in seconds, between health checks of an individual // instance. - Interval *int64 `type:"integer" required:"true"` + Interval *int64 `min:"1" type:"integer" required:"true"` // The instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL. // The range of valid ports is one (1) through 65535. @@ -1847,11 +2205,11 @@ type HealthCheck struct { // check. // // This value must be less than the Interval value. - Timeout *int64 `type:"integer" required:"true"` + Timeout *int64 `min:"1" type:"integer" required:"true"` // The number of consecutive health check failures required before moving the // instance to the Unhealthy state. - UnhealthyThreshold *int64 `type:"integer" required:"true"` + UnhealthyThreshold *int64 `min:"2" type:"integer" required:"true"` metadataHealthCheck `json:"-" xml:"-"` } @@ -1860,10 +2218,20 @@ type metadataHealthCheck struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s HealthCheck) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HealthCheck) GoString() string { + return s.String() +} + // The ID of a back-end instance. type Instance struct { // The ID of the instance. - InstanceID *string `locationName:"InstanceId" type:"string"` + InstanceId *string `type:"string"` metadataInstance `json:"-" xml:"-"` } @@ -1872,6 +2240,16 @@ type metadataInstance struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Instance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Instance) GoString() string { + return s.String() +} + // Information about the state of a back-end instance. type InstanceState struct { // A description of the instance state. This string can contain one or more @@ -1906,7 +2284,7 @@ type InstanceState struct { Description *string `type:"string"` // The ID of the instance. - InstanceID *string `locationName:"InstanceId" type:"string"` + InstanceId *string `type:"string"` // Information about the cause of OutOfService instances. Specifically, whether // the cause is Elastic Load Balancing or the instance. @@ -1926,6 +2304,16 @@ type metadataInstanceState struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s InstanceState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceState) GoString() string { + return s.String() +} + // Information about a policy for duration-based session stickiness. type LBCookieStickinessPolicy struct { // The time period, in seconds, after which the cookie should be considered @@ -1944,15 +2332,24 @@ type metadataLBCookieStickinessPolicy struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s LBCookieStickinessPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LBCookieStickinessPolicy) GoString() string { + return s.String() +} + // Information about a listener. // // For information about the protocols and the ports supported by Elastic Load // Balancing, see Listener Configurations for Elastic Load Balancing (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-listener-config.html) // in the Elastic Load Balancing Developer Guide. type Listener struct { - // The port on which the instance server is listening - 25, 80, 443, 465, 587, - // or 1024-65535. - InstancePort *int64 `type:"integer" required:"true"` + // The port on which the instance is listening. + InstancePort *int64 `min:"1" type:"integer" required:"true"` // The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, // TCP, or SSL. @@ -1967,8 +2364,8 @@ type Listener struct { // is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP. InstanceProtocol *string `type:"string"` - // The port on which the load balancer is listening: 25, 80, 443, 465, 587, - // or 1024-65535. + // The port on which the load balancer is listening. The supported ports are: + // 25, 80, 443, 465, 587, and 1024-65535. LoadBalancerPort *int64 `type:"integer" required:"true"` // The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, @@ -1976,7 +2373,7 @@ type Listener struct { Protocol *string `type:"string" required:"true"` // The Amazon Resource Name (ARN) of the server certificate. - SSLCertificateID *string `locationName:"SSLCertificateId" type:"string"` + SSLCertificateId *string `type:"string"` metadataListener `json:"-" xml:"-"` } @@ -1985,6 +2382,16 @@ type metadataListener struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Listener) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Listener) GoString() string { + return s.String() +} + // The policies enabled for a listener. type ListenerDescription struct { // Information about a listener. @@ -2004,6 +2411,16 @@ type metadataListenerDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ListenerDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListenerDescription) GoString() string { + return s.String() +} + // The attributes for a load balancer. type LoadBalancerAttributes struct { // If enabled, the load balancer captures detailed information of all requests @@ -2047,6 +2464,16 @@ type metadataLoadBalancerAttributes struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s LoadBalancerAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadBalancerAttributes) GoString() string { + return s.String() +} + // Information about a load balancer. type LoadBalancerDescription struct { // The Availability Zones for the load balancer. @@ -2109,7 +2536,7 @@ type LoadBalancerDescription struct { Subnets []*string `type:"list"` // The ID of the VPC for the load balancer. - VPCID *string `locationName:"VPCId" type:"string"` + VPCId *string `type:"string"` metadataLoadBalancerDescription `json:"-" xml:"-"` } @@ -2118,6 +2545,16 @@ type metadataLoadBalancerDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s LoadBalancerDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadBalancerDescription) GoString() string { + return s.String() +} + type ModifyLoadBalancerAttributesInput struct { // The attributes of the load balancer. LoadBalancerAttributes *LoadBalancerAttributes `type:"structure" required:"true"` @@ -2132,6 +2569,16 @@ type metadataModifyLoadBalancerAttributesInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyLoadBalancerAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyLoadBalancerAttributesInput) GoString() string { + return s.String() +} + type ModifyLoadBalancerAttributesOutput struct { // The attributes for a load balancer. LoadBalancerAttributes *LoadBalancerAttributes `type:"structure"` @@ -2146,6 +2593,16 @@ type metadataModifyLoadBalancerAttributesOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s ModifyLoadBalancerAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyLoadBalancerAttributesOutput) GoString() string { + return s.String() +} + // The policies for a load balancer. type Policies struct { // The stickiness policies created using CreateAppCookieStickinessPolicy. @@ -2164,6 +2621,16 @@ type metadataPolicies struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Policies) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Policies) GoString() string { + return s.String() +} + // Information about a policy attribute. type PolicyAttribute struct { // The name of the attribute. @@ -2179,6 +2646,16 @@ type metadataPolicyAttribute struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PolicyAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyAttribute) GoString() string { + return s.String() +} + // Information about a policy attribute. type PolicyAttributeDescription struct { // The name of the attribute. @@ -2194,6 +2671,16 @@ type metadataPolicyAttributeDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PolicyAttributeDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyAttributeDescription) GoString() string { + return s.String() +} + // Information about a policy attribute type. type PolicyAttributeTypeDescription struct { // The name of the attribute. @@ -2224,6 +2711,16 @@ type metadataPolicyAttributeTypeDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PolicyAttributeTypeDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyAttributeTypeDescription) GoString() string { + return s.String() +} + // Information about a policy. type PolicyDescription struct { // The policy attributes. @@ -2242,6 +2739,16 @@ type metadataPolicyDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PolicyDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyDescription) GoString() string { + return s.String() +} + // Information about a policy type. type PolicyTypeDescription struct { // A description of the policy type. @@ -2261,6 +2768,16 @@ type metadataPolicyTypeDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s PolicyTypeDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyTypeDescription) GoString() string { + return s.String() +} + type RegisterInstancesWithLoadBalancerInput struct { // The IDs of the instances. Instances []*Instance `type:"list" required:"true"` @@ -2275,6 +2792,16 @@ type metadataRegisterInstancesWithLoadBalancerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RegisterInstancesWithLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterInstancesWithLoadBalancerInput) GoString() string { + return s.String() +} + type RegisterInstancesWithLoadBalancerOutput struct { // The updated list of instances for the load balancer. Instances []*Instance `type:"list"` @@ -2286,13 +2813,23 @@ type metadataRegisterInstancesWithLoadBalancerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RegisterInstancesWithLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegisterInstancesWithLoadBalancerOutput) GoString() string { + return s.String() +} + type RemoveTagsInput struct { // The name of the load balancer. You can specify a maximum of one load balancer // name. LoadBalancerNames []*string `type:"list" required:"true"` // The list of tag keys to remove. - Tags []*TagKeyOnly `type:"list" required:"true"` + Tags []*TagKeyOnly `min:"1" type:"list" required:"true"` metadataRemoveTagsInput `json:"-" xml:"-"` } @@ -2301,6 +2838,16 @@ type metadataRemoveTagsInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RemoveTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTagsInput) GoString() string { + return s.String() +} + type RemoveTagsOutput struct { metadataRemoveTagsOutput `json:"-" xml:"-"` } @@ -2309,6 +2856,16 @@ type metadataRemoveTagsOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s RemoveTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTagsOutput) GoString() string { + return s.String() +} + type SetLoadBalancerListenerSSLCertificateInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -2317,7 +2874,7 @@ type SetLoadBalancerListenerSSLCertificateInput struct { LoadBalancerPort *int64 `type:"integer" required:"true"` // The Amazon Resource Name (ARN) of the SSL certificate. - SSLCertificateID *string `locationName:"SSLCertificateId" type:"string" required:"true"` + SSLCertificateId *string `type:"string" required:"true"` metadataSetLoadBalancerListenerSSLCertificateInput `json:"-" xml:"-"` } @@ -2326,6 +2883,16 @@ type metadataSetLoadBalancerListenerSSLCertificateInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetLoadBalancerListenerSSLCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLoadBalancerListenerSSLCertificateInput) GoString() string { + return s.String() +} + type SetLoadBalancerListenerSSLCertificateOutput struct { metadataSetLoadBalancerListenerSSLCertificateOutput `json:"-" xml:"-"` } @@ -2334,6 +2901,16 @@ type metadataSetLoadBalancerListenerSSLCertificateOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetLoadBalancerListenerSSLCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLoadBalancerListenerSSLCertificateOutput) GoString() string { + return s.String() +} + type SetLoadBalancerPoliciesForBackendServerInput struct { // The port number associated with the back-end server. InstancePort *int64 `type:"integer" required:"true"` @@ -2352,6 +2929,16 @@ type metadataSetLoadBalancerPoliciesForBackendServerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetLoadBalancerPoliciesForBackendServerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLoadBalancerPoliciesForBackendServerInput) GoString() string { + return s.String() +} + type SetLoadBalancerPoliciesForBackendServerOutput struct { metadataSetLoadBalancerPoliciesForBackendServerOutput `json:"-" xml:"-"` } @@ -2360,6 +2947,16 @@ type metadataSetLoadBalancerPoliciesForBackendServerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetLoadBalancerPoliciesForBackendServerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLoadBalancerPoliciesForBackendServerOutput) GoString() string { + return s.String() +} + type SetLoadBalancerPoliciesOfListenerInput struct { // The name of the load balancer. LoadBalancerName *string `type:"string" required:"true"` @@ -2378,6 +2975,16 @@ type metadataSetLoadBalancerPoliciesOfListenerInput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetLoadBalancerPoliciesOfListenerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLoadBalancerPoliciesOfListenerInput) GoString() string { + return s.String() +} + type SetLoadBalancerPoliciesOfListenerOutput struct { metadataSetLoadBalancerPoliciesOfListenerOutput `json:"-" xml:"-"` } @@ -2386,6 +2993,16 @@ type metadataSetLoadBalancerPoliciesOfListenerOutput struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SetLoadBalancerPoliciesOfListenerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetLoadBalancerPoliciesOfListenerOutput) GoString() string { + return s.String() +} + // Information about a source security group. type SourceSecurityGroup struct { // The name of the security group. @@ -2401,10 +3018,20 @@ type metadataSourceSecurityGroup struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s SourceSecurityGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SourceSecurityGroup) GoString() string { + return s.String() +} + // Information about a tag. type Tag struct { // The key of the tag. - Key *string `type:"string" required:"true"` + Key *string `min:"1" type:"string" required:"true"` // The value of the tag. Value *string `type:"string"` @@ -2416,13 +3043,23 @@ type metadataTag struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + // The tags associated with a load balancer. type TagDescription struct { // The name of the load balancer. LoadBalancerName *string `type:"string"` // The tags. - Tags []*Tag `type:"list"` + Tags []*Tag `min:"1" type:"list"` metadataTagDescription `json:"-" xml:"-"` } @@ -2431,10 +3068,20 @@ type metadataTagDescription struct { SDKShapeTraits bool `type:"structure"` } +// String returns the string representation +func (s TagDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagDescription) GoString() string { + return s.String() +} + // The key of a tag. type TagKeyOnly struct { // The name of the key. - Key *string `type:"string"` + Key *string `min:"1" type:"string"` metadataTagKeyOnly `json:"-" xml:"-"` } @@ -2442,3 +3089,13 @@ type TagKeyOnly struct { type metadataTagKeyOnly struct { SDKShapeTraits bool `type:"structure"` } + +// String returns the string representation +func (s TagKeyOnly) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagKeyOnly) GoString() string { + return s.String() +} diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/elbiface/interface.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/elbiface/interface.go index 5beab180cec..a1b4214745e 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/elbiface/interface.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/elbiface/interface.go @@ -4,64 +4,123 @@ package elbiface import ( + "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/service/elb" ) // ELBAPI is the interface type for elb.ELB. type ELBAPI interface { + AddTagsRequest(*elb.AddTagsInput) (*request.Request, *elb.AddTagsOutput) + AddTags(*elb.AddTagsInput) (*elb.AddTagsOutput, error) + ApplySecurityGroupsToLoadBalancerRequest(*elb.ApplySecurityGroupsToLoadBalancerInput) (*request.Request, *elb.ApplySecurityGroupsToLoadBalancerOutput) + ApplySecurityGroupsToLoadBalancer(*elb.ApplySecurityGroupsToLoadBalancerInput) (*elb.ApplySecurityGroupsToLoadBalancerOutput, error) + AttachLoadBalancerToSubnetsRequest(*elb.AttachLoadBalancerToSubnetsInput) (*request.Request, *elb.AttachLoadBalancerToSubnetsOutput) + AttachLoadBalancerToSubnets(*elb.AttachLoadBalancerToSubnetsInput) (*elb.AttachLoadBalancerToSubnetsOutput, error) + ConfigureHealthCheckRequest(*elb.ConfigureHealthCheckInput) (*request.Request, *elb.ConfigureHealthCheckOutput) + ConfigureHealthCheck(*elb.ConfigureHealthCheckInput) (*elb.ConfigureHealthCheckOutput, error) + CreateAppCookieStickinessPolicyRequest(*elb.CreateAppCookieStickinessPolicyInput) (*request.Request, *elb.CreateAppCookieStickinessPolicyOutput) + CreateAppCookieStickinessPolicy(*elb.CreateAppCookieStickinessPolicyInput) (*elb.CreateAppCookieStickinessPolicyOutput, error) + CreateLBCookieStickinessPolicyRequest(*elb.CreateLBCookieStickinessPolicyInput) (*request.Request, *elb.CreateLBCookieStickinessPolicyOutput) + CreateLBCookieStickinessPolicy(*elb.CreateLBCookieStickinessPolicyInput) (*elb.CreateLBCookieStickinessPolicyOutput, error) + CreateLoadBalancerRequest(*elb.CreateLoadBalancerInput) (*request.Request, *elb.CreateLoadBalancerOutput) + CreateLoadBalancer(*elb.CreateLoadBalancerInput) (*elb.CreateLoadBalancerOutput, error) + CreateLoadBalancerListenersRequest(*elb.CreateLoadBalancerListenersInput) (*request.Request, *elb.CreateLoadBalancerListenersOutput) + CreateLoadBalancerListeners(*elb.CreateLoadBalancerListenersInput) (*elb.CreateLoadBalancerListenersOutput, error) + CreateLoadBalancerPolicyRequest(*elb.CreateLoadBalancerPolicyInput) (*request.Request, *elb.CreateLoadBalancerPolicyOutput) + CreateLoadBalancerPolicy(*elb.CreateLoadBalancerPolicyInput) (*elb.CreateLoadBalancerPolicyOutput, error) + DeleteLoadBalancerRequest(*elb.DeleteLoadBalancerInput) (*request.Request, *elb.DeleteLoadBalancerOutput) + DeleteLoadBalancer(*elb.DeleteLoadBalancerInput) (*elb.DeleteLoadBalancerOutput, error) + DeleteLoadBalancerListenersRequest(*elb.DeleteLoadBalancerListenersInput) (*request.Request, *elb.DeleteLoadBalancerListenersOutput) + DeleteLoadBalancerListeners(*elb.DeleteLoadBalancerListenersInput) (*elb.DeleteLoadBalancerListenersOutput, error) + DeleteLoadBalancerPolicyRequest(*elb.DeleteLoadBalancerPolicyInput) (*request.Request, *elb.DeleteLoadBalancerPolicyOutput) + DeleteLoadBalancerPolicy(*elb.DeleteLoadBalancerPolicyInput) (*elb.DeleteLoadBalancerPolicyOutput, error) + DeregisterInstancesFromLoadBalancerRequest(*elb.DeregisterInstancesFromLoadBalancerInput) (*request.Request, *elb.DeregisterInstancesFromLoadBalancerOutput) + DeregisterInstancesFromLoadBalancer(*elb.DeregisterInstancesFromLoadBalancerInput) (*elb.DeregisterInstancesFromLoadBalancerOutput, error) + DescribeInstanceHealthRequest(*elb.DescribeInstanceHealthInput) (*request.Request, *elb.DescribeInstanceHealthOutput) + DescribeInstanceHealth(*elb.DescribeInstanceHealthInput) (*elb.DescribeInstanceHealthOutput, error) + DescribeLoadBalancerAttributesRequest(*elb.DescribeLoadBalancerAttributesInput) (*request.Request, *elb.DescribeLoadBalancerAttributesOutput) + DescribeLoadBalancerAttributes(*elb.DescribeLoadBalancerAttributesInput) (*elb.DescribeLoadBalancerAttributesOutput, error) + DescribeLoadBalancerPoliciesRequest(*elb.DescribeLoadBalancerPoliciesInput) (*request.Request, *elb.DescribeLoadBalancerPoliciesOutput) + DescribeLoadBalancerPolicies(*elb.DescribeLoadBalancerPoliciesInput) (*elb.DescribeLoadBalancerPoliciesOutput, error) + DescribeLoadBalancerPolicyTypesRequest(*elb.DescribeLoadBalancerPolicyTypesInput) (*request.Request, *elb.DescribeLoadBalancerPolicyTypesOutput) + DescribeLoadBalancerPolicyTypes(*elb.DescribeLoadBalancerPolicyTypesInput) (*elb.DescribeLoadBalancerPolicyTypesOutput, error) + DescribeLoadBalancersRequest(*elb.DescribeLoadBalancersInput) (*request.Request, *elb.DescribeLoadBalancersOutput) + DescribeLoadBalancers(*elb.DescribeLoadBalancersInput) (*elb.DescribeLoadBalancersOutput, error) + DescribeLoadBalancersPages(*elb.DescribeLoadBalancersInput, func(*elb.DescribeLoadBalancersOutput, bool) bool) error + + DescribeTagsRequest(*elb.DescribeTagsInput) (*request.Request, *elb.DescribeTagsOutput) + DescribeTags(*elb.DescribeTagsInput) (*elb.DescribeTagsOutput, error) + DetachLoadBalancerFromSubnetsRequest(*elb.DetachLoadBalancerFromSubnetsInput) (*request.Request, *elb.DetachLoadBalancerFromSubnetsOutput) + DetachLoadBalancerFromSubnets(*elb.DetachLoadBalancerFromSubnetsInput) (*elb.DetachLoadBalancerFromSubnetsOutput, error) + DisableAvailabilityZonesForLoadBalancerRequest(*elb.DisableAvailabilityZonesForLoadBalancerInput) (*request.Request, *elb.DisableAvailabilityZonesForLoadBalancerOutput) + DisableAvailabilityZonesForLoadBalancer(*elb.DisableAvailabilityZonesForLoadBalancerInput) (*elb.DisableAvailabilityZonesForLoadBalancerOutput, error) + EnableAvailabilityZonesForLoadBalancerRequest(*elb.EnableAvailabilityZonesForLoadBalancerInput) (*request.Request, *elb.EnableAvailabilityZonesForLoadBalancerOutput) + EnableAvailabilityZonesForLoadBalancer(*elb.EnableAvailabilityZonesForLoadBalancerInput) (*elb.EnableAvailabilityZonesForLoadBalancerOutput, error) + ModifyLoadBalancerAttributesRequest(*elb.ModifyLoadBalancerAttributesInput) (*request.Request, *elb.ModifyLoadBalancerAttributesOutput) + ModifyLoadBalancerAttributes(*elb.ModifyLoadBalancerAttributesInput) (*elb.ModifyLoadBalancerAttributesOutput, error) + RegisterInstancesWithLoadBalancerRequest(*elb.RegisterInstancesWithLoadBalancerInput) (*request.Request, *elb.RegisterInstancesWithLoadBalancerOutput) + RegisterInstancesWithLoadBalancer(*elb.RegisterInstancesWithLoadBalancerInput) (*elb.RegisterInstancesWithLoadBalancerOutput, error) + RemoveTagsRequest(*elb.RemoveTagsInput) (*request.Request, *elb.RemoveTagsOutput) + RemoveTags(*elb.RemoveTagsInput) (*elb.RemoveTagsOutput, error) + SetLoadBalancerListenerSSLCertificateRequest(*elb.SetLoadBalancerListenerSSLCertificateInput) (*request.Request, *elb.SetLoadBalancerListenerSSLCertificateOutput) + SetLoadBalancerListenerSSLCertificate(*elb.SetLoadBalancerListenerSSLCertificateInput) (*elb.SetLoadBalancerListenerSSLCertificateOutput, error) + SetLoadBalancerPoliciesForBackendServerRequest(*elb.SetLoadBalancerPoliciesForBackendServerInput) (*request.Request, *elb.SetLoadBalancerPoliciesForBackendServerOutput) + SetLoadBalancerPoliciesForBackendServer(*elb.SetLoadBalancerPoliciesForBackendServerInput) (*elb.SetLoadBalancerPoliciesForBackendServerOutput, error) + SetLoadBalancerPoliciesOfListenerRequest(*elb.SetLoadBalancerPoliciesOfListenerInput) (*request.Request, *elb.SetLoadBalancerPoliciesOfListenerOutput) + SetLoadBalancerPoliciesOfListener(*elb.SetLoadBalancerPoliciesOfListenerInput) (*elb.SetLoadBalancerPoliciesOfListenerOutput, error) } diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/examples_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/examples_test.go index 354af9bb8c3..765c050eaaf 100644 --- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/examples_test.go +++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/elb/examples_test.go @@ -8,8 +8,6 @@ import ( "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/service/elb" ) @@ -25,7 +23,7 @@ func ExampleELB_AddTags() { // More values... }, Tags: []*elb.Tag{ // Required - &elb.Tag{ // Required + { // Required Key: aws.String("TagKey"), // Required Value: aws.String("TagValue"), }, @@ -35,22 +33,14 @@ func ExampleELB_AddTags() { resp, err := svc.AddTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_ApplySecurityGroupsToLoadBalancer() { @@ -66,22 +56,14 @@ func ExampleELB_ApplySecurityGroupsToLoadBalancer() { resp, err := svc.ApplySecurityGroupsToLoadBalancer(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_AttachLoadBalancerToSubnets() { @@ -97,22 +79,14 @@ func ExampleELB_AttachLoadBalancerToSubnets() { resp, err := svc.AttachLoadBalancerToSubnets(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_ConfigureHealthCheck() { @@ -120,33 +94,25 @@ func ExampleELB_ConfigureHealthCheck() { params := &elb.ConfigureHealthCheckInput{ HealthCheck: &elb.HealthCheck{ // Required - HealthyThreshold: aws.Long(1), // Required - Interval: aws.Long(1), // Required + HealthyThreshold: aws.Int64(1), // Required + Interval: aws.Int64(1), // Required Target: aws.String("HealthCheckTarget"), // Required - Timeout: aws.Long(1), // Required - UnhealthyThreshold: aws.Long(1), // Required + Timeout: aws.Int64(1), // Required + UnhealthyThreshold: aws.Int64(1), // Required }, LoadBalancerName: aws.String("AccessPointName"), // Required } resp, err := svc.ConfigureHealthCheck(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_CreateAppCookieStickinessPolicy() { @@ -160,22 +126,14 @@ func ExampleELB_CreateAppCookieStickinessPolicy() { resp, err := svc.CreateAppCookieStickinessPolicy(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_CreateLBCookieStickinessPolicy() { @@ -184,27 +142,19 @@ func ExampleELB_CreateLBCookieStickinessPolicy() { params := &elb.CreateLBCookieStickinessPolicyInput{ LoadBalancerName: aws.String("AccessPointName"), // Required PolicyName: aws.String("PolicyName"), // Required - CookieExpirationPeriod: aws.Long(1), + CookieExpirationPeriod: aws.Int64(1), } resp, err := svc.CreateLBCookieStickinessPolicy(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_CreateLoadBalancer() { @@ -212,12 +162,12 @@ func ExampleELB_CreateLoadBalancer() { params := &elb.CreateLoadBalancerInput{ Listeners: []*elb.Listener{ // Required - &elb.Listener{ // Required - InstancePort: aws.Long(1), // Required - LoadBalancerPort: aws.Long(1), // Required + { // Required + InstancePort: aws.Int64(1), // Required + LoadBalancerPort: aws.Int64(1), // Required Protocol: aws.String("Protocol"), // Required InstanceProtocol: aws.String("Protocol"), - SSLCertificateID: aws.String("SSLCertificateId"), + SSLCertificateId: aws.String("SSLCertificateId"), }, // More values... }, @@ -236,7 +186,7 @@ func ExampleELB_CreateLoadBalancer() { // More values... }, Tags: []*elb.Tag{ - &elb.Tag{ // Required + { // Required Key: aws.String("TagKey"), // Required Value: aws.String("TagValue"), }, @@ -246,22 +196,14 @@ func ExampleELB_CreateLoadBalancer() { resp, err := svc.CreateLoadBalancer(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_CreateLoadBalancerListeners() { @@ -269,12 +211,12 @@ func ExampleELB_CreateLoadBalancerListeners() { params := &elb.CreateLoadBalancerListenersInput{ Listeners: []*elb.Listener{ // Required - &elb.Listener{ // Required - InstancePort: aws.Long(1), // Required - LoadBalancerPort: aws.Long(1), // Required + { // Required + InstancePort: aws.Int64(1), // Required + LoadBalancerPort: aws.Int64(1), // Required Protocol: aws.String("Protocol"), // Required InstanceProtocol: aws.String("Protocol"), - SSLCertificateID: aws.String("SSLCertificateId"), + SSLCertificateId: aws.String("SSLCertificateId"), }, // More values... }, @@ -283,22 +225,14 @@ func ExampleELB_CreateLoadBalancerListeners() { resp, err := svc.CreateLoadBalancerListeners(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_CreateLoadBalancerPolicy() { @@ -309,7 +243,7 @@ func ExampleELB_CreateLoadBalancerPolicy() { PolicyName: aws.String("PolicyName"), // Required PolicyTypeName: aws.String("PolicyTypeName"), // Required PolicyAttributes: []*elb.PolicyAttribute{ - &elb.PolicyAttribute{ // Required + { // Required AttributeName: aws.String("AttributeName"), AttributeValue: aws.String("AttributeValue"), }, @@ -319,22 +253,14 @@ func ExampleELB_CreateLoadBalancerPolicy() { resp, err := svc.CreateLoadBalancerPolicy(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DeleteLoadBalancer() { @@ -346,22 +272,14 @@ func ExampleELB_DeleteLoadBalancer() { resp, err := svc.DeleteLoadBalancer(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DeleteLoadBalancerListeners() { @@ -370,29 +288,21 @@ func ExampleELB_DeleteLoadBalancerListeners() { params := &elb.DeleteLoadBalancerListenersInput{ LoadBalancerName: aws.String("AccessPointName"), // Required LoadBalancerPorts: []*int64{ // Required - aws.Long(1), // Required + aws.Int64(1), // Required // More values... }, } resp, err := svc.DeleteLoadBalancerListeners(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DeleteLoadBalancerPolicy() { @@ -405,22 +315,14 @@ func ExampleELB_DeleteLoadBalancerPolicy() { resp, err := svc.DeleteLoadBalancerPolicy(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DeregisterInstancesFromLoadBalancer() { @@ -428,8 +330,8 @@ func ExampleELB_DeregisterInstancesFromLoadBalancer() { params := &elb.DeregisterInstancesFromLoadBalancerInput{ Instances: []*elb.Instance{ // Required - &elb.Instance{ // Required - InstanceID: aws.String("InstanceId"), + { // Required + InstanceId: aws.String("InstanceId"), }, // More values... }, @@ -438,22 +340,14 @@ func ExampleELB_DeregisterInstancesFromLoadBalancer() { resp, err := svc.DeregisterInstancesFromLoadBalancer(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DescribeInstanceHealth() { @@ -462,8 +356,8 @@ func ExampleELB_DescribeInstanceHealth() { params := &elb.DescribeInstanceHealthInput{ LoadBalancerName: aws.String("AccessPointName"), // Required Instances: []*elb.Instance{ - &elb.Instance{ // Required - InstanceID: aws.String("InstanceId"), + { // Required + InstanceId: aws.String("InstanceId"), }, // More values... }, @@ -471,22 +365,14 @@ func ExampleELB_DescribeInstanceHealth() { resp, err := svc.DescribeInstanceHealth(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DescribeLoadBalancerAttributes() { @@ -498,22 +384,14 @@ func ExampleELB_DescribeLoadBalancerAttributes() { resp, err := svc.DescribeLoadBalancerAttributes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DescribeLoadBalancerPolicies() { @@ -529,22 +407,14 @@ func ExampleELB_DescribeLoadBalancerPolicies() { resp, err := svc.DescribeLoadBalancerPolicies(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DescribeLoadBalancerPolicyTypes() { @@ -559,22 +429,14 @@ func ExampleELB_DescribeLoadBalancerPolicyTypes() { resp, err := svc.DescribeLoadBalancerPolicyTypes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DescribeLoadBalancers() { @@ -586,27 +448,19 @@ func ExampleELB_DescribeLoadBalancers() { // More values... }, Marker: aws.String("Marker"), - PageSize: aws.Long(1), + PageSize: aws.Int64(1), } resp, err := svc.DescribeLoadBalancers(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DescribeTags() { @@ -621,22 +475,14 @@ func ExampleELB_DescribeTags() { resp, err := svc.DescribeTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DetachLoadBalancerFromSubnets() { @@ -652,22 +498,14 @@ func ExampleELB_DetachLoadBalancerFromSubnets() { resp, err := svc.DetachLoadBalancerFromSubnets(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_DisableAvailabilityZonesForLoadBalancer() { @@ -683,22 +521,14 @@ func ExampleELB_DisableAvailabilityZonesForLoadBalancer() { resp, err := svc.DisableAvailabilityZonesForLoadBalancer(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_EnableAvailabilityZonesForLoadBalancer() { @@ -714,22 +544,14 @@ func ExampleELB_EnableAvailabilityZonesForLoadBalancer() { resp, err := svc.EnableAvailabilityZonesForLoadBalancer(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_ModifyLoadBalancerAttributes() { @@ -738,27 +560,27 @@ func ExampleELB_ModifyLoadBalancerAttributes() { params := &elb.ModifyLoadBalancerAttributesInput{ LoadBalancerAttributes: &elb.LoadBalancerAttributes{ // Required AccessLog: &elb.AccessLog{ - Enabled: aws.Boolean(true), // Required - EmitInterval: aws.Long(1), + Enabled: aws.Bool(true), // Required + EmitInterval: aws.Int64(1), S3BucketName: aws.String("S3BucketName"), S3BucketPrefix: aws.String("AccessLogPrefix"), }, AdditionalAttributes: []*elb.AdditionalAttribute{ - &elb.AdditionalAttribute{ // Required + { // Required Key: aws.String("StringVal"), Value: aws.String("StringVal"), }, // More values... }, ConnectionDraining: &elb.ConnectionDraining{ - Enabled: aws.Boolean(true), // Required - Timeout: aws.Long(1), + Enabled: aws.Bool(true), // Required + Timeout: aws.Int64(1), }, ConnectionSettings: &elb.ConnectionSettings{ - IdleTimeout: aws.Long(1), // Required + IdleTimeout: aws.Int64(1), // Required }, CrossZoneLoadBalancing: &elb.CrossZoneLoadBalancing{ - Enabled: aws.Boolean(true), // Required + Enabled: aws.Bool(true), // Required }, }, LoadBalancerName: aws.String("AccessPointName"), // Required @@ -766,22 +588,14 @@ func ExampleELB_ModifyLoadBalancerAttributes() { resp, err := svc.ModifyLoadBalancerAttributes(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_RegisterInstancesWithLoadBalancer() { @@ -789,8 +603,8 @@ func ExampleELB_RegisterInstancesWithLoadBalancer() { params := &elb.RegisterInstancesWithLoadBalancerInput{ Instances: []*elb.Instance{ // Required - &elb.Instance{ // Required - InstanceID: aws.String("InstanceId"), + { // Required + InstanceId: aws.String("InstanceId"), }, // More values... }, @@ -799,22 +613,14 @@ func ExampleELB_RegisterInstancesWithLoadBalancer() { resp, err := svc.RegisterInstancesWithLoadBalancer(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_RemoveTags() { @@ -826,7 +632,7 @@ func ExampleELB_RemoveTags() { // More values... }, Tags: []*elb.TagKeyOnly{ // Required - &elb.TagKeyOnly{ // Required + { // Required Key: aws.String("TagKey"), }, // More values... @@ -835,22 +641,14 @@ func ExampleELB_RemoveTags() { resp, err := svc.RemoveTags(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_SetLoadBalancerListenerSSLCertificate() { @@ -858,35 +656,27 @@ func ExampleELB_SetLoadBalancerListenerSSLCertificate() { params := &elb.SetLoadBalancerListenerSSLCertificateInput{ LoadBalancerName: aws.String("AccessPointName"), // Required - LoadBalancerPort: aws.Long(1), // Required - SSLCertificateID: aws.String("SSLCertificateId"), // Required + LoadBalancerPort: aws.Int64(1), // Required + SSLCertificateId: aws.String("SSLCertificateId"), // Required } resp, err := svc.SetLoadBalancerListenerSSLCertificate(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_SetLoadBalancerPoliciesForBackendServer() { svc := elb.New(nil) params := &elb.SetLoadBalancerPoliciesForBackendServerInput{ - InstancePort: aws.Long(1), // Required + InstancePort: aws.Int64(1), // Required LoadBalancerName: aws.String("AccessPointName"), // Required PolicyNames: []*string{ // Required aws.String("PolicyName"), // Required @@ -896,22 +686,14 @@ func ExampleELB_SetLoadBalancerPoliciesForBackendServer() { resp, err := svc.SetLoadBalancerPoliciesForBackendServer(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } func ExampleELB_SetLoadBalancerPoliciesOfListener() { @@ -919,7 +701,7 @@ func ExampleELB_SetLoadBalancerPoliciesOfListener() { params := &elb.SetLoadBalancerPoliciesOfListenerInput{ LoadBalancerName: aws.String("AccessPointName"), // Required - LoadBalancerPort: aws.Long(1), // Required + LoadBalancerPort: aws.Int64(1), // Required PolicyNames: []*string{ // Required aws.String("PolicyName"), // Required // More values... @@ -928,20 +710,12 @@ func ExampleELB_SetLoadBalancerPoliciesOfListener() { resp, err := svc.SetLoadBalancerPoliciesOfListener(params) if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // Generic AWS Error with Code, Message, and original error (if any) - fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr()) - if reqErr, ok := err.(awserr.RequestFailure); ok { - // A service error occurred - fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID()) - } - } else { - // This case should never be hit, The SDK should alwsy return an - // error which satisfies the awserr.Error interface. - fmt.Println(err.Error()) - } + // Print the error, cast err to awserr.Error to get the Code and + // Message from an error. + fmt.Println(err.Error()) + return } // Pretty-print the response data. - fmt.Println(awsutil.StringValue(resp)) + fmt.Println(resp) } 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 b77651c5356..20eda10fe43 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 @@ -4,27 +4,45 @@ package elb import ( "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/defaults" + "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" ) -// ELB is a client for Elastic Load Balancing. +// Elastic Load Balancing distributes incoming traffic across your EC2 instances. +// +// For information about the features of Elastic Load Balancing, see What Is +// Elastic Load Balancing? (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elastic-load-balancing.html) +// in the Elastic Load Balancing Developer Guide. +// +// For information about the AWS regions supported by Elastic Load Balancing, +// see Regions and Endpoints - Elastic Load Balancing (http://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region) +// in the Amazon Web Services General Reference. +// +// All Elastic Load Balancing operations are idempotent, which means that they +// complete at most one time. If you repeat an operation, it succeeds with a +// 200 OK response code. type ELB struct { - *aws.Service + *service.Service } // Used for custom service initialization logic -var initService func(*aws.Service) +var initService func(*service.Service) // Used for custom request initialization logic -var initRequest func(*aws.Request) +var initRequest func(*request.Request) // New returns a new ELB client. func New(config *aws.Config) *ELB { - service := &aws.Service{ - Config: aws.DefaultConfig.Merge(config), - ServiceName: "elasticloadbalancing", - APIVersion: "2012-06-01", + service := &service.Service{ + ServiceInfo: serviceinfo.ServiceInfo{ + Config: defaults.DefaultConfig.Merge(config), + ServiceName: "elasticloadbalancing", + APIVersion: "2012-06-01", + }, } service.Initialize() @@ -45,8 +63,8 @@ func New(config *aws.Config) *ELB { // newRequest creates a new request for a ELB operation and runs any // custom request initialization. -func (c *ELB) newRequest(op *aws.Operation, params, data interface{}) *aws.Request { - req := aws.NewRequest(c.Service, op, params, data) +func (c *ELB) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) // Run custom request initialization if present if initRequest != nil {