diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
index eb6777d930..8100f93ef2 100644
--- a/Godeps/Godeps.json
+++ b/Godeps/Godeps.json
@@ -12,43 +12,43 @@
},
{
"ImportPath": "github.com/aws/aws-sdk-go/aws",
- "Comment": "v0.6.4-5-g127313c",
- "Rev": "127313c1b41e534a0456a68b6b3a16712dacb35d"
+ "Comment": "v0.7.2-4-g5df83ba",
+ "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/internal/endpoints",
- "Comment": "v0.6.4-5-g127313c",
- "Rev": "127313c1b41e534a0456a68b6b3a16712dacb35d"
+ "Comment": "v0.7.2-4-g5df83ba",
+ "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
- "Comment": "v0.6.4-5-g127313c",
- "Rev": "127313c1b41e534a0456a68b6b3a16712dacb35d"
+ "Comment": "v0.7.2-4-g5df83ba",
+ "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/rest",
- "Comment": "v0.6.4-5-g127313c",
- "Rev": "127313c1b41e534a0456a68b6b3a16712dacb35d"
+ "Comment": "v0.7.2-4-g5df83ba",
+ "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/restxml",
- "Comment": "v0.6.4-5-g127313c",
- "Rev": "127313c1b41e534a0456a68b6b3a16712dacb35d"
+ "Comment": "v0.7.2-4-g5df83ba",
+ "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil",
- "Comment": "v0.6.4-5-g127313c",
- "Rev": "127313c1b41e534a0456a68b6b3a16712dacb35d"
+ "Comment": "v0.7.2-4-g5df83ba",
+ "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/internal/signer/v4",
- "Comment": "v0.6.4-5-g127313c",
- "Rev": "127313c1b41e534a0456a68b6b3a16712dacb35d"
+ "Comment": "v0.7.2-4-g5df83ba",
+ "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
},
{
"ImportPath": "github.com/aws/aws-sdk-go/service/s3",
- "Comment": "v0.6.4-5-g127313c",
- "Rev": "127313c1b41e534a0456a68b6b3a16712dacb35d"
+ "Comment": "v0.7.2-4-g5df83ba",
+ "Rev": "5df83ba895b6ba073c0513dddcec6d7473c95592"
},
{
"ImportPath": "github.com/coreos/go-etcd/etcd",
@@ -94,21 +94,6 @@
"ImportPath": "github.com/google/go-querystring/query",
"Rev": "547ef5ac979778feb2f760cdb5f4eae1a2207b86"
},
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/aws",
- "Comment": "tf0.4.0-3-ge6ea019",
- "Rev": "e6ea0192eee4640f32ec73c0cbb71f63e4f2b65a"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/endpoints",
- "Comment": "tf0.4.0-3-ge6ea019",
- "Rev": "e6ea0192eee4640f32ec73c0cbb71f63e4f2b65a"
- },
- {
- "ImportPath": "github.com/hashicorp/aws-sdk-go/gen/iam",
- "Comment": "tf0.4.0-3-ge6ea019",
- "Rev": "e6ea0192eee4640f32ec73c0cbb71f63e4f2b65a"
- },
{
"ImportPath": "github.com/hashicorp/consul/api",
"Comment": "v0.5.2-144-g2783f2b",
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 99d8c18439..a52743bef1 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.
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 99a11567f5..f91743c6e1 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 4ae04ac1dd..4f26241a2b 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 7ae01efe42..905d82385e 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 ed10aec192..0da6b06fdd 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
@@ -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 09673a12ed..0de3eaa0f6 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 4699070714..c27bdd3c10 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,7 +1,6 @@
package aws
import (
- "io"
"net/http"
"os"
"time"
@@ -26,148 +25,230 @@ var DefaultChainCredentials = credentials.NewChainCredentials(
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,
-}
+// 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 = NewConfig().
+ WithCredentials(DefaultChainCredentials).
+ WithRegion(os.Getenv("AWS_REGION")).
+ WithHTTPClient(http.DefaultClient).
+ WithMaxRetries(DefaultRetries).
+ WithLogger(NewDefaultLogger()).
+ WithLogLevel(LogOff)
-// A Config provides service configuration
+// A Config provides service configuration for service clients. By default,
+// all clients will use the {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
+ // {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
}
-// 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.LogHTTPBody = c.LogHTTPBody
- 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
+}
+
+// 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.Credentials != nil {
- cfg.Credentials = newcfg.Credentials
- } else {
- cfg.Credentials = c.Credentials
+ if other.Credentials != nil {
+ dst.Credentials = other.Credentials
}
- if newcfg.Endpoint != "" {
- cfg.Endpoint = newcfg.Endpoint
- } else {
- cfg.Endpoint = c.Endpoint
+ if other.Endpoint != nil {
+ dst.Endpoint = other.Endpoint
}
- if newcfg.Region != "" {
- cfg.Region = newcfg.Region
- } else {
- cfg.Region = c.Region
+ if other.Region != nil {
+ dst.Region = other.Region
}
- if newcfg.DisableSSL {
- cfg.DisableSSL = newcfg.DisableSSL
- } else {
- cfg.DisableSSL = c.DisableSSL
+ if other.DisableSSL != nil {
+ dst.DisableSSL = other.DisableSSL
}
- if newcfg.ManualSend {
- cfg.ManualSend = newcfg.ManualSend
- } else {
- cfg.ManualSend = c.ManualSend
+ if other.HTTPClient != nil {
+ dst.HTTPClient = other.HTTPClient
}
- if newcfg.HTTPClient != nil {
- cfg.HTTPClient = newcfg.HTTPClient
- } else {
- cfg.HTTPClient = c.HTTPClient
+ if other.LogLevel != nil {
+ dst.LogLevel = other.LogLevel
}
- if newcfg.LogHTTPBody {
- cfg.LogHTTPBody = newcfg.LogHTTPBody
- } else {
- cfg.LogHTTPBody = c.LogHTTPBody
+ if other.Logger != nil {
+ dst.Logger = other.Logger
}
- if newcfg.LogLevel != 0 {
- cfg.LogLevel = newcfg.LogLevel
- } else {
- cfg.LogLevel = c.LogLevel
+ if other.MaxRetries != nil {
+ dst.MaxRetries = other.MaxRetries
}
- if newcfg.Logger != nil {
- cfg.Logger = newcfg.Logger
- } else {
- cfg.Logger = c.Logger
+ if other.DisableParamValidation != nil {
+ dst.DisableParamValidation = other.DisableParamValidation
}
- if newcfg.MaxRetries != DefaultRetries {
- cfg.MaxRetries = newcfg.MaxRetries
- } else {
- cfg.MaxRetries = c.MaxRetries
+ if other.DisableComputeChecksums != nil {
+ dst.DisableComputeChecksums = other.DisableComputeChecksums
}
- if newcfg.DisableParamValidation {
- cfg.DisableParamValidation = newcfg.DisableParamValidation
- } else {
- cfg.DisableParamValidation = c.DisableParamValidation
+ if other.S3ForcePathStyle != nil {
+ dst.S3ForcePathStyle = other.S3ForcePathStyle
}
- if newcfg.DisableComputeChecksums {
- cfg.DisableComputeChecksums = newcfg.DisableComputeChecksums
- } else {
- cfg.DisableComputeChecksums = c.DisableComputeChecksums
- }
-
- if 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
index fc5a77bd0c..ddf3f39764 100644
--- 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
@@ -2,7 +2,6 @@ package aws
import (
"net/http"
- "os"
"reflect"
"testing"
"time"
@@ -20,24 +19,22 @@ var testCredentials = credentials.NewChainCredentials([]credentials.Provider{
var copyTestConfig = Config{
Credentials: testCredentials,
- Endpoint: "CopyTestEndpoint",
- Region: "COPY_TEST_AWS_REGION",
- DisableSSL: true,
- ManualSend: true,
+ Endpoint: String("CopyTestEndpoint"),
+ Region: String("COPY_TEST_AWS_REGION"),
+ DisableSSL: Bool(true),
HTTPClient: http.DefaultClient,
- LogHTTPBody: true,
- LogLevel: 2,
- Logger: os.Stdout,
- MaxRetries: DefaultRetries,
- DisableParamValidation: true,
- DisableComputeChecksums: true,
- S3ForcePathStyle: true,
+ 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) {
+ if !reflect.DeepEqual(*got, want) {
t.Errorf("Copy() = %+v", got)
t.Errorf(" want %+v", want)
}
@@ -46,27 +43,25 @@ func TestCopy(t *testing.T) {
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)
+ if got == &want {
+ t.Errorf("Copy() = %p; want different instance as source %p", got, &want)
}
}
-var mergeTestZeroValueConfig = Config{MaxRetries: DefaultRetries}
+var mergeTestZeroValueConfig = Config{}
var mergeTestConfig = Config{
Credentials: testCredentials,
- Endpoint: "MergeTestEndpoint",
- Region: "MERGE_TEST_AWS_REGION",
- DisableSSL: true,
- ManualSend: true,
+ Endpoint: String("MergeTestEndpoint"),
+ Region: String("MERGE_TEST_AWS_REGION"),
+ DisableSSL: Bool(true),
HTTPClient: http.DefaultClient,
- LogHTTPBody: true,
- LogLevel: 2,
- Logger: os.Stdout,
- MaxRetries: 10,
- DisableParamValidation: true,
- DisableComputeChecksums: true,
- S3ForcePathStyle: true,
+ LogLevel: LogLevel(LogDebug),
+ Logger: NewDefaultLogger(),
+ MaxRetries: Int(10),
+ DisableParamValidation: Bool(true),
+ DisableComputeChecksums: Bool(true),
+ S3ForcePathStyle: Bool(true),
}
var mergeTests = []struct {
@@ -80,13 +75,13 @@ var mergeTests = []struct {
}
func TestMerge(t *testing.T) {
- for _, tt := range mergeTests {
+ for i, tt := range mergeTests {
got := tt.cfg.Merge(tt.in)
if !reflect.DeepEqual(got, tt.want) {
- t.Errorf("Config %+v", tt.cfg)
- t.Errorf(" Merge(%+v)", tt.in)
- t.Errorf(" got %+v", got)
- t.Errorf(" want %+v", 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/convutil.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convutil.go
new file mode 100644
index 0000000000..d6a7b08dff
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convutil.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/convutil_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convutil_test.go
new file mode 100644
index 0000000000..6d06cd30f0
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/convutil_test.go
@@ -0,0 +1,438 @@
+package aws_test
+
+import (
+ "testing"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "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 := aws.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 := aws.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{
+ {aws.String("a"), aws.String("b"), nil, aws.String("c")},
+}
+
+func TestStringValueSlice(t *testing.T) {
+ for idx, in := range testCasesStringValueSlice {
+ if in == nil {
+ continue
+ }
+ out := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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 := aws.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/credentials/chain_provider.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
index ce66dc831b..7f509ca83c 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
@@ -7,6 +7,8 @@ import (
var (
// ErrNoValidProvidersFoundInChain Is returned when there are no valid
// providers in the ChainProvider.
+ //
+ // @readonly
ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders", "no valid providers in chain", 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 3d6ac4d291..2834a088aa 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.
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/ec2_role_provider.go
index 7691b624ff..0eecbe3b12 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/ec2_role_provider.go
@@ -31,7 +31,6 @@ const metadataCredentialsEndpoint = "http://169.254.169.254/latest/meta-data/iam
// // specified the credentials will be expired early
// ExpiryWindow: 0,
// }
-//
type EC2RoleProvider struct {
Expiry
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 3e556be7f7..043e861d6f 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
@@ -9,9 +9,14 @@ import (
var (
// ErrAccessKeyIDNotFound is returned when the AWS Access Key ID can't be
// found in the process's environment.
+ //
+ // @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.
+ //
+ // @readonly
ErrSecretAccessKeyNotFound = awserr.New("EnvSecretNotFound", "AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment", nil)
)
@@ -19,8 +24,9 @@ var (
// 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 7367f733af..b457e63a33 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
@@ -12,6 +12,8 @@ import (
var (
// ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found.
+ //
+ // @readonly
ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil)
)
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 a114713625..530a9ac2f3 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
@@ -6,6 +6,8 @@ import (
var (
// ErrStaticCredentialsEmpty is emitted when static credentials are empty.
+ //
+ // @readonly
ErrStaticCredentialsEmpty = awserr.New("EmptyStaticCreds", "static credentials are empty", nil)
)
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
index 1499b44973..80890b9d0d 100644
--- 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
@@ -100,7 +100,7 @@ func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) {
}
roleOutput, err := p.Client.AssumeRole(&sts.AssumeRoleInput{
- DurationSeconds: aws.Long(int64(p.Duration / time.Second)),
+ DurationSeconds: aws.Int64(int64(p.Duration / time.Second)),
RoleARN: aws.String(p.RoleARN),
RoleSessionName: aws.String(p.RoleSessionName),
})
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/handler_functions.go
index a2a88a9195..45ae880735 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/handler_functions.go
@@ -90,7 +90,7 @@ func SendHandler(r *Request) {
}
// Catch all other request errors.
r.Error = awserr.New("RequestError", "send request failed", err)
- r.Retryable.Set(true) // network errors are retryable
+ r.Retryable = Bool(true) // network errors are retryable
}
}
@@ -107,8 +107,8 @@ func ValidateResponseHandler(r *Request) {
func AfterRetryHandler(r *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 = Bool(r.Service.ShouldRetry(r))
}
if r.WillRetry() {
@@ -134,10 +134,14 @@ func AfterRetryHandler(r *Request) {
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)
)
@@ -145,7 +149,7 @@ var (
// 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 == "" {
+ if r.Service.SigningRegion == "" && StringValue(r.Service.Config.Region) == "" {
r.Error = ErrMissingRegion
} else if r.Service.Endpoint == "" {
r.Error = ErrMissingEndpoint
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
index c6a30c0fcb..bc6a8f29c1 100644
--- 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
@@ -12,7 +12,7 @@ import (
func TestValidateEndpointHandler(t *testing.T) {
os.Clearenv()
- svc := NewService(&Config{Region: "us-west-2"})
+ svc := NewService(NewConfig().WithRegion("us-west-2"))
svc.Handlers.Clear()
svc.Handlers.Validate.PushBack(ValidateEndpointHandler)
@@ -37,11 +37,11 @@ func TestValidateEndpointHandlerErrorRegion(t *testing.T) {
type mockCredsProvider struct {
expired bool
- retreiveCalled bool
+ retrieveCalled bool
}
func (m *mockCredsProvider) Retrieve() (credentials.Value, error) {
- m.retreiveCalled = true
+ m.retrieveCalled = true
return credentials.Value{}, nil
}
@@ -52,7 +52,7 @@ func (m *mockCredsProvider) IsExpired() bool {
func TestAfterRetryRefreshCreds(t *testing.T) {
os.Clearenv()
credProvider := &mockCredsProvider{}
- svc := NewService(&Config{Credentials: credentials.NewCredentials(credProvider), MaxRetries: 1})
+ svc := NewService(&Config{Credentials: credentials.NewCredentials(credProvider), MaxRetries: Int(1)})
svc.Handlers.Clear()
svc.Handlers.ValidateResponse.PushBack(func(r *Request) {
@@ -67,15 +67,15 @@ func TestAfterRetryRefreshCreds(t *testing.T) {
})
assert.True(t, svc.Config.Credentials.IsExpired(), "Expect to start out expired")
- assert.False(t, credProvider.retreiveCalled)
+ assert.False(t, credProvider.retrieveCalled)
req := NewRequest(svc, &Operation{Name: "Operation"}, nil, nil)
req.Send()
assert.True(t, svc.Config.Credentials.IsExpired())
- assert.False(t, credProvider.retreiveCalled)
+ assert.False(t, credProvider.retrieveCalled)
_, err := svc.Config.Credentials.Get()
assert.NoError(t, err)
- assert.True(t, credProvider.retreiveCalled)
+ assert.True(t, credProvider.retrieveCalled)
}
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
index 26776f6da6..944e1d3edc 100644
--- 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
@@ -23,7 +23,7 @@ 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.PushFront(func(r *Request) { r.Data = Bool(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 0000000000..935661c0b7
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/logger.go
@@ -0,0 +1,89 @@
+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
+)
+
+// 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_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/param_validator_test.go
index b8239f4a71..e09acf8af3 100644
--- 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
@@ -44,7 +44,7 @@ func TestNoErrors(t *testing.T) {
"key1": {Name: aws.String("Name")},
"key2": {Name: aws.String("Name")},
},
- RequiredBool: aws.Boolean(true),
+ RequiredBool: aws.Bool(true),
OptionalStruct: &ConditionalStructShape{Name: aws.String("Name")},
}
@@ -70,7 +70,7 @@ func TestNestedMissingRequiredParameters(t *testing.T) {
"key1": {Name: aws.String("Name")},
"key2": {},
},
- RequiredBool: aws.Boolean(true),
+ RequiredBool: aws.Bool(true),
OptionalStruct: &ConditionalStructShape{},
}
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.go
index 68d1a4dd1f..f3248fc467 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.go
@@ -29,7 +29,7 @@ type Request struct {
Data interface{}
RequestID string
RetryCount uint
- Retryable SettableBool
+ Retryable *bool
RetryDelay time.Duration
built bool
@@ -89,7 +89,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 && BoolValue(r.Retryable) && r.RetryCount < r.Service.MaxRetries()
}
// ParamsFilled returns if the request's parameters have been populated
@@ -183,12 +183,12 @@ func (r *Request) Send() error {
return r.Error
}
- if r.Retryable.Get() {
+ if BoolValue(r.Retryable) {
// 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.Retryable.Reset()
+ r.Retryable = nil
r.Handlers.Send.Run(r)
if r.Error != nil {
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_pagination_test.go
index 35b7ee8d93..6b20c07319 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_pagination_test.go
@@ -41,7 +41,7 @@ func TestPagination(t *testing.T) {
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 {
@@ -93,7 +93,7 @@ func TestPaginationEachPage(t *testing.T) {
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++
@@ -138,7 +138,7 @@ func TestPaginationEarlyExit(t *testing.T) {
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 {
@@ -189,10 +189,10 @@ func TestPaginationTruncation(t *testing.T) {
reqNum := &count
resps := []*s3.ListObjectsOutput{
- {IsTruncated: aws.Boolean(true), Contents: []*s3.Object{{Key: aws.String("Key1")}}},
- {IsTruncated: aws.Boolean(true), Contents: []*s3.Object{{Key: aws.String("Key2")}}},
- {IsTruncated: aws.Boolean(false), Contents: []*s3.Object{{Key: aws.String("Key3")}}},
- {IsTruncated: aws.Boolean(true), Contents: []*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
@@ -218,7 +218,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)
@@ -265,7 +265,7 @@ func BenchmarkCodegenIterator(b *testing.B) {
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() {
@@ -294,7 +294,7 @@ func BenchmarkEachPageIterator(b *testing.B) {
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_test.go
index fcb4718722..d5d945d983 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_test.go
@@ -7,7 +7,6 @@ import (
"io"
"io/ioutil"
"net/http"
- "reflect"
"testing"
"time"
@@ -72,7 +71,7 @@ func TestRequestRecoverRetry5xx(t *testing.T) {
{StatusCode: 200, Body: body(`{"data":"valid"}`)},
}
- s := NewService(&Config{MaxRetries: 10})
+ s := NewService(NewConfig().WithMaxRetries(10))
s.Handlers.Validate.Clear()
s.Handlers.Unmarshal.PushBack(unmarshal)
s.Handlers.UnmarshalError.PushBack(unmarshalError)
@@ -98,7 +97,7 @@ func TestRequestRecoverRetry4xxRetryable(t *testing.T) {
{StatusCode: 200, Body: body(`{"data":"valid"}`)},
}
- s := NewService(&Config{MaxRetries: 10})
+ s := NewService(NewConfig().WithMaxRetries(10))
s.Handlers.Validate.Clear()
s.Handlers.Unmarshal.PushBack(unmarshal)
s.Handlers.UnmarshalError.PushBack(unmarshalError)
@@ -117,7 +116,7 @@ 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 := NewService(NewConfig().WithMaxRetries(10))
s.Handlers.Validate.Clear()
s.Handlers.Unmarshal.PushBack(unmarshal)
s.Handlers.UnmarshalError.PushBack(unmarshalError)
@@ -153,7 +152,7 @@ func TestRequestExhaustRetries(t *testing.T) {
{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
}
- s := NewService(&Config{MaxRetries: -1})
+ s := NewService(NewConfig().WithMaxRetries(DefaultRetries))
s.Handlers.Validate.Clear()
s.Handlers.Unmarshal.PushBack(unmarshal)
s.Handlers.UnmarshalError.PushBack(unmarshalError)
@@ -173,7 +172,14 @@ 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.
@@ -184,7 +190,7 @@ func TestRequestRecoverExpiredCreds(t *testing.T) {
{StatusCode: 200, Body: body(`{"data":"valid"}`)},
}
- s := NewService(&Config{MaxRetries: 10, Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "")})
+ s := NewService(&Config{MaxRetries: Int(10), Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "")})
s.Handlers.Validate.Clear()
s.Handlers.Unmarshal.PushBack(unmarshal)
s.Handlers.UnmarshalError.PushBack(unmarshalError)
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
index 42d1be4eea..672f7de1d6 100644
--- 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
@@ -3,6 +3,7 @@ package aws
import (
"fmt"
"math"
+ "math/rand"
"net/http"
"net/http/httputil"
"regexp"
@@ -17,7 +18,6 @@ import (
type Service struct {
Config *Config
Handlers Handlers
- ManualSend bool
ServiceName string
APIVersion string
Endpoint string
@@ -66,23 +66,23 @@ func (s *Service) Initialize() {
s.AddDebugHandlers()
s.buildEndpoint()
- if !s.Config.DisableParamValidation {
+ if !BoolValue(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
+ if StringValue(s.Config.Endpoint) != "" {
+ s.Endpoint = *s.Config.Endpoint
} else {
s.Endpoint, s.SigningRegion =
- endpoints.EndpointForRegion(s.ServiceName, s.Config.Region)
+ endpoints.EndpointForRegion(s.ServiceName, StringValue(s.Config.Region))
}
if s.Endpoint != "" && !schemeRE.MatchString(s.Endpoint) {
scheme := "https"
- if s.Config.DisableSSL {
+ if BoolValue(s.Config.DisableSSL) {
scheme = "http"
}
s.Endpoint = scheme + "://" + s.Endpoint
@@ -92,45 +92,59 @@ func (s *Service) buildEndpoint() {
// 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 {
+ if !s.Config.LogLevel.AtLeast(LogDebug) {
return
}
- s.Handlers.Send.PushFront(func(r *Request) {
- logBody := r.Config.LogHTTPBody
- dumpedBody, _ := httputil.DumpRequestOut(r.HTTPRequest, logBody)
+ s.Handlers.Send.PushFront(logRequest)
+ s.Handlers.Send.PushBack(logResponse)
+}
- 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")
- })
+const logReqMsg = `DEBUG: Request %s/%s Details:
+---[ REQUEST POST-SIGN ]-----------------------------
+%s
+-----------------------------------------------------`
+
+func logRequest(r *Request) {
+ logBody := r.Config.LogLevel.Matches(LogDebugWithHTTPBody)
+ dumpedBody, _ := httputil.DumpRequestOut(r.HTTPRequest, logBody)
+
+ r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ServiceName, r.Operation.Name, string(dumpedBody)))
+}
+
+const logRespMsg = `DEBUG: Response %s/%s Details:
+---[ RESPONSE ]--------------------------------------
+%s
+-----------------------------------------------------`
+
+func logResponse(r *Request) {
+ var msg = "no reponse data"
+ if r.HTTPResponse != nil {
+ logBody := r.Config.LogLevel.Matches(LogDebugWithHTTPBody)
+ dumpedBody, _ := httputil.DumpResponse(r.HTTPResponse, logBody)
+ msg = string(dumpedBody)
+ } else if r.Error != nil {
+ msg = r.Error.Error()
+ }
+ r.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.ServiceName, r.Operation.Name, msg))
}
// 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 {
+ if IntValue(s.Config.MaxRetries) < 0 {
return s.DefaultMaxRetries
}
- return uint(s.Config.MaxRetries)
+ return uint(IntValue(s.Config.MaxRetries))
}
+var seededRand = rand.New(rand.NewSource(time.Now().UnixNano()))
+
// 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
+
+ delay := int(math.Pow(2, float64(r.RetryCount))) * (seededRand.Intn(30) + 30)
+ return time.Duration(delay) * time.Millisecond
}
// retryableCodes is a collection of service response codes which are retry-able
@@ -139,6 +153,9 @@ var retryableCodes = map[string]struct{}{
"RequestError": {},
"ProvisionedThroughputExceededException": {},
"Throttling": {},
+ "ThrottlingException": {},
+ "RequestLimitExceeded": {},
+ "RequestThrottled": {},
}
// credsExpiredCodes is a collection of error codes which signify the credentials
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 7801cb689a..87905d7e06 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,9 @@
package aws
import (
- "fmt"
"io"
- "time"
)
-// 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}
@@ -80,52 +53,3 @@ 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
-}
-
-// SetBool returns a SettableBool with a value set
-func SetBool(value bool) SettableBool {
- return SettableBool{value: value, set: true}
-}
-
-// Get returns the value. Will always be false if the SettableBool was not set.
-func (b *SettableBool) Get() bool {
- if !b.set {
- return false
- }
- return b.value
-}
-
-// 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)
-}
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 94b8c729f9..2974188c45 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.4"
+const SDKVersion = "0.7.2"
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 b54829838e..52bbf7e1c8 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
@@ -30,7 +30,6 @@ var _ = util.Trim("")
var _ = url.Values{}
var _ = io.EOF
-// InputService1ProtocolTest is a client for InputService1ProtocolTest.
type InputService1ProtocolTest struct {
*aws.Service
}
@@ -106,7 +105,6 @@ type metadataInputService1TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService2ProtocolTest is a client for InputService2ProtocolTest.
type InputService2ProtocolTest struct {
*aws.Service
}
@@ -190,7 +188,6 @@ type metadataInputService2TestShapeStructType struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService3ProtocolTest is a client for InputService3ProtocolTest.
type InputService3ProtocolTest struct {
*aws.Service
}
@@ -296,7 +293,6 @@ type metadataInputService3TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService4ProtocolTest is a client for InputService4ProtocolTest.
type InputService4ProtocolTest struct {
*aws.Service
}
@@ -404,7 +400,6 @@ type metadataInputService4TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService5ProtocolTest is a client for InputService5ProtocolTest.
type InputService5ProtocolTest struct {
*aws.Service
}
@@ -510,7 +505,6 @@ type metadataInputService5TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService6ProtocolTest is a client for InputService6ProtocolTest.
type InputService6ProtocolTest struct {
*aws.Service
}
@@ -584,7 +578,6 @@ type metadataInputService6TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService7ProtocolTest is a client for InputService7ProtocolTest.
type InputService7ProtocolTest struct {
*aws.Service
}
@@ -658,7 +651,6 @@ type metadataInputService7TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService8ProtocolTest is a client for InputService8ProtocolTest.
type InputService8ProtocolTest struct {
*aws.Service
}
@@ -732,7 +724,6 @@ type metadataInputService8TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService9ProtocolTest is a client for InputService9ProtocolTest.
type InputService9ProtocolTest struct {
*aws.Service
}
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 924d3d4e85..a44060ce8f 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
@@ -30,7 +30,6 @@ var _ = util.Trim("")
var _ = url.Values{}
var _ = io.EOF
-// OutputService1ProtocolTest is a client for OutputService1ProtocolTest.
type OutputService1ProtocolTest struct {
*aws.Service
}
@@ -120,7 +119,6 @@ type metadataOutputService1TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService2ProtocolTest is a client for OutputService2ProtocolTest.
type OutputService2ProtocolTest struct {
*aws.Service
}
@@ -196,7 +194,6 @@ type metadataOutputService2TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService3ProtocolTest is a client for OutputService3ProtocolTest.
type OutputService3ProtocolTest struct {
*aws.Service
}
@@ -270,7 +267,6 @@ type metadataOutputService3TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService4ProtocolTest is a client for OutputService4ProtocolTest.
type OutputService4ProtocolTest struct {
*aws.Service
}
@@ -344,7 +340,6 @@ type metadataOutputService4TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService5ProtocolTest is a client for OutputService5ProtocolTest.
type OutputService5ProtocolTest struct {
*aws.Service
}
@@ -418,7 +413,6 @@ type metadataOutputService5TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService6ProtocolTest is a client for OutputService6ProtocolTest.
type OutputService6ProtocolTest struct {
*aws.Service
}
@@ -492,7 +486,6 @@ type metadataOutputService6TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService7ProtocolTest is a client for OutputService7ProtocolTest.
type OutputService7ProtocolTest struct {
*aws.Service
}
@@ -566,7 +559,6 @@ type metadataOutputService7TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService8ProtocolTest is a client for OutputService8ProtocolTest.
type OutputService8ProtocolTest struct {
*aws.Service
}
@@ -654,7 +646,6 @@ type metadataOutputService8TestShapeStructureShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService9ProtocolTest is a client for OutputService9ProtocolTest.
type OutputService9ProtocolTest struct {
*aws.Service
}
@@ -742,7 +733,6 @@ type metadataOutputService9TestShapeStructureShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService10ProtocolTest is a client for OutputService10ProtocolTest.
type OutputService10ProtocolTest struct {
*aws.Service
}
@@ -816,7 +806,6 @@ type metadataOutputService10TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService11ProtocolTest is a client for OutputService11ProtocolTest.
type OutputService11ProtocolTest struct {
*aws.Service
}
@@ -900,7 +889,6 @@ type metadataOutputService11TestShapeStructType struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService12ProtocolTest is a client for OutputService12ProtocolTest.
type OutputService12ProtocolTest struct {
*aws.Service
}
@@ -974,7 +962,6 @@ type metadataOutputService12TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService13ProtocolTest is a client for OutputService13ProtocolTest.
type OutputService13ProtocolTest struct {
*aws.Service
}
@@ -1048,7 +1035,6 @@ type metadataOutputService13TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService14ProtocolTest is a client for OutputService14ProtocolTest.
type OutputService14ProtocolTest struct {
*aws.Service
}
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 cd5eef2351..8917ad7a9b 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
@@ -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/restxml/build_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/restxml/build_test.go
index 6fcd3f8dc9..98ca09fef3 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/restxml/build_test.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/restxml/build_test.go
@@ -30,7 +30,6 @@ var _ = util.Trim("")
var _ = url.Values{}
var _ = io.EOF
-// InputService1ProtocolTest is a client for InputService1ProtocolTest.
type InputService1ProtocolTest struct {
*aws.Service
}
@@ -142,7 +141,6 @@ type metadataInputService1TestShapeInputShape struct {
SDKShapeTraits bool `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"`
}
-// InputService2ProtocolTest is a client for InputService2ProtocolTest.
type InputService2ProtocolTest struct {
*aws.Service
}
@@ -224,7 +222,6 @@ type metadataInputService2TestShapeInputShape struct {
SDKShapeTraits bool `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"`
}
-// InputService3ProtocolTest is a client for InputService3ProtocolTest.
type InputService3ProtocolTest struct {
*aws.Service
}
@@ -314,7 +311,6 @@ type metadataInputService3TestShapeSubStructure struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService4ProtocolTest is a client for InputService4ProtocolTest.
type InputService4ProtocolTest struct {
*aws.Service
}
@@ -404,7 +400,6 @@ type metadataInputService4TestShapeSubStructure struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService5ProtocolTest is a client for InputService5ProtocolTest.
type InputService5ProtocolTest struct {
*aws.Service
}
@@ -480,7 +475,6 @@ type metadataInputService5TestShapeInputShape struct {
SDKShapeTraits bool `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"`
}
-// InputService6ProtocolTest is a client for InputService6ProtocolTest.
type InputService6ProtocolTest struct {
*aws.Service
}
@@ -556,7 +550,6 @@ type metadataInputService6TestShapeInputShape struct {
SDKShapeTraits bool `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"`
}
-// InputService7ProtocolTest is a client for InputService7ProtocolTest.
type InputService7ProtocolTest struct {
*aws.Service
}
@@ -632,7 +625,6 @@ type metadataInputService7TestShapeInputShape struct {
SDKShapeTraits bool `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"`
}
-// InputService8ProtocolTest is a client for InputService8ProtocolTest.
type InputService8ProtocolTest struct {
*aws.Service
}
@@ -708,7 +700,6 @@ type metadataInputService8TestShapeInputShape struct {
SDKShapeTraits bool `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"`
}
-// InputService9ProtocolTest is a client for InputService9ProtocolTest.
type InputService9ProtocolTest struct {
*aws.Service
}
@@ -794,7 +785,6 @@ type metadataInputService9TestShapeSingleFieldStruct struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService10ProtocolTest is a client for InputService10ProtocolTest.
type InputService10ProtocolTest struct {
*aws.Service
}
@@ -882,7 +872,6 @@ type metadataInputService10TestShapeStructureShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService11ProtocolTest is a client for InputService11ProtocolTest.
type InputService11ProtocolTest struct {
*aws.Service
}
@@ -958,7 +947,6 @@ type metadataInputService11TestShapeInputShape struct {
SDKShapeTraits bool `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"`
}
-// InputService12ProtocolTest is a client for InputService12ProtocolTest.
type InputService12ProtocolTest struct {
*aws.Service
}
@@ -1034,7 +1022,6 @@ type metadataInputService12TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure" payload:"Foo"`
}
-// InputService13ProtocolTest is a client for InputService13ProtocolTest.
type InputService13ProtocolTest struct {
*aws.Service
}
@@ -1144,7 +1131,6 @@ type metadataInputService13TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure" payload:"Foo"`
}
-// InputService14ProtocolTest is a client for InputService14ProtocolTest.
type InputService14ProtocolTest struct {
*aws.Service
}
@@ -1298,7 +1284,6 @@ type metadataInputService14TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure" payload:"Foo"`
}
-// InputService15ProtocolTest is a client for InputService15ProtocolTest.
type InputService15ProtocolTest struct {
*aws.Service
}
@@ -1396,7 +1381,6 @@ type metadataInputService15TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure" payload:"Grant"`
}
-// InputService16ProtocolTest is a client for InputService16ProtocolTest.
type InputService16ProtocolTest struct {
*aws.Service
}
@@ -1474,7 +1458,6 @@ type metadataInputService16TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService17ProtocolTest is a client for InputService17ProtocolTest.
type InputService17ProtocolTest struct {
*aws.Service
}
@@ -1584,7 +1567,6 @@ type metadataInputService17TestShapeInputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService18ProtocolTest is a client for InputService18ProtocolTest.
type InputService18ProtocolTest struct {
*aws.Service
}
@@ -1846,7 +1828,6 @@ type metadataInputService18TestShapeRecursiveStructType struct {
SDKShapeTraits bool `type:"structure"`
}
-// InputService19ProtocolTest is a client for InputService19ProtocolTest.
type InputService19ProtocolTest struct {
*aws.Service
}
@@ -1985,10 +1966,10 @@ func TestInputService2ProtocolTestSerializeOtherScalarTypesCase1(t *testing.T) {
svc.Endpoint = "https://test"
input := &InputService2TestShapeInputShape{
- First: aws.Boolean(true),
- Fourth: aws.Long(3),
- Second: aws.Boolean(false),
- Third: aws.Double(1.2),
+ First: aws.Bool(true),
+ Fourth: aws.Int64(3),
+ Second: aws.Bool(false),
+ Third: aws.Float64(1.2),
}
req, _ := svc.InputService2TestCaseOperation1Request(input)
r := req.HTTPRequest
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/restxml/unmarshal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/restxml/unmarshal_test.go
index 7efb93d150..b232580205 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/restxml/unmarshal_test.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/restxml/unmarshal_test.go
@@ -30,7 +30,6 @@ var _ = util.Trim("")
var _ = url.Values{}
var _ = io.EOF
-// OutputService1ProtocolTest is a client for OutputService1ProtocolTest.
type OutputService1ProtocolTest struct {
*aws.Service
}
@@ -156,7 +155,6 @@ type metadataOutputService1TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService2ProtocolTest is a client for OutputService2ProtocolTest.
type OutputService2ProtocolTest struct {
*aws.Service
}
@@ -230,7 +228,6 @@ type metadataOutputService2TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService3ProtocolTest is a client for OutputService3ProtocolTest.
type OutputService3ProtocolTest struct {
*aws.Service
}
@@ -304,7 +301,6 @@ type metadataOutputService3TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService4ProtocolTest is a client for OutputService4ProtocolTest.
type OutputService4ProtocolTest struct {
*aws.Service
}
@@ -378,7 +374,6 @@ type metadataOutputService4TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService5ProtocolTest is a client for OutputService5ProtocolTest.
type OutputService5ProtocolTest struct {
*aws.Service
}
@@ -452,7 +447,6 @@ type metadataOutputService5TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService6ProtocolTest is a client for OutputService6ProtocolTest.
type OutputService6ProtocolTest struct {
*aws.Service
}
@@ -536,7 +530,6 @@ type metadataOutputService6TestShapeSingleStructure struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService7ProtocolTest is a client for OutputService7ProtocolTest.
type OutputService7ProtocolTest struct {
*aws.Service
}
@@ -610,7 +603,6 @@ type metadataOutputService7TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService8ProtocolTest is a client for OutputService8ProtocolTest.
type OutputService8ProtocolTest struct {
*aws.Service
}
@@ -684,7 +676,6 @@ type metadataOutputService8TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService9ProtocolTest is a client for OutputService9ProtocolTest.
type OutputService9ProtocolTest struct {
*aws.Service
}
@@ -770,7 +761,6 @@ type metadataOutputService9TestShapeSingleStructure struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService10ProtocolTest is a client for OutputService10ProtocolTest.
type OutputService10ProtocolTest struct {
*aws.Service
}
@@ -844,7 +834,6 @@ type metadataOutputService10TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure" payload:"Stream"`
}
-// OutputService11ProtocolTest is a client for OutputService11ProtocolTest.
type OutputService11ProtocolTest struct {
*aws.Service
}
@@ -934,7 +923,6 @@ type metadataOutputService11TestShapeOutputShape struct {
SDKShapeTraits bool `type:"structure"`
}
-// OutputService12ProtocolTest is a client for OutputService12ProtocolTest.
type OutputService12ProtocolTest struct {
*aws.Service
}
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 6fef0d6661..748c37f2e6 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,9 @@ import (
"strings"
"time"
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/internal/protocol/rest"
-
- "github.com/aws/aws-sdk-go/aws"
)
const (
@@ -43,8 +42,8 @@ type signer struct {
Credentials *credentials.Credentials
Query url.Values
Body io.ReadSeeker
- Debug uint
- Logger io.Writer
+ Debug aws.LogLevelType
+ Logger aws.Logger
isPresign bool
formattedTime string
@@ -73,7 +72,7 @@ func Sign(req *aws.Request) {
region := req.Service.SigningRegion
if region == "" {
- region = req.Service.Config.Region
+ region = aws.StringValue(req.Service.Config.Region)
}
name := req.Service.SigningName
@@ -90,7 +89,7 @@ func Sign(req *aws.Request) {
ServiceName: name,
Region: region,
Credentials: req.Service.Config.Credentials,
- Debug: req.Service.Config.LogLevel,
+ Debug: req.Service.Config.LogLevel.Value(),
Logger: req.Service.Config.Logger,
}
@@ -138,28 +137,33 @@ func (v4 *signer) sign() error {
v4.build()
- if v4.Debug > 0 {
+ 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() {
- 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)
+ signedURLMsg := ""
if v4.isPresign {
- fmt.Fprintf(out, "---[ SIGNED URL ]--------------------------------\n")
- fmt.Fprintln(out, v4.Request.URL)
+ signedURLMsg = fmt.Sprintf(logSignedURLMsg, v4.Request.URL.String())
}
- fmt.Fprintf(out, "-----------------------------------------------------\n")
+ msg := fmt.Sprintf(logSignInfoMsg, v4.canonicalString, v4.stringToSign, signedURLMsg)
+ v4.Logger.Log(msg)
}
func (v4 *signer) build() {
-
v4.buildTime() // no depends
v4.buildCredentialString() // no depends
if v4.isPresign {
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 99966f809d..adf8e7bd89 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
@@ -143,7 +143,7 @@ func TestIgnoreResignRequestWithValidCreds(t *testing.T) {
r := aws.NewRequest(
aws.NewService(&aws.Config{
Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
- Region: "us-west-2",
+ Region: aws.String("us-west-2"),
}),
&aws.Operation{
Name: "BatchGetItem",
@@ -165,7 +165,7 @@ func TestIgnorePreResignRequestWithValidCreds(t *testing.T) {
r := aws.NewRequest(
aws.NewService(&aws.Config{
Credentials: credentials.NewStaticCredentials("AKID", "SECRET", "SESSION"),
- Region: "us-west-2",
+ Region: aws.String("us-west-2"),
}),
&aws.Operation{
Name: "BatchGetItem",
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/api.go
index e70258332b..e2e960462a 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/api.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/api.go
@@ -8,6 +8,7 @@ import (
"time"
"github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awsutil"
)
const opAbortMultipartUpload = "AbortMultipartUpload"
@@ -1564,7 +1565,7 @@ type AbortMultipartUploadInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
UploadID *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
@@ -1575,10 +1576,20 @@ type metadataAbortMultipartUploadInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s AbortMultipartUploadInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AbortMultipartUploadInput) GoString() string {
+ return s.String()
+}
+
type AbortMultipartUploadOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
metadataAbortMultipartUploadOutput `json:"-" xml:"-"`
}
@@ -1587,6 +1598,16 @@ type metadataAbortMultipartUploadOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s AbortMultipartUploadOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AbortMultipartUploadOutput) GoString() string {
+ return s.String()
+}
+
type AccessControlPolicy struct {
// A list of grants.
Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
@@ -1600,6 +1621,16 @@ type metadataAccessControlPolicy struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s AccessControlPolicy) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccessControlPolicy) GoString() string {
+ return s.String()
+}
+
type Bucket struct {
// Date the bucket was created.
CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
@@ -1614,6 +1645,16 @@ type metadataBucket struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Bucket) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Bucket) GoString() string {
+ return s.String()
+}
+
type BucketLoggingStatus struct {
LoggingEnabled *LoggingEnabled `type:"structure"`
@@ -1624,6 +1665,16 @@ type metadataBucketLoggingStatus struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s BucketLoggingStatus) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BucketLoggingStatus) GoString() string {
+ return s.String()
+}
+
type CORSConfiguration struct {
CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
@@ -1634,6 +1685,16 @@ type metadataCORSConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CORSConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CORSConfiguration) GoString() string {
+ return s.String()
+}
+
type CORSRule struct {
// Specifies which headers are allowed in a pre-flight OPTIONS request.
AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
@@ -1661,11 +1722,21 @@ type metadataCORSRule struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CORSRule) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CORSRule) GoString() string {
+ return s.String()
+}
+
type CloudFunctionConfiguration struct {
CloudFunction *string `type:"string"`
// Bucket event for which to send notifications.
- Event *string `type:"string"`
+ Event *string `type:"string" enum:"Event"`
Events []*string `locationName:"Event" type:"list" flattened:"true"`
@@ -1682,6 +1753,16 @@ type metadataCloudFunctionConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CloudFunctionConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CloudFunctionConfiguration) GoString() string {
+ return s.String()
+}
+
type CommonPrefix struct {
Prefix *string `type:"string"`
@@ -1692,6 +1773,16 @@ type metadataCommonPrefix struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CommonPrefix) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CommonPrefix) GoString() string {
+ return s.String()
+}
+
type CompleteMultipartUploadInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -1703,7 +1794,7 @@ type CompleteMultipartUploadInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
UploadID *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
@@ -1714,6 +1805,16 @@ type metadataCompleteMultipartUploadInput struct {
SDKShapeTraits bool `type:"structure" payload:"MultipartUpload"`
}
+// String returns the string representation
+func (s CompleteMultipartUploadInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CompleteMultipartUploadInput) GoString() string {
+ return s.String()
+}
+
type CompleteMultipartUploadOutput struct {
Bucket *string `type:"string"`
@@ -1730,7 +1831,7 @@ type CompleteMultipartUploadOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// If present, specifies the ID of the AWS Key Management Service (KMS) master
// encryption key that was used for the object.
@@ -1738,7 +1839,7 @@ type CompleteMultipartUploadOutput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// Version of the object.
VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
@@ -1750,6 +1851,16 @@ type metadataCompleteMultipartUploadOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CompleteMultipartUploadOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CompleteMultipartUploadOutput) GoString() string {
+ return s.String()
+}
+
type CompletedMultipartUpload struct {
Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
@@ -1760,11 +1871,22 @@ type metadataCompletedMultipartUpload struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CompletedMultipartUpload) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CompletedMultipartUpload) GoString() string {
+ return s.String()
+}
+
type CompletedPart struct {
// Entity tag returned when the part was uploaded.
ETag *string `type:"string"`
- // Part number that identifies the part.
+ // Part number that identifies the part. This is a positive integer between
+ // 1 and 10,000.
PartNumber *int64 `type:"integer"`
metadataCompletedPart `json:"-" xml:"-"`
@@ -1774,6 +1896,16 @@ type metadataCompletedPart struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CompletedPart) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CompletedPart) GoString() string {
+ return s.String()
+}
+
type Condition struct {
// The HTTP error code when the redirect is applied. In the event of an error,
// if the error code equals this value, then the specified redirect is applied.
@@ -1798,9 +1930,19 @@ type metadataCondition struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Condition) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Condition) GoString() string {
+ return s.String()
+}
+
type CopyObjectInput struct {
// The canned ACL to apply to the object.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
+ ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -1873,16 +2015,15 @@ type CopyObjectInput struct {
// Specifies whether the metadata is copied from the source object or replaced
// with metadata provided in the request.
- MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string"`
+ MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
// Confirms that the requester knows that she or he will be charged for the
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
- // aws:kms).
+ // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
@@ -1905,10 +2046,10 @@ type CopyObjectInput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// The type of storage to use for the object. Defaults to 'STANDARD'.
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string"`
+ StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
// If the bucket is configured as a website, redirects requests for this object
// to another object in the same bucket or to an external URL. Amazon S3 stores
@@ -1922,6 +2063,16 @@ type metadataCopyObjectInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CopyObjectInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopyObjectInput) GoString() string {
+ return s.String()
+}
+
type CopyObjectOutput struct {
CopyObjectResult *CopyObjectResult `type:"structure"`
@@ -1932,7 +2083,7 @@ type CopyObjectOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// If server-side encryption with a customer-provided encryption key was requested,
// the response will include this header confirming the encryption algorithm
@@ -1950,7 +2101,7 @@ type CopyObjectOutput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
metadataCopyObjectOutput `json:"-" xml:"-"`
}
@@ -1959,6 +2110,16 @@ type metadataCopyObjectOutput struct {
SDKShapeTraits bool `type:"structure" payload:"CopyObjectResult"`
}
+// String returns the string representation
+func (s CopyObjectOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopyObjectOutput) GoString() string {
+ return s.String()
+}
+
type CopyObjectResult struct {
ETag *string `type:"string"`
@@ -1971,6 +2132,16 @@ type metadataCopyObjectResult struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CopyObjectResult) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopyObjectResult) GoString() string {
+ return s.String()
+}
+
type CopyPartResult struct {
// Entity tag of the object.
ETag *string `type:"string"`
@@ -1985,10 +2156,20 @@ type metadataCopyPartResult struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CopyPartResult) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopyPartResult) GoString() string {
+ return s.String()
+}
+
type CreateBucketConfiguration struct {
// Specifies the region where the bucket will be created. If you don't specify
// a region, the bucket will be created in US Standard.
- LocationConstraint *string `type:"string"`
+ LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
metadataCreateBucketConfiguration `json:"-" xml:"-"`
}
@@ -1997,9 +2178,19 @@ type metadataCreateBucketConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CreateBucketConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateBucketConfiguration) GoString() string {
+ return s.String()
+}
+
type CreateBucketInput struct {
// The canned ACL to apply to the bucket.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
+ ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2028,6 +2219,16 @@ type metadataCreateBucketInput struct {
SDKShapeTraits bool `type:"structure" payload:"CreateBucketConfiguration"`
}
+// String returns the string representation
+func (s CreateBucketInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateBucketInput) GoString() string {
+ return s.String()
+}
+
type CreateBucketOutput struct {
Location *string `location:"header" locationName:"Location" type:"string"`
@@ -2038,9 +2239,19 @@ type metadataCreateBucketOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CreateBucketOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateBucketOutput) GoString() string {
+ return s.String()
+}
+
type CreateMultipartUploadInput struct {
// The canned ACL to apply to the object.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
+ ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2085,10 +2296,9 @@ type CreateMultipartUploadInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
- // aws:kms).
+ // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
@@ -2111,10 +2321,10 @@ type CreateMultipartUploadInput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// The type of storage to use for the object. Defaults to 'STANDARD'.
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string"`
+ StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
// If the bucket is configured as a website, redirects requests for this object
// to another object in the same bucket or to an external URL. Amazon S3 stores
@@ -2128,6 +2338,16 @@ type metadataCreateMultipartUploadInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CreateMultipartUploadInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateMultipartUploadInput) GoString() string {
+ return s.String()
+}
+
type CreateMultipartUploadOutput struct {
// Name of the bucket to which the multipart upload was initiated.
Bucket *string `locationName:"Bucket" type:"string"`
@@ -2137,7 +2357,7 @@ type CreateMultipartUploadOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// If server-side encryption with a customer-provided encryption key was requested,
// the response will include this header confirming the encryption algorithm
@@ -2155,7 +2375,7 @@ type CreateMultipartUploadOutput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// ID for the initiated multipart upload.
UploadID *string `locationName:"UploadId" type:"string"`
@@ -2167,6 +2387,16 @@ type metadataCreateMultipartUploadOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s CreateMultipartUploadOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateMultipartUploadOutput) GoString() string {
+ return s.String()
+}
+
type Delete struct {
Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
@@ -2181,6 +2411,16 @@ type metadataDelete struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Delete) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Delete) GoString() string {
+ return s.String()
+}
+
type DeleteBucketCORSInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2191,6 +2431,16 @@ type metadataDeleteBucketCORSInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketCORSInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketCORSInput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketCORSOutput struct {
metadataDeleteBucketCORSOutput `json:"-" xml:"-"`
}
@@ -2199,6 +2449,16 @@ type metadataDeleteBucketCORSOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketCORSOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketCORSOutput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2209,6 +2469,16 @@ type metadataDeleteBucketInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketInput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketLifecycleInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2219,6 +2489,16 @@ type metadataDeleteBucketLifecycleInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketLifecycleInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketLifecycleInput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketLifecycleOutput struct {
metadataDeleteBucketLifecycleOutput `json:"-" xml:"-"`
}
@@ -2227,6 +2507,16 @@ type metadataDeleteBucketLifecycleOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketLifecycleOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketLifecycleOutput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketOutput struct {
metadataDeleteBucketOutput `json:"-" xml:"-"`
}
@@ -2235,6 +2525,16 @@ type metadataDeleteBucketOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketOutput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketPolicyInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2245,6 +2545,16 @@ type metadataDeleteBucketPolicyInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketPolicyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketPolicyInput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketPolicyOutput struct {
metadataDeleteBucketPolicyOutput `json:"-" xml:"-"`
}
@@ -2253,6 +2563,16 @@ type metadataDeleteBucketPolicyOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketPolicyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketPolicyOutput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketReplicationInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2263,6 +2583,16 @@ type metadataDeleteBucketReplicationInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketReplicationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketReplicationInput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketReplicationOutput struct {
metadataDeleteBucketReplicationOutput `json:"-" xml:"-"`
}
@@ -2271,6 +2601,16 @@ type metadataDeleteBucketReplicationOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketReplicationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketReplicationOutput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketTaggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2281,6 +2621,16 @@ type metadataDeleteBucketTaggingInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketTaggingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketTaggingInput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketTaggingOutput struct {
metadataDeleteBucketTaggingOutput `json:"-" xml:"-"`
}
@@ -2289,6 +2639,16 @@ type metadataDeleteBucketTaggingOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketTaggingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketTaggingOutput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketWebsiteInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2299,6 +2659,16 @@ type metadataDeleteBucketWebsiteInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketWebsiteInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketWebsiteInput) GoString() string {
+ return s.String()
+}
+
type DeleteBucketWebsiteOutput struct {
metadataDeleteBucketWebsiteOutput `json:"-" xml:"-"`
}
@@ -2307,6 +2677,16 @@ type metadataDeleteBucketWebsiteOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteBucketWebsiteOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketWebsiteOutput) GoString() string {
+ return s.String()
+}
+
type DeleteMarkerEntry struct {
// Specifies whether the object is (true) or is not (false) the latest version
// of an object.
@@ -2330,6 +2710,16 @@ type metadataDeleteMarkerEntry struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteMarkerEntry) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteMarkerEntry) GoString() string {
+ return s.String()
+}
+
type DeleteObjectInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2343,7 +2733,7 @@ type DeleteObjectInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// VersionId used to reference a specific version of the object.
VersionID *string `location:"querystring" locationName:"versionId" type:"string"`
@@ -2355,6 +2745,16 @@ type metadataDeleteObjectInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteObjectInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteObjectInput) GoString() string {
+ return s.String()
+}
+
type DeleteObjectOutput struct {
// Specifies whether the versioned object that was permanently deleted was (true)
// or was not (false) a delete marker.
@@ -2362,7 +2762,7 @@ type DeleteObjectOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// Returns the version ID of the delete marker created as a result of the DELETE
// operation.
@@ -2375,6 +2775,16 @@ type metadataDeleteObjectOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteObjectOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteObjectOutput) GoString() string {
+ return s.String()
+}
+
type DeleteObjectsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2388,7 +2798,7 @@ type DeleteObjectsInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
metadataDeleteObjectsInput `json:"-" xml:"-"`
}
@@ -2397,6 +2807,16 @@ type metadataDeleteObjectsInput struct {
SDKShapeTraits bool `type:"structure" payload:"Delete"`
}
+// String returns the string representation
+func (s DeleteObjectsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteObjectsInput) GoString() string {
+ return s.String()
+}
+
type DeleteObjectsOutput struct {
Deleted []*DeletedObject `type:"list" flattened:"true"`
@@ -2404,7 +2824,7 @@ type DeleteObjectsOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
metadataDeleteObjectsOutput `json:"-" xml:"-"`
}
@@ -2413,6 +2833,16 @@ type metadataDeleteObjectsOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeleteObjectsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteObjectsOutput) GoString() string {
+ return s.String()
+}
+
type DeletedObject struct {
DeleteMarker *bool `type:"boolean"`
@@ -2429,6 +2859,16 @@ type metadataDeletedObject struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s DeletedObject) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeletedObject) GoString() string {
+ return s.String()
+}
+
type Destination struct {
// Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
// replicas of the object identified by the rule.
@@ -2441,6 +2881,16 @@ type metadataDestination struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Destination) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Destination) GoString() string {
+ return s.String()
+}
+
type Error struct {
Code *string `type:"string"`
@@ -2457,6 +2907,16 @@ type metadataError struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Error) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Error) GoString() string {
+ return s.String()
+}
+
type ErrorDocument struct {
// The object key name to use when a 4XX class error occurs.
Key *string `type:"string" required:"true"`
@@ -2468,6 +2928,16 @@ type metadataErrorDocument struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ErrorDocument) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ErrorDocument) GoString() string {
+ return s.String()
+}
+
type GetBucketACLInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2478,6 +2948,16 @@ type metadataGetBucketACLInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketACLInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketACLInput) GoString() string {
+ return s.String()
+}
+
type GetBucketACLOutput struct {
// A list of grants.
Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
@@ -2491,6 +2971,16 @@ type metadataGetBucketACLOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketACLOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketACLOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketCORSInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2501,6 +2991,16 @@ type metadataGetBucketCORSInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketCORSInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketCORSInput) GoString() string {
+ return s.String()
+}
+
type GetBucketCORSOutput struct {
CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
@@ -2511,6 +3011,16 @@ type metadataGetBucketCORSOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketCORSOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketCORSOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketLifecycleInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2521,6 +3031,16 @@ type metadataGetBucketLifecycleInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketLifecycleInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketLifecycleInput) GoString() string {
+ return s.String()
+}
+
type GetBucketLifecycleOutput struct {
Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
@@ -2531,6 +3051,16 @@ type metadataGetBucketLifecycleOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketLifecycleOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketLifecycleOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketLocationInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2541,8 +3071,18 @@ type metadataGetBucketLocationInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketLocationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketLocationInput) GoString() string {
+ return s.String()
+}
+
type GetBucketLocationOutput struct {
- LocationConstraint *string `type:"string"`
+ LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
metadataGetBucketLocationOutput `json:"-" xml:"-"`
}
@@ -2551,6 +3091,16 @@ type metadataGetBucketLocationOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketLocationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketLocationOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketLoggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2561,6 +3111,16 @@ type metadataGetBucketLoggingInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketLoggingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketLoggingInput) GoString() string {
+ return s.String()
+}
+
type GetBucketLoggingOutput struct {
LoggingEnabled *LoggingEnabled `type:"structure"`
@@ -2571,6 +3131,16 @@ type metadataGetBucketLoggingOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketLoggingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketLoggingOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketNotificationConfigurationRequest struct {
// Name of the buket to get the notification configuration for.
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2582,6 +3152,16 @@ type metadataGetBucketNotificationConfigurationRequest struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketNotificationConfigurationRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketNotificationConfigurationRequest) GoString() string {
+ return s.String()
+}
+
type GetBucketPolicyInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2592,6 +3172,16 @@ type metadataGetBucketPolicyInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketPolicyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketPolicyInput) GoString() string {
+ return s.String()
+}
+
type GetBucketPolicyOutput struct {
// The bucket policy as a JSON document.
Policy *string `type:"string"`
@@ -2603,6 +3193,16 @@ type metadataGetBucketPolicyOutput struct {
SDKShapeTraits bool `type:"structure" payload:"Policy"`
}
+// String returns the string representation
+func (s GetBucketPolicyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketPolicyOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketReplicationInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2613,6 +3213,16 @@ type metadataGetBucketReplicationInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketReplicationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketReplicationInput) GoString() string {
+ return s.String()
+}
+
type GetBucketReplicationOutput struct {
// Container for replication rules. You can add as many as 1,000 rules. Total
// replication configuration size can be up to 2 MB.
@@ -2625,6 +3235,16 @@ type metadataGetBucketReplicationOutput struct {
SDKShapeTraits bool `type:"structure" payload:"ReplicationConfiguration"`
}
+// String returns the string representation
+func (s GetBucketReplicationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketReplicationOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketRequestPaymentInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2635,9 +3255,19 @@ type metadataGetBucketRequestPaymentInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketRequestPaymentInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketRequestPaymentInput) GoString() string {
+ return s.String()
+}
+
type GetBucketRequestPaymentOutput struct {
// Specifies who pays for the download and request fees.
- Payer *string `type:"string"`
+ Payer *string `type:"string" enum:"Payer"`
metadataGetBucketRequestPaymentOutput `json:"-" xml:"-"`
}
@@ -2646,6 +3276,16 @@ type metadataGetBucketRequestPaymentOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketRequestPaymentOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketRequestPaymentOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketTaggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2656,6 +3296,16 @@ type metadataGetBucketTaggingInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketTaggingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketTaggingInput) GoString() string {
+ return s.String()
+}
+
type GetBucketTaggingOutput struct {
TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
@@ -2666,6 +3316,16 @@ type metadataGetBucketTaggingOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketTaggingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketTaggingOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketVersioningInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2676,14 +3336,24 @@ type metadataGetBucketVersioningInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketVersioningInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketVersioningInput) GoString() string {
+ return s.String()
+}
+
type GetBucketVersioningOutput struct {
// Specifies whether MFA delete is enabled in the bucket versioning configuration.
// This element is only returned if the bucket has been configured with MFA
// delete. If the bucket has never been so configured, this element is not returned.
- MFADelete *string `locationName:"MfaDelete" type:"string"`
+ MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
// The versioning state of the bucket.
- Status *string `type:"string"`
+ Status *string `type:"string" enum:"BucketVersioningStatus"`
metadataGetBucketVersioningOutput `json:"-" xml:"-"`
}
@@ -2692,6 +3362,16 @@ type metadataGetBucketVersioningOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketVersioningOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketVersioningOutput) GoString() string {
+ return s.String()
+}
+
type GetBucketWebsiteInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2702,6 +3382,16 @@ type metadataGetBucketWebsiteInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketWebsiteInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketWebsiteInput) GoString() string {
+ return s.String()
+}
+
type GetBucketWebsiteOutput struct {
ErrorDocument *ErrorDocument `type:"structure"`
@@ -2718,6 +3408,16 @@ type metadataGetBucketWebsiteOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetBucketWebsiteOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketWebsiteOutput) GoString() string {
+ return s.String()
+}
+
type GetObjectACLInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2727,7 +3427,7 @@ type GetObjectACLInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// VersionId used to reference a specific version of the object.
VersionID *string `location:"querystring" locationName:"versionId" type:"string"`
@@ -2739,6 +3439,16 @@ type metadataGetObjectACLInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetObjectACLInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetObjectACLInput) GoString() string {
+ return s.String()
+}
+
type GetObjectACLOutput struct {
// A list of grants.
Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
@@ -2747,7 +3457,7 @@ type GetObjectACLOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
metadataGetObjectACLOutput `json:"-" xml:"-"`
}
@@ -2756,6 +3466,16 @@ type metadataGetObjectACLOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetObjectACLOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetObjectACLOutput) GoString() string {
+ return s.String()
+}
+
type GetObjectInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2785,7 +3505,7 @@ type GetObjectInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// Sets the Cache-Control header of the response.
ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
@@ -2805,8 +3525,7 @@ type GetObjectInput struct {
// Sets the Expires header of the response.
ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
- // aws:kms).
+ // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
@@ -2831,6 +3550,16 @@ type metadataGetObjectInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetObjectInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetObjectInput) GoString() string {
+ return s.String()
+}
+
type GetObjectOutput struct {
AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
@@ -2875,7 +3604,7 @@ type GetObjectOutput struct {
Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
// The date and time at which the object is no longer cacheable.
- Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
+ Expires *string `location:"header" locationName:"Expires" type:"string"`
// Last modified date of the object
LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
@@ -2889,11 +3618,11 @@ type GetObjectOutput struct {
// you can create metadata whose values are not legal HTTP headers.
MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
- ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string"`
+ ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// Provides information about object restoration operation and expiration time
// of the restored object copy.
@@ -2915,7 +3644,9 @@ type GetObjectOutput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
+
+ StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
// Version of the object.
VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
@@ -2932,6 +3663,16 @@ type metadataGetObjectOutput struct {
SDKShapeTraits bool `type:"structure" payload:"Body"`
}
+// String returns the string representation
+func (s GetObjectOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetObjectOutput) GoString() string {
+ return s.String()
+}
+
type GetObjectTorrentInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -2941,7 +3682,7 @@ type GetObjectTorrentInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
metadataGetObjectTorrentInput `json:"-" xml:"-"`
}
@@ -2950,12 +3691,22 @@ type metadataGetObjectTorrentInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s GetObjectTorrentInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetObjectTorrentInput) GoString() string {
+ return s.String()
+}
+
type GetObjectTorrentOutput struct {
Body io.ReadCloser `type:"blob"`
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
metadataGetObjectTorrentOutput `json:"-" xml:"-"`
}
@@ -2964,11 +3715,21 @@ type metadataGetObjectTorrentOutput struct {
SDKShapeTraits bool `type:"structure" payload:"Body"`
}
+// String returns the string representation
+func (s GetObjectTorrentOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetObjectTorrentOutput) GoString() string {
+ return s.String()
+}
+
type Grant struct {
Grantee *Grantee `type:"structure"`
// Specifies the permission given to the grantee.
- Permission *string `type:"string"`
+ Permission *string `type:"string" enum:"Permission"`
metadataGrant `json:"-" xml:"-"`
}
@@ -2977,6 +3738,16 @@ type metadataGrant struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Grant) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Grant) GoString() string {
+ return s.String()
+}
+
type Grantee struct {
// Screen name of the grantee.
DisplayName *string `type:"string"`
@@ -2988,7 +3759,7 @@ type Grantee struct {
ID *string `type:"string"`
// Type of grantee
- Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true"`
+ Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
// URI of the grantee group.
URI *string `type:"string"`
@@ -3000,6 +3771,16 @@ type metadataGrantee struct {
SDKShapeTraits bool `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
}
+// String returns the string representation
+func (s Grantee) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Grantee) GoString() string {
+ return s.String()
+}
+
type HeadBucketInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3010,6 +3791,16 @@ type metadataHeadBucketInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s HeadBucketInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s HeadBucketInput) GoString() string {
+ return s.String()
+}
+
type HeadBucketOutput struct {
metadataHeadBucketOutput `json:"-" xml:"-"`
}
@@ -3018,6 +3809,16 @@ type metadataHeadBucketOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s HeadBucketOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s HeadBucketOutput) GoString() string {
+ return s.String()
+}
+
type HeadObjectInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3047,10 +3848,9 @@ type HeadObjectInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
- // aws:kms).
+ // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
@@ -3075,6 +3875,16 @@ type metadataHeadObjectInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s HeadObjectInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s HeadObjectInput) GoString() string {
+ return s.String()
+}
+
type HeadObjectOutput struct {
AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
@@ -3113,7 +3923,7 @@ type HeadObjectOutput struct {
Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
// The date and time at which the object is no longer cacheable.
- Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
+ Expires *string `location:"header" locationName:"Expires" type:"string"`
// Last modified date of the object
LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
@@ -3127,11 +3937,11 @@ type HeadObjectOutput struct {
// you can create metadata whose values are not legal HTTP headers.
MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
- ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string"`
+ ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// Provides information about object restoration operation and expiration time
// of the restored object copy.
@@ -3153,7 +3963,9 @@ type HeadObjectOutput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
+
+ StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
// Version of the object.
VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
@@ -3170,6 +3982,16 @@ type metadataHeadObjectOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s HeadObjectOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s HeadObjectOutput) GoString() string {
+ return s.String()
+}
+
type IndexDocument struct {
// A suffix that is appended to a request that is for a directory on the website
// endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
@@ -3184,6 +4006,16 @@ type metadataIndexDocument struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s IndexDocument) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IndexDocument) GoString() string {
+ return s.String()
+}
+
type Initiator struct {
// Name of the Principal.
DisplayName *string `type:"string"`
@@ -3199,6 +4031,16 @@ type metadataInitiator struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Initiator) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Initiator) GoString() string {
+ return s.String()
+}
+
// Container for specifying the AWS Lambda notification configuration.
type LambdaFunctionConfiguration struct {
Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
@@ -3218,6 +4060,16 @@ type metadataLambdaFunctionConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s LambdaFunctionConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LambdaFunctionConfiguration) GoString() string {
+ return s.String()
+}
+
type LifecycleConfiguration struct {
Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
@@ -3228,6 +4080,16 @@ type metadataLifecycleConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s LifecycleConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LifecycleConfiguration) GoString() string {
+ return s.String()
+}
+
type LifecycleExpiration struct {
// Indicates at what date the object is to be moved or deleted. Should be in
// GMT ISO 8601 Format.
@@ -3244,6 +4106,16 @@ type metadataLifecycleExpiration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s LifecycleExpiration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LifecycleExpiration) GoString() string {
+ return s.String()
+}
+
type LifecycleRule struct {
Expiration *LifecycleExpiration `type:"structure"`
@@ -3269,7 +4141,7 @@ type LifecycleRule struct {
// If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
// is not currently being applied.
- Status *string `type:"string" required:"true"`
+ Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
Transition *Transition `type:"structure"`
@@ -3280,6 +4152,16 @@ type metadataLifecycleRule struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s LifecycleRule) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LifecycleRule) GoString() string {
+ return s.String()
+}
+
type ListBucketsInput struct {
metadataListBucketsInput `json:"-" xml:"-"`
}
@@ -3288,6 +4170,16 @@ type metadataListBucketsInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListBucketsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListBucketsInput) GoString() string {
+ return s.String()
+}
+
type ListBucketsOutput struct {
Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
@@ -3300,6 +4192,16 @@ type metadataListBucketsOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListBucketsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListBucketsOutput) GoString() string {
+ return s.String()
+}
+
type ListMultipartUploadsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3312,7 +4214,7 @@ type ListMultipartUploadsInput struct {
// with an ASCII value from 0 to 10. For characters that are not supported in
// XML 1.0, you can add this parameter to request that Amazon S3 encode the
// keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string"`
+ EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
// Together with upload-id-marker, this parameter specifies the multipart upload
// after which listing should begin.
@@ -3339,6 +4241,16 @@ type metadataListMultipartUploadsInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListMultipartUploadsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListMultipartUploadsInput) GoString() string {
+ return s.String()
+}
+
type ListMultipartUploadsOutput struct {
// Name of the bucket to which the multipart upload was initiated.
Bucket *string `type:"string"`
@@ -3348,7 +4260,7 @@ type ListMultipartUploadsOutput struct {
Delimiter *string `type:"string"`
// Encoding type used by Amazon S3 to encode object keys in the response.
- EncodingType *string `type:"string"`
+ EncodingType *string `type:"string" enum:"EncodingType"`
// Indicates whether the returned list of multipart uploads is truncated. A
// value of true indicates that the list was truncated. The list can be truncated
@@ -3387,6 +4299,16 @@ type metadataListMultipartUploadsOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListMultipartUploadsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListMultipartUploadsOutput) GoString() string {
+ return s.String()
+}
+
type ListObjectVersionsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3399,7 +4321,7 @@ type ListObjectVersionsInput struct {
// with an ASCII value from 0 to 10. For characters that are not supported in
// XML 1.0, you can add this parameter to request that Amazon S3 encode the
// keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string"`
+ EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
// Specifies the key to start with when listing objects in a bucket.
KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
@@ -3421,6 +4343,16 @@ type metadataListObjectVersionsInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListObjectVersionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListObjectVersionsInput) GoString() string {
+ return s.String()
+}
+
type ListObjectVersionsOutput struct {
CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
@@ -3429,7 +4361,7 @@ type ListObjectVersionsOutput struct {
Delimiter *string `type:"string"`
// Encoding type used by Amazon S3 to encode object keys in the response.
- EncodingType *string `type:"string"`
+ EncodingType *string `type:"string" enum:"EncodingType"`
// A flag that indicates whether or not Amazon S3 returned all of the results
// that satisfied the search criteria. If your results were truncated, you can
@@ -3464,6 +4396,16 @@ type metadataListObjectVersionsOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListObjectVersionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListObjectVersionsOutput) GoString() string {
+ return s.String()
+}
+
type ListObjectsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3476,7 +4418,7 @@ type ListObjectsInput struct {
// with an ASCII value from 0 to 10. For characters that are not supported in
// XML 1.0, you can add this parameter to request that Amazon S3 encode the
// keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string"`
+ EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
// Specifies the key to start with when listing objects in a bucket.
Marker *string `location:"querystring" locationName:"marker" type:"string"`
@@ -3495,6 +4437,16 @@ type metadataListObjectsInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListObjectsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListObjectsInput) GoString() string {
+ return s.String()
+}
+
type ListObjectsOutput struct {
CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
@@ -3503,7 +4455,7 @@ type ListObjectsOutput struct {
Delimiter *string `type:"string"`
// Encoding type used by Amazon S3 to encode object keys in the response.
- EncodingType *string `type:"string"`
+ EncodingType *string `type:"string" enum:"EncodingType"`
// A flag that indicates whether or not Amazon S3 returned all of the results
// that satisfied the search criteria.
@@ -3533,6 +4485,16 @@ type metadataListObjectsOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListObjectsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListObjectsOutput) GoString() string {
+ return s.String()
+}
+
type ListPartsInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3549,7 +4511,7 @@ type ListPartsInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
// Upload ID identifying the multipart upload whose parts are being listed.
UploadID *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
@@ -3561,6 +4523,16 @@ type metadataListPartsInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListPartsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListPartsInput) GoString() string {
+ return s.String()
+}
+
type ListPartsOutput struct {
// Name of the bucket to which the multipart upload was initiated.
Bucket *string `type:"string"`
@@ -3591,10 +4563,10 @@ type ListPartsOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// The class of storage used to store the object.
- StorageClass *string `type:"string"`
+ StorageClass *string `type:"string" enum:"StorageClass"`
// Upload ID identifying the multipart upload whose parts are being listed.
UploadID *string `locationName:"UploadId" type:"string"`
@@ -3606,6 +4578,16 @@ type metadataListPartsOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ListPartsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ListPartsOutput) GoString() string {
+ return s.String()
+}
+
type LoggingEnabled struct {
// Specifies the bucket where you want Amazon S3 to store server access logs.
// You can have your logs delivered to any bucket that you own, including the
@@ -3628,6 +4610,16 @@ type metadataLoggingEnabled struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s LoggingEnabled) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LoggingEnabled) GoString() string {
+ return s.String()
+}
+
type MultipartUpload struct {
// Date and time at which the multipart upload was initiated.
Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"`
@@ -3641,7 +4633,7 @@ type MultipartUpload struct {
Owner *Owner `type:"structure"`
// The class of storage used to store the object.
- StorageClass *string `type:"string"`
+ StorageClass *string `type:"string" enum:"StorageClass"`
// Upload ID that identifies the multipart upload.
UploadID *string `locationName:"UploadId" type:"string"`
@@ -3653,6 +4645,16 @@ type metadataMultipartUpload struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s MultipartUpload) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MultipartUpload) GoString() string {
+ return s.String()
+}
+
// Specifies when noncurrent object versions expire. Upon expiration, Amazon
// S3 permanently deletes the noncurrent object versions. You set this lifecycle
// configuration action on a bucket that has versioning enabled (or suspended)
@@ -3673,6 +4675,16 @@ type metadataNoncurrentVersionExpiration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s NoncurrentVersionExpiration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NoncurrentVersionExpiration) GoString() string {
+ return s.String()
+}
+
// Container for the transition rule that describes when noncurrent objects
// transition to the GLACIER storage class. If your bucket is versioning-enabled
// (or versioning is suspended), you can set this action to request that Amazon
@@ -3687,7 +4699,7 @@ type NoncurrentVersionTransition struct {
NoncurrentDays *int64 `type:"integer"`
// The class of storage used to store the object.
- StorageClass *string `type:"string"`
+ StorageClass *string `type:"string" enum:"TransitionStorageClass"`
metadataNoncurrentVersionTransition `json:"-" xml:"-"`
}
@@ -3696,6 +4708,16 @@ type metadataNoncurrentVersionTransition struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s NoncurrentVersionTransition) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NoncurrentVersionTransition) GoString() string {
+ return s.String()
+}
+
// Container for specifying the notification configuration of the bucket. If
// this element is empty, notifications are turned off on the bucket.
type NotificationConfiguration struct {
@@ -3712,6 +4734,16 @@ 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()
+}
+
type NotificationConfigurationDeprecated struct {
CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
@@ -3726,6 +4758,16 @@ type metadataNotificationConfigurationDeprecated struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s NotificationConfigurationDeprecated) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NotificationConfigurationDeprecated) GoString() string {
+ return s.String()
+}
+
type Object struct {
ETag *string `type:"string"`
@@ -3738,7 +4780,7 @@ type Object struct {
Size *int64 `type:"integer"`
// The class of storage used to store the object.
- StorageClass *string `type:"string"`
+ StorageClass *string `type:"string" enum:"ObjectStorageClass"`
metadataObject `json:"-" xml:"-"`
}
@@ -3747,6 +4789,16 @@ type metadataObject struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Object) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Object) GoString() string {
+ return s.String()
+}
+
type ObjectIdentifier struct {
// Key name of the object to delete.
Key *string `type:"string" required:"true"`
@@ -3761,6 +4813,16 @@ type metadataObjectIdentifier struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ObjectIdentifier) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ObjectIdentifier) GoString() string {
+ return s.String()
+}
+
type ObjectVersion struct {
ETag *string `type:"string"`
@@ -3780,7 +4842,7 @@ type ObjectVersion struct {
Size *int64 `type:"integer"`
// The class of storage used to store the object.
- StorageClass *string `type:"string"`
+ StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
// Version ID of an object.
VersionID *string `locationName:"VersionId" type:"string"`
@@ -3792,6 +4854,16 @@ type metadataObjectVersion struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ObjectVersion) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ObjectVersion) GoString() string {
+ return s.String()
+}
+
type Owner struct {
DisplayName *string `type:"string"`
@@ -3804,6 +4876,16 @@ type metadataOwner struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Owner) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Owner) GoString() string {
+ return s.String()
+}
+
type Part struct {
// Entity tag returned when the part was uploaded.
ETag *string `type:"string"`
@@ -3811,7 +4893,8 @@ type Part struct {
// Date and time at which the part was uploaded.
LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
- // Part number identifying the part.
+ // Part number identifying the part. This is a positive integer between 1 and
+ // 10,000.
PartNumber *int64 `type:"integer"`
// Size of the uploaded part data.
@@ -3824,9 +4907,19 @@ type metadataPart struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Part) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Part) GoString() string {
+ return s.String()
+}
+
type PutBucketACLInput struct {
// The canned ACL to apply to the bucket.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
+ ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
@@ -3855,6 +4948,16 @@ type metadataPutBucketACLInput struct {
SDKShapeTraits bool `type:"structure" payload:"AccessControlPolicy"`
}
+// String returns the string representation
+func (s PutBucketACLInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketACLInput) GoString() string {
+ return s.String()
+}
+
type PutBucketACLOutput struct {
metadataPutBucketACLOutput `json:"-" xml:"-"`
}
@@ -3863,6 +4966,16 @@ type metadataPutBucketACLOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketACLOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketACLOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketCORSInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3875,6 +4988,16 @@ type metadataPutBucketCORSInput struct {
SDKShapeTraits bool `type:"structure" payload:"CORSConfiguration"`
}
+// String returns the string representation
+func (s PutBucketCORSInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketCORSInput) GoString() string {
+ return s.String()
+}
+
type PutBucketCORSOutput struct {
metadataPutBucketCORSOutput `json:"-" xml:"-"`
}
@@ -3883,6 +5006,16 @@ type metadataPutBucketCORSOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketCORSOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketCORSOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketLifecycleInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3895,6 +5028,16 @@ type metadataPutBucketLifecycleInput struct {
SDKShapeTraits bool `type:"structure" payload:"LifecycleConfiguration"`
}
+// String returns the string representation
+func (s PutBucketLifecycleInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketLifecycleInput) GoString() string {
+ return s.String()
+}
+
type PutBucketLifecycleOutput struct {
metadataPutBucketLifecycleOutput `json:"-" xml:"-"`
}
@@ -3903,6 +5046,16 @@ type metadataPutBucketLifecycleOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketLifecycleOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketLifecycleOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketLoggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3915,6 +5068,16 @@ type metadataPutBucketLoggingInput struct {
SDKShapeTraits bool `type:"structure" payload:"BucketLoggingStatus"`
}
+// String returns the string representation
+func (s PutBucketLoggingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketLoggingInput) GoString() string {
+ return s.String()
+}
+
type PutBucketLoggingOutput struct {
metadataPutBucketLoggingOutput `json:"-" xml:"-"`
}
@@ -3923,6 +5086,16 @@ type metadataPutBucketLoggingOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketLoggingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketLoggingOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketNotificationConfigurationInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3937,6 +5110,16 @@ type metadataPutBucketNotificationConfigurationInput struct {
SDKShapeTraits bool `type:"structure" payload:"NotificationConfiguration"`
}
+// String returns the string representation
+func (s PutBucketNotificationConfigurationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketNotificationConfigurationInput) GoString() string {
+ return s.String()
+}
+
type PutBucketNotificationConfigurationOutput struct {
metadataPutBucketNotificationConfigurationOutput `json:"-" xml:"-"`
}
@@ -3945,6 +5128,16 @@ type metadataPutBucketNotificationConfigurationOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketNotificationConfigurationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketNotificationConfigurationOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketNotificationInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3957,6 +5150,16 @@ type metadataPutBucketNotificationInput struct {
SDKShapeTraits bool `type:"structure" payload:"NotificationConfiguration"`
}
+// String returns the string representation
+func (s PutBucketNotificationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketNotificationInput) GoString() string {
+ return s.String()
+}
+
type PutBucketNotificationOutput struct {
metadataPutBucketNotificationOutput `json:"-" xml:"-"`
}
@@ -3965,6 +5168,16 @@ type metadataPutBucketNotificationOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketNotificationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketNotificationOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketPolicyInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -3978,6 +5191,16 @@ type metadataPutBucketPolicyInput struct {
SDKShapeTraits bool `type:"structure" payload:"Policy"`
}
+// String returns the string representation
+func (s PutBucketPolicyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketPolicyInput) GoString() string {
+ return s.String()
+}
+
type PutBucketPolicyOutput struct {
metadataPutBucketPolicyOutput `json:"-" xml:"-"`
}
@@ -3986,6 +5209,16 @@ type metadataPutBucketPolicyOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketPolicyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketPolicyOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketReplicationInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -4000,6 +5233,16 @@ type metadataPutBucketReplicationInput struct {
SDKShapeTraits bool `type:"structure" payload:"ReplicationConfiguration"`
}
+// String returns the string representation
+func (s PutBucketReplicationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketReplicationInput) GoString() string {
+ return s.String()
+}
+
type PutBucketReplicationOutput struct {
metadataPutBucketReplicationOutput `json:"-" xml:"-"`
}
@@ -4008,6 +5251,16 @@ type metadataPutBucketReplicationOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketReplicationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketReplicationOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketRequestPaymentInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -4020,6 +5273,16 @@ type metadataPutBucketRequestPaymentInput struct {
SDKShapeTraits bool `type:"structure" payload:"RequestPaymentConfiguration"`
}
+// String returns the string representation
+func (s PutBucketRequestPaymentInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketRequestPaymentInput) GoString() string {
+ return s.String()
+}
+
type PutBucketRequestPaymentOutput struct {
metadataPutBucketRequestPaymentOutput `json:"-" xml:"-"`
}
@@ -4028,6 +5291,16 @@ type metadataPutBucketRequestPaymentOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketRequestPaymentOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketRequestPaymentOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketTaggingInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -4040,6 +5313,16 @@ type metadataPutBucketTaggingInput struct {
SDKShapeTraits bool `type:"structure" payload:"Tagging"`
}
+// String returns the string representation
+func (s PutBucketTaggingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketTaggingInput) GoString() string {
+ return s.String()
+}
+
type PutBucketTaggingOutput struct {
metadataPutBucketTaggingOutput `json:"-" xml:"-"`
}
@@ -4048,6 +5331,16 @@ type metadataPutBucketTaggingOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketTaggingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketTaggingOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketVersioningInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -4064,6 +5357,16 @@ type metadataPutBucketVersioningInput struct {
SDKShapeTraits bool `type:"structure" payload:"VersioningConfiguration"`
}
+// String returns the string representation
+func (s PutBucketVersioningInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketVersioningInput) GoString() string {
+ return s.String()
+}
+
type PutBucketVersioningOutput struct {
metadataPutBucketVersioningOutput `json:"-" xml:"-"`
}
@@ -4072,6 +5375,16 @@ type metadataPutBucketVersioningOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketVersioningOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketVersioningOutput) GoString() string {
+ return s.String()
+}
+
type PutBucketWebsiteInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -4084,6 +5397,16 @@ type metadataPutBucketWebsiteInput struct {
SDKShapeTraits bool `type:"structure" payload:"WebsiteConfiguration"`
}
+// String returns the string representation
+func (s PutBucketWebsiteInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketWebsiteInput) GoString() string {
+ return s.String()
+}
+
type PutBucketWebsiteOutput struct {
metadataPutBucketWebsiteOutput `json:"-" xml:"-"`
}
@@ -4092,9 +5415,19 @@ type metadataPutBucketWebsiteOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutBucketWebsiteOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketWebsiteOutput) GoString() string {
+ return s.String()
+}
+
type PutObjectACLInput struct {
// The canned ACL to apply to the object.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
+ ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
@@ -4122,7 +5455,7 @@ type PutObjectACLInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
metadataPutObjectACLInput `json:"-" xml:"-"`
}
@@ -4131,10 +5464,20 @@ type metadataPutObjectACLInput struct {
SDKShapeTraits bool `type:"structure" payload:"AccessControlPolicy"`
}
+// String returns the string representation
+func (s PutObjectACLInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutObjectACLInput) GoString() string {
+ return s.String()
+}
+
type PutObjectACLOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
metadataPutObjectACLOutput `json:"-" xml:"-"`
}
@@ -4143,9 +5486,19 @@ type metadataPutObjectACLOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutObjectACLOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutObjectACLOutput) GoString() string {
+ return s.String()
+}
+
type PutObjectInput struct {
// The canned ACL to apply to the object.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string"`
+ ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
// Object data.
Body io.ReadSeeker `type:"blob"`
@@ -4197,10 +5550,9 @@ type PutObjectInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
- // aws:kms).
+ // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
@@ -4223,10 +5575,10 @@ type PutObjectInput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// The type of storage to use for the object. Defaults to 'STANDARD'.
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string"`
+ StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
// If the bucket is configured as a website, redirects requests for this object
// to another object in the same bucket or to an external URL. Amazon S3 stores
@@ -4240,6 +5592,16 @@ type metadataPutObjectInput struct {
SDKShapeTraits bool `type:"structure" payload:"Body"`
}
+// String returns the string representation
+func (s PutObjectInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutObjectInput) GoString() string {
+ return s.String()
+}
+
type PutObjectOutput struct {
// Entity tag for the uploaded object.
ETag *string `location:"header" locationName:"ETag" type:"string"`
@@ -4250,7 +5612,7 @@ type PutObjectOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// If server-side encryption with a customer-provided encryption key was requested,
// the response will include this header confirming the encryption algorithm
@@ -4268,7 +5630,7 @@ type PutObjectOutput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
// Version of the object.
VersionID *string `location:"header" locationName:"x-amz-version-id" type:"string"`
@@ -4280,6 +5642,16 @@ type metadataPutObjectOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s PutObjectOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutObjectOutput) GoString() string {
+ return s.String()
+}
+
// Container for specifying an configuration when you want Amazon S3 to publish
// events to an Amazon Simple Queue Service (Amazon SQS) queue.
type QueueConfiguration struct {
@@ -4300,9 +5672,19 @@ type metadataQueueConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s QueueConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s QueueConfiguration) GoString() string {
+ return s.String()
+}
+
type QueueConfigurationDeprecated struct {
// Bucket event for which to send notifications.
- Event *string `type:"string"`
+ Event *string `type:"string" enum:"Event"`
Events []*string `locationName:"Event" type:"list" flattened:"true"`
@@ -4319,6 +5701,16 @@ type metadataQueueConfigurationDeprecated struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s QueueConfigurationDeprecated) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s QueueConfigurationDeprecated) GoString() string {
+ return s.String()
+}
+
type Redirect struct {
// The HTTP redirect code to use on the response. Not required if one of the
// siblings is present.
@@ -4329,7 +5721,7 @@ type Redirect struct {
// Protocol to use (http, https) when redirecting requests. The default is the
// protocol that is used in the original request.
- Protocol *string `type:"string"`
+ Protocol *string `type:"string" enum:"Protocol"`
// The object key prefix to use in the redirect request. For example, to redirect
// requests for all pages with prefix docs/ (objects in the docs/ folder) to
@@ -4351,13 +5743,23 @@ type metadataRedirect struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Redirect) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Redirect) GoString() string {
+ return s.String()
+}
+
type RedirectAllRequestsTo struct {
// Name of the host where requests will be redirected.
HostName *string `type:"string" required:"true"`
// Protocol to use (http, https) when redirecting requests. The default is the
// protocol that is used in the original request.
- Protocol *string `type:"string"`
+ Protocol *string `type:"string" enum:"Protocol"`
metadataRedirectAllRequestsTo `json:"-" xml:"-"`
}
@@ -4366,6 +5768,16 @@ type metadataRedirectAllRequestsTo struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s RedirectAllRequestsTo) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RedirectAllRequestsTo) GoString() string {
+ return s.String()
+}
+
// Container for replication rules. You can add as many as 1,000 rules. Total
// replication configuration size can be up to 2 MB.
type ReplicationConfiguration struct {
@@ -4384,6 +5796,16 @@ type metadataReplicationConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ReplicationConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicationConfiguration) GoString() string {
+ return s.String()
+}
+
type ReplicationRule struct {
Destination *Destination `type:"structure" required:"true"`
@@ -4396,7 +5818,7 @@ type ReplicationRule struct {
Prefix *string `type:"string" required:"true"`
// The rule is ignored if status is not Enabled.
- Status *string `type:"string" required:"true"`
+ Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
metadataReplicationRule `json:"-" xml:"-"`
}
@@ -4405,9 +5827,19 @@ type metadataReplicationRule struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s ReplicationRule) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplicationRule) GoString() string {
+ return s.String()
+}
+
type RequestPaymentConfiguration struct {
// Specifies who pays for the download and request fees.
- Payer *string `type:"string" required:"true"`
+ Payer *string `type:"string" required:"true" enum:"Payer"`
metadataRequestPaymentConfiguration `json:"-" xml:"-"`
}
@@ -4416,6 +5848,16 @@ type metadataRequestPaymentConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s RequestPaymentConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RequestPaymentConfiguration) GoString() string {
+ return s.String()
+}
+
type RestoreObjectInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -4425,7 +5867,7 @@ type RestoreObjectInput struct {
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure"`
@@ -4438,10 +5880,20 @@ type metadataRestoreObjectInput struct {
SDKShapeTraits bool `type:"structure" payload:"RestoreRequest"`
}
+// String returns the string representation
+func (s RestoreObjectInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RestoreObjectInput) GoString() string {
+ return s.String()
+}
+
type RestoreObjectOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
metadataRestoreObjectOutput `json:"-" xml:"-"`
}
@@ -4450,6 +5902,16 @@ type metadataRestoreObjectOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s RestoreObjectOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RestoreObjectOutput) GoString() string {
+ return s.String()
+}
+
type RestoreRequest struct {
// Lifetime of the active copy in days
Days *int64 `type:"integer" required:"true"`
@@ -4461,6 +5923,16 @@ type metadataRestoreRequest struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s RestoreRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RestoreRequest) GoString() string {
+ return s.String()
+}
+
type RoutingRule struct {
// A container for describing a condition that must be met for the specified
// redirect to apply. For example, 1. If request is for pages in the /docs folder,
@@ -4480,6 +5952,16 @@ type metadataRoutingRule struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s RoutingRule) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RoutingRule) GoString() string {
+ return s.String()
+}
+
type Tag struct {
// Name of the tag.
Key *string `type:"string" required:"true"`
@@ -4494,6 +5976,16 @@ 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()
+}
+
type Tagging struct {
TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
@@ -4504,11 +5996,21 @@ type metadataTagging struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Tagging) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Tagging) GoString() string {
+ return s.String()
+}
+
type TargetGrant struct {
Grantee *Grantee `type:"structure"`
// Logging permissions assigned to the Grantee for the bucket.
- Permission *string `type:"string"`
+ Permission *string `type:"string" enum:"BucketLogsPermission"`
metadataTargetGrant `json:"-" xml:"-"`
}
@@ -4517,6 +6019,16 @@ type metadataTargetGrant struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s TargetGrant) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TargetGrant) GoString() string {
+ return s.String()
+}
+
// Container for specifying the configuration when you want Amazon S3 to publish
// events to an Amazon Simple Notification Service (Amazon SNS) topic.
type TopicConfiguration struct {
@@ -4537,9 +6049,19 @@ type metadataTopicConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s TopicConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TopicConfiguration) GoString() string {
+ return s.String()
+}
+
type TopicConfigurationDeprecated struct {
// Bucket event for which to send notifications.
- Event *string `type:"string"`
+ Event *string `type:"string" enum:"Event"`
Events []*string `locationName:"Event" type:"list" flattened:"true"`
@@ -4558,6 +6080,16 @@ type metadataTopicConfigurationDeprecated struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s TopicConfigurationDeprecated) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TopicConfigurationDeprecated) GoString() string {
+ return s.String()
+}
+
type Transition struct {
// Indicates at what date the object is to be moved or deleted. Should be in
// GMT ISO 8601 Format.
@@ -4568,7 +6100,7 @@ type Transition struct {
Days *int64 `type:"integer"`
// The class of storage used to store the object.
- StorageClass *string `type:"string"`
+ StorageClass *string `type:"string" enum:"TransitionStorageClass"`
metadataTransition `json:"-" xml:"-"`
}
@@ -4577,6 +6109,16 @@ type metadataTransition struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s Transition) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Transition) GoString() string {
+ return s.String()
+}
+
type UploadPartCopyInput struct {
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
@@ -4619,17 +6161,17 @@ type UploadPartCopyInput struct {
Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
- // Part number of part being copied.
+ // Part number of part being copied. This is a positive integer between 1 and
+ // 10,000.
PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
// Confirms that the requester knows that she or he will be charged for the
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
- // aws:kms).
+ // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
@@ -4655,6 +6197,16 @@ type metadataUploadPartCopyInput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s UploadPartCopyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UploadPartCopyInput) GoString() string {
+ return s.String()
+}
+
type UploadPartCopyOutput struct {
CopyPartResult *CopyPartResult `type:"structure"`
@@ -4664,7 +6216,7 @@ type UploadPartCopyOutput struct {
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// If server-side encryption with a customer-provided encryption key was requested,
// the response will include this header confirming the encryption algorithm
@@ -4682,7 +6234,7 @@ type UploadPartCopyOutput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
metadataUploadPartCopyOutput `json:"-" xml:"-"`
}
@@ -4691,6 +6243,16 @@ type metadataUploadPartCopyOutput struct {
SDKShapeTraits bool `type:"structure" payload:"CopyPartResult"`
}
+// String returns the string representation
+func (s UploadPartCopyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UploadPartCopyOutput) GoString() string {
+ return s.String()
+}
+
type UploadPartInput struct {
Body io.ReadSeeker `type:"blob"`
@@ -4702,17 +6264,17 @@ type UploadPartInput struct {
Key *string `location:"uri" locationName:"Key" type:"string" required:"true"`
- // Part number of part being uploaded.
+ // Part number of part being uploaded. This is a positive integer between 1
+ // and 10,000.
PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
// Confirms that the requester knows that she or he will be charged for the
// request. Bucket owners need not specify this parameter in their requests.
// Documentation on downloading objects from requester pays buckets can be found
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string"`
+ RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
- // Specifies the algorithm to use to when encrypting the object (e.g., AES256,
- // aws:kms).
+ // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
// Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
@@ -4738,13 +6300,23 @@ type metadataUploadPartInput struct {
SDKShapeTraits bool `type:"structure" payload:"Body"`
}
+// String returns the string representation
+func (s UploadPartInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UploadPartInput) GoString() string {
+ return s.String()
+}
+
type UploadPartOutput struct {
// Entity tag for the uploaded object.
ETag *string `location:"header" locationName:"ETag" type:"string"`
// If present, indicates that the requester was successfully charged for the
// request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string"`
+ RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
// If server-side encryption with a customer-provided encryption key was requested,
// the response will include this header confirming the encryption algorithm
@@ -4762,7 +6334,7 @@ type UploadPartOutput struct {
// The Server-side encryption algorithm used when storing this object in S3
// (e.g., AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string"`
+ ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
metadataUploadPartOutput `json:"-" xml:"-"`
}
@@ -4771,14 +6343,24 @@ type metadataUploadPartOutput struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s UploadPartOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UploadPartOutput) GoString() string {
+ return s.String()
+}
+
type VersioningConfiguration struct {
// Specifies whether MFA delete is enabled in the bucket versioning configuration.
// This element is only returned if the bucket has been configured with MFA
// delete. If the bucket has never been so configured, this element is not returned.
- MFADelete *string `locationName:"MfaDelete" type:"string"`
+ MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
// The versioning state of the bucket.
- Status *string `type:"string"`
+ Status *string `type:"string" enum:"BucketVersioningStatus"`
metadataVersioningConfiguration `json:"-" xml:"-"`
}
@@ -4787,6 +6369,16 @@ type metadataVersioningConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+// String returns the string representation
+func (s VersioningConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VersioningConfiguration) GoString() string {
+ return s.String()
+}
+
type WebsiteConfiguration struct {
ErrorDocument *ErrorDocument `type:"structure"`
@@ -4802,3 +6394,244 @@ type WebsiteConfiguration struct {
type metadataWebsiteConfiguration struct {
SDKShapeTraits bool `type:"structure"`
}
+
+// String returns the string representation
+func (s WebsiteConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s WebsiteConfiguration) GoString() string {
+ return s.String()
+}
+
+const (
+ // @enum BucketCannedACL
+ BucketCannedACLPrivate = "private"
+ // @enum BucketCannedACL
+ BucketCannedACLPublicRead = "public-read"
+ // @enum BucketCannedACL
+ BucketCannedACLPublicReadWrite = "public-read-write"
+ // @enum BucketCannedACL
+ BucketCannedACLAuthenticatedRead = "authenticated-read"
+)
+
+const (
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintEu = "EU"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintEuWest1 = "eu-west-1"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintUsWest1 = "us-west-1"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintUsWest2 = "us-west-2"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintApNortheast1 = "ap-northeast-1"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintSaEast1 = "sa-east-1"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintCnNorth1 = "cn-north-1"
+ // @enum BucketLocationConstraint
+ BucketLocationConstraintEuCentral1 = "eu-central-1"
+)
+
+const (
+ // @enum BucketLogsPermission
+ BucketLogsPermissionFullControl = "FULL_CONTROL"
+ // @enum BucketLogsPermission
+ BucketLogsPermissionRead = "READ"
+ // @enum BucketLogsPermission
+ BucketLogsPermissionWrite = "WRITE"
+)
+
+const (
+ // @enum BucketVersioningStatus
+ BucketVersioningStatusEnabled = "Enabled"
+ // @enum BucketVersioningStatus
+ BucketVersioningStatusSuspended = "Suspended"
+)
+
+// Requests Amazon S3 to encode the object keys in the response and specifies
+// the encoding method to use. An object key may contain any Unicode character;
+// however, XML 1.0 parser cannot parse some characters, such as characters
+// with an ASCII value from 0 to 10. For characters that are not supported in
+// XML 1.0, you can add this parameter to request that Amazon S3 encode the
+// keys in the response.
+const (
+ // @enum EncodingType
+ EncodingTypeUrl = "url"
+)
+
+// Bucket event for which to send notifications.
+const (
+ // @enum Event
+ EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
+ // @enum Event
+ EventS3ObjectCreated = "s3:ObjectCreated:*"
+ // @enum Event
+ EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
+ // @enum Event
+ EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
+ // @enum Event
+ EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
+ // @enum Event
+ EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
+ // @enum Event
+ EventS3ObjectRemoved = "s3:ObjectRemoved:*"
+ // @enum Event
+ EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
+ // @enum Event
+ EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
+)
+
+const (
+ // @enum ExpirationStatus
+ ExpirationStatusEnabled = "Enabled"
+ // @enum ExpirationStatus
+ ExpirationStatusDisabled = "Disabled"
+)
+
+const (
+ // @enum MFADelete
+ MFADeleteEnabled = "Enabled"
+ // @enum MFADelete
+ MFADeleteDisabled = "Disabled"
+)
+
+const (
+ // @enum MFADeleteStatus
+ MFADeleteStatusEnabled = "Enabled"
+ // @enum MFADeleteStatus
+ MFADeleteStatusDisabled = "Disabled"
+)
+
+const (
+ // @enum MetadataDirective
+ MetadataDirectiveCopy = "COPY"
+ // @enum MetadataDirective
+ MetadataDirectiveReplace = "REPLACE"
+)
+
+const (
+ // @enum ObjectCannedACL
+ ObjectCannedACLPrivate = "private"
+ // @enum ObjectCannedACL
+ ObjectCannedACLPublicRead = "public-read"
+ // @enum ObjectCannedACL
+ ObjectCannedACLPublicReadWrite = "public-read-write"
+ // @enum ObjectCannedACL
+ ObjectCannedACLAuthenticatedRead = "authenticated-read"
+ // @enum ObjectCannedACL
+ ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
+ // @enum ObjectCannedACL
+ ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
+)
+
+const (
+ // @enum ObjectStorageClass
+ ObjectStorageClassStandard = "STANDARD"
+ // @enum ObjectStorageClass
+ ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
+ // @enum ObjectStorageClass
+ ObjectStorageClassGlacier = "GLACIER"
+)
+
+const (
+ // @enum ObjectVersionStorageClass
+ ObjectVersionStorageClassStandard = "STANDARD"
+)
+
+const (
+ // @enum Payer
+ PayerRequester = "Requester"
+ // @enum Payer
+ PayerBucketOwner = "BucketOwner"
+)
+
+const (
+ // @enum Permission
+ PermissionFullControl = "FULL_CONTROL"
+ // @enum Permission
+ PermissionWrite = "WRITE"
+ // @enum Permission
+ PermissionWriteAcp = "WRITE_ACP"
+ // @enum Permission
+ PermissionRead = "READ"
+ // @enum Permission
+ PermissionReadAcp = "READ_ACP"
+)
+
+const (
+ // @enum Protocol
+ ProtocolHttp = "http"
+ // @enum Protocol
+ ProtocolHttps = "https"
+)
+
+const (
+ // @enum ReplicationRuleStatus
+ ReplicationRuleStatusEnabled = "Enabled"
+ // @enum ReplicationRuleStatus
+ ReplicationRuleStatusDisabled = "Disabled"
+)
+
+const (
+ // @enum ReplicationStatus
+ ReplicationStatusComplete = "COMPLETE"
+ // @enum ReplicationStatus
+ ReplicationStatusPending = "PENDING"
+ // @enum ReplicationStatus
+ ReplicationStatusFailed = "FAILED"
+ // @enum ReplicationStatus
+ ReplicationStatusReplica = "REPLICA"
+)
+
+// If present, indicates that the requester was successfully charged for the
+// request.
+const (
+ // @enum RequestCharged
+ RequestChargedRequester = "requester"
+)
+
+// Confirms that the requester knows that she or he will be charged for the
+// request. Bucket owners need not specify this parameter in their requests.
+// Documentation on downloading objects from requester pays buckets can be found
+// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
+const (
+ // @enum RequestPayer
+ RequestPayerRequester = "requester"
+)
+
+const (
+ // @enum ServerSideEncryption
+ ServerSideEncryptionAes256 = "AES256"
+ // @enum ServerSideEncryption
+ ServerSideEncryptionAwsKms = "aws:kms"
+)
+
+const (
+ // @enum StorageClass
+ StorageClassStandard = "STANDARD"
+ // @enum StorageClass
+ StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
+ // @enum StorageClass
+ StorageClassLt = "LT"
+)
+
+const (
+ // @enum TransitionStorageClass
+ TransitionStorageClassGlacier = "GLACIER"
+)
+
+const (
+ // @enum Type
+ TypeCanonicalUser = "CanonicalUser"
+ // @enum Type
+ TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
+ // @enum Type
+ TypeGroup = "Group"
+)
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/bucket_location.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
index 59eb84524b..6194333b1d 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
@@ -29,13 +29,13 @@ func buildGetBucketLocation(r *aws.Request) {
}
func populateLocationConstraint(r *aws.Request) {
- if r.ParamsFilled() && r.Config.Region != "us-east-1" {
+ if r.ParamsFilled() && aws.StringValue(r.Config.Region) != "us-east-1" {
in := r.Params.(*CreateBucketInput)
if in.CreateBucketConfiguration == nil {
r.Params = awsutil.CopyOf(r.Params)
in = r.Params.(*CreateBucketInput)
in.CreateBucketConfiguration = &CreateBucketConfiguration{
- LocationConstraint: &r.Config.Region,
+ LocationConstraint: r.Config.Region,
}
}
}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/bucket_location_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/bucket_location_test.go
index f168854e23..3123b7f7ad 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/bucket_location_test.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/bucket_location_test.go
@@ -65,7 +65,7 @@ func TestNoPopulateLocationConstraintIfProvided(t *testing.T) {
}
func TestNoPopulateLocationConstraintIfClassic(t *testing.T) {
- s := s3.New(&aws.Config{Region: "us-east-1"})
+ s := s3.New(&aws.Config{Region: aws.String("us-east-1")})
req, _ := s.CreateBucketRequest(&s3.CreateBucketInput{
Bucket: aws.String("bucket"),
})
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/examples_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/examples_test.go
index 7dde748c80..fc08a446e9 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/examples_test.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/examples_test.go
@@ -29,7 +29,7 @@ func ExampleS3_AbortMultipartUpload() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -43,7 +43,7 @@ func ExampleS3_AbortMultipartUpload() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_CompleteMultipartUpload() {
@@ -57,7 +57,7 @@ func ExampleS3_CompleteMultipartUpload() {
Parts: []*s3.CompletedPart{
{ // Required
ETag: aws.String("ETag"),
- PartNumber: aws.Long(1),
+ PartNumber: aws.Int64(1),
},
// More values...
},
@@ -68,7 +68,7 @@ func ExampleS3_CompleteMultipartUpload() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -82,7 +82,7 @@ func ExampleS3_CompleteMultipartUpload() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_CopyObject() {
@@ -128,7 +128,7 @@ func ExampleS3_CopyObject() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -142,7 +142,7 @@ func ExampleS3_CopyObject() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_CreateBucket() {
@@ -164,7 +164,7 @@ func ExampleS3_CreateBucket() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -178,7 +178,7 @@ func ExampleS3_CreateBucket() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_CreateMultipartUpload() {
@@ -215,7 +215,7 @@ func ExampleS3_CreateMultipartUpload() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -229,7 +229,7 @@ func ExampleS3_CreateMultipartUpload() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteBucket() {
@@ -242,7 +242,7 @@ func ExampleS3_DeleteBucket() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -256,7 +256,7 @@ func ExampleS3_DeleteBucket() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteBucketCORS() {
@@ -269,7 +269,7 @@ func ExampleS3_DeleteBucketCORS() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -283,7 +283,7 @@ func ExampleS3_DeleteBucketCORS() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteBucketLifecycle() {
@@ -296,7 +296,7 @@ func ExampleS3_DeleteBucketLifecycle() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -310,7 +310,7 @@ func ExampleS3_DeleteBucketLifecycle() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteBucketPolicy() {
@@ -323,7 +323,7 @@ func ExampleS3_DeleteBucketPolicy() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -337,7 +337,7 @@ func ExampleS3_DeleteBucketPolicy() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteBucketReplication() {
@@ -350,7 +350,7 @@ func ExampleS3_DeleteBucketReplication() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -364,7 +364,7 @@ func ExampleS3_DeleteBucketReplication() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteBucketTagging() {
@@ -377,7 +377,7 @@ func ExampleS3_DeleteBucketTagging() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -391,7 +391,7 @@ func ExampleS3_DeleteBucketTagging() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteBucketWebsite() {
@@ -404,7 +404,7 @@ func ExampleS3_DeleteBucketWebsite() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -418,7 +418,7 @@ func ExampleS3_DeleteBucketWebsite() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteObject() {
@@ -435,7 +435,7 @@ func ExampleS3_DeleteObject() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -449,7 +449,7 @@ func ExampleS3_DeleteObject() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_DeleteObjects() {
@@ -465,7 +465,7 @@ func ExampleS3_DeleteObjects() {
},
// More values...
},
- Quiet: aws.Boolean(true),
+ Quiet: aws.Bool(true),
},
MFA: aws.String("MFA"),
RequestPayer: aws.String("RequestPayer"),
@@ -474,7 +474,7 @@ func ExampleS3_DeleteObjects() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -488,7 +488,7 @@ func ExampleS3_DeleteObjects() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketACL() {
@@ -501,7 +501,7 @@ func ExampleS3_GetBucketACL() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -515,7 +515,7 @@ func ExampleS3_GetBucketACL() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketCORS() {
@@ -528,7 +528,7 @@ func ExampleS3_GetBucketCORS() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -542,7 +542,7 @@ func ExampleS3_GetBucketCORS() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketLifecycle() {
@@ -555,7 +555,7 @@ func ExampleS3_GetBucketLifecycle() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -569,7 +569,7 @@ func ExampleS3_GetBucketLifecycle() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketLocation() {
@@ -582,7 +582,7 @@ func ExampleS3_GetBucketLocation() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -596,7 +596,7 @@ func ExampleS3_GetBucketLocation() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketLogging() {
@@ -609,7 +609,7 @@ func ExampleS3_GetBucketLogging() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -623,7 +623,7 @@ func ExampleS3_GetBucketLogging() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketNotification() {
@@ -636,7 +636,7 @@ func ExampleS3_GetBucketNotification() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -650,7 +650,7 @@ func ExampleS3_GetBucketNotification() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketNotificationConfiguration() {
@@ -663,7 +663,7 @@ func ExampleS3_GetBucketNotificationConfiguration() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -677,7 +677,7 @@ func ExampleS3_GetBucketNotificationConfiguration() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketPolicy() {
@@ -690,7 +690,7 @@ func ExampleS3_GetBucketPolicy() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -704,7 +704,7 @@ func ExampleS3_GetBucketPolicy() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketReplication() {
@@ -717,7 +717,7 @@ func ExampleS3_GetBucketReplication() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -731,7 +731,7 @@ func ExampleS3_GetBucketReplication() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketRequestPayment() {
@@ -744,7 +744,7 @@ func ExampleS3_GetBucketRequestPayment() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -758,7 +758,7 @@ func ExampleS3_GetBucketRequestPayment() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketTagging() {
@@ -771,7 +771,7 @@ func ExampleS3_GetBucketTagging() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -785,7 +785,7 @@ func ExampleS3_GetBucketTagging() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketVersioning() {
@@ -798,7 +798,7 @@ func ExampleS3_GetBucketVersioning() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -812,7 +812,7 @@ func ExampleS3_GetBucketVersioning() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetBucketWebsite() {
@@ -825,7 +825,7 @@ func ExampleS3_GetBucketWebsite() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -839,7 +839,7 @@ func ExampleS3_GetBucketWebsite() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetObject() {
@@ -869,7 +869,7 @@ func ExampleS3_GetObject() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -883,7 +883,7 @@ func ExampleS3_GetObject() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetObjectACL() {
@@ -899,7 +899,7 @@ func ExampleS3_GetObjectACL() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -913,7 +913,7 @@ func ExampleS3_GetObjectACL() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_GetObjectTorrent() {
@@ -928,7 +928,7 @@ func ExampleS3_GetObjectTorrent() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -942,7 +942,7 @@ func ExampleS3_GetObjectTorrent() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_HeadBucket() {
@@ -955,7 +955,7 @@ func ExampleS3_HeadBucket() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -969,7 +969,7 @@ func ExampleS3_HeadBucket() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_HeadObject() {
@@ -993,7 +993,7 @@ func ExampleS3_HeadObject() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1007,7 +1007,7 @@ func ExampleS3_HeadObject() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_ListBuckets() {
@@ -1018,7 +1018,7 @@ func ExampleS3_ListBuckets() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1032,7 +1032,7 @@ func ExampleS3_ListBuckets() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_ListMultipartUploads() {
@@ -1043,7 +1043,7 @@ func ExampleS3_ListMultipartUploads() {
Delimiter: aws.String("Delimiter"),
EncodingType: aws.String("EncodingType"),
KeyMarker: aws.String("KeyMarker"),
- MaxUploads: aws.Long(1),
+ MaxUploads: aws.Int64(1),
Prefix: aws.String("Prefix"),
UploadIDMarker: aws.String("UploadIdMarker"),
}
@@ -1051,7 +1051,7 @@ func ExampleS3_ListMultipartUploads() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1065,7 +1065,7 @@ func ExampleS3_ListMultipartUploads() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_ListObjectVersions() {
@@ -1076,7 +1076,7 @@ func ExampleS3_ListObjectVersions() {
Delimiter: aws.String("Delimiter"),
EncodingType: aws.String("EncodingType"),
KeyMarker: aws.String("KeyMarker"),
- MaxKeys: aws.Long(1),
+ MaxKeys: aws.Int64(1),
Prefix: aws.String("Prefix"),
VersionIDMarker: aws.String("VersionIdMarker"),
}
@@ -1084,7 +1084,7 @@ func ExampleS3_ListObjectVersions() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1098,7 +1098,7 @@ func ExampleS3_ListObjectVersions() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_ListObjects() {
@@ -1109,14 +1109,14 @@ func ExampleS3_ListObjects() {
Delimiter: aws.String("Delimiter"),
EncodingType: aws.String("EncodingType"),
Marker: aws.String("Marker"),
- MaxKeys: aws.Long(1),
+ MaxKeys: aws.Int64(1),
Prefix: aws.String("Prefix"),
}
resp, err := svc.ListObjects(params)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1130,7 +1130,7 @@ func ExampleS3_ListObjects() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_ListParts() {
@@ -1140,15 +1140,15 @@ func ExampleS3_ListParts() {
Bucket: aws.String("BucketName"), // Required
Key: aws.String("ObjectKey"), // Required
UploadID: aws.String("MultipartUploadId"), // Required
- MaxParts: aws.Long(1),
- PartNumberMarker: aws.Long(1),
+ MaxParts: aws.Int64(1),
+ PartNumberMarker: aws.Int64(1),
RequestPayer: aws.String("RequestPayer"),
}
resp, err := svc.ListParts(params)
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1162,7 +1162,7 @@ func ExampleS3_ListParts() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketACL() {
@@ -1200,7 +1200,7 @@ func ExampleS3_PutBucketACL() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1214,7 +1214,7 @@ func ExampleS3_PutBucketACL() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketCORS() {
@@ -1241,7 +1241,7 @@ func ExampleS3_PutBucketCORS() {
aws.String("ExposeHeader"), // Required
// More values...
},
- MaxAgeSeconds: aws.Long(1),
+ MaxAgeSeconds: aws.Int64(1),
},
// More values...
},
@@ -1251,7 +1251,7 @@ func ExampleS3_PutBucketCORS() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1265,7 +1265,7 @@ func ExampleS3_PutBucketCORS() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketLifecycle() {
@@ -1280,19 +1280,19 @@ func ExampleS3_PutBucketLifecycle() {
Status: aws.String("ExpirationStatus"), // Required
Expiration: &s3.LifecycleExpiration{
Date: aws.Time(time.Now()),
- Days: aws.Long(1),
+ Days: aws.Int64(1),
},
ID: aws.String("ID"),
NoncurrentVersionExpiration: &s3.NoncurrentVersionExpiration{
- NoncurrentDays: aws.Long(1),
+ NoncurrentDays: aws.Int64(1),
},
NoncurrentVersionTransition: &s3.NoncurrentVersionTransition{
- NoncurrentDays: aws.Long(1),
+ NoncurrentDays: aws.Int64(1),
StorageClass: aws.String("TransitionStorageClass"),
},
Transition: &s3.Transition{
Date: aws.Time(time.Now()),
- Days: aws.Long(1),
+ Days: aws.Int64(1),
StorageClass: aws.String("TransitionStorageClass"),
},
},
@@ -1304,7 +1304,7 @@ func ExampleS3_PutBucketLifecycle() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1318,7 +1318,7 @@ func ExampleS3_PutBucketLifecycle() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketLogging() {
@@ -1350,7 +1350,7 @@ func ExampleS3_PutBucketLogging() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1364,7 +1364,7 @@ func ExampleS3_PutBucketLogging() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketNotification() {
@@ -1407,7 +1407,7 @@ func ExampleS3_PutBucketNotification() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1421,7 +1421,7 @@ func ExampleS3_PutBucketNotification() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketNotificationConfiguration() {
@@ -1469,7 +1469,7 @@ func ExampleS3_PutBucketNotificationConfiguration() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1483,7 +1483,7 @@ func ExampleS3_PutBucketNotificationConfiguration() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketPolicy() {
@@ -1497,7 +1497,7 @@ func ExampleS3_PutBucketPolicy() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1511,7 +1511,7 @@ func ExampleS3_PutBucketPolicy() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketReplication() {
@@ -1538,7 +1538,7 @@ func ExampleS3_PutBucketReplication() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1552,7 +1552,7 @@ func ExampleS3_PutBucketReplication() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketRequestPayment() {
@@ -1568,7 +1568,7 @@ func ExampleS3_PutBucketRequestPayment() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1582,7 +1582,7 @@ func ExampleS3_PutBucketRequestPayment() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketTagging() {
@@ -1604,7 +1604,7 @@ func ExampleS3_PutBucketTagging() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1618,7 +1618,7 @@ func ExampleS3_PutBucketTagging() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketVersioning() {
@@ -1636,7 +1636,7 @@ func ExampleS3_PutBucketVersioning() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1650,7 +1650,7 @@ func ExampleS3_PutBucketVersioning() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutBucketWebsite() {
@@ -1691,7 +1691,7 @@ func ExampleS3_PutBucketWebsite() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1705,7 +1705,7 @@ func ExampleS3_PutBucketWebsite() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutObject() {
@@ -1720,7 +1720,7 @@ func ExampleS3_PutObject() {
ContentDisposition: aws.String("ContentDisposition"),
ContentEncoding: aws.String("ContentEncoding"),
ContentLanguage: aws.String("ContentLanguage"),
- ContentLength: aws.Long(1),
+ ContentLength: aws.Int64(1),
ContentType: aws.String("ContentType"),
Expires: aws.Time(time.Now()),
GrantFullControl: aws.String("GrantFullControl"),
@@ -1744,7 +1744,7 @@ func ExampleS3_PutObject() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1758,7 +1758,7 @@ func ExampleS3_PutObject() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_PutObjectACL() {
@@ -1798,7 +1798,7 @@ func ExampleS3_PutObjectACL() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1812,7 +1812,7 @@ func ExampleS3_PutObjectACL() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_RestoreObject() {
@@ -1823,7 +1823,7 @@ func ExampleS3_RestoreObject() {
Key: aws.String("ObjectKey"), // Required
RequestPayer: aws.String("RequestPayer"),
RestoreRequest: &s3.RestoreRequest{
- Days: aws.Long(1), // Required
+ Days: aws.Int64(1), // Required
},
VersionID: aws.String("ObjectVersionId"),
}
@@ -1831,7 +1831,7 @@ func ExampleS3_RestoreObject() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1845,7 +1845,7 @@ func ExampleS3_RestoreObject() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_UploadPart() {
@@ -1854,10 +1854,10 @@ func ExampleS3_UploadPart() {
params := &s3.UploadPartInput{
Bucket: aws.String("BucketName"), // Required
Key: aws.String("ObjectKey"), // Required
- PartNumber: aws.Long(1), // Required
+ PartNumber: aws.Int64(1), // Required
UploadID: aws.String("MultipartUploadId"), // Required
Body: bytes.NewReader([]byte("PAYLOAD")),
- ContentLength: aws.Long(1),
+ ContentLength: aws.Int64(1),
RequestPayer: aws.String("RequestPayer"),
SSECustomerAlgorithm: aws.String("SSECustomerAlgorithm"),
SSECustomerKey: aws.String("SSECustomerKey"),
@@ -1867,7 +1867,7 @@ func ExampleS3_UploadPart() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1881,7 +1881,7 @@ func ExampleS3_UploadPart() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
func ExampleS3_UploadPartCopy() {
@@ -1891,7 +1891,7 @@ func ExampleS3_UploadPartCopy() {
Bucket: aws.String("BucketName"), // Required
CopySource: aws.String("CopySource"), // Required
Key: aws.String("ObjectKey"), // Required
- PartNumber: aws.Long(1), // Required
+ PartNumber: aws.Int64(1), // Required
UploadID: aws.String("MultipartUploadId"), // Required
CopySourceIfMatch: aws.String("CopySourceIfMatch"),
CopySourceIfModifiedSince: aws.Time(time.Now()),
@@ -1910,7 +1910,7 @@ func ExampleS3_UploadPartCopy() {
if err != nil {
if awsErr, ok := err.(awserr.Error); ok {
- // Generic AWS Error with Code, Message, and original error (if any)
+ // 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
@@ -1924,5 +1924,5 @@ func ExampleS3_UploadPartCopy() {
}
// Pretty-print the response data.
- fmt.Println(awsutil.StringValue(resp))
+ fmt.Println(awsutil.Prettify(resp))
}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
index 07c62dc166..ef4c8ea04c 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
@@ -23,7 +23,7 @@ func dnsCompatibleBucketName(bucket string) bool {
// the host. This is false if S3ForcePathStyle is explicitly set or if the
// bucket is not DNS compatible.
func hostStyleBucketName(r *aws.Request, bucket string) bool {
- if r.Config.S3ForcePathStyle {
+ if aws.BoolValue(r.Config.S3ForcePathStyle) {
return false
}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/host_style_bucket_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/host_style_bucket_test.go
index 23cdf7fbcf..c4347d44b9 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/host_style_bucket_test.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/host_style_bucket_test.go
@@ -51,11 +51,11 @@ func TestHostStyleBucketBuild(t *testing.T) {
}
func TestHostStyleBucketBuildNoSSL(t *testing.T) {
- s := s3.New(&aws.Config{DisableSSL: true})
+ s := s3.New(&aws.Config{DisableSSL: aws.Bool(true)})
runTests(t, s, nosslTests)
}
func TestPathStyleBucketBuild(t *testing.T) {
- s := s3.New(&aws.Config{S3ForcePathStyle: true})
+ s := s3.New(&aws.Config{S3ForcePathStyle: aws.Bool(true)})
runTests(t, s, forcepathTests)
}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
index d799e25408..aa5f05ea86 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go
@@ -4,116 +4,233 @@
package s3iface
import (
+ "github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
)
// S3API is the interface type for s3.S3.
type S3API interface {
+ AbortMultipartUploadRequest(*s3.AbortMultipartUploadInput) (*aws.Request, *s3.AbortMultipartUploadOutput)
+
AbortMultipartUpload(*s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error)
+ CompleteMultipartUploadRequest(*s3.CompleteMultipartUploadInput) (*aws.Request, *s3.CompleteMultipartUploadOutput)
+
CompleteMultipartUpload(*s3.CompleteMultipartUploadInput) (*s3.CompleteMultipartUploadOutput, error)
+ CopyObjectRequest(*s3.CopyObjectInput) (*aws.Request, *s3.CopyObjectOutput)
+
CopyObject(*s3.CopyObjectInput) (*s3.CopyObjectOutput, error)
+ CreateBucketRequest(*s3.CreateBucketInput) (*aws.Request, *s3.CreateBucketOutput)
+
CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error)
+ CreateMultipartUploadRequest(*s3.CreateMultipartUploadInput) (*aws.Request, *s3.CreateMultipartUploadOutput)
+
CreateMultipartUpload(*s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error)
+ DeleteBucketRequest(*s3.DeleteBucketInput) (*aws.Request, *s3.DeleteBucketOutput)
+
DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
+ DeleteBucketCORSRequest(*s3.DeleteBucketCORSInput) (*aws.Request, *s3.DeleteBucketCORSOutput)
+
DeleteBucketCORS(*s3.DeleteBucketCORSInput) (*s3.DeleteBucketCORSOutput, error)
+ DeleteBucketLifecycleRequest(*s3.DeleteBucketLifecycleInput) (*aws.Request, *s3.DeleteBucketLifecycleOutput)
+
DeleteBucketLifecycle(*s3.DeleteBucketLifecycleInput) (*s3.DeleteBucketLifecycleOutput, error)
+ DeleteBucketPolicyRequest(*s3.DeleteBucketPolicyInput) (*aws.Request, *s3.DeleteBucketPolicyOutput)
+
DeleteBucketPolicy(*s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error)
+ DeleteBucketReplicationRequest(*s3.DeleteBucketReplicationInput) (*aws.Request, *s3.DeleteBucketReplicationOutput)
+
DeleteBucketReplication(*s3.DeleteBucketReplicationInput) (*s3.DeleteBucketReplicationOutput, error)
+ DeleteBucketTaggingRequest(*s3.DeleteBucketTaggingInput) (*aws.Request, *s3.DeleteBucketTaggingOutput)
+
DeleteBucketTagging(*s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error)
+ DeleteBucketWebsiteRequest(*s3.DeleteBucketWebsiteInput) (*aws.Request, *s3.DeleteBucketWebsiteOutput)
+
DeleteBucketWebsite(*s3.DeleteBucketWebsiteInput) (*s3.DeleteBucketWebsiteOutput, error)
+ DeleteObjectRequest(*s3.DeleteObjectInput) (*aws.Request, *s3.DeleteObjectOutput)
+
DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
+ DeleteObjectsRequest(*s3.DeleteObjectsInput) (*aws.Request, *s3.DeleteObjectsOutput)
+
DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
+ GetBucketACLRequest(*s3.GetBucketACLInput) (*aws.Request, *s3.GetBucketACLOutput)
+
GetBucketACL(*s3.GetBucketACLInput) (*s3.GetBucketACLOutput, error)
+ GetBucketCORSRequest(*s3.GetBucketCORSInput) (*aws.Request, *s3.GetBucketCORSOutput)
+
GetBucketCORS(*s3.GetBucketCORSInput) (*s3.GetBucketCORSOutput, error)
+ GetBucketLifecycleRequest(*s3.GetBucketLifecycleInput) (*aws.Request, *s3.GetBucketLifecycleOutput)
+
GetBucketLifecycle(*s3.GetBucketLifecycleInput) (*s3.GetBucketLifecycleOutput, error)
+ GetBucketLocationRequest(*s3.GetBucketLocationInput) (*aws.Request, *s3.GetBucketLocationOutput)
+
GetBucketLocation(*s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error)
+ GetBucketLoggingRequest(*s3.GetBucketLoggingInput) (*aws.Request, *s3.GetBucketLoggingOutput)
+
GetBucketLogging(*s3.GetBucketLoggingInput) (*s3.GetBucketLoggingOutput, error)
+ GetBucketNotificationRequest(*s3.GetBucketNotificationConfigurationRequest) (*aws.Request, *s3.NotificationConfigurationDeprecated)
+
GetBucketNotification(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfigurationDeprecated, error)
+ GetBucketNotificationConfigurationRequest(*s3.GetBucketNotificationConfigurationRequest) (*aws.Request, *s3.NotificationConfiguration)
+
GetBucketNotificationConfiguration(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfiguration, error)
+ GetBucketPolicyRequest(*s3.GetBucketPolicyInput) (*aws.Request, *s3.GetBucketPolicyOutput)
+
GetBucketPolicy(*s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error)
+ GetBucketReplicationRequest(*s3.GetBucketReplicationInput) (*aws.Request, *s3.GetBucketReplicationOutput)
+
GetBucketReplication(*s3.GetBucketReplicationInput) (*s3.GetBucketReplicationOutput, error)
+ GetBucketRequestPaymentRequest(*s3.GetBucketRequestPaymentInput) (*aws.Request, *s3.GetBucketRequestPaymentOutput)
+
GetBucketRequestPayment(*s3.GetBucketRequestPaymentInput) (*s3.GetBucketRequestPaymentOutput, error)
+ GetBucketTaggingRequest(*s3.GetBucketTaggingInput) (*aws.Request, *s3.GetBucketTaggingOutput)
+
GetBucketTagging(*s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error)
+ GetBucketVersioningRequest(*s3.GetBucketVersioningInput) (*aws.Request, *s3.GetBucketVersioningOutput)
+
GetBucketVersioning(*s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error)
+ GetBucketWebsiteRequest(*s3.GetBucketWebsiteInput) (*aws.Request, *s3.GetBucketWebsiteOutput)
+
GetBucketWebsite(*s3.GetBucketWebsiteInput) (*s3.GetBucketWebsiteOutput, error)
+ GetObjectRequest(*s3.GetObjectInput) (*aws.Request, *s3.GetObjectOutput)
+
GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error)
+ GetObjectACLRequest(*s3.GetObjectACLInput) (*aws.Request, *s3.GetObjectACLOutput)
+
GetObjectACL(*s3.GetObjectACLInput) (*s3.GetObjectACLOutput, error)
+ GetObjectTorrentRequest(*s3.GetObjectTorrentInput) (*aws.Request, *s3.GetObjectTorrentOutput)
+
GetObjectTorrent(*s3.GetObjectTorrentInput) (*s3.GetObjectTorrentOutput, error)
+ HeadBucketRequest(*s3.HeadBucketInput) (*aws.Request, *s3.HeadBucketOutput)
+
HeadBucket(*s3.HeadBucketInput) (*s3.HeadBucketOutput, error)
+ HeadObjectRequest(*s3.HeadObjectInput) (*aws.Request, *s3.HeadObjectOutput)
+
HeadObject(*s3.HeadObjectInput) (*s3.HeadObjectOutput, error)
+ ListBucketsRequest(*s3.ListBucketsInput) (*aws.Request, *s3.ListBucketsOutput)
+
ListBuckets(*s3.ListBucketsInput) (*s3.ListBucketsOutput, error)
+ ListMultipartUploadsRequest(*s3.ListMultipartUploadsInput) (*aws.Request, *s3.ListMultipartUploadsOutput)
+
ListMultipartUploads(*s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error)
+ ListMultipartUploadsPages(*s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool) error
+
+ ListObjectVersionsRequest(*s3.ListObjectVersionsInput) (*aws.Request, *s3.ListObjectVersionsOutput)
+
ListObjectVersions(*s3.ListObjectVersionsInput) (*s3.ListObjectVersionsOutput, error)
+ ListObjectVersionsPages(*s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool) error
+
+ ListObjectsRequest(*s3.ListObjectsInput) (*aws.Request, *s3.ListObjectsOutput)
+
ListObjects(*s3.ListObjectsInput) (*s3.ListObjectsOutput, error)
+ ListObjectsPages(*s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool) error
+
+ ListPartsRequest(*s3.ListPartsInput) (*aws.Request, *s3.ListPartsOutput)
+
ListParts(*s3.ListPartsInput) (*s3.ListPartsOutput, error)
+ ListPartsPages(*s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool) error
+
+ PutBucketACLRequest(*s3.PutBucketACLInput) (*aws.Request, *s3.PutBucketACLOutput)
+
PutBucketACL(*s3.PutBucketACLInput) (*s3.PutBucketACLOutput, error)
+ PutBucketCORSRequest(*s3.PutBucketCORSInput) (*aws.Request, *s3.PutBucketCORSOutput)
+
PutBucketCORS(*s3.PutBucketCORSInput) (*s3.PutBucketCORSOutput, error)
+ PutBucketLifecycleRequest(*s3.PutBucketLifecycleInput) (*aws.Request, *s3.PutBucketLifecycleOutput)
+
PutBucketLifecycle(*s3.PutBucketLifecycleInput) (*s3.PutBucketLifecycleOutput, error)
+ PutBucketLoggingRequest(*s3.PutBucketLoggingInput) (*aws.Request, *s3.PutBucketLoggingOutput)
+
PutBucketLogging(*s3.PutBucketLoggingInput) (*s3.PutBucketLoggingOutput, error)
+ PutBucketNotificationRequest(*s3.PutBucketNotificationInput) (*aws.Request, *s3.PutBucketNotificationOutput)
+
PutBucketNotification(*s3.PutBucketNotificationInput) (*s3.PutBucketNotificationOutput, error)
+ PutBucketNotificationConfigurationRequest(*s3.PutBucketNotificationConfigurationInput) (*aws.Request, *s3.PutBucketNotificationConfigurationOutput)
+
PutBucketNotificationConfiguration(*s3.PutBucketNotificationConfigurationInput) (*s3.PutBucketNotificationConfigurationOutput, error)
+ PutBucketPolicyRequest(*s3.PutBucketPolicyInput) (*aws.Request, *s3.PutBucketPolicyOutput)
+
PutBucketPolicy(*s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error)
+ PutBucketReplicationRequest(*s3.PutBucketReplicationInput) (*aws.Request, *s3.PutBucketReplicationOutput)
+
PutBucketReplication(*s3.PutBucketReplicationInput) (*s3.PutBucketReplicationOutput, error)
+ PutBucketRequestPaymentRequest(*s3.PutBucketRequestPaymentInput) (*aws.Request, *s3.PutBucketRequestPaymentOutput)
+
PutBucketRequestPayment(*s3.PutBucketRequestPaymentInput) (*s3.PutBucketRequestPaymentOutput, error)
+ PutBucketTaggingRequest(*s3.PutBucketTaggingInput) (*aws.Request, *s3.PutBucketTaggingOutput)
+
PutBucketTagging(*s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error)
+ PutBucketVersioningRequest(*s3.PutBucketVersioningInput) (*aws.Request, *s3.PutBucketVersioningOutput)
+
PutBucketVersioning(*s3.PutBucketVersioningInput) (*s3.PutBucketVersioningOutput, error)
+ PutBucketWebsiteRequest(*s3.PutBucketWebsiteInput) (*aws.Request, *s3.PutBucketWebsiteOutput)
+
PutBucketWebsite(*s3.PutBucketWebsiteInput) (*s3.PutBucketWebsiteOutput, error)
+ PutObjectRequest(*s3.PutObjectInput) (*aws.Request, *s3.PutObjectOutput)
+
PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error)
+ PutObjectACLRequest(*s3.PutObjectACLInput) (*aws.Request, *s3.PutObjectACLOutput)
+
PutObjectACL(*s3.PutObjectACLInput) (*s3.PutObjectACLOutput, error)
+ RestoreObjectRequest(*s3.RestoreObjectInput) (*aws.Request, *s3.RestoreObjectOutput)
+
RestoreObject(*s3.RestoreObjectInput) (*s3.RestoreObjectOutput, error)
+ UploadPartRequest(*s3.UploadPartInput) (*aws.Request, *s3.UploadPartOutput)
+
UploadPart(*s3.UploadPartInput) (*s3.UploadPartOutput, error)
+ UploadPartCopyRequest(*s3.UploadPartCopyInput) (*aws.Request, *s3.UploadPartCopyOutput)
+
UploadPartCopy(*s3.UploadPartCopyInput) (*s3.UploadPartCopyOutput, error)
}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/sse_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/sse_test.go
index e66518859b..4e6ecdce36 100644
--- a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/sse_test.go
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/s3/sse_test.go
@@ -13,7 +13,7 @@ import (
var _ = unit.Imported
func TestSSECustomerKeyOverHTTPError(t *testing.T) {
- s := s3.New(&aws.Config{DisableSSL: true})
+ s := s3.New(&aws.Config{DisableSSL: aws.Bool(true)})
req, _ := s.CopyObjectRequest(&s3.CopyObjectInput{
Bucket: aws.String("bucket"),
CopySource: aws.String("bucket/source"),
@@ -28,7 +28,7 @@ func TestSSECustomerKeyOverHTTPError(t *testing.T) {
}
func TestCopySourceSSECustomerKeyOverHTTPError(t *testing.T) {
- s := s3.New(&aws.Config{DisableSSL: true})
+ s := s3.New(&aws.Config{DisableSSL: aws.Bool(true)})
req, _ := s.CopyObjectRequest(&s3.CopyObjectInput{
Bucket: aws.String("bucket"),
CopySource: aws.String("bucket/source"),
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/auth.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/auth.go
deleted file mode 100644
index a29b0c2b7b..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/auth.go
+++ /dev/null
@@ -1,270 +0,0 @@
-package aws
-
-import (
- "bufio"
- "encoding/json"
- "fmt"
- "net/http"
- "os"
- "os/user"
- "path"
- "sync"
- "time"
-
- "github.com/vaughan0/go-ini"
-)
-
-// Credentials are used to authenticate and authorize calls that you make to
-// AWS.
-type Credentials struct {
- AccessKeyID string
- SecretAccessKey string
- SecurityToken string
-}
-
-// A CredentialsProvider is a provider of credentials.
-type CredentialsProvider interface {
- // Credentials returns a set of credentials (or an error if no credentials
- // could be provided).
- Credentials() (*Credentials, error)
-}
-
-var (
- // ErrAccessKeyIDNotFound is returned when the AWS Access Key ID can't be
- // found in the process's environment.
- ErrAccessKeyIDNotFound = fmt.Errorf("AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment")
- // ErrSecretAccessKeyNotFound is returned when the AWS Secret Access Key
- // can't be found in the process's environment.
- ErrSecretAccessKeyNotFound = fmt.Errorf("AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment")
-)
-
-// Context encapsulates the context of a client's connection to an AWS service.
-type Context struct {
- Service string
- Region string
- Credentials CredentialsProvider
-}
-
-var currentTime = func() time.Time {
- return time.Now()
-}
-
-// DetectCreds returns a CredentialsProvider based on the available information.
-//
-// If the access key ID and secret access key are provided, it returns a basic
-// provider.
-//
-// If credentials are available via environment variables, it returns an
-// environment provider.
-//
-// If a profile configuration file is available in the default location and has
-// a default profile configured, it returns a profile provider.
-//
-// Otherwise, it returns an IAM instance provider.
-func DetectCreds(accessKeyID, secretAccessKey, securityToken string) CredentialsProvider {
- if accessKeyID != "" && secretAccessKey != "" {
- return Creds(accessKeyID, secretAccessKey, securityToken)
- }
-
- env, err := EnvCreds()
- if err == nil {
- return env
- }
-
- profile, err := ProfileCreds("", "", 10*time.Minute)
- if err != nil {
- return IAMCreds()
- }
-
- _, err = profile.Credentials()
- if err != nil {
- return IAMCreds()
- }
-
- return profile
-}
-
-// EnvCreds returns a static provider of AWS credentials from the process's
-// environment, or an error if none are found.
-func EnvCreds() (CredentialsProvider, error) {
- id := os.Getenv("AWS_ACCESS_KEY_ID")
- if id == "" {
- id = os.Getenv("AWS_ACCESS_KEY")
- }
-
- secret := os.Getenv("AWS_SECRET_ACCESS_KEY")
- if secret == "" {
- secret = os.Getenv("AWS_SECRET_KEY")
- }
-
- if id == "" {
- return nil, ErrAccessKeyIDNotFound
- }
-
- if secret == "" {
- return nil, ErrSecretAccessKeyNotFound
- }
-
- return Creds(id, secret, os.Getenv("AWS_SESSION_TOKEN")), nil
-}
-
-// Creds returns a static provider of credentials.
-func Creds(accessKeyID, secretAccessKey, securityToken string) CredentialsProvider {
- return staticCredentialsProvider{
- creds: Credentials{
- AccessKeyID: accessKeyID,
- SecretAccessKey: secretAccessKey,
- SecurityToken: securityToken,
- },
- }
-}
-
-// IAMCreds returns a provider which pulls credentials from the local EC2
-// instance's IAM roles.
-func IAMCreds() CredentialsProvider {
- return &iamProvider{}
-}
-
-// ProfileCreds returns a provider which pulls credentials from the profile
-// configuration file.
-func ProfileCreds(filename, profile string, expiry time.Duration) (CredentialsProvider, error) {
- if filename == "" {
- u, err := user.Current()
- if err != nil {
- return nil, err
- }
-
- filename = path.Join(u.HomeDir, ".aws", "credentials")
- }
-
- if profile == "" {
- profile = "default"
- }
-
- return &profileProvider{
- filename: filename,
- profile: profile,
- expiry: expiry,
- }, nil
-}
-
-type profileProvider struct {
- filename string
- profile string
- expiry time.Duration
-
- creds Credentials
- m sync.Mutex
- expiration time.Time
-}
-
-func (p *profileProvider) Credentials() (*Credentials, error) {
- p.m.Lock()
- defer p.m.Unlock()
-
- if p.expiration.After(currentTime()) {
- return &p.creds, nil
- }
-
- config, err := ini.LoadFile(p.filename)
- if err != nil {
- return nil, err
- }
- profile := config.Section(p.profile)
-
- accessKeyID, ok := profile["aws_access_key_id"]
- if !ok {
- return nil, fmt.Errorf("profile %s in %s did not contain aws_access_key_id", p.profile, p.filename)
- }
-
- secretAccessKey, ok := profile["aws_secret_access_key"]
- if !ok {
- return nil, fmt.Errorf("profile %s in %s did not contain aws_secret_access_key", p.profile, p.filename)
- }
-
- securityToken := profile["aws_session_token"]
-
- p.creds = Credentials{
- AccessKeyID: accessKeyID,
- SecretAccessKey: secretAccessKey,
- SecurityToken: securityToken,
- }
- p.expiration = currentTime().Add(p.expiry)
-
- return &p.creds, nil
-}
-
-type iamProvider struct {
- creds Credentials
- m sync.Mutex
- expiration time.Time
-}
-
-var metadataCredentialsEndpoint = "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
-
-// IAMClient is the HTTP client used to query the metadata endpoint for IAM
-// credentials.
-var IAMClient = http.Client{
- Timeout: 1 * time.Second,
-}
-
-func (p *iamProvider) Credentials() (*Credentials, error) {
- p.m.Lock()
- defer p.m.Unlock()
-
- if p.expiration.After(currentTime()) {
- return &p.creds, nil
- }
-
- var body struct {
- Expiration time.Time
- AccessKeyID string
- SecretAccessKey string
- Token string
- }
-
- resp, err := IAMClient.Get(metadataCredentialsEndpoint)
- if err != nil {
- return nil, fmt.Errorf("listing IAM credentials")
- }
- defer func() {
- _ = resp.Body.Close()
- }()
-
- // Take the first line of the body of the metadata endpoint
- s := bufio.NewScanner(resp.Body)
- if !s.Scan() {
- return nil, fmt.Errorf("unable to find default IAM credentials")
- } else if s.Err() != nil {
- return nil, fmt.Errorf("%s listing IAM credentials", s.Err())
- }
-
- resp, err = IAMClient.Get(metadataCredentialsEndpoint + s.Text())
- if err != nil {
- return nil, fmt.Errorf("getting %s IAM credentials", s.Text())
- }
- defer func() {
- _ = resp.Body.Close()
- }()
-
- if err := json.NewDecoder(resp.Body).Decode(&body); err != nil {
- return nil, fmt.Errorf("decoding %s IAM credentials", s.Text())
- }
-
- p.creds = Credentials{
- AccessKeyID: body.AccessKeyID,
- SecretAccessKey: body.SecretAccessKey,
- SecurityToken: body.Token,
- }
- p.expiration = body.Expiration
-
- return &p.creds, nil
-}
-
-type staticCredentialsProvider struct {
- creds Credentials
-}
-
-func (p staticCredentialsProvider) Credentials() (*Credentials, error) {
- return &p.creds, nil
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/auth_test.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/auth_test.go
deleted file mode 100644
index 339789809d..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/auth_test.go
+++ /dev/null
@@ -1,236 +0,0 @@
-package aws
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "os"
- "testing"
- "time"
-)
-
-func TestEnvCreds(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY_ID", "access")
- os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
- os.Setenv("AWS_SESSION_TOKEN", "token")
-
- prov, err := EnvCreds()
- if err != nil {
- t.Fatal(err)
- }
-
- creds, err := prov.Credentials()
- if err != nil {
- t.Fatal(err)
- }
-
- if v, want := creds.AccessKeyID, "access"; v != want {
- t.Errorf("Access key ID was %v, expected %v", v, want)
- }
-
- if v, want := creds.SecretAccessKey, "secret"; v != want {
- t.Errorf("Secret access key was %v, expected %v", v, want)
- }
-
- if v, want := creds.SecurityToken, "token"; v != want {
- t.Errorf("Security token was %v, expected %v", v, want)
- }
-}
-
-func TestEnvCredsNoAccessKeyID(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_SECRET_ACCESS_KEY", "secret")
-
- prov, err := EnvCreds()
- if err != ErrAccessKeyIDNotFound {
- t.Fatalf("ErrAccessKeyIDNotFound expected, but was %#v/%#v", prov, err)
- }
-}
-
-func TestEnvCredsNoSecretAccessKey(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY_ID", "access")
-
- prov, err := EnvCreds()
- if err != ErrSecretAccessKeyNotFound {
- t.Fatalf("ErrSecretAccessKeyNotFound expected, but was %#v/%#v", prov, err)
- }
-}
-
-func TestEnvCredsAlternateNames(t *testing.T) {
- os.Clearenv()
- os.Setenv("AWS_ACCESS_KEY", "access")
- os.Setenv("AWS_SECRET_KEY", "secret")
-
- prov, err := EnvCreds()
- if err != nil {
- t.Fatal(err)
- }
-
- creds, err := prov.Credentials()
- if err != nil {
- t.Fatal(err)
- }
-
- if v, want := creds.AccessKeyID, "access"; v != want {
- t.Errorf("Access key ID was %v, expected %v", v, want)
- }
-
- if v, want := creds.SecretAccessKey, "secret"; v != want {
- t.Errorf("Secret access key was %v, expected %v", v, want)
- }
-}
-
-func TestIAMCreds(t *testing.T) {
- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.RequestURI == "/" {
- fmt.Fprintln(w, "/creds")
- } else {
- fmt.Fprintln(w, `{
- "AccessKeyId" : "accessKey",
- "SecretAccessKey" : "secret",
- "Token" : "token",
- "Expiration" : "2014-12-16T01:51:37Z"
-}`)
- }
- }))
- defer server.Close()
-
- defer func(s string) {
- metadataCredentialsEndpoint = s
- }(metadataCredentialsEndpoint)
- metadataCredentialsEndpoint = server.URL
-
- defer func() {
- currentTime = time.Now
- }()
- currentTime = func() time.Time {
- return time.Date(2014, 12, 15, 21, 26, 0, 0, time.UTC)
- }
-
- prov := IAMCreds()
- creds, err := prov.Credentials()
- if err != nil {
- t.Fatal(err)
- }
-
- if v, want := creds.AccessKeyID, "accessKey"; v != want {
- t.Errorf("AcccessKeyID was %v, but expected %v", v, want)
- }
-
- if v, want := creds.SecretAccessKey, "secret"; v != want {
- t.Errorf("SecretAccessKey was %v, but expected %v", v, want)
- }
-
- if v, want := creds.SecurityToken, "token"; v != want {
- t.Errorf("SecurityToken was %v, but expected %v", v, want)
- }
-}
-
-func TestProfileCreds(t *testing.T) {
- prov, err := ProfileCreds("example.ini", "", 10*time.Minute)
- if err != nil {
- t.Fatal(err)
- }
-
- creds, err := prov.Credentials()
- if err != nil {
- t.Fatal(err)
- }
-
- if v, want := creds.AccessKeyID, "accessKey"; v != want {
- t.Errorf("AcccessKeyID was %v, but expected %v", v, want)
- }
-
- if v, want := creds.SecretAccessKey, "secret"; v != want {
- t.Errorf("SecretAccessKey was %v, but expected %v", v, want)
- }
-
- if v, want := creds.SecurityToken, "token"; v != want {
- t.Errorf("SecurityToken was %v, but expected %v", v, want)
- }
-}
-
-func TestProfileCredsWithoutToken(t *testing.T) {
- prov, err := ProfileCreds("example.ini", "no_token", 10*time.Minute)
- if err != nil {
- t.Fatal(err)
- }
-
- creds, err := prov.Credentials()
- if err != nil {
- t.Fatal(err)
- }
-
- if v, want := creds.AccessKeyID, "accessKey"; v != want {
- t.Errorf("AcccessKeyID was %v, but expected %v", v, want)
- }
-
- if v, want := creds.SecretAccessKey, "secret"; v != want {
- t.Errorf("SecretAccessKey was %v, but expected %v", v, want)
- }
-
- if v, want := creds.SecurityToken, ""; v != want {
- t.Errorf("SecurityToken was %v, but expected %v", v, want)
- }
-}
-
-func BenchmarkProfileCreds(b *testing.B) {
- prov, err := ProfileCreds("example.ini", "", 10*time.Minute)
- if err != nil {
- b.Fatal(err)
- }
-
- b.ResetTimer()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- _, err := prov.Credentials()
- if err != nil {
- b.Fatal(err)
- }
- }
- })
-}
-
-func BenchmarkIAMCreds(b *testing.B) {
- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if r.RequestURI == "/" {
- fmt.Fprintln(w, "/creds")
- } else {
- fmt.Fprintln(w, `{
- "AccessKeyId" : "accessKey",
- "SecretAccessKey" : "secret",
- "Token" : "token",
- "Expiration" : "2014-12-16T01:51:37Z"
-}`)
- }
- }))
- defer server.Close()
-
- defer func(s string) {
- metadataCredentialsEndpoint = s
- }(metadataCredentialsEndpoint)
- metadataCredentialsEndpoint = server.URL
-
- defer func() {
- currentTime = time.Now
- }()
- currentTime = func() time.Time {
- return time.Date(2014, 12, 15, 21, 26, 0, 0, time.UTC)
- }
-
- b.ResetTimer()
-
- prov := IAMCreds()
-
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- _, err := prov.Credentials()
- if err != nil {
- b.Fatal(err)
- }
- }
- })
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/doc.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/doc.go
deleted file mode 100644
index 1eaf4db25a..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/doc.go
+++ /dev/null
@@ -1,3 +0,0 @@
-// Package aws contains support code for the various AWS clients in the
-// github.com/hashicorp/aws-sdk-go/gen subpackages.
-package aws
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/ec2.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/ec2.go
deleted file mode 100644
index 9e585e14ae..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/ec2.go
+++ /dev/null
@@ -1,182 +0,0 @@
-package aws
-
-import (
- "encoding/xml"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "reflect"
- "strconv"
- "strings"
- "time"
-)
-
-// EC2Client is the underlying client for EC2 APIs.
-type EC2Client struct {
- Context Context
- Client *http.Client
- Endpoint string
- APIVersion string
-}
-
-// Do sends an HTTP request and returns an HTTP response, following policy
-// (e.g. redirects, cookies, auth) as configured on the client.
-func (c *EC2Client) Do(op, method, uri string, req, resp interface{}) error {
- body := url.Values{"Action": {op}, "Version": {c.APIVersion}}
- if err := c.loadValues(body, req, ""); err != nil {
- return err
- }
-
- httpReq, err := http.NewRequest(method, c.Endpoint+uri, strings.NewReader(body.Encode()))
- if err != nil {
- return err
- }
- httpReq.Header.Set("Content-Type", "application/x-www-form-urlencoded")
- httpReq.Header.Set("User-Agent", "aws-go")
- if err := c.Context.sign(httpReq); err != nil {
- return err
- }
-
- httpResp, err := c.Client.Do(httpReq)
- if err != nil {
- return err
- }
- defer func() {
- _ = httpResp.Body.Close()
- }()
-
- if httpResp.StatusCode != http.StatusOK {
- bodyBytes, err := ioutil.ReadAll(httpResp.Body)
- if err != nil {
- return err
- }
- if len(bodyBytes) == 0 {
- return APIError{
- StatusCode: httpResp.StatusCode,
- Message: httpResp.Status,
- }
- }
- var ec2Err ec2ErrorResponse
- if err := xml.Unmarshal(bodyBytes, &ec2Err); err != nil {
- return err
- }
- return ec2Err.Err(httpResp.StatusCode)
- }
-
- if resp != nil {
- return xml.NewDecoder(httpResp.Body).Decode(resp)
- }
- return nil
-}
-
-type ec2ErrorResponse struct {
- XMLName xml.Name `xml:"Response"`
- Type string `xml:"Errors>Error>Type"`
- Code string `xml:"Errors>Error>Code"`
- Message string `xml:"Errors>Error>Message"`
- RequestID string `xml:"RequestID"`
-}
-
-func (e ec2ErrorResponse) Err(StatusCode int) error {
- return APIError{
- StatusCode: StatusCode,
- Type: e.Type,
- Code: e.Code,
- Message: e.Message,
- RequestID: e.RequestID,
- }
-}
-
-func (c *EC2Client) loadValues(v url.Values, i interface{}, prefix string) error {
- value := reflect.ValueOf(i)
-
- // follow any pointers
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- if value.Kind() == reflect.Invalid {
- return nil
- }
- if casted, ok := value.Interface().([]byte); ok && prefix != "" {
- v.Set(prefix, string(casted))
- return nil
- }
- if value.Kind() == reflect.Slice {
- for i := 0; i < value.Len(); i++ {
- vPrefix := prefix
- if vPrefix == "" {
- vPrefix = strconv.Itoa(i + 1)
- } else {
- vPrefix = vPrefix + "." + strconv.Itoa(i+1)
- }
- if err := c.loadValues(v, value.Index(i).Interface(), vPrefix); err != nil {
- return err
- }
- }
- return nil
- }
-
- return c.loadStruct(v, value, prefix)
-}
-
-func (c *EC2Client) loadStruct(v url.Values, value reflect.Value, prefix string) error {
- if !value.IsValid() {
- return nil
- }
-
- t := value.Type()
- for i := 0; i < value.NumField(); i++ {
- value := value.Field(i)
- name := t.Field(i).Tag.Get("ec2")
-
- if name == "" {
- name = t.Field(i).Name
- }
- if prefix != "" {
- name = prefix + "." + name
- }
- switch casted := value.Interface().(type) {
- case StringValue:
- if casted != nil {
- v.Set(name, *casted)
- }
- case BooleanValue:
- if casted != nil {
- v.Set(name, strconv.FormatBool(*casted))
- }
- case LongValue:
- if casted != nil {
- v.Set(name, strconv.FormatInt(*casted, 10))
- }
- case IntegerValue:
- if casted != nil {
- v.Set(name, strconv.Itoa(*casted))
- }
- case DoubleValue:
- if casted != nil {
- v.Set(name, strconv.FormatFloat(*casted, 'f', -1, 64))
- }
- case FloatValue:
- if casted != nil {
- v.Set(name, strconv.FormatFloat(float64(*casted), 'f', -1, 32))
- }
- case []string:
- if len(casted) != 0 {
- for i, val := range casted {
- v.Set(fmt.Sprintf("%s.%d", name, i+1), val)
- }
- }
- case time.Time:
- if !casted.IsZero() {
- const ISO8601UTC = "2006-01-02T15:04:05Z"
- v.Set(name, casted.UTC().Format(ISO8601UTC))
- }
- default:
- if err := c.loadValues(v, value.Interface(), name); err != nil {
- return err
- }
- }
- }
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/ec2_test.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/ec2_test.go
deleted file mode 100644
index 77adeb3616..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/ec2_test.go
+++ /dev/null
@@ -1,227 +0,0 @@
-package aws_test
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "net/url"
- "reflect"
- "sync"
- "testing"
- "time"
-
- "github.com/hashicorp/aws-sdk-go/aws"
-)
-
-func TestEC2Request(t *testing.T) {
- var m sync.Mutex
- var httpReq *http.Request
- var form url.Values
-
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- m.Lock()
- defer m.Unlock()
-
- httpReq = r
-
- if err := r.ParseForm(); err != nil {
- t.Fatal(err)
- }
- form = r.Form
-
- fmt.Fprintln(w, `woo`)
- },
- ))
- defer server.Close()
-
- client := aws.EC2Client{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- Endpoint: server.URL,
- APIVersion: "1.1",
- }
-
- req := fakeEC2Request{
- PresentString: aws.String("string"),
- PresentBoolean: aws.True(),
- PresentInteger: aws.Integer(1),
- PresentLong: aws.Long(2),
- PresentDouble: aws.Double(1.2),
- PresentFloat: aws.Float(2.3),
- PresentTime: time.Date(2001, 1, 1, 2, 1, 1, 0, time.FixedZone("UTC+1", 3600)),
- PresentSlice: []string{"one", "two"},
- PresentStruct: &EmbeddedStruct{Value: aws.String("v")},
- PresentStructSlice: []EmbeddedStruct{
- {Value: aws.String("p")},
- {Value: aws.String("q")},
- },
- }
- var resp fakeEC2Response
- if err := client.Do("GetIP", "POST", "/", &req, &resp); err != nil {
- t.Fatal(err)
- }
-
- m.Lock()
- defer m.Unlock()
-
- if v, want := httpReq.Method, "POST"; v != want {
- t.Errorf("Method was %v but expected %v", v, want)
- }
-
- if httpReq.Header.Get("Authorization") == "" {
- t.Error("Authorization header is missing")
- }
-
- if v, want := httpReq.Header.Get("Content-Type"), "application/x-www-form-urlencoded"; v != want {
- t.Errorf("Content-Type was %v but expected %v", v, want)
- }
-
- if v, want := httpReq.Header.Get("User-Agent"), "aws-go"; v != want {
- t.Errorf("User-Agent was %v but expected %v", v, want)
- }
-
- if err := httpReq.ParseForm(); err != nil {
- t.Fatal(err)
- }
-
- expectedForm := url.Values{
- "Action": []string{"GetIP"},
- "Version": []string{"1.1"},
- "PresentString": []string{"string"},
- "PresentBoolean": []string{"true"},
- "PresentInteger": []string{"1"},
- "PresentLong": []string{"2"},
- "PresentDouble": []string{"1.2"},
- "PresentFloat": []string{"2.3"},
- "PresentTime": []string{"2001-01-01T01:01:01Z"},
- "PresentSlice.1": []string{"one"},
- "PresentSlice.2": []string{"two"},
- "PresentStruct.Value": []string{"v"},
- "PresentStructSlice.1.Value": []string{"p"},
- "PresentStructSlice.2.Value": []string{"q"},
- }
-
- if !reflect.DeepEqual(form, expectedForm) {
- t.Errorf("Post body was \n%s\n but expected \n%s", form.Encode(), expectedForm.Encode())
- }
-
- if want := (fakeEC2Response{IPAddress: "woo"}); want != resp {
- t.Errorf("Response was %#v, but expected %#v", resp, want)
- }
-}
-
-func TestEC2RequestError(t *testing.T) {
- var m sync.Mutex
- var httpReq *http.Request
- var form url.Values
-
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- m.Lock()
- defer m.Unlock()
-
- httpReq = r
-
- if err := r.ParseForm(); err != nil {
- t.Fatal(err)
- }
- form = r.Form
-
- w.WriteHeader(400)
- fmt.Fprintln(w, `
-woo
-
-
-Problem
-Uh Oh
-You done did it
-
-
-`)
- },
- ))
- defer server.Close()
-
- client := aws.EC2Client{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- Endpoint: server.URL,
- APIVersion: "1.1",
- }
-
- req := fakeEC2Request{}
- var resp fakeEC2Response
- err := client.Do("GetIP", "POST", "/", &req, &resp)
- if err == nil {
- t.Fatal("Expected an error but none was returned")
- }
-
- if err, ok := err.(aws.APIError); ok {
- if v, want := err.Type, "Problem"; v != want {
- t.Errorf("Error type was %v, but expected %v", v, want)
- }
-
- if v, want := err.Code, "Uh Oh"; v != want {
- t.Errorf("Error type was %v, but expected %v", v, want)
- }
-
- if v, want := err.Message, "You done did it"; v != want {
- t.Errorf("Error message was %v, but expected %v", v, want)
- }
- } else {
- t.Errorf("Unknown error returned: %#v", err)
- }
-}
-
-type fakeEC2Request struct {
- PresentString aws.StringValue `ec2:"PresentString"`
- MissingString aws.StringValue `ec2:"MissingString"`
-
- PresentInteger aws.IntegerValue `ec2:"PresentInteger"`
- MissingInteger aws.IntegerValue `ec2:"MissingInteger"`
-
- PresentLong aws.LongValue `ec2:"PresentLong"`
- MissingLong aws.LongValue `ec2:"MissingLong"`
-
- PresentDouble aws.DoubleValue `ec2:"PresentDouble"`
- MissingDouble aws.DoubleValue `ec2:"MissingDouble"`
-
- PresentFloat aws.FloatValue `ec2:"PresentFloat"`
- MissingFloat aws.FloatValue `ec2:"MissingFloat"`
-
- PresentTime time.Time `ec2:"PresentTime"`
- MissingTime time.Time `ec2:"MissingTime"`
-
- PresentBoolean aws.BooleanValue `ec2:"PresentBoolean"`
- MissingBoolean aws.BooleanValue `ec2:"MissingBoolean"`
-
- PresentSlice []string `ec2:"PresentSlice"`
- MissingSlice []string `ec2:"MissingSlice"`
-
- PresentStructSlice []EmbeddedStruct `ec2:"PresentStructSlice"`
- MissingStructSlice []EmbeddedStruct `ec2:"MissingStructSlice"`
-
- PresentStruct *EmbeddedStruct `ec2:"PresentStruct"`
- MissingStruct *EmbeddedStruct `ec2:"MissingStruct"`
-}
-
-type fakeEC2Response struct {
- IPAddress string `xml:"IpAddress"`
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/error.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/error.go
deleted file mode 100644
index 90fa387d3c..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/error.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package aws
-
-// An APIError is an error returned by an AWS API.
-type APIError struct {
- StatusCode int // HTTP status code e.g. 200
- Type string
- Code string
- Message string
- RequestID string
- HostID string
- Specifics map[string]string
-}
-
-func (e APIError) Error() string {
- return e.Message
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/example.ini b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/example.ini
deleted file mode 100644
index aa2dc506ad..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/example.ini
+++ /dev/null
@@ -1,8 +0,0 @@
-[default]
-aws_access_key_id = accessKey
-aws_secret_access_key = secret
-aws_session_token = token
-
-[no_token]
-aws_access_key_id = accessKey
-aws_secret_access_key = secret
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/json.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/json.go
deleted file mode 100644
index f49f193de4..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/json.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package aws
-
-import (
- "bytes"
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-// JSONClient is the underlying client for JSON APIs.
-type JSONClient struct {
- Context Context
- Client *http.Client
- Endpoint string
- TargetPrefix string
- JSONVersion string
-}
-
-// Do sends an HTTP request and returns an HTTP response, following policy
-// (e.g. redirects, cookies, auth) as configured on the client.
-func (c *JSONClient) Do(op, method, uri string, req, resp interface{}) error {
- b, err := json.Marshal(req)
- if err != nil {
- return err
- }
-
- httpReq, err := http.NewRequest(method, c.Endpoint+uri, bytes.NewReader(b))
- if err != nil {
- return err
- }
- httpReq.Header.Set("User-Agent", "aws-go")
- httpReq.Header.Set("X-Amz-Target", c.TargetPrefix+"."+op)
- httpReq.Header.Set("Content-Type", "application/x-amz-json-"+c.JSONVersion)
- if err := c.Context.sign(httpReq); err != nil {
- return err
- }
-
- httpResp, err := c.Client.Do(httpReq)
- if err != nil {
- return err
- }
- defer func() {
- _ = httpResp.Body.Close()
- }()
-
- if httpResp.StatusCode != http.StatusOK {
- bodyBytes, err := ioutil.ReadAll(httpResp.Body)
- if err != nil {
- return err
- }
- if len(bodyBytes) == 0 {
- return APIError{
- StatusCode: httpResp.StatusCode,
- Message: httpResp.Status,
- }
- }
- var jsonErr jsonErrorResponse
- if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil {
- return err
- }
- return jsonErr.Err(httpResp.StatusCode)
- }
-
- if resp != nil {
- return json.NewDecoder(httpResp.Body).Decode(resp)
- }
- return nil
-}
-
-type jsonErrorResponse struct {
- Type string `json:"__type"`
- Message string `json:"message"`
-}
-
-func (e jsonErrorResponse) Err(StatusCode int) error {
- return APIError{
- StatusCode: StatusCode,
- Type: e.Type,
- Message: e.Message,
- }
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/json_test.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/json_test.go
deleted file mode 100644
index 7c85d63558..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/json_test.go
+++ /dev/null
@@ -1,143 +0,0 @@
-package aws_test
-
-import (
- "fmt"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "sync"
- "testing"
-
- "github.com/hashicorp/aws-sdk-go/aws"
-)
-
-func TestJSONRequest(t *testing.T) {
- var m sync.Mutex
- var httpReq *http.Request
- var body []byte
-
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- m.Lock()
- defer m.Unlock()
-
- b, err := ioutil.ReadAll(r.Body)
- if err != nil {
- t.Fatal(err)
- }
- defer r.Body.Close()
-
- httpReq = r
- body = b
-
- fmt.Fprintln(w, `{"TailWagged":true}`)
- },
- ))
- defer server.Close()
-
- client := aws.JSONClient{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- Endpoint: server.URL,
- TargetPrefix: "Animals",
- JSONVersion: "1.1",
- }
-
- req := fakeJSONRequest{Name: "Penny"}
- var resp fakeJSONResponse
- if err := client.Do("PetTheDog", "POST", "/", req, &resp); err != nil {
- t.Fatal(err)
- }
-
- m.Lock()
- defer m.Unlock()
-
- if v, want := httpReq.Method, "POST"; v != want {
- t.Errorf("Method was %v but expected %v", v, want)
- }
-
- if httpReq.Header.Get("Authorization") == "" {
- t.Error("Authorization header is missing")
- }
-
- if v, want := httpReq.Header.Get("Content-Type"), "application/x-amz-json-1.1"; v != want {
- t.Errorf("Content-Type was %v but expected %v", v, want)
- }
-
- if v, want := httpReq.Header.Get("User-Agent"), "aws-go"; v != want {
- t.Errorf("User-Agent was %v but expected %v", v, want)
- }
-
- if v, want := httpReq.Header.Get("X-Amz-Target"), "Animals.PetTheDog"; v != want {
- t.Errorf("X-Amz-Target was %v but expected %v", v, want)
- }
-
- if v, want := string(body), `{"Name":"Penny"}`; v != want {
- t.Errorf("Body was %v but expected %v", v, want)
- }
-
- if v, want := resp, (fakeJSONResponse{TailWagged: true}); v != want {
- t.Errorf("Response was %#v but expected %#v", v, want)
- }
-}
-
-func TestJSONRequestError(t *testing.T) {
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(400)
- fmt.Fprintln(w, `{"__type":"Problem", "message":"What even"}`)
- },
- ))
- defer server.Close()
-
- client := aws.JSONClient{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- Endpoint: server.URL,
- TargetPrefix: "Animals",
- JSONVersion: "1.1",
- }
-
- req := fakeJSONRequest{Name: "Penny"}
- var resp fakeJSONResponse
- err := client.Do("PetTheDog", "POST", "/", req, &resp)
- if err == nil {
- t.Fatal("Expected an error but none was returned")
- }
-
- if err, ok := err.(aws.APIError); ok {
- if v, want := err.Type, "Problem"; v != want {
- t.Errorf("Error type was %v, but expected %v", v, want)
- }
-
- if v, want := err.Message, "What even"; v != want {
- t.Errorf("Error message was %v, but expected %v", v, want)
- }
- } else {
- t.Errorf("Unknown error returned: %#v", err)
- }
-}
-
-type fakeJSONRequest struct {
- Name string
-}
-
-type fakeJSONResponse struct {
- TailWagged bool
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/query.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/query.go
deleted file mode 100644
index f89f40f8dc..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/query.go
+++ /dev/null
@@ -1,234 +0,0 @@
-package aws
-
-import (
- "encoding/xml"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-)
-
-// QueryClient is the underlying client for Query APIs.
-type QueryClient struct {
- Context Context
- Client *http.Client
- Endpoint string
- APIVersion string
-}
-
-// Do sends an HTTP request and returns an HTTP response, following policy
-// (e.g. redirects, cookies, auth) as configured on the client.
-func (c *QueryClient) Do(op, method, uri string, req, resp interface{}) error {
- body := url.Values{"Action": {op}, "Version": {c.APIVersion}}
- if err := c.loadValues(body, req, ""); err != nil {
- return err
- }
-
- httpReq, err := http.NewRequest(method, c.Endpoint+uri, strings.NewReader(body.Encode()))
- if err != nil {
- return err
- }
- httpReq.Header.Set("Content-Type", "application/x-www-form-urlencoded")
- httpReq.Header.Set("User-Agent", "aws-go")
- if err := c.Context.sign(httpReq); err != nil {
- return err
- }
-
- httpResp, err := c.Client.Do(httpReq)
- if err != nil {
- return err
- }
- defer func() {
- _ = httpResp.Body.Close()
- }()
-
- if httpResp.StatusCode != http.StatusOK {
- bodyBytes, err := ioutil.ReadAll(httpResp.Body)
- if err != nil {
- return err
- }
- if len(bodyBytes) == 0 {
- return APIError{
- StatusCode: httpResp.StatusCode,
- Message: httpResp.Status,
- }
- }
- var queryErr queryErrorResponse
- if err := xml.Unmarshal(bodyBytes, &queryErr); err != nil {
- return err
- }
- return queryErr.Err(httpResp.StatusCode)
- }
-
- if resp != nil {
- return xml.NewDecoder(httpResp.Body).Decode(resp)
- }
- return nil
-}
-
-type queryErrorResponse struct {
- XMLName xml.Name `xml:"ErrorResponse"`
- Type string `xml:"Error>Type"`
- Code string `xml:"Error>Code"`
- Message string `xml:"Error>Message"`
- RequestID string `xml:"RequestId"`
-}
-
-func (e queryErrorResponse) Err(StatusCode int) error {
- return APIError{
- StatusCode: StatusCode,
- Type: e.Type,
- Code: e.Code,
- Message: e.Message,
- RequestID: e.RequestID,
- }
-}
-
-func (c *QueryClient) loadValues(v url.Values, i interface{}, prefix string) error {
- value := reflect.ValueOf(i)
-
- // follow any pointers
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
-
- // no need to handle zero values
- if !value.IsValid() {
- return nil
- }
-
- switch value.Kind() {
- case reflect.Struct:
- return c.loadStruct(v, value, prefix)
- case reflect.Slice:
- for i := 0; i < value.Len(); i++ {
- slicePrefix := prefix
- if slicePrefix == "" {
- slicePrefix = strconv.Itoa(i + 1)
- } else {
- slicePrefix = slicePrefix + "." + strconv.Itoa(i+1)
- }
- if err := c.loadValues(v, value.Index(i).Interface(), slicePrefix); err != nil {
- return err
- }
- }
- return nil
- case reflect.Map:
- sortedKeys := []string{}
- keysByString := map[string]reflect.Value{}
- for _, k := range value.MapKeys() {
- s := fmt.Sprintf("%v", k.Interface())
- sortedKeys = append(sortedKeys, s)
- keysByString[s] = k
- }
- sort.Strings(sortedKeys)
-
- for i, sortKey := range sortedKeys {
- mapKey := keysByString[sortKey]
-
- var keyName string
- if prefix == "" {
- keyName = strconv.Itoa(i+1) + ".Name"
- } else {
- keyName = prefix + "." + strconv.Itoa(i+1) + ".Name"
- }
-
- if err := c.loadValue(v, mapKey, keyName); err != nil {
- return err
- }
-
- mapValue := value.MapIndex(mapKey)
-
- var valueName string
- if prefix == "" {
- valueName = strconv.Itoa(i+1) + ".Value"
- } else {
- valueName = prefix + "." + strconv.Itoa(i+1) + ".Value"
- }
-
- if err := c.loadValue(v, mapValue, valueName); err != nil {
- return err
- }
- }
-
- return nil
- default:
- panic("unknown request member type: " + value.String())
- }
-}
-
-func (c *QueryClient) loadStruct(v url.Values, value reflect.Value, prefix string) error {
- if !value.IsValid() {
- return nil
- }
-
- t := value.Type()
- for i := 0; i < value.NumField(); i++ {
- value := value.Field(i)
- name := t.Field(i).Tag.Get("query")
- if name == "" {
- name = t.Field(i).Name
- }
- if prefix != "" {
- name = prefix + "." + name
- }
- if err := c.loadValue(v, value, name); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (c *QueryClient) loadValue(v url.Values, value reflect.Value, name string) error {
- switch casted := value.Interface().(type) {
- case string:
- if casted != "" {
- v.Set(name, casted)
- }
- case StringValue:
- if casted != nil {
- v.Set(name, *casted)
- }
- case BooleanValue:
- if casted != nil {
- v.Set(name, strconv.FormatBool(*casted))
- }
- case LongValue:
- if casted != nil {
- v.Set(name, strconv.FormatInt(*casted, 10))
- }
- case IntegerValue:
- if casted != nil {
- v.Set(name, strconv.Itoa(*casted))
- }
- case DoubleValue:
- if casted != nil {
- v.Set(name, strconv.FormatFloat(*casted, 'f', -1, 64))
- }
- case FloatValue:
- if casted != nil {
- v.Set(name, strconv.FormatFloat(float64(*casted), 'f', -1, 32))
- }
- case time.Time:
- if !casted.IsZero() {
- const ISO8601UTC = "2006-01-02T15:04:05Z"
- v.Set(name, casted.UTC().Format(ISO8601UTC))
- }
- case []string:
- if len(casted) != 0 {
- for i, val := range casted {
- v.Set(fmt.Sprintf("%s.%d", name, i+1), val)
- }
- }
- default:
- if err := c.loadValues(v, value.Interface(), name); err != nil {
- return err
- }
- }
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/query_test.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/query_test.go
deleted file mode 100644
index dbf3ea1cc0..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/query_test.go
+++ /dev/null
@@ -1,240 +0,0 @@
-package aws_test
-
-import (
- "fmt"
- "net/http"
- "net/http/httptest"
- "net/url"
- "reflect"
- "sync"
- "testing"
- "time"
-
- "github.com/hashicorp/aws-sdk-go/aws"
-)
-
-func TestQueryRequest(t *testing.T) {
- var m sync.Mutex
- var httpReq *http.Request
- var form url.Values
-
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- m.Lock()
- defer m.Unlock()
-
- httpReq = r
-
- if err := r.ParseForm(); err != nil {
- t.Fatal(err)
- }
- form = r.Form
-
- fmt.Fprintln(w, `woo`)
- },
- ))
- defer server.Close()
-
- client := aws.QueryClient{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- Endpoint: server.URL,
- APIVersion: "1.1",
- }
-
- req := fakeQueryRequest{
- PresentString: aws.String("string"),
- PresentBoolean: aws.True(),
- PresentInteger: aws.Integer(1),
- PresentLong: aws.Long(2),
- PresentDouble: aws.Double(1.2),
- PresentFloat: aws.Float(2.3),
- PresentTime: time.Date(2001, 1, 1, 2, 1, 1, 0, time.FixedZone("UTC+1", 3600)),
- PresentSlice: []string{"one", "two"},
- PresentStruct: &EmbeddedStruct{Value: aws.String("v")},
- PresentStructSlice: []EmbeddedStruct{
- {Value: aws.String("p")},
- {Value: aws.String("q")},
- },
- PresentMap: map[string]EmbeddedStruct{
- "aa": EmbeddedStruct{Value: aws.String("AA")},
- "bb": EmbeddedStruct{Value: aws.String("BB")},
- },
- }
- var resp fakeQueryResponse
- if err := client.Do("GetIP", "POST", "/", &req, &resp); err != nil {
- t.Fatal(err)
- }
-
- m.Lock()
- defer m.Unlock()
-
- if v, want := httpReq.Method, "POST"; v != want {
- t.Errorf("Method was %v but expected %v", v, want)
- }
-
- if httpReq.Header.Get("Authorization") == "" {
- t.Error("Authorization header is missing")
- }
-
- if v, want := httpReq.Header.Get("Content-Type"), "application/x-www-form-urlencoded"; v != want {
- t.Errorf("Content-Type was %v but expected %v", v, want)
- }
-
- if v, want := httpReq.Header.Get("User-Agent"), "aws-go"; v != want {
- t.Errorf("User-Agent was %v but expected %v", v, want)
- }
-
- if err := httpReq.ParseForm(); err != nil {
- t.Fatal(err)
- }
-
- expectedForm := url.Values{
- "Action": []string{"GetIP"},
- "Version": []string{"1.1"},
- "PresentString": []string{"string"},
- "PresentBoolean": []string{"true"},
- "PresentInteger": []string{"1"},
- "PresentLong": []string{"2"},
- "PresentDouble": []string{"1.2"},
- "PresentFloat": []string{"2.3"},
- "PresentTime": []string{"2001-01-01T01:01:01Z"},
- "PresentSlice.1": []string{"one"},
- "PresentSlice.2": []string{"two"},
- "PresentStruct.Value": []string{"v"},
- "PresentStructSlice.1.Value": []string{"p"},
- "PresentStructSlice.2.Value": []string{"q"},
- "PresentMap.1.Name": []string{"aa"},
- "PresentMap.1.Value.Value": []string{"AA"},
- "PresentMap.2.Name": []string{"bb"},
- "PresentMap.2.Value.Value": []string{"BB"},
- }
-
- if !reflect.DeepEqual(form, expectedForm) {
- t.Errorf("Post body was \n%s\n but expected \n%s", form.Encode(), expectedForm.Encode())
- }
-
- if want := (fakeQueryResponse{IPAddress: "woo"}); want != resp {
- t.Errorf("Response was %#v, but expected %#v", resp, want)
- }
-}
-
-func TestQueryRequestError(t *testing.T) {
- var m sync.Mutex
- var httpReq *http.Request
- var form url.Values
-
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- m.Lock()
- defer m.Unlock()
-
- httpReq = r
-
- if err := r.ParseForm(); err != nil {
- t.Fatal(err)
- }
- form = r.Form
-
- w.WriteHeader(400)
- fmt.Fprintln(w, `
-woo
-
-Problem
-Uh Oh
-You done did it
-
-`)
- },
- ))
- defer server.Close()
-
- client := aws.QueryClient{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- Endpoint: server.URL,
- APIVersion: "1.1",
- }
-
- req := fakeQueryRequest{}
- var resp fakeQueryResponse
- err := client.Do("GetIP", "POST", "/", &req, &resp)
- if err == nil {
- t.Fatal("Expected an error but none was returned")
- }
-
- if err, ok := err.(aws.APIError); ok {
- if v, want := err.Type, "Problem"; v != want {
- t.Errorf("Error type was %v, but expected %v", v, want)
- }
-
- if v, want := err.Code, "Uh Oh"; v != want {
- t.Errorf("Error type was %v, but expected %v", v, want)
- }
-
- if v, want := err.Message, "You done did it"; v != want {
- t.Errorf("Error message was %v, but expected %v", v, want)
- }
- } else {
- t.Errorf("Unknown error returned: %#v", err)
- }
-}
-
-type fakeQueryRequest struct {
- PresentString aws.StringValue `query:"PresentString"`
- MissingString aws.StringValue `query:"MissingString"`
-
- PresentInteger aws.IntegerValue `query:"PresentInteger"`
- MissingInteger aws.IntegerValue `query:"MissingInteger"`
-
- PresentLong aws.LongValue `query:"PresentLong"`
- MissingLong aws.LongValue `query:"MissingLong"`
-
- PresentDouble aws.DoubleValue `query:"PresentDouble"`
- MissingDouble aws.DoubleValue `query:"MissingDouble"`
-
- PresentFloat aws.FloatValue `query:"PresentFloat"`
- MissingFloat aws.FloatValue `query:"MissingFloat"`
-
- PresentBoolean aws.BooleanValue `query:"PresentBoolean"`
- MissingBoolean aws.BooleanValue `query:"MissingBoolean"`
-
- PresentTime time.Time `query:"PresentTime"`
- MissingTime time.Time `query:"MissingTime"`
-
- PresentSlice []string `query:"PresentSlice"`
- MissingSlice []string `query:"MissingSlice"`
-
- PresentStructSlice []EmbeddedStruct `query:"PresentStructSlice"`
- MissingStructSlice []EmbeddedStruct `query:"MissingStructSlice"`
-
- PresentMap map[string]EmbeddedStruct `query:"PresentMap"`
- MissingMap map[string]EmbeddedStruct `query:"MissingMap"`
-
- PresentStruct *EmbeddedStruct `query:"PresentStruct"`
- MissingStruct *EmbeddedStruct `query:"MissingStruct"`
-}
-
-type EmbeddedStruct struct {
- Value aws.StringValue
-}
-
-type fakeQueryResponse struct {
- IPAddress string `xml:"IpAddress"`
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/rest.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/rest.go
deleted file mode 100644
index 1252223cf2..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/rest.go
+++ /dev/null
@@ -1,136 +0,0 @@
-package aws
-
-import (
- "bytes"
- "encoding/json"
- "encoding/xml"
- "io/ioutil"
- "net/http"
- "strconv"
- "strings"
-)
-
-// RestClient is the underlying client for REST-JSON and REST-XML APIs.
-type RestClient struct {
- Context Context
- Client *http.Client
- Endpoint string
- APIVersion string
-}
-
-// Whether the byte value can be sent without escaping in AWS URLs
-var noEscape [256]bool
-
-// Initialise noEscape
-func init() {
- for i := range noEscape {
- // Amazon expects every character except these escaped
- noEscape[i] = (i >= 'A' && i <= 'Z') ||
- (i >= 'a' && i <= 'z') ||
- (i >= '0' && i <= '9') ||
- i == '-' ||
- i == '.' ||
- i == '/' ||
- i == ':' ||
- i == '_' ||
- i == '~'
- }
-}
-
-// EscapePath escapes part of a URL path in Amazon style
-func EscapePath(path string) string {
- var buf bytes.Buffer
- for i := 0; i < len(path); i++ {
- c := path[i]
- if noEscape[c] {
- buf.WriteByte(c)
- } else {
- buf.WriteByte('%')
- buf.WriteString(strings.ToUpper(strconv.FormatUint(uint64(c), 16)))
- }
- }
- return buf.String()
-}
-
-// Do sends an HTTP request and returns an HTTP response, following policy
-// (e.g. redirects, cookies, auth) as configured on the client.
-func (c *RestClient) Do(req *http.Request) (*http.Response, error) {
- // Set the form for the URL
- req.URL.Opaque = EscapePath(req.URL.Path)
- req.Header.Set("User-Agent", "aws-go")
- if err := c.Context.sign(req); err != nil {
- return nil, err
- }
-
- resp, err := c.Client.Do(req)
- if err != nil {
- return nil, err
- }
-
- if resp.StatusCode >= 400 {
- bodyBytes, err := ioutil.ReadAll(resp.Body)
- defer resp.Body.Close()
- if err != nil {
- return nil, err
- }
- if len(bodyBytes) == 0 {
- return nil, APIError{
- StatusCode: resp.StatusCode,
- Message: resp.Status,
- }
- }
- var restErr restError
- switch resp.Header.Get("Content-Type") {
- case "application/json":
- if err := json.Unmarshal(bodyBytes, &restErr); err != nil {
- return nil, err
- }
- return nil, restErr.Err(resp.StatusCode)
- case "application/xml", "text/xml":
- // AWS XML error documents can have a couple of different formats.
- // Try each before returning a decode error.
- var wrappedErr restErrorResponse
- if err := xml.Unmarshal(bodyBytes, &wrappedErr); err == nil {
- return nil, wrappedErr.Error.Err(resp.StatusCode)
- }
- if err := xml.Unmarshal(bodyBytes, &restErr); err != nil {
- return nil, err
- }
- return nil, restErr.Err(resp.StatusCode)
- default:
- return nil, APIError{
- StatusCode: resp.StatusCode,
- Message: string(bodyBytes),
- }
- }
- }
-
- return resp, nil
-}
-
-type restErrorResponse struct {
- XMLName xml.Name `xml:"ErrorResponse",json:"-"`
- Error restError
-}
-
-type restError struct {
- XMLName xml.Name `xml:"Error",json:"-"`
- Code string
- BucketName string
- Message string
- RequestID string
- HostID string
-}
-
-func (e restError) Err(StatusCode int) error {
- return APIError{
- StatusCode: StatusCode,
- Code: e.Code,
- Message: e.Message,
- RequestID: e.RequestID,
- HostID: e.HostID,
- Specifics: map[string]string{
- "BucketName": e.BucketName,
- },
- }
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/rest_test.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/rest_test.go
deleted file mode 100644
index 26cbb60e9b..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/rest_test.go
+++ /dev/null
@@ -1,215 +0,0 @@
-package aws_test
-
-import (
- "fmt"
- "io/ioutil"
- "net/http"
- "net/http/httptest"
- "sync"
- "testing"
-
- "github.com/hashicorp/aws-sdk-go/aws"
-)
-
-func TestRestRequest(t *testing.T) {
- var m sync.Mutex
- var httpReq *http.Request
-
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- m.Lock()
- defer m.Unlock()
-
- httpReq = r
-
- fmt.Fprintln(w, `woo`)
- },
- ))
- defer server.Close()
-
- client := aws.RestClient{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- }
-
- req, err := http.NewRequest("GET", server.URL+"/yay", nil)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := client.Do(req)
- if err != nil {
- t.Fatal(err)
- }
- defer resp.Body.Close()
-
- body, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- t.Fatal(err)
- }
-
- if v, want := string(body), "woo\n"; v != want {
- t.Errorf("Response entity was %q, but expected %q", v, want)
- }
-
- m.Lock()
- defer m.Unlock()
-
- if v, want := httpReq.Method, "GET"; v != want {
- t.Errorf("Method was %v but expected %v", v, want)
- }
-
- if httpReq.Header.Get("Authorization") == "" {
- t.Error("Authorization header is missing")
- }
-
- if v, want := httpReq.Header.Get("User-Agent"), "aws-go"; v != want {
- t.Errorf("User-Agent was %v but expected %v", v, want)
- }
-
- if v, want := httpReq.URL.String(), "/yay"; v != want {
- t.Errorf("URL was %v but expected %v", v, want)
- }
-}
-
-func TestRestRequestXMLError(t *testing.T) {
- var m sync.Mutex
- var httpReq *http.Request
-
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- m.Lock()
- defer m.Unlock()
-
- httpReq = r
-
- w.Header().Set("Content-Type", "application/xml")
- w.WriteHeader(500)
- fmt.Fprintln(w, `
-bonus
-bingo
-the bad thing
-woo woo
-woo woo
-`)
- },
- ))
- defer server.Close()
-
- client := aws.RestClient{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- }
-
- req, err := http.NewRequest("GET", server.URL+"/yay", nil)
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Do(req)
- if err == nil {
- t.Fatal("Expected an error but none was returned")
- }
-
- if err, ok := err.(aws.APIError); ok {
- if v, want := err.Code, "bonus"; v != want {
- t.Errorf("Error code was %v, but expected %v", v, want)
- }
-
- if v, want := err.Message, "the bad thing"; v != want {
- t.Errorf("Error message was %v, but expected %v", v, want)
- }
- } else {
- t.Errorf("Unknown error returned: %#v", err)
- }
-}
-
-func TestRestRequestJSONError(t *testing.T) {
- var m sync.Mutex
- var httpReq *http.Request
-
- server := httptest.NewServer(http.HandlerFunc(
- func(w http.ResponseWriter, r *http.Request) {
- m.Lock()
- defer m.Unlock()
-
- httpReq = r
-
- w.Header().Set("Content-Type", "application/json")
- w.WriteHeader(500)
- fmt.Fprintln(w, `{"Code":"bonus", "Message":"the bad thing"}`)
- },
- ))
- defer server.Close()
-
- client := aws.RestClient{
- Context: aws.Context{
- Service: "animals",
- Region: "us-west-2",
- Credentials: aws.Creds(
- "accessKeyID",
- "secretAccessKey",
- "securityToken",
- ),
- },
- Client: http.DefaultClient,
- }
-
- req, err := http.NewRequest("GET", server.URL+"/yay", nil)
- if err != nil {
- t.Fatal(err)
- }
-
- _, err = client.Do(req)
- if err == nil {
- t.Fatal("Expected an error but none was returned")
- }
-
- if err, ok := err.(aws.APIError); ok {
- if v, want := err.Code, "bonus"; v != want {
- t.Errorf("Error code was %v, but expected %v", v, want)
- }
-
- if v, want := err.Message, "the bad thing"; v != want {
- t.Errorf("Error message was %v, but expected %v", v, want)
- }
- } else {
- t.Errorf("Unknown error returned: %#v", err)
- }
-}
-
-func TestEscapePath(t *testing.T) {
- for _, x := range []struct {
- in string
- want string
- }{
- {"", ""},
- {"ABCDEFGHIJKLMNOPQRTSUVWXYZ", "ABCDEFGHIJKLMNOPQRTSUVWXYZ"},
- {"abcdefghijklmnopqrtsuvwxyz", "abcdefghijklmnopqrtsuvwxyz"},
- {"0123456789", "0123456789"},
- {"_-~./:", "_-~./:"},
- {"test? file", "test%3F%20file"},
- {`hello? sausage/êé/Hello, 世界/ " ' @ < > & ?/z.txt`, "hello%3F%20sausage/%C3%AA%C3%A9/Hello%2C%20%E4%B8%96%E7%95%8C/%20%22%20%27%20%40%20%3C%20%3E%20%26%20%3F/z.txt"},
- } {
- got := aws.EscapePath(x.in)
- if got != x.want {
- t.Errorf("EscapePath(%q) got %q, want %v", x.in, got, x.want)
- }
- }
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/types.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/types.go
deleted file mode 100644
index b58096f85b..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/types.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package aws
-
-import (
- "math"
- "strconv"
- "time"
-)
-
-// A StringValue is a string which may or may not be present.
-type StringValue *string
-
-// String converts a Go string into a StringValue.
-func String(v string) StringValue {
- return &v
-}
-
-// A BooleanValue is a boolean which may or may not be present.
-type BooleanValue *bool
-
-// Boolean converts a Go bool into a BooleanValue.
-func Boolean(v bool) BooleanValue {
- return &v
-}
-
-// True is the BooleanValue equivalent of the Go literal true.
-func True() BooleanValue {
- return Boolean(true)
-}
-
-// False is the BooleanValue equivalent of the Go literal false.
-func False() BooleanValue {
- return Boolean(false)
-}
-
-// An IntegerValue is an integer which may or may not be present.
-type IntegerValue *int
-
-// Integer converts a Go int into an IntegerValue.
-func Integer(v int) IntegerValue {
- return &v
-}
-
-// A LongValue is a 64-bit integer which may or may not be present.
-type LongValue *int64
-
-// Long converts a Go int64 into a LongValue.
-func Long(v int64) LongValue {
- return &v
-}
-
-// A FloatValue is a 32-bit floating point number which may or may not be
-// present.
-type FloatValue *float32
-
-// Float converts a Go float32 into a FloatValue.
-func Float(v float32) FloatValue {
- return &v
-}
-
-// A DoubleValue is a 64-bit floating point number which may or may not be
-// present.
-type DoubleValue *float64
-
-// Double converts a Go float64 into a DoubleValue.
-func Double(v float64) DoubleValue {
- return &v
-}
-
-// A UnixTimestamp is a Unix timestamp represented as fractional seconds since
-// the Unix epoch.
-type UnixTimestamp struct {
- Time time.Time
-}
-
-// MarshalJSON marshals the timestamp as a float.
-func (t UnixTimestamp) MarshalJSON() (text []byte, err error) {
- n := float64(t.Time.UnixNano()) / 1e9
- s := strconv.FormatFloat(n, 'f', -1, 64)
- return []byte(s), nil
-}
-
-// UnmarshalJSON unmarshals the timestamp from a float.
-func (t *UnixTimestamp) UnmarshalJSON(text []byte) error {
- f, err := strconv.ParseFloat(string(text), 64)
- if err != nil {
- return err
- }
-
- sec := math.Floor(f)
- nsec := (f - sec) * 1e9
-
- t.Time = time.Unix(int64(sec), int64(nsec)).UTC()
- return nil
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/types_test.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/types_test.go
deleted file mode 100644
index b4b2bc7623..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/types_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package aws_test
-
-import (
- "encoding/json"
- "testing"
- "time"
-
- "github.com/hashicorp/aws-sdk-go/aws"
-)
-
-func TestUnixTimestampSerialization(t *testing.T) {
- d := time.Date(2014, 12, 20, 14, 55, 30, 500000000, time.UTC)
- ts := aws.UnixTimestamp{Time: d}
- out, err := json.Marshal(ts)
- if err != nil {
- t.Fatal(err)
- }
-
- if v, want := string(out), `1419087330.5`; v != want {
- t.Errorf("Was %q but expected %q", v, want)
- }
-}
-
-func TestUnixTimestampDeserialization(t *testing.T) {
- var ts aws.UnixTimestamp
- if err := json.Unmarshal([]byte(`1419087330.5`), &ts); err != nil {
- t.Fatal(err)
- }
-
- if v, want := ts.Time.Format(time.RFC3339Nano), "2014-12-20T14:55:30.5Z"; v != want {
- t.Errorf("Was %s but expected %s", v, want)
- }
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/v4.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/v4.go
deleted file mode 100644
index c0ac0abeeb..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/v4.go
+++ /dev/null
@@ -1,249 +0,0 @@
-package aws
-
-import (
- "bytes"
- "crypto/hmac"
- "crypto/sha256"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "sort"
- "strconv"
- "strings"
- "time"
-)
-
-const (
- authHeaderPrefix = "AWS4-HMAC-SHA256"
- timeFormat = "20060102T150405Z"
- shortTimeFormat = "20060102"
-)
-
-func (c *Context) sign(r *http.Request) error {
- creds, err := c.Credentials.Credentials()
- if err != nil {
- return err
- }
-
- date := r.Header.Get("Date")
- t := currentTime().UTC()
- if date != "" {
- var err error
- t, err = time.Parse(http.TimeFormat, date)
- if err != nil {
- return err
- }
- }
-
- s := signer{
- Request: r,
- Time: t,
- Body: r.Body,
- ServiceName: c.Service,
- Region: c.Region,
- AccessKeyID: creds.AccessKeyID,
- SecretAccessKey: creds.SecretAccessKey,
- SessionToken: creds.SecurityToken,
- Debug: 0,
- }
- s.sign()
- return nil
-}
-
-type signer struct {
- Request *http.Request
- Time time.Time
- ServiceName string
- Region string
- AccessKeyID string
- SecretAccessKey string
- SessionToken string
- Body io.Reader
- Debug uint
-
- formattedTime string
- formattedShortTime string
-
- signedHeaders string
- canonicalHeaders string
- canonicalString string
- credentialString string
- stringToSign string
- signature string
- authorization string
-}
-
-func (v4 *signer) sign() {
- formatted := v4.Time.UTC().Format(timeFormat)
-
- // remove the old headers
- v4.Request.Header.Del("Date")
- v4.Request.Header.Del("Authorization")
-
- if v4.SessionToken != "" {
- v4.Request.Header.Set("X-Amz-Security-Token", v4.SessionToken)
- }
-
- v4.build()
-
- //v4.Debug = true
- if v4.Debug > 0 {
- fmt.Printf("---[ CANONICAL STRING ]-----------------------------\n")
- fmt.Printf("%s\n", v4.canonicalString)
- fmt.Printf("-----------------------------------------------------\n\n")
- fmt.Printf("---[ STRING TO SIGN ]--------------------------------\n")
- fmt.Printf("%s\n", v4.stringToSign)
- fmt.Printf("-----------------------------------------------------\n")
- }
-
- // add the new ones
- v4.Request.Header.Set("Date", formatted)
- v4.Request.Header.Set("Authorization", v4.authorization)
-}
-
-func (v4 *signer) build() {
- v4.buildTime()
- v4.buildCanonicalHeaders()
- v4.buildCredentialString()
- v4.buildCanonicalString()
- v4.buildStringToSign()
- v4.buildSignature()
- v4.buildAuthorization()
-}
-
-func (v4 *signer) buildTime() {
- v4.formattedTime = v4.Time.UTC().Format(timeFormat)
- v4.formattedShortTime = v4.Time.UTC().Format(shortTimeFormat)
-}
-
-func (v4 *signer) buildAuthorization() {
- v4.authorization = strings.Join([]string{
- authHeaderPrefix + " Credential=" + v4.AccessKeyID + "/" + v4.credentialString,
- "SignedHeaders=" + v4.signedHeaders,
- "Signature=" + v4.signature,
- }, ",")
-}
-
-func (v4 *signer) buildCredentialString() {
- v4.credentialString = strings.Join([]string{
- v4.formattedShortTime,
- v4.Region,
- v4.ServiceName,
- "aws4_request",
- }, "/")
-}
-
-func (v4 *signer) buildCanonicalHeaders() {
- headers := make([]string, 0)
- headers = append(headers, "host")
- for k, _ := range v4.Request.Header {
- if http.CanonicalHeaderKey(k) == "Content-Length" {
- continue // never sign content-length
- }
- headers = append(headers, strings.ToLower(k))
- }
- sort.Strings(headers)
-
- headerValues := make([]string, len(headers))
- for i, k := range headers {
- if k == "host" {
- headerValues[i] = "host:" + v4.Request.URL.Host
- } else {
- headerValues[i] = k + ":" +
- strings.Join(v4.Request.Header[http.CanonicalHeaderKey(k)], ",")
- }
- }
-
- v4.signedHeaders = strings.Join(headers, ";")
- v4.canonicalHeaders = strings.Join(headerValues, "\n")
-}
-
-func (v4 *signer) buildCanonicalString() {
- v4.canonicalString = strings.Join([]string{
- v4.Request.Method,
- v4.Request.URL.Path,
- v4.Request.URL.Query().Encode(),
- v4.canonicalHeaders + "\n",
- v4.signedHeaders,
- v4.bodyDigest(),
- }, "\n")
-}
-
-func (v4 *signer) buildStringToSign() {
- v4.stringToSign = strings.Join([]string{
- authHeaderPrefix,
- v4.formattedTime,
- v4.credentialString,
- hexDigest(makeSha256([]byte(v4.canonicalString))),
- }, "\n")
-}
-
-func (v4 *signer) buildSignature() {
- secret := v4.SecretAccessKey
- date := makeHmac([]byte("AWS4"+secret), []byte(v4.formattedShortTime))
- region := makeHmac(date, []byte(v4.Region))
- service := makeHmac(region, []byte(v4.ServiceName))
- credentials := makeHmac(service, []byte("aws4_request"))
- signature := makeHmac(credentials, []byte(v4.stringToSign))
- v4.signature = hexDigest(signature)
-}
-
-func (v4 *signer) bodyDigest() string {
- hash := v4.Request.Header.Get("X-Amz-Content-Sha256")
- if hash == "" {
- if v4.Body == nil {
- hash = hexDigest(makeSha256([]byte{}))
- } else {
- // TODO refactor body to support seeking body payloads
- b, _ := ioutil.ReadAll(v4.Body)
- hash = hexDigest(makeSha256(b))
- v4.Request.Body = ioutil.NopCloser(bytes.NewReader(b))
- }
- v4.Request.Header.Add("X-Amz-Content-Sha256", hash)
- }
- return hash
-}
-
-func makeHmac(key []byte, data []byte) []byte {
- hash := hmac.New(sha256.New, key)
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func makeSha256(data []byte) []byte {
- hash := sha256.New()
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func makeSha256Reader(reader io.Reader) []byte {
- packet := make([]byte, 4096)
- hash := sha256.New()
-
- //reader.Seek(0, 0)
- for {
- n, err := reader.Read(packet)
- if n > 0 {
- hash.Write(packet[0:n])
- }
- if err == io.EOF || n == 0 {
- break
- }
- }
- //reader.Seek(0, 0)
-
- return hash.Sum(nil)
-}
-
-func hexDigest(data []byte) string {
- var buffer bytes.Buffer
- for i := range data {
- str := strconv.FormatUint(uint64(data[i]), 16)
- if len(str) < 2 {
- buffer.WriteString("0")
- }
- buffer.WriteString(str)
- }
- return buffer.String()
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/v4_test.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/v4_test.go
deleted file mode 100644
index 29ef08a339..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/v4_test.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package aws
-
-import (
- "net/http"
- "strings"
- "testing"
- "time"
-)
-
-func buildSigner(serviceName string, region string, signTime time.Time, body string) signer {
- endpoint := "https://" + serviceName + "." + region + ".amazonaws.com"
- reader := strings.NewReader(body)
- req, _ := http.NewRequest("POST", endpoint, reader)
- req.Header.Add("X-Amz-Target", "prefix.Operation")
- req.Header.Add("Content-Type", "application/x-amz-json-1.0")
- req.Header.Add("Content-Length", string(len(body)))
-
- return signer{
- Request: req,
- Time: signTime,
- Body: reader,
- ServiceName: serviceName,
- Region: region,
- AccessKeyID: "AKID",
- SecretAccessKey: "SECRET",
- SessionToken: "SESSION",
- }
-}
-
-func removeWS(text string) string {
- text = strings.Replace(text, " ", "", -1)
- text = strings.Replace(text, "\n", "", -1)
- text = strings.Replace(text, "\t", "", -1)
- return text
-}
-
-func assertEqual(t *testing.T, expected, given string) {
- if removeWS(expected) != removeWS(given) {
- t.Errorf("\nExpected: %s\nGiven: %s", expected, given)
- }
-}
-
-func TestSignRequest(t *testing.T) {
- signer := buildSigner("dynamodb", "us-east-1", time.Unix(0, 0), "{}")
- signer.sign()
-
- expectedDate := "19700101T000000Z"
- expectedAuth := `
- AWS4-HMAC-SHA256
- Credential=AKID/19700101/us-east-1/dynamodb/aws4_request,
- SignedHeaders=content-type;host;x-amz-security-token;x-amz-target,
- Signature=4662104789134800e088b6a2bf3a1153ca7d38ecfc07a69bff2859f04900b67f
- `
-
- assertEqual(t, expectedAuth, signer.Request.Header.Get("Authorization"))
- assertEqual(t, expectedDate, signer.Request.Header.Get("Date"))
-}
-
-func BenchmarkSignRequest(b *testing.B) {
- signer := buildSigner("dynamodb", "us-east-1", time.Now(), "{}")
- for i := 0; i < b.N; i++ {
- signer.sign()
- }
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/xml.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/xml.go
deleted file mode 100644
index a919407fc4..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/xml.go
+++ /dev/null
@@ -1,178 +0,0 @@
-package aws
-
-import (
- "encoding/xml"
- "reflect"
- "strings"
-)
-
-// MarshalXML is a weird and stunted version of xml.Marshal which is used by the
-// REST-XML request types to get around a bug in encoding/xml which doesn't
-// allow us to marshal pointers to zero values:
-//
-// https://github.com/golang/go/issues/5452
-func MarshalXML(v interface{}, e *xml.Encoder, start xml.StartElement) error {
- value := reflect.ValueOf(v)
- t := value.Type()
- switch value.Kind() {
- case reflect.Ptr:
- if !value.IsNil() {
- return MarshalXML(value.Elem().Interface(), e, start)
- }
- case reflect.Struct:
- var rootInfo xmlFieldInfo
-
- // detect xml.Name, if any
- for i := 0; i < value.NumField(); i++ {
- f := t.Field(i)
- v := value.Field(i)
- if f.Type == xmlName {
- rootInfo = parseXMLTag(f.Tag.Get("xml"))
- if rootInfo.name == "" {
- // name not in tag, try value
- name := v.Interface().(xml.Name)
- rootInfo = xmlFieldInfo{
- name: name.Local,
- ns: name.Space,
- }
- }
- }
- }
-
- for _, start := range rootInfo.start(t.Name()) {
- if err := e.EncodeToken(start); err != nil {
- return err
- }
- }
-
- for i := 0; i < value.NumField(); i++ {
- ft := value.Type().Field(i)
-
- if ft.Type == xmlName {
- continue
- }
-
- fv := value.Field(i)
- fi := parseXMLTag(ft.Tag.Get("xml"))
-
- if fi.name == "-" {
- continue
- }
-
- if fi.omit {
- switch fv.Kind() {
- case reflect.Ptr:
- if fv.IsNil() {
- continue
- }
- case reflect.Slice, reflect.Map:
- if fv.Len() == 0 {
- continue
- }
- default:
- if !fv.IsValid() {
- continue
- }
- }
- }
-
- starts := fi.start(ft.Name)
- for _, start := range starts[:len(starts)-1] {
- if err := e.EncodeToken(start); err != nil {
- return err
- }
- }
-
- start := starts[len(starts)-1]
- if err := e.EncodeElement(fv.Interface(), start); err != nil {
- return err
- }
-
- for _, end := range fi.end(ft.Name)[1:] {
- if err := e.EncodeToken(end); err != nil {
- return err
- }
- }
- }
-
- for _, end := range rootInfo.end(t.Name()) {
- if err := e.EncodeToken(end); err != nil {
- return err
- }
- }
- default:
- return e.Encode(v)
- }
- return nil
-}
-
-var xmlName = reflect.TypeOf(xml.Name{})
-
-type xmlFieldInfo struct {
- name string
- ns string
- omit bool
-}
-
-func (fi xmlFieldInfo) start(name string) []xml.StartElement {
- if fi.name != "" {
- name = fi.name
- }
-
- var elements []xml.StartElement
- for _, part := range strings.Split(name, ">") {
- elements = append(elements, xml.StartElement{
- Name: xml.Name{
- Local: part,
- Space: fi.ns,
- },
- })
- }
- return elements
-}
-
-func (fi xmlFieldInfo) end(name string) []xml.EndElement {
- if fi.name != "" {
- name = fi.name
- }
-
- var elements []xml.EndElement
- parts := strings.Split(name, ">")
- for i := range parts {
- part := parts[len(parts)-i-1]
- elements = append(elements, xml.EndElement{
- Name: xml.Name{
- Local: part,
- Space: fi.ns,
- },
- })
- }
- return elements
-}
-
-func parseXMLTag(t string) xmlFieldInfo {
- parts := strings.Split(t, ",")
-
- var omit bool
- for _, p := range parts {
- omit = omit || p == "omitempty"
- }
-
- var name, ns string
- if len(parts) > 0 {
- nameParts := strings.Split(parts[0], " ")
- if len(nameParts) == 2 {
- name = nameParts[1]
- ns = nameParts[0]
- } else if len(nameParts) == 1 {
- name = nameParts[0]
- }
-
- }
-
- return xmlFieldInfo{
- name: name,
- ns: ns,
- omit: omit,
- }
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/xml_test.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/xml_test.go
deleted file mode 100644
index a6734f4433..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/aws/xml_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package aws_test
-
-import (
- "encoding/xml"
- "testing"
-
- "github.com/hashicorp/aws-sdk-go/aws"
-)
-
-type XMLRequest struct {
- XMLName xml.Name `xml:"http://whatever Request"`
-
- Integer aws.IntegerValue `xml:",omitempty"`
- DangerZone string `xml:"-"`
-}
-
-func (r *XMLRequest) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
- return aws.MarshalXML(r, e, start)
-}
-
-func TestMarshalingXML(t *testing.T) {
- r := &XMLRequest{
- Integer: aws.Integer(0),
- DangerZone: "a zone of danger",
- }
-
- out, err := xml.Marshal(r)
- if err != nil {
- t.Fatal(err)
- }
-
- if v, want := string(out), `0`; v != want {
- t.Errorf("XML was \n%s\n but expected \n%s", v, want)
- }
-}
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/gen/endpoints/endpoints.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/gen/endpoints/endpoints.go
deleted file mode 100644
index 01ab7b2d8b..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/gen/endpoints/endpoints.go
+++ /dev/null
@@ -1,178 +0,0 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-// Package endpoints provides lookups for all AWS service endpoints.
-package endpoints
-
-import (
- "strings"
-)
-
-// Lookup returns the endpoint for the given service in the given region plus
-// any overrides for the service name and region.
-func Lookup(service, region string) (uri, newService, newRegion string) {
- if override := findOverride(service, region); override != nil {
- return override.uri, override.service, override.region
- }
-
- switch service {
-
- case "cloudfront":
-
- if !strings.HasPrefix(region, "cn-") {
- return format("https://cloudfront.amazonaws.com", service, region), service, "us-east-1"
- }
-
- case "dynamodb":
-
- if region == "local" {
- return format("http://localhost:8000", service, region), "dynamodb", "us-east-1"
- }
-
- case "elasticmapreduce":
-
- if strings.HasPrefix(region, "cn-") {
- return format("https://elasticmapreduce.cn-north-1.amazonaws.com.cn", service, region), service, region
- }
-
- if region == "eu-central-1" {
- return format("https://elasticmapreduce.eu-central-1.amazonaws.com", service, region), service, region
- }
-
- if region == "us-east-1" {
- return format("https://elasticmapreduce.us-east-1.amazonaws.com", service, region), service, region
- }
-
- if region != "" {
- return format("https://{region}.elasticmapreduce.amazonaws.com", service, region), service, region
- }
-
- case "iam":
-
- if strings.HasPrefix(region, "cn-") {
- return format("https://{service}.cn-north-1.amazonaws.com.cn", service, region), service, region
- }
-
- if strings.HasPrefix(region, "us-gov") {
- return format("https://{service}.us-gov.amazonaws.com", service, region), service, region
- }
-
- return format("https://iam.amazonaws.com", service, region), service, "us-east-1"
-
- case "importexport":
-
- if !strings.HasPrefix(region, "cn-") {
- return format("https://importexport.amazonaws.com", service, region), service, region
- }
-
- case "rds":
-
- if region == "us-east-1" {
- return format("https://rds.amazonaws.com", service, region), service, region
- }
-
- case "route53":
-
- if !strings.HasPrefix(region, "cn-") {
- return format("https://route53.amazonaws.com", service, region), service, region
- }
-
- case "s3":
-
- if region == "us-east-1" || region == "" {
- return format("{scheme}://s3.amazonaws.com", service, region), service, "us-east-1"
- }
-
- if strings.HasPrefix(region, "cn-") {
- return format("{scheme}://{service}.{region}.amazonaws.com.cn", service, region), service, region
- }
-
- if region == "us-east-1" || region == "ap-northeast-1" || region == "sa-east-1" || region == "ap-southeast-1" || region == "ap-southeast-2" || region == "us-west-2" || region == "us-west-1" || region == "eu-west-1" || region == "us-gov-west-1" || region == "fips-us-gov-west-1" {
- return format("{scheme}://{service}-{region}.amazonaws.com", service, region), service, region
- }
-
- if region != "" {
- return format("{scheme}://{service}.{region}.amazonaws.com", service, region), service, region
- }
-
- case "sdb":
-
- if region == "us-east-1" {
- return format("https://sdb.amazonaws.com", service, region), service, region
- }
-
- case "sqs":
-
- if region == "us-east-1" {
- return format("https://queue.amazonaws.com", service, region), service, region
- }
-
- if strings.HasPrefix(region, "cn-") {
- return format("https://{region}.queue.amazonaws.com.cn", service, region), service, region
- }
-
- if region != "" {
- return format("https://{region}.queue.amazonaws.com", service, region), service, region
- }
-
- case "sts":
-
- if strings.HasPrefix(region, "cn-") {
- return format("{scheme}://{service}.cn-north-1.amazonaws.com.cn", service, region), service, region
- }
-
- if strings.HasPrefix(region, "us-gov") {
- return format("https://{service}.{region}.amazonaws.com", service, region), service, region
- }
-
- return format("https://sts.amazonaws.com", service, region), service, "us-east-1"
-
- }
-
- if strings.HasPrefix(region, "cn-") {
- return format("{scheme}://{service}.{region}.amazonaws.com.cn", service, region), service, region
- }
-
- if region != "" {
- return format("{scheme}://{service}.{region}.amazonaws.com", service, region), service, region
- }
-
- panic("unknown endpoint for " + service + " in " + region)
-}
-
-// AddOverride overrides the endpoint for a specific service, using either an
-// existing region name or a fake one (e.g. "test-1").
-//
-// This allows developers to use local mock AWS services when they're
-// writing tests for their Go code that uses aws-go:
-//
-// endpoints.AddOverride("EC2", "test-1", "http://localhost:3000")
-// // This EC2 client uses the override as service endpoint.
-// cli := ec2.New(credentials, "test-1", nil)
-func AddOverride(service, region, uri string) {
- overrides = append(overrides, override{service, region, uri})
-}
-
-func format(uri, service, region string) string {
- uri = strings.Replace(uri, "{scheme}", "https", -1)
- uri = strings.Replace(uri, "{service}", service, -1)
- uri = strings.Replace(uri, "{region}", region, -1)
- return uri
-}
-
-func findOverride(service, region string) *override {
- for _, override := range overrides {
- if strings.ToUpper(override.service) == strings.ToUpper(service) &&
- override.region == region {
- return &override
- }
- }
- return nil
-}
-
-type override struct {
- service string
- region string
- uri string
-}
-
-var overrides []override
diff --git a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/gen/iam/iam.go b/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/gen/iam/iam.go
deleted file mode 100644
index afb65513b3..0000000000
--- a/Godeps/_workspace/src/github.com/hashicorp/aws-sdk-go/gen/iam/iam.go
+++ /dev/null
@@ -1,2284 +0,0 @@
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-// Package iam provides a client for AWS Identity and Access Management.
-package iam
-
-import (
- "net/http"
- "time"
-
- "github.com/hashicorp/aws-sdk-go/aws"
- "github.com/hashicorp/aws-sdk-go/gen/endpoints"
-)
-
-import (
- "encoding/xml"
- "io"
-)
-
-// IAM is a client for AWS Identity and Access Management.
-type IAM struct {
- client *aws.QueryClient
-}
-
-// New returns a new IAM client.
-func New(creds aws.CredentialsProvider, region string, client *http.Client) *IAM {
- if client == nil {
- client = http.DefaultClient
- }
-
- endpoint, service, region := endpoints.Lookup("iam", region)
-
- return &IAM{
- client: &aws.QueryClient{
- Context: aws.Context{
- Credentials: creds,
- Service: service,
- Region: region,
- },
- Client: client,
- Endpoint: endpoint,
- APIVersion: "2010-05-08",
- },
- }
-}
-
-// AddClientIDToOpenIDConnectProvider adds a new client ID (also known as
-// audience) to the list of client IDs already registered for the specified
-// IAM OpenID Connect provider. This action is idempotent; it does not fail
-// or return an error if you add an existing client ID to the provider.
-func (c *IAM) AddClientIDToOpenIDConnectProvider(req *AddClientIDToOpenIDConnectProviderRequest) (err error) {
- // NRE
- err = c.client.Do("AddClientIDToOpenIDConnectProvider", "POST", "/", req, nil)
- return
-}
-
-// AddRoleToInstanceProfile adds the specified role to the specified
-// instance profile. For more information about roles, go to Working with
-// Roles . For more information about instance profiles, go to About
-// Instance Profiles .
-func (c *IAM) AddRoleToInstanceProfile(req *AddRoleToInstanceProfileRequest) (err error) {
- // NRE
- err = c.client.Do("AddRoleToInstanceProfile", "POST", "/", req, nil)
- return
-}
-
-// AddUserToGroup is undocumented.
-func (c *IAM) AddUserToGroup(req *AddUserToGroupRequest) (err error) {
- // NRE
- err = c.client.Do("AddUserToGroup", "POST", "/", req, nil)
- return
-}
-
-// ChangePassword changes the password of the IAM user who is calling this
-// action. The root account password is not affected by this action. To
-// change the password for a different user, see UpdateLoginProfile . For
-// more information about modifying passwords, see Managing Passwords in
-// the Using guide.
-func (c *IAM) ChangePassword(req *ChangePasswordRequest) (err error) {
- // NRE
- err = c.client.Do("ChangePassword", "POST", "/", req, nil)
- return
-}
-
-// CreateAccessKey creates a new AWS secret access key and corresponding
-// AWS access key ID for the specified user. The default status for new
-// keys is Active . If you do not specify a user name, IAM determines the
-// user name implicitly based on the AWS access key ID signing the request.
-// Because this action works for access keys under the AWS account, you can
-// use this action to manage root credentials even if the AWS account has
-// no associated users. For information about limits on the number of keys
-// you can create, see Limitations on IAM Entities in the Using guide. To
-// ensure the security of your AWS account, the secret access key is
-// accessible only during key and user creation. You must save the key (for
-// example, in a text file) if you want to be able to access it again. If a
-// secret key is lost, you can delete the access keys for the associated
-// user and then create new keys.
-func (c *IAM) CreateAccessKey(req *CreateAccessKeyRequest) (resp *CreateAccessKeyResult, err error) {
- resp = &CreateAccessKeyResult{}
- err = c.client.Do("CreateAccessKey", "POST", "/", req, resp)
- return
-}
-
-// CreateAccountAlias creates an alias for your AWS account. For
-// information about using an AWS account alias, see Using an Alias for
-// Your AWS Account in the Using guide.
-func (c *IAM) CreateAccountAlias(req *CreateAccountAliasRequest) (err error) {
- // NRE
- err = c.client.Do("CreateAccountAlias", "POST", "/", req, nil)
- return
-}
-
-// CreateGroup creates a new group. For information about the number of
-// groups you can create, see Limitations on IAM Entities in the Using
-// guide.
-func (c *IAM) CreateGroup(req *CreateGroupRequest) (resp *CreateGroupResult, err error) {
- resp = &CreateGroupResult{}
- err = c.client.Do("CreateGroup", "POST", "/", req, resp)
- return
-}
-
-// CreateInstanceProfile creates a new instance profile. For information
-// about instance profiles, go to About Instance Profiles . For information
-// about the number of instance profiles you can create, see Limitations on
-// IAM Entities in the Using guide.
-func (c *IAM) CreateInstanceProfile(req *CreateInstanceProfileRequest) (resp *CreateInstanceProfileResult, err error) {
- resp = &CreateInstanceProfileResult{}
- err = c.client.Do("CreateInstanceProfile", "POST", "/", req, resp)
- return
-}
-
-// CreateLoginProfile creates a password for the specified user, giving the
-// user the ability to access AWS services through the AWS Management
-// Console. For more information about managing passwords, see Managing
-// Passwords in the Using guide.
-func (c *IAM) CreateLoginProfile(req *CreateLoginProfileRequest) (resp *CreateLoginProfileResult, err error) {
- resp = &CreateLoginProfileResult{}
- err = c.client.Do("CreateLoginProfile", "POST", "/", req, resp)
- return
-}
-
-// CreateOpenIDConnectProvider creates an IAM entity to describe an
-// identity provider (IdP) that supports OpenID Connect . The provider that
-// you create with this operation can be used as a principal in a role's
-// trust policy to establish a trust relationship between AWS and the
-// provider. When you create the IAM provider, you specify the URL of the
-// identity provider (IdP) to trust, a list of client IDs (also known as
-// audiences) that identify the application or applications that are
-// allowed to authenticate using the provider, and a list of thumbprints of
-// the server certificate(s) that the IdP uses. You get all of this
-// information from the IdP that you want to use for access to Because
-// trust for the provider is ultimately derived from the IAM provider that
-// this action creates, it is a best practice to limit access to the
-// CreateOpenIDConnectProvider action to highly-privileged users.
-func (c *IAM) CreateOpenIDConnectProvider(req *CreateOpenIDConnectProviderRequest) (resp *CreateOpenIDConnectProviderResult, err error) {
- resp = &CreateOpenIDConnectProviderResult{}
- err = c.client.Do("CreateOpenIDConnectProvider", "POST", "/", req, resp)
- return
-}
-
-// CreateRole creates a new role for your AWS account. For more information
-// about roles, go to Working with Roles . For information about
-// limitations on role names and the number of roles you can create, go to
-// Limitations on IAM Entities in the Using guide. The example policy
-// grants permission to an EC2 instance to assume the role. The policy is
-// URL-encoded according to RFC 3986. For more information about RFC 3986,
-// go to http://www.faqs.org/rfcs/rfc3986.html .
-func (c *IAM) CreateRole(req *CreateRoleRequest) (resp *CreateRoleResult, err error) {
- resp = &CreateRoleResult{}
- err = c.client.Do("CreateRole", "POST", "/", req, resp)
- return
-}
-
-// CreateSAMLProvider creates an IAM entity to describe an identity
-// provider (IdP) that supports 2.0. The provider that you create with this
-// operation can be used as a principal in a role's trust policy to
-// establish a trust relationship between AWS and a identity provider. You
-// can create an IAM role that supports Web-based single sign-on to the AWS
-// Management Console or one that supports API access to When you create
-// the provider, you upload an a metadata document that you get from your
-// IdP and that includes the issuer's name, expiration information, and
-// keys that can be used to validate the authentication response
-// (assertions) that are received from the IdP. You must generate the
-// metadata document using the identity management software that is used as
-// your organization's IdP. This operation requires Signature Version 4 .
-// For more information, see Giving Console Access Using and Creating
-// Temporary Security Credentials for Federation in the Using Temporary
-// Credentials guide.
-func (c *IAM) CreateSAMLProvider(req *CreateSAMLProviderRequest) (resp *CreateSAMLProviderResult, err error) {
- resp = &CreateSAMLProviderResult{}
- err = c.client.Do("CreateSAMLProvider", "POST", "/", req, resp)
- return
-}
-
-// CreateUser creates a new user for your AWS account. For information
-// about limitations on the number of users you can create, see Limitations
-// on IAM Entities in the Using guide.
-func (c *IAM) CreateUser(req *CreateUserRequest) (resp *CreateUserResult, err error) {
- resp = &CreateUserResult{}
- err = c.client.Do("CreateUser", "POST", "/", req, resp)
- return
-}
-
-// CreateVirtualMFADevice creates a new virtual MFA device for the AWS
-// account. After creating the virtual use EnableMFADevice to attach the
-// MFA device to an IAM user. For more information about creating and
-// working with virtual MFA devices, go to Using a Virtual MFA Device in
-// the Using guide. For information about limits on the number of MFA
-// devices you can create, see Limitations on Entities in the Using guide.
-// The seed information contained in the QR code and the Base32 string
-// should be treated like any other secret access information, such as your
-// AWS access keys or your passwords. After you provision your virtual
-// device, you should ensure that the information is destroyed following
-// secure procedures.
-func (c *IAM) CreateVirtualMFADevice(req *CreateVirtualMFADeviceRequest) (resp *CreateVirtualMFADeviceResult, err error) {
- resp = &CreateVirtualMFADeviceResult{}
- err = c.client.Do("CreateVirtualMFADevice", "POST", "/", req, resp)
- return
-}
-
-// DeactivateMFADevice deactivates the specified MFA device and removes it
-// from association with the user name for which it was originally enabled.
-// For more information about creating and working with virtual MFA
-// devices, go to Using a Virtual MFA Device in the Using guide.
-func (c *IAM) DeactivateMFADevice(req *DeactivateMFADeviceRequest) (err error) {
- // NRE
- err = c.client.Do("DeactivateMFADevice", "POST", "/", req, nil)
- return
-}
-
-// DeleteAccessKey deletes the access key associated with the specified
-// user. If you do not specify a user name, IAM determines the user name
-// implicitly based on the AWS access key ID signing the request. Because
-// this action works for access keys under the AWS account, you can use
-// this action to manage root credentials even if the AWS account has no
-// associated users.
-func (c *IAM) DeleteAccessKey(req *DeleteAccessKeyRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteAccessKey", "POST", "/", req, nil)
- return
-}
-
-// DeleteAccountAlias deletes the specified AWS account alias. For
-// information about using an AWS account alias, see Using an Alias for
-// Your AWS Account in the Using guide.
-func (c *IAM) DeleteAccountAlias(req *DeleteAccountAliasRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteAccountAlias", "POST", "/", req, nil)
- return
-}
-
-// DeleteAccountPasswordPolicy is undocumented.
-func (c *IAM) DeleteAccountPasswordPolicy() (err error) {
- // NRE
- err = c.client.Do("DeleteAccountPasswordPolicy", "POST", "/", nil, nil)
- return
-}
-
-// DeleteGroup deletes the specified group. The group must not contain any
-// users or have any attached policies.
-func (c *IAM) DeleteGroup(req *DeleteGroupRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteGroup", "POST", "/", req, nil)
- return
-}
-
-// DeleteGroupPolicy deletes the specified policy that is associated with
-// the specified group.
-func (c *IAM) DeleteGroupPolicy(req *DeleteGroupPolicyRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteGroupPolicy", "POST", "/", req, nil)
- return
-}
-
-// DeleteInstanceProfile deletes the specified instance profile. The
-// instance profile must not have an associated role. Make sure you do not
-// have any Amazon EC2 instances running with the instance profile you are
-// about to delete. Deleting a role or instance profile that is associated
-// with a running instance will break any applications running on the
-// instance. For more information about instance profiles, go to About
-// Instance Profiles .
-func (c *IAM) DeleteInstanceProfile(req *DeleteInstanceProfileRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteInstanceProfile", "POST", "/", req, nil)
- return
-}
-
-// DeleteLoginProfile deletes the password for the specified user, which
-// terminates the user's ability to access AWS services through the AWS
-// Management Console. Deleting a user's password does not prevent a user
-// from accessing IAM through the command line interface or the To prevent
-// all user access you must also either make the access key inactive or
-// delete it. For more information about making keys inactive or deleting
-// them, see UpdateAccessKey and DeleteAccessKey .
-func (c *IAM) DeleteLoginProfile(req *DeleteLoginProfileRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteLoginProfile", "POST", "/", req, nil)
- return
-}
-
-// DeleteOpenIDConnectProvider deletes an IAM OpenID Connect identity
-// provider. Deleting an provider does not update any roles that reference
-// the provider as a principal in their trust policies. Any attempt to
-// assume a role that references a provider that has been deleted will
-// fail. This action is idempotent; it does not fail or return an error if
-// you call the action for a provider that was already deleted.
-func (c *IAM) DeleteOpenIDConnectProvider(req *DeleteOpenIDConnectProviderRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteOpenIDConnectProvider", "POST", "/", req, nil)
- return
-}
-
-// DeleteRole deletes the specified role. The role must not have any
-// policies attached. For more information about roles, go to Working with
-// Roles . Make sure you do not have any Amazon EC2 instances running with
-// the role you are about to delete. Deleting a role or instance profile
-// that is associated with a running instance will break any applications
-// running on the instance.
-func (c *IAM) DeleteRole(req *DeleteRoleRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteRole", "POST", "/", req, nil)
- return
-}
-
-// DeleteRolePolicy deletes the specified policy associated with the
-// specified role.
-func (c *IAM) DeleteRolePolicy(req *DeleteRolePolicyRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteRolePolicy", "POST", "/", req, nil)
- return
-}
-
-// DeleteSAMLProvider deletes a provider. Deleting the provider does not
-// update any roles that reference the provider as a principal in their
-// trust policies. Any attempt to assume a role that references a provider
-// that has been deleted will fail. This operation requires Signature
-// Version 4 .
-func (c *IAM) DeleteSAMLProvider(req *DeleteSAMLProviderRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteSAMLProvider", "POST", "/", req, nil)
- return
-}
-
-// DeleteServerCertificate deletes the specified server certificate. If you
-// are using a server certificate with Elastic Load Balancing, deleting the
-// certificate could have implications for your application. If Elastic
-// Load Balancing doesn't detect the deletion of bound certificates, it may
-// continue to use the certificates. This could cause Elastic Load
-// Balancing to stop accepting traffic. We recommend that you remove the
-// reference to the certificate from Elastic Load Balancing before using
-// this command to delete the certificate. For more information, go to
-// DeleteLoadBalancerListeners in the Elastic Load Balancing API Reference
-// .
-func (c *IAM) DeleteServerCertificate(req *DeleteServerCertificateRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteServerCertificate", "POST", "/", req, nil)
- return
-}
-
-// DeleteSigningCertificate deletes the specified signing certificate
-// associated with the specified user. If you do not specify a user name,
-// IAM determines the user name implicitly based on the AWS access key ID
-// signing the request. Because this action works for access keys under the
-// AWS account, you can use this action to manage root credentials even if
-// the AWS account has no associated users.
-func (c *IAM) DeleteSigningCertificate(req *DeleteSigningCertificateRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteSigningCertificate", "POST", "/", req, nil)
- return
-}
-
-// DeleteUser deletes the specified user. The user must not belong to any
-// groups, have any keys or signing certificates, or have any attached
-// policies.
-func (c *IAM) DeleteUser(req *DeleteUserRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteUser", "POST", "/", req, nil)
- return
-}
-
-// DeleteUserPolicy deletes the specified policy associated with the
-// specified user.
-func (c *IAM) DeleteUserPolicy(req *DeleteUserPolicyRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteUserPolicy", "POST", "/", req, nil)
- return
-}
-
-// DeleteVirtualMFADevice deletes a virtual MFA device. You must deactivate
-// a user's virtual MFA device before you can delete it. For information
-// about deactivating MFA devices, see DeactivateMFADevice .
-func (c *IAM) DeleteVirtualMFADevice(req *DeleteVirtualMFADeviceRequest) (err error) {
- // NRE
- err = c.client.Do("DeleteVirtualMFADevice", "POST", "/", req, nil)
- return
-}
-
-// EnableMFADevice enables the specified MFA device and associates it with
-// the specified user name. When enabled, the MFA device is required for
-// every subsequent login by the user name associated with the device.
-func (c *IAM) EnableMFADevice(req *EnableMFADeviceRequest) (err error) {
- // NRE
- err = c.client.Do("EnableMFADevice", "POST", "/", req, nil)
- return
-}
-
-// GenerateCredentialReport generates a credential report for the AWS
-// account. For more information about the credential report, see Getting
-// Credential Reports in the Using guide.
-func (c *IAM) GenerateCredentialReport() (resp *GenerateCredentialReportResult, err error) {
- resp = &GenerateCredentialReportResult{}
- err = c.client.Do("GenerateCredentialReport", "POST", "/", nil, resp)
- return
-}
-
-// GetAccountAuthorizationDetails retrieves information about all IAM
-// users, groups, and roles in your account, including their relationships
-// to one another and their attached policies. Use this API to obtain a
-// snapshot of the configuration of IAM permissions (users, groups, roles,
-// and policies) in your account. You can optionally filter the results
-// using the Filter parameter. You can paginate the results using the
-// MaxItems and Marker parameters.
-func (c *IAM) GetAccountAuthorizationDetails(req *GetAccountAuthorizationDetailsRequest) (resp *GetAccountAuthorizationDetailsResult, err error) {
- resp = &GetAccountAuthorizationDetailsResult{}
- err = c.client.Do("GetAccountAuthorizationDetails", "POST", "/", req, resp)
- return
-}
-
-// GetAccountPasswordPolicy retrieves the password policy for the AWS
-// account. For more information about using a password policy, go to
-// Managing an IAM Password Policy .
-func (c *IAM) GetAccountPasswordPolicy() (resp *GetAccountPasswordPolicyResult, err error) {
- resp = &GetAccountPasswordPolicyResult{}
- err = c.client.Do("GetAccountPasswordPolicy", "POST", "/", nil, resp)
- return
-}
-
-// GetAccountSummary retrieves account level information about account
-// entity usage and IAM quotas. For information about limitations on IAM
-// entities, see Limitations on IAM Entities in the Using guide.
-func (c *IAM) GetAccountSummary() (resp *GetAccountSummaryResult, err error) {
- resp = &GetAccountSummaryResult{}
- err = c.client.Do("GetAccountSummary", "POST", "/", nil, resp)
- return
-}
-
-// GetCredentialReport retrieves a credential report for the AWS account.
-// For more information about the credential report, see Getting Credential
-// Reports in the Using guide.
-func (c *IAM) GetCredentialReport() (resp *GetCredentialReportResult, err error) {
- resp = &GetCredentialReportResult{}
- err = c.client.Do("GetCredentialReport", "POST", "/", nil, resp)
- return
-}
-
-// GetGroup returns a list of users that are in the specified group. You
-// can paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) GetGroup(req *GetGroupRequest) (resp *GetGroupResult, err error) {
- resp = &GetGroupResult{}
- err = c.client.Do("GetGroup", "POST", "/", req, resp)
- return
-}
-
-// GetGroupPolicy retrieves the specified policy document for the specified
-// group. The returned policy is URL-encoded according to RFC 3986. For
-// more information about RFC 3986, go to
-// http://www.faqs.org/rfcs/rfc3986.html .
-func (c *IAM) GetGroupPolicy(req *GetGroupPolicyRequest) (resp *GetGroupPolicyResult, err error) {
- resp = &GetGroupPolicyResult{}
- err = c.client.Do("GetGroupPolicy", "POST", "/", req, resp)
- return
-}
-
-// GetInstanceProfile retrieves information about the specified instance
-// profile, including the instance profile's path, and role. For more
-// information about instance profiles, go to About Instance Profiles . For
-// more information about ARNs, go to ARNs .
-func (c *IAM) GetInstanceProfile(req *GetInstanceProfileRequest) (resp *GetInstanceProfileResult, err error) {
- resp = &GetInstanceProfileResult{}
- err = c.client.Do("GetInstanceProfile", "POST", "/", req, resp)
- return
-}
-
-// GetLoginProfile retrieves the user name and password-creation date for
-// the specified user. If the user has not been assigned a password, the
-// action returns a 404 NoSuchEntity ) error.
-func (c *IAM) GetLoginProfile(req *GetLoginProfileRequest) (resp *GetLoginProfileResult, err error) {
- resp = &GetLoginProfileResult{}
- err = c.client.Do("GetLoginProfile", "POST", "/", req, resp)
- return
-}
-
-// GetOpenIDConnectProvider returns information about the specified OpenID
-// Connect provider.
-func (c *IAM) GetOpenIDConnectProvider(req *GetOpenIDConnectProviderRequest) (resp *GetOpenIDConnectProviderResult, err error) {
- resp = &GetOpenIDConnectProviderResult{}
- err = c.client.Do("GetOpenIDConnectProvider", "POST", "/", req, resp)
- return
-}
-
-// GetRole retrieves information about the specified role, including the
-// role's path, and the policy granting permission to assume the role. For
-// more information about ARNs, go to ARNs . For more information about
-// roles, go to Working with Roles . The returned policy is URL-encoded
-// according to RFC 3986. For more information about RFC 3986, go to
-// http://www.faqs.org/rfcs/rfc3986.html .
-func (c *IAM) GetRole(req *GetRoleRequest) (resp *GetRoleResult, err error) {
- resp = &GetRoleResult{}
- err = c.client.Do("GetRole", "POST", "/", req, resp)
- return
-}
-
-// GetRolePolicy retrieves the specified policy document for the specified
-// role. For more information about roles, go to Working with Roles . The
-// returned policy is URL-encoded according to RFC 3986. For more
-// information about RFC 3986, go to http://www.faqs.org/rfcs/rfc3986.html
-// .
-func (c *IAM) GetRolePolicy(req *GetRolePolicyRequest) (resp *GetRolePolicyResult, err error) {
- resp = &GetRolePolicyResult{}
- err = c.client.Do("GetRolePolicy", "POST", "/", req, resp)
- return
-}
-
-// GetSAMLProvider returns the provider metadocument that was uploaded when
-// the provider was created or updated. This operation requires Signature
-// Version 4 .
-func (c *IAM) GetSAMLProvider(req *GetSAMLProviderRequest) (resp *GetSAMLProviderResult, err error) {
- resp = &GetSAMLProviderResult{}
- err = c.client.Do("GetSAMLProvider", "POST", "/", req, resp)
- return
-}
-
-// GetServerCertificate retrieves information about the specified server
-// certificate.
-func (c *IAM) GetServerCertificate(req *GetServerCertificateRequest) (resp *GetServerCertificateResult, err error) {
- resp = &GetServerCertificateResult{}
- err = c.client.Do("GetServerCertificate", "POST", "/", req, resp)
- return
-}
-
-// GetUser retrieves information about the specified user, including the
-// user's creation date, path, unique ID, and If you do not specify a user
-// name, IAM determines the user name implicitly based on the AWS access
-// key ID used to sign the request.
-func (c *IAM) GetUser(req *GetUserRequest) (resp *GetUserResult, err error) {
- resp = &GetUserResult{}
- err = c.client.Do("GetUser", "POST", "/", req, resp)
- return
-}
-
-// GetUserPolicy retrieves the specified policy document for the specified
-// user. The returned policy is URL-encoded according to RFC 3986. For more
-// information about RFC 3986, go to http://www.faqs.org/rfcs/rfc3986.html
-// .
-func (c *IAM) GetUserPolicy(req *GetUserPolicyRequest) (resp *GetUserPolicyResult, err error) {
- resp = &GetUserPolicyResult{}
- err = c.client.Do("GetUserPolicy", "POST", "/", req, resp)
- return
-}
-
-// ListAccessKeys returns information about the access key IDs associated
-// with the specified user. If there are none, the action returns an empty
-// list. Although each user is limited to a small number of keys, you can
-// still paginate the results using the MaxItems and Marker parameters. If
-// the UserName field is not specified, the UserName is determined
-// implicitly based on the AWS access key ID used to sign the request.
-// Because this action works for access keys under the AWS account, you can
-// use this action to manage root credentials even if the AWS account has
-// no associated users. To ensure the security of your AWS account, the
-// secret access key is accessible only during key and user creation.
-func (c *IAM) ListAccessKeys(req *ListAccessKeysRequest) (resp *ListAccessKeysResult, err error) {
- resp = &ListAccessKeysResult{}
- err = c.client.Do("ListAccessKeys", "POST", "/", req, resp)
- return
-}
-
-// ListAccountAliases lists the account aliases associated with the
-// account. For information about using an AWS account alias, see Using an
-// Alias for Your AWS Account in the Using guide. You can paginate the
-// results using the MaxItems and Marker parameters.
-func (c *IAM) ListAccountAliases(req *ListAccountAliasesRequest) (resp *ListAccountAliasesResult, err error) {
- resp = &ListAccountAliasesResult{}
- err = c.client.Do("ListAccountAliases", "POST", "/", req, resp)
- return
-}
-
-// ListGroupPolicies lists the names of the policies associated with the
-// specified group. If there are none, the action returns an empty list.
-// You can paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) ListGroupPolicies(req *ListGroupPoliciesRequest) (resp *ListGroupPoliciesResult, err error) {
- resp = &ListGroupPoliciesResult{}
- err = c.client.Do("ListGroupPolicies", "POST", "/", req, resp)
- return
-}
-
-// ListGroups lists the groups that have the specified path prefix. You can
-// paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) ListGroups(req *ListGroupsRequest) (resp *ListGroupsResult, err error) {
- resp = &ListGroupsResult{}
- err = c.client.Do("ListGroups", "POST", "/", req, resp)
- return
-}
-
-// ListGroupsForUser lists the groups the specified user belongs to. You
-// can paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) ListGroupsForUser(req *ListGroupsForUserRequest) (resp *ListGroupsForUserResult, err error) {
- resp = &ListGroupsForUserResult{}
- err = c.client.Do("ListGroupsForUser", "POST", "/", req, resp)
- return
-}
-
-// ListInstanceProfiles lists the instance profiles that have the specified
-// path prefix. If there are none, the action returns an empty list. For
-// more information about instance profiles, go to About Instance Profiles
-// . You can paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) ListInstanceProfiles(req *ListInstanceProfilesRequest) (resp *ListInstanceProfilesResult, err error) {
- resp = &ListInstanceProfilesResult{}
- err = c.client.Do("ListInstanceProfiles", "POST", "/", req, resp)
- return
-}
-
-// ListInstanceProfilesForRole lists the instance profiles that have the
-// specified associated role. If there are none, the action returns an
-// empty list. For more information about instance profiles, go to About
-// Instance Profiles . You can paginate the results using the MaxItems and
-// Marker parameters.
-func (c *IAM) ListInstanceProfilesForRole(req *ListInstanceProfilesForRoleRequest) (resp *ListInstanceProfilesForRoleResult, err error) {
- resp = &ListInstanceProfilesForRoleResult{}
- err = c.client.Do("ListInstanceProfilesForRole", "POST", "/", req, resp)
- return
-}
-
-// ListMFADevices lists the MFA devices. If the request includes the user
-// name, then this action lists all the MFA devices associated with the
-// specified user name. If you do not specify a user name, IAM determines
-// the user name implicitly based on the AWS access key ID signing the
-// request. You can paginate the results using the MaxItems and Marker
-// parameters.
-func (c *IAM) ListMFADevices(req *ListMFADevicesRequest) (resp *ListMFADevicesResult, err error) {
- resp = &ListMFADevicesResult{}
- err = c.client.Do("ListMFADevices", "POST", "/", req, resp)
- return
-}
-
-// ListOpenIDConnectProviders lists information about the OpenID Connect
-// providers in the AWS account.
-func (c *IAM) ListOpenIDConnectProviders(req *ListOpenIDConnectProvidersRequest) (resp *ListOpenIDConnectProvidersResult, err error) {
- resp = &ListOpenIDConnectProvidersResult{}
- err = c.client.Do("ListOpenIDConnectProviders", "POST", "/", req, resp)
- return
-}
-
-// ListRolePolicies lists the names of the policies associated with the
-// specified role. If there are none, the action returns an empty list. You
-// can paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) ListRolePolicies(req *ListRolePoliciesRequest) (resp *ListRolePoliciesResult, err error) {
- resp = &ListRolePoliciesResult{}
- err = c.client.Do("ListRolePolicies", "POST", "/", req, resp)
- return
-}
-
-// ListRoles lists the roles that have the specified path prefix. If there
-// are none, the action returns an empty list. For more information about
-// roles, go to Working with Roles . You can paginate the results using the
-// MaxItems and Marker parameters. The returned policy is URL-encoded
-// according to RFC 3986. For more information about RFC 3986, go to
-// http://www.faqs.org/rfcs/rfc3986.html .
-func (c *IAM) ListRoles(req *ListRolesRequest) (resp *ListRolesResult, err error) {
- resp = &ListRolesResult{}
- err = c.client.Do("ListRoles", "POST", "/", req, resp)
- return
-}
-
-// ListSAMLProviders is undocumented.
-func (c *IAM) ListSAMLProviders(req *ListSAMLProvidersRequest) (resp *ListSAMLProvidersResult, err error) {
- resp = &ListSAMLProvidersResult{}
- err = c.client.Do("ListSAMLProviders", "POST", "/", req, resp)
- return
-}
-
-// ListServerCertificates lists the server certificates that have the
-// specified path prefix. If none exist, the action returns an empty list.
-// You can paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) ListServerCertificates(req *ListServerCertificatesRequest) (resp *ListServerCertificatesResult, err error) {
- resp = &ListServerCertificatesResult{}
- err = c.client.Do("ListServerCertificates", "POST", "/", req, resp)
- return
-}
-
-// ListSigningCertificates returns information about the signing
-// certificates associated with the specified user. If there are none, the
-// action returns an empty list. Although each user is limited to a small
-// number of signing certificates, you can still paginate the results using
-// the MaxItems and Marker parameters. If the UserName field is not
-// specified, the user name is determined implicitly based on the AWS
-// access key ID used to sign the request. Because this action works for
-// access keys under the AWS account, you can use this action to manage
-// root credentials even if the AWS account has no associated users.
-func (c *IAM) ListSigningCertificates(req *ListSigningCertificatesRequest) (resp *ListSigningCertificatesResult, err error) {
- resp = &ListSigningCertificatesResult{}
- err = c.client.Do("ListSigningCertificates", "POST", "/", req, resp)
- return
-}
-
-// ListUserPolicies lists the names of the policies associated with the
-// specified user. If there are none, the action returns an empty list. You
-// can paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) ListUserPolicies(req *ListUserPoliciesRequest) (resp *ListUserPoliciesResult, err error) {
- resp = &ListUserPoliciesResult{}
- err = c.client.Do("ListUserPolicies", "POST", "/", req, resp)
- return
-}
-
-// ListUsers lists the IAM users that have the specified path prefix. If no
-// path prefix is specified, the action returns all users in the AWS
-// account. If there are none, the action returns an empty list. You can
-// paginate the results using the MaxItems and Marker parameters.
-func (c *IAM) ListUsers(req *ListUsersRequest) (resp *ListUsersResult, err error) {
- resp = &ListUsersResult{}
- err = c.client.Do("ListUsers", "POST", "/", req, resp)
- return
-}
-
-// ListVirtualMFADevices lists the virtual MFA devices under the AWS
-// account by assignment status. If you do not specify an assignment
-// status, the action returns a list of all virtual MFA devices. Assignment
-// status can be Assigned , Unassigned , or Any . You can paginate the
-// results using the MaxItems and Marker parameters.
-func (c *IAM) ListVirtualMFADevices(req *ListVirtualMFADevicesRequest) (resp *ListVirtualMFADevicesResult, err error) {
- resp = &ListVirtualMFADevicesResult{}
- err = c.client.Do("ListVirtualMFADevices", "POST", "/", req, resp)
- return
-}
-
-// PutGroupPolicy adds (or updates) a policy document associated with the
-// specified group. For information about policies, refer to Overview of
-// Policies in the Using guide. For information about limits on the number
-// of policies you can associate with a group, see Limitations on IAM
-// Entities in the Using guide. Because policy documents can be large, you
-// should use rather than GET when calling PutGroupPolicy . For information
-// about setting up signatures and authorization through the go to Signing
-// AWS API Requests in the AWS General Reference . For general information
-// about using the Query API with go to Making Query Requests in the Using
-// guide.
-func (c *IAM) PutGroupPolicy(req *PutGroupPolicyRequest) (err error) {
- // NRE
- err = c.client.Do("PutGroupPolicy", "POST", "/", req, nil)
- return
-}
-
-// PutRolePolicy adds (or updates) a policy document associated with the
-// specified role. For information about policies, go to Overview of
-// Policies in the Using guide. For information about limits on the
-// policies you can associate with a role, see Limitations on IAM Entities
-// in the Using guide. Because policy documents can be large, you should
-// use rather than GET when calling PutRolePolicy . For information about
-// setting up signatures and authorization through the go to Signing AWS
-// API Requests in the AWS General Reference . For general information
-// about using the Query API with go to Making Query Requests in the Using
-// guide.
-func (c *IAM) PutRolePolicy(req *PutRolePolicyRequest) (err error) {
- // NRE
- err = c.client.Do("PutRolePolicy", "POST", "/", req, nil)
- return
-}
-
-// PutUserPolicy adds (or updates) a policy document associated with the
-// specified user. For information about policies, refer to Overview of
-// Policies in the Using guide. For information about limits on the number
-// of policies you can associate with a user, see Limitations on IAM
-// Entities in the Using guide. Because policy documents can be large, you
-// should use rather than GET when calling PutUserPolicy . For information
-// about setting up signatures and authorization through the go to Signing
-// AWS API Requests in the AWS General Reference . For general information
-// about using the Query API with go to Making Query Requests in the Using
-// guide.
-func (c *IAM) PutUserPolicy(req *PutUserPolicyRequest) (err error) {
- // NRE
- err = c.client.Do("PutUserPolicy", "POST", "/", req, nil)
- return
-}
-
-// RemoveClientIDFromOpenIDConnectProvider removes the specified client ID
-// (also known as audience) from the list of client IDs registered for the
-// specified IAM OpenID Connect provider. This action is idempotent; it
-// does not fail or return an error if you try to remove a client ID that
-// was removed previously.
-func (c *IAM) RemoveClientIDFromOpenIDConnectProvider(req *RemoveClientIDFromOpenIDConnectProviderRequest) (err error) {
- // NRE
- err = c.client.Do("RemoveClientIDFromOpenIDConnectProvider", "POST", "/", req, nil)
- return
-}
-
-// RemoveRoleFromInstanceProfile removes the specified role from the
-// specified instance profile. Make sure you do not have any Amazon EC2
-// instances running with the role you are about to remove from the
-// instance profile. Removing a role from an instance profile that is
-// associated with a running instance will break any applications running
-// on the instance. For more information about roles, go to Working with
-// Roles . For more information about instance profiles, go to About
-// Instance Profiles .
-func (c *IAM) RemoveRoleFromInstanceProfile(req *RemoveRoleFromInstanceProfileRequest) (err error) {
- // NRE
- err = c.client.Do("RemoveRoleFromInstanceProfile", "POST", "/", req, nil)
- return
-}
-
-// RemoveUserFromGroup removes the specified user from the specified group.
-func (c *IAM) RemoveUserFromGroup(req *RemoveUserFromGroupRequest) (err error) {
- // NRE
- err = c.client.Do("RemoveUserFromGroup", "POST", "/", req, nil)
- return
-}
-
-// ResyncMFADevice synchronizes the specified MFA device with AWS servers.
-// For more information about creating and working with virtual MFA
-// devices, go to Using a Virtual MFA Device in the Using guide.
-func (c *IAM) ResyncMFADevice(req *ResyncMFADeviceRequest) (err error) {
- // NRE
- err = c.client.Do("ResyncMFADevice", "POST", "/", req, nil)
- return
-}
-
-// UpdateAccessKey changes the status of the specified access key from
-// Active to Inactive, or vice versa. This action can be used to disable a
-// user's key as part of a key rotation work flow. If the UserName field is
-// not specified, the UserName is determined implicitly based on the AWS
-// access key ID used to sign the request. Because this action works for
-// access keys under the AWS account, you can use this action to manage
-// root credentials even if the AWS account has no associated users. For
-// information about rotating keys, see Managing Keys and Certificates in
-// the Using guide.
-func (c *IAM) UpdateAccessKey(req *UpdateAccessKeyRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateAccessKey", "POST", "/", req, nil)
- return
-}
-
-// UpdateAccountPasswordPolicy updates the password policy settings for the
-// AWS account. This action does not support partial updates. No parameters
-// are required, but if you do not specify a parameter, that parameter's
-// value reverts to its default value. See the Request Parameters section
-// for each parameter's default value. For more information about using a
-// password policy, see Managing an IAM Password Policy in the Using guide.
-func (c *IAM) UpdateAccountPasswordPolicy(req *UpdateAccountPasswordPolicyRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateAccountPasswordPolicy", "POST", "/", req, nil)
- return
-}
-
-// UpdateAssumeRolePolicy updates the policy that grants an entity
-// permission to assume a role. For more information about roles, go to
-// Working with Roles .
-func (c *IAM) UpdateAssumeRolePolicy(req *UpdateAssumeRolePolicyRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateAssumeRolePolicy", "POST", "/", req, nil)
- return
-}
-
-// UpdateGroup updates the name and/or the path of the specified group. You
-// should understand the implications of changing a group's path or name.
-// For more information, see Renaming Users and Groups in the Using guide.
-// To change a group name the requester must have appropriate permissions
-// on both the source object and the target object. For example, to change
-// Managers to MGRs, the entity making the request must have permission on
-// Managers and MGRs, or must have permission on all For more information
-// about permissions, see Permissions and Policies .
-func (c *IAM) UpdateGroup(req *UpdateGroupRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateGroup", "POST", "/", req, nil)
- return
-}
-
-// UpdateLoginProfile changes the password for the specified user. Users
-// can change their own passwords by calling ChangePassword . For more
-// information about modifying passwords, see Managing Passwords in the
-// Using guide.
-func (c *IAM) UpdateLoginProfile(req *UpdateLoginProfileRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateLoginProfile", "POST", "/", req, nil)
- return
-}
-
-// UpdateOpenIDConnectProviderThumbprint replaces the existing list of
-// server certificate thumbprints with a new list. The list that you pass
-// with this action completely replaces the existing list of thumbprints.
-// (The lists are not merged.) Typically, you need to update a thumbprint
-// only when the identity provider's certificate changes, which occurs
-// rarely. However, if the provider's certificate does change, any attempt
-// to assume an IAM role that specifies the IAM provider as a principal
-// will fail until the certificate thumbprint is updated. Because trust for
-// the OpenID Connect provider is ultimately derived from the provider's
-// certificate and is validated by the thumbprint, it is a best practice to
-// limit access to the UpdateOpenIDConnectProviderThumbprint action to
-// highly-privileged users.
-func (c *IAM) UpdateOpenIDConnectProviderThumbprint(req *UpdateOpenIDConnectProviderThumbprintRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateOpenIDConnectProviderThumbprint", "POST", "/", req, nil)
- return
-}
-
-// UpdateSAMLProvider updates the metadata document for an existing
-// provider. This operation requires Signature Version 4 .
-func (c *IAM) UpdateSAMLProvider(req *UpdateSAMLProviderRequest) (resp *UpdateSAMLProviderResult, err error) {
- resp = &UpdateSAMLProviderResult{}
- err = c.client.Do("UpdateSAMLProvider", "POST", "/", req, resp)
- return
-}
-
-// UpdateServerCertificate updates the name and/or the path of the
-// specified server certificate. You should understand the implications of
-// changing a server certificate's path or name. For more information, see
-// Managing Server Certificates in the Using guide. To change a server
-// certificate name the requester must have appropriate permissions on both
-// the source object and the target object. For example, to change the name
-// from ProductionCert to ProdCert, the entity making the request must have
-// permission on ProductionCert and ProdCert, or must have permission on
-// all For more information about permissions, see Permissions and Policies
-// .
-func (c *IAM) UpdateServerCertificate(req *UpdateServerCertificateRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateServerCertificate", "POST", "/", req, nil)
- return
-}
-
-// UpdateSigningCertificate changes the status of the specified signing
-// certificate from active to disabled, or vice versa. This action can be
-// used to disable a user's signing certificate as part of a certificate
-// rotation work flow. If the UserName field is not specified, the UserName
-// is determined implicitly based on the AWS access key ID used to sign the
-// request. Because this action works for access keys under the AWS
-// account, you can use this action to manage root credentials even if the
-// AWS account has no associated users. For information about rotating
-// certificates, see Managing Keys and Certificates in the Using guide.
-func (c *IAM) UpdateSigningCertificate(req *UpdateSigningCertificateRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateSigningCertificate", "POST", "/", req, nil)
- return
-}
-
-// UpdateUser updates the name and/or the path of the specified user. You
-// should understand the implications of changing a user's path or name.
-// For more information, see Renaming Users and Groups in the Using guide.
-// To change a user name the requester must have appropriate permissions on
-// both the source object and the target object. For example, to change Bob
-// to Robert, the entity making the request must have permission on Bob and
-// Robert, or must have permission on all For more information about
-// permissions, see Permissions and Policies .
-func (c *IAM) UpdateUser(req *UpdateUserRequest) (err error) {
- // NRE
- err = c.client.Do("UpdateUser", "POST", "/", req, nil)
- return
-}
-
-// UploadServerCertificate uploads a server certificate entity for the AWS
-// account. The server certificate entity includes a public key
-// certificate, a private key, and an optional certificate chain, which
-// should all be PEM-encoded. For information about the number of server
-// certificates you can upload, see Limitations on IAM Entities in the
-// Using guide. Because the body of the public key certificate, private
-// key, and the certificate chain can be large, you should use rather than
-// GET when calling UploadServerCertificate . For information about setting
-// up signatures and authorization through the go to Signing AWS API
-// Requests in the AWS General Reference . For general information about
-// using the Query API with go to Making Query Requests in the Using guide.
-func (c *IAM) UploadServerCertificate(req *UploadServerCertificateRequest) (resp *UploadServerCertificateResult, err error) {
- resp = &UploadServerCertificateResult{}
- err = c.client.Do("UploadServerCertificate", "POST", "/", req, resp)
- return
-}
-
-// UploadSigningCertificate uploads an X.509 signing certificate and
-// associates it with the specified user. Some AWS services use X.509
-// signing certificates to validate requests that are signed with a
-// corresponding private key. When you upload the certificate, its default
-// status is Active . If the UserName field is not specified, the user name
-// is determined implicitly based on the AWS access key ID used to sign the
-// request. Because this action works for access keys under the AWS
-// account, you can use this action to manage root credentials even if the
-// AWS account has no associated users. Because the body of a X.509
-// certificate can be large, you should use rather than GET when calling
-// UploadSigningCertificate . For information about setting up signatures
-// and authorization through the go to Signing AWS API Requests in the AWS
-// General Reference . For general information about using the Query API
-// with go to Making Query Requests in the Using guide.
-func (c *IAM) UploadSigningCertificate(req *UploadSigningCertificateRequest) (resp *UploadSigningCertificateResult, err error) {
- resp = &UploadSigningCertificateResult{}
- err = c.client.Do("UploadSigningCertificate", "POST", "/", req, resp)
- return
-}
-
-// AccessKey is undocumented.
-type AccessKey struct {
- AccessKeyID aws.StringValue `query:"AccessKeyId" xml:"AccessKeyId"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- SecretAccessKey aws.StringValue `query:"SecretAccessKey" xml:"SecretAccessKey"`
- Status aws.StringValue `query:"Status" xml:"Status"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// AccessKeyMetadata is undocumented.
-type AccessKeyMetadata struct {
- AccessKeyID aws.StringValue `query:"AccessKeyId" xml:"AccessKeyId"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- Status aws.StringValue `query:"Status" xml:"Status"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// AddClientIDToOpenIDConnectProviderRequest is undocumented.
-type AddClientIDToOpenIDConnectProviderRequest struct {
- ClientID aws.StringValue `query:"ClientID" xml:"ClientID"`
- OpenIDConnectProviderARN aws.StringValue `query:"OpenIDConnectProviderArn" xml:"OpenIDConnectProviderArn"`
-}
-
-// AddRoleToInstanceProfileRequest is undocumented.
-type AddRoleToInstanceProfileRequest struct {
- InstanceProfileName aws.StringValue `query:"InstanceProfileName" xml:"InstanceProfileName"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// AddUserToGroupRequest is undocumented.
-type AddUserToGroupRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// ChangePasswordRequest is undocumented.
-type ChangePasswordRequest struct {
- NewPassword aws.StringValue `query:"NewPassword" xml:"NewPassword"`
- OldPassword aws.StringValue `query:"OldPassword" xml:"OldPassword"`
-}
-
-// CreateAccessKeyRequest is undocumented.
-type CreateAccessKeyRequest struct {
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// CreateAccessKeyResponse is undocumented.
-type CreateAccessKeyResponse struct {
- AccessKey *AccessKey `query:"AccessKey" xml:"CreateAccessKeyResult>AccessKey"`
-}
-
-// CreateAccountAliasRequest is undocumented.
-type CreateAccountAliasRequest struct {
- AccountAlias aws.StringValue `query:"AccountAlias" xml:"AccountAlias"`
-}
-
-// CreateGroupRequest is undocumented.
-type CreateGroupRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- Path aws.StringValue `query:"Path" xml:"Path"`
-}
-
-// CreateGroupResponse is undocumented.
-type CreateGroupResponse struct {
- Group *Group `query:"Group" xml:"CreateGroupResult>Group"`
-}
-
-// CreateInstanceProfileRequest is undocumented.
-type CreateInstanceProfileRequest struct {
- InstanceProfileName aws.StringValue `query:"InstanceProfileName" xml:"InstanceProfileName"`
- Path aws.StringValue `query:"Path" xml:"Path"`
-}
-
-// CreateInstanceProfileResponse is undocumented.
-type CreateInstanceProfileResponse struct {
- InstanceProfile *InstanceProfile `query:"InstanceProfile" xml:"CreateInstanceProfileResult>InstanceProfile"`
-}
-
-// CreateLoginProfileRequest is undocumented.
-type CreateLoginProfileRequest struct {
- Password aws.StringValue `query:"Password" xml:"Password"`
- PasswordResetRequired aws.BooleanValue `query:"PasswordResetRequired" xml:"PasswordResetRequired"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// CreateLoginProfileResponse is undocumented.
-type CreateLoginProfileResponse struct {
- LoginProfile *LoginProfile `query:"LoginProfile" xml:"CreateLoginProfileResult>LoginProfile"`
-}
-
-// CreateOpenIDConnectProviderRequest is undocumented.
-type CreateOpenIDConnectProviderRequest struct {
- ClientIDList []string `query:"ClientIDList.member" xml:"ClientIDList>member"`
- ThumbprintList []string `query:"ThumbprintList.member" xml:"ThumbprintList>member"`
- URL aws.StringValue `query:"Url" xml:"Url"`
-}
-
-// CreateOpenIDConnectProviderResponse is undocumented.
-type CreateOpenIDConnectProviderResponse struct {
- OpenIDConnectProviderARN aws.StringValue `query:"OpenIDConnectProviderArn" xml:"CreateOpenIDConnectProviderResult>OpenIDConnectProviderArn"`
-}
-
-// CreateRoleRequest is undocumented.
-type CreateRoleRequest struct {
- AssumeRolePolicyDocument aws.StringValue `query:"AssumeRolePolicyDocument" xml:"AssumeRolePolicyDocument"`
- Path aws.StringValue `query:"Path" xml:"Path"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// CreateRoleResponse is undocumented.
-type CreateRoleResponse struct {
- Role *Role `query:"Role" xml:"CreateRoleResult>Role"`
-}
-
-// CreateSAMLProviderRequest is undocumented.
-type CreateSAMLProviderRequest struct {
- Name aws.StringValue `query:"Name" xml:"Name"`
- SAMLMetadataDocument aws.StringValue `query:"SAMLMetadataDocument" xml:"SAMLMetadataDocument"`
-}
-
-// CreateSAMLProviderResponse is undocumented.
-type CreateSAMLProviderResponse struct {
- SAMLProviderARN aws.StringValue `query:"SAMLProviderArn" xml:"CreateSAMLProviderResult>SAMLProviderArn"`
-}
-
-// CreateUserRequest is undocumented.
-type CreateUserRequest struct {
- Path aws.StringValue `query:"Path" xml:"Path"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// CreateUserResponse is undocumented.
-type CreateUserResponse struct {
- User *User `query:"User" xml:"CreateUserResult>User"`
-}
-
-// CreateVirtualMFADeviceRequest is undocumented.
-type CreateVirtualMFADeviceRequest struct {
- Path aws.StringValue `query:"Path" xml:"Path"`
- VirtualMFADeviceName aws.StringValue `query:"VirtualMFADeviceName" xml:"VirtualMFADeviceName"`
-}
-
-// CreateVirtualMFADeviceResponse is undocumented.
-type CreateVirtualMFADeviceResponse struct {
- VirtualMFADevice *VirtualMFADevice `query:"VirtualMFADevice" xml:"CreateVirtualMFADeviceResult>VirtualMFADevice"`
-}
-
-// DeactivateMFADeviceRequest is undocumented.
-type DeactivateMFADeviceRequest struct {
- SerialNumber aws.StringValue `query:"SerialNumber" xml:"SerialNumber"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// DeleteAccessKeyRequest is undocumented.
-type DeleteAccessKeyRequest struct {
- AccessKeyID aws.StringValue `query:"AccessKeyId" xml:"AccessKeyId"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// DeleteAccountAliasRequest is undocumented.
-type DeleteAccountAliasRequest struct {
- AccountAlias aws.StringValue `query:"AccountAlias" xml:"AccountAlias"`
-}
-
-// DeleteGroupPolicyRequest is undocumented.
-type DeleteGroupPolicyRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
-}
-
-// DeleteGroupRequest is undocumented.
-type DeleteGroupRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
-}
-
-// DeleteInstanceProfileRequest is undocumented.
-type DeleteInstanceProfileRequest struct {
- InstanceProfileName aws.StringValue `query:"InstanceProfileName" xml:"InstanceProfileName"`
-}
-
-// DeleteLoginProfileRequest is undocumented.
-type DeleteLoginProfileRequest struct {
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// DeleteOpenIDConnectProviderRequest is undocumented.
-type DeleteOpenIDConnectProviderRequest struct {
- OpenIDConnectProviderARN aws.StringValue `query:"OpenIDConnectProviderArn" xml:"OpenIDConnectProviderArn"`
-}
-
-// DeleteRolePolicyRequest is undocumented.
-type DeleteRolePolicyRequest struct {
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// DeleteRoleRequest is undocumented.
-type DeleteRoleRequest struct {
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// DeleteSAMLProviderRequest is undocumented.
-type DeleteSAMLProviderRequest struct {
- SAMLProviderARN aws.StringValue `query:"SAMLProviderArn" xml:"SAMLProviderArn"`
-}
-
-// DeleteServerCertificateRequest is undocumented.
-type DeleteServerCertificateRequest struct {
- ServerCertificateName aws.StringValue `query:"ServerCertificateName" xml:"ServerCertificateName"`
-}
-
-// DeleteSigningCertificateRequest is undocumented.
-type DeleteSigningCertificateRequest struct {
- CertificateID aws.StringValue `query:"CertificateId" xml:"CertificateId"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// DeleteUserPolicyRequest is undocumented.
-type DeleteUserPolicyRequest struct {
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// DeleteUserRequest is undocumented.
-type DeleteUserRequest struct {
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// DeleteVirtualMFADeviceRequest is undocumented.
-type DeleteVirtualMFADeviceRequest struct {
- SerialNumber aws.StringValue `query:"SerialNumber" xml:"SerialNumber"`
-}
-
-// EnableMFADeviceRequest is undocumented.
-type EnableMFADeviceRequest struct {
- AuthenticationCode1 aws.StringValue `query:"AuthenticationCode1" xml:"AuthenticationCode1"`
- AuthenticationCode2 aws.StringValue `query:"AuthenticationCode2" xml:"AuthenticationCode2"`
- SerialNumber aws.StringValue `query:"SerialNumber" xml:"SerialNumber"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// Possible values for IAM.
-const (
- EntityTypeGroup = "Group"
- EntityTypeRole = "Role"
- EntityTypeUser = "User"
-)
-
-// GenerateCredentialReportResponse is undocumented.
-type GenerateCredentialReportResponse struct {
- Description aws.StringValue `query:"Description" xml:"GenerateCredentialReportResult>Description"`
- State aws.StringValue `query:"State" xml:"GenerateCredentialReportResult>State"`
-}
-
-// GetAccountAuthorizationDetailsRequest is undocumented.
-type GetAccountAuthorizationDetailsRequest struct {
- Filter []string `query:"Filter.member" xml:"Filter>member"`
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
-}
-
-// GetAccountAuthorizationDetailsResponse is undocumented.
-type GetAccountAuthorizationDetailsResponse struct {
- GroupDetailList []GroupDetail `query:"GroupDetailList.member" xml:"GetAccountAuthorizationDetailsResult>GroupDetailList>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"GetAccountAuthorizationDetailsResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"GetAccountAuthorizationDetailsResult>Marker"`
- RoleDetailList []RoleDetail `query:"RoleDetailList.member" xml:"GetAccountAuthorizationDetailsResult>RoleDetailList>member"`
- UserDetailList []UserDetail `query:"UserDetailList.member" xml:"GetAccountAuthorizationDetailsResult>UserDetailList>member"`
-}
-
-// GetAccountPasswordPolicyResponse is undocumented.
-type GetAccountPasswordPolicyResponse struct {
- PasswordPolicy *PasswordPolicy `query:"PasswordPolicy" xml:"GetAccountPasswordPolicyResult>PasswordPolicy"`
-}
-
-// GetAccountSummaryResponse is undocumented.
-type GetAccountSummaryResponse struct {
- SummaryMap SummaryMapType `query:"SummaryMap.entry" xml:"GetAccountSummaryResult>SummaryMap>entry"`
-}
-
-// GetCredentialReportResponse is undocumented.
-type GetCredentialReportResponse struct {
- Content []byte `query:"Content" xml:"GetCredentialReportResult>Content"`
- GeneratedTime time.Time `query:"GeneratedTime" xml:"GetCredentialReportResult>GeneratedTime"`
- ReportFormat aws.StringValue `query:"ReportFormat" xml:"GetCredentialReportResult>ReportFormat"`
-}
-
-// GetGroupPolicyRequest is undocumented.
-type GetGroupPolicyRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
-}
-
-// GetGroupPolicyResponse is undocumented.
-type GetGroupPolicyResponse struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GetGroupPolicyResult>GroupName"`
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"GetGroupPolicyResult>PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"GetGroupPolicyResult>PolicyName"`
-}
-
-// GetGroupRequest is undocumented.
-type GetGroupRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
-}
-
-// GetGroupResponse is undocumented.
-type GetGroupResponse struct {
- Group *Group `query:"Group" xml:"GetGroupResult>Group"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"GetGroupResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"GetGroupResult>Marker"`
- Users []User `query:"Users.member" xml:"GetGroupResult>Users>member"`
-}
-
-// GetInstanceProfileRequest is undocumented.
-type GetInstanceProfileRequest struct {
- InstanceProfileName aws.StringValue `query:"InstanceProfileName" xml:"InstanceProfileName"`
-}
-
-// GetInstanceProfileResponse is undocumented.
-type GetInstanceProfileResponse struct {
- InstanceProfile *InstanceProfile `query:"InstanceProfile" xml:"GetInstanceProfileResult>InstanceProfile"`
-}
-
-// GetLoginProfileRequest is undocumented.
-type GetLoginProfileRequest struct {
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// GetLoginProfileResponse is undocumented.
-type GetLoginProfileResponse struct {
- LoginProfile *LoginProfile `query:"LoginProfile" xml:"GetLoginProfileResult>LoginProfile"`
-}
-
-// GetOpenIDConnectProviderRequest is undocumented.
-type GetOpenIDConnectProviderRequest struct {
- OpenIDConnectProviderARN aws.StringValue `query:"OpenIDConnectProviderArn" xml:"OpenIDConnectProviderArn"`
-}
-
-// GetOpenIDConnectProviderResponse is undocumented.
-type GetOpenIDConnectProviderResponse struct {
- ClientIDList []string `query:"ClientIDList.member" xml:"GetOpenIDConnectProviderResult>ClientIDList>member"`
- CreateDate time.Time `query:"CreateDate" xml:"GetOpenIDConnectProviderResult>CreateDate"`
- ThumbprintList []string `query:"ThumbprintList.member" xml:"GetOpenIDConnectProviderResult>ThumbprintList>member"`
- URL aws.StringValue `query:"Url" xml:"GetOpenIDConnectProviderResult>Url"`
-}
-
-// GetRolePolicyRequest is undocumented.
-type GetRolePolicyRequest struct {
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// GetRolePolicyResponse is undocumented.
-type GetRolePolicyResponse struct {
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"GetRolePolicyResult>PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"GetRolePolicyResult>PolicyName"`
- RoleName aws.StringValue `query:"RoleName" xml:"GetRolePolicyResult>RoleName"`
-}
-
-// GetRoleRequest is undocumented.
-type GetRoleRequest struct {
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// GetRoleResponse is undocumented.
-type GetRoleResponse struct {
- Role *Role `query:"Role" xml:"GetRoleResult>Role"`
-}
-
-// GetSAMLProviderRequest is undocumented.
-type GetSAMLProviderRequest struct {
- SAMLProviderARN aws.StringValue `query:"SAMLProviderArn" xml:"SAMLProviderArn"`
-}
-
-// GetSAMLProviderResponse is undocumented.
-type GetSAMLProviderResponse struct {
- CreateDate time.Time `query:"CreateDate" xml:"GetSAMLProviderResult>CreateDate"`
- SAMLMetadataDocument aws.StringValue `query:"SAMLMetadataDocument" xml:"GetSAMLProviderResult>SAMLMetadataDocument"`
- ValidUntil time.Time `query:"ValidUntil" xml:"GetSAMLProviderResult>ValidUntil"`
-}
-
-// GetServerCertificateRequest is undocumented.
-type GetServerCertificateRequest struct {
- ServerCertificateName aws.StringValue `query:"ServerCertificateName" xml:"ServerCertificateName"`
-}
-
-// GetServerCertificateResponse is undocumented.
-type GetServerCertificateResponse struct {
- ServerCertificate *ServerCertificate `query:"ServerCertificate" xml:"GetServerCertificateResult>ServerCertificate"`
-}
-
-// GetUserPolicyRequest is undocumented.
-type GetUserPolicyRequest struct {
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// GetUserPolicyResponse is undocumented.
-type GetUserPolicyResponse struct {
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"GetUserPolicyResult>PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"GetUserPolicyResult>PolicyName"`
- UserName aws.StringValue `query:"UserName" xml:"GetUserPolicyResult>UserName"`
-}
-
-// GetUserRequest is undocumented.
-type GetUserRequest struct {
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// GetUserResponse is undocumented.
-type GetUserResponse struct {
- User *User `query:"User" xml:"GetUserResult>User"`
-}
-
-// Group is undocumented.
-type Group struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- GroupID aws.StringValue `query:"GroupId" xml:"GroupId"`
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- Path aws.StringValue `query:"Path" xml:"Path"`
-}
-
-// GroupDetail is undocumented.
-type GroupDetail struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- GroupID aws.StringValue `query:"GroupId" xml:"GroupId"`
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- GroupPolicyList []PolicyDetail `query:"GroupPolicyList.member" xml:"GroupPolicyList>member"`
- Path aws.StringValue `query:"Path" xml:"Path"`
-}
-
-// InstanceProfile is undocumented.
-type InstanceProfile struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- InstanceProfileID aws.StringValue `query:"InstanceProfileId" xml:"InstanceProfileId"`
- InstanceProfileName aws.StringValue `query:"InstanceProfileName" xml:"InstanceProfileName"`
- Path aws.StringValue `query:"Path" xml:"Path"`
- Roles []Role `query:"Roles.member" xml:"Roles>member"`
-}
-
-// ListAccessKeysRequest is undocumented.
-type ListAccessKeysRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// ListAccessKeysResponse is undocumented.
-type ListAccessKeysResponse struct {
- AccessKeyMetadata []AccessKeyMetadata `query:"AccessKeyMetadata.member" xml:"ListAccessKeysResult>AccessKeyMetadata>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListAccessKeysResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListAccessKeysResult>Marker"`
-}
-
-// ListAccountAliasesRequest is undocumented.
-type ListAccountAliasesRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
-}
-
-// ListAccountAliasesResponse is undocumented.
-type ListAccountAliasesResponse struct {
- AccountAliases []string `query:"AccountAliases.member" xml:"ListAccountAliasesResult>AccountAliases>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListAccountAliasesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListAccountAliasesResult>Marker"`
-}
-
-// ListGroupPoliciesRequest is undocumented.
-type ListGroupPoliciesRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
-}
-
-// ListGroupPoliciesResponse is undocumented.
-type ListGroupPoliciesResponse struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListGroupPoliciesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListGroupPoliciesResult>Marker"`
- PolicyNames []string `query:"PolicyNames.member" xml:"ListGroupPoliciesResult>PolicyNames>member"`
-}
-
-// ListGroupsForUserRequest is undocumented.
-type ListGroupsForUserRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// ListGroupsForUserResponse is undocumented.
-type ListGroupsForUserResponse struct {
- Groups []Group `query:"Groups.member" xml:"ListGroupsForUserResult>Groups>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListGroupsForUserResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListGroupsForUserResult>Marker"`
-}
-
-// ListGroupsRequest is undocumented.
-type ListGroupsRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- PathPrefix aws.StringValue `query:"PathPrefix" xml:"PathPrefix"`
-}
-
-// ListGroupsResponse is undocumented.
-type ListGroupsResponse struct {
- Groups []Group `query:"Groups.member" xml:"ListGroupsResult>Groups>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListGroupsResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListGroupsResult>Marker"`
-}
-
-// ListInstanceProfilesForRoleRequest is undocumented.
-type ListInstanceProfilesForRoleRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// ListInstanceProfilesForRoleResponse is undocumented.
-type ListInstanceProfilesForRoleResponse struct {
- InstanceProfiles []InstanceProfile `query:"InstanceProfiles.member" xml:"ListInstanceProfilesForRoleResult>InstanceProfiles>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListInstanceProfilesForRoleResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListInstanceProfilesForRoleResult>Marker"`
-}
-
-// ListInstanceProfilesRequest is undocumented.
-type ListInstanceProfilesRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- PathPrefix aws.StringValue `query:"PathPrefix" xml:"PathPrefix"`
-}
-
-// ListInstanceProfilesResponse is undocumented.
-type ListInstanceProfilesResponse struct {
- InstanceProfiles []InstanceProfile `query:"InstanceProfiles.member" xml:"ListInstanceProfilesResult>InstanceProfiles>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListInstanceProfilesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListInstanceProfilesResult>Marker"`
-}
-
-// ListMFADevicesRequest is undocumented.
-type ListMFADevicesRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// ListMFADevicesResponse is undocumented.
-type ListMFADevicesResponse struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListMFADevicesResult>IsTruncated"`
- MFADevices []MFADevice `query:"MFADevices.member" xml:"ListMFADevicesResult>MFADevices>member"`
- Marker aws.StringValue `query:"Marker" xml:"ListMFADevicesResult>Marker"`
-}
-
-// ListOpenIDConnectProvidersRequest is undocumented.
-type ListOpenIDConnectProvidersRequest struct {
-}
-
-// ListOpenIDConnectProvidersResponse is undocumented.
-type ListOpenIDConnectProvidersResponse struct {
- OpenIDConnectProviderList []OpenIDConnectProviderListEntry `query:"OpenIDConnectProviderList.member" xml:"ListOpenIDConnectProvidersResult>OpenIDConnectProviderList>member"`
-}
-
-// ListRolePoliciesRequest is undocumented.
-type ListRolePoliciesRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// ListRolePoliciesResponse is undocumented.
-type ListRolePoliciesResponse struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListRolePoliciesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListRolePoliciesResult>Marker"`
- PolicyNames []string `query:"PolicyNames.member" xml:"ListRolePoliciesResult>PolicyNames>member"`
-}
-
-// ListRolesRequest is undocumented.
-type ListRolesRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- PathPrefix aws.StringValue `query:"PathPrefix" xml:"PathPrefix"`
-}
-
-// ListRolesResponse is undocumented.
-type ListRolesResponse struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListRolesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListRolesResult>Marker"`
- Roles []Role `query:"Roles.member" xml:"ListRolesResult>Roles>member"`
-}
-
-// ListSAMLProvidersRequest is undocumented.
-type ListSAMLProvidersRequest struct {
-}
-
-// ListSAMLProvidersResponse is undocumented.
-type ListSAMLProvidersResponse struct {
- SAMLProviderList []SAMLProviderListEntry `query:"SAMLProviderList.member" xml:"ListSAMLProvidersResult>SAMLProviderList>member"`
-}
-
-// ListServerCertificatesRequest is undocumented.
-type ListServerCertificatesRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- PathPrefix aws.StringValue `query:"PathPrefix" xml:"PathPrefix"`
-}
-
-// ListServerCertificatesResponse is undocumented.
-type ListServerCertificatesResponse struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListServerCertificatesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListServerCertificatesResult>Marker"`
- ServerCertificateMetadataList []ServerCertificateMetadata `query:"ServerCertificateMetadataList.member" xml:"ListServerCertificatesResult>ServerCertificateMetadataList>member"`
-}
-
-// ListSigningCertificatesRequest is undocumented.
-type ListSigningCertificatesRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// ListSigningCertificatesResponse is undocumented.
-type ListSigningCertificatesResponse struct {
- Certificates []SigningCertificate `query:"Certificates.member" xml:"ListSigningCertificatesResult>Certificates>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListSigningCertificatesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListSigningCertificatesResult>Marker"`
-}
-
-// ListUserPoliciesRequest is undocumented.
-type ListUserPoliciesRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// ListUserPoliciesResponse is undocumented.
-type ListUserPoliciesResponse struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListUserPoliciesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListUserPoliciesResult>Marker"`
- PolicyNames []string `query:"PolicyNames.member" xml:"ListUserPoliciesResult>PolicyNames>member"`
-}
-
-// ListUsersRequest is undocumented.
-type ListUsersRequest struct {
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
- PathPrefix aws.StringValue `query:"PathPrefix" xml:"PathPrefix"`
-}
-
-// ListUsersResponse is undocumented.
-type ListUsersResponse struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListUsersResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListUsersResult>Marker"`
- Users []User `query:"Users.member" xml:"ListUsersResult>Users>member"`
-}
-
-// ListVirtualMFADevicesRequest is undocumented.
-type ListVirtualMFADevicesRequest struct {
- AssignmentStatus aws.StringValue `query:"AssignmentStatus" xml:"AssignmentStatus"`
- Marker aws.StringValue `query:"Marker" xml:"Marker"`
- MaxItems aws.IntegerValue `query:"MaxItems" xml:"MaxItems"`
-}
-
-// ListVirtualMFADevicesResponse is undocumented.
-type ListVirtualMFADevicesResponse struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListVirtualMFADevicesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListVirtualMFADevicesResult>Marker"`
- VirtualMFADevices []VirtualMFADevice `query:"VirtualMFADevices.member" xml:"ListVirtualMFADevicesResult>VirtualMFADevices>member"`
-}
-
-// LoginProfile is undocumented.
-type LoginProfile struct {
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- PasswordResetRequired aws.BooleanValue `query:"PasswordResetRequired" xml:"PasswordResetRequired"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// MFADevice is undocumented.
-type MFADevice struct {
- EnableDate time.Time `query:"EnableDate" xml:"EnableDate"`
- SerialNumber aws.StringValue `query:"SerialNumber" xml:"SerialNumber"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// OpenIDConnectProviderListEntry is undocumented.
-type OpenIDConnectProviderListEntry struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
-}
-
-// PasswordPolicy is undocumented.
-type PasswordPolicy struct {
- AllowUsersToChangePassword aws.BooleanValue `query:"AllowUsersToChangePassword" xml:"AllowUsersToChangePassword"`
- ExpirePasswords aws.BooleanValue `query:"ExpirePasswords" xml:"ExpirePasswords"`
- HardExpiry aws.BooleanValue `query:"HardExpiry" xml:"HardExpiry"`
- MaxPasswordAge aws.IntegerValue `query:"MaxPasswordAge" xml:"MaxPasswordAge"`
- MinimumPasswordLength aws.IntegerValue `query:"MinimumPasswordLength" xml:"MinimumPasswordLength"`
- PasswordReusePrevention aws.IntegerValue `query:"PasswordReusePrevention" xml:"PasswordReusePrevention"`
- RequireLowercaseCharacters aws.BooleanValue `query:"RequireLowercaseCharacters" xml:"RequireLowercaseCharacters"`
- RequireNumbers aws.BooleanValue `query:"RequireNumbers" xml:"RequireNumbers"`
- RequireSymbols aws.BooleanValue `query:"RequireSymbols" xml:"RequireSymbols"`
- RequireUppercaseCharacters aws.BooleanValue `query:"RequireUppercaseCharacters" xml:"RequireUppercaseCharacters"`
-}
-
-// PolicyDetail is undocumented.
-type PolicyDetail struct {
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
-}
-
-// PutGroupPolicyRequest is undocumented.
-type PutGroupPolicyRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
-}
-
-// PutRolePolicyRequest is undocumented.
-type PutRolePolicyRequest struct {
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// PutUserPolicyRequest is undocumented.
-type PutUserPolicyRequest struct {
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"PolicyName"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// RemoveClientIDFromOpenIDConnectProviderRequest is undocumented.
-type RemoveClientIDFromOpenIDConnectProviderRequest struct {
- ClientID aws.StringValue `query:"ClientID" xml:"ClientID"`
- OpenIDConnectProviderARN aws.StringValue `query:"OpenIDConnectProviderArn" xml:"OpenIDConnectProviderArn"`
-}
-
-// RemoveRoleFromInstanceProfileRequest is undocumented.
-type RemoveRoleFromInstanceProfileRequest struct {
- InstanceProfileName aws.StringValue `query:"InstanceProfileName" xml:"InstanceProfileName"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// RemoveUserFromGroupRequest is undocumented.
-type RemoveUserFromGroupRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// Possible values for IAM.
-const (
- ReportFormatTypeTextCSV = "text/csv"
-)
-
-// Possible values for IAM.
-const (
- ReportStateTypeComplete = "COMPLETE"
- ReportStateTypeInprogress = "INPROGRESS"
- ReportStateTypeStarted = "STARTED"
-)
-
-// ResyncMFADeviceRequest is undocumented.
-type ResyncMFADeviceRequest struct {
- AuthenticationCode1 aws.StringValue `query:"AuthenticationCode1" xml:"AuthenticationCode1"`
- AuthenticationCode2 aws.StringValue `query:"AuthenticationCode2" xml:"AuthenticationCode2"`
- SerialNumber aws.StringValue `query:"SerialNumber" xml:"SerialNumber"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// Role is undocumented.
-type Role struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- AssumeRolePolicyDocument aws.StringValue `query:"AssumeRolePolicyDocument" xml:"AssumeRolePolicyDocument"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- Path aws.StringValue `query:"Path" xml:"Path"`
- RoleID aws.StringValue `query:"RoleId" xml:"RoleId"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// RoleDetail is undocumented.
-type RoleDetail struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- AssumeRolePolicyDocument aws.StringValue `query:"AssumeRolePolicyDocument" xml:"AssumeRolePolicyDocument"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- InstanceProfileList []InstanceProfile `query:"InstanceProfileList.member" xml:"InstanceProfileList>member"`
- Path aws.StringValue `query:"Path" xml:"Path"`
- RoleID aws.StringValue `query:"RoleId" xml:"RoleId"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
- RolePolicyList []PolicyDetail `query:"RolePolicyList.member" xml:"RolePolicyList>member"`
-}
-
-// SAMLProviderListEntry is undocumented.
-type SAMLProviderListEntry struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- ValidUntil time.Time `query:"ValidUntil" xml:"ValidUntil"`
-}
-
-// ServerCertificate is undocumented.
-type ServerCertificate struct {
- CertificateBody aws.StringValue `query:"CertificateBody" xml:"CertificateBody"`
- CertificateChain aws.StringValue `query:"CertificateChain" xml:"CertificateChain"`
- ServerCertificateMetadata *ServerCertificateMetadata `query:"ServerCertificateMetadata" xml:"ServerCertificateMetadata"`
-}
-
-// ServerCertificateMetadata is undocumented.
-type ServerCertificateMetadata struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- Expiration time.Time `query:"Expiration" xml:"Expiration"`
- Path aws.StringValue `query:"Path" xml:"Path"`
- ServerCertificateID aws.StringValue `query:"ServerCertificateId" xml:"ServerCertificateId"`
- ServerCertificateName aws.StringValue `query:"ServerCertificateName" xml:"ServerCertificateName"`
- UploadDate time.Time `query:"UploadDate" xml:"UploadDate"`
-}
-
-// SigningCertificate is undocumented.
-type SigningCertificate struct {
- CertificateBody aws.StringValue `query:"CertificateBody" xml:"CertificateBody"`
- CertificateID aws.StringValue `query:"CertificateId" xml:"CertificateId"`
- Status aws.StringValue `query:"Status" xml:"Status"`
- UploadDate time.Time `query:"UploadDate" xml:"UploadDate"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// UpdateAccessKeyRequest is undocumented.
-type UpdateAccessKeyRequest struct {
- AccessKeyID aws.StringValue `query:"AccessKeyId" xml:"AccessKeyId"`
- Status aws.StringValue `query:"Status" xml:"Status"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// UpdateAccountPasswordPolicyRequest is undocumented.
-type UpdateAccountPasswordPolicyRequest struct {
- AllowUsersToChangePassword aws.BooleanValue `query:"AllowUsersToChangePassword" xml:"AllowUsersToChangePassword"`
- HardExpiry aws.BooleanValue `query:"HardExpiry" xml:"HardExpiry"`
- MaxPasswordAge aws.IntegerValue `query:"MaxPasswordAge" xml:"MaxPasswordAge"`
- MinimumPasswordLength aws.IntegerValue `query:"MinimumPasswordLength" xml:"MinimumPasswordLength"`
- PasswordReusePrevention aws.IntegerValue `query:"PasswordReusePrevention" xml:"PasswordReusePrevention"`
- RequireLowercaseCharacters aws.BooleanValue `query:"RequireLowercaseCharacters" xml:"RequireLowercaseCharacters"`
- RequireNumbers aws.BooleanValue `query:"RequireNumbers" xml:"RequireNumbers"`
- RequireSymbols aws.BooleanValue `query:"RequireSymbols" xml:"RequireSymbols"`
- RequireUppercaseCharacters aws.BooleanValue `query:"RequireUppercaseCharacters" xml:"RequireUppercaseCharacters"`
-}
-
-// UpdateAssumeRolePolicyRequest is undocumented.
-type UpdateAssumeRolePolicyRequest struct {
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"PolicyDocument"`
- RoleName aws.StringValue `query:"RoleName" xml:"RoleName"`
-}
-
-// UpdateGroupRequest is undocumented.
-type UpdateGroupRequest struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GroupName"`
- NewGroupName aws.StringValue `query:"NewGroupName" xml:"NewGroupName"`
- NewPath aws.StringValue `query:"NewPath" xml:"NewPath"`
-}
-
-// UpdateLoginProfileRequest is undocumented.
-type UpdateLoginProfileRequest struct {
- Password aws.StringValue `query:"Password" xml:"Password"`
- PasswordResetRequired aws.BooleanValue `query:"PasswordResetRequired" xml:"PasswordResetRequired"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// UpdateOpenIDConnectProviderThumbprintRequest is undocumented.
-type UpdateOpenIDConnectProviderThumbprintRequest struct {
- OpenIDConnectProviderARN aws.StringValue `query:"OpenIDConnectProviderArn" xml:"OpenIDConnectProviderArn"`
- ThumbprintList []string `query:"ThumbprintList.member" xml:"ThumbprintList>member"`
-}
-
-// UpdateSAMLProviderRequest is undocumented.
-type UpdateSAMLProviderRequest struct {
- SAMLMetadataDocument aws.StringValue `query:"SAMLMetadataDocument" xml:"SAMLMetadataDocument"`
- SAMLProviderARN aws.StringValue `query:"SAMLProviderArn" xml:"SAMLProviderArn"`
-}
-
-// UpdateSAMLProviderResponse is undocumented.
-type UpdateSAMLProviderResponse struct {
- SAMLProviderARN aws.StringValue `query:"SAMLProviderArn" xml:"UpdateSAMLProviderResult>SAMLProviderArn"`
-}
-
-// UpdateServerCertificateRequest is undocumented.
-type UpdateServerCertificateRequest struct {
- NewPath aws.StringValue `query:"NewPath" xml:"NewPath"`
- NewServerCertificateName aws.StringValue `query:"NewServerCertificateName" xml:"NewServerCertificateName"`
- ServerCertificateName aws.StringValue `query:"ServerCertificateName" xml:"ServerCertificateName"`
-}
-
-// UpdateSigningCertificateRequest is undocumented.
-type UpdateSigningCertificateRequest struct {
- CertificateID aws.StringValue `query:"CertificateId" xml:"CertificateId"`
- Status aws.StringValue `query:"Status" xml:"Status"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// UpdateUserRequest is undocumented.
-type UpdateUserRequest struct {
- NewPath aws.StringValue `query:"NewPath" xml:"NewPath"`
- NewUserName aws.StringValue `query:"NewUserName" xml:"NewUserName"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// UploadServerCertificateRequest is undocumented.
-type UploadServerCertificateRequest struct {
- CertificateBody aws.StringValue `query:"CertificateBody" xml:"CertificateBody"`
- CertificateChain aws.StringValue `query:"CertificateChain" xml:"CertificateChain"`
- Path aws.StringValue `query:"Path" xml:"Path"`
- PrivateKey aws.StringValue `query:"PrivateKey" xml:"PrivateKey"`
- ServerCertificateName aws.StringValue `query:"ServerCertificateName" xml:"ServerCertificateName"`
-}
-
-// UploadServerCertificateResponse is undocumented.
-type UploadServerCertificateResponse struct {
- ServerCertificateMetadata *ServerCertificateMetadata `query:"ServerCertificateMetadata" xml:"UploadServerCertificateResult>ServerCertificateMetadata"`
-}
-
-// UploadSigningCertificateRequest is undocumented.
-type UploadSigningCertificateRequest struct {
- CertificateBody aws.StringValue `query:"CertificateBody" xml:"CertificateBody"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// UploadSigningCertificateResponse is undocumented.
-type UploadSigningCertificateResponse struct {
- Certificate *SigningCertificate `query:"Certificate" xml:"UploadSigningCertificateResult>Certificate"`
-}
-
-// User is undocumented.
-type User struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- PasswordLastUsed time.Time `query:"PasswordLastUsed" xml:"PasswordLastUsed"`
- Path aws.StringValue `query:"Path" xml:"Path"`
- UserID aws.StringValue `query:"UserId" xml:"UserId"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
-}
-
-// UserDetail is undocumented.
-type UserDetail struct {
- ARN aws.StringValue `query:"Arn" xml:"Arn"`
- CreateDate time.Time `query:"CreateDate" xml:"CreateDate"`
- GroupList []string `query:"GroupList.member" xml:"GroupList>member"`
- Path aws.StringValue `query:"Path" xml:"Path"`
- UserID aws.StringValue `query:"UserId" xml:"UserId"`
- UserName aws.StringValue `query:"UserName" xml:"UserName"`
- UserPolicyList []PolicyDetail `query:"UserPolicyList.member" xml:"UserPolicyList>member"`
-}
-
-// VirtualMFADevice is undocumented.
-type VirtualMFADevice struct {
- Base32StringSeed []byte `query:"Base32StringSeed" xml:"Base32StringSeed"`
- EnableDate time.Time `query:"EnableDate" xml:"EnableDate"`
- QRCodePNG []byte `query:"QRCodePNG" xml:"QRCodePNG"`
- SerialNumber aws.StringValue `query:"SerialNumber" xml:"SerialNumber"`
- User *User `query:"User" xml:"User"`
-}
-
-// Possible values for IAM.
-const (
- AssignmentStatusTypeAny = "Any"
- AssignmentStatusTypeAssigned = "Assigned"
- AssignmentStatusTypeUnassigned = "Unassigned"
-)
-
-// Possible values for IAM.
-const (
- StatusTypeActive = "Active"
- StatusTypeInactive = "Inactive"
-)
-
-// Possible values for IAM.
-const (
- SummaryKeyTypeAccessKeysPerUserQuota = "AccessKeysPerUserQuota"
- SummaryKeyTypeAccountMFAenabled = "AccountMFAEnabled"
- SummaryKeyTypeGroupPolicySizeQuota = "GroupPolicySizeQuota"
- SummaryKeyTypeGroups = "Groups"
- SummaryKeyTypeGroupsPerUserQuota = "GroupsPerUserQuota"
- SummaryKeyTypeGroupsQuota = "GroupsQuota"
- SummaryKeyTypeMFAdevices = "MFADevices"
- SummaryKeyTypeMFAdevicesInUse = "MFADevicesInUse"
- SummaryKeyTypeServerCertificates = "ServerCertificates"
- SummaryKeyTypeServerCertificatesQuota = "ServerCertificatesQuota"
- SummaryKeyTypeSigningCertificatesPerUserQuota = "SigningCertificatesPerUserQuota"
- SummaryKeyTypeUserPolicySizeQuota = "UserPolicySizeQuota"
- SummaryKeyTypeUsers = "Users"
- SummaryKeyTypeUsersQuota = "UsersQuota"
-)
-
-type SummaryMapType map[string]int
-
-// UnmarshalXML implements xml.UnmarshalXML interface for map
-func (m *SummaryMapType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
- if *m == nil {
- (*m) = make(SummaryMapType)
- }
- for {
- var e struct {
- Key string `xml:"key"`
- Value int `xml:"value"`
- }
- err := d.DecodeElement(&e, &start)
- if err != nil && err != io.EOF {
- return err
- }
- if err == io.EOF {
- break
- }
- (*m)[e.Key] = e.Value
- }
- return nil
-}
-
-// CreateAccessKeyResult is a wrapper for CreateAccessKeyResponse.
-type CreateAccessKeyResult struct {
- AccessKey *AccessKey `query:"AccessKey" xml:"CreateAccessKeyResult>AccessKey"`
-}
-
-// CreateGroupResult is a wrapper for CreateGroupResponse.
-type CreateGroupResult struct {
- Group *Group `query:"Group" xml:"CreateGroupResult>Group"`
-}
-
-// CreateInstanceProfileResult is a wrapper for CreateInstanceProfileResponse.
-type CreateInstanceProfileResult struct {
- InstanceProfile *InstanceProfile `query:"InstanceProfile" xml:"CreateInstanceProfileResult>InstanceProfile"`
-}
-
-// CreateLoginProfileResult is a wrapper for CreateLoginProfileResponse.
-type CreateLoginProfileResult struct {
- LoginProfile *LoginProfile `query:"LoginProfile" xml:"CreateLoginProfileResult>LoginProfile"`
-}
-
-// CreateOpenIDConnectProviderResult is a wrapper for CreateOpenIDConnectProviderResponse.
-type CreateOpenIDConnectProviderResult struct {
- OpenIDConnectProviderARN aws.StringValue `query:"OpenIDConnectProviderArn" xml:"CreateOpenIDConnectProviderResult>OpenIDConnectProviderArn"`
-}
-
-// CreateRoleResult is a wrapper for CreateRoleResponse.
-type CreateRoleResult struct {
- Role *Role `query:"Role" xml:"CreateRoleResult>Role"`
-}
-
-// CreateSAMLProviderResult is a wrapper for CreateSAMLProviderResponse.
-type CreateSAMLProviderResult struct {
- SAMLProviderARN aws.StringValue `query:"SAMLProviderArn" xml:"CreateSAMLProviderResult>SAMLProviderArn"`
-}
-
-// CreateUserResult is a wrapper for CreateUserResponse.
-type CreateUserResult struct {
- User *User `query:"User" xml:"CreateUserResult>User"`
-}
-
-// CreateVirtualMFADeviceResult is a wrapper for CreateVirtualMFADeviceResponse.
-type CreateVirtualMFADeviceResult struct {
- VirtualMFADevice *VirtualMFADevice `query:"VirtualMFADevice" xml:"CreateVirtualMFADeviceResult>VirtualMFADevice"`
-}
-
-// GenerateCredentialReportResult is a wrapper for GenerateCredentialReportResponse.
-type GenerateCredentialReportResult struct {
- Description aws.StringValue `query:"Description" xml:"GenerateCredentialReportResult>Description"`
- State aws.StringValue `query:"State" xml:"GenerateCredentialReportResult>State"`
-}
-
-// GetAccountAuthorizationDetailsResult is a wrapper for GetAccountAuthorizationDetailsResponse.
-type GetAccountAuthorizationDetailsResult struct {
- GroupDetailList []GroupDetail `query:"GroupDetailList.member" xml:"GetAccountAuthorizationDetailsResult>GroupDetailList>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"GetAccountAuthorizationDetailsResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"GetAccountAuthorizationDetailsResult>Marker"`
- RoleDetailList []RoleDetail `query:"RoleDetailList.member" xml:"GetAccountAuthorizationDetailsResult>RoleDetailList>member"`
- UserDetailList []UserDetail `query:"UserDetailList.member" xml:"GetAccountAuthorizationDetailsResult>UserDetailList>member"`
-}
-
-// GetAccountPasswordPolicyResult is a wrapper for GetAccountPasswordPolicyResponse.
-type GetAccountPasswordPolicyResult struct {
- PasswordPolicy *PasswordPolicy `query:"PasswordPolicy" xml:"GetAccountPasswordPolicyResult>PasswordPolicy"`
-}
-
-// GetAccountSummaryResult is a wrapper for GetAccountSummaryResponse.
-type GetAccountSummaryResult struct {
- SummaryMap SummaryMapType `query:"SummaryMap.entry" xml:"GetAccountSummaryResult>SummaryMap>entry"`
-}
-
-// GetCredentialReportResult is a wrapper for GetCredentialReportResponse.
-type GetCredentialReportResult struct {
- Content []byte `query:"Content" xml:"GetCredentialReportResult>Content"`
- GeneratedTime time.Time `query:"GeneratedTime" xml:"GetCredentialReportResult>GeneratedTime"`
- ReportFormat aws.StringValue `query:"ReportFormat" xml:"GetCredentialReportResult>ReportFormat"`
-}
-
-// GetGroupPolicyResult is a wrapper for GetGroupPolicyResponse.
-type GetGroupPolicyResult struct {
- GroupName aws.StringValue `query:"GroupName" xml:"GetGroupPolicyResult>GroupName"`
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"GetGroupPolicyResult>PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"GetGroupPolicyResult>PolicyName"`
-}
-
-// GetGroupResult is a wrapper for GetGroupResponse.
-type GetGroupResult struct {
- Group *Group `query:"Group" xml:"GetGroupResult>Group"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"GetGroupResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"GetGroupResult>Marker"`
- Users []User `query:"Users.member" xml:"GetGroupResult>Users>member"`
-}
-
-// GetInstanceProfileResult is a wrapper for GetInstanceProfileResponse.
-type GetInstanceProfileResult struct {
- InstanceProfile *InstanceProfile `query:"InstanceProfile" xml:"GetInstanceProfileResult>InstanceProfile"`
-}
-
-// GetLoginProfileResult is a wrapper for GetLoginProfileResponse.
-type GetLoginProfileResult struct {
- LoginProfile *LoginProfile `query:"LoginProfile" xml:"GetLoginProfileResult>LoginProfile"`
-}
-
-// GetOpenIDConnectProviderResult is a wrapper for GetOpenIDConnectProviderResponse.
-type GetOpenIDConnectProviderResult struct {
- ClientIDList []string `query:"ClientIDList.member" xml:"GetOpenIDConnectProviderResult>ClientIDList>member"`
- CreateDate time.Time `query:"CreateDate" xml:"GetOpenIDConnectProviderResult>CreateDate"`
- ThumbprintList []string `query:"ThumbprintList.member" xml:"GetOpenIDConnectProviderResult>ThumbprintList>member"`
- URL aws.StringValue `query:"Url" xml:"GetOpenIDConnectProviderResult>Url"`
-}
-
-// GetRolePolicyResult is a wrapper for GetRolePolicyResponse.
-type GetRolePolicyResult struct {
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"GetRolePolicyResult>PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"GetRolePolicyResult>PolicyName"`
- RoleName aws.StringValue `query:"RoleName" xml:"GetRolePolicyResult>RoleName"`
-}
-
-// GetRoleResult is a wrapper for GetRoleResponse.
-type GetRoleResult struct {
- Role *Role `query:"Role" xml:"GetRoleResult>Role"`
-}
-
-// GetSAMLProviderResult is a wrapper for GetSAMLProviderResponse.
-type GetSAMLProviderResult struct {
- CreateDate time.Time `query:"CreateDate" xml:"GetSAMLProviderResult>CreateDate"`
- SAMLMetadataDocument aws.StringValue `query:"SAMLMetadataDocument" xml:"GetSAMLProviderResult>SAMLMetadataDocument"`
- ValidUntil time.Time `query:"ValidUntil" xml:"GetSAMLProviderResult>ValidUntil"`
-}
-
-// GetServerCertificateResult is a wrapper for GetServerCertificateResponse.
-type GetServerCertificateResult struct {
- ServerCertificate *ServerCertificate `query:"ServerCertificate" xml:"GetServerCertificateResult>ServerCertificate"`
-}
-
-// GetUserPolicyResult is a wrapper for GetUserPolicyResponse.
-type GetUserPolicyResult struct {
- PolicyDocument aws.StringValue `query:"PolicyDocument" xml:"GetUserPolicyResult>PolicyDocument"`
- PolicyName aws.StringValue `query:"PolicyName" xml:"GetUserPolicyResult>PolicyName"`
- UserName aws.StringValue `query:"UserName" xml:"GetUserPolicyResult>UserName"`
-}
-
-// GetUserResult is a wrapper for GetUserResponse.
-type GetUserResult struct {
- User *User `query:"User" xml:"GetUserResult>User"`
-}
-
-// ListAccessKeysResult is a wrapper for ListAccessKeysResponse.
-type ListAccessKeysResult struct {
- AccessKeyMetadata []AccessKeyMetadata `query:"AccessKeyMetadata.member" xml:"ListAccessKeysResult>AccessKeyMetadata>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListAccessKeysResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListAccessKeysResult>Marker"`
-}
-
-// ListAccountAliasesResult is a wrapper for ListAccountAliasesResponse.
-type ListAccountAliasesResult struct {
- AccountAliases []string `query:"AccountAliases.member" xml:"ListAccountAliasesResult>AccountAliases>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListAccountAliasesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListAccountAliasesResult>Marker"`
-}
-
-// ListGroupPoliciesResult is a wrapper for ListGroupPoliciesResponse.
-type ListGroupPoliciesResult struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListGroupPoliciesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListGroupPoliciesResult>Marker"`
- PolicyNames []string `query:"PolicyNames.member" xml:"ListGroupPoliciesResult>PolicyNames>member"`
-}
-
-// ListGroupsForUserResult is a wrapper for ListGroupsForUserResponse.
-type ListGroupsForUserResult struct {
- Groups []Group `query:"Groups.member" xml:"ListGroupsForUserResult>Groups>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListGroupsForUserResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListGroupsForUserResult>Marker"`
-}
-
-// ListGroupsResult is a wrapper for ListGroupsResponse.
-type ListGroupsResult struct {
- Groups []Group `query:"Groups.member" xml:"ListGroupsResult>Groups>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListGroupsResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListGroupsResult>Marker"`
-}
-
-// ListInstanceProfilesForRoleResult is a wrapper for ListInstanceProfilesForRoleResponse.
-type ListInstanceProfilesForRoleResult struct {
- InstanceProfiles []InstanceProfile `query:"InstanceProfiles.member" xml:"ListInstanceProfilesForRoleResult>InstanceProfiles>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListInstanceProfilesForRoleResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListInstanceProfilesForRoleResult>Marker"`
-}
-
-// ListInstanceProfilesResult is a wrapper for ListInstanceProfilesResponse.
-type ListInstanceProfilesResult struct {
- InstanceProfiles []InstanceProfile `query:"InstanceProfiles.member" xml:"ListInstanceProfilesResult>InstanceProfiles>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListInstanceProfilesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListInstanceProfilesResult>Marker"`
-}
-
-// ListMFADevicesResult is a wrapper for ListMFADevicesResponse.
-type ListMFADevicesResult struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListMFADevicesResult>IsTruncated"`
- MFADevices []MFADevice `query:"MFADevices.member" xml:"ListMFADevicesResult>MFADevices>member"`
- Marker aws.StringValue `query:"Marker" xml:"ListMFADevicesResult>Marker"`
-}
-
-// ListOpenIDConnectProvidersResult is a wrapper for ListOpenIDConnectProvidersResponse.
-type ListOpenIDConnectProvidersResult struct {
- OpenIDConnectProviderList []OpenIDConnectProviderListEntry `query:"OpenIDConnectProviderList.member" xml:"ListOpenIDConnectProvidersResult>OpenIDConnectProviderList>member"`
-}
-
-// ListRolePoliciesResult is a wrapper for ListRolePoliciesResponse.
-type ListRolePoliciesResult struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListRolePoliciesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListRolePoliciesResult>Marker"`
- PolicyNames []string `query:"PolicyNames.member" xml:"ListRolePoliciesResult>PolicyNames>member"`
-}
-
-// ListRolesResult is a wrapper for ListRolesResponse.
-type ListRolesResult struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListRolesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListRolesResult>Marker"`
- Roles []Role `query:"Roles.member" xml:"ListRolesResult>Roles>member"`
-}
-
-// ListSAMLProvidersResult is a wrapper for ListSAMLProvidersResponse.
-type ListSAMLProvidersResult struct {
- SAMLProviderList []SAMLProviderListEntry `query:"SAMLProviderList.member" xml:"ListSAMLProvidersResult>SAMLProviderList>member"`
-}
-
-// ListServerCertificatesResult is a wrapper for ListServerCertificatesResponse.
-type ListServerCertificatesResult struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListServerCertificatesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListServerCertificatesResult>Marker"`
- ServerCertificateMetadataList []ServerCertificateMetadata `query:"ServerCertificateMetadataList.member" xml:"ListServerCertificatesResult>ServerCertificateMetadataList>member"`
-}
-
-// ListSigningCertificatesResult is a wrapper for ListSigningCertificatesResponse.
-type ListSigningCertificatesResult struct {
- Certificates []SigningCertificate `query:"Certificates.member" xml:"ListSigningCertificatesResult>Certificates>member"`
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListSigningCertificatesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListSigningCertificatesResult>Marker"`
-}
-
-// ListUserPoliciesResult is a wrapper for ListUserPoliciesResponse.
-type ListUserPoliciesResult struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListUserPoliciesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListUserPoliciesResult>Marker"`
- PolicyNames []string `query:"PolicyNames.member" xml:"ListUserPoliciesResult>PolicyNames>member"`
-}
-
-// ListUsersResult is a wrapper for ListUsersResponse.
-type ListUsersResult struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListUsersResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListUsersResult>Marker"`
- Users []User `query:"Users.member" xml:"ListUsersResult>Users>member"`
-}
-
-// ListVirtualMFADevicesResult is a wrapper for ListVirtualMFADevicesResponse.
-type ListVirtualMFADevicesResult struct {
- IsTruncated aws.BooleanValue `query:"IsTruncated" xml:"ListVirtualMFADevicesResult>IsTruncated"`
- Marker aws.StringValue `query:"Marker" xml:"ListVirtualMFADevicesResult>Marker"`
- VirtualMFADevices []VirtualMFADevice `query:"VirtualMFADevices.member" xml:"ListVirtualMFADevicesResult>VirtualMFADevices>member"`
-}
-
-// UpdateSAMLProviderResult is a wrapper for UpdateSAMLProviderResponse.
-type UpdateSAMLProviderResult struct {
- SAMLProviderARN aws.StringValue `query:"SAMLProviderArn" xml:"UpdateSAMLProviderResult>SAMLProviderArn"`
-}
-
-// UploadServerCertificateResult is a wrapper for UploadServerCertificateResponse.
-type UploadServerCertificateResult struct {
- ServerCertificateMetadata *ServerCertificateMetadata `query:"ServerCertificateMetadata" xml:"UploadServerCertificateResult>ServerCertificateMetadata"`
-}
-
-// UploadSigningCertificateResult is a wrapper for UploadSigningCertificateResponse.
-type UploadSigningCertificateResult struct {
- Certificate *SigningCertificate `query:"Certificate" xml:"UploadSigningCertificateResult>Certificate"`
-}
-
-// avoid errors if the packages aren't referenced
-var _ time.Time
-
-var _ xml.Decoder
-var _ = io.EOF
diff --git a/builtin/logical/aws/backend_test.go b/builtin/logical/aws/backend_test.go
index 796feb9182..c0ec13c321 100644
--- a/builtin/logical/aws/backend_test.go
+++ b/builtin/logical/aws/backend_test.go
@@ -9,8 +9,8 @@ import (
"testing"
"time"
- "github.com/hashicorp/aws-sdk-go/aws"
- "github.com/hashicorp/aws-sdk-go/gen/ec2"
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/service/ec2"
"github.com/hashicorp/vault/logical"
logicaltest "github.com/hashicorp/vault/logical/testing"
"github.com/mitchellh/mapstructure"
diff --git a/builtin/logical/aws/client.go b/builtin/logical/aws/client.go
index 143d1a14dc..a5a0c62229 100644
--- a/builtin/logical/aws/client.go
+++ b/builtin/logical/aws/client.go
@@ -3,8 +3,8 @@ package aws
import (
"fmt"
- "github.com/hashicorp/aws-sdk-go/aws"
- "github.com/hashicorp/aws-sdk-go/gen/iam"
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/service/iam"
"github.com/hashicorp/vault/logical"
)
diff --git a/builtin/logical/aws/path_user.go b/builtin/logical/aws/path_user.go
index 007ca6a2bc..8a26b41718 100644
--- a/builtin/logical/aws/path_user.go
+++ b/builtin/logical/aws/path_user.go
@@ -3,8 +3,8 @@ package aws
import (
"fmt"
- "github.com/hashicorp/aws-sdk-go/aws"
- "github.com/hashicorp/aws-sdk-go/gen/iam"
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/service/iam"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
"github.com/mitchellh/mapstructure"
diff --git a/builtin/logical/aws/secret_access_keys.go b/builtin/logical/aws/secret_access_keys.go
index 5d03b312dc..47becee383 100644
--- a/builtin/logical/aws/secret_access_keys.go
+++ b/builtin/logical/aws/secret_access_keys.go
@@ -5,8 +5,8 @@ import (
"math/rand"
"time"
- "github.com/hashicorp/aws-sdk-go/aws"
- "github.com/hashicorp/aws-sdk-go/gen/iam"
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/service/iam"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
)